summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/pages/session
diff options
context:
space:
mode:
authorShoubhit Dash <[email protected]>2026-04-01 16:11:57 +0530
committerGitHub <[email protected]>2026-04-01 16:11:57 +0530
commita3a6cf1c075c40c87980dda181d586a1d06ea304 (patch)
tree71b3c3d7144f7c38eb73d7e173852858313fc4bf /packages/app/src/pages/session
parent47a676111a3532aebed01110494742e536b7e5b4 (diff)
downloadopencode-a3a6cf1c075c40c87980dda181d586a1d06ea304.tar.gz
opencode-a3a6cf1c075c40c87980dda181d586a1d06ea304.zip
feat(comments): support file mentions (#20447)
Diffstat (limited to 'packages/app/src/pages/session')
-rw-r--r--packages/app/src/pages/session/file-tabs.tsx3
-rw-r--r--packages/app/src/pages/session/review-tab.tsx4
2 files changed, 7 insertions, 0 deletions
diff --git a/packages/app/src/pages/session/file-tabs.tsx b/packages/app/src/pages/session/file-tabs.tsx
index 8208b6c99..9430b7025 100644
--- a/packages/app/src/pages/session/file-tabs.tsx
+++ b/packages/app/src/pages/session/file-tabs.tsx
@@ -302,6 +302,9 @@ export function FileTabContent(props: { tab: string }) {
comments: fileComments,
label: language.t("ui.lineComment.submit"),
draftKey: () => path() ?? props.tab,
+ mention: {
+ items: file.searchFilesAndDirectories,
+ },
state: {
opened: () => note.openedComment,
setOpened: (id) => setNote("openedComment", id),
diff --git a/packages/app/src/pages/session/review-tab.tsx b/packages/app/src/pages/session/review-tab.tsx
index c073e6214..76b65a221 100644
--- a/packages/app/src/pages/session/review-tab.tsx
+++ b/packages/app/src/pages/session/review-tab.tsx
@@ -30,6 +30,9 @@ export interface SessionReviewTabProps {
onFocusedCommentChange?: (focus: { file: string; id: string } | null) => void
focusedFile?: string
onScrollRef?: (el: HTMLDivElement) => void
+ commentMentions?: {
+ items: (query: string) => string[] | Promise<string[]>
+ }
classes?: {
root?: string
header?: string
@@ -162,6 +165,7 @@ export function SessionReviewTab(props: SessionReviewTabProps) {
onLineCommentUpdate={props.onLineCommentUpdate}
onLineCommentDelete={props.onLineCommentDelete}
lineCommentActions={props.lineCommentActions}
+ lineCommentMention={props.commentMentions}
comments={props.comments}
focusedComment={props.focusedComment}
onFocusedCommentChange={props.onFocusedCommentChange}