After magpie writes Kimi's config.toml, every Kimi was told "reads its
settings at start-up — restart open kimi sessions". That holds for the old
Python kimi-cli (~/.kimi). Kimi Code 2.x (~/.kimi-code, npm
@moonshot-ai/kimi-code) watches config.toml and reloads it, so an open
session takes the new models at once; only its web and desktop app's model
picker is read again when Settings › Providers is opened again. jiabubu
picked from that stale picker and got "Model \"magpie/...\" is not
configured in config.toml".
The notice now follows KimiDir's legacy flag: kimi-cli keeps the restart
advice word for word, and Kimi Code 2.x is told "reads this as it runs; in
its web or desktop app, reopen Settings › Providers or reload the page to
see new models". The same goes for Kimi in a WSL distro: wslKind gets an
optional restartAt, which Kimi's kind uses to pick its notice from the
distro's folder (a stopped distro reads as ~/.kimi-code, as kimiDir has it).
Both new strings are in NOTICES and translated in zh, zh-TW, ja and de.
Run (worktree at 027360021 + this commit, through mote-run / wsl-run):
- gofmt -l internal/agent: nothing. go vet ./internal/agent,
GOOS=linux go vet -tags nogui ./internal/agent ./internal/gui,
GOOS=windows go vet ./internal/agent ./internal/gui: ok.
- go test -count=1 -timeout 45m ./internal/agent: ok (157s), including the
new TestKimiNoticeByKind and TestEveryNoticeIsTranslated.
- Broken by hand: with kimi.go and wsl.go reverted, TestKimiNoticeByKind
fails for Kimi Code 2.x both here and in WSL (the restart advice).
- GUI (wsl-run): agent-notice-lang in WebKit 11/11 and Chromium 11/11.
i18n-keys 3 of 4; "a plugin's words are its own" fails on "Unmarked"
(plugins/routing vs internal/usage/search_calls_test.go), red on main,
#4524.
- go test ./internal/gui (at 0407d69e8 + this change) failed only in
TestSettingsSaveKeepsWhatItDoesNotSend (SearchAll, #4514) and real-window
AppKit tests killed at their deadline on mote (#4125, #2645); the same
five of them, run at clean origin/main 027360021, fail the same way.
Not tried: a real Kimi Code app showing this notice in magpie's GUI. Kimi
Code 2.4.1's reload behaviour is from an earlier sandbox run.