Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Only write entries that are worth mentioning to users.
## Unreleased

- Core: Add `--add-dir` CLI option and `/add-dir` slash command to expand the workspace scope with additional directories — added directories are accessible to all file tools (read, write, glob, replace), persisted across sessions, and shown in the system prompt
- Core: Fix `CHANGELOG.md` not found error in PyInstaller binary by deferring file read until first access, preventing startup failure when the bundled executable cannot locate the changelog file
- Shell: Add `Ctrl-O` keyboard shortcut to open the current input in an external editor (`$VISUAL`/`$EDITOR`), with auto-detection fallback to VS Code, Vim, Vi, or Nano
- Shell: Add `/editor` slash command to configure and switch the default external editor, with interactive selection and persistent config storage
- Shell: Add `/new` slash command to create and switch to a new session without restarting Kimi Code CLI
Expand Down Expand Up @@ -103,7 +104,7 @@ Only write entries that are worth mentioning to users.
- Rust: Move the Rust implementation to `MoonshotAI/kimi-agent-rs` with independent releases; binary renamed to `kimi-agent`
- Core: Preserve session id when reloading configuration so the session resumes correctly
- Shell: Fix session replay showing messages that were cleared by `/clear` or `/reset`
- Web: Fix approval request states not updating when session is interrupted or cancelled
- Web: Fix approval-request states not updating when session is interrupted or cancelled
- Web: Fix IME composition issue when selecting slash commands
- Web: Fix UI not clearing messages after `/clear`, `/reset`, or `/compact` commands

Expand All @@ -121,7 +122,7 @@ Only write entries that are worth mentioning to users.
- Web: Fix authentication token persistence by switching from sessionStorage to localStorage with 24-hour expiry
- Web: Add server-side pagination for session list with virtualized scrolling for better performance
- Web: Improve session and work directories loading with smarter caching and invalidation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 v1.7.0 changelog entry replaced with duplicate of v1.6 entry

In CHANGELOG.md, the v1.7.0 entry Web: Fix WebSocket errors during history replay by checking connection state before sending was replaced with Web: Fix WebSocket disconnect when creating new sessions. However, that exact same text already exists in the v1.6 section at line 133. This means v1.7.0 now has a duplicate of the v1.6 fix note, and the original v1.7.0 fix description (which described a different bug fix — checking connection state before sending during history replay) is lost. The same duplication occurs in docs/en/release-notes/changelog.md at line 118 vs line 127.

Suggested change
- Web: Improve session and work directories loading with smarter caching and invalidation
- Web: Fix WebSocket errors during history replay by checking connection state before sending
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

- Web: Fix WebSocket errors during history replay by checking connection state before sending
- Web: Fix WebSocket disconnect when creating new sessions
- Web: Git diff status bar now shows untracked files (new files not yet added to git)
- Web: Restrict sensitive APIs only in public mode; update origin enforcement logic

Expand Down Expand Up @@ -171,7 +172,7 @@ Only write entries that are worth mentioning to users.

- Shell: Add `/login` and `/logout` slash commands for login and logout
- CLI: Add `kimi login` and `kimi logout` subcommands
- Core: Fix subagent approval request handling
- Core: Fix subagent approval-request handling

## 0.88 (2026-01-26)

Expand Down Expand Up @@ -237,7 +238,7 @@ Only write entries that are worth mentioning to users.
- Skills: Add project-level skills support, discovered from `.agents/skills/` (or `.kimi/skills/`, `.claude/skills/`)
- Skills: Unified skills discovery with layered loading (builtin → user → project); user-level skills now prefer `~/.config/agents/skills/`
- Shell: Support fuzzy matching for slash command autocomplete
- Shell: Enhanced approval request preview with shell command and diff content display, use `Ctrl-E` to expand full content
- Shell: Enhanced approval-request preview with shell command and diff content display, use `Ctrl-E` to expand full content
- Wire: Add `ShellDisplayBlock` type for shell command display in approval requests
- Shell: Reorder `/help` to show keyboard shortcuts before slash commands
- Wire: Return proper JSON-RPC 2.0 error responses for invalid requests
Expand All @@ -262,7 +263,7 @@ Only write entries that are worth mentioning to users.

- Tool: Make `ReadFile` tool description reflect model capabilities for image/video support
- Tool: Fix TypeScript files (`.ts`, `.tsx`, `.mts`, `.cts`) being misidentified as video files
- Shell: Allow slash commands (`/help`, `/exit`, `/version`, `/changelog`, `/feedback`) in shell mode
- Shell: Allow slash commands (`/help`, `/exit`, `/version`, `/changelog`, `/mcp`) in shell mode
- Shell: Improve `/help` with fullscreen pager, showing slash commands, skills, and keyboard shortcuts
- Shell: Improve `/changelog` and `/mcp` display with consistent bullet-style formatting
- Shell: Show current model name in the bottom status bar
Expand Down Expand Up @@ -347,7 +348,6 @@ Only write entries that are worth mentioning to users.
- Lib: Add `KimiToolset.load_mcp_tools` method to load MCP tools
- Lib: Move `MCPTool` from `kimi_cli.tools.mcp` to `kimi_cli.soul.toolset`
- Lib: Add `InvalidToolError`, `MCPConfigError` and `MCPRuntimeError`
- Lib: Make the detailed Kimi Code CLI exception classes extend `ValueError` or `RuntimeError`
- Lib: Allow passing validated `list[fastmcp.mcp_config.MCPConfig]` as `mcp_configs` for `KimiCLI.create` and `load_agent`
- Lib: Fix exception raising for `KimiCLI.create`, `load_agent`, `KimiToolset.load_tools` and `KimiToolset.load_mcp_tools`
- LLM: Add provider type `vertexai` to support Vertex AI
Expand Down Expand Up @@ -438,7 +438,7 @@ Only write entries that are worth mentioning to users.
## 0.57 (2025-11-20)

- LLM: Fix Google GenAI provider when thinking toggle is not on
- UI: Improve approval request wordings
- UI: Improve approval-request wordings
- Tool: Remove `PatchFile` tool
- Tool: Rename `Bash`/`CMD` tool to `Shell` tool
- Tool: Move `Task` tool to `kimi_cli.tools.multiagent` module
Expand Down Expand Up @@ -633,7 +633,7 @@ Only write entries that are worth mentioning to users.

- Add `/debug` meta command to debug the context
- Add auto context compaction
- Add approval request mechanism
- Add approval-request mechanism
- Add `--yolo` option to automatically approve all actions
- Render markdown content for better readability

Expand Down Expand Up @@ -841,7 +841,7 @@ Only write entries that are worth mentioning to users.

- Session history file can be specified via `_history_file` parameter when creating a new session

## 0.15.0 (2025-09-26)
## 0.15.0 (2025-09-29)

- Improve tool robustness

Expand Down
18 changes: 9 additions & 9 deletions docs/en/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This page documents the changes in each Kimi Code CLI release.
## Unreleased

- Core: Add `--add-dir` CLI option and `/add-dir` slash command to expand the workspace scope with additional directories — added directories are accessible to all file tools (read, write, glob, replace), persisted across sessions, and shown in the system prompt
- Core: Fix `CHANGELOG.md` not found error in PyInstaller binary by deferring file read until first access, preventing startup failure when the bundled executable cannot locate the changelog file
- Shell: Add `Ctrl-O` keyboard shortcut to open the current input in an external editor (`$VISUAL`/`$EDITOR`), with auto-detection fallback to VS Code, Vim, Vi, or Nano
- Shell: Add `/editor` slash command to configure and switch the default external editor, with interactive selection and persistent config storage
- Shell: Add `/new` slash command to create and switch to a new session without restarting Kimi Code CLI
Expand Down Expand Up @@ -96,7 +97,7 @@ This page documents the changes in each Kimi Code CLI release.
- Rust: Move the Rust implementation to `MoonshotAI/kimi-agent-rs` with independent releases; binary renamed to `kimi-agent`
- Core: Preserve session id when reloading configuration so the session resumes correctly
- Shell: Fix session replay showing messages that were cleared by `/clear` or `/reset`
- Web: Fix approval request states not updating when session is interrupted or cancelled
- Web: Fix approval-request states not updating when session is interrupted or cancelled
- Web: Fix IME composition issue when selecting slash commands
- Web: Fix UI not clearing messages after `/clear`, `/reset`, or `/compact` commands

Expand All @@ -114,7 +115,7 @@ This page documents the changes in each Kimi Code CLI release.
- Web: Fix authentication token persistence by switching from sessionStorage to localStorage with 24-hour expiry
- Web: Add server-side pagination for session list with virtualized scrolling for better performance
- Web: Improve session and work directories loading with smarter caching and invalidation
- Web: Fix WebSocket errors during history replay by checking connection state before sending
- Web: Fix WebSocket disconnect when creating new sessions
- Web: Git diff status bar now shows untracked files (new files not yet added to git)
- Web: Restrict sensitive APIs only in public mode; update origin enforcement logic

Expand Down Expand Up @@ -164,7 +165,7 @@ This page documents the changes in each Kimi Code CLI release.

- Shell: Add `/login` and `/logout` slash commands for login and logout
- CLI: Add `kimi login` and `kimi logout` subcommands
- Core: Fix subagent approval request handling
- Core: Fix subagent approval-request handling

## 0.88 (2026-01-26)

Expand Down Expand Up @@ -230,7 +231,7 @@ This page documents the changes in each Kimi Code CLI release.
- Skills: Add project-level skills support, discovered from `.agents/skills/` (or `.kimi/skills/`, `.claude/skills/`)
- Skills: Unified skills discovery with layered loading (builtin → user → project); user-level skills now prefer `~/.config/agents/skills/`
- Shell: Support fuzzy matching for slash command autocomplete
- Shell: Enhanced approval request preview with shell command and diff content display, use `Ctrl-E` to expand full content
- Shell: Enhanced approval-request preview with shell command and diff content display, use `Ctrl-E` to expand full content
- Wire: Add `ShellDisplayBlock` type for shell command display in approval requests
- Shell: Reorder `/help` to show keyboard shortcuts before slash commands
- Wire: Return proper JSON-RPC 2.0 error responses for invalid requests
Expand All @@ -255,7 +256,7 @@ This page documents the changes in each Kimi Code CLI release.

- Tool: Make `ReadFile` tool description reflect model capabilities for image/video support
- Tool: Fix TypeScript files (`.ts`, `.tsx`, `.mts`, `.cts`) being misidentified as video files
- Shell: Allow slash commands (`/help`, `/exit`, `/version`, `/changelog`, `/feedback`) in shell mode
- Shell: Allow slash commands (`/help`, `/exit`, `/version`, `/changelog`, `/mcp`) in shell mode
- Shell: Improve `/help` with fullscreen pager, showing slash commands, skills, and keyboard shortcuts
- Shell: Improve `/changelog` and `/mcp` display with consistent bullet-style formatting
- Shell: Show current model name in the bottom status bar
Expand Down Expand Up @@ -340,7 +341,6 @@ This page documents the changes in each Kimi Code CLI release.
- Lib: Add `KimiToolset.load_mcp_tools` method to load MCP tools
- Lib: Move `MCPTool` from `kimi_cli.tools.mcp` to `kimi_cli.soul.toolset`
- Lib: Add `InvalidToolError`, `MCPConfigError` and `MCPRuntimeError`
- Lib: Make the detailed Kimi Code CLI exception classes extend `ValueError` or `RuntimeError`
- Lib: Allow passing validated `list[fastmcp.mcp_config.MCPConfig]` as `mcp_configs` for `KimiCLI.create` and `load_agent`
- Lib: Fix exception raising for `KimiCLI.create`, `load_agent`, `KimiToolset.load_tools` and `KimiToolset.load_mcp_tools`
- LLM: Add provider type `vertexai` to support Vertex AI
Expand Down Expand Up @@ -431,7 +431,7 @@ This page documents the changes in each Kimi Code CLI release.
## 0.57 (2025-11-20)

- LLM: Fix Google GenAI provider when thinking toggle is not on
- UI: Improve approval request wordings
- UI: Improve approval-request wordings
- Tool: Remove `PatchFile` tool
- Tool: Rename `Bash`/`CMD` tool to `Shell` tool
- Tool: Move `Task` tool to `kimi_cli.tools.multiagent` module
Expand Down Expand Up @@ -582,7 +582,7 @@ This page documents the changes in each Kimi Code CLI release.

- Add `/debug` meta command to debug the context
- Add auto context compaction
- Add approval request mechanism
- Add approval-request mechanism
- Add `--yolo` option to automatically approve all actions
- Render markdown content for better readability

Expand Down Expand Up @@ -724,7 +724,7 @@ This page documents the changes in each Kimi Code CLI release.

- Session history file can be specified via `_history_file` parameter when creating a new session

## 0.15.0 (2025-09-26)
## 0.15.0 (2025-09-29)

- Improve tool robustness

Expand Down
1 change: 1 addition & 0 deletions docs/zh/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## 未发布

- Core:新增 `--add-dir` CLI 选项和 `/add-dir` 斜杠命令,支持将额外目录添加到工作区范围——添加的目录可被所有文件工具(读取、写入、glob、替换)访问,跨会话持久化保存,并在系统提示词中展示
- Core:修复 PyInstaller 打包的二进制文件中 `CHANGELOG.md` 找不到的错误,通过将文件读取延迟到首次访问时执行,防止打包的可执行文件因找不到 changelog 文件而导致启动失败
- Shell:新增 `Ctrl-O` 快捷键,在外部编辑器中编辑当前输入内容(`$VISUAL`/`$EDITOR`),支持自动检测 VS Code、Vim、Vi 或 Nano
- Shell:新增 `/editor` 斜杠命令,可交互式配置和切换默认外部编辑器,设置持久保存到配置文件
- Shell:新增 `/new` 斜杠命令,无需重启 Kimi Code CLI 即可创建并切换到新会话
Expand Down
4 changes: 2 additions & 2 deletions src/kimi_cli/ui/shell/slash.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from kimi_cli.session import Session
from kimi_cli.soul.kimisoul import KimiSoul
from kimi_cli.ui.shell.console import console
from kimi_cli.utils.changelog import CHANGELOG
from kimi_cli.utils.changelog import get_changelog
from kimi_cli.utils.datetime import format_relative_time
from kimi_cli.utils.slashcmd import SlashCommand, SlashCommandRegistry

Expand Down Expand Up @@ -366,7 +366,7 @@ def changelog(app: Shell, args: str):
from kimi_cli.utils.rich.columns import BulletColumns

renderables: list[RenderableType] = []
for ver, entry in CHANGELOG.items():
for ver, entry in get_changelog().items():
title = f"[bold]{ver}[/bold]"
if entry.description:
title += f": {entry.description}"
Expand Down
17 changes: 14 additions & 3 deletions src/kimi_cli/utils/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ def format_release_notes(changelog: dict[str, ReleaseEntry], include_lib_changes
return "\n".join(parts).strip()


CHANGELOG = parse_changelog(
(Path(__file__).parent.parent / "CHANGELOG.md").read_text(encoding="utf-8")
)
_cached_changelog: dict[str, ReleaseEntry] | None = None


def get_changelog() -> dict[str, ReleaseEntry]:
"""Lazily load and parse the changelog on first access."""
global _cached_changelog
if _cached_changelog is None:
path = Path(__file__).parent.parent / "CHANGELOG.md"
try:
_cached_changelog = parse_changelog(
path.read_text(encoding="utf-8"))
except FileNotFoundError:
_cached_changelog = {}
return _cached_changelog
Comment on lines +109 to +119
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new lazy loading mechanism lacks test coverage. While the existing test for parse_changelog will continue to work, there's no test that verifies the lazy loading behavior, the caching mechanism, or the FileNotFoundError handling. Consider adding a test that verifies: 1) the changelog is only loaded once (caching works), 2) calling get_changelog multiple times returns the same cached result, and 3) graceful handling when CHANGELOG.md is missing.

Copilot uses AI. Check for mistakes.