kimi-code/packages
liruifengv 11c1683a1c
feat: scope thinking effort to the current session (#1933)
* feat: scope thinking effort to the current session

Selecting a model or thinking mode in the TUI or web UI no longer
persists the concrete effort to the config; only the boolean thinking
toggle is saved. The web UI now restores and submits each session's own
daemon-reported level instead of a browser-wide per-model pick, whose
localStorage store is removed.

* feat: persist bounded thinking efforts and migrate persisted max once

Only low/medium/high/xhigh are written to the config on a pick; max and
unrecognized levels stay session-only with just the boolean toggle saved.
A one-shot migration rewrites a previously persisted thinking.effort max
to high (recorded in migrations.json, never re-run). The web UI brings
back the per-model localStorage pick as the seed for new sessions, while
a session's own daemon-reported level keeps winning for existing ones.

* feat: gate effort persistence on the model top declared level

The session-only tier is now the last entry of the model's own
support_efforts (ordered by strength) instead of a fixed name list, so
custom provider-declared levels get the same treatment; anything below
the top persists as before, and unknown model metadata keeps the
concrete effort.

* docs: align changeset wording with the top-tier persistence rule

* refactor: rename the config migration marker file to migrations-effort.json

* feat: drop the legacy global thinking pick fallback in the web UI

A raw single-level string left in localStorage by older versions was
migrated into a '*' fallback entry applied to every model; stale values
(typically max) could silently steer any session. Non-map content is now
discarded instead of inherited.

* feat: drop the web per-model thinking pick store entirely

Thinking in the web UI is now sourced only from the daemon: a session's
own reported level wins when the model declares it, and everything else
falls back to the model's catalog default. The stale localStorage key is
cleaned up on startup.

* feat: skip the effort write when the picker confirms its initial value

Re-confirming the effort shown when the model/effort picker opened is not
an explicit choice: the TUI persists only the model (no effort key, or no
write at all when nothing changed), and the web skips the global config
write the same way it already did for model switches.

* revert: keep the web global thinking write on re-confirm for now

Only the TUI skips the effort write when the picker confirms its initial
value; the web behavior stays unchanged until the interaction is
reconsidered.

* fix: carry the draft thinking pick into a newly created session

A level picked on the empty composer lived only in rawState.thinking, so
selectSession's watcher overwrote it with the catalog default and the
first prompt/skill submitted that instead of the pick. createDraftSession
now captures the draft level and seeds the new session's own entry.

* docs: simplify the changeset wording

* fix: close the remaining top-tier persistence and draft-capture gaps

The provider-add default-model flow now resolves support_efforts through
effectiveModelForHost (overrides + protocol-profile inference), so a
top-tier pick on catalog models without declared efforts no longer
persists. The draft thinking level is captured before the session
creation awaits, so a concurrent session switch can no longer seed the
new session with another session's effort.

* fix: wait for the session status fold before resolving prompt thinking

In the cold window right after a reload or session switch, the session's
own level has not landed from /status yet; resolving straight to the
catalog default would carry the wrong level to the daemon, which writes
it into the session profile. Send, steer, side-chat and skill-activation
paths now await the fold when the session entry is missing.
2026-07-20 12:57:22 +08:00
..
acp-adapter fix: unify YOLO and Auto permission mode descriptions across surfaces (#1867) 2026-07-18 02:09:31 +08:00
agent-core feat: scope thinking effort to the current session (#1933) 2026-07-20 12:57:22 +08:00
agent-core-v2 feat: scope thinking effort to the current session (#1933) 2026-07-20 12:57:22 +08:00
kaos chore: drop #/ import array fallbacks and custom resolution plugins (#1594) 2026-07-13 16:37:35 +08:00
kap-server feat(cli): replace the kimi server command tree with kimi web and share one home across servers (#1826) 2026-07-19 11:43:46 +08:00
klient fix(workspace): dedupe workspaces across Windows path spelling variants (#1809) 2026-07-17 14:56:06 +08:00
kosong fix: honor explicit thinking off on OpenAI-compatible providers (#1774) 2026-07-16 17:11:18 +08:00
migration-legacy ci: release packages (#1767) 2026-07-16 18:54:29 +08:00
minidb feat(minidb): switch agent-core-v2 query-store to ClusterDb with 16 shards (#1907) 2026-07-19 16:04:26 +08:00
node-sdk fix: use timestamped default filename for session debug exports (#1788) 2026-07-16 19:32:06 +08:00
oauth feat: refresh model list for API-key providers at the managed endpoint (#1824) 2026-07-17 17:17:58 +08:00
pi-tui chore: drop #/ import array fallbacks and custom resolution plugins (#1594) 2026-07-13 16:37:35 +08:00
protocol refactor: remove git detection from workspace wire and folder browse (#1787) 2026-07-16 21:05:19 +08:00
telemetry fix: close two silent-exit vectors around unhandled rejections (#1758) 2026-07-16 02:14:14 +08:00