mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-21 21:31:53 +08:00
fix structured cloning
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createSimpleContext } from "./helper"
|
||||
import { unwrap } from "solid-js/store"
|
||||
import type { PromptRef } from "../component/prompt"
|
||||
import type { PromptInfo } from "../component/prompt/history"
|
||||
|
||||
@@ -12,7 +13,7 @@ export function sessionScope(sessionID: string) {
|
||||
}
|
||||
|
||||
function clone(prompt: PromptInfo) {
|
||||
return structuredClone(prompt)
|
||||
return structuredClone(unwrap(prompt))
|
||||
}
|
||||
|
||||
function empty(prompt?: PromptInfo) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createStore, reconcile } from "solid-js/store"
|
||||
import { createSimpleContext } from "./helper"
|
||||
import type { PromptInfo } from "../component/prompt/history"
|
||||
|
||||
@@ -37,7 +37,7 @@ export const { use: useRoute, provider: RouteProvider } = createSimpleContext({
|
||||
return store
|
||||
},
|
||||
navigate(route: Route) {
|
||||
setStore(route)
|
||||
setStore(reconcile(route))
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user