feat(site): use websocket connection for devcontainer updates (#18808)

Instead of polling every 10 seconds, we instead use a WebSocket
connection for more timely updates.
This commit is contained in:
Danielle Maywood
2025-07-14 21:35:35 +01:00
committed by GitHub
parent 7cf3263fbd
commit 43b0bb7f61
15 changed files with 1079 additions and 23 deletions
+8
View File
@@ -129,6 +129,14 @@ export const watchWorkspace = (
});
};
export const watchAgentContainers = (
agentId: string,
): OneWayWebSocket<TypesGen.WorkspaceAgentListContainersResponse> => {
return new OneWayWebSocket({
apiRoute: `/api/v2/workspaceagents/${agentId}/containers/watch`,
});
};
type WatchInboxNotificationsParams = Readonly<{
read_status?: "read" | "unread" | "all";
}>;