tui: monochrome, and one line under the input

This commit is contained in:
2026-10-09 15:01:34 -07:00
parent 8635dbbe4b
commit e99689fa1a
2 changed files with 29 additions and 0 deletions
+5
View File
@@ -11,6 +11,11 @@ pub const UPDATE_CHECK: bool = false;
/// Dev runs its server inside the process. Upstream's shared background server
/// starts from an installer's package directory, which Dev does not ship.
pub const BACKGROUND_SERVER: bool = false;
/// Dev draws in the terminal's own foreground and background: no hue and no grey,
/// with weight and reverse video for emphasis.
pub const MONOCHROME: bool = true;
/// One line under the input: the status line takes the row the shortcut hint would.
pub const SEPARATE_STATUS_LINE: bool = false;
pub const STARTUP_TIP: &str = "Use **/mcp** to inspect connected tools. Hanzo MCP provides cloud controls and local development tools.";
/// Keep light terminals readable and dark input bars much subtler than the upstream default.
+24
View File
@@ -592,5 +592,29 @@
"old": "concat!(\"codex-doctor/\", env!(\"CARGO_PKG_VERSION\"))",
"new": "format!(\"codex-doctor/{}\", hanzo_version::get())",
"count": 1
},
{
"file": "tui/src/tui.rs",
"old": " set_modes()?;\n\n set_panic_hook();",
"new": " set_modes()?;\n if hanzo_tui::MONOCHROME {\n crossterm::style::force_color_output(false);\n }\n\n set_panic_hook();",
"count": 1
},
{
"file": "tui/src/insert_history.rs",
"old": " if next_fg != fg || next_bg != bg {",
"new": " // A disabled color writes an empty SGR, which would also drop the span's weight.\n if (next_fg != fg || next_bg != bg) && !crossterm::style::Colored::ansi_color_disabled_memoized() {",
"count": 1
},
{
"file": "tui/src/chatwidget/rendering.rs",
"old": " options.separate_status_line = options.command_popup_placement\n != crate::bottom_pane::CommandPopupPlacement::AboveComposer;",
"new": " options.separate_status_line = hanzo_tui::SEPARATE_STATUS_LINE\n && options.command_popup_placement\n != crate::bottom_pane::CommandPopupPlacement::AboveComposer;",
"count": 1
},
{
"file": "tui/src/startup_draft_layout.rs",
"old": " separate_status_line: true,",
"new": " separate_status_line: hanzo_tui::SEPARATE_STATUS_LINE,",
"count": 1
}
]