diff options
| author | Michael Hart <[email protected]> | 2026-02-20 11:23:35 +1100 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2026-02-19 18:37:56 -0600 |
| commit | 8ad60b1ec2002e8d9f841ba256c3eed1953a7ec6 (patch) | |
| tree | 424763ab53a72635d21ddd88fe66d34d3c603a09 /packages | |
| parent | 01d518708ac86368463712568e84ef8995d99578 (diff) | |
| download | opencode-8ad60b1ec2002e8d9f841ba256c3eed1953a7ec6.tar.gz opencode-8ad60b1ec2002e8d9f841ba256c3eed1953a7ec6.zip | |
Use structuredClone instead of remeda's clone (#14351)
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax <[email protected]>
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx | 3 | ||||
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/stash.tsx | 3 |
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) => { |
