mirror of
https://github.com/openai/codex.git
synced 2026-11-18 23:02:23 +00:00
Add reasoning-only status surface item (#25504)
Closes #24886. ## Why Users can configure the TUI status line and terminal title with `model-with-reasoning`, but issue #24886 asks for a compact reasoning-only item. That lets a setup show just `default`, `low`, `medium`, `high`, or `xhigh` without repeating the model name. ## What changed - Added a `reasoning` item for `/statusline` and `/title` setup flows. - Rendered the item from the effective reasoning effort, including collaboration-mode overrides. - Registered `reasoning` with `codex doctor` so Codex-generated terminal-title config is not reported as invalid. - Updated TUI setup snapshots so the picker previews include the new item.
This commit is contained in:
1 parent
6681446477
commit
f1d029cf75
12 files changed
+83
-7
No files matched your search
@@ -82,6 +82,8 @@ pub(crate) enum TerminalTitleItem {
|
||||
Model,
|
||||
/// Current model name with reasoning level.
|
||||
ModelWithReasoning,
|
||||
/// Current reasoning level.
|
||||
Reasoning,
|
||||
/// Latest checklist task progress from `update_plan` (if available).
|
||||
TaskProgress,
|
||||
}
|
||||
@@ -122,6 +124,7 @@ impl TerminalTitleItem {
|
||||
TerminalTitleItem::FastMode => "Whether Fast mode is currently active",
|
||||
TerminalTitleItem::Model => "Current model name",
|
||||
TerminalTitleItem::ModelWithReasoning => "Current model name with reasoning level",
|
||||
TerminalTitleItem::Reasoning => "Current reasoning level",
|
||||
TerminalTitleItem::TaskProgress => {
|
||||
"Latest task progress from update_plan (omitted until available)"
|
||||
}
|
||||
@@ -153,6 +156,7 @@ impl TerminalTitleItem {
|
||||
TerminalTitleItem::ModelWithReasoning => {
|
||||
Some(StatusSurfacePreviewItem::ModelWithReasoning)
|
||||
}
|
||||
TerminalTitleItem::Reasoning => Some(StatusSurfacePreviewItem::Reasoning),
|
||||
TerminalTitleItem::TaskProgress => Some(StatusSurfacePreviewItem::TaskProgress),
|
||||
}
|
||||
}
|
||||
@@ -516,6 +520,15 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reasoning_is_selectable_id() {
|
||||
assert_eq!(TerminalTitleItem::Reasoning.to_string(), "reasoning");
|
||||
assert_eq!(
|
||||
"reasoning".parse::<TerminalTitleItem>(),
|
||||
Ok(TerminalTitleItem::Reasoning)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_terminal_title_items_accepts_kebab_case_variants() {
|
||||
let items = parse_terminal_title_items(
|
||||
@@ -530,6 +543,7 @@ mod tests {
|
||||
"project-name",
|
||||
"model",
|
||||
"model-with-reasoning",
|
||||
"reasoning",
|
||||
"weekly-limit",
|
||||
"codex-version",
|
||||
"used-tokens",
|
||||
@@ -553,6 +567,7 @@ mod tests {
|
||||
TerminalTitleItem::Project,
|
||||
TerminalTitleItem::Model,
|
||||
TerminalTitleItem::ModelWithReasoning,
|
||||
TerminalTitleItem::Reasoning,
|
||||
TerminalTitleItem::WeeklyLimit,
|
||||
TerminalTitleItem::CodexVersion,
|
||||
TerminalTitleItem::UsedTokens,
|
||||
|
||||
Reference in new issue
Block a user