Add task mentions to the TUI composer (#40315)

## What changed

- Include matching Codex tasks in the `@` mention popup when the active thread supports task tools, prioritizing tasks from the current working directory.
- Submit selected tasks as bounded live thread references so Codex can load their contents with `read_thread`.
- Preserve task mentions across composer history and thread start, resume, and fork flows.

## Testing

- Add coverage for task search and capability propagation, popup selection and rendering, submission encoding, history round-trips, and reference validation and limits.

GitOrigin-RevId: 17502be91bf6d4b01745668829eb69fb318cb5b9
This commit is contained in:
Eric Traut authored and copyberry committed 2026-08-24 02:46:56 +00:00
1 parent a8468330bb
commit 76d98a771e
30 files changed
+1317 -44

No files matched your search

+5
View File
@@ -696,6 +696,7 @@ async fn fresh_startup_thread_drains_buffered_approval_before_draft_handoff() ->
session: test_thread_session(thread_id, test_path_buf("/tmp/project")),
turns: Vec::new(),
blocks_direct_input: false,
task_tools_available: false,
}),
},
))
@@ -910,6 +911,7 @@ async fn startup_thread_started_submits_queued_startup_input() {
session: test_thread_session(thread_id, test_path_buf("/tmp/project")),
turns: Vec::new(),
blocks_direct_input: false,
task_tools_available: false,
}),
)
.await
@@ -998,6 +1000,7 @@ async fn startup_thread_started_discards_another_threads_buffered_events() {
session: test_thread_session(thread_id, test_path_buf("/tmp/project")),
turns: Vec::new(),
blocks_direct_input: false,
task_tools_available: false,
}),
)
.await
@@ -1046,6 +1049,7 @@ async fn startup_thread_started_does_not_replay_resolved_approval() -> Result<()
session: test_thread_session(thread_id, test_path_buf("/tmp/project")),
turns: Vec::new(),
blocks_direct_input: false,
task_tools_available: false,
}),
)
.await?;
@@ -1177,6 +1181,7 @@ fn stale_startup_thread_started_removes_local_routing_state() -> Result<()> {
session: test_thread_session(stale_thread_id, test_path_buf("/tmp/project")),
turns: Vec::new(),
blocks_direct_input: false,
task_tools_available: false,
}),
)
.await?;