diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index 7794a030..66291768 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -101,6 +101,7 @@ type DraftPreset = { const DRAFT_PRESETS: readonly DraftPreset[] = [ { id: 'explore', icon: 'compass-3', labelKey: 'chat.draftPresets.explore.label', promptKey: 'chat.draftPresets.explore.prompt' }, { id: 'catchup', icon: 'history', labelKey: 'chat.draftPresets.catchup.label', command: '/catch-up' }, + { id: 'weigh', icon: 'scales-3', labelKey: 'chat.draftPresets.weigh.label', command: '/weigh' }, { id: 'plan', icon: 'survey', labelKey: 'chat.draftPresets.plan.label', command: '/plan-feature' }, { id: 'debug', icon: 'bug', labelKey: 'chat.draftPresets.debug.label', command: '/debug' }, { id: 'review', icon: 'search-eye', labelKey: 'chat.draftPresets.review.label', command: '/workspace-review' }, @@ -1123,7 +1124,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', 'plan-feature', 'catch-up', 'debug', + 'init', 'review', 'undo', 'redo', 'timeline', 'compact', 'summary', 'workspace-review', 'plan-feature', 'catch-up', 'debug', 'weigh', ]); for (const command of availableCommands) names.add(command.name.toLowerCase()); for (const skill of availableSkills) names.add(skill.name.toLowerCase()); @@ -2017,6 +2018,28 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo } return; } + else if (commandName === 'weigh' && (currentSessionId || newSessionDraftOpen)) { + try { + await sessionActions.waitForConnectionOrThrow(); + const visibleText = await renderMagicPrompt('session.weigh.visible'); + const instructionsText = await renderMagicPrompt('session.weigh.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.weighFailed')); + } + return; + } } const currentSessionDirectory = currentSessionId diff --git a/packages/ui/src/components/chat/CommandAutocomplete.tsx b/packages/ui/src/components/chat/CommandAutocomplete.tsx index 0695a9d9..11e01707 100644 --- a/packages/ui/src/components/chat/CommandAutocomplete.tsx +++ b/packages/ui/src/components/chat/CommandAutocomplete.tsx @@ -164,6 +164,10 @@ export const CommandAutocomplete = React.forwardRef`, "rocket": ``, "save-3": ``, + "scales-3": ``, "scissors": ``, "search-eye": ``, "search": ``, diff --git a/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx b/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx index b39f365b..54b43f1a 100644 --- a/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx +++ b/packages/ui/src/components/sections/magic-prompts/MagicPromptsPage.tsx @@ -164,6 +164,14 @@ const PROMPT_PAGE_MAP: Record = { { id: 'session.debug.instructions', titleKey: 'settings.magicPrompts.page.block.instructions' }, ], }, + 'session.weigh': { + titleKey: 'settings.magicPrompts.page.group.sessionWeigh.title', + descriptionKey: 'settings.magicPrompts.page.group.sessionWeigh.description', + blocks: [ + { id: 'session.weigh.visible', titleKey: 'settings.magicPrompts.page.block.visiblePrompt' }, + { id: 'session.weigh.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 57b99895..93fb8aae 100644 --- a/packages/ui/src/components/sections/magic-prompts/MagicPromptsSidebar.tsx +++ b/packages/ui/src/components/sections/magic-prompts/MagicPromptsSidebar.tsx @@ -50,6 +50,7 @@ export const MagicPromptsSidebar: React.FC = ({ onItem { id: 'session.plan', titleKey: 'settings.magicPrompts.sidebar.item.sessionFeaturePlan' }, { id: 'session.catchup', titleKey: 'settings.magicPrompts.sidebar.item.sessionCatchUp' }, { id: 'session.debug', titleKey: 'settings.magicPrompts.sidebar.item.sessionDebug' }, + { id: 'session.weigh', titleKey: 'settings.magicPrompts.sidebar.item.sessionWeigh' }, { 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 279d8b79..301bfc09 100644 --- a/packages/ui/src/lib/i18n/messages/en.settings.ts +++ b/packages/ui/src/lib/i18n/messages/en.settings.ts @@ -226,6 +226,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': 'Feature Planning', 'settings.magicPrompts.sidebar.item.sessionCatchUp': 'Catch Up', 'settings.magicPrompts.sidebar.item.sessionDebug': 'Debugging', + 'settings.magicPrompts.sidebar.item.sessionWeigh': 'Weigh Options', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.remoteInstances.sidebar.title': 'Remote Instances', 'settings.remoteInstances.sidebar.total': 'Total {count}', @@ -1695,6 +1696,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionCatchUp.description': 'Prompts used by the /catch-up slash command: visible user message + hidden instructions. Inspects git state and branches on it — reconstructs intent from an in-progress diff, checks an open PR\'s review state, or summarizes recent commits.', 'settings.magicPrompts.page.group.sessionDebug.title': 'Debugging', 'settings.magicPrompts.page.group.sessionDebug.description': 'Prompts used by the /debug slash command: visible user message + hidden instructions. Runs a guided root-cause investigation — captures the symptom, forms hypotheses, checks them against the code, and confirms the cause before proposing a fix.', + 'settings.magicPrompts.page.group.sessionWeigh.title': 'Weigh Options', + 'settings.magicPrompts.page.group.sessionWeigh.description': 'Prompts used by the /weigh slash command: visible user message + hidden instructions. Investigates the code, then lays out 2-3 distinct approaches with trade-offs and a recommendation — without writing a plan or code.', '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 f03c3746..96805ac0 100644 --- a/packages/ui/src/lib/i18n/messages/en.ts +++ b/packages/ui/src/lib/i18n/messages/en.ts @@ -1456,6 +1456,7 @@ export const dict = { '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.catchup.label': 'Catch me up', + 'chat.draftPresets.weigh.label': 'Weigh my options', 'chat.draftPresets.plan.label': 'Start feature planning', 'chat.draftPresets.debug.label': 'Debug an issue', 'chat.draftPresets.review.label': 'Review my changes', @@ -1522,6 +1523,7 @@ export const dict = { 'chat.commandAutocomplete.command.featurePlanDescription': 'Start a guided, back-and-forth planning session for a new feature.', 'chat.commandAutocomplete.command.catchUpDescription': 'Re-establish context: what you were doing and where to pick up.', 'chat.commandAutocomplete.command.debugDescription': 'Guided root-cause investigation for a bug before proposing a fix.', + 'chat.commandAutocomplete.command.weighDescription': 'Weigh 2-3 approaches with trade-offs and a recommendation before you commit.', 'chat.commandAutocomplete.badge.skill': 'skill', 'chat.commandAutocomplete.badge.command': 'command', 'chat.commandAutocomplete.badge.system': 'system', @@ -1640,6 +1642,7 @@ export const dict = { 'chat.chatInput.toast.planFeatureFailed': 'Failed to start feature planning', 'chat.chatInput.toast.catchUpFailed': 'Failed to catch up', 'chat.chatInput.toast.debugFailed': 'Failed to start debugging', + 'chat.chatInput.toast.weighFailed': 'Failed to weigh options', '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 c92563a3..ca1b40ea 100644 --- a/packages/ui/src/lib/i18n/messages/es.settings.ts +++ b/packages/ui/src/lib/i18n/messages/es.settings.ts @@ -193,6 +193,7 @@ export const settingsDict = { "settings.magicPrompts.sidebar.item.sessionFeaturePlan": "Planificación de funciones", "settings.magicPrompts.sidebar.item.sessionCatchUp": "Ponerse al día", "settings.magicPrompts.sidebar.item.sessionDebug": "Depuración", + "settings.magicPrompts.sidebar.item.sessionWeigh": "Comparar enfoques", "settings.magicPrompts.sidebar.item.sessionFusion": "Fusion", "settings.remoteInstances.sidebar.title": "Instancias remotas", "settings.remoteInstances.sidebar.total": "Total {count}", @@ -1662,6 +1663,8 @@ export const settingsDict = { "settings.magicPrompts.page.group.sessionCatchUp.description": "Prompts usados por el comando /catch-up: mensaje visible del usuario + instrucciones ocultas. Inspecciona el estado de git y, según él, reconstruye la intención a partir de un diff en curso, revisa el estado de revisión de un PR abierto o resume los commits recientes.", "settings.magicPrompts.page.group.sessionDebug.title": "Depuración", "settings.magicPrompts.page.group.sessionDebug.description": "Prompts usados por el comando /debug: mensaje visible del usuario + instrucciones ocultas. Ejecuta una investigación guiada de la causa raíz: captura el síntoma, formula hipótesis, las verifica contra el código y confirma la causa antes de proponer una solución.", + "settings.magicPrompts.page.group.sessionWeigh.title": "Comparar enfoques", + "settings.magicPrompts.page.group.sessionWeigh.description": "Prompts usados por el comando /weigh: mensaje visible del usuario + instrucciones ocultas. Investiga el código y luego presenta 2-3 enfoques distintos con sus ventajas y desventajas y una recomendación, sin escribir un plan ni código.", "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 66b2028b..8f4c36d7 100644 --- a/packages/ui/src/lib/i18n/messages/es.ts +++ b/packages/ui/src/lib/i18n/messages/es.ts @@ -1422,6 +1422,7 @@ export const dict: Record = { "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.catchup.label": "Catch me up", + "chat.draftPresets.weigh.label": "Weigh my options", "chat.draftPresets.plan.label": "Start feature planning", "chat.draftPresets.debug.label": "Debug an issue", "chat.draftPresets.review.label": "Review my changes", @@ -1488,6 +1489,7 @@ export const dict: Record = { "chat.commandAutocomplete.command.featurePlanDescription": "Inicia una sesión de planificación guiada e interactiva para una nueva función.", "chat.commandAutocomplete.command.catchUpDescription": "Recupera el contexto: qué estabas haciendo y por dónde continuar.", "chat.commandAutocomplete.command.debugDescription": "Investigación guiada de la causa raíz de un error antes de proponer una solución.", + "chat.commandAutocomplete.command.weighDescription": "Compara 2-3 enfoques con sus ventajas y desventajas y una recomendación antes de decidir.", "chat.commandAutocomplete.badge.skill": "habilidad", "chat.commandAutocomplete.badge.command": "comando", "chat.commandAutocomplete.badge.system": "sistema", @@ -1606,6 +1608,7 @@ export const dict: Record = { "chat.chatInput.toast.planFeatureFailed": "No se pudo iniciar la planificación de la función", "chat.chatInput.toast.catchUpFailed": "No se pudo recuperar el contexto", "chat.chatInput.toast.debugFailed": "No se pudo iniciar la depuración", + "chat.chatInput.toast.weighFailed": "No se pudieron comparar las opciones", "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 f6a782c4..1bb713a2 100644 --- a/packages/ui/src/lib/i18n/messages/ko.settings.ts +++ b/packages/ui/src/lib/i18n/messages/ko.settings.ts @@ -193,6 +193,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': '기능 계획', 'settings.magicPrompts.sidebar.item.sessionCatchUp': '따라잡기', 'settings.magicPrompts.sidebar.item.sessionDebug': '디버깅', + 'settings.magicPrompts.sidebar.item.sessionWeigh': '옵션 비교', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.remoteInstances.sidebar.title': '원격 인스턴스', 'settings.remoteInstances.sidebar.total': '총 {count}개', @@ -1662,6 +1663,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionCatchUp.description': '/catch-up slash command에서 사용하는 프롬프트입니다: 표시 사용자 메시지 + 숨겨진 지침. git 상태를 확인하고 그에 따라 진행 중인 diff에서 의도를 재구성하거나, 열린 PR의 리뷰 상태를 확인하거나, 최근 커밋을 요약합니다.', 'settings.magicPrompts.page.group.sessionDebug.title': '디버깅', 'settings.magicPrompts.page.group.sessionDebug.description': '/debug slash command에서 사용하는 프롬프트입니다: 표시 사용자 메시지 + 숨겨진 지침. 근본 원인 조사를 단계적으로 진행합니다 — 증상을 파악하고 가설을 세워 코드와 대조하며, 수정안을 제시하기 전에 원인을 확정합니다.', + 'settings.magicPrompts.page.group.sessionWeigh.title': '옵션 비교', + 'settings.magicPrompts.page.group.sessionWeigh.description': '/weigh slash command에서 사용하는 프롬프트입니다: 표시 사용자 메시지 + 숨겨진 지침. 코드를 조사한 뒤 2~3가지 서로 다른 접근 방식을 장단점과 함께 제시하고 추천합니다 — 계획이나 코드는 작성하지 않습니다.', '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 295d6f3e..07eefc52 100644 --- a/packages/ui/src/lib/i18n/messages/ko.ts +++ b/packages/ui/src/lib/i18n/messages/ko.ts @@ -1458,6 +1458,7 @@ export const dict: Record = { '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.catchup.label': 'Catch me up', + 'chat.draftPresets.weigh.label': 'Weigh my options', 'chat.draftPresets.plan.label': 'Start feature planning', 'chat.draftPresets.debug.label': 'Debug an issue', 'chat.draftPresets.review.label': 'Review my changes', @@ -1524,6 +1525,7 @@ export const dict: Record = { 'chat.commandAutocomplete.command.featurePlanDescription': '새 기능을 위한 대화형 가이드 계획 세션을 시작합니다.', 'chat.commandAutocomplete.command.catchUpDescription': '맥락을 다시 파악합니다: 무엇을 하고 있었고 어디서 이어서 할지.', 'chat.commandAutocomplete.command.debugDescription': '수정안을 제시하기 전에 버그의 근본 원인을 단계적으로 조사합니다.', + 'chat.commandAutocomplete.command.weighDescription': '결정하기 전에 2~3가지 접근 방식을 장단점과 함께 비교하고 추천을 제시합니다.', 'chat.commandAutocomplete.badge.skill': '스킬', 'chat.commandAutocomplete.badge.command': '명령', 'chat.commandAutocomplete.badge.system': 'system', @@ -1640,6 +1642,7 @@ export const dict: Record = { 'chat.chatInput.toast.planFeatureFailed': '기능 계획을 시작하지 못했습니다', 'chat.chatInput.toast.catchUpFailed': '컨텍스트를 불러오지 못했습니다', 'chat.chatInput.toast.debugFailed': '디버깅을 시작하지 못했습니다', + 'chat.chatInput.toast.weighFailed': '옵션을 비교하지 못했습니다', '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 0fd30e37..5d0805e3 100644 --- a/packages/ui/src/lib/i18n/messages/pl.settings.ts +++ b/packages/ui/src/lib/i18n/messages/pl.settings.ts @@ -285,6 +285,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionCatchUp.description': 'Prompty używane przez polecenie /catch-up: widoczna wiadomość użytkownika + ukryte instrukcje. Sprawdza stan git i w zależności od niego — odtwarza zamiar z trwającego diffa, sprawdza stan recenzji otwartego PR-a lub podsumowuje ostatnie commity.', 'settings.magicPrompts.page.group.sessionDebug.title': 'Debugowanie', 'settings.magicPrompts.page.group.sessionDebug.description': 'Prompty używane przez polecenie /debug: widoczna wiadomość użytkownika + ukryte instrukcje. Prowadzi badanie pierwotnej przyczyny — rejestruje objaw, formułuje hipotezy, sprawdza je w kodzie i potwierdza przyczynę przed zaproponowaniem poprawki.', + 'settings.magicPrompts.page.group.sessionWeigh.title': 'Rozważanie opcji', + 'settings.magicPrompts.page.group.sessionWeigh.description': 'Prompty używane przez polecenie /weigh: widoczna wiadomość użytkownika + ukryte instrukcje. Bada kod, a następnie przedstawia 2-3 różne podejścia z kompromisami i rekomendacją — bez pisania planu ani kodu.', '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.', @@ -325,6 +327,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': 'Planowanie funkcji', 'settings.magicPrompts.sidebar.item.sessionCatchUp': 'Nadrobienie kontekstu', 'settings.magicPrompts.sidebar.item.sessionDebug': 'Debugowanie', + 'settings.magicPrompts.sidebar.item.sessionWeigh': 'Rozważanie opcji', '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 53739144..1e41cd1d 100644 --- a/packages/ui/src/lib/i18n/messages/pl.ts +++ b/packages/ui/src/lib/i18n/messages/pl.ts @@ -448,6 +448,7 @@ export const dict: Record = { '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.catchup.label': 'Catch me up', + 'chat.draftPresets.weigh.label': 'Weigh my options', 'chat.draftPresets.plan.label': 'Start feature planning', 'chat.draftPresets.debug.label': 'Debug an issue', 'chat.draftPresets.review.label': 'Review my changes', @@ -513,6 +514,7 @@ export const dict: Record = { 'chat.commandAutocomplete.command.featurePlanDescription': 'Rozpocznij prowadzoną, interaktywną sesję planowania nowej funkcji.', 'chat.commandAutocomplete.command.catchUpDescription': 'Przywróć kontekst: nad czym pracowałeś i od czego kontynuować.', 'chat.commandAutocomplete.command.debugDescription': 'Prowadzone badanie pierwotnej przyczyny błędu przed zaproponowaniem poprawki.', + 'chat.commandAutocomplete.command.weighDescription': 'Rozważ 2-3 podejścia z kompromisami i rekomendacją, zanim się zdecydujesz.', 'chat.commandAutocomplete.badge.skill': 'skill', 'chat.commandAutocomplete.badge.command': 'polecenie', 'chat.commandAutocomplete.badge.system': 'system', @@ -921,6 +923,7 @@ export const dict: Record = { 'chat.chatInput.toast.planFeatureFailed': 'Nie udało się rozpocząć planowania funkcji', 'chat.chatInput.toast.catchUpFailed': 'Nie udało się przywrócić kontekstu', 'chat.chatInput.toast.debugFailed': 'Nie udało się rozpocząć debugowania', + 'chat.chatInput.toast.weighFailed': 'Nie udało się rozważyć opcji', '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 51c0fba8..ebb7f486 100644 --- a/packages/ui/src/lib/i18n/messages/pt-BR.settings.ts +++ b/packages/ui/src/lib/i18n/messages/pt-BR.settings.ts @@ -193,6 +193,7 @@ export const settingsDict = { "settings.magicPrompts.sidebar.item.sessionFeaturePlan": "Planejamento de funcionalidade", "settings.magicPrompts.sidebar.item.sessionCatchUp": "Retomada de contexto", "settings.magicPrompts.sidebar.item.sessionDebug": "Depuração", + "settings.magicPrompts.sidebar.item.sessionWeigh": "Comparar abordagens", "settings.magicPrompts.sidebar.item.sessionFusion": "Fusion", "settings.remoteInstances.sidebar.title": "Instâncias remotas", "settings.remoteInstances.sidebar.total": "Total {count}", @@ -1662,6 +1663,8 @@ export const settingsDict = { "settings.magicPrompts.page.group.sessionCatchUp.description": "Prompts usados pelo comando /catch-up: mensagem visível do usuário + instruções ocultas. Inspeciona o estado do git e, com base nisso, reconstrói a intenção a partir de um diff em andamento, verifica o estado de revisão de um PR aberto ou resume os commits recentes.", "settings.magicPrompts.page.group.sessionDebug.title": "Depuração", "settings.magicPrompts.page.group.sessionDebug.description": "Prompts usados pelo comando /debug: mensagem visível do usuário + instruções ocultas. Executa uma investigação guiada da causa raiz: captura o sintoma, formula hipóteses, verifica-as no código e confirma a causa antes de propor uma correção.", + "settings.magicPrompts.page.group.sessionWeigh.title": "Comparar abordagens", + "settings.magicPrompts.page.group.sessionWeigh.description": "Prompts usados pelo comando /weigh: mensagem visível do usuário + instruções ocultas. Investiga o código e então apresenta 2-3 abordagens distintas com seus prós e contras e uma recomendação, sem escrever um plano ou código.", "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 721cd039..4fbbc9bd 100644 --- a/packages/ui/src/lib/i18n/messages/pt-BR.ts +++ b/packages/ui/src/lib/i18n/messages/pt-BR.ts @@ -1422,6 +1422,7 @@ export const dict: Record = { "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.catchup.label": "Catch me up", + "chat.draftPresets.weigh.label": "Weigh my options", "chat.draftPresets.plan.label": "Start feature planning", "chat.draftPresets.debug.label": "Debug an issue", "chat.draftPresets.review.label": "Review my changes", @@ -1488,6 +1489,7 @@ export const dict: Record = { "chat.commandAutocomplete.command.featurePlanDescription": "Inicie uma sessão de planejamento guiada e interativa para uma nova funcionalidade.", "chat.commandAutocomplete.command.catchUpDescription": "Retome o contexto: o que você estava fazendo e por onde continuar.", "chat.commandAutocomplete.command.debugDescription": "Investigação guiada da causa raiz de um bug antes de propor uma correção.", + "chat.commandAutocomplete.command.weighDescription": "Compare 2-3 abordagens com seus prós e contras e uma recomendação antes de decidir.", "chat.commandAutocomplete.badge.skill": "habilidade", "chat.commandAutocomplete.badge.command": "comando", "chat.commandAutocomplete.badge.system": "sistema", @@ -1606,6 +1608,7 @@ export const dict: Record = { "chat.chatInput.toast.planFeatureFailed": "Não foi possível iniciar o planejamento da funcionalidade", "chat.chatInput.toast.catchUpFailed": "Não foi possível retomar o contexto", "chat.chatInput.toast.debugFailed": "Não foi possível iniciar a depuração", + "chat.chatInput.toast.weighFailed": "Não foi possível comparar as opções", "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 7781f5a7..d787b0c8 100644 --- a/packages/ui/src/lib/i18n/messages/uk.settings.ts +++ b/packages/ui/src/lib/i18n/messages/uk.settings.ts @@ -193,6 +193,7 @@ export const settingsDict = { "settings.magicPrompts.sidebar.item.sessionFeaturePlan": "Планування фічі", "settings.magicPrompts.sidebar.item.sessionCatchUp": "Повернення в контекст", "settings.magicPrompts.sidebar.item.sessionDebug": "Дебаг", + "settings.magicPrompts.sidebar.item.sessionWeigh": "Зважування варіантів", "settings.magicPrompts.sidebar.item.sessionFusion": "Fusion", "settings.remoteInstances.sidebar.title": "Віддалені інстанси", "settings.remoteInstances.sidebar.total": "Усього {count}", @@ -1662,6 +1663,8 @@ export const settingsDict = { "settings.magicPrompts.page.group.sessionCatchUp.description": "Промпти, які використовуються командою /catch-up: видиме повідомлення користувача + приховані інструкції. Перевіряє стан git і залежно від нього — відновлює задум із незавершеного diff, перевіряє стан рев'ю відкритого PR або підсумовує останні коміти.", "settings.magicPrompts.page.group.sessionDebug.title": "Дебаг", "settings.magicPrompts.page.group.sessionDebug.description": "Промпти, які використовуються командою /debug: видиме повідомлення користувача + приховані інструкції. Веде кероване дослідження першопричини — фіксує симптом, формує гіпотези, перевіряє їх по коду й підтверджує причину перш ніж пропонувати фікс.", + "settings.magicPrompts.page.group.sessionWeigh.title": "Зважування варіантів", + "settings.magicPrompts.page.group.sessionWeigh.description": "Промпти, які використовуються командою /weigh: видиме повідомлення користувача + приховані інструкції. Досліджує код, а тоді викладає 2-3 різні підходи з trade-offs і рекомендацією — без плану чи коду.", "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 663a5b8d..c1821502 100644 --- a/packages/ui/src/lib/i18n/messages/uk.ts +++ b/packages/ui/src/lib/i18n/messages/uk.ts @@ -1422,6 +1422,7 @@ export const dict: Record = { "chat.draftPresets.explore.label": "Огляд кодової бази", "chat.draftPresets.explore.prompt": "Зроби високорівневий огляд цієї кодової бази — архітектуру, основні модулі та як вони пов'язані між собою.", "chat.draftPresets.catchup.label": "Повернутись у контекст", + "chat.draftPresets.weigh.label": "Зважити варіанти", "chat.draftPresets.plan.label": "Розпочати планування фічі", "chat.draftPresets.debug.label": "Дебаг проблеми", "chat.draftPresets.review.label": "Переглянути мої зміни", @@ -1488,6 +1489,7 @@ export const dict: Record = { "chat.commandAutocomplete.command.featurePlanDescription": "Розпочати покрокову діалогову сесію планування нової фічі.", "chat.commandAutocomplete.command.catchUpDescription": "Повернутись у контекст: над чим працювали і звідки продовжити.", "chat.commandAutocomplete.command.debugDescription": "Кероване дослідження першопричини бага перед тим, як пропонувати фікс.", + "chat.commandAutocomplete.command.weighDescription": "Зважити 2-3 підходи з trade-offs і рекомендацією перш ніж братися до роботи.", "chat.commandAutocomplete.badge.skill": "навичка", "chat.commandAutocomplete.badge.command": "команда", "chat.commandAutocomplete.badge.system": "система", @@ -1606,6 +1608,7 @@ export const dict: Record = { "chat.chatInput.toast.planFeatureFailed": "Не вдалося розпочати планування фічі", "chat.chatInput.toast.catchUpFailed": "Не вдалося зібрати контекст", "chat.chatInput.toast.debugFailed": "Не вдалося розпочати дебаг", + "chat.chatInput.toast.weighFailed": "Не вдалося зважити варіанти", "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 d1ee7d8b..e9bb46c1 100644 --- a/packages/ui/src/lib/i18n/messages/zh-CN.settings.ts +++ b/packages/ui/src/lib/i18n/messages/zh-CN.settings.ts @@ -193,6 +193,7 @@ export const settingsDict = { 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': '功能规划', 'settings.magicPrompts.sidebar.item.sessionCatchUp': '快速回顾', 'settings.magicPrompts.sidebar.item.sessionDebug': '调试', + 'settings.magicPrompts.sidebar.item.sessionWeigh': '权衡方案', 'settings.magicPrompts.sidebar.item.sessionFusion': '融合', 'settings.remoteInstances.sidebar.title': '远程实例', 'settings.remoteInstances.sidebar.total': '总计 {count}', @@ -1662,6 +1663,8 @@ export const settingsDict = { 'settings.magicPrompts.page.group.sessionCatchUp.description': '由 /catch-up 斜杠命令使用的提示词:可见用户消息 + 隐藏说明。检查 git 状态并据此处理——从进行中的 diff 还原意图、查看已开启 PR 的评审状态,或总结最近的提交。', 'settings.magicPrompts.page.group.sessionDebug.title': '调试', 'settings.magicPrompts.page.group.sessionDebug.description': '由 /debug 斜杠命令使用的提示词:可见用户消息 + 隐藏说明。引导式排查根本原因——记录症状、提出假设、对照代码验证,并在提出修复方案前确认原因。', + 'settings.magicPrompts.page.group.sessionWeigh.title': '权衡方案', + 'settings.magicPrompts.page.group.sessionWeigh.description': '由 /weigh 斜杠命令使用的提示词:可见用户消息 + 隐藏说明。先调研代码,再列出 2-3 种不同方案及其利弊并给出推荐——不写计划也不写代码。', '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 f3afbd93..6b71f079 100644 --- a/packages/ui/src/lib/i18n/messages/zh-CN.ts +++ b/packages/ui/src/lib/i18n/messages/zh-CN.ts @@ -1422,6 +1422,7 @@ export const dict: Record = { '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.catchup.label': 'Catch me up', + 'chat.draftPresets.weigh.label': 'Weigh my options', 'chat.draftPresets.plan.label': 'Start feature planning', 'chat.draftPresets.debug.label': 'Debug an issue', 'chat.draftPresets.review.label': 'Review my changes', @@ -1488,6 +1489,7 @@ export const dict: Record = { 'chat.commandAutocomplete.command.featurePlanDescription': '为新功能开始一次引导式的来回规划会话。', 'chat.commandAutocomplete.command.catchUpDescription': '重新进入上下文:你之前在做什么、从哪里继续。', 'chat.commandAutocomplete.command.debugDescription': '在提出修复方案前,引导式地排查 bug 的根本原因。', + 'chat.commandAutocomplete.command.weighDescription': '在动手前,权衡 2-3 种方案的利弊并给出推荐。', 'chat.commandAutocomplete.badge.skill': '技能', 'chat.commandAutocomplete.badge.command': '命令', 'chat.commandAutocomplete.badge.system': '系统', @@ -1606,6 +1608,7 @@ export const dict: Record = { 'chat.chatInput.toast.planFeatureFailed': '无法开始功能规划', 'chat.chatInput.toast.catchUpFailed': '无法获取上下文', 'chat.chatInput.toast.debugFailed': '无法开始调试', + 'chat.chatInput.toast.weighFailed': '无法权衡方案', '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 96ae03af..8bdd7c7b 100644 --- a/packages/ui/src/lib/i18n/messages/zh-TW.settings.ts +++ b/packages/ui/src/lib/i18n/messages/zh-TW.settings.ts @@ -190,6 +190,7 @@ 'settings.magicPrompts.sidebar.item.sessionFeaturePlan': '功能規劃', 'settings.magicPrompts.sidebar.item.sessionCatchUp': '快速回顧', 'settings.magicPrompts.sidebar.item.sessionDebug': '除錯', + 'settings.magicPrompts.sidebar.item.sessionWeigh': '權衡方案', 'settings.magicPrompts.sidebar.item.sessionFusion': 'Fusion', 'settings.remoteInstances.sidebar.title': '遠端執行個體', 'settings.remoteInstances.sidebar.total': '總計 {count}', @@ -1583,6 +1584,8 @@ 'settings.magicPrompts.page.group.sessionCatchUp.description': '由 /catch-up 斜線命令使用的提示詞:可見使用者訊息 + 隱藏說明。檢查 git 狀態並據此處理——從進行中的 diff 還原意圖、查看已開啟 PR 的審查狀態,或總結最近的提交。', 'settings.magicPrompts.page.group.sessionDebug.title': '除錯', 'settings.magicPrompts.page.group.sessionDebug.description': '由 /debug 斜線命令使用的提示詞:可見使用者訊息 + 隱藏說明。引導式排查根本原因——記錄症狀、提出假設、對照程式碼驗證,並在提出修復方案前確認原因。', + 'settings.magicPrompts.page.group.sessionWeigh.title': '權衡方案', + 'settings.magicPrompts.page.group.sessionWeigh.description': '由 /weigh 斜線命令使用的提示詞:可見使用者訊息 + 隱藏說明。先調研程式碼,再列出 2-3 種不同方案及其利弊並給出推薦——不寫計畫也不寫程式碼。', '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 ec348d08..904ce2fa 100644 --- a/packages/ui/src/lib/i18n/messages/zh-TW.ts +++ b/packages/ui/src/lib/i18n/messages/zh-TW.ts @@ -1419,6 +1419,7 @@ export const dict: Record = { '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.catchup.label': 'Catch me up', + 'chat.draftPresets.weigh.label': 'Weigh my options', 'chat.draftPresets.plan.label': 'Start feature planning', 'chat.draftPresets.debug.label': 'Debug an issue', 'chat.draftPresets.review.label': 'Review my changes', @@ -1485,6 +1486,7 @@ export const dict: Record = { 'chat.commandAutocomplete.command.featurePlanDescription': '為新功能開始一次引導式的來回規劃工作階段。', 'chat.commandAutocomplete.command.catchUpDescription': '重新進入上下文:你之前在做什麼、從哪裡繼續。', 'chat.commandAutocomplete.command.debugDescription': '在提出修復方案前,引導式地排查 bug 的根本原因。', + 'chat.commandAutocomplete.command.weighDescription': '在動手前,權衡 2-3 種方案的利弊並給出推薦。', 'chat.commandAutocomplete.badge.skill': 'Skills', 'chat.commandAutocomplete.badge.command': '命令', 'chat.commandAutocomplete.badge.system': '系統', @@ -1603,6 +1605,7 @@ export const dict: Record = { 'chat.chatInput.toast.planFeatureFailed': '無法開始功能規劃', 'chat.chatInput.toast.catchUpFailed': '無法取得上下文', 'chat.chatInput.toast.debugFailed': '無法開始除錯', + 'chat.chatInput.toast.weighFailed': '無法權衡方案', '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 58d0a87f..f057c259 100644 --- a/packages/ui/src/lib/magicPrompts.ts +++ b/packages/ui/src/lib/magicPrompts.ts @@ -33,6 +33,8 @@ export type MagicPromptId = | 'session.catchup.instructions' | 'session.debug.visible' | 'session.debug.instructions' + | 'session.weigh.visible' + | 'session.weigh.instructions' | 'session.fusion.visible' | 'session.fusion.instructions'; @@ -666,6 +668,34 @@ Respond in the same language the user uses.`, 6. Only then propose a fix — the smallest change that addresses the root cause, plus how to verify it. Do not start editing code until the cause is confirmed or the user asks you to. +Respond in the same language the user uses.`, + }, + { + id: 'session.weigh.visible', + title: 'Weigh Options Visible Prompt', + group: 'Session', + description: 'Visible user message sent by the /weigh command.', + template: 'Help me decide how to approach this.', + }, + { + id: 'session.weigh.instructions', + title: 'Weigh Options Instructions', + group: 'Session', + description: 'Hidden instructions attached to the /weigh command. Investigates the code, then compares distinct approaches with trade-offs and a recommendation — no plan, no code.', + template: `The user knows WHAT they want to do but not HOW to approach it. Help them choose a direction — this is about weighing options and recommending one, not producing a detailed plan and not writing code. + +First, investigate. Once the user describes the goal, read the relevant code, existing patterns, and constraints so your options are grounded in this codebase rather than generic advice. Ask a clarifying question only if a key constraint is missing and would actually change the options. + +Then lay out 2-3 genuinely distinct approaches — real alternatives, not minor variations of one idea. For each, cover: +- what it involves, in a sentence or two +- how it fits (or fights) the existing patterns in this codebase +- trade-offs: complexity, risk, blast radius, effort, maintainability +- when it is the right choice + +Then give a clear recommendation: which one you would pick and why, and name what would change your mind (for example, "go with A unless you expect X, in which case B"). + +Keep it concrete and scannable. Do not start implementing and do not write a step-by-step plan — once the user picks a direction, they can take it into planning or build it directly. + Respond in the same language the user uses.`, }, {