Distinguish between status messages and resource messages in SSE

This commit is contained in:
Eli Ribble 2026-04-28 17:06:21 +00:00
parent 38359e20e9
commit 52c41e29d8
No known key found for this signature in database
14 changed files with 106 additions and 41 deletions

View file

@ -211,7 +211,7 @@
import { ref, reactive, onMounted, onBeforeUnmount, nextTick } from "vue";
import { Tooltip, Popover } from "bootstrap";
import NavigationLink from "@/components/common/NavigationLink.vue";
import { SSEManager, type SSEMessage } from "@/SSEManager";
import { SSEManager, type SSEMessageResource } from "@/SSEManager";
import { useSessionStore } from "@/store/session";
import type { Session } from "@/type/api";
@ -283,7 +283,7 @@ const setTooltipsForSidebar = () => {
// Lifecycle hooks
onMounted(async () => {
const sub = SSEManager.subscribe((msg: SSEMessage) => {
const sub = SSEManager.subscribe((msg: SSEMessageResource) => {
if (msg.resource != "sync:session") {
return;
}