diff options
| author | David Hill <[email protected]> | 2026-01-24 23:07:12 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2026-01-24 23:09:22 +0000 |
| commit | 8714b1a3acf036f8b860425dfc1dc2858dcfee00 (patch) | |
| tree | f2af9d596f912dbf6f4a8cc0f7c88fdbae5eb647 /packages/app/src/context | |
| parent | 4ded06f05dcd318a314504ebd65b52611c77d8a0 (diff) | |
| download | opencode-8714b1a3acf036f8b860425dfc1dc2858dcfee00.tar.gz opencode-8714b1a3acf036f8b860425dfc1dc2858dcfee00.zip | |
add active state to comment cards in prompt input
Diffstat (limited to 'packages/app/src/context')
| -rw-r--r-- | packages/app/src/context/comments.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/app/src/context/comments.tsx b/packages/app/src/context/comments.tsx index 12ee977e9..41123042d 100644 --- a/packages/app/src/context/comments.tsx +++ b/packages/app/src/context/comments.tsx @@ -38,6 +38,7 @@ function createCommentSession(dir: string, id: string | undefined) { ) const [focus, setFocus] = createSignal<CommentFocus | null>(null) + const [active, setActive] = createSignal<CommentFocus | null>(null) const list = (file: string) => store.comments[file] ?? [] @@ -76,6 +77,9 @@ function createCommentSession(dir: string, id: string | undefined) { focus: createMemo(() => focus()), setFocus, clearFocus: () => setFocus(null), + active: createMemo(() => active()), + setActive, + clearActive: () => setActive(null), } } @@ -135,6 +139,9 @@ export const { use: useComments, provider: CommentsProvider } = createSimpleCont focus: () => session().focus(), setFocus: (focus: CommentFocus | null) => session().setFocus(focus), clearFocus: () => session().clearFocus(), + active: () => session().active(), + setActive: (active: CommentFocus | null) => session().setActive(active), + clearActive: () => session().clearActive(), } }, }) |
