@@ -1576,7 +1590,10 @@ export const PromptInput: Component
= (props) => {
icon="close"
variant="ghost"
class="h-5 w-5"
- onClick={() => prompt.context.remove(item.key)}
+ onClick={(e) => {
+ e.stopPropagation()
+ prompt.context.remove(item.key)
+ }}
aria-label={language.t("prompt.context.removeFile")}
/>
diff --git a/packages/app/src/context/comments.tsx b/packages/app/src/context/comments.tsx
new file mode 100644
index 000000000..12ee977e9
--- /dev/null
+++ b/packages/app/src/context/comments.tsx
@@ -0,0 +1,140 @@
+import { batch, createMemo, createRoot, createSignal, onCleanup } from "solid-js"
+import { createStore } from "solid-js/store"
+import { createSimpleContext } from "@opencode-ai/ui/context"
+import { useParams } from "@solidjs/router"
+import { Persist, persisted } from "@/utils/persist"
+import type { SelectedLineRange } from "@/context/file"
+
+export type LineComment = {
+ id: string
+ file: string
+ selection: SelectedLineRange
+ comment: string
+ time: number
+}
+
+type CommentFocus = { file: string; id: string }
+
+const WORKSPACE_KEY = "__workspace__"
+const MAX_COMMENT_SESSIONS = 20
+
+type CommentSession = ReturnType