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

+13
View File
@@ -341,6 +341,7 @@ pub(crate) enum AppEvent {
/// Register a dynamically created background thread before its first turn starts.
DynamicToolThreadStarted {
thread_id: ThreadId,
task_tools_available: bool,
registered: tokio::sync::oneshot::Sender<()>,
},
@@ -350,6 +351,11 @@ pub(crate) enum AppEvent {
response: DynamicToolCallResponse,
},
/// Register task tools inherited by a dynamically created thread.
TaskToolsAvailable {
thread_id: ThreadId,
},
/// Clear the terminal UI (screen + scrollback), start a fresh session, and keep the
/// previous chat resumable.
ClearUi {
@@ -440,6 +446,13 @@ pub(crate) enum AppEvent {
matches: Vec<FileMatch>,
},
/// Same-host task results for the active unified mention query.
TaskSearchResult {
thread_id: ThreadId,
query: String,
matches: Vec<crate::task_mentions::TaskMention>,
},
/// Refresh account rate limits in the background.
RefreshRateLimits {
origin: RateLimitRefreshOrigin,