Merge branch 'codex/active-session-live-state' into dev

This commit is contained in:
ekko
2026-04-19 22:52:41 +08:00
4 changed files with 223 additions and 6 deletions
@@ -249,6 +249,10 @@ export const useChatStore = defineStore('chat', () => {
const activeSession = ref<Session | null>(null)
const messages = computed<Message[]>(() => activeSession.value?.messages || [])
function isSessionLive(sessionId: string): boolean {
return streamStates.value.has(sessionId) || resumingRuns.value.has(sessionId)
}
function persistSessionsList() {
// Cache lightweight summaries only (messages are cached per-session).
saveJson(
@@ -912,6 +916,7 @@ export const useChatStore = defineStore('chat', () => {
messages,
isStreaming,
isRunActive,
isSessionLive,
isLoadingSessions,
isLoadingMessages,
newChat,