feat: add local workspace review slash command

Add /review command with high-signal diff review instructions
Expose workspace review prompts in Magic Prompts settings
Show /review in command autocomplete with OpenChamber command metadata
This commit is contained in:
Bohdan Triapitsyn
2026-04-23 10:45:41 +03:00
parent 480944b14b
commit cb6ba34811
5 changed files with 95 additions and 2 deletions
@@ -1563,6 +1563,28 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
}
return;
}
else if (commandName === 'review' && currentSessionId) {
try {
await sessionActions.waitForConnectionOrThrow();
const visibleText = await renderMagicPrompt('session.review.visible');
const instructionsText = await renderMagicPrompt('session.review.instructions');
await sendMessage(
visibleText,
currentProviderId,
currentModelId,
currentAgentName,
[],
agentMentionName,
[{ text: instructionsText, synthetic: true }],
currentVariant,
inputMode,
);
scrollToBottom?.({ instant: true, force: true });
} catch (error) {
toast.error(error instanceof Error ? error.message : 'Failed to review changes');
}
return;
}
}
// Collect all attachments for error recovery