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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user