Handle audio inputs and Bazel unit test arguments (#33929)

## What changed

- Exclude remote and local audio inputs from thread-history searchable text.
- Add a `unit_test_args` option to `codex_rust_crate` and forward it to the
  generated unit-test wrapper.

GitOrigin-RevId: f0aeb7f811163c3c80aa6f8ef4104650e698347c
This commit is contained in:
sayan-oai
2026-07-17 23:35:53 +00:00
committed by copyberry
parent 3ac476bed2
commit 15d7d2a733
2 changed files with 6 additions and 0 deletions

View File

@@ -235,6 +235,8 @@ fn searchable_text(item: &ThreadItem) -> Option<Cow<'_, str>> {
UserInput::Text { text, .. } => Some(strip_user_message_prefix(text)),
UserInput::Image { .. }
| UserInput::LocalImage { .. }
| UserInput::Audio { .. }
| UserInput::LocalAudio { .. }
| UserInput::Skill { .. }
| UserInput::Mention { .. } => None,
})

View File

@@ -194,6 +194,7 @@ def codex_rust_crate(
deps_extra = [],
integration_compile_data_extra = [],
integration_test_args = [],
unit_test_args = [],
integration_test_timeout = None,
test_data_extra = [],
test_shard_counts = {},
@@ -230,6 +231,7 @@ def codex_rust_crate(
Typically only needed when features add additional deps.
integration_compile_data_extra: Extra compile_data for integration tests.
integration_test_args: Optional args for integration test binaries.
unit_test_args: Optional args for the unit test binary.
integration_test_timeout: Optional Bazel timeout for integration test
targets generated from `tests/*.rs`.
test_data_extra: Extra runtime data for tests.
@@ -347,6 +349,8 @@ def codex_rust_crate(
)
unit_test_kwargs = {}
if unit_test_args:
unit_test_kwargs["args"] = unit_test_args
if unit_test_timeout:
unit_test_kwargs["timeout"] = unit_test_timeout
if unit_test_shard_count: