fix: ensure user-event type is preserved in WebSocket message output

The spread operator order was causing incoming event types to overwrite
the user-event type marker.
This commit is contained in:
Jesse Vincent
2026-02-08 16:49:15 -08:00
parent e532c6dbbe
commit 3ec1c2570b
+1 -1
View File
@@ -47,7 +47,7 @@ wss.on('connection', (ws) => {
ws.on('message', (data) => {
// User interaction event - write to stdout for Claude
const event = JSON.parse(data.toString());
console.log(JSON.stringify({ type: 'user-event', ...event }));
console.log(JSON.stringify({ ...event, type: 'user-event' }));
});
});