chore: thread tui (#21767)

This commit is contained in:
jif-oai authored and GitHub committed 2026-05-08 17:53:23 +02:00
1 parent 607b0dd1f0
commit 5b87bd2845
11 files changed
+49 -32

No files matched your search

@@ -11,7 +11,7 @@ expression: "render_lines(&view, 84)"
› [x] project-name Project name (falls back to current directory name)
[x] activity Spinner while working, action-required message while blo…
[x] run-state Compact session run-state text (Ready, Working, Thinking)
[x] thread-title Current thread title (omitted when unavailable)
[x] thread-title Current thread title, or thread identifier when unnamed
[ ] app-name Codex app name
[ ] current-dir Current working directory
[ ] git-branch Current Git branch (omitted when unavailable)
@@ -16,7 +16,7 @@
//! - Approval mode
//! - Context usage (remaining %, used %, window size)
//! - Usage limits (5-hour, weekly)
//! - Session info (thread title, ID, tokens used)
//! - Session info (thread title, thread ID, tokens used)
//! - Application version
use ratatui::buffer::Buffer;
@@ -48,7 +48,7 @@ const STATUS_LINE_USE_THEME_COLORS_ITEM_ID: &str = "status-line-use-theme-colors
/// Some items are conditionally displayed based on availability:
/// - Git-related items only show when in a git repository
/// - Context/limit items only show when data is available from the API
/// - Session ID only shows after a session has started
/// - Thread ID only shows after a session has started
#[derive(EnumIter, EnumString, Display, Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
#[strum(serialize_all = "kebab_case")]
pub(crate) enum StatusLineItem {
@@ -120,7 +120,8 @@ pub(crate) enum StatusLineItem {
/// Total output tokens generated.
TotalOutputTokens,
/// Full session UUID.
/// Full thread UUID.
#[strum(to_string = "thread-id", serialize = "session-id")]
SessionId,
/// Whether Fast mode is currently active.
@@ -173,12 +174,12 @@ impl StatusLineItem {
StatusLineItem::UsedTokens => "Total tokens used in session (omitted when zero)",
StatusLineItem::TotalInputTokens => "Total input tokens used in session",
StatusLineItem::TotalOutputTokens => "Total output tokens used in session",
StatusLineItem::SessionId => {
"Current session identifier (omitted until session starts)"
}
StatusLineItem::SessionId => "Current thread identifier (omitted until thread starts)",
StatusLineItem::FastMode => "Whether Fast mode is currently active",
StatusLineItem::RawOutput => "Whether raw scrollback mode is active",
StatusLineItem::ThreadTitle => "Current thread title (omitted when unavailable)",
StatusLineItem::ThreadTitle => {
"Current thread title, or thread identifier when unnamed"
}
StatusLineItem::TaskProgress => {
"Latest task progress from update_plan (omitted until available)"
}
+4 -3
View File
@@ -71,7 +71,8 @@ pub(crate) enum TerminalTitleItem {
TotalInputTokens,
/// Total output tokens generated.
TotalOutputTokens,
/// Full session UUID.
/// Full thread UUID.
#[strum(to_string = "thread-id", serialize = "session-id")]
SessionId,
/// Whether Fast mode is currently active.
FastMode,
@@ -96,7 +97,7 @@ impl TerminalTitleItem {
TerminalTitleItem::Status => {
"Compact session run-state text (Ready, Working, Thinking)"
}
TerminalTitleItem::Thread => "Current thread title (omitted when unavailable)",
TerminalTitleItem::Thread => "Current thread title, or thread identifier when unnamed",
TerminalTitleItem::GitBranch => "Current Git branch (omitted when unavailable)",
TerminalTitleItem::ContextRemaining => {
"Percentage of context window remaining (omitted when unknown)"
@@ -115,7 +116,7 @@ impl TerminalTitleItem {
TerminalTitleItem::TotalInputTokens => "Total input tokens used in session",
TerminalTitleItem::TotalOutputTokens => "Total output tokens used in session",
TerminalTitleItem::SessionId => {
"Current session identifier (omitted until session starts)"
"Current thread identifier (omitted until thread starts)"
}
TerminalTitleItem::FastMode => "Whether Fast mode is currently active",
TerminalTitleItem::Model => "Current model name",