瀏覽代碼

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.
Jesse Vincent 8 月之前
父節點
當前提交
c536926f03
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      lib/brainstorm-server/index.js

+ 1 - 1
lib/brainstorm-server/index.js

@@ -47,7 +47,7 @@ wss.on('connection', (ws) => {
   ws.on('message', (data) => {
   ws.on('message', (data) => {
     // User interaction event - write to stdout for Claude
     // User interaction event - write to stdout for Claude
     const event = JSON.parse(data.toString());
     const event = JSON.parse(data.toString());
-    console.log(JSON.stringify({ type: 'user-event', ...event }));
+    console.log(JSON.stringify({ ...event, type: 'user-event' }));
   });
   });
 });
 });