From c381b90f39afc676aff9193fd64db930510e98b8 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath <2+defunkt@users.noreply.github.com> Date: Thu, 2 Oct 2025 13:06:30 -0700 Subject: [PATCH] logging --- src/dispatch.ts | 1 + src/websocket.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/dispatch.ts b/src/dispatch.ts index cd41198..468422e 100644 --- a/src/dispatch.ts +++ b/src/dispatch.ts @@ -8,6 +8,7 @@ import { send } from "./websocket" import { setState } from "./state" export async function dispatchMessage(ws: any, msg: Message) { + console.log("<- receive", msg) switch (msg.type) { case "input": await inputMessage(ws, msg); break diff --git a/src/websocket.ts b/src/websocket.ts index b7867a0..813c3de 100644 --- a/src/websocket.ts +++ b/src/websocket.ts @@ -6,6 +6,7 @@ import type { Message } from "./shared/types" const wsConnections: any[] = [] export function send(ws: any, msg: Message) { + console.log("-> send", msg) ws.send(JSON.stringify(msg)) }