fix structured cloning

This commit is contained in:
Sebastian Herrlinger
2026-04-15 17:27:37 +02:00
parent 6cabcc84a8
commit c3e4352c21
2 changed files with 4 additions and 3 deletions

View File

@@ -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) {

View File

@@ -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))
},
}
},