Skip to content

docs: add missing slash commands to reference#577

Open
jimpablo wants to merge 1 commit into
MoonshotAI:mainfrom
jimpablo:docs/add-missing-slash-commands
Open

docs: add missing slash commands to reference#577
jimpablo wants to merge 1 commit into
MoonshotAI:mainfrom
jimpablo:docs/add-missing-slash-commands

Conversation

@jimpablo

@jimpablo jimpablo commented Jun 9, 2026

Copy link
Copy Markdown

Related Issue

No related issue. This is a documentation-only change; per CONTRIBUTING.md, documentation-only changes can be opened directly. The problem is described below.

Problem

Several slash commands that exist in the TUI command registry are missing from the reference tables, so users browsing the docs cannot discover them:

  • /undo is absent from both the English and Chinese tables.
  • /reload and /reload-tui are absent from the Chinese table (they are already present in the English one).

What changed

Added the missing rows to the reference tables in docs/en/reference/slash-commands.md and docs/zh/reference/slash-commands.md:

  • EN: /undo
  • ZH: /undo, /reload, /reload-tui

All three commands are registered in apps/kimi-code/src/tui/commands/registry.ts (undo, reload, reload-tui). The /undo [<count>] argument is accurate: handleUndoCommand parses an optional positive integer (parseUndoCountsession.undoHistory(count)). Descriptions follow the wording/format of the surrounding rows. These tables are hand-maintained (not generated), so the rows are added directly.

This consolidates and supersedes #516.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. N/A — documentation-only change; no tests applicable.
  • Ran gen-changesets skill, or this PR needs no changeset. — docs-only PR; per CONTRIBUTING, no changeset needed.
  • Ran gen-docs skill, or this PR needs no doc update. — this PR is the doc update; the tables are hand-maintained, not generated.

Add the /undo command to both the English and Chinese reference tables,
and add the missing /reload and /reload-tui rows to the Chinese table.
All three commands are registered in the TUI command registry.
Copilot AI review requested due to automatic review settings June 9, 2026 06:42
@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8714cb4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the slash command reference docs to include the newly documented /undo command and to align the Chinese reference with existing reload-related commands.

Changes:

  • Documented the new /undo [<count>] command in both English and Chinese references.
  • Added /reload and /reload-tui entries to the Chinese reference to match existing functionality documented in English.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/zh/reference/slash-commands.md Adds /undo, /reload, and /reload-tui rows to the Chinese slash-command reference table.
docs/en/reference/slash-commands.md Adds a /undo row to the English slash-command reference table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| `/fork` | — | Fork a new session from the current one, preserving the full conversation history | No |
| `/title [<text>]` | `/rename` | Without arguments, display the current session title; with an argument, set a new title (max 200 characters) | Yes |
| `/compact [<instruction>]` | — | Compact the current conversation context to free up token usage; an optional custom instruction can hint to the model what to preserve | No |
| `/undo [<count>]` | — | Withdraw the last prompt from the conversation history, along with the responses that followed it; pass a positive integer to undo that many prompts | No |
| `/fork` | — | 基于当前会话 fork 一份新会话,保留完整对话历史 | 否 |
| `/title [<text>]` | `/rename` | 不带参数时显示当前会话标题;带参数时设置为新标题(最长 200 字符) | 是 |
| `/compact [<instruction>]` | — | 压缩当前对话上下文,释放 token 占用;可附带自定义指令,提示模型压缩时保留哪些信息 | 否 |
| `/undo [<count>]` | — | 从对话历史中撤回上一条提示词,连同其后的回复一并撤回;可传入正整数一次撤回多条 | 否 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants