feat: 适配 kimi-code 0.41.0 —— 移除 file_history 镜像 + 守卫文案更新

- file_history flag 上游已移除(turn-level file history 恒开):
  从 EXPERIMENTAL_FLAGS / env 探测 / FLAG_LABELS / i18n 全链路删除,
  清单回至 9 个;用户 config 残留键被上游静默忽略
- 危险命令守卫行为更新:auto 模式自 0.41.0 起不再拦截危险命令,
  仅 Manual/YOLO 强制询问——开关描述文案(中英)与类型注释同步
This commit is contained in:
KimiSwitch Dev committed 2026-09-05 16:04:21 +08:00
1 parent 4de13ad353
commit 81699e757d
8 files changed
+23 -27

No files matched your search

+5 -6
View File
@@ -455,11 +455,11 @@ describe("validateSubagentPool", () => {
});
// ---------------------------------------------------------------------------
// [experimental] — flag registry (kimi-code 0.40.1) + write semantics
// [experimental] — flag registry (kimi-code 0.41.0) + write semantics
// ---------------------------------------------------------------------------
describe("experimental flag registry", () => {
it("mirrors the 0.40.1 v2 registry (10 flags incl. file_history)", () => {
it("mirrors the 0.41.0 v2 registry (9 flags, file_history removed)", () => {
expect(EXPERIMENTAL_FLAGS.map((f) => f.id)).toEqual([
"secondary-model",
"tool-select",
@@ -470,11 +470,10 @@ describe("experimental flag registry", () => {
"auto_session_title",
"remote-control",
"search_worker",
"file_history",
]);
const fh = EXPERIMENTAL_FLAGS.find((f) => f.id === "file_history");
expect(fh?.envVar).toBe("KIMI_CODE_EXPERIMENTAL_FILE_HISTORY");
expect(fh?.defaultEnabled).toBeUndefined();
// Upstream removed the flag in 0.41.0 (turn-level file history is
// always on), so the adapter must not mirror it either.
expect(EXPERIMENTAL_FLAGS.some((f) => f.id === "file_history")).toBe(false);
});
it("secondary-model is on by default since 0.40.1", () => {
+3 -3
View File
@@ -37,8 +37,9 @@ export interface ExperimentalFlagDef {
* (the per-feature flag.ts files under packages/agent-core-v2/src:
* secondary-model, tool-select, persistence_minidb_readmodel, tower,
* subagent_fork, wait_for, auto_session_title, remote-control,
* search_worker, file_history). `acp-v2` was removed upstream and is
* dropped here. Keep the env-var list in sync with
* search_worker). `acp-v2` was removed upstream and is dropped here;
* `file_history` was removed in kimi-code 0.41.0 (turn-level file
* history is always on, no flag). Keep the env-var list in sync with
* `get_experimental_env_status` in src-tauri/src/commands.rs. */
export const EXPERIMENTAL_FLAGS: ExperimentalFlagDef[] = [
{
@@ -69,7 +70,6 @@ export const EXPERIMENTAL_FLAGS: ExperimentalFlagDef[] = [
envVar: "KIMI_CODE_EXPERIMENTAL_SEARCH_WORKER",
defaultEnabled: true,
},
{ id: "file_history", envVar: "KIMI_CODE_EXPERIMENTAL_FILE_HISTORY" },
];
export const EXPERIMENTAL_MASTER_ENV = "KIMI_CODE_EXPERIMENTAL_FLAG";