feat(settings): 适配 kimi-code 0.42.0 —— 实验 flag 镜像 9→6

- 删除已转正/移除的 4 个 flag:secondary-model(模型池恒开)、
  persistence_minidb_readmodel(改由 [database] 配置节)、remote-control、
  search_worker;env 探测清单同步 11→8
- 新增 notify_user flag(KIMI_CODE_EXPERIMENTAL_NOTIFY_USER,实验性
  Updates 面板,默认关闭)
- 设置页移除 secondary-model 专属卡片与「默认开启」徽章,6 个 flag 统一渲染;
  [secondary_model] 模型池配置逻辑不变
- 残留旧键上游 schema 宽容忽略,无需迁移
This commit is contained in:
KimiSwitch Dev committed 2026-09-09 19:48:41 +08:00
1 parent 33a27ba31b
commit 9ce1ed65b0
7 files changed
+70 -138

No files matched your search

+1 -1
View File
@@ -1978,7 +1978,7 @@ dependencies = [
[[package]]
name = "kimiswitch"
version = "0.7.14"
version = "0.7.15"
dependencies = [
"anyhow",
"chrono",
+8 -9
View File
@@ -1335,7 +1335,7 @@ pub async fn kimi_oauth_poll(
}
// ---------------------------------------------------------------------------
// Experimental feature env-var probe (Kimi Code secondary model etc.)
// Experimental feature env-var probe (Kimi Code experimental flags)
// ---------------------------------------------------------------------------
/// Read the Kimi Code environment variables that are currently set (non-empty)
@@ -1348,6 +1348,11 @@ pub async fn kimi_oauth_poll(
/// are probed too — the latter lets AgentSettingsPanel decide whether to
/// dual-write the v1 engine's loop_control keys.
///
/// As of Kimi Code 0.42.0 the upstream registry holds 6 experimental flags;
/// `secondary-model`, `persistence_minidb_readmodel`, `remote-control` and
/// `search_worker` have been promoted or removed upstream and are no longer
/// probed here.
///
/// The flag id → env var mapping mirrors `EXPERIMENTAL_FLAGS` in
/// src/lib/subagent-settings.ts; keep both lists in sync.
///
@@ -1355,19 +1360,13 @@ pub async fn kimi_oauth_poll(
/// the raw values are returned and the truthy check happens on the frontend.
#[tauri::command]
pub fn get_experimental_env_status() -> HashMap<String, String> {
const VARS: [(&str, &str); 11] = [
("secondary-model", "KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL"),
const VARS: [(&str, &str); 8] = [
("tool-select", "KIMI_CODE_EXPERIMENTAL_TOOL_SELECT"),
(
"persistence_minidb_readmodel",
"KIMI_CODE_EXPERIMENTAL_PERSISTENCE_MINIDB_READMODEL",
),
("tower", "KIMI_CODE_EXPERIMENTAL_TOWER"),
("subagent_fork", "KIMI_CODE_EXPERIMENTAL_SUBAGENT_FORK"),
("wait_for", "KIMI_CODE_EXPERIMENTAL_WAIT_FOR"),
("auto_session_title", "KIMI_CODE_EXPERIMENTAL_AUTO_SESSION_TITLE"),
("remote-control", "KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL"),
("search_worker", "KIMI_CODE_EXPERIMENTAL_SEARCH_WORKER"),
("notify_user", "KIMI_CODE_EXPERIMENTAL_NOTIFY_USER"),
// Non-flag probes consumed by the frontend:
("master", "KIMI_CODE_EXPERIMENTAL_FLAG"),
("legacy", "KIMI_CODE_LEGACY_FLAG"),