sandbox connected and streaming

This commit is contained in:
2026-03-30 23:29:03 -04:00
parent c3a8fae132
commit 998f69fa1a
130 changed files with 7416 additions and 2123 deletions

View File

@@ -1,5 +1,6 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { wsManager } from '../composables/useWebSocket'
export interface ChannelInfo {
type: string
@@ -20,5 +21,12 @@ export interface ChannelState {
export const useChannelStore = defineStore('channelState', () => {
const connected = ref<Record<string, ChannelInfo>>({})
return { connected }
// Session readiness — computed getters backed by wsManager refs.
// Using computed (not ref) keeps these out of $state so useStateSync won't
// pick them up and try to send patches to the gateway.
const sessionStatus = computed(() => wsManager.sessionStatus.value)
const statusMessage = computed(() => wsManager.statusMessage.value)
const isReady = computed(() => wsManager.sessionStatus.value === 'ready')
return { connected, sessionStatus, statusMessage, isReady }
})