diff --git a/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx b/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx index e821dad9c1..ca805c0b19 100644 --- a/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx +++ b/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx @@ -135,14 +135,19 @@ export default function FileAuthoringCall({ } return !isCreate && editArgs.length > 0 ? buildEditPreviewDiff(editArgs) : null; }, [outputIsDiff, output, isCreate, editArgs]); - /** Plain text for the non-diff pane, and the copy payload either way. */ + /** Plain text for the non-diff pane, and the copy payload either way. A diff + * in the output supersedes everything, including a create's authored + * content: `create_file` overwriting an existing file returns a summary plus + * a unified diff, and preferring the authored content there rendered that + * diff twice, once through `DiffView` and again verbatim as the raw output + * section. */ const preview = useMemo(() => { - if (isCreate) { - return authoredContent || output; - } if (outputIsDiff) { return output; } + if (isCreate) { + return authoredContent || output; + } return parsedDiff ? diffPreviewText(parsedDiff) : output; }, [isCreate, authoredContent, outputIsDiff, output, parsedDiff]); const showOutputSection = !!output && preview !== output; diff --git a/client/src/components/Chat/Messages/Content/verticals.tsx b/client/src/components/Chat/Messages/Content/verticals.tsx index 83ba26c2e7..0eb318de59 100644 --- a/client/src/components/Chat/Messages/Content/verticals.tsx +++ b/client/src/components/Chat/Messages/Content/verticals.tsx @@ -119,7 +119,10 @@ function ImageStrip({ images, label }: { images: ImageResult[]; label: string }) ? `${image.thumbnailWidth} / ${image.thumbnailHeight}` : '1 / 1'; return ( -
  • + /** Syndicated images reuse one thumbnail across results that link to + * different pages, and grouped searches merge attachments, so the + * source alone collides. The target plus the index is unique. */ +
  • { if (current[submittedActionId] == null) {