diff options
| author | Adam <[email protected]> | 2026-02-11 19:05:15 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-12 01:05:15 +0000 |
| commit | 81ca2df6ad57085b895caafc386e4ac4ab9098a6 (patch) | |
| tree | 3a78f5125aff9ebf84e98275a72f5fdd13d930ff /packages/app/src/context | |
| parent | aea68c386a4f64cf718c3eeee9dffec8409ee6b0 (diff) | |
| download | opencode-81ca2df6ad57085b895caafc386e4ac4ab9098a6.tar.gz opencode-81ca2df6ad57085b895caafc386e4ac4ab9098a6.zip | |
fix(app): guard randomUUID in insecure browser contexts (#13237)
Co-authored-by: Selim <[email protected]>
Diffstat (limited to 'packages/app/src/context')
| -rw-r--r-- | packages/app/src/context/comments.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/app/src/context/comments.tsx b/packages/app/src/context/comments.tsx index b91f029bc..a88ea0d86 100644 --- a/packages/app/src/context/comments.tsx +++ b/packages/app/src/context/comments.tsx @@ -4,6 +4,7 @@ import { createSimpleContext } from "@opencode-ai/ui/context" import { useParams } from "@solidjs/router" import { Persist, persisted } from "@/utils/persist" import { createScopedCache } from "@/utils/scoped-cache" +import { uuid } from "@/utils/uuid" import type { SelectedLineRange } from "@/context/file" export type LineComment = { @@ -53,7 +54,7 @@ function createCommentSessionState(store: Store<CommentStore>, setStore: SetStor const add = (input: Omit<LineComment, "id" | "time">) => { const next: LineComment = { - id: crypto.randomUUID?.() ?? Math.random().toString(16).slice(2), + id: uuid(), time: Date.now(), ...input, } |
