feat: add /catch-up and /debug guided commands to draft welcome

Replace the 'What changed recently' draft chip with /catch-up, a command
whose hidden prompt branches on git state: reconstruct intent from an
in-progress diff, check an open PR's review state, or summarize recent
commits.

Add /debug as a new draft chip and command: a guided root-cause
investigation that captures the symptom, forms hypotheses, checks them
against the code, and confirms the cause before proposing a fix.

Both follow the /workspace-review pattern — visible + hidden magic
prompts wired into command autocomplete, the submit handler, draft preset
chips, and the Magic Prompts settings page, with i18n across all locales.
This commit is contained in:
Bohdan Triapitsyn
2026-05-30 02:04:32 +03:00
parent 2b08a51946
commit d49ca7bc43
21 changed files with 237 additions and 18 deletions
+6 -2
View File
@@ -1421,9 +1421,9 @@ export const dict: Record<I18nKey, string> = {
'chat.emptyState.draftTitleWithProject': 'What are we working on in {project}?',
'chat.draftPresets.explore.label': 'Explore the codebase',
'chat.draftPresets.explore.prompt': 'Give me a high-level tour of this codebase — the architecture, the main modules, and how they fit together.',
'chat.draftPresets.changes.label': 'What changed recently',
'chat.draftPresets.changes.prompt': 'Summarize what changed recently — the latest commits and the current state of this branch.',
'chat.draftPresets.catchup.label': 'Catch me up',
'chat.draftPresets.plan.label': 'Start feature planning',
'chat.draftPresets.debug.label': 'Debug an issue',
'chat.draftPresets.review.label': 'Review my changes',
'chat.scrollToBottom.aria': '滚动到底部',
'chat.timeline.relative.justNow': '刚刚',
@@ -1486,6 +1486,8 @@ export const dict: Record<I18nKey, string> = {
'chat.commandAutocomplete.command.summaryDescription': '非破坏性会话总结。命令后可选填主题提示。',
'chat.commandAutocomplete.command.workspaceReviewDescription': '仅审查当前工作区中高价值的问题。',
'chat.commandAutocomplete.command.featurePlanDescription': '为新功能开始一次引导式的来回规划会话。',
'chat.commandAutocomplete.command.catchUpDescription': '重新进入上下文:你之前在做什么、从哪里继续。',
'chat.commandAutocomplete.command.debugDescription': '在提出修复方案前,引导式地排查 bug 的根本原因。',
'chat.commandAutocomplete.badge.skill': '技能',
'chat.commandAutocomplete.badge.command': '命令',
'chat.commandAutocomplete.badge.system': '系统',
@@ -1602,6 +1604,8 @@ export const dict: Record<I18nKey, string> = {
'chat.chatInput.toast.summaryFailed': '生成总结失败',
'chat.chatInput.toast.reviewFailed': '审查变更失败',
'chat.chatInput.toast.planFeatureFailed': '无法开始功能规划',
'chat.chatInput.toast.catchUpFailed': '无法获取上下文',
'chat.chatInput.toast.debugFailed': '无法开始调试',
'chat.chatInput.toast.attachmentsTooLarge': '附件过大,无法发送。请减少图片数量或大小。',
'chat.chatInput.toast.sendAttachmentsFailed': '发送附件失败。请尝试更少文件或更小图片。',
'chat.chatInput.toast.messageSendFailed': '消息发送失败,附件已恢复。',