feat: desktop draft welcome presets and /plan-feature command

Add starter preset chips under the composer on the desktop draft welcome
screen (explore, what changed, plan, review). Clicking a chip submits
immediately; prompt chips send a natural-language prompt, command chips
reuse built-in slash commands.

Add a new /plan-feature built-in command, modeled on /workspace-review:
visible + hidden magic prompts that run a guided, batched-question
planning dialogue (investigate the code, ask up to 3 clarifying
questions at a time, surface pitfalls, then produce an implementation
plan). Wired into command autocomplete, the submit handler, the draft
plan chip, 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 7f90ffb878
commit 2b08a51946
22 changed files with 214 additions and 2 deletions
@@ -1419,6 +1419,12 @@ export const dict: Record<I18nKey, string> = {
'chat.emptyState.startNewChat': '开始新的聊天',
'chat.emptyState.draftTitle': 'What are we working on?',
'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.plan.label': 'Start feature planning',
'chat.draftPresets.review.label': 'Review my changes',
'chat.scrollToBottom.aria': '滚动到底部',
'chat.timeline.relative.justNow': '刚刚',
'chat.timeline.relative.minutesAgo': '{count} 分钟前',
@@ -1479,6 +1485,7 @@ export const dict: Record<I18nKey, string> = {
'chat.commandAutocomplete.command.compactDescription': '使用 AI 压缩会话历史以减少上下文大小',
'chat.commandAutocomplete.command.summaryDescription': '非破坏性会话总结。命令后可选填主题提示。',
'chat.commandAutocomplete.command.workspaceReviewDescription': '仅审查当前工作区中高价值的问题。',
'chat.commandAutocomplete.command.featurePlanDescription': '为新功能开始一次引导式的来回规划会话。',
'chat.commandAutocomplete.badge.skill': '技能',
'chat.commandAutocomplete.badge.command': '命令',
'chat.commandAutocomplete.badge.system': '系统',
@@ -1594,6 +1601,7 @@ export const dict: Record<I18nKey, string> = {
'chat.chatInput.toast.compactFailed': '压缩会话失败',
'chat.chatInput.toast.summaryFailed': '生成总结失败',
'chat.chatInput.toast.reviewFailed': '审查变更失败',
'chat.chatInput.toast.planFeatureFailed': '无法开始功能规划',
'chat.chatInput.toast.attachmentsTooLarge': '附件过大,无法发送。请减少图片数量或大小。',
'chat.chatInput.toast.sendAttachmentsFailed': '发送附件失败。请尝试更少文件或更小图片。',
'chat.chatInput.toast.messageSendFailed': '消息发送失败,附件已恢复。',