From a3a6cf1c075c40c87980dda181d586a1d06ea304 Mon Sep 17 00:00:00 2001 From: Shoubhit Dash Date: Wed, 1 Apr 2026 16:11:57 +0530 Subject: feat(comments): support file mentions (#20447) --- packages/app/src/pages/session/file-tabs.tsx | 3 +++ packages/app/src/pages/session/review-tab.tsx | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'packages/app/src/pages/session') 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 + } 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} -- cgit v1.2.3