mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
fix(app): back to platform fetch for now
This commit is contained in:
parent
a3aad9c9bf
commit
1e2f664410
@ -11,19 +11,11 @@ export const { use: useGlobalSDK, provider: GlobalSDKProvider } = createSimpleCo
|
||||
const server = useServer()
|
||||
const platform = usePlatform()
|
||||
const abort = new AbortController()
|
||||
const password = window.__OPENCODE__?.serverPassword
|
||||
|
||||
// Prefer the WebView fetch implementation for streaming responses.
|
||||
// @tauri-apps/plugin-http 2.5.x has known issues with streaming/cancellation that can
|
||||
// retain native resources in the Rust process.
|
||||
const eventSdk = createOpencodeClient({
|
||||
baseUrl: server.url,
|
||||
signal: abort.signal,
|
||||
headers: password
|
||||
? {
|
||||
Authorization: `Basic ${btoa(`opencode:${password}`)}`,
|
||||
}
|
||||
: undefined,
|
||||
fetch: platform.fetch,
|
||||
})
|
||||
const emitter = createGlobalEmitter<{
|
||||
[key: string]: Event
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user