mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-26 09: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:
@@ -1,6 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { useI18n } from "@/core/i18n/hooks";
|
||||
import type { Translations } from "@/core/i18n/locales/types";
|
||||
|
||||
import { Tooltip } from "./tooltip";
|
||||
|
||||
export type AgentMode = "flash" | "thinking" | "pro" | "ultra";
|
||||
@@ -8,7 +10,7 @@ export type AgentMode = "flash" | "thinking" | "pro" | "ultra";
|
||||
function getModeLabelKey(
|
||||
mode: AgentMode,
|
||||
): keyof Pick<
|
||||
import("@/core/i18n/locales/types").Translations["inputBox"],
|
||||
Translations["inputBox"],
|
||||
"flashMode" | "reasoningMode" | "proMode" | "ultraMode"
|
||||
> {
|
||||
switch (mode) {
|
||||
@@ -26,7 +28,7 @@ function getModeLabelKey(
|
||||
function getModeDescriptionKey(
|
||||
mode: AgentMode,
|
||||
): keyof Pick<
|
||||
import("@/core/i18n/locales/types").Translations["inputBox"],
|
||||
Translations["inputBox"],
|
||||
"flashModeDescription" | "reasoningModeDescription" | "proModeDescription" | "ultraModeDescription"
|
||||
> {
|
||||
switch (mode) {
|
||||
|
||||
Reference in New Issue
Block a user