fix(desktop): event reconnect gaps

This commit is contained in:
Adam 2025-12-20 05:41:47 -06:00
parent f6bdeb9e3a
commit f71da42520
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 9 additions and 3 deletions

View file

@ -8,8 +8,7 @@ export const { use: useGlobalSDK, provider: GlobalSDKProvider } = createSimpleCo
init: (props: { url: string }) => {
const eventSdk = createOpencodeClient({
baseUrl: props.url,
signal: AbortSignal.timeout(1000 * 60 * 10),
throwOnError: true,
// signal: AbortSignal.timeout(1000 * 60 * 10),
})
const emitter = createGlobalEmitter<{
[key: string]: Event

View file

@ -24,6 +24,13 @@ type Data = {
export const { use: useData, provider: DataProvider } = createSimpleContext({
name: "Data",
init: (props: { data: Data; directory: string }) => {
return { store: props.data, directory: props.directory }
return {
get store() {
return props.data
},
get directory() {
return props.directory
},
}
},
})