← 返回更新日志

Kimi Code @moonshot-ai/[email protected]

2026-08-04 · GitHub 原文
### 次要更改 - [#2558](https://github.com/MoonshotAI/kimi-code/pull/2558) [`75395f6`](https://github.com/MoonshotAI/kimi-code/commit/75395f6abb17f83f30d16b51f4e060a639f43622) 感谢 [@sailist](https://github.com/sailist)! - 新增 TurnStarted、UserPromptQueued、TaskStarted 和 SessionHeartbeat 钩子事件,丰富钩子负载数据(增加会话标题和客户端类型),在 SessionStart 中包含模型和配置信息,并在会话归档而非退出时将 SessionEnd 报告为归档状态。在 `config.toml` 的 `[[hooks]]` 节下配置新事件。 ### 补丁更改 - [#2416](https://github.com/MoonshotAI/kimi-code/pull/2416) [`eaab2b6`](https://github.com/MoonshotAI/kimi-code/commit/eaab2b6f28c0b958edf8ab5ae5e78a4c0426af26) 感谢 [@mangeshraut712](https://github.com/mangeshraut712)! - 当无法访问公共目录时,回退至内置的 models.dev 目录快照,确保 Known 第三方提供商导入在离线或网络受限环境下仍可用。 - [#2083](https://github.com/MoonshotAI/kimi-code/pull/2083) [`bfa0080`](https://github.com/MoonshotAI/kimi-code/commit/bfa00807c975fdc5b84dda32d47b16b09e8d42c1) 感谢 [@StaR4y](https://github.com/StaR4y)! - 前端:修复深色模式下的单色控件问题,并使聊天输入框的圆角半径与设计系统保持一致。 - [#2559](https://github.com/MoonshotAI/kimi-code/pull/2559) [`dfc55a5`](https://github.com/MoonshotAI/kimi-code/commit/dfc55a5c977dbff657e1da74ff5c2b9d488807be) 感谢 [@wbxl2000](https://github.com/wbxl2000)! - 将 "/login" 已登录确认提示以成功色(而非灰色文字)渲染,使“已登录。模型配置已刷新。”消息清晰可见。 - [#2572](https://github.com/MoonshotAI/kimi-code/pull/2572) [`6ba75a1`](https://github.com/MoonshotAI/kimi-code/commit/6ba75a173b595904bc70d0d7161de2f9b964c961) 感谢 [@sailist](https://github.com/sailist)! - 将 `[loop_control]` 配置项 `max_retries_per_step` 重命名为 `max_attempts_per_step`,`max_steps_per_run` 重命名为 `max_steps_per_turn`:在 v2 引擎中旧配置项已失效,启动时会提示在 `config.toml` 中进行重命名。`KIMI_LOOP_MAX_RETRIES_PER_STEP` 环境变量同样被弃用,建议改用 `KIMI_LOOP_MAX_ATTEMPTS_PER_STEP`,但旧变量仍会带警告提示继续工作。 - [#2585](https://github.com/MoonshotAI/kimi-code/pull/2585) [`c396873`](https://github.com/MoonshotAI/kimi-code/commit/c39687318c64bf8a305a10bf9ca86ef6ef2c6656) 感谢 [@sailist](https://github.com/sailist)! - 修复当模型提供商返回包含冒号的工具调用 ID 时(部分 OpenAI 兼容网关),交互式问题提示的答案提交被拒绝的问题。 - [#2562](https://github.com/MoonshotAI/kimi-code/pull/2562) [`071b6a5`](https://github.com/MoonshotAI/kimi-code/commit/071b6a50d9c2ce9c4b45dc4d58dac1101b8c4f52) 感谢 [@sailist](https://github.com/sailist)! - 由服务器层提供 v1 消息历史记录,并移除引擎端的旧版消息适配器;`/api/v1` 消息接口契约保持不变。 - [#2562](https://github.com/MoonshotAI/kimi-code/pull/2562) [`071b6a5`](https://github.com/MoonshotAI/kimi-code/commit/071b6a50d9c2ce9c4b45dc4d58dac1101b8c4f52) 感谢 [@sailist](https://github.com/sailist)! - 为冷启动和实时会话从引擎服务组装会话快照端点,并移除 `KIMI_SNAPSHOT_READER`、`KIMI_SNAPSHOT_TIMEOUT_MS` 和 `KIMI_SNAPSHOT_CACHE_LIMIT` 环境变量配置。 - [#2563](https://github.com/MoonshotAI/kimi-code/pull/2563) [`2118544`](https://github.com/MoonshotAI/kimi-code/commit/21185447fe0f04dbe342bebb6c6d0b364fd43daa) 感谢 [@sailist](https://github.com/sailist)! - 修复在未绑定模型或配置的模型无法解析时,会话状态更新中上下文窗口限制显示为 0 的问题;现在该限制会回退到默认模型的值,或在未知时省略。 - [#2563](https://github.com/MoonshotAI/kimi-code/pull/2563) [`2118544`](https://github.com/MoonshotAI/kimi-code/commit/21185447fe0f04dbe342bebb6c6d0b364fd43daa) 感谢 [@sailist](https://github.com/sailist)! - `[token_counting]` 策略现在仅选择报告的上下文大小:`estimated` 模式不会将提供商报告的用量显示在上下文大小中,`measured` 模式不再因重试超大压缩请求而卡死直至失败。 - [#2563](https://github.com/MoonshotAI/kimi-code/pull/2563) [`2118544`](https://github.com/MoonshotAI/kimi-code/commit/21185447fe0f04dbe342bebb6c6d0b364fd43daa) 感谢 [@sailist](https://github.com/sailist)! - 新增 `[token_counting]` 配置节,用于选择上下文 token 计数的计算方式:`measured+estimated`(默认)、`measured`(仅提供商用量)或 `estimated`(仅启发式估算,适用于无用量报告的提供商)。在 `config.toml` 的 `[token_counting]` 下设置 `strategy`(或环境变量 `KIMI_TOKEN_COUNTING_STRATEGY`)即可切换。