mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 04:14:46 +08:00
fix(frontend): Turbopack about page + remove hover on web search/citations
- About: use aboutMarkdown from about-content.ts instead of raw-loader for about.md (fixes Turbopack 'Cannot find module raw-loader') - Web search: remove Tooltip from web_search and web_fetch result links - Citations: remove HoverCard from CitationLink so no hover popup on badges Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -320,43 +320,21 @@ export const CitationLink = ({
|
|||||||
const displayText = citation?.title || (!isGenericText && childrenText) || domain;
|
const displayText = citation?.title || (!isGenericText && childrenText) || domain;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InlineCitationCard>
|
<a
|
||||||
<HoverCardTrigger asChild>
|
href={href}
|
||||||
<a
|
target="_blank"
|
||||||
href={href}
|
rel="noopener noreferrer"
|
||||||
target="_blank"
|
className="inline-flex items-center"
|
||||||
rel="noopener noreferrer"
|
onClick={(e) => e.stopPropagation()}
|
||||||
className="inline-flex items-center"
|
>
|
||||||
onClick={(e) => e.stopPropagation()}
|
<Badge
|
||||||
>
|
variant="secondary"
|
||||||
<Badge
|
className="hover:bg-secondary/80 mx-0.5 cursor-pointer gap-1 rounded-full px-2 py-0.5 text-xs font-normal"
|
||||||
variant="secondary"
|
>
|
||||||
className="hover:bg-secondary/80 mx-0.5 cursor-pointer gap-1 rounded-full px-2 py-0.5 text-xs font-normal"
|
{displayText}
|
||||||
>
|
<ExternalLinkIcon className="size-3" />
|
||||||
{displayText}
|
</Badge>
|
||||||
<ExternalLinkIcon className="size-3" />
|
</a>
|
||||||
</Badge>
|
|
||||||
</a>
|
|
||||||
</HoverCardTrigger>
|
|
||||||
<InlineCitationCardBody>
|
|
||||||
<div className="p-3">
|
|
||||||
<InlineCitationSource
|
|
||||||
title={citation?.title || domain}
|
|
||||||
url={href}
|
|
||||||
description={citation?.snippet}
|
|
||||||
/>
|
|
||||||
<a
|
|
||||||
href={href}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="text-primary mt-2 inline-flex items-center gap-1 text-xs hover:underline"
|
|
||||||
>
|
|
||||||
Visit source
|
|
||||||
<ExternalLinkIcon className="size-3" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</InlineCitationCardBody>
|
|
||||||
</InlineCitationCard>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -232,13 +232,11 @@ function ToolCall({
|
|||||||
{Array.isArray(result) && (
|
{Array.isArray(result) && (
|
||||||
<ChainOfThoughtSearchResults>
|
<ChainOfThoughtSearchResults>
|
||||||
{result.map((item) => (
|
{result.map((item) => (
|
||||||
<Tooltip key={item.url} content={item.snippet}>
|
<ChainOfThoughtSearchResult key={item.url}>
|
||||||
<ChainOfThoughtSearchResult key={item.url}>
|
<a href={item.url} target="_blank" rel="noreferrer">
|
||||||
<a href={item.url} target="_blank" rel="noreferrer">
|
{item.title}
|
||||||
{item.title}
|
</a>
|
||||||
</a>
|
</ChainOfThoughtSearchResult>
|
||||||
</ChainOfThoughtSearchResult>
|
|
||||||
</Tooltip>
|
|
||||||
))}
|
))}
|
||||||
</ChainOfThoughtSearchResults>
|
</ChainOfThoughtSearchResults>
|
||||||
)}
|
)}
|
||||||
@@ -309,11 +307,9 @@ function ToolCall({
|
|||||||
>
|
>
|
||||||
<ChainOfThoughtSearchResult>
|
<ChainOfThoughtSearchResult>
|
||||||
{url && (
|
{url && (
|
||||||
<Tooltip content={<pre>{result as string}</pre>}>
|
<a href={url} target="_blank" rel="noreferrer">
|
||||||
<a href={url} target="_blank" rel="noreferrer">
|
{title}
|
||||||
{title}
|
</a>
|
||||||
</a>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
</ChainOfThoughtSearchResult>
|
</ChainOfThoughtSearchResult>
|
||||||
</ChainOfThoughtStep>
|
</ChainOfThoughtStep>
|
||||||
|
|||||||
54
frontend/src/components/workspace/settings/about-content.ts
Normal file
54
frontend/src/components/workspace/settings/about-content.ts
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/** About page markdown content. Exported as string to avoid raw-loader with Turbopack. */
|
||||||
|
export const aboutMarkdown = `# 🦌 [About DeerFlow 2.0](https://github.com/bytedance/deer-flow)
|
||||||
|
|
||||||
|
> **From Open Source, Back to Open Source**
|
||||||
|
|
||||||
|
**DeerFlow** (**D**eep **E**xploration and **E**fficient **R**esearch **Flow**) is a community-driven SuperAgent harness that researches, codes, and creates.
|
||||||
|
With the help of sandboxes, memories, tools and skills, it handles
|
||||||
|
different levels of tasks that could take minutes to hours.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🌟 GitHub Repository
|
||||||
|
|
||||||
|
Explore DeerFlow on GitHub: [github.com/bytedance/deer-flow](https://github.com/bytedance/deer-flow)
|
||||||
|
|
||||||
|
## 🌐 Official Website
|
||||||
|
|
||||||
|
Visit the official website of DeerFlow: [deerflow.tech](https://deerflow.tech/)
|
||||||
|
|
||||||
|
## 📧 Support
|
||||||
|
|
||||||
|
If you have any questions or need help, please contact us at [support@deerflow.tech](mailto:support@deerflow.tech).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📜 License
|
||||||
|
|
||||||
|
DeerFlow is proudly open source and distributed under the **MIT License**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🙌 Acknowledgments
|
||||||
|
|
||||||
|
We extend our heartfelt gratitude to the open source projects and contributors who have made DeerFlow a reality. We truly stand on the shoulders of giants.
|
||||||
|
|
||||||
|
### Core Frameworks
|
||||||
|
- **[LangChain](https://github.com/langchain-ai/langchain)**: A phenomenal framework that powers our LLM interactions and chains.
|
||||||
|
- **[LangGraph](https://github.com/langchain-ai/langgraph)**: Enabling sophisticated multi-agent orchestration.
|
||||||
|
- **[Next.js](https://nextjs.org/)**: A cutting-edge framework for building web applications.
|
||||||
|
|
||||||
|
### UI Libraries
|
||||||
|
- **[Shadcn](https://ui.shadcn.com/)**: Minimalistic components that power our UI.
|
||||||
|
- **[SToneX](https://github.com/stonexer)**: For his invaluable contribution to token-by-token visual effects.
|
||||||
|
|
||||||
|
These outstanding projects form the backbone of DeerFlow and exemplify the transformative power of open source collaboration.
|
||||||
|
|
||||||
|
### Special Thanks
|
||||||
|
Finally, we want to express our heartfelt gratitude to the core authors of DeerFlow 1.0 and 2.0:
|
||||||
|
|
||||||
|
- **[Daniel Walnut](https://github.com/hetaoBackend/)**
|
||||||
|
- **[Henry Li](https://github.com/magiccube/)**
|
||||||
|
|
||||||
|
Without their vision, passion and dedication, \`DeerFlow\` would not be what it is today.
|
||||||
|
`;
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
import { Streamdown } from "streamdown";
|
import { Streamdown } from "streamdown";
|
||||||
|
|
||||||
import about from "./about.md";
|
import { aboutMarkdown } from "./about-content";
|
||||||
|
|
||||||
export function AboutSettingsPage() {
|
export function AboutSettingsPage() {
|
||||||
return <Streamdown>{about}</Streamdown>;
|
return <Streamdown>{aboutMarkdown}</Streamdown>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user