aKode fase 4: primo avvio guidato, temi, barra di stato

- Primo avvio (e /setup): benvenuto, tema con anteprima, provider
  (endpoint personalizzato, Ollama, LM Studio), modulo endpoint con chiave
  mascherata nel key store, modello da /models, prova di connessione
  Responses con errori distinti, SearXNG facoltativo verificato, fiducia
  cartella. Schermate in italiano. /model permette di cambiare provider.
- Temi UI: Scuro, Chiaro, Alto contrasto, Daltonici (blu/arancio, mai
  rosso/verde) su accenti, fantasmino, selezione, diff, link; /theme con
  anteprima dal vivo; [tui] ui_theme.
- Barra di stato: nuovi elementi server-endpoint e tokens-per-second;
  rimossi FiveHourLimit e WeeklyLimit; default server · modello · contesto ·
  tok/s · cartella (ramo).
- Chiave mai in config, log, database o snapshot (test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 05:59:46 +01:00
parent c97ccf3b2f
commit 97b289d745
207 changed files with 4859 additions and 1025 deletions

View File

@@ -5337,7 +5337,7 @@
},
"status_line": {
"default": null,
"description": "Ordered list of status line item identifiers.\n\nWhen set, the TUI renders the selected items as the status line. When unset, the TUI defaults to: `model-with-reasoning`, `current-dir`, and `thread-name`.",
"description": "Ordered list of status line item identifiers.\n\nWhen set, the TUI renders the selected items as the status line. When unset, the TUI defaults to: `server-endpoint`, `model`, `context-used`, `tokens-per-second`, `current-dir`, and `git-branch`.",
"items": {
"type": "string"
},
@@ -5368,6 +5368,11 @@
"description": "Syntax highlighting theme name (kebab-case).\n\nWhen set, overrides automatic light/dark theme detection. Use `/theme` in the TUI or see `$CODEX_HOME/themes` for custom themes.",
"type": "string"
},
"ui_theme": {
"default": null,
"description": "aKode interface palette: `dark`, `light`, `high-contrast` or `colorblind`.\n\nRecolors accents, selection, status colors, links and diffs. When unset, colors follow the terminal background. Use `/theme` in the TUI to change it.",
"type": "string"
},
"vim_mode_default": {
"default": false,
"description": "Start the composer in Vim mode (`Normal`) by default. Defaults to `false`.",

View File

@@ -1155,6 +1155,7 @@ fn config_toml_deserializes_model_availability_nux() {
status_line_use_colors: true,
terminal_title: None,
theme: None,
ui_theme: None,
pet: None,
pet_anchor: TuiPetAnchor::Composer,
session_picker_view: None,
@@ -4469,6 +4470,7 @@ fn tui_config_missing_notifications_field_defaults_to_enabled() {
status_line_use_colors: true,
terminal_title: None,
theme: None,
ui_theme: None,
pet: None,
pet_anchor: TuiPetAnchor::Composer,
session_picker_view: None,

View File

@@ -89,6 +89,14 @@ pub fn syntax_theme_edit(name: &str) -> ConfigEdit {
}
}
/// Produces a config edit that sets [tui].ui_theme = "<palette>" (aKode interface palette).
pub fn ui_theme_edit(palette: &str) -> ConfigEdit {
ConfigEdit::SetPath {
segments: vec!["tui".to_string(), "ui_theme".to_string()],
value: value(palette.to_string()),
}
}
/// Produces a config edit that sets [tui].pet = "<name>".
pub fn tui_pet_edit(name: &str) -> ConfigEdit {
ConfigEdit::SetPath {

View File

@@ -946,6 +946,9 @@ pub struct Config {
/// Syntax highlighting theme override (kebab-case name).
pub tui_theme: Option<String>,
/// aKode interface palette (`[tui] ui_theme`).
pub tui_ui_theme: Option<String>,
/// Pet id preselected by the terminal pet picker.
pub tui_pet: Option<String>,
@@ -4896,6 +4899,7 @@ impl Config {
.unwrap_or(true),
tui_terminal_title: cfg.tui.as_ref().and_then(|t| t.terminal_title.clone()),
tui_theme: cfg.tui.as_ref().and_then(|t| t.theme.clone()),
tui_ui_theme: cfg.tui.as_ref().and_then(|t| t.ui_theme.clone()),
tui_pet: cfg.tui.as_ref().and_then(|t| t.pet.clone()),
tui_pet_anchor: cfg
.tui