mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-24 08:55:59 +00:00
feat(citations): inline citation links with [citation:Title](URL)
- Backend: add citation format to lead_agent and general_purpose prompts - Add CitationLink component (Badge + HoverCard) for citation cards - MarkdownContent: detect citation: prefix in link text, render CitationLink - Message/artifact/subtask: use MarkdownContent or Streamdown with CitationLink - message-list-item: pass img via components prop (remove isHuman/img) - message-group, subtask-card: drop unused imports; fix import order (lint) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import { humanMessagePlugins } from "@/core/streamdown";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
import { CopyButton } from "../copy-button";
|
||||
|
||||
import { MarkdownContent } from "./markdown-content";
|
||||
|
||||
export function MessageListItem({
|
||||
@@ -158,14 +159,15 @@ function MessageContent_({
|
||||
isLoading={isLoading}
|
||||
rehypePlugins={[...rehypePlugins, [rehypeKatex, { output: "html" }]]}
|
||||
className="my-3"
|
||||
isHuman={false}
|
||||
img={(props) => (
|
||||
<MessageImage
|
||||
{...props}
|
||||
threadId={thread_id}
|
||||
maxWidth="90%"
|
||||
/>
|
||||
)}
|
||||
components={{
|
||||
img: (props) => (
|
||||
<MessageImage
|
||||
{...props}
|
||||
threadId={thread_id}
|
||||
maxWidth="90%"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</AIElementMessageContent>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user