feat(web): chat UI with conversations and WebSocket streaming (#84)

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #84.
This commit is contained in:
2026-03-13 13:25:28 +00:00
committed by jason.woltje
parent 600da70960
commit f0d1d4bafa
10 changed files with 381 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
import { io, type Socket } from 'socket.io-client';
const GATEWAY_URL = process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:4000';
let socket: Socket | null = null;
export function getSocket(): Socket {
if (!socket) {
socket = io(`${GATEWAY_URL}/chat`, {
withCredentials: true,
autoConnect: false,
});
}
return socket;
}