|
|
@@ -87,10 +87,28 @@
|
|
|
}, 500); // 500ms debounce
|
|
|
});
|
|
|
|
|
|
+ // Send to Claude - triggers server to exit and return all events
|
|
|
+ function sendToClaude(feedback) {
|
|
|
+ send({
|
|
|
+ type: 'send-to-claude',
|
|
|
+ feedback: feedback || null
|
|
|
+ });
|
|
|
+ // Show confirmation to user
|
|
|
+ document.body.innerHTML = `
|
|
|
+ <div style="display: flex; align-items: center; justify-content: center; height: 100vh; font-family: system-ui, sans-serif;">
|
|
|
+ <div style="text-align: center; color: #666;">
|
|
|
+ <h2 style="color: #333;">✓ Sent to Claude</h2>
|
|
|
+ <p>Return to the terminal to see Claude's response.</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ }
|
|
|
+
|
|
|
// Expose for explicit use if needed
|
|
|
window.brainstorm = {
|
|
|
send: send,
|
|
|
- choice: (value, metadata = {}) => send({ type: 'choice', value, ...metadata })
|
|
|
+ choice: (value, metadata = {}) => send({ type: 'choice', value, ...metadata }),
|
|
|
+ sendToClaude: sendToClaude
|
|
|
};
|
|
|
|
|
|
connect();
|