diff options
| author | Aiden Cline <[email protected]> | 2026-02-19 19:28:06 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-19 19:28:06 -0600 |
| commit | 1a329ba47d2f4c060a518f2396215467953cb8cb (patch) | |
| tree | 3deab48d8580ae07dffcf7ba63a75c77ae4e668c | |
| parent | 8d781b08ce7fa2d722a1069c8745d281962483d5 (diff) | |
| download | opencode-1a329ba47d2f4c060a518f2396215467953cb8cb.tar.gz opencode-1a329ba47d2f4c060a518f2396215467953cb8cb.zip | |
fix: issue from structuredClone addition by using unwrap (#14359)
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx | 4 | ||||
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx index c1198039d..d49dd5c7b 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx @@ -2,7 +2,7 @@ import path from "path" import { Global } from "@/global" import { Filesystem } from "@/util/filesystem" import { onMount } from "solid-js" -import { createStore, produce } from "solid-js/store" +import { createStore, produce, unwrap } from "solid-js/store" import { createSimpleContext } from "../../context/helper" import { appendFile, writeFile } from "fs/promises" import type { AgentPart, FilePart, TextPart } from "@opencode-ai/sdk/v2" @@ -82,7 +82,7 @@ export const { use: usePromptHistory, provider: PromptHistoryProvider } = create return store.history.at(store.index) }, append(item: PromptInfo) { - const entry = structuredClone(item) + const entry = structuredClone(unwrap(item)) let trimmed = false setStore( produce((draft) => { diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx index 4a831b273..ef3eb329a 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx @@ -2,7 +2,7 @@ import path from "path" import { Global } from "@/global" import { Filesystem } from "@/util/filesystem" import { onMount } from "solid-js" -import { createStore, produce } from "solid-js/store" +import { createStore, produce, unwrap } from "solid-js/store" import { createSimpleContext } from "../../context/helper" import { appendFile, writeFile } from "fs/promises" import type { PromptInfo } from "./history" @@ -52,7 +52,7 @@ export const { use: usePromptStash, provider: PromptStashProvider } = createSimp return store.entries }, push(entry: Omit<StashEntry, "timestamp">) { - const stash = structuredClone({ ...entry, timestamp: Date.now() }) + const stash = structuredClone(unwrap({ ...entry, timestamp: Date.now() })) let trimmed = false setStore( produce((draft) => { |
