Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Show model and reasoning effort near the top of task details (#50727)

Eric Traut3e238776e857
diff --git a/codex-rs/tui/src/app/agents_overview_tests.rs b/codex-rs/tui/src/app/agents_overview_tests.rs
index 0c16062a42..67a06a3e55 100644
--- a/codex-rs/tui/src/app/agents_overview_tests.rs
+++ b/codex-rs/tui/src/app/agents_overview_tests.rs
@@ -796,6 +796,10 @@ async fn agents_overview_details_show_available_attention_without_expanding_rows
threads[0].name = None;
threads[2].name = None;
threads[2].preview = "Investigate parser\nInclude edge cases\n".repeat(8);
+ threads[2].model = Some("provider/".repeat(12));
+ threads[2].reasoning_effort = Some(codex_protocol::openai_models::ReasoningEffort::Custom(
+ "deliberate".repeat(12),
+ ));
app.agents_overview.threads = threads
.iter()
.cloned()
@@ -1297,6 +1301,12 @@ async fn shared_overview_shows_only_root_sessions() {
);
side.ephemeral = true;
threads.push(side);
+ let default_model = app
+ .model_catalog
+ .models
+ .first()
+ .expect("test model catalog");
+ threads[0].model = Some(default_model.model.clone());
let view = app.agents_overview_view(threads, /*selected_thread_id*/ None);
let (event_tx, mut event_rx) = tokio::sync::mpsc::unbounded_channel();
diff --git a/codex-rs/tui/src/app/agents_overview_view.rs b/codex-rs/tui/src/app/agents_overview_view.rs
index b32d23eb46..760fe35c36 100644
--- a/codex-rs/tui/src/app/agents_overview_view.rs
+++ b/codex-rs/tui/src/app/agents_overview_view.rs
@@ -38,6 +38,7 @@ use codex_app_server_protocol::Thread;
use codex_app_server_protocol::ThreadActiveFlag;
use codex_app_server_protocol::ThreadStatus;
use codex_protocol::ThreadId;
+use codex_protocol::openai_models::ReasoningEffort;
use crossterm::event::KeyCode;
use crossterm::event::KeyEvent;
use crossterm::event::KeyModifiers;
@@ -432,6 +433,25 @@ impl AgentsOverviewView {
};
let (status, dot) = Self::status(row);
let width = usize::from(area.width);
+ let model = crate::line_truncation::truncate_line_with_ellipsis_if_overflow(
+ Line::from(vec![
+ "Model: ".dim(),
+ model_name(&row.thread).to_string().into(),
+ ]),
+ width,
+ );
+ let reasoning = crate::line_truncation::truncate_line_with_ellipsis_if_overflow(
+ Line::from(vec![
+ "Reasoning: ".dim(),
+ row.thread
+ .reasoning_effort
+ .as_ref()
+ .map_or("Unknown", ReasoningEffort::as_str)
+ .to_string()
+ .into(),
+ ]),
+ width,
+ );
let mut lines = vec![
Line::from("Task details".bold()),
Line::default(),
@@ -444,12 +464,11 @@ impl AgentsOverviewView {
),
Line::from(vec![dot, " ".into(), status.into()]),
Line::default(),
+ model,
+ reasoning,
+ Line::default(),
Line::from("Project".dim()),
Line::from(row.thread.cwd.display().to_string()),
- Line::from(vec![
- "Model: ".dim(),
- model_name(&row.thread).to_string().into(),
- ]),
];
lines.extend(row.details.usage_lines.clone());
if let Some(branch) = row
@@ -488,7 +507,7 @@ impl AgentsOverviewView {
prompt.truncate(2);
prompt[1] = HyperlinkLine::new("…".dim().into());
}
- let details_start = crate::wrapping::word_wrap_lines(lines[..4].to_vec(), width).len();
+ let details_start = prompt_start;
let mut lines = wrap(plain_hyperlink_lines(lines));
lines.extend(prompt);
if self.state().connection_notice.is_none() {
diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown.snap
index f47e15c47b..3120e62aab 100644
--- a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown.snap
+++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown.snap
@@ -10,6 +10,12 @@ expression: normalize_agent_center_snapshot(&cached)
" › ○ Review parser │ Review parser "
" │ ○ Ready "
" │ "
+" │ Model: Unknown "
+" │ Reasoning: Unknown "
+" │ "
+" │ Project "
+" │ /tmp/project "
+" │ "
" │ Last message "
" │ ## Findings "
" │ "
@@ -20,10 +26,6 @@ expression: normalize_agent_center_snapshot(&cached)
" │ "
" │ let token = 1; "
" │ "
-" │ Project "
-" │ /tmp/project "
-" │ Model: Unknown "
-" │ "
" │ Prompt "
" │ Review parser and token handling. "
" │ "
@@ -39,6 +41,4 @@ expression: normalize_agent_center_snapshot(&cached)
" │ "
" │ "
" │ "
-" │ "
-" │ "
" ? help esc back ↑/↓ move enter open n new "
diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_long_lines.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_long_lines.snap
index bf829b8588..fb6fb55ee6 100644
--- a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_long_lines.snap
+++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_long_lines.snap
@@ -10,19 +10,19 @@ expression: "normalize_agent_center_snapshot(render_bottom_popup(&app.chat_widge
› ○ Review parser │ Review parser
│ ○ Ready
│
+ │ Model: Unknown
+ │ Reasoning: Unknown
+ │
+ │ Project
+ │ /tmp/project
+ │
│ Last message
│ let explanation = "A long code line
│ should wrap inside the task details
│ panel.";
│
- │ Project
- │ /tmp/project
- │ Model: Unknown
- │
│ Prompt
│ long prompt long prompt long prompt
│ …
│
- │
- │
? help esc back ↑/↓ move enter open n new
diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_table.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_table.snap
index 9237bb0614..dd207c465e 100644
--- a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_table.snap
+++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_markdown_table.snap
@@ -10,19 +10,19 @@ expression: "normalize_agent_center_snapshot(render_bottom_popup(&app.chat_widge
› ○ Review parser │ Review parser
│ ○ Ready
│
+ │ Model: Unknown
+ │ Reasoning: Unknown
+ │
+ │ Project
+ │ /tmp/project
+ │
│ Last message
│ Check Result
│ ━━━━━━━━ ━━━━━━━━
│ Parser Fixed
│
- │ Project
- │ /tmp/project
- │ Model: Unknown
- │
│ Prompt
│ long prompt long prompt long prompt
│ …
│
- │
- │
? help esc back ↑/↓ move enter open n new
diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_model_grouping.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_model_grouping.snap
index 8d5ebbee44..45e9b9ffcd 100644
--- a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_model_grouping.snap
+++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__agents_overview_model_grouping.snap
@@ -10,14 +10,14 @@ expression: "render_bottom_popup(&app.chat_widget,\n100).replace(&test_path_disp
› ○ Legacy task │ Legacy task
│ ○ Ready
model-a 2 │
- ○ Recent task │ Project
- ○ Older task │ /tmp/project
- │ Model: Unknown
- model-b 1 │
- ○ Other model │ Prompt
- │ Legacy task
+ ○ Recent task │ Model: Unknown
+ ○ Older task │ Reasoning: Unknown
│
+ model-b 1 │ Project
+ ○ Other model │ /tmp/project
│
+ │ Prompt
+ │ Legacy task
│
│
│
diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__command_center__live_center_columns.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__command_center__live_center_columns.snap
index 38606c71fb..104ad10795 100644
--- a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__command_center__live_center_columns.snap
+++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__command_center__live_center_columns.snap
@@ -10,9 +10,11 @@ expression: "screen(&view, 160, 22)"
› ○ Current task Ready now │ Current task
○ A longer task title that uses the available column voice Ready 5m ago │ ○ Ready
! Failed task Error 1h ago │
- ● Needs an answer Needs input 2h ago │ Project
- ● Working task Working 1d ago │ /tmp/project
- ○ Unloaded task Inactive 2d ago │ Model: Unknown
+ ● Needs an answer Needs input 2h ago │ Model: Unknown
+ ● Working task Working 1d ago │ Reasoning: Unknown
+ ○ Unloaded task Inactive 2d ago │
+ │ Project
+ │ /tmp/project
│
│ Prompt
│ Current task
@@ -21,6 +23,4 @@ expression: "screen(&view, 160, 22)"
│
│
│
- │
- │
? help esc back ↑/↓ move enter open n new
diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__usage__agents_overview_usage.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__usage__agents_overview_usage.snap
index 6690990eb2..ca8bb3b157 100644
--- a/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__usage__agents_overview_usage.snap
+++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__agents_overview__tests__usage__agents_overview_usage.snap
@@ -10,19 +10,19 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
› ● Review parser │ Review parser
○ Other task │ ● Needs input
│
- │ Needs attention
- │ Which dependency version should I use?
- │ Open task to review.
+ │ Model: Unknown
+ │ Reasoning: Unknown
│
│ Project
│ /tmp/project
- │ Model: Unknown
│ Tokens: 13K in · 4K out
│ Est. usage: 5 credits · ~$0.20
│
+ │ Needs attention
+ │ Which dependency version should I use?
+ │ Open task to review.
+ │
│ Prompt
│ Review parser
│
- │
- │
? help esc back ↑/↓ move enter open n new
diff --git a/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_failed.snap b/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_failed.snap
index 4f08b6ef0d..0507e88faa 100644
--- a/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_failed.snap
+++ b/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_failed.snap
@@ -10,9 +10,11 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
/tmp/project 2 │ Selected task
› ● Selected task │ ● Working
○ Vanished task │
+ │ Model: Unknown
+ │ Reasoning: Unknown
+ │
│ Project
│ /tmp/project
- │ Model: Unknown
│
│ Prompt
│ Selected task
@@ -23,6 +25,4 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
│
│
│
- │
- │
Reconnect failed — agent list is stale; relaunch to retry
diff --git a/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_reconnecting.snap b/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_reconnecting.snap
index cdb247c0b6..b58685e2a2 100644
--- a/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_reconnecting.snap
+++ b/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_reconnecting.snap
@@ -10,9 +10,11 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
/tmp/project 2 │ Selected task
› ● Selected task │ ● Working
○ Vanished task │
+ │ Model: Unknown
+ │ Reasoning: Unknown
+ │
│ Project
│ /tmp/project
- │ Model: Unknown
│
│ Prompt
│ Selected task
@@ -23,6 +25,4 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
│
│
│
- │
- │
Reconnecting — agent list is stale
diff --git a/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_vanished_rename.snap b/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_vanished_rename.snap
index fb173c92e3..a8997b370e 100644
--- a/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_vanished_rename.snap
+++ b/codex-rs/tui/src/app/tests/snapshots/codex_tui__app__tests__navigation_reconnect__daemon_command_center_vanished_rename.snap
@@ -9,10 +9,12 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
/tmp/project 2 │
● New task │ Selected task
› ○ Selected task │ ○ Ready
+ │
+ │ Model: Unknown
+ │ Reasoning: Unknown
│
│ Project
│ /tmp/project
- │ Model: Unknown
│
│ Prompt
│ Selected task
@@ -23,6 +25,4 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
│
│
│
- │
- │
Service v2.0.0 ≠ Codex CLI v0.0.0 · /daemon
diff --git a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview.snap b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview.snap
index af4d80b3be..54e71501bf 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview.snap
@@ -10,19 +10,19 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
› ● Build the dashboard │ Build the dashboard
● Repair authentication │ ● Needs input
○ Review yesterday's changes │
- │ Agent: Inspect keyboard shortcuts
- │ Open task to review.
- │ Waiting for approval.
+ │ Model: gpt-6.1-sol
+ │ Reasoning: Unknown
│
│ Project
│ /tmp/project
- │ Model: Unknown
+ │
+ │ Agent: Inspect keyboard shortcuts
+ │ Open task to review.
+ │ Waiting for approval.
│
│ Prompt
│ Build the dashboard
│
│
│
- │
- │
? help esc back ↑/↓ move enter open n new
diff --git a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_attention.snap b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_attention.snap
index d9f5f53b77..73d79cf4e1 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_attention.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_attention.snap
@@ -9,6 +9,12 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
/tmp/project 2 │
› ● Repair authentication │ Repair authentication
○ Investigate parser │ ● Needs input
+ │
+ │ Model: Unknown
+ │ Reasoning: Unknown
+ │
+ │ Project
+ │ /tmp/project
│
│ Agent: Check dependencies
│ Which dependency version should I use?
@@ -16,13 +22,7 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
│ Waiting for approval.
│ Waiting for your response.
│
- │ Project
- │ /tmp/project
- │ Model: Unknown
- │
│ Prompt
│ Repair authentication
│
- │
- │
? help esc back ↑/↓ move enter open n new
diff --git a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_last_message.snap b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_last_message.snap
index 7ba246f004..43d6df009d 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_last_message.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_last_message.snap
@@ -9,19 +9,19 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
/tmp/project 2 │
● Repair authentication │ Investigate parser
› ○ Investigate parser │ ○ Inactive
+ │
+ │ Model: provider/provider/provider/pro…
+ │ Reasoning: deliberatedeliberatedelibe…
+ │
+ │ Project
+ │ /tmp/project
│
│ Last message
│ Found the regression in the parser.
│ Found the regression in the parser.
│ Found the regression in the parser.
- │ Found the regression in the parser.
- │ Found the regression in the parser.
│ …
│
- │ Project
- │ /tmp/project
- │ Model: Unknown
- │
│ Prompt
│ Investigate parser
│ …
diff --git a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_live_activity.snap b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_live_activity.snap
index f8bf2735c8..8bb4ec1475 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_live_activity.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__app__agents_overview__tests__agents_overview_live_activity.snap
@@ -10,12 +10,14 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
› ● Check startup performance │ Check startup performance
│ ● Working
│
- │ Latest activity
- │ Checking cold-start regressions
+ │ Model: Unknown
+ │ Reasoning: Unknown
│
│ Project
│ /tmp/project
- │ Model: Unknown
+ │
+ │ Latest activity
+ │ Checking cold-start regressions
│
│ Prompt
│ No prompt available.
@@ -23,6 +25,4 @@ expression: "render_bottom_popup(&app.chat_widget,\n96).replace(&format!(\"{proj
│
│
│
- │
- │
? help esc back ↑/↓ move enter open n new