@@ -5,7 +5,7 @@ import { render as renderSolid } from "solid-js/web"
55import { useI18n } from "../context/i18n"
66import { createHoverCommentUtility } from "../pierre/comment-hover"
77import { cloneSelectedLineRange , formatSelectedLineLabel , lineInSelectedRange } from "../pierre/selection-bridge"
8- import { LineComment , LineCommentEditor } from "./line-comment"
8+ import { LineComment , LineCommentEditor , type LineCommentEditorProps } from "./line-comment"
99
1010export type LineCommentAnnotationMeta < T > =
1111 | { kind : "comment" ; key : string ; comment : T }
@@ -55,6 +55,7 @@ type LineCommentControllerProps<T extends LineCommentShape> = {
5555 comments : Accessor < T [ ] >
5656 draftKey : Accessor < string >
5757 label : string
58+ mention ?: LineCommentEditorProps [ "mention" ]
5859 state : LineCommentStateProps < string >
5960 onSubmit : ( input : { comment : string ; selection : SelectedLineRange } ) => void
6061 onUpdate ?: ( input : { id : string ; comment : string ; selection : SelectedLineRange } ) => void
@@ -85,6 +86,7 @@ type CommentProps = {
8586type DraftProps = {
8687 value : string
8788 selection : JSX . Element
89+ mention ?: LineCommentEditorProps [ "mention" ]
8890 onInput : ( value : string ) => void
8991 onCancel : VoidFunction
9092 onSubmit : ( value : string ) => void
@@ -148,6 +150,7 @@ export function createLineCommentAnnotationRenderer<T>(props: {
148150 onPopoverFocusOut = { view ( ) . editor ! . onPopoverFocusOut }
149151 cancelLabel = { view ( ) . editor ! . cancelLabel }
150152 submitLabel = { view ( ) . editor ! . submitLabel }
153+ mention = { view ( ) . editor ! . mention }
151154 />
152155 </ Show >
153156 )
@@ -167,6 +170,7 @@ export function createLineCommentAnnotationRenderer<T>(props: {
167170 onCancel = { view ( ) . onCancel }
168171 onSubmit = { view ( ) . onSubmit }
169172 onPopoverFocusOut = { view ( ) . onPopoverFocusOut }
173+ mention = { view ( ) . mention }
170174 />
171175 )
172176 } , host )
@@ -389,6 +393,7 @@ export function createLineCommentController<T extends LineCommentShape>(
389393 return note . draft ( )
390394 } ,
391395 selection : formatSelectedLineLabel ( comment . selection , i18n . t ) ,
396+ mention : props . mention ,
392397 onInput : note . setDraft ,
393398 onCancel : note . cancelDraft ,
394399 onSubmit : ( value : string ) => {
@@ -415,6 +420,7 @@ export function createLineCommentController<T extends LineCommentShape>(
415420 return note . draft ( )
416421 } ,
417422 selection : formatSelectedLineLabel ( range , i18n . t ) ,
423+ mention : props . mention ,
418424 onInput : note . setDraft ,
419425 onCancel : note . cancelDraft ,
420426 onSubmit : ( comment ) => {
0 commit comments