feat(tui): warn on bare null sections in config.yaml

Tolerating null top-level keys silently drops user settings (e.g.
`agent.system_prompt` next to a bare `agent:` line is gone). Probe at
session create, log via `logger.warning`, and surface in the boot info
under `config_warning` — rendered in the TUI feed alongside the existing
`credential_warning` banner.
This commit is contained in:
Brooklyn Nicholson 2026-04-24 12:49:02 -05:00
parent fd9b692d33
commit bfa60234c8
4 changed files with 106 additions and 38 deletions

View file

@ -142,6 +142,10 @@ export function useSessionLifecycle(opts: UseSessionLifecycleOptions) {
sys(`warning: ${info.credential_warning}`)
}
if (info?.config_warning) {
sys(`warning: ${info.config_warning}`)
}
if (msg) {
sys(msg)
}

View file

@ -93,7 +93,7 @@ export interface SetupStatusResponse {
// ── Session lifecycle ────────────────────────────────────────────────
export interface SessionCreateResponse {
info?: SessionInfo & { credential_warning?: string }
info?: SessionInfo & { config_warning?: string; credential_warning?: string }
session_id: string
}