refactor: send raw typed payloads over chat WebSockets (#24148)

This commit is contained in:
Danielle Maywood
2026-04-10 10:47:30 +01:00
committed by GitHub
parent 19e0e0e8e6
commit 38d4da82b9
15 changed files with 438 additions and 455 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ export const watchWorkspace = (
export const watchChat = (
chatId: string,
afterMessageId?: number,
): OneWayWebSocketApi<TypesGen.ServerSentEvent> => {
): OneWayWebSocketApi<TypesGen.ChatStreamEvent[]> => {
const params = new URLSearchParams();
if (afterMessageId !== undefined && afterMessageId > 0) {
params.set("after_id", afterMessageId.toString());
@@ -161,7 +161,7 @@ export const watchChat = (
});
};
export const watchChats = (): OneWayWebSocket<TypesGen.ServerSentEvent> => {
export const watchChats = (): OneWayWebSocket<TypesGen.ChatWatchEvent> => {
const searchParams: Record<string, string> = {};
const token = API.getSessionToken();
if (token) {