mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-26 17:45:08 +00:00
* feat(config): tolerate invalid config.toml sections instead of failing startup Schema errors now drop only the offending sections (single entries for providers/models) with a warning, so a typo no longer prevents startup or drops the login state. TOML syntax errors still fail fast with the parse location. Mid-run reloads keep the last good config when the file breaks. Warnings surface via the new getConfigDiagnostics API: as a startup notice in the TUI, on stderr in print mode, and in the status bar after /new. Write paths stay strict so a broken file is never silently rewritten, and now fail with a short actionable message instead of raw validation JSON; the /provider TUI flow and the kimi provider CLI report these errors instead of crashing on an unhandled rejection. * fix(config): keep entry-keyed sections when one entry has multiple issues A providers/models entry with several validation issues was deleted by the first issue, and the remaining issues from the same safeParse pass then escalated to deleting the entire section — one badly-typed custom provider could drop every provider, including the managed OAuth login. Issues on entry-keyed sections now only ever target the entry itself; once it is gone, later issues are no-ops. |
||
|---|---|---|
| .. | ||
| config-rpc.test.ts | ||
| create-rpc.test.ts | ||
| plugins-rpc.test.ts | ||