diff --git a/frontend/src/components/DiffCard.tsx b/frontend/src/components/DiffCard.tsx index e74e0464..31779f46 100644 --- a/frontend/src/components/DiffCard.tsx +++ b/frontend/src/components/DiffCard.tsx @@ -26,6 +26,7 @@ import { useReview, type ReviewDraft } from '@/contexts/ReviewProvider'; import { CommentWidgetLine } from '@/components/diff/CommentWidgetLine'; import { ReviewCommentRenderer } from '@/components/diff/ReviewCommentRenderer'; import { useDiffViewMode } from '@/stores/useDiffViewStore'; +import { useProject } from '@/contexts/project-context'; type Props = { diff: Diff; @@ -75,6 +76,7 @@ export default function DiffCard({ const theme = getActualTheme(config?.theme); const { comments, drafts, setDraft } = useReview(); const globalMode = useDiffViewMode(); + const { projectId } = useProject(); const oldName = diff.oldPath || undefined; const newName = diff.newPath || oldName || 'unknown'; @@ -173,12 +175,15 @@ export default function DiffCard({ widgetKey={widgetKey} onSave={props.onClose} onCancel={props.onClose} + projectId={projectId} /> ); }; const renderExtendLine = (lineData: any) => { - return ; + return ( + + ); }; // Title row diff --git a/frontend/src/components/diff/CommentWidgetLine.tsx b/frontend/src/components/diff/CommentWidgetLine.tsx index 20429d48..f09679ec 100644 --- a/frontend/src/components/diff/CommentWidgetLine.tsx +++ b/frontend/src/components/diff/CommentWidgetLine.tsx @@ -1,5 +1,6 @@ import React, { useState, useRef, useEffect } from 'react'; import { Button } from '@/components/ui/button'; +import { FileSearchTextarea } from '@/components/ui/file-search-textarea'; import { useReview, type ReviewDraft } from '@/contexts/ReviewProvider'; interface CommentWidgetLineProps { @@ -7,6 +8,7 @@ interface CommentWidgetLineProps { widgetKey: string; onSave: () => void; onCancel: () => void; + projectId?: string; } export function CommentWidgetLine({ @@ -14,6 +16,7 @@ export function CommentWidgetLine({ widgetKey, onSave, onCancel, + projectId, }: CommentWidgetLineProps) { const { setDraft, addComment } = useReview(); const [value, setValue] = useState(draft.text); @@ -52,14 +55,15 @@ export function CommentWidgetLine({ return (
-