mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 12:24:46 +08:00
fix(frontend): build + remove hover tooltips in step links
- Fix Turbopack build: replace raw-loader .md import with inlined about-content.ts; drop raw-loader from next.config and package.json - Remove all hover tooltips on step-area links (web_fetch, read_file, ls, bash, write_file, web_search) so hidden steps no longer show popups 修复:构建错误与步骤链接悬停提示 - 修复 Turbopack 构建:用内联 about-content.ts 替代 raw-loader 导入 about.md,并移除 next.config 与 package.json 中的 raw-loader - 移除步骤区域内所有链接的悬停提示(查看网页、读文件、列目录、bash、写文件、网页搜索),隐藏步骤悬停不再弹出内容 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,15 +7,6 @@ import "./src/env.js";
|
|||||||
/** @type {import("next").NextConfig} */
|
/** @type {import("next").NextConfig} */
|
||||||
const config = {
|
const config = {
|
||||||
devIndicators: false,
|
devIndicators: false,
|
||||||
turbopack: {
|
|
||||||
root: import.meta.dirname,
|
|
||||||
rules: {
|
|
||||||
"*.md": {
|
|
||||||
loaders: ["raw-loader"],
|
|
||||||
as: "*.js",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -97,7 +97,6 @@
|
|||||||
"postcss": "^8.5.3",
|
"postcss": "^8.5.3",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
"raw-loader": "^4.0.2",
|
|
||||||
"tailwindcss": "^4.0.15",
|
"tailwindcss": "^4.0.15",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"typescript": "^5.8.2",
|
"typescript": "^5.8.2",
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -328,11 +324,9 @@ function ToolCall({
|
|||||||
return (
|
return (
|
||||||
<ChainOfThoughtStep key={id} label={description} icon={FolderOpenIcon}>
|
<ChainOfThoughtStep key={id} label={description} icon={FolderOpenIcon}>
|
||||||
{path && (
|
{path && (
|
||||||
<Tooltip content={<pre>{result as string}</pre>}>
|
<ChainOfThoughtSearchResult className="cursor-pointer">
|
||||||
<ChainOfThoughtSearchResult className="cursor-pointer">
|
{path}
|
||||||
{path}
|
</ChainOfThoughtSearchResult>
|
||||||
</ChainOfThoughtSearchResult>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
</ChainOfThoughtStep>
|
</ChainOfThoughtStep>
|
||||||
);
|
);
|
||||||
@@ -346,17 +340,9 @@ function ToolCall({
|
|||||||
return (
|
return (
|
||||||
<ChainOfThoughtStep key={id} label={description} icon={BookOpenTextIcon}>
|
<ChainOfThoughtStep key={id} label={description} icon={BookOpenTextIcon}>
|
||||||
{path && (
|
{path && (
|
||||||
<Tooltip
|
<ChainOfThoughtSearchResult className="cursor-pointer">
|
||||||
content={
|
{path}
|
||||||
<pre className="max-w-[95vw] whitespace-pre-wrap">
|
</ChainOfThoughtSearchResult>
|
||||||
{result as string}
|
|
||||||
</pre>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<ChainOfThoughtSearchResult className="cursor-pointer">
|
|
||||||
{path}
|
|
||||||
</ChainOfThoughtSearchResult>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
</ChainOfThoughtStep>
|
</ChainOfThoughtStep>
|
||||||
);
|
);
|
||||||
@@ -405,11 +391,9 @@ function ToolCall({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{path && (
|
{path && (
|
||||||
<Tooltip content={t.toolCalls.clickToViewContent}>
|
<ChainOfThoughtSearchResult className="cursor-pointer">
|
||||||
<ChainOfThoughtSearchResult className="cursor-pointer">
|
{path}
|
||||||
{path}
|
</ChainOfThoughtSearchResult>
|
||||||
</ChainOfThoughtSearchResult>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
</ChainOfThoughtStep>
|
</ChainOfThoughtStep>
|
||||||
{showCitationsLoading && (
|
{showCitationsLoading && (
|
||||||
@@ -433,14 +417,12 @@ function ToolCall({
|
|||||||
icon={SquareTerminalIcon}
|
icon={SquareTerminalIcon}
|
||||||
>
|
>
|
||||||
{command && (
|
{command && (
|
||||||
<Tooltip content={<pre>{result as string}</pre>}>
|
<CodeBlock
|
||||||
<CodeBlock
|
className="mx-0 cursor-pointer border-none px-0"
|
||||||
className="mx-0 cursor-pointer border-none px-0"
|
showLineNumbers={false}
|
||||||
showLineNumbers={false}
|
language="bash"
|
||||||
language="bash"
|
code={command}
|
||||||
code={command}
|
/>
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
</ChainOfThoughtStep>
|
</ChainOfThoughtStep>
|
||||||
);
|
);
|
||||||
|
|||||||
57
frontend/src/components/workspace/settings/about-content.ts
Normal file
57
frontend/src/components/workspace/settings/about-content.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* About DeerFlow markdown content. Inlined to avoid raw-loader dependency
|
||||||
|
* (Turbopack cannot resolve raw-loader for .md imports).
|
||||||
|
*/
|
||||||
|
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