diff --git a/web/messages/en.json b/web/messages/en.json new file mode 100644 index 0000000..d611109 --- /dev/null +++ b/web/messages/en.json @@ -0,0 +1,215 @@ +{ + "common": { + "cancel": "Cancel", + "save": "Save", + "settings": "Settings", + "getStarted": "Get Started", + "learnMore": "Learn More", + "starOnGitHub": "Star on GitHub", + "send": "Send", + "stop": "Stop", + "linkNotReliable": "This link might be a hallucination from AI model and may not be reliable.", + "noResult": "No result" + }, + "messageInput": { + "placeholder": "What can I do for you?", + "placeholderWithRag": "What can I do for you? \nYou may refer to RAG resources by using @." + }, + "header": { + "title": "DeerFlow" + }, + "hero": { + "title": "Deep Research", + "subtitle": "at Your Fingertips", + "description": "Meet DeerFlow, your personal Deep Research assistant. With powerful tools like search engines, web crawlers, Python and MCP services, it delivers instant insights, comprehensive reports, and even captivating podcasts.", + "footnote": "* DEER stands for Deep Exploration and Efficient Research." + }, + "settings": { + "title": "DeerFlow Settings", + "description": "Manage your DeerFlow settings here.", + "addServers": "Add Servers", + "cancel": "Cancel", + "addNewMCPServers": "Add New MCP Servers", + "mcpConfigDescription": "DeerFlow uses the standard JSON MCP config to create a new server.", + "pasteConfigBelow": "Paste your config below and click \"Add\" to add new servers.", + "add": "Add", + "general": { + "title": "General", + "autoAcceptPlan": "Allow automatic acceptance of plans", + "maxPlanIterations": "Max plan iterations", + "maxPlanIterationsDescription": "Set to 1 for single-step planning. Set to 2 or more to enable re-planning.", + "maxStepsOfPlan": "Max steps of a research plan", + "maxStepsDescription": "By default, each research plan has 3 steps.", + "maxSearchResults": "Max search results", + "maxSearchResultsDescription": "By default, each search step has 3 results." + }, + "about": { + "title": "About" + }, + "reportStyle": { + "writingStyle": "Writing Style", + "chooseTitle": "Choose Writing Style", + "chooseDesc": "Select the writing style for your research reports. Different styles are optimized for different audiences and purposes.", + "academic": "Academic", + "academicDesc": "Formal, objective, and analytical with precise terminology", + "popularScience": "Popular Science", + "popularScienceDesc": "Engaging and accessible for general audience", + "news": "News", + "newsDesc": "Factual, concise, and impartial journalistic style", + "socialMedia": "Social Media", + "socialMediaDesc": "Concise, attention-grabbing, and shareable" + } + }, + "footer": { + "quote": "Originated from Open Source, give back to Open Source.", + "license": "Licensed under MIT License", + "copyright": "DeerFlow" + }, + "chat": { + "welcome": { + "greeting": "👋 Hello, there!", + "description": "Welcome to 🦌 DeerFlow, a deep research assistant built on cutting-edge language models, helps you search on web, browse information, and handle complex tasks." + }, + "conversationStarters": [ + "How many times taller is the Eiffel Tower than the tallest building in the world?", + "How many years does an average Tesla battery last compared to a gasoline engine?", + "How many liters of water are required to produce 1 kg of beef?", + "How many times faster is the speed of light compared to the speed of sound?" + ], + "inputBox": { + "deepThinking": "Deep Thinking", + "deepThinkingTooltip": { + "title": "Deep Thinking Mode: {status}", + "description": "When enabled, DeerFlow will use reasoning model ({model}) to generate more thoughtful plans." + }, + "investigation": "Investigation", + "investigationTooltip": { + "title": "Investigation Mode: {status}", + "description": "When enabled, DeerFlow will perform a quick search before planning. This is useful for researches related to ongoing events and news." + }, + "enhancePrompt": "Enhance prompt with AI", + "on": "On", + "off": "Off" + }, + "research": { + "deepResearch": "Deep Research", + "researching": "Researching...", + "generatingReport": "Generating report...", + "reportGenerated": "Report generated", + "open": "Open", + "close": "Close", + "deepThinking": "Deep Thinking", + "report": "Report", + "activities": "Activities", + "generatePodcast": "Generate podcast", + "edit": "Edit", + "copy": "Copy", + "downloadReport": "Download report as markdown", + "searchingFor": "Searching for", + "reading": "Reading", + "runningPythonCode": "Running Python code", + "errorExecutingCode": "Error when executing the above code", + "executionOutput": "Execution output", + "retrievingDocuments": "Retrieving documents from RAG", + "running": "Running", + "generatingPodcast": "Generating podcast...", + "nowPlayingPodcast": "Now playing podcast...", + "podcast": "Podcast", + "errorGeneratingPodcast": "Error when generating podcast. Please try again.", + "downloadPodcast": "Download podcast" + }, + "messages": { + "replaying": "Replaying", + "replayDescription": "DeerFlow is now replaying the conversation...", + "replayHasStopped": "The replay has been stopped.", + "replayModeDescription": "You're now in DeerFlow's replay mode. Click the \"Play\" button on the right to start.", + "play": "Play", + "fastForward": "Fast Forward", + "demoNotice": "* This site is for demo purposes only. If you want to try your own question, please", + "clickHere": "click here", + "cloneLocally": "to clone it locally and run it." + }, + "multiAgent": { + "moveToPrevious": "Move to the previous step", + "playPause": "Play / Pause", + "moveToNext": "Move to the next step", + "toggleFullscreen": "Toggle fullscreen" + } + }, + "landing": { + "caseStudies": { + "title": "Case Studies", + "description": "See DeerFlow in action through replays.", + "clickToWatch": "Click to watch replay", + "cases": [ + { + "title": "How tall is Eiffel Tower compared to tallest building?", + "description": "The research compares the heights and global significance of the Eiffel Tower and Burj Khalifa, and uses Python code to calculate the multiples." + }, + { + "title": "What are the top trending repositories on GitHub?", + "description": "The research utilized MCP services to identify the most popular GitHub repositories and documented them in detail using search engines." + }, + { + "title": "Write an article about Nanjing's traditional dishes", + "description": "The study vividly showcases Nanjing's famous dishes through rich content and imagery, uncovering their hidden histories and cultural significance." + }, + { + "title": "How to decorate a small rental apartment?", + "description": "The study provides readers with practical and straightforward methods for decorating apartments, accompanied by inspiring images." + }, + { + "title": "Introduce the movie 'Léon: The Professional'", + "description": "The research provides a comprehensive introduction to the movie 'Léon: The Professional', including its plot, characters, and themes." + }, + { + "title": "How do you view the takeaway war in China? (in Chinese)", + "description": "The research analyzes the intensifying competition between JD and Meituan, highlighting their strategies, technological innovations, and challenges." + }, + { + "title": "Are ultra-processed foods linked to health?", + "description": "The research examines the health risks of rising ultra-processed food consumption, urging more research on long-term effects and individual differences." + }, + { + "title": "Write an article on \"Would you insure your AI twin?\"", + "description": "The research explores the concept of insuring AI twins, highlighting their benefits, risks, ethical considerations, and the evolving regulatory." + } + ] + }, + "coreFeatures": { + "title": "Core Features", + "description": "Find out what makes DeerFlow effective.", + "features": [ + { + "name": "Dive Deeper and Reach Wider", + "description": "Unlock deeper insights with advanced tools. Our powerful search + crawling and Python tools gathers comprehensive data, delivering in-depth reports to enhance your study." + }, + { + "name": "Human-in-the-loop", + "description": "Refine your research plan, or adjust focus areas all through simple natural language." + }, + { + "name": "Lang Stack", + "description": "Build with confidence using the LangChain and LangGraph frameworks." + }, + { + "name": "MCP Integrations", + "description": "Supercharge your research workflow and expand your toolkit with seamless MCP integrations." + }, + { + "name": "Podcast Generation", + "description": "Instantly generate podcasts from reports. Perfect for on-the-go learning or sharing findings effortlessly." + } + ] + }, + "multiAgent": { + "title": "Multi-Agent Architecture", + "description": "Experience the agent teamwork with our Supervisor + Handoffs design pattern." + }, + "joinCommunity": { + "title": "Join the DeerFlow Community", + "description": "Contribute brilliant ideas to shape the future of DeerFlow. Collaborate, innovate, and make impacts.", + "contributeNow": "Contribute Now" + } + } +} diff --git a/web/messages/zh.json b/web/messages/zh.json new file mode 100644 index 0000000..863cb45 --- /dev/null +++ b/web/messages/zh.json @@ -0,0 +1,220 @@ +{ + "common": { + "cancel": "取消", + "save": "保存", + "settings": "设置", + "getStarted": "开始使用", + "learnMore": "了解更多", + "starOnGitHub": "在 GitHub 上点赞", + "send": "发送", + "stop": "停止", + "linkNotReliable": "此链接可能是 AI 生成的幻觉,可能并不可靠。", + "noResult": "无结果" + }, + "messageInput": { + "placeholder": "我能帮你做什么?", + "placeholderWithRag": "我能帮你做什么?\n你可以通过 @ 引用 RAG 资源。" + }, + "header": { + "title": "DeerFlow" + }, + "hero": { + "title": "深度研究", + "subtitle": "触手可及", + "description": "认识 DeerFlow,您的个人深度研究助手。凭借搜索引擎、网络爬虫、Python 和 MCP 服务等强大工具,它能提供即时洞察、全面报告,甚至制作引人入胜的播客。", + "footnote": "* DEER 代表深度探索和高效研究。" + }, + "settings": { + "title": "DeerFlow 设置", + "description": "在这里管理您的 DeerFlow 设置。", + "cancel": "取消", + "addServers": "添加服务器", + "addNewMCPServers": "添加新的 MCP 服务器", + "mcpConfigDescription": "DeerFlow 使用标准 JSON MCP 配置来创建新服务器。", + "pasteConfigBelow": "将您的配置粘贴到下面,然后点击\"添加\"来添加新服务器。", + "add": "添加", + "general": { + "title": "通用", + "autoAcceptPlan": "允许自动接受计划", + "maxPlanIterations": "最大计划迭代次数", + "maxPlanIterationsDescription": "设置为 1 进行单步规划。设置为 2 或更多以启用重新规划。", + "maxStepsOfPlan": "研究计划的最大步骤数", + "maxStepsDescription": "默认情况下,每个研究计划有 3 个步骤。", + "maxSearchResults": "最大搜索结果数", + "maxSearchResultsDescription": "默认情况下,每个搜索步骤有 3 个结果。" + }, + "about": { + "title": "关于" + }, + "reportStyle": { + "writingStyle": "写作风格", + "chooseTitle": "选择写作风格", + "chooseDesc": "请选择您的研究报告的写作风格。不同风格适用于不同受众和用途。", + "academic": "学术", + "academicDesc": "正式、客观、分析性强,术语精确", + "popularScience": "科普", + "popularScienceDesc": "生动有趣,适合大众阅读", + "news": "新闻", + "newsDesc": "事实、简明、公正的新闻风格", + "socialMedia": "社交媒体", + "socialMediaDesc": "简洁有趣,易于传播" + } + }, + "footer": { + "quote": "源于开源,回馈开源。", + "license": "基于 MIT 许可证授权", + "copyright": "DeerFlow" + }, + "chat": { + "page": { + "loading": "正在加载 DeerFlow...", + "welcomeUser": "欢迎,{username}", + "starOnGitHub": "在 GitHub 上点赞" + }, + "welcome": { + "greeting": "👋 你好!", + "description": "欢迎来到 🦌 DeerFlow,一个基于前沿语言模型构建的深度研究助手,帮助您搜索网络、浏览信息并处理复杂任务。" + }, + "conversationStarters": [ + "埃菲尔铁塔比世界最高建筑高多少倍?", + "特斯拉电池的平均寿命比汽油发动机长多少年?", + "生产1公斤牛肉需要多少升水?", + "光速比声速快多少倍?" + ], + "inputBox": { + "deepThinking": "深度思考", + "deepThinkingTooltip": { + "title": "深度思考模式:{status}", + "description": "启用后,DeerFlow 将使用推理模型({model})生成更深思熟虑的计划。" + }, + "investigation": "调研", + "investigationTooltip": { + "title": "调研模式:{status}", + "description": "启用后,DeerFlow 将在规划前进行快速搜索。这对于与时事和新闻相关的研究很有用。" + }, + "enhancePrompt": "用 AI 增强提示", + "on": "开启", + "off": "关闭" + }, + "research": { + "deepResearch": "深度研究", + "researching": "研究中...", + "generatingReport": "生成报告中...", + "reportGenerated": "报告已生成", + "open": "打开", + "close": "关闭", + "deepThinking": "深度思考", + "report": "报告", + "activities": "活动", + "generatePodcast": "生成播客", + "edit": "编辑", + "copy": "复制", + "downloadReport": "下载报告为 Markdown", + "searchingFor": "搜索", + "reading": "阅读中", + "runningPythonCode": "运行 Python 代码", + "errorExecutingCode": "执行上述代码时出错", + "executionOutput": "执行输出", + "retrievingDocuments": "从 RAG 检索文档", + "running": "运行", + "generatingPodcast": "生成播客中...", + "nowPlayingPodcast": "正在播放播客...", + "podcast": "播客", + "errorGeneratingPodcast": "生成播客时出错。请重试。", + "downloadPodcast": "下载播客" + }, + "messages": { + "replaying": "回放中", + "replayDescription": "DeerFlow 正在回放对话...", + "replayHasStopped": "回放已停止。", + "replayModeDescription": "您现在处于 DeerFlow 的回放模式。点击右侧的\"播放\"按钮开始。", + "play": "播放", + "fastForward": "快进", + "demoNotice": "* 此网站仅用于演示目的。如果您想尝试自己的问题,请", + "clickHere": "点击这里", + "cloneLocally": "在本地克隆并运行它。" + }, + "multiAgent": { + "moveToPrevious": "移动到上一步", + "playPause": "播放 / 暂停", + "moveToNext": "移动到下一步", + "toggleFullscreen": "切换全屏" + } + }, + "landing": { + "caseStudies": { + "title": "案例研究", + "description": "通过回放查看 DeerFlow 的实际应用。", + "clickToWatch": "点击观看回放", + "cases": [ + { + "title": "埃菲尔铁塔与最高建筑相比有多高?", + "description": "该研究比较了埃菲尔铁塔和哈利法塔的高度和全球意义,并使用 Python 代码计算倍数。" + }, + { + "title": "GitHub 上最热门的仓库有哪些?", + "description": "该研究利用 MCP 服务识别最受欢迎的 GitHub 仓库,并使用搜索引擎详细记录它们。" + }, + { + "title": "写一篇关于南京传统菜肴的文章", + "description": "该研究通过丰富的内容和图像生动地展示了南京的著名菜肴,揭示了它们隐藏的历史和文化意义。" + }, + { + "title": "如何装饰小型出租公寓?", + "description": "该研究为读者提供了实用而直接的公寓装饰方法,并配有鼓舞人心的图像。" + }, + { + "title": "介绍电影《这个杀手不太冷》", + "description": "该研究全面介绍了电影《这个杀手不太冷》,包括其情节、角色和主题。" + }, + { + "title": "你如何看待中国的外卖大战?(中文)", + "description": "该研究分析了京东和美团之间日益激烈的竞争,突出了它们的策略、技术创新和挑战。" + }, + { + "title": "超加工食品与健康有关吗?", + "description": "该研究检查了超加工食品消费增加的健康风险,敦促对长期影响和个体差异进行更多研究。" + }, + { + "title": "写一篇关于\"你会为你的 AI 双胞胎投保吗?\"的文章", + "description": "该研究探讨了为 AI 双胞胎投保的概念,突出了它们的好处、风险、伦理考虑和不断发展的监管。" + } + ] + }, + "coreFeatures": { + "title": "核心功能", + "description": "了解是什么让 DeerFlow 如此有效。", + "features": [ + { + "name": "深入挖掘,触及更广", + "description": "使用高级工具解锁更深层的洞察。我们强大的搜索+爬取和 Python 工具收集全面的数据,提供深入的报告来增强您的研究。" + }, + { + "name": "人机协作", + "description": "通过简单的自然语言完善您的研究计划或调整重点领域。" + }, + { + "name": "Lang 技术栈", + "description": "使用 LangChain 和 LangGraph 框架自信地构建。" + }, + { + "name": "MCP 集成", + "description": "通过无缝的 MCP 集成增强您的研究工作流程并扩展您的工具包。" + }, + { + "name": "播客生成", + "description": "从报告中即时生成播客。非常适合移动学习或轻松分享发现。" + } + ] + }, + "multiAgent": { + "title": "多智能体架构", + "description": "通过我们的监督者 + 交接设计模式体验智能体团队合作。" + }, + "joinCommunity": { + "title": "加入 DeerFlow 社区", + "description": "贡献精彩想法,塑造 DeerFlow 的未来。协作、创新并产生影响。", + "contributeNow": "立即贡献" + } + } +} diff --git a/web/next.config.js b/web/next.config.js index 26d4628..0253757 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -6,6 +6,9 @@ // SPDX-License-Identifier: MIT import "./src/env.js"; +import createNextIntlPlugin from 'next-intl/plugin'; + +const withNextIntl = createNextIntlPlugin('./src/i18n.ts'); /** @type {import("next").NextConfig} */ @@ -39,4 +42,4 @@ const config = { output: "standalone", }; -export default config; +export default withNextIntl(config); diff --git a/web/package.json b/web/package.json index 6b57b31..4e02b41 100644 --- a/web/package.json +++ b/web/package.json @@ -46,6 +46,7 @@ "@tiptap/extension-table-row": "^2.11.7", "@tiptap/extension-text": "^2.12.0", "@tiptap/react": "^2.11.7", + "@types/js-cookie": "^3.0.6", "@xyflow/react": "^12.6.0", "best-effort-json-parser": "^1.1.3", "class-variance-authority": "^0.7.1", @@ -55,6 +56,7 @@ "hast": "^1.0.0", "highlight.js": "^11.11.1", "immer": "^10.1.1", + "js-cookie": "^3.0.5", "katex": "^0.16.21", "lowlight": "^3.3.0", "lru-cache": "^11.1.0", @@ -62,6 +64,7 @@ "motion": "^12.7.4", "nanoid": "^5.1.5", "next": "^15.2.3", + "next-intl": "^4.3.1", "next-themes": "^0.4.6", "novel": "^1.0.2", "react": "^19.0.0", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index ab9f7eb..38175d7 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -95,6 +95,9 @@ importers: '@tiptap/react': specifier: ^2.11.7 version: 2.11.7(@tiptap/core@2.11.7(@tiptap/pm@2.11.7))(@tiptap/pm@2.11.7)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@types/js-cookie': + specifier: ^3.0.6 + version: 3.0.6 '@xyflow/react': specifier: ^12.6.0 version: 12.6.0(@types/react@19.1.2)(immer@10.1.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -122,6 +125,9 @@ importers: immer: specifier: ^10.1.1 version: 10.1.1 + js-cookie: + specifier: ^3.0.5 + version: 3.0.5 katex: specifier: ^0.16.21 version: 0.16.21 @@ -143,6 +149,9 @@ importers: next: specifier: ^15.2.3 version: 15.3.0(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + next-intl: + specifier: ^4.3.1 + version: 4.3.1(next@15.3.0(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) next-themes: specifier: ^0.4.6 version: 0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -367,6 +376,24 @@ packages: '@floating-ui/utils@0.2.9': resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==} + '@formatjs/ecma402-abstract@2.3.4': + resolution: {integrity: sha512-qrycXDeaORzIqNhBOx0btnhpD1c+/qFIHAN9znofuMJX6QBwtbrmlpWfD4oiUUD2vJUOIYFA/gYtg2KAMGG7sA==} + + '@formatjs/fast-memoize@2.2.7': + resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==} + + '@formatjs/icu-messageformat-parser@2.11.2': + resolution: {integrity: sha512-AfiMi5NOSo2TQImsYAg8UYddsNJ/vUEv/HaNqiFjnI3ZFfWihUtD5QtuX6kHl8+H+d3qvnE/3HZrfzgdWpsLNA==} + + '@formatjs/icu-skeleton-parser@1.8.14': + resolution: {integrity: sha512-i4q4V4qslThK4Ig8SxyD76cp3+QJ3sAqr7f6q9VVfeGtxG9OhiAk3y9XF6Q41OymsKzsGQ6OQQoJNY4/lI8TcQ==} + + '@formatjs/intl-localematcher@0.5.10': + resolution: {integrity: sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q==} + + '@formatjs/intl-localematcher@0.6.1': + resolution: {integrity: sha512-ePEgLgVCqi2BBFnTMWPfIghu6FkbZnnBVhO2sSxvLfrdFw7wCHAHiDoM2h4NRgjbaY7+B7HgOLZGkK187pZTZg==} + '@hookform/resolvers@5.0.1': resolution: {integrity: sha512-u/+Jp83luQNx9AdyW2fIPGY6Y7NG68eN2ZW8FOJYL+M0i4s49+refdJdOp/A9n9HFQtQs3HIDHQvX3ZET2o7YA==} peerDependencies: @@ -1285,6 +1312,9 @@ packages: '@scena/matrix@1.1.1': resolution: {integrity: sha512-JVKBhN0tm2Srl+Yt+Ywqu0oLgLcdemDQlD1OxmN9jaCTwaFPZ7tY8n6dhVgMEaR9qcR7r+kAlMXnSfNyYdE+Vg==} + '@schummar/icu-type-parser@1.21.5': + resolution: {integrity: sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==} + '@standard-schema/utils@0.3.0': resolution: {integrity: sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==} @@ -1680,6 +1710,9 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/js-cookie@3.0.6': + resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -2264,6 +2297,9 @@ packages: supports-color: optional: true + decimal.js@10.5.0: + resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} + decode-named-character-reference@1.1.0: resolution: {integrity: sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==} @@ -2752,6 +2788,9 @@ packages: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} + intl-messageformat@10.7.16: + resolution: {integrity: sha512-UmdmHUmp5CIKKjSoE10la5yfU+AYJAaiYLsodbjL4lji83JNvgOQUjGaGhGrpFCb0Uh7sl7qfP1IyILa8Z40ug==} + is-alphabetical@1.0.4: resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} @@ -2912,6 +2951,10 @@ packages: react: optional: true + js-cookie@3.0.5: + resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} + engines: {node: '>=14'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -3305,9 +3348,23 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + next-intl@4.3.1: + resolution: {integrity: sha512-FylHpOoQw5MpOyJt4cw8pNEGba7r3jKDSqt112fmBqXVceGR5YncmqpxS5MvSHsWRwbjqpOV8OsZCIY/4f4HWg==} + peerDependencies: + next: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + next-themes@0.4.6: resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==} peerDependencies: @@ -4128,6 +4185,11 @@ packages: peerDependencies: react: '*' + use-intl@4.3.1: + resolution: {integrity: sha512-8Xn5RXzeHZhWqqZimi1wi2pKFqm0NxRUOB41k1QdjbPX+ysoeLW3Ey+fi603D/e5EGb0fYw8WzjgtUagJdlIvg==} + peerDependencies: + react: ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 + use-sidecar@1.1.3: resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==} engines: {node: '>=10'} @@ -4378,6 +4440,36 @@ snapshots: '@floating-ui/utils@0.2.9': {} + '@formatjs/ecma402-abstract@2.3.4': + dependencies: + '@formatjs/fast-memoize': 2.2.7 + '@formatjs/intl-localematcher': 0.6.1 + decimal.js: 10.5.0 + tslib: 2.8.1 + + '@formatjs/fast-memoize@2.2.7': + dependencies: + tslib: 2.8.1 + + '@formatjs/icu-messageformat-parser@2.11.2': + dependencies: + '@formatjs/ecma402-abstract': 2.3.4 + '@formatjs/icu-skeleton-parser': 1.8.14 + tslib: 2.8.1 + + '@formatjs/icu-skeleton-parser@1.8.14': + dependencies: + '@formatjs/ecma402-abstract': 2.3.4 + tslib: 2.8.1 + + '@formatjs/intl-localematcher@0.5.10': + dependencies: + tslib: 2.8.1 + + '@formatjs/intl-localematcher@0.6.1': + dependencies: + tslib: 2.8.1 + '@hookform/resolvers@5.0.1(react-hook-form@7.56.1(react@19.1.0))': dependencies: '@standard-schema/utils': 0.3.0 @@ -5248,6 +5340,8 @@ snapshots: dependencies: '@daybrush/utils': 1.13.0 + '@schummar/icu-type-parser@1.21.5': {} + '@standard-schema/utils@0.3.0': {} '@swc/counter@0.1.3': {} @@ -5633,6 +5727,8 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/js-cookie@3.0.6': {} + '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} @@ -6256,6 +6352,8 @@ snapshots: dependencies: ms: 2.1.3 + decimal.js@10.5.0: {} + decode-named-character-reference@1.1.0: dependencies: character-entities: 2.0.2 @@ -6919,6 +7017,13 @@ snapshots: hasown: 2.0.2 side-channel: 1.1.0 + intl-messageformat@10.7.16: + dependencies: + '@formatjs/ecma402-abstract': 2.3.4 + '@formatjs/fast-memoize': 2.2.7 + '@formatjs/icu-messageformat-parser': 2.11.2 + tslib: 2.8.1 + is-alphabetical@1.0.4: {} is-alphabetical@2.0.1: {} @@ -7081,6 +7186,8 @@ snapshots: '@types/react': 19.1.2 react: 19.1.0 + js-cookie@3.0.5: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -7660,8 +7767,20 @@ snapshots: natural-compare@1.4.0: {} + negotiator@1.0.0: {} + neo-async@2.6.2: {} + next-intl@4.3.1(next@15.3.0(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3): + dependencies: + '@formatjs/intl-localematcher': 0.5.10 + negotiator: 1.0.0 + next: 15.3.0(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + react: 19.1.0 + use-intl: 4.3.1(react@19.1.0) + optionalDependencies: + typescript: 5.8.3 + next-themes@0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: react: 19.1.0 @@ -8737,6 +8856,13 @@ snapshots: dependencies: react: 19.1.0 + use-intl@4.3.1(react@19.1.0): + dependencies: + '@formatjs/fast-memoize': 2.2.7 + '@schummar/icu-type-parser': 1.21.5 + intl-messageformat: 10.7.16 + react: 19.1.0 + use-sidecar@1.1.3(@types/react@19.1.2)(react@19.1.0): dependencies: detect-node-es: 1.1.0 diff --git a/web/src/app/chat/components/conversation-starter.tsx b/web/src/app/chat/components/conversation-starter.tsx index 59841f7..c20b87d 100644 --- a/web/src/app/chat/components/conversation-starter.tsx +++ b/web/src/app/chat/components/conversation-starter.tsx @@ -2,17 +2,12 @@ // SPDX-License-Identifier: MIT import { motion } from "framer-motion"; +import { useTranslations } from "next-intl"; import { cn } from "~/lib/utils"; import { Welcome } from "./welcome"; -const questions = [ - "How many times taller is the Eiffel Tower than the tallest building in the world?", - "How many years does an average Tesla battery last compared to a gasoline engine?", - "How many liters of water are required to produce 1 kg of beef?", - "How many times faster is the speed of light compared to the speed of sound?", -]; export function ConversationStarter({ className, onSend, @@ -20,6 +15,9 @@ export function ConversationStarter({ className?: string; onSend?: (message: string) => void; }) { + const t = useTranslations("chat"); + const questions = t.raw("conversationStarters") as string[]; + return (
- When enabled, DeerFlow will use reasoning model ( - {config.models.reasoning?.[0]}) to generate more thoughtful - plans. + {t("deepThinkingTooltip.description", { + model: config.models.reasoning?.[0] ?? "", + })}
- When enabled, DeerFlow will perform a quick search before - planning. This is useful for researches related to ongoing - events and news. -
+{t("investigationTooltip.description")}
- Meet DeerFlow, your personal Deep Research assistant. With powerful - tools like search engines, web crawlers, Python and MCP services, it - delivers instant insights, comprehensive reports, and even captivating - podcasts. + {t('description')}
* DEER stands for Deep Exploration and Efficient Research.
+{t('footnote')}