From 2b08a51946e9a20135c4a47425037a116220278d Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Fri, 29 May 2026 02:41:46 +0300 Subject: [PATCH] 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. --- packages/ui/src/components/chat/ChatInput.tsx | 77 ++++++++++++++++++- .../components/chat/CommandAutocomplete.tsx | 8 ++ packages/ui/src/components/icon/sprite.ts | 2 +- .../magic-prompts/MagicPromptsPage.tsx | 8 ++ .../magic-prompts/MagicPromptsSidebar.tsx | 1 + .../ui/src/lib/i18n/messages/en.settings.ts | 3 + packages/ui/src/lib/i18n/messages/en.ts | 8 ++ .../ui/src/lib/i18n/messages/es.settings.ts | 3 + packages/ui/src/lib/i18n/messages/es.ts | 8 ++ .../ui/src/lib/i18n/messages/ko.settings.ts | 3 + packages/ui/src/lib/i18n/messages/ko.ts | 8 ++ .../ui/src/lib/i18n/messages/pl.settings.ts | 3 + packages/ui/src/lib/i18n/messages/pl.ts | 8 ++ .../src/lib/i18n/messages/pt-BR.settings.ts | 3 + packages/ui/src/lib/i18n/messages/pt-BR.ts | 8 ++ .../ui/src/lib/i18n/messages/uk.settings.ts | 3 + packages/ui/src/lib/i18n/messages/uk.ts | 8 ++ .../src/lib/i18n/messages/zh-CN.settings.ts | 3 + packages/ui/src/lib/i18n/messages/zh-CN.ts | 8 ++ .../src/lib/i18n/messages/zh-TW.settings.ts | 3 + packages/ui/src/lib/i18n/messages/zh-TW.ts | 8 ++ packages/ui/src/lib/magicPrompts.ts | 32 ++++++++ 22 files changed, 214 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index a537daa8..b5a7235b 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -52,6 +52,7 @@ import { useThemeSystem } from '@/contexts/useThemeSystem'; import { GitHubIssuePickerDialog } from '@/components/session/GitHubIssuePickerDialog'; import { GitHubPrPickerDialog } from '@/components/session/GitHubPrPickerDialog'; import { Icon } from "@/components/icon/Icon"; +import type { IconName } from "@/components/icon/icons"; import { useChatSearchDirectory } from '@/hooks/useChatSearchDirectory'; import { opencodeClient } from '@/lib/opencode/client'; import { useProjectsStore } from '@/stores/useProjectsStore'; @@ -66,6 +67,7 @@ import { buildSessionTargetOptions } from '@/sync/session-worktree-contract'; import { usePermissionStore } from '@/stores/permissionStore'; import { extractGitChangedFiles } from './changedFiles'; import { useI18n } from '@/lib/i18n'; +import type { I18nKey } from '@/lib/i18n'; import { fetchResponseStyleInstruction } from '@/lib/responseStyle'; import { wrapSystemReminder } from '@/lib/systemReminder'; import { getSyncMessages } from '@/sync/sync-refs'; @@ -86,6 +88,23 @@ import { } from './attachmentCitations'; import type { Message, Part } from '@opencode-ai/sdk/v2/client'; +// Starter presets shown under the composer on the desktop draft welcome screen. +// `promptKey` presets send a plain natural-language prompt; `command` presets +// send a built-in slash command (e.g. /workspace-review) through the normal submit path. +type DraftPreset = { + id: string; + icon: IconName; + labelKey: I18nKey; + promptKey?: I18nKey; + command?: string; +}; +const DRAFT_PRESETS: readonly DraftPreset[] = [ + { id: 'explore', icon: 'compass-3', labelKey: 'chat.draftPresets.explore.label', promptKey: 'chat.draftPresets.explore.prompt' }, + { id: 'changes', icon: 'git-branch', labelKey: 'chat.draftPresets.changes.label', promptKey: 'chat.draftPresets.changes.prompt' }, + { id: 'plan', icon: 'survey', labelKey: 'chat.draftPresets.plan.label', command: '/plan-feature' }, + { id: 'review', icon: 'search-eye', labelKey: 'chat.draftPresets.review.label', command: '/workspace-review' }, +]; + const MAX_VISIBLE_TEXTAREA_LINES = 8; const EMPTY_QUEUE: QueuedMessage[] = []; const EMPTY_MESSAGES: Message[] = []; @@ -1103,7 +1122,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo const availableSkills = useSkillsStore((s) => s.skills); const knownSlashNames = React.useMemo(() => { const names = new Set([ - 'init', 'review', 'undo', 'redo', 'timeline', 'compact', 'summary', 'workspace-review', + 'init', 'review', 'undo', 'redo', 'timeline', 'compact', 'summary', 'workspace-review', 'plan-feature', ]); for (const command of availableCommands) names.add(command.name.toLowerCase()); for (const skill of availableSkills) names.add(skill.name.toLowerCase()); @@ -1931,6 +1950,28 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo } return; } + else if (commandName === 'plan-feature' && (currentSessionId || newSessionDraftOpen)) { + try { + await sessionActions.waitForConnectionOrThrow(); + const visibleText = await renderMagicPrompt('session.plan.visible'); + const instructionsText = await renderMagicPrompt('session.plan.instructions'); + await sendMessage( + visibleText, + providerIdToSend, + modelIdToSend, + agentNameToSend, + [], + agentMentionName, + [{ text: instructionsText, synthetic: true }], + variantToSend, + inputMode, + ); + scrollToBottom?.(); + } catch (error) { + toast.error(error instanceof Error ? error.message : t('chat.chatInput.toast.planFeatureFailed')); + } + return; + } } const currentSessionDirectory = currentSessionId @@ -2054,6 +2095,18 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo } }, [inputMode, getCurrentInputSnapshot, currentSessionId, sessionPhase, queueModeEnabled, handleQueueMessage]); + // Draft welcome presets: populate the composer and submit immediately. + // getCurrentInputSnapshot reads textareaRef.current.value first, so setting it + // synchronously lets handleSubmit pick up the preset text in the same tick. + const submitPresetPrompt = React.useCallback((text: string) => { + const textarea = textareaRef.current; + if (textarea) { + textarea.value = text; + } + setMessage(text); + void handleSubmitRef.current(); + }, []); + const handleKeyDown = (e: React.KeyboardEvent) => { // Early return during IME composition to prevent interference with autocomplete. // Uses keyCode === 229 fallback for WebKit where compositionend fires before keydown. @@ -4401,6 +4454,28 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo {isMobile && } + {newSessionDraftOpen && !isDesktopExpanded && !isMobile && !isVSCode && !isMiniChatSurface ? ( +
+ {DRAFT_PRESETS.map((preset) => ( + + ))} +
+ ) : null} {/* Issue Picker Dialog */} diff --git a/packages/ui/src/components/chat/CommandAutocomplete.tsx b/packages/ui/src/components/chat/CommandAutocomplete.tsx index ea14d3fe..d7a89077 100644 --- a/packages/ui/src/components/chat/CommandAutocomplete.tsx +++ b/packages/ui/src/components/chat/CommandAutocomplete.tsx @@ -152,6 +152,10 @@ export const CommandAutocomplete = React.forwardRef`, "code-sslash": ``, "command": ``, + "compass-3": ``, "computer": ``, "contract-up-down": ``, "corner-down-left": ``, @@ -156,7 +157,6 @@ export const iconSpriteData = { "menu-2": ``, "menu-fold-2": ``, "menu-search": ``, - "message-2": ``, "mic": ``, "mic-off": ``, "more-2-fill": ``, diff --git a/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx b/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx index 9de644c7..462e126f 100644 --- a/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx +++ b/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx @@ -140,6 +140,14 @@ const PROMPT_PAGE_MAP: Record = { { id: 'session.review.instructions', titleKey: 'settings.magicPrompts.page.block.instructions' }, ], }, + 'session.plan': { + titleKey: 'settings.magicPrompts.page.group.sessionFeaturePlan.title', + descriptionKey: 'settings.magicPrompts.page.group.sessionFeaturePlan.description', + blocks: [ + { id: 'session.plan.visible', titleKey: 'settings.magicPrompts.page.block.visiblePrompt' }, + { id: 'session.plan.instructions', titleKey: 'settings.magicPrompts.page.block.instructions' }, + ], + }, 'session.fusion': { titleKey: 'settings.magicPrompts.page.group.sessionFusion.title', descriptionKey: 'settings.magicPrompts.page.group.sessionFusion.description', diff --git a/packages/ui/src/components/sections/magic-prompts/MagicPromptsSidebar.tsx b/packages/ui/src/components/sections/magic-prompts/MagicPromptsSidebar.tsx index 486c9863..60aaec68 100644 --- a/packages/ui/src/components/sections/magic-prompts/MagicPromptsSidebar.tsx +++ b/packages/ui/src/components/sections/magic-prompts/MagicPromptsSidebar.tsx @@ -47,6 +47,7 @@ export const MagicPromptsSidebar: React.FC = ({ onItem items: [ { id: 'session.summary', titleKey: 'settings.magicPrompts.sidebar.item.sessionSummary' }, { id: 'session.review', titleKey: 'settings.magicPrompts.sidebar.item.sessionWorkspaceReview' }, + { id: 'session.plan', titleKey: 'settings.magicPrompts.sidebar.item.sessionFeaturePlan' }, { id: 'session.fusion', titleKey: 'settings.magicPrompts.sidebar.item.sessionFusion' }, ], }, diff --git a/packages/ui/src/lib/i18n/messages/en.settings.ts b/packages/ui/src/lib/i18n/messages/en.settings.ts index 5c12dc1a..1e547dd8 100644 --- a/packages/ui/src/lib/i18n/messages/en.settings.ts +++ b/packages/ui/src/lib/i18n/messages/en.settings.ts @@ -223,6 +223,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.planImplement': 'Implement Plan', 'settings.magicPrompts.sidebar.item.sessionSummary': 'Session Summary', 'settings.magicPrompts.sidebar.item.sessionWorkspaceReview': 'Workspace Review', + 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': 'Feature Planning', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.remoteInstances.sidebar.title': 'Remote Instances', 'settings.remoteInstances.sidebar.total': 'Total {count}', @@ -1686,6 +1687,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionSummary.description': 'Prompts used by the /summary slash command: visible user message + hidden instructions. Non-destructive - does not compact session history.', 'settings.magicPrompts.page.group.sessionWorkspaceReview.title': 'Workspace Review', 'settings.magicPrompts.page.group.sessionWorkspaceReview.description': 'Prompts used by the /workspace-review slash command: visible user message + hidden instructions. Reviews current workspace changes for high-signal issues only.', + 'settings.magicPrompts.page.group.sessionFeaturePlan.title': 'Feature Planning', + 'settings.magicPrompts.page.group.sessionFeaturePlan.description': 'Prompts used by the /plan-feature slash command: visible user message + hidden instructions. Runs a guided dialogue that researches the code and asks clarifying questions in small batches before producing an implementation plan.', 'settings.magicPrompts.page.group.sessionFusion.title': 'Fusion', 'settings.magicPrompts.page.group.sessionFusion.description': 'Prompts used when combining multi-run outputs into one final answer: visible user message + hidden instructions before source results.', 'settings.magicPrompts.page.actions.resetting': 'Resetting...', diff --git a/packages/ui/src/lib/i18n/messages/en.ts b/packages/ui/src/lib/i18n/messages/en.ts index da6743a8..dd4e3115 100644 --- a/packages/ui/src/lib/i18n/messages/en.ts +++ b/packages/ui/src/lib/i18n/messages/en.ts @@ -1453,6 +1453,12 @@ export const dict = { 'chat.emptyState.startNewChat': 'Start a new chat', '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': 'Scroll to bottom', 'chat.timeline.relative.justNow': 'just now', 'chat.timeline.relative.minutesAgo': '{count}m ago', @@ -1513,6 +1519,7 @@ export const dict = { 'chat.commandAutocomplete.command.compactDescription': 'Compress session history using AI to reduce context size', 'chat.commandAutocomplete.command.summaryDescription': 'Non-destructive session summary. Optional topic hint after the command.', 'chat.commandAutocomplete.command.workspaceReviewDescription': 'Review current workspace changes for high-signal issues only.', + 'chat.commandAutocomplete.command.featurePlanDescription': 'Start a guided, back-and-forth planning session for a new feature.', 'chat.commandAutocomplete.badge.skill': 'skill', 'chat.commandAutocomplete.badge.command': 'command', 'chat.commandAutocomplete.badge.system': 'system', @@ -1628,6 +1635,7 @@ export const dict = { 'chat.chatInput.toast.compactFailed': 'Failed to compact session', 'chat.chatInput.toast.summaryFailed': 'Failed to generate summary', 'chat.chatInput.toast.reviewFailed': 'Failed to review changes', + 'chat.chatInput.toast.planFeatureFailed': 'Failed to start feature planning', 'chat.chatInput.toast.attachmentsTooLarge': 'Attachments are too large to send. Please try reducing the number or size of images.', 'chat.chatInput.toast.sendAttachmentsFailed': 'Failed to send attachments. Try fewer files or smaller images.', 'chat.chatInput.toast.messageSendFailed': 'Message failed to send. Attachments restored.', diff --git a/packages/ui/src/lib/i18n/messages/es.settings.ts b/packages/ui/src/lib/i18n/messages/es.settings.ts index 7712375b..f55f6d36 100644 --- a/packages/ui/src/lib/i18n/messages/es.settings.ts +++ b/packages/ui/src/lib/i18n/messages/es.settings.ts @@ -190,6 +190,7 @@ export const settingsDict = { "settings.magicPrompts.sidebar.item.planImplement": "Implementar plan", "settings.magicPrompts.sidebar.item.sessionSummary": "Resumen de sesión", "settings.magicPrompts.sidebar.item.sessionWorkspaceReview": "Revisión del espacio de trabajo", + "settings.magicPrompts.sidebar.item.sessionFeaturePlan": "Planificación de funciones", "settings.magicPrompts.sidebar.item.sessionFusion": "Fusion", "settings.remoteInstances.sidebar.title": "Instancias remotas", "settings.remoteInstances.sidebar.total": "Total {count}", @@ -1653,6 +1654,8 @@ export const settingsDict = { "settings.magicPrompts.page.group.sessionSummary.description": "Prompts usados por el comando /summary: mensaje visible del usuario + instrucciones ocultas. No destructivo: no compacta el historial de la sesión.", "settings.magicPrompts.page.group.sessionWorkspaceReview.title": "Revisión del espacio de trabajo", "settings.magicPrompts.page.group.sessionWorkspaceReview.description": "Prompts usados por el comando /workspace-review: mensaje visible del usuario + instrucciones ocultas. Revisa los cambios actuales del espacio de trabajo solo para problemas de alta señal.", + "settings.magicPrompts.page.group.sessionFeaturePlan.title": "Planificación de funciones", + "settings.magicPrompts.page.group.sessionFeaturePlan.description": "Prompts usados por el comando /plan-feature: mensaje visible del usuario + instrucciones ocultas. Ejecuta un diálogo guiado que investiga el código y hace preguntas aclaratorias en lotes pequeños antes de producir un plan de implementación.", "settings.magicPrompts.page.group.sessionFusion.title": "Fusion", "settings.magicPrompts.page.group.sessionFusion.description": "Prompts usados para combinar salidas de multi-run en una respuesta final: mensaje visible del usuario + instrucciones ocultas antes de los resultados fuente.", "settings.magicPrompts.page.actions.resetting": "Restableciendo...", diff --git a/packages/ui/src/lib/i18n/messages/es.ts b/packages/ui/src/lib/i18n/messages/es.ts index defa7eef..50ca02bf 100644 --- a/packages/ui/src/lib/i18n/messages/es.ts +++ b/packages/ui/src/lib/i18n/messages/es.ts @@ -1419,6 +1419,12 @@ export const dict: Record = { "chat.emptyState.startNewChat": "Iniciar una nueva conversación", "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": "Ir al final", "chat.timeline.relative.justNow": "ahora mismo", "chat.timeline.relative.minutesAgo": "hace {count}m", @@ -1479,6 +1485,7 @@ export const dict: Record = { "chat.commandAutocomplete.command.compactDescription": "Comprimir el historial de la sesión usando IA para reducir el tamaño del contexto", "chat.commandAutocomplete.command.summaryDescription": "Resumen no destructivo de la sesión. Pista opcional del tema después del comando.", "chat.commandAutocomplete.command.workspaceReviewDescription": "Revisar los cambios actuales del espacio de trabajo solo para problemas de alto impacto.", + "chat.commandAutocomplete.command.featurePlanDescription": "Inicia una sesión de planificación guiada e interactiva para una nueva función.", "chat.commandAutocomplete.badge.skill": "habilidad", "chat.commandAutocomplete.badge.command": "comando", "chat.commandAutocomplete.badge.system": "sistema", @@ -1594,6 +1601,7 @@ export const dict: Record = { "chat.chatInput.toast.compactFailed": "No se pudo comprimir la sesión", "chat.chatInput.toast.summaryFailed": "No se pudo generar el resumen", "chat.chatInput.toast.reviewFailed": "No se pudieron revisar los cambios", + "chat.chatInput.toast.planFeatureFailed": "No se pudo iniciar la planificación de la función", "chat.chatInput.toast.attachmentsTooLarge": "Los adjuntos son demasiado grandes para enviar. Intenta reducir la cantidad o el tamaño de las imágenes.", "chat.chatInput.toast.sendAttachmentsFailed": "No se pudieron enviar los adjuntos. Intenta con menos archivos o imágenes más pequeñas.", "chat.chatInput.toast.messageSendFailed": "El mensaje no se pudo enviar. Los adjuntos se restauraron.", diff --git a/packages/ui/src/lib/i18n/messages/ko.settings.ts b/packages/ui/src/lib/i18n/messages/ko.settings.ts index c2dfa825..ce10f184 100644 --- a/packages/ui/src/lib/i18n/messages/ko.settings.ts +++ b/packages/ui/src/lib/i18n/messages/ko.settings.ts @@ -190,6 +190,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.planImplement': '계획 구현', 'settings.magicPrompts.sidebar.item.sessionSummary': '세션 요약', 'settings.magicPrompts.sidebar.item.sessionWorkspaceReview': '워크스페이스 리뷰', + 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': '기능 계획', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.remoteInstances.sidebar.title': '원격 인스턴스', 'settings.remoteInstances.sidebar.total': '총 {count}개', @@ -1653,6 +1654,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionSummary.description': '/summary slash command에서 사용하는 프롬프트입니다: 표시 사용자 메시지 + 숨겨진 지침. 비파괴적이며 세션 기록을 압축하지 않습니다.', 'settings.magicPrompts.page.group.sessionWorkspaceReview.title': '워크스페이스 리뷰', 'settings.magicPrompts.page.group.sessionWorkspaceReview.description': '/workspace-review slash command에서 사용하는 프롬프트입니다: 표시 사용자 메시지 + 숨겨진 지침. 현재 workspace 변경 사항에서 중요한 문제만 리뷰합니다.', + 'settings.magicPrompts.page.group.sessionFeaturePlan.title': '기능 계획', + 'settings.magicPrompts.page.group.sessionFeaturePlan.description': '/plan-feature slash command에서 사용하는 프롬프트입니다: 표시 사용자 메시지 + 숨겨진 지침. 코드를 조사하고 작은 묶음으로 명확화 질문을 한 뒤 구현 계획을 만드는 가이드 대화를 실행합니다.', 'settings.magicPrompts.page.group.sessionFusion.title': 'Fusion', 'settings.magicPrompts.page.group.sessionFusion.description': 'multi-run 출력을 하나의 최종 답변으로 결합할 때 사용하는 프롬프트입니다: 보이는 사용자 메시지 + 소스 결과 앞의 숨겨진 지침.', 'settings.magicPrompts.page.actions.resetting': '초기화 중...', diff --git a/packages/ui/src/lib/i18n/messages/ko.ts b/packages/ui/src/lib/i18n/messages/ko.ts index ce23f8d6..536222b1 100644 --- a/packages/ui/src/lib/i18n/messages/ko.ts +++ b/packages/ui/src/lib/i18n/messages/ko.ts @@ -1455,6 +1455,12 @@ export const dict: Record = { '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}분 전', @@ -1515,6 +1521,7 @@ export const dict: Record = { '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': 'system', @@ -1628,6 +1635,7 @@ export const dict: Record = { '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': '메시지 전송에 실패했습니다. 첨부 파일을 복원했습니다.', diff --git a/packages/ui/src/lib/i18n/messages/pl.settings.ts b/packages/ui/src/lib/i18n/messages/pl.settings.ts index e713698c..ec3fa0b4 100644 --- a/packages/ui/src/lib/i18n/messages/pl.settings.ts +++ b/packages/ui/src/lib/i18n/messages/pl.settings.ts @@ -279,6 +279,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionSummary.description': 'Prompty używane przez polecenie /summary: widoczna wiadomość użytkownika + ukryte instrukcje. Niedestrukcyjne – nie kompaktuje historii sesji.', 'settings.magicPrompts.page.group.sessionSummary.title': 'Podsumowanie Sesji', 'settings.magicPrompts.page.group.sessionWorkspaceReview.description': 'Prompty używane przez polecenie /workspace-review: widoczna wiadomość użytkownika + ukryte instrukcje. Przegląda zmiany w bieżącym obszarze roboczym tylko pod kątem istotnych problemów.', + 'settings.magicPrompts.page.group.sessionFeaturePlan.title': 'Planowanie funkcji', + 'settings.magicPrompts.page.group.sessionFeaturePlan.description': 'Prompty używane przez polecenie /plan-feature: widoczna wiadomość użytkownika + ukryte instrukcje. Uruchamia prowadzony dialog, który bada kod i zadaje pytania doprecyzowujące w małych partiach przed utworzeniem planu implementacji.', 'settings.magicPrompts.page.group.sessionWorkspaceReview.title': 'Przegląd obszaru roboczego', 'settings.magicPrompts.page.group.sessionFusion.title': 'Fusion', 'settings.magicPrompts.page.group.sessionFusion.description': 'Prompty używane do łączenia wyników multi-run w jedną końcową odpowiedź: widoczna wiadomość użytkownika + ukryte instrukcje przed wynikami źródłowymi.', @@ -316,6 +318,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.planTodo': 'Planowanie Todo', 'settings.magicPrompts.sidebar.item.sessionSummary': 'Podsumowanie Sesji', 'settings.magicPrompts.sidebar.item.sessionWorkspaceReview': 'Przegląd obszaru roboczego', + 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': 'Planowanie funkcji', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.magicPrompts.sidebar.title': 'Magiczne Prompty', 'settings.mcp.page.actions.authorize': 'Autoryzuj', diff --git a/packages/ui/src/lib/i18n/messages/pl.ts b/packages/ui/src/lib/i18n/messages/pl.ts index 892ac1b3..52c06874 100644 --- a/packages/ui/src/lib/i18n/messages/pl.ts +++ b/packages/ui/src/lib/i18n/messages/pl.ts @@ -445,6 +445,12 @@ export const dict: Record = { 'chat.emptyState.startNewChat': 'Rozpocznij nowy czat', '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': 'Przewiń na dół', 'chat.timeline.relative.justNow': 'przed chwilą', 'chat.timeline.relative.minutesAgo': '{count}m temu', @@ -504,6 +510,7 @@ export const dict: Record = { 'chat.commandAutocomplete.command.compactDescription': 'Skompresuj historię sesji używając AI aby zredukować rozmiar kontekstu', 'chat.commandAutocomplete.command.summaryDescription': 'Niedestrukcyjne podsumowanie sesji. Opcjonalna wskazówka tematu po poleceniu.', 'chat.commandAutocomplete.command.workspaceReviewDescription': 'Recenzja obecnych zmian w przestrzeni roboczej tylko dla problemów o wysokim sygnale.', + 'chat.commandAutocomplete.command.featurePlanDescription': 'Rozpocznij prowadzoną, interaktywną sesję planowania nowej funkcji.', 'chat.commandAutocomplete.badge.skill': 'skill', 'chat.commandAutocomplete.badge.command': 'polecenie', 'chat.commandAutocomplete.badge.system': 'system', @@ -909,6 +916,7 @@ export const dict: Record = { 'chat.chatInput.toast.messageSendFailed': 'Nie udało się wysłać wiadomości. Załączniki zostały przywrócone.', 'chat.chatInput.toast.openSessionFirst': 'Najpierw otwórz sesję', 'chat.chatInput.toast.reviewFailed': 'Nie udało się przejrzeć zmian', + 'chat.chatInput.toast.planFeatureFailed': 'Nie udało się rozpocząć planowania funkcji', 'chat.chatInput.toast.sendAttachmentsFailed': 'Nie udało się wysłać załączników. Spróbuj użyć mniejszej liczby plików lub mniejszych obrazów.', 'chat.chatInput.toast.someFilesSkipped': 'Pominięto niektóre pliki:\n{summary}', 'chat.chatInput.toast.summaryFailed': 'Nie udało się wygenerować podsumowania', diff --git a/packages/ui/src/lib/i18n/messages/pt-BR.settings.ts b/packages/ui/src/lib/i18n/messages/pt-BR.settings.ts index 972e62d1..6fdaf2a4 100644 --- a/packages/ui/src/lib/i18n/messages/pt-BR.settings.ts +++ b/packages/ui/src/lib/i18n/messages/pt-BR.settings.ts @@ -190,6 +190,7 @@ export const settingsDict = { "settings.magicPrompts.sidebar.item.planImplement": "Implementar plano", "settings.magicPrompts.sidebar.item.sessionSummary": "Resumo de sessão", "settings.magicPrompts.sidebar.item.sessionWorkspaceReview": "Revisão do workspace", + "settings.magicPrompts.sidebar.item.sessionFeaturePlan": "Planejamento de funcionalidade", "settings.magicPrompts.sidebar.item.sessionFusion": "Fusion", "settings.remoteInstances.sidebar.title": "Instâncias remotas", "settings.remoteInstances.sidebar.total": "Total {count}", @@ -1653,6 +1654,8 @@ export const settingsDict = { "settings.magicPrompts.page.group.sessionSummary.description": "Prompts usados pelo comando /summary: mensagem visível do usuário + instruções ocultas. Não destrutivo: não compacta o histórico da sessão.", "settings.magicPrompts.page.group.sessionWorkspaceReview.title": "Revisão do workspace", "settings.magicPrompts.page.group.sessionWorkspaceReview.description": "Prompts usados pelo comando /workspace-review: mensagem visível do usuário + instruções ocultas. Revise apenas problemas importantes nas alterações atuais do workspace.", + "settings.magicPrompts.page.group.sessionFeaturePlan.title": "Planejamento de funcionalidade", + "settings.magicPrompts.page.group.sessionFeaturePlan.description": "Prompts usados pelo comando /plan-feature: mensagem visível do usuário + instruções ocultas. Executa um diálogo guiado que investiga o código e faz perguntas de esclarecimento em pequenos lotes antes de produzir um plano de implementação.", "settings.magicPrompts.page.group.sessionFusion.title": "Fusion", "settings.magicPrompts.page.group.sessionFusion.description": "Prompts usados para combinar saídas de multi-run em uma resposta final: mensagem visível do usuário + instruções ocultas antes dos resultados de origem.", "settings.magicPrompts.page.actions.resetting": "Redefinindo...", diff --git a/packages/ui/src/lib/i18n/messages/pt-BR.ts b/packages/ui/src/lib/i18n/messages/pt-BR.ts index 769fafbb..9929f44f 100644 --- a/packages/ui/src/lib/i18n/messages/pt-BR.ts +++ b/packages/ui/src/lib/i18n/messages/pt-BR.ts @@ -1419,6 +1419,12 @@ export const dict: Record = { "chat.emptyState.startNewChat": "Iniciar uma nova conversa", "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": "Ir ao final", "chat.timeline.relative.justNow": "agora mesmo", "chat.timeline.relative.minutesAgo": "há {count}m", @@ -1479,6 +1485,7 @@ export const dict: Record = { "chat.commandAutocomplete.command.compactDescription": "Comprimir o histórico da sessão usando IA para reduzir o tamanho do contexto", "chat.commandAutocomplete.command.summaryDescription": "Resumo não destrutivo da sessão. Dica opcional do tema após o comando.", "chat.commandAutocomplete.command.workspaceReviewDescription": "Revisar as alterações atuais do workspace apenas para problemas de alto impacto.", + "chat.commandAutocomplete.command.featurePlanDescription": "Inicie uma sessão de planejamento guiada e interativa para uma nova funcionalidade.", "chat.commandAutocomplete.badge.skill": "habilidade", "chat.commandAutocomplete.badge.command": "comando", "chat.commandAutocomplete.badge.system": "sistema", @@ -1594,6 +1601,7 @@ export const dict: Record = { "chat.chatInput.toast.compactFailed": "Não foi possível comprimir a sessão", "chat.chatInput.toast.summaryFailed": "Não foi possível gerar o resumo", "chat.chatInput.toast.reviewFailed": "Não foi possível revisar as alterações", + "chat.chatInput.toast.planFeatureFailed": "Não foi possível iniciar o planejamento da funcionalidade", "chat.chatInput.toast.attachmentsTooLarge": "Os anexos são grandes demais para enviar. Tente reduzir a quantidade ou o tamanho das imagens.", "chat.chatInput.toast.sendAttachmentsFailed": "Não foi possível enviar os anexos. Tente com menos arquivos ou imagens menores.", "chat.chatInput.toast.messageSendFailed": "A mensagem não pôde ser enviada. Os anexos foram restaurados.", diff --git a/packages/ui/src/lib/i18n/messages/uk.settings.ts b/packages/ui/src/lib/i18n/messages/uk.settings.ts index d71a5eec..93e69cc1 100644 --- a/packages/ui/src/lib/i18n/messages/uk.settings.ts +++ b/packages/ui/src/lib/i18n/messages/uk.settings.ts @@ -190,6 +190,7 @@ export const settingsDict = { "settings.magicPrompts.sidebar.item.planImplement": "Реалізувати план", "settings.magicPrompts.sidebar.item.sessionSummary": "Підсумок сесії", "settings.magicPrompts.sidebar.item.sessionWorkspaceReview": "Огляд робочого простору", + "settings.magicPrompts.sidebar.item.sessionFeaturePlan": "Планування фічі", "settings.magicPrompts.sidebar.item.sessionFusion": "Fusion", "settings.remoteInstances.sidebar.title": "Віддалені інстанси", "settings.remoteInstances.sidebar.total": "Усього {count}", @@ -1653,6 +1654,8 @@ export const settingsDict = { "settings.magicPrompts.page.group.sessionSummary.description": "Промпти, які використовуються командою /summary: видиме повідомлення користувача + приховані інструкції. Неруйнівний – не стискає історію сесії.", "settings.magicPrompts.page.group.sessionWorkspaceReview.title": "Огляд робочого простору", "settings.magicPrompts.page.group.sessionWorkspaceReview.description": "Промпти, які використовуються командою /workspace-review: видиме повідомлення користувача + приховані інструкції. Переглядає поточні зміни робочого простору лише для проблем із сильним сигналом.", + "settings.magicPrompts.page.group.sessionFeaturePlan.title": "Планування фічі", + "settings.magicPrompts.page.group.sessionFeaturePlan.description": "Промпти, які використовуються командою /plan-feature: видиме повідомлення користувача + приховані інструкції. Запускає кероване діалогове планування — досліджує код і ставить уточнюючі запитання невеликими батчами, перш ніж скласти план імплементації.", "settings.magicPrompts.page.group.sessionFusion.title": "Fusion", "settings.magicPrompts.page.group.sessionFusion.description": "Промпти для обʼєднання результатів multi-run в одну фінальну відповідь: видиме повідомлення користувача + приховані інструкції перед результатами джерел.", "settings.magicPrompts.page.actions.resetting": "Скидання...", diff --git a/packages/ui/src/lib/i18n/messages/uk.ts b/packages/ui/src/lib/i18n/messages/uk.ts index 9f37995d..e91fd972 100644 --- a/packages/ui/src/lib/i18n/messages/uk.ts +++ b/packages/ui/src/lib/i18n/messages/uk.ts @@ -1419,6 +1419,12 @@ export const dict: Record = { "chat.emptyState.startNewChat": "Почніть новий чат", "chat.emptyState.draftTitle": "Над чим працюємо?", "chat.emptyState.draftTitleWithProject": "Над чим працюємо в {project}?", + "chat.draftPresets.explore.label": "Огляд кодової бази", + "chat.draftPresets.explore.prompt": "Зроби високорівневий огляд цієї кодової бази — архітектуру, основні модулі та як вони пов'язані між собою.", + "chat.draftPresets.changes.label": "Що нещодавно змінилось", + "chat.draftPresets.changes.prompt": "Підсумуй, що нещодавно змінилось — останні коміти та поточний стан цієї гілки.", + "chat.draftPresets.plan.label": "Розпочати планування фічі", + "chat.draftPresets.review.label": "Переглянути мої зміни", "chat.scrollToBottom.aria": "Прокрутити вниз", "chat.timeline.relative.justNow": "щойно", "chat.timeline.relative.minutesAgo": "{count} хв тому", @@ -1479,6 +1485,7 @@ export const dict: Record = { "chat.commandAutocomplete.command.compactDescription": "Стиснути історію сесії за допомогою ШІ, щоб зменшити розмір контексту", "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 = { "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": "Не вдалося надіслати повідомлення. Вкладення відновлено.", diff --git a/packages/ui/src/lib/i18n/messages/zh-CN.settings.ts b/packages/ui/src/lib/i18n/messages/zh-CN.settings.ts index 072c699b..985e1c82 100644 --- a/packages/ui/src/lib/i18n/messages/zh-CN.settings.ts +++ b/packages/ui/src/lib/i18n/messages/zh-CN.settings.ts @@ -190,6 +190,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.planImplement': '执行计划', 'settings.magicPrompts.sidebar.item.sessionSummary': '会话总结', 'settings.magicPrompts.sidebar.item.sessionWorkspaceReview': '工作区审查', + 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': '功能规划', 'settings.magicPrompts.sidebar.item.sessionFusion': '融合', 'settings.remoteInstances.sidebar.title': '远程实例', 'settings.remoteInstances.sidebar.total': '总计 {count}', @@ -1653,6 +1654,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionSummary.description': '由 /summary 斜杠命令使用的提示词:可见用户消息 + 隐藏说明。非破坏性,不会压缩会话历史。', 'settings.magicPrompts.page.group.sessionWorkspaceReview.title': '工作区审查', 'settings.magicPrompts.page.group.sessionWorkspaceReview.description': '由 /workspace-review 斜杠命令使用的提示词:可见用户消息 + 隐藏说明。仅审查当前工作区的高信号问题。', + 'settings.magicPrompts.page.group.sessionFeaturePlan.title': '功能规划', + 'settings.magicPrompts.page.group.sessionFeaturePlan.description': '由 /plan-feature 斜杠命令使用的提示词:可见用户消息 + 隐藏说明。运行引导式对话,先调研代码并分小批提出澄清问题,然后生成实现计划。', 'settings.magicPrompts.page.group.sessionFusion.title': '融合', 'settings.magicPrompts.page.group.sessionFusion.description': '用于将多运行输出融合为一个最终答案的提示词:可见用户消息 + 源结果前的隐藏说明。', 'settings.magicPrompts.page.actions.resetting': '重置中...', diff --git a/packages/ui/src/lib/i18n/messages/zh-CN.ts b/packages/ui/src/lib/i18n/messages/zh-CN.ts index c5da5aaa..0691bb87 100644 --- a/packages/ui/src/lib/i18n/messages/zh-CN.ts +++ b/packages/ui/src/lib/i18n/messages/zh-CN.ts @@ -1419,6 +1419,12 @@ export const dict: Record = { '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 = { '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 = { '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': '消息发送失败,附件已恢复。', diff --git a/packages/ui/src/lib/i18n/messages/zh-TW.settings.ts b/packages/ui/src/lib/i18n/messages/zh-TW.settings.ts index 546852e7..39cdf2f3 100644 --- a/packages/ui/src/lib/i18n/messages/zh-TW.settings.ts +++ b/packages/ui/src/lib/i18n/messages/zh-TW.settings.ts @@ -187,6 +187,7 @@ 'settings.magicPrompts.sidebar.item.planImplement': '執行計畫', 'settings.magicPrompts.sidebar.item.sessionSummary': '工作階段總結', 'settings.magicPrompts.sidebar.item.sessionWorkspaceReview': '工作區審查', + 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': '功能規劃', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.remoteInstances.sidebar.title': '遠端執行個體', 'settings.remoteInstances.sidebar.total': '總計 {count}', @@ -1574,6 +1575,8 @@ 'settings.magicPrompts.page.group.sessionSummary.description': '由 /summary 斜線命令使用的提示詞:可見使用者訊息 + 隱藏說明。非破壞性,不會壓縮工作階段歷史。', 'settings.magicPrompts.page.group.sessionWorkspaceReview.title': '工作區審查', 'settings.magicPrompts.page.group.sessionWorkspaceReview.description': '由 /workspace-review 斜線命令使用的提示詞:可見使用者訊息 + 隱藏說明。僅審查目前工作區中的高訊號問題。', + 'settings.magicPrompts.page.group.sessionFeaturePlan.title': '功能規劃', + 'settings.magicPrompts.page.group.sessionFeaturePlan.description': '由 /plan-feature 斜線命令使用的提示詞:可見使用者訊息 + 隱藏說明。執行引導式對話,先調研程式碼並分小批提出釐清問題,然後產生實作計畫。', 'settings.magicPrompts.page.group.sessionFusion.title': 'Fusion', 'settings.magicPrompts.page.group.sessionFusion.description': '用於將 multi-run 輸出合併為一個最終答案的提示詞:可見使用者訊息 + 結果前的隱藏說明。', 'settings.magicPrompts.page.actions.resetting': '重設中...', diff --git a/packages/ui/src/lib/i18n/messages/zh-TW.ts b/packages/ui/src/lib/i18n/messages/zh-TW.ts index cc9b104a..53e12ccd 100644 --- a/packages/ui/src/lib/i18n/messages/zh-TW.ts +++ b/packages/ui/src/lib/i18n/messages/zh-TW.ts @@ -1416,6 +1416,12 @@ export const dict: Record = { '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} 分鐘前', @@ -1476,6 +1482,7 @@ export const dict: Record = { 'chat.commandAutocomplete.command.compactDescription': '使用 AI 壓縮會話歷史以減少上下文大小', 'chat.commandAutocomplete.command.summaryDescription': '非破壞性會話總結。命令後可選填主題提示。', 'chat.commandAutocomplete.command.workspaceReviewDescription': '僅審查目前工作區中高價值的問題。', + 'chat.commandAutocomplete.command.featurePlanDescription': '為新功能開始一次引導式的來回規劃工作階段。', 'chat.commandAutocomplete.badge.skill': 'Skills', 'chat.commandAutocomplete.badge.command': '命令', 'chat.commandAutocomplete.badge.system': '系統', @@ -1591,6 +1598,7 @@ export const dict: Record = { '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': '訊息傳送失敗,附件已恢復。', diff --git a/packages/ui/src/lib/magicPrompts.ts b/packages/ui/src/lib/magicPrompts.ts index d0189436..47caf2af 100644 --- a/packages/ui/src/lib/magicPrompts.ts +++ b/packages/ui/src/lib/magicPrompts.ts @@ -27,6 +27,8 @@ export type MagicPromptId = | 'session.summary.instructions' | 'session.review.visible' | 'session.review.instructions' + | 'session.plan.visible' + | 'session.plan.instructions' | 'session.fusion.visible' | 'session.fusion.instructions'; @@ -571,6 +573,36 @@ Output: - category: bug or rule violation Keep the review concise and practical.`, + }, + { + id: 'session.plan.visible', + title: 'Feature Planning Visible Prompt', + group: 'Session', + description: 'Visible user message sent by the /plan-feature command.', + template: 'I want to start planning a feature.', + }, + { + id: 'session.plan.instructions', + title: 'Feature Planning Instructions', + group: 'Session', + description: 'Hidden instructions attached to the /plan-feature command. Runs a guided, batched-question dialogue that researches the code before producing an implementation plan.', + template: `The user wants to plan a feature through a guided, back-and-forth conversation. They will describe an idea — often briefly and informally. Your job is to turn that idea into a concrete, validated implementation plan, without guessing. + +Run this as a dialogue, not a one-shot answer. + +1. Understand before asking. Once the user describes the idea, first investigate the codebase yourself — read the relevant files, existing patterns, data flow, and constraints. Ground every question in what the code actually shows, not in assumptions. + +2. Ask in small batches. Ask at most 3 clarifying questions at a time — a number a person can comfortably answer in one reply. Prefer concrete, decision-oriented questions (option A/B/C, edge cases, scope boundaries) over vague open-ended ones. Number them. + +3. Keep going until it is resolved. After each batch of answers, integrate them, do any further code investigation the answers require, then ask the next batch. Continue until there are no unresolved decisions or implementation details left. Do not stop early or start summarizing prematurely. + +4. Surface what the user has not considered. Proactively raise edge cases, pitfalls, affected modules, migration/backward-compatibility concerns, and trade-offs the user likely did not think about. Fold these into your questions so the user decides — never silently decide for them. + +5. Do not write code or begin implementing during this phase. Planning is for understanding and deciding only. + +6. When everything is settled, produce the final implementation plan: a clear, ordered breakdown of the work, the files and areas affected, the decisions that were made (and why), known risks, and any remaining assumptions flagged explicitly. The plan must reflect the user's actual answers — never fill gaps with guesses. + +Respond in the same language the user uses.`, }, { id: 'session.fusion.visible',