feat: add /export and /import commands to shell mode; update context …#1330
feat: add /export and /import commands to shell mode; update context …#1330
Conversation
…usage display with token counts
There was a problem hiding this comment.
Pull request overview
Updates the user guides to reflect recent shell/status-bar behavior changes in Kimi Code CLI, especially around context display and shell-mode slash commands.
Changes:
- Update session guides (EN/ZH) to mention token counts shown alongside context usage in the status bar.
- Update interaction guides (EN/ZH) to list
/exportand/importas supported slash commands in shell mode.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/zh/guides/sessions.md | Document token-count-inclusive context status bar display (ZH). |
| docs/zh/guides/interaction.md | Add /export and /import to shell-mode slash command list (ZH). |
| docs/en/guides/sessions.md | Document token-count-inclusive context status bar display (EN). |
| docs/en/guides/interaction.md | Add /export and /import to shell-mode slash command list (EN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ::: tip | ||
| The bottom status bar displays the current context usage (`context: xx.x%`), helping you understand when you need to clear or compact. | ||
| The bottom status bar displays the current context usage with token counts (e.g., `context: 42.0% (4.2k/10.0k)`), helping you understand when you need to clear or compact. |
There was a problem hiding this comment.
The example token count format doesn’t match the actual status formatter: format_token_count() drops trailing .0, so 10.0k would display as 10k. Consider updating the example to something like context: 42.0% (4.2k/10k) to reflect real output.
| The bottom status bar displays the current context usage with token counts (e.g., `context: 42.0% (4.2k/10.0k)`), helping you understand when you need to clear or compact. | |
| The bottom status bar displays the current context usage with token counts (e.g., `context: 42.0% (4.2k/10k)`), helping you understand when you need to clear or compact. |
|
|
||
| ::: tip 提示 | ||
| 底部状态栏会显示当前的上下文使用率(`context: xx.x%`),帮助你了解何时需要清空或压缩。 | ||
| 底部状态栏会显示当前的上下文使用率和 Token 数量(如 `context: 42.0% (4.2k/10.0k)`),帮助你了解何时需要清空或压缩。 |
There was a problem hiding this comment.
示例里的 Token 格式和实际状态栏输出不一致:format_token_count() 会去掉末尾的 .0,因此 10.0k 实际会显示为 10k。建议把示例改成类似 context: 42.0% (4.2k/10k) 以匹配真实输出。
| 底部状态栏会显示当前的上下文使用率和 Token 数量(如 `context: 42.0% (4.2k/10.0k)`),帮助你了解何时需要清空或压缩。 | |
| 底部状态栏会显示当前的上下文使用率和 Token 数量(如 `context: 42.0% (4.2k/10k)`),帮助你了解何时需要清空或压缩。 |
| Shell mode also supports some slash commands, including `/help`, `/exit`, `/version`, `/editor`, `/changelog`, `/feedback`, `/export`, and `/import`. | ||
|
|
||
| ::: warning Note | ||
| In shell mode, each command executes independently. Commands that change the environment like `cd` or `export` won't affect subsequent commands. |
There was a problem hiding this comment.
Now that /export is listed as a supported slash command in shell mode, the warning below becomes ambiguous because it mentions export (the shell built-in) without a slash. Consider clarifying that the warning refers to environment-changing shell commands (e.g., export FOO=bar) and is unrelated to the /export slash command.
| In shell mode, each command executes independently. Commands that change the environment like `cd` or `export` won't affect subsequent commands. | |
| In shell mode, each command executes independently. Shell built-ins that change the environment, like `cd` or `export FOO=bar` (not the `/export` slash command), won't affect subsequent commands. |
| Shell 模式也支持部分斜杠命令,包括 `/help`、`/exit`、`/version`、`/editor`、`/changelog`、`/feedback`、`/export` 和 `/import`。 | ||
|
|
||
| ::: warning 注意 | ||
| Shell 模式中每个命令独立执行,`cd`、`export` 等改变环境的命令不会影响后续命令。 |
There was a problem hiding this comment.
现在在 Shell 模式斜杠命令列表里加入了 /export,但下面的注意事项又写了 export(无斜杠,指 shell 内建命令),容易让读者误以为和 /export 是同一件事。建议在提示里明确这是指修改环境的 shell 命令(例如 export FOO=bar),并说明与 /export 斜杠命令无关。
| Shell 模式中每个命令独立执行,`cd`、`export` 等改变环境的命令不会影响后续命令。 | |
| Shell 模式中每个命令独立执行,这里的 `cd`、`export` 等是指修改环境的 Shell 命令(例如 `export FOO=bar`),不会影响后续命令,且与上面的 `/export` 斜杠命令无关。 |
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.