Skip to content

Commit ce23c36

Browse files
authored
feat(shell): improve slash commands and help display (#604)
Signed-off-by: Richard Chien <stdrc@outlook.com>
1 parent c50ecb7 commit ce23c36

17 files changed

Lines changed: 299 additions & 117 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Only write entries that are worth mentioning to users.
1212
## Unreleased
1313

1414
- Tool: Make `ReadFile` tool description reflect model capabilities for image/video support
15+
- Shell: Allow slash commands (`/help`, `/exit`, `/version`, `/changelog`, `/feedback`) in shell mode
16+
- Shell: Improve `/help` with fullscreen pager, showing slash commands, skills, and keyboard shortcuts
17+
- Shell: Improve `/changelog` and `/mcp` display with consistent bullet-style formatting
18+
- Shell: Show current model name in the bottom status bar
19+
- Shell: Add `Ctrl-/` shortcut to show help
1520

1621
## 0.75 (2026-01-09)
1722

docs/en/guides/interaction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ $ git status
1919
$ npm run build
2020
```
2121

22+
Shell mode also supports some slash commands, including `/help`, `/exit`, `/version`, `/changelog`, and `/feedback`.
23+
2224
::: warning Note
2325
In shell mode, each command executes independently. Commands that change the environment like `cd` or `export` won't affect subsequent commands.
2426
:::

docs/en/reference/keyboard.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Kimi CLI shell mode supports the following keyboard shortcuts.
88
|----------|----------|
99
| `Ctrl-X` | Toggle agent/shell mode |
1010
| `Tab` | Toggle thinking mode |
11+
| `Ctrl-/` | Show help |
1112
| `Ctrl-J` | Insert newline |
1213
| `Alt-Enter` | Insert newline (same as `Ctrl-J`) |
1314
| `Ctrl-V` | Paste (supports images) |
@@ -38,6 +39,10 @@ In agent mode, when the input box is empty or no completion menu is displayed, p
3839
Thinking mode requires model support.
3940
:::
4041

42+
### `Ctrl-/`: Show help
43+
44+
Press `Ctrl-/` in the input box to quickly display help information, equivalent to entering the `/help` command.
45+
4146
## Multi-line input
4247

4348
### `Ctrl-J` / `Alt-Enter`: Insert newline
@@ -95,7 +100,8 @@ Completion operations:
95100
The bottom status bar displays:
96101

97102
- Current time
98-
- Current mode (agent/agent (think)/shell)
103+
- Current mode (agent/shell) and model name (in agent mode)
104+
- YOLO badge (when enabled)
99105
- Shortcut hints
100106
- Context usage
101107

docs/en/reference/slash-commands.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22

33
Slash commands are built-in commands for Kimi CLI, used to control sessions, configuration, and debugging. Enter a command starting with `/` in the input box to trigger.
44

5+
::: tip Shell mode
6+
Some slash commands are also available in shell mode, including `/help`, `/exit`, `/version`, `/changelog`, and `/feedback`.
7+
:::
8+
59
## Help and info
610

711
### `/help`
812

9-
Display help information, listing all available slash commands.
13+
Display help information. Shows all available slash commands, loaded skills, and keyboard shortcuts in a fullscreen pager. Press `q` to exit.
1014

1115
Aliases: `/h`, `/?`
1216

1317
### `/version`
1418

1519
Display Kimi CLI version number.
1620

17-
### `/release-notes`
21+
### `/changelog`
22+
23+
Display the changelog for recent versions.
1824

19-
Display release notes for recent versions.
25+
Alias: `/release-notes`
2026

2127
### `/feedback`
2228

docs/en/release-notes/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ This page documents the changes in each Kimi CLI release.
55
## Unreleased
66

77
- Tool: Make `ReadFile` tool description reflect model capabilities for image/video support
8+
- Shell: Allow slash commands (`/help`, `/exit`, `/version`, `/changelog`, `/feedback`) in shell mode
9+
- Shell: Improve `/help` with fullscreen pager, showing slash commands, skills, and keyboard shortcuts
10+
- Shell: Improve `/changelog` and `/mcp` display with consistent bullet-style formatting
11+
- Shell: Show current model name in the bottom status bar
12+
- Shell: Add `Ctrl-/` shortcut to show help
813

914
## 0.75 (2026-01-09)
1015

docs/zh/guides/interaction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ $ git status
1919
$ npm run build
2020
```
2121

22+
Shell 模式也支持部分斜杠命令,包括 `/help``/exit``/version``/changelog``/feedback`
23+
2224
::: warning 注意
2325
Shell 模式中每个命令独立执行,`cd``export` 等改变环境的命令不会影响后续命令。
2426
:::

docs/zh/reference/keyboard.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Kimi CLI Shell 模式支持以下键盘快捷键。
77
| 快捷键 | 功能 |
88
|--------|------|
99
| `Ctrl-X` | 切换 Agent/Shell 模式 |
10-
| `Tab` | 切换 thinking 模式 |
10+
| `Tab` | 切换 Thinking 模式 |
11+
| `Ctrl-/` | 显示帮助 |
1112
| `Ctrl-J` | 插入换行 |
1213
| `Alt-Enter` | 插入换行(同 `Ctrl-J`|
1314
| `Ctrl-V` | 粘贴(支持图片) |
@@ -27,7 +28,7 @@ Kimi CLI Shell 模式支持以下键盘快捷键。
2728
- Agent 模式:```💫`(thinking 模式)
2829
- Shell 模式:`$`
2930

30-
### `Tab`:切换 thinking 模式
31+
### `Tab`:切换 Thinking 模式
3132

3233
在 Agent 模式下,当输入框为空或没有显示补全菜单时,按 `Tab` 可切换 Thinking 模式。
3334

@@ -38,6 +39,10 @@ Kimi CLI Shell 模式支持以下键盘快捷键。
3839
Thinking 模式需要模型支持。
3940
:::
4041

42+
### `Ctrl-/`:显示帮助
43+
44+
在输入框中按 `Ctrl-/` 可快速显示帮助信息,等价于输入 `/help` 命令。
45+
4146
## 多行输入
4247

4348
### `Ctrl-J` / `Alt-Enter`:插入换行
@@ -95,7 +100,8 @@ Thinking 模式需要模型支持。
95100
底部状态栏显示:
96101

97102
- 当前时间
98-
- 当前模式(agent/agent (think)/shell)
103+
- 当前模式(agent/shell)和模型名称(Agent 模式下显示)
104+
- YOLO 标识(开启时显示)
99105
- 快捷键提示
100106
- 上下文使用率
101107

docs/zh/reference/slash-commands.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22

33
斜杠命令是 Kimi CLI 的内置命令,用于控制会话、配置和调试。在输入框中输入 `/` 开头的命令即可触发。
44

5+
::: tip Shell 模式
6+
部分斜杠命令在 Shell 模式下也可以使用,包括 `/help``/exit``/version``/changelog``/feedback`
7+
:::
8+
59
## 帮助与信息
610

711
### `/help`
812

9-
显示帮助信息,列出所有可用的斜杠命令
13+
显示帮助信息。在全屏分页器中列出所有可用的斜杠命令、已加载的 Skills 以及键盘快捷键。按 `q` 退出
1014

1115
别名:`/h``/?`
1216

1317
### `/version`
1418

1519
显示 Kimi CLI 版本号。
1620

17-
### `/release-notes`
21+
### `/changelog`
22+
23+
显示最近版本的变更记录。
1824

19-
显示最近版本的发布说明。
25+
别名:`/release-notes`
2026

2127
### `/feedback`
2228

docs/zh/release-notes/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
## 未发布
66

77
- Tool:让 `ReadFile` 工具描述根据模型能力动态反映图片/视频支持情况
8+
- Shell:允许在 Shell 模式下使用部分斜杠命令(`/help``/exit``/version``/changelog``/feedback`
9+
- Shell:改进 `/help` 显示,使用全屏分页器,展示斜杠命令、Skills 和键盘快捷键
10+
- Shell:改进 `/changelog``/mcp` 显示,采用一致的项目符号格式
11+
- Shell:在底部状态栏显示当前模型名称
12+
- Shell:添加 `Ctrl-/` 快捷键显示帮助
813

914
## 0.75 (2026-01-09)
1015

src/kimi_cli/platforms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class Platform(NamedTuple):
2828
),
2929
Platform(
3030
id="moonshot-cn",
31-
name="Moonshot AI 开放平台 (moonshot.cn)",
31+
name="Moonshot AI Open Platform (moonshot.cn)",
3232
base_url="https://api.moonshot.cn/v1",
33-
allowed_prefixes=["kimi-k2-"],
33+
allowed_prefixes=["kimi-k"],
3434
),
3535
Platform(
3636
id="moonshot-ai",
3737
name="Moonshot AI Open Platform (moonshot.ai)",
3838
base_url="https://api.moonshot.ai/v1",
39-
allowed_prefixes=["kimi-k2-"],
39+
allowed_prefixes=["kimi-k"],
4040
),
4141
]
4242

0 commit comments

Comments
 (0)