feat(cli): add ansi_basic theme fallback and offline provider shim for limited‑color terminals

- Detect terminal color support and automatically switch to the new `ansi_basic` theme when only 16‑color support is available.
- Introduce `OfflineProvider` that supplies a placeholder model and friendly messages when no providers are reachable, keeping the TUI usable.
- Add `CONFIG_SCHEMA_VERSION` (`1.1.0`) with schema migration logic and default handling in `Config`.
- Update configuration saving to persist the schema version and ensure defaults.
- Register the `ansi_basic` theme in `theme.rs`.
- Extend `ChatApp` with `set_status_message` to display custom status lines.
- Update documentation (architecture, Vim mode state machine) to reflect new behavior.
- Add async‑trait and futures dependencies required for the offline provider implementation.
This commit is contained in:
2025-10-12 02:19:43 +02:00
parent 952e4819fe
commit 56de1170ee
8 changed files with 249 additions and 32 deletions

View File

@@ -314,6 +314,11 @@ impl ChatApp {
// Mode switching is handled by the SessionController's tool filtering
}
/// Override the status line with a custom message.
pub fn set_status_message<S: Into<String>>(&mut self, status: S) {
self.status = status.into();
}
pub(crate) fn model_selector_items(&self) -> &[ModelSelectorItem] {
&self.model_selector_items
}