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

@@ -543,6 +543,8 @@ impl App {
/*initial_user_message*/ None,
);
self.replace_chat_widget(ChatWidget::new_with_app_event(init));
self.chat_widget
.set_task_mentions_enabled(app_server.task_tools_available(thread_id));
self.chat_widget
.note_rendered_width(tui.terminal.last_known_screen_size.width);
if blocks_direct_input {
@@ -638,6 +640,10 @@ impl App {
match result {
Ok(started) => {
let thread_id = started.session.thread_id;
if started.task_tools_available {
app_server.remember_task_tool_thread(thread_id);
self.chat_widget.set_task_mentions_enabled(/*enabled*/ true);
}
self.pending_primary_events.retain(|event| match event {
ThreadBufferedEvent::Notification(notification) => matches!(
server_notification_thread_target(notification),
@@ -809,6 +815,8 @@ impl App {
initial_user_message,
);
self.replace_chat_widget(ChatWidget::new_with_app_event(init));
self.chat_widget
.set_task_mentions_enabled(started.task_tools_available);
self.chat_widget
.note_rendered_width(tui.terminal.last_known_screen_size.width);
if started.blocks_direct_input {