From 7a6e54fed27b182d33420cd77d514981ae0f98ec Mon Sep 17 00:00:00 2001 From: operator-main Date: Sun, 4 Oct 2026 03:16:10 +0000 Subject: [PATCH] sidechat_manager: Fix CDP id mismatch\n\n_e() used id=100, muse-chat-api.py ev() uses id=1.\nOn shared websocket, responses mismatched. --- bin/sidechat_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/sidechat_manager.py b/bin/sidechat_manager.py index 60823d3..fb6b548 100644 --- a/bin/sidechat_manager.py +++ b/bin/sidechat_manager.py @@ -14,10 +14,13 @@ import time import json def _ev(ws, js, await_result=True): - """Evaluate JS via CDP, return result.""" + """Evaluate JS via CDP, return result. + Uses id=1 to match muse-chat-api.py's ev() on shared websocket. + Fixed 2026-10-04: was using id=100, causing response mismatch. + """ import json as _json ws.send(_json.dumps({ - "id": 100, "method": "Runtime.evaluate", + "id": 1, "method": "Runtime.evaluate", "params": {"expression": js, "awaitPromise": True} })) resp = _json.loads(ws.recv())