summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx3
-rw-r--r--packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx3
2 files changed, 2 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 c40534e7e..c1198039d 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx
@@ -3,7 +3,6 @@ import { Global } from "@/global"
import { Filesystem } from "@/util/filesystem"
import { onMount } from "solid-js"
import { createStore, produce } from "solid-js/store"
-import { clone } from "remeda"
import { createSimpleContext } from "../../context/helper"
import { appendFile, writeFile } from "fs/promises"
import type { AgentPart, FilePart, TextPart } from "@opencode-ai/sdk/v2"
@@ -83,7 +82,7 @@ export const { use: usePromptHistory, provider: PromptHistoryProvider } = create
return store.history.at(store.index)
},
append(item: PromptInfo) {
- const entry = clone(item)
+ const entry = structuredClone(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 d4dc138d8..4a831b273 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx
@@ -3,7 +3,6 @@ import { Global } from "@/global"
import { Filesystem } from "@/util/filesystem"
import { onMount } from "solid-js"
import { createStore, produce } from "solid-js/store"
-import { clone } from "remeda"
import { createSimpleContext } from "../../context/helper"
import { appendFile, writeFile } from "fs/promises"
import type { PromptInfo } from "./history"
@@ -53,7 +52,7 @@ export const { use: usePromptStash, provider: PromptStashProvider } = createSimp
return store.entries
},
push(entry: Omit<StashEntry, "timestamp">) {
- const stash = clone({ ...entry, timestamp: Date.now() })
+ const stash = structuredClone({ ...entry, timestamp: Date.now() })
let trimmed = false
setStore(
produce((draft) => {