斜杠命令
斜杠命令是以 / 开头的 command message。在 TUI 中,命令由本地 command catalog 加上 gateway
command catalog 提供补全和分组。在 messaging channels 中,只会分发该 channel 支持的命令;
以未知斜杠开头的普通文本不会被当成隐藏运行时操作。
在 TUI 中使用 /help 列出命令,或使用 /help COMMAND 查看某个命令的 source、running
behavior、surfaces、handler、audit category 和 usage。
Surfaces 与 Busy Behavior
| Surface | 命令如何解析 |
|---|---|
| TUI | 先检查本地 TUI commands,再使用 gateway command metadata。 |
| One-shot CLI | Shell commands 不是 slash commands;prompt 使用 anyy chat。 |
| Messaging channels | Adapter 只分发暴露给 channel surfaces 的命令。 |
| API/runtime clients | 通过 gateway command descriptors 驱动命令。 |
Running behavior 是每个 command descriptor 的一部分:
| Behavior | 含义 |
|---|---|
local_only | 由当前 surface 处理,不进入 gateway execution。 |
bypass | Turn 活跃时也可以运行。 |
queue | 排到 active turn 后面。 |
steer | 给 active turn 增加指导。 |
reject_while_running | Active turn 完成或停止前拒绝运行。 |
TUI 斜杠命令
本地 TUI 命令在终端应用内处理:
| 命令 | 用途 |
|---|---|
/help [topic] | 显示帮助或某个命令的详情。 |
/quit | 退出 TUI。 |
/new | 开始新 session;如果当前 session 有可见内容,会先确认。 |
| `/compact on | off` |
/resume [SESSION_ID] | 打开 session picker 或恢复指定 session。 |
| `/busy queue | steer |
/copy | 在剪贴板可用时复制最近的 assistant response。 |
/paste | 显示当前终端的 paste 指引。 |
| `/details hidden | compact |
| `/reasoning show | hide |
/fast | 显示或切换 fast model mode。 |
/logs | 显示本地 TUI messages。 |
/insights | 显示轻量 usage information。 |
/history | 显示当前 session history。 |
/save | 将当前 session 导出到文件。 |
/branch [title] | 分支当前 session。 |
/background <prompt> | 在后台 child agent 中运行 prompt。 |
/agents | 显示当前 session 的 child agents。 |
/jobs | 显示当前 session 的 background jobs。 |
/job <id> / /job kill <id> | 检查或停止一个 background job。 |
/profile | 显示 active profile detail。 |
/config | 显示 active configuration。 |
/statusbar | 切换 status bar。 |
/queue | 检查或排队 messages。 |
/redraw | 清屏并重绘终端。 |
/undo | 在没有 turn 正在运行时撤销上一次 exchange。 |
/retry | 在没有 turn 正在运行时重试上一条 user message。 |
TUI 也会显示当前 surface 可用的 gateway commands。如果 gateway command 与 local command 同名, 在 TUI 中 local command 优先。
Messaging 斜杠命令
运行时 command registry 会向 messaging adapters 暴露 channel-capable commands。当前带 channel surfaces 的内置命令包括:
| 命令 | 用途 |
|---|---|
/help | 显示可用命令。 |
/new | 开始新的 channel session。 |
/resume | 在 surface 支持时恢复现有 session。 |
/sessions | 列出最近 sessions。 |
/status | 显示 runtime status。 |
/stop | 停止正在运行的 turn。 |
/queue | 将输入排到正在运行的 turn 之后。 |
/btw | 给正在运行的 turn 添加指导;/steer 是 alias。 |
/retry | 重试上一次失败的 turn。 |
/approve | 批准 pending request。 |
/deny | 拒绝 pending request。 |
/voice | 管理某个 channel conversation 的 voice replies。 |
Channel adapters 也可以暴露动态 skill commands。这些命令通过 active skill catalog 解析,并 作为 session input 发送,同时为该 turn 加载 skill 内容。
Session Commands
| 命令 | 行为 |
|---|---|
/new | 创建新 session。 |
/resume [SESSION_ID] | 恢复已知 session,或打开 picker/list。 |
/sessions | 列出最近 sessions。 |
/history | 显示当前 session 的 messages。 |
/branch [title] | 创建链接到当前 session 的 child session。 |
/compress | 通过 gateway 压缩 session context。 |
/stop | 停止正在运行的 turn。 |
/queue <text> | 在 turn 活跃时排队 text。 |
/btw <text> | 用额外指导 steer active turn。 |
/undo | 回退最近一次 exchange。 |
/retry | 重新运行上一条 user message。 |
有些命令会在 turn 运行时被拒绝;有些会 bypass busy turn,或有意 queue/steer。
Model Commands
| 命令 | 行为 |
|---|---|
/model | 显示当前 session 的 active model。 |
/model list | 列出 models。 |
/model set ... | 在当前 runtime 支持时改变 model scope。 |
/provider | 检查 configured providers 和 provider auth。 |
具体 model/provider 子命令由 gateway command handler 解析,而不是 TUI 解析。请在 TUI 中使用
/help /model 和 /help /provider 查看当前加载的 command metadata。
Cron Commands
| 命令 | 行为 |
|---|---|
/cron | 通过 runtime command handler 管理 scheduled tasks。 |
非交互式 cron 管理请查看 CLI 参考:CLI 命令。
Skill Commands
| 命令 | 行为 |
|---|---|
/skills | 列出可用 skills。 |
/skill | 显示 skill 详情。 |
/reload-skills | Reload skill metadata。 |
/tools | 列出可用 tools。 |
/toolsets | 列出可用 toolsets。 |
/mcp | 显示 MCP server 和 tool status。 |
/reload-mcp | Reload MCP server catalogs。 |
已安装 skills 声明 commands 时,也可能出现动态 skill commands。它们受 active profile、role、 surface 和 runtime visibility 限定。
Runtime Management Commands
这些 built-ins 由 gateway command catalog 注册。实际可用性仍可能受 surface、profile configuration 和 active runtime state 影响。
| 命令 | 行为 |
|---|---|
/title | 显示或设置当前 session title。 |
/goal | 设置、查看、暂停、恢复或清除 session goal。 |
/changeplans | 列出 pending 或 recent ChangePlans。 |
/plan | 显示或更新一个 ChangePlan。 |
/channels | 管理 channel runtime state。 |
/weixin status | 显示 Weixin channel status。 |
/pair | 为支持的 channel flows 创建 pairing request。 |
/secrets | 通过 runtime handler 管理 secret references。 |
/usage | 显示 provider 和 tool usage。 |
/logs | 显示 recent runtime logs。 |
/audit | 显示 audit events。 |
/doctor | 运行 runtime diagnostics。 |
/debug | 在没有 turn 正在运行时创建 redacted debug bundle。 |
/footer | 在 local TUI 支持时切换 TUI footer detail。 |