Update message type handling in Synapse communication

AI: Fix type definitions for WebSocket events
This commit is contained in:
Torsten Dittmann
2025-05-08 18:40:17 +02:00
parent c2650a8375
commit f488551f31
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -28,12 +28,12 @@ type SynapseMessageOperationFileSystem =
type SynapseMessageOperationTerminal =
| { operation: 'updateSize'; params: { cols: number; rows: number } }
| { operation: 'createCommand'; params: { command: string } };
type SynapseResponseType = `${SynapseMessageType}Response`;
type Events = WebSocketEvent | SynapseResponseType;
type Events = WebSocketEvent | SynapseMessageType;
type BaseMessage = {
success: boolean;
data: unknown;
type: SynapseResponseType;
type: SynapseMessageType;
requestId: string;
};
+1 -1
View File
@@ -33,7 +33,7 @@
}
});
});
synapse.addEventListener('terminalResponse', ({ message }) => {
synapse.addEventListener('terminal', ({ message }) => {
const { data } = message;
if (typeof data === 'string') term.write(data);
});