mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-02 18:45:34 +08:00
fix: preserve WebSocket frame type in plugin proxy (#594)
* fix: preserve WebSocket frame type in plugin proxy The plugin WebSocket proxy relays all messages as binary frames regardless of the original frame type. This causes text-based ready messages to be forwarded as binary, so the browser never processes them and plugin UIs (like web-terminal) show a spinner indefinitely. Pass the isBinary flag through in both relay directions so the original frame type is preserved. Fixes CoderLuii/HolyClaude#11 * fix(plugins): preserve websocket frame type in proxy Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -26,15 +26,15 @@ export function handlePluginWsProxy(
|
||||
console.log(`[Plugins] WS proxy connected to "${pluginName}" on port ${port}`);
|
||||
});
|
||||
|
||||
upstream.on('message', (data) => {
|
||||
upstream.on('message', (data, isBinary) => {
|
||||
if (clientWs.readyState === WebSocket.OPEN) {
|
||||
clientWs.send(data);
|
||||
clientWs.send(data, { binary: isBinary });
|
||||
}
|
||||
});
|
||||
|
||||
clientWs.on('message', (data) => {
|
||||
clientWs.on('message', (data, isBinary) => {
|
||||
if (upstream.readyState === WebSocket.OPEN) {
|
||||
upstream.send(data);
|
||||
upstream.send(data, { binary: isBinary });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user