feat(stash): register /stash in /help and autocomplete (#440 polish)
The slash command landed in 6fb87 but only via the dispatch match arm — `/help` and the fuzzy autocomplete consult `COMMANDS: &[CommandInfo]` to enumerate available commands, and without a `CommandInfo` entry the new `/stash` was effectively hidden from discovery. Adds a `CommandInfo` row with `aliases: &["park"]`, a `/stash [list|pop]` usage hint, and a new `MessageId::CmdStashDescription` localized in en, ja, zh-Hans, pt-BR. The description reminds users that Ctrl+S is the matching push entry point — both surfaces should reinforce each other in the help overlay. No behavior change on the dispatch path; this is pure discoverability.
This commit is contained in:
@@ -172,6 +172,12 @@ pub const COMMANDS: &[CommandInfo] = &[
|
||||
usage: "/queue [list|edit <n>|drop <n>|clear]",
|
||||
description_id: MessageId::CmdQueueDescription,
|
||||
},
|
||||
CommandInfo {
|
||||
name: "stash",
|
||||
aliases: &["park"],
|
||||
usage: "/stash [list|pop]",
|
||||
description_id: MessageId::CmdStashDescription,
|
||||
},
|
||||
CommandInfo {
|
||||
name: "subagents",
|
||||
aliases: &["agents"],
|
||||
|
||||
@@ -253,6 +253,7 @@ pub enum MessageId {
|
||||
CmdSettingsDescription,
|
||||
CmdSkillDescription,
|
||||
CmdSkillsDescription,
|
||||
CmdStashDescription,
|
||||
CmdStatuslineDescription,
|
||||
CmdSubagentsDescription,
|
||||
CmdSwarmDescription,
|
||||
@@ -437,6 +438,7 @@ pub const ALL_MESSAGE_IDS: &[MessageId] = &[
|
||||
MessageId::CmdSettingsDescription,
|
||||
MessageId::CmdSkillDescription,
|
||||
MessageId::CmdSkillsDescription,
|
||||
MessageId::CmdStashDescription,
|
||||
MessageId::CmdStatuslineDescription,
|
||||
MessageId::CmdSubagentsDescription,
|
||||
MessageId::CmdSwarmDescription,
|
||||
@@ -764,6 +766,9 @@ fn english(id: MessageId) -> &'static str {
|
||||
MessageId::CmdSkillsDescription => {
|
||||
"List local skills (or --remote to browse the curated registry)"
|
||||
}
|
||||
MessageId::CmdStashDescription => {
|
||||
"Park or restore a composer draft (Ctrl+S to push, /stash list/pop)"
|
||||
}
|
||||
MessageId::CmdStatuslineDescription => "Configure which items appear in the footer",
|
||||
MessageId::CmdSubagentsDescription => "List sub-agent status",
|
||||
MessageId::CmdSwarmDescription => {
|
||||
@@ -1037,6 +1042,9 @@ fn japanese(id: MessageId) -> Option<&'static str> {
|
||||
MessageId::CmdSkillsDescription => {
|
||||
"ローカルスキルを一覧表示(--remote で精選レジストリを参照)"
|
||||
}
|
||||
MessageId::CmdStashDescription => {
|
||||
"コンポーザーの下書きを退避/復元(Ctrl+S で退避、/stash list|pop)"
|
||||
}
|
||||
MessageId::CmdStatuslineDescription => "フッターに表示する項目を設定",
|
||||
MessageId::CmdSubagentsDescription => "サブエージェントの状態を一覧表示",
|
||||
MessageId::CmdSwarmDescription => {
|
||||
@@ -1286,6 +1294,7 @@ fn chinese_simplified(id: MessageId) -> Option<&'static str> {
|
||||
MessageId::CmdSettingsDescription => "显示持久化设置",
|
||||
MessageId::CmdSkillDescription => "激活技能,或安装/更新/卸载/信任社区技能",
|
||||
MessageId::CmdSkillsDescription => "列出本地技能(或使用 --remote 浏览精选注册表)",
|
||||
MessageId::CmdStashDescription => "暂存或恢复输入草稿(Ctrl+S 暂存,/stash list|pop)",
|
||||
MessageId::CmdStatuslineDescription => "配置底栏要显示哪些条目",
|
||||
MessageId::CmdSubagentsDescription => "列出子代理状态",
|
||||
MessageId::CmdSwarmDescription => {
|
||||
@@ -1545,6 +1554,9 @@ fn portuguese_brazil(id: MessageId) -> Option<&'static str> {
|
||||
MessageId::CmdSkillsDescription => {
|
||||
"Listar skills locais (ou --remote para navegar pelo registro curado)"
|
||||
}
|
||||
MessageId::CmdStashDescription => {
|
||||
"Estacionar ou restaurar rascunho do compositor (Ctrl+S estaciona, /stash list|pop)"
|
||||
}
|
||||
MessageId::CmdStatuslineDescription => "Configurar quais itens aparecem no rodapé",
|
||||
MessageId::CmdSubagentsDescription => "Listar o status dos sub-agentes",
|
||||
MessageId::CmdSwarmDescription => {
|
||||
|
||||
Reference in New Issue
Block a user