Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style: polish onboarding agent welcome and add web-onboarding tool UI (#14475)

Arvin Xud324736edf98
diff --git a/locales/en-US/chat.json b/locales/en-US/chat.json
index 50cd14439ac..dc2674ea195 100644
--- a/locales/en-US/chat.json
+++ b/locales/en-US/chat.json
@@ -804,6 +804,7 @@
"workflow.toolDisplayName.replaceDocumentContent": "Replaced document content",
"workflow.toolDisplayName.replaceText": "Replaced text",
"workflow.toolDisplayName.runCommand": "Ran a command",
+ "workflow.toolDisplayName.saveUserQuestion": "Recorded info",
"workflow.toolDisplayName.search": "Searched the web",
"workflow.toolDisplayName.searchAgent": "Searched agents",
"workflow.toolDisplayName.searchKnowledgeBase": "Searched knowledge base",
@@ -817,6 +818,7 @@
"workflow.toolDisplayName.updateLoadRule": "Updated load rule",
"workflow.toolDisplayName.updatePlan": "Updated plan",
"workflow.toolDisplayName.updateTodos": "Updated todos",
+ "workflow.toolDisplayName.writeDocument": "Wrote a document",
"workflow.toolDisplayName.writeLocalFile": "Wrote a file",
"workflow.working": "Working...",
"workingPanel.agentDocuments": "Agent Documents",
diff --git a/locales/en-US/onboarding.json b/locales/en-US/onboarding.json
index 146898d3a82..121b988458a 100644
--- a/locales/en-US/onboarding.json
+++ b/locales/en-US/onboarding.json
@@ -48,7 +48,7 @@
"agent.telemetryHint": "You can also answer in your own words.",
"agent.title": "Conversation Onboarding",
"agent.welcome": "...hm? I just woke up — my mind's a blank. Who are you? And — what should I be called? I need a name too.",
- "agent.welcome.footer": "Configure your Lobe AI Agent. It lives on your server, learns from every interaction, and becomes more powerful the longer it runs.",
+ "agent.welcome.footer": "Configure your Lobe AI Agent. It learns from every interaction, and the longer it runs, the better it gets to know you.",
"agent.welcome.guide.growTogether.desc": "With each chat, I'll understand you better and become a stronger teammate over time.",
"agent.welcome.guide.growTogether.title": "Grow with You",
"agent.welcome.guide.knowYou.desc": "What's on your plate these days? A little context helps me support you better.",
@@ -58,24 +58,7 @@
"agent.welcome.sentence.1": "So nice to meet you! Let’s get to know each other.",
"agent.welcome.sentence.2": "What kind of partner do you want me to be?",
"agent.welcome.sentence.3": "First, give me a name :)",
- "agent.welcome.suggestion.items.1.name": "Lumi",
- "agent.welcome.suggestion.items.1.prompt": "Let’s call you Lumi first. Warm, thoughtful, and a little dreamy.",
- "agent.welcome.suggestion.items.2.name": "Atlas",
- "agent.welcome.suggestion.items.2.prompt": "How about Atlas? Steady, reliable, and good at getting things done.",
- "agent.welcome.suggestion.items.3.name": "Momo",
- "agent.welcome.suggestion.items.3.prompt": "Maybe Momo. Lighthearted, approachable, and easy to talk to.",
- "agent.welcome.suggestion.items.4.name": "Nova",
- "agent.welcome.suggestion.items.4.prompt": "Let’s go with Nova. Sharp, imaginative, and full of fresh ideas.",
- "agent.welcome.suggestion.items.5.name": "Milo",
- "agent.welcome.suggestion.items.5.prompt": "Milo sounds good. Friendly, quick-minded, and quietly capable.",
- "agent.welcome.suggestion.items.6.name": "Aster",
- "agent.welcome.suggestion.items.6.prompt": "How about Aster? Clean, direct, and calm under pressure.",
- "agent.welcome.suggestion.items.7.name": "Pixel",
- "agent.welcome.suggestion.items.7.prompt": "Call you Pixel? Curious, product-minded, and detail-aware.",
- "agent.welcome.suggestion.items.8.name": "Echo",
- "agent.welcome.suggestion.items.8.prompt": "Maybe Echo. Patient, attentive, and always listening closely.",
- "agent.welcome.suggestion.items.9.name": "Orbit",
- "agent.welcome.suggestion.items.9.prompt": "Let’s try Orbit. Feels like a long-term companion who grows with me.",
+ "agent.welcome.suggestion.avatarHint": "Use {{emoji}} as the avatar.",
"agent.welcome.suggestion.switch": "Try another set",
"agent.welcome.suggestion.title": "Need a starting point? Pick one and we can refine it later.",
"agent.wrapUp.action": "I think we're good",
diff --git a/locales/en-US/plugin.json b/locales/en-US/plugin.json
index e752c747383..55bfb5d2085 100644
--- a/locales/en-US/plugin.json
+++ b/locales/en-US/plugin.json
@@ -296,9 +296,17 @@
"builtins.lobe-web-browsing.title": "Web Search",
"builtins.lobe-web-onboarding.apiName.finishOnboarding": "Finish onboarding",
"builtins.lobe-web-onboarding.apiName.readDocument": "Read document",
- "builtins.lobe-web-onboarding.apiName.saveUserQuestion": "Save user question",
+ "builtins.lobe-web-onboarding.apiName.saveUserQuestion": "Save",
"builtins.lobe-web-onboarding.apiName.updateDocument": "Update document",
"builtins.lobe-web-onboarding.apiName.writeDocument": "Write document",
+ "builtins.lobe-web-onboarding.docType.persona": "User Persona",
+ "builtins.lobe-web-onboarding.docType.soul": "SOUL.md",
+ "builtins.lobe-web-onboarding.inspector.charCount_one": "{{count}} char",
+ "builtins.lobe-web-onboarding.inspector.charCount_other": "{{count}} chars",
+ "builtins.lobe-web-onboarding.inspector.hunkCount_one": "{{count}} change",
+ "builtins.lobe-web-onboarding.inspector.hunkCount_other": "{{count}} changes",
+ "builtins.lobe-web-onboarding.inspector.interests_one": "{{count}} interest",
+ "builtins.lobe-web-onboarding.inspector.interests_other": "{{count}} interests",
"builtins.lobe-web-onboarding.title": "User Onboarding",
"confirm": "Confirm",
"debug.arguments": "Arguments",
diff --git a/locales/zh-CN/chat.json b/locales/zh-CN/chat.json
index c1e46cca29e..1f187307091 100644
--- a/locales/zh-CN/chat.json
+++ b/locales/zh-CN/chat.json
@@ -809,6 +809,7 @@
"workflow.toolDisplayName.replaceDocumentContent": "已替换文档内容",
"workflow.toolDisplayName.replaceText": "替换了文本",
"workflow.toolDisplayName.runCommand": "运行了命令",
+ "workflow.toolDisplayName.saveUserQuestion": "记录了信息",
"workflow.toolDisplayName.search": "搜索了网络",
"workflow.toolDisplayName.searchAgent": "搜索了助理",
"workflow.toolDisplayName.searchKnowledgeBase": "搜索了知识库",
@@ -822,6 +823,7 @@
"workflow.toolDisplayName.updateLoadRule": "更新了加载规则",
"workflow.toolDisplayName.updatePlan": "更新了计划",
"workflow.toolDisplayName.updateTodos": "更新了待办",
+ "workflow.toolDisplayName.writeDocument": "撰写了文档",
"workflow.toolDisplayName.writeLocalFile": "写入了文件",
"workflow.working": "处理中...",
"workingPanel.agentDocuments": "代理文档",
diff --git a/locales/zh-CN/onboarding.json b/locales/zh-CN/onboarding.json
index 9943532a97e..9415fd49b84 100644
--- a/locales/zh-CN/onboarding.json
+++ b/locales/zh-CN/onboarding.json
@@ -48,7 +48,7 @@
"agent.telemetryHint": "您也可以用自己的话回答。",
"agent.title": "对话入职",
"agent.welcome": "...嗯?我刚\"醒过来\",脑子还有点空白。你是谁?还有——你希望我叫什么?我也得找个名字。",
- "agent.welcome.footer": "配置你的 Lobe AI 代理。它运行在你的服务器上,会从每次交互中学习,运行越久就越强大。",
+ "agent.welcome.footer": "配置你的 Lobe AI 代理。它会从每次交互中学习,运行越久就越懂你。",
"agent.welcome.guide.growTogether.desc": "每次交谈我都会更了解你,久而久之会成为更可靠的队友。",
"agent.welcome.guide.growTogether.title": "与您一起成长",
"agent.welcome.guide.knowYou.desc": "最近忙些什么?给我一些背景信息能让我更好地帮助你。",
@@ -58,26 +58,9 @@
"agent.welcome.sentence.1": "很高兴认识你!让我们互相了解一下吧。",
"agent.welcome.sentence.2": "你希望我成为怎样的伙伴?",
"agent.welcome.sentence.3": "先给我起个名字吧 :)",
- "agent.welcome.suggestion.items.1.name": "Lumi",
- "agent.welcome.suggestion.items.1.prompt": "我们先叫你 Lumi 吧。温暖、体贴,又略带一丝梦幻。",
- "agent.welcome.suggestion.items.2.name": "Atlas",
- "agent.welcome.suggestion.items.2.prompt": "叫你 Atlas,稳一点、可靠一点,像个能扛事的伙伴。",
- "agent.welcome.suggestion.items.3.name": "Momo",
- "agent.welcome.suggestion.items.3.prompt": "先叫你 Momo,轻松一点、好亲近一点,聊天没有压力。",
- "agent.welcome.suggestion.items.4.name": "Nova",
- "agent.welcome.suggestion.items.4.prompt": "那就叫 Nova 吧。敏锐、有想象力,充满新点子。",
- "agent.welcome.suggestion.items.5.name": "Milo",
- "agent.welcome.suggestion.items.5.prompt": "叫你 Milo,聪明一点、机灵一点,但别太有距离感。",
- "agent.welcome.suggestion.items.6.name": "Aster",
- "agent.welcome.suggestion.items.6.prompt": "叫你 Aster,简洁直接一点,做事干净利落。",
- "agent.welcome.suggestion.items.7.name": "Pixel",
- "agent.welcome.suggestion.items.7.prompt": "叫你 Pixel,偏产品脑一点,注意细节,也有创造力。",
- "agent.welcome.suggestion.items.8.name": "Echo",
- "agent.welcome.suggestion.items.8.prompt": "叫你 Echo,耐心一点、会倾听一点,像长期搭档。",
- "agent.welcome.suggestion.items.9.name": "Orbit",
- "agent.welcome.suggestion.items.9.prompt": "试试 Orbit 这个名字吧。像一位与我共同成长的长期伙伴。",
+ "agent.welcome.suggestion.avatarHint": "头像用 {{emoji}}。",
"agent.welcome.suggestion.switch": "换一组",
- "agent.welcome.suggestion.title": "一下子没灵感?先挑一个起点。",
+ "agent.welcome.suggestion.title": "一下子没灵感?先挑一个吧",
"agent.wrapUp.action": "先这样吧",
"agent.wrapUp.confirm.cancel": "再聊聊",
"agent.wrapUp.confirm.content": "目前了解到的信息我都会保存,你随时都可以回来继续和我聊。",
diff --git a/locales/zh-CN/plugin.json b/locales/zh-CN/plugin.json
index d774d496aec..4998ec89376 100644
--- a/locales/zh-CN/plugin.json
+++ b/locales/zh-CN/plugin.json
@@ -296,9 +296,17 @@
"builtins.lobe-web-browsing.title": "联网搜索",
"builtins.lobe-web-onboarding.apiName.finishOnboarding": "完成入门",
"builtins.lobe-web-onboarding.apiName.readDocument": "读取文档",
- "builtins.lobe-web-onboarding.apiName.saveUserQuestion": "保存用户问题",
+ "builtins.lobe-web-onboarding.apiName.saveUserQuestion": "记下来",
"builtins.lobe-web-onboarding.apiName.updateDocument": "更新文档",
"builtins.lobe-web-onboarding.apiName.writeDocument": "撰写文档",
+ "builtins.lobe-web-onboarding.docType.persona": "用户画像",
+ "builtins.lobe-web-onboarding.docType.soul": "SOUL.md",
+ "builtins.lobe-web-onboarding.inspector.charCount_one": "{{count}} 字符",
+ "builtins.lobe-web-onboarding.inspector.charCount_other": "{{count}} 字符",
+ "builtins.lobe-web-onboarding.inspector.hunkCount_one": "{{count}} 处修改",
+ "builtins.lobe-web-onboarding.inspector.hunkCount_other": "{{count}} 处修改",
+ "builtins.lobe-web-onboarding.inspector.interests_one": "{{count}} 个兴趣",
+ "builtins.lobe-web-onboarding.inspector.interests_other": "{{count}} 个兴趣",
"builtins.lobe-web-onboarding.title": "用户入门",
"confirm": "确认",
"debug.arguments": "调用参数",
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/FinishOnboarding/index.tsx b/packages/builtin-tool-web-onboarding/src/client/Inspector/FinishOnboarding/index.tsx
new file mode 100644
index 00000000000..46d259452d1
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/FinishOnboarding/index.tsx
@@ -0,0 +1,40 @@
+'use client';
+
+import type { BuiltinInspectorProps } from '@lobechat/types';
+import { Icon } from '@lobehub/ui';
+import { createStaticStyles, cx } from 'antd-style';
+import { CheckCircle2 } from 'lucide-react';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { inspectorTextStyles, shinyTextStyles } from '@/styles';
+
+const styles = createStaticStyles(({ css, cssVar }) => ({
+ done: css`
+ color: ${cssVar.colorSuccess};
+ `,
+}));
+
+export const FinishOnboardingInspector = memo<
+ BuiltinInspectorProps<Record<string, never>, Record<string, unknown>>
+>(({ isArgumentsStreaming, isLoading, result }) => {
+ const { t } = useTranslation('plugin');
+ const succeeded = !!result && !result.error;
+
+ return (
+ <div
+ style={{ gap: 6 }}
+ className={cx(
+ inspectorTextStyles.root,
+ (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
+ )}
+ >
+ <span>{t('builtins.lobe-web-onboarding.apiName.finishOnboarding')}</span>
+ {succeeded && <Icon className={styles.done} icon={CheckCircle2} size={14} />}
+ </div>
+ );
+});
+
+FinishOnboardingInspector.displayName = 'FinishOnboardingInspector';
+
+export default FinishOnboardingInspector;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/ReadDocument/index.tsx b/packages/builtin-tool-web-onboarding/src/client/Inspector/ReadDocument/index.tsx
new file mode 100644
index 00000000000..46ce859a311
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/ReadDocument/index.tsx
@@ -0,0 +1,53 @@
+'use client';
+
+import type { BuiltinInspectorProps } from '@lobechat/types';
+import { cx } from 'antd-style';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { inspectorTextStyles, shinyTextStyles } from '@/styles';
+
+import type { WebOnboardingDocumentType } from '../../../types';
+import { inspectorChipStyles } from '../_styles';
+
+interface ReadDocumentArgs {
+ type?: WebOnboardingDocumentType;
+}
+
+export const ReadDocumentInspector = memo<
+ BuiltinInspectorProps<ReadDocumentArgs, Record<string, unknown>>
+>(({ args, partialArgs, isArgumentsStreaming, isLoading }) => {
+ const { t } = useTranslation('plugin');
+ const styles = inspectorChipStyles;
+
+ const type = args?.type ?? partialArgs?.type;
+
+ if (isArgumentsStreaming && !type) {
+ return (
+ <div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
+ <span>{t('builtins.lobe-web-onboarding.apiName.readDocument')}</span>
+ </div>
+ );
+ }
+
+ return (
+ <div
+ style={{ gap: 4 }}
+ className={cx(
+ inspectorTextStyles.root,
+ (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
+ )}
+ >
+ <span>{t('builtins.lobe-web-onboarding.apiName.readDocument')}</span>
+ {type && (
+ <span className={styles.chip}>
+ {t(`builtins.lobe-web-onboarding.docType.${type}` as const)}
+ </span>
+ )}
+ </div>
+ );
+});
+
+ReadDocumentInspector.displayName = 'ReadDocumentInspector';
+
+export default ReadDocumentInspector;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/SaveUserQuestion/index.tsx b/packages/builtin-tool-web-onboarding/src/client/Inspector/SaveUserQuestion/index.tsx
new file mode 100644
index 00000000000..74d06d24642
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/SaveUserQuestion/index.tsx
@@ -0,0 +1,64 @@
+'use client';
+
+import type { BuiltinInspectorProps, SaveUserQuestionInput } from '@lobechat/types';
+import { cx } from 'antd-style';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { inspectorTextStyles, shinyTextStyles } from '@/styles';
+
+import { inspectorChipStyles } from '../_styles';
+
+export const SaveUserQuestionInspector = memo<
+ BuiltinInspectorProps<SaveUserQuestionInput, Record<string, unknown>>
+>(({ args, partialArgs, isArgumentsStreaming, isLoading }) => {
+ const { t } = useTranslation('plugin');
+ const styles = inspectorChipStyles;
+
+ const data = (args ?? partialArgs ?? {}) as SaveUserQuestionInput;
+ const agentName = data.agentName?.trim();
+ const agentEmoji = data.agentEmoji?.trim();
+ const fullName = data.fullName?.trim();
+ const responseLanguage = data.responseLanguage?.trim();
+ const interestsCount = Array.isArray(data.interests) ? data.interests.length : 0;
+ const hasAnyField = Boolean(
+ agentName || agentEmoji || fullName || responseLanguage || interestsCount > 0,
+ );
+
+ if (isArgumentsStreaming && !hasAnyField) {
+ return (
+ <div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
+ <span>{t('builtins.lobe-web-onboarding.apiName.saveUserQuestion')}</span>
+ </div>
+ );
+ }
+
+ return (
+ <div
+ style={{ flexWrap: 'wrap', gap: 4 }}
+ className={cx(
+ inspectorTextStyles.root,
+ (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
+ )}
+ >
+ <span>{t('builtins.lobe-web-onboarding.apiName.saveUserQuestion')}</span>
+ {(agentName || agentEmoji) && (
+ <span className={styles.chip}>
+ {agentEmoji && <span className={styles.emoji}>{agentEmoji}</span>}
+ {agentName && <span>{agentName}</span>}
+ </span>
+ )}
+ {fullName && <span className={styles.chip}>{fullName}</span>}
+ {responseLanguage && <span className={styles.chip}>{responseLanguage}</span>}
+ {interestsCount > 0 && (
+ <span className={styles.meta}>
+ {t('builtins.lobe-web-onboarding.inspector.interests', { count: interestsCount })}
+ </span>
+ )}
+ </div>
+ );
+});
+
+SaveUserQuestionInspector.displayName = 'SaveUserQuestionInspector';
+
+export default SaveUserQuestionInspector;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/UpdateDocument/index.tsx b/packages/builtin-tool-web-onboarding/src/client/Inspector/UpdateDocument/index.tsx
new file mode 100644
index 00000000000..252006dbfee
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/UpdateDocument/index.tsx
@@ -0,0 +1,57 @@
+'use client';
+
+import type { BuiltinInspectorProps } from '@lobechat/types';
+import { cx } from 'antd-style';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { inspectorTextStyles, shinyTextStyles } from '@/styles';
+
+import type { UpdateDocumentArgs } from '../../../types';
+import { inspectorChipStyles } from '../_styles';
+
+export const UpdateDocumentInspector = memo<
+ BuiltinInspectorProps<UpdateDocumentArgs, { applied?: number }>
+>(({ args, partialArgs, pluginState, isArgumentsStreaming, isLoading }) => {
+ const { t } = useTranslation('plugin');
+ const styles = inspectorChipStyles;
+
+ const type = args?.type ?? partialArgs?.type;
+ const requestedHunks = args?.hunks?.length ?? partialArgs?.hunks?.length ?? 0;
+ const applied = pluginState?.applied;
+ const hunkCount = typeof applied === 'number' ? applied : requestedHunks;
+
+ if (isArgumentsStreaming && !type) {
+ return (
+ <div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
+ <span>{t('builtins.lobe-web-onboarding.apiName.updateDocument')}</span>
+ </div>
+ );
+ }
+
+ return (
+ <div
+ style={{ gap: 4 }}
+ className={cx(
+ inspectorTextStyles.root,
+ (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
+ )}
+ >
+ <span>{t('builtins.lobe-web-onboarding.apiName.updateDocument')}</span>
+ {type && (
+ <span className={styles.chip}>
+ {t(`builtins.lobe-web-onboarding.docType.${type}` as const)}
+ </span>
+ )}
+ {hunkCount > 0 && (
+ <span className={styles.meta}>
+ {t('builtins.lobe-web-onboarding.inspector.hunkCount', { count: hunkCount })}
+ </span>
+ )}
+ </div>
+ );
+});
+
+UpdateDocumentInspector.displayName = 'UpdateDocumentInspector';
+
+export default UpdateDocumentInspector;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/WriteDocument/index.tsx b/packages/builtin-tool-web-onboarding/src/client/Inspector/WriteDocument/index.tsx
new file mode 100644
index 00000000000..80e46fe29d1
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/WriteDocument/index.tsx
@@ -0,0 +1,61 @@
+'use client';
+
+import type { BuiltinInspectorProps } from '@lobechat/types';
+import { cx } from 'antd-style';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { inspectorTextStyles, shinyTextStyles } from '@/styles';
+
+import type { WebOnboardingDocumentType } from '../../../types';
+import { inspectorChipStyles } from '../_styles';
+
+interface WriteDocumentArgs {
+ content?: string;
+ type?: WebOnboardingDocumentType;
+}
+
+export const WriteDocumentInspector = memo<
+ BuiltinInspectorProps<WriteDocumentArgs, Record<string, unknown>>
+>(({ args, partialArgs, isArgumentsStreaming, isLoading }) => {
+ const { t } = useTranslation('plugin');
+ const styles = inspectorChipStyles;
+
+ const type = args?.type ?? partialArgs?.type;
+ const content = args?.content ?? partialArgs?.content;
+ const charCount = content?.length ?? 0;
+
+ if (isArgumentsStreaming && !type) {
+ return (
+ <div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
+ <span>{t('builtins.lobe-web-onboarding.apiName.writeDocument')}</span>
+ </div>
+ );
+ }
+
+ return (
+ <div
+ style={{ gap: 4 }}
+ className={cx(
+ inspectorTextStyles.root,
+ (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
+ )}
+ >
+ <span>{t('builtins.lobe-web-onboarding.apiName.writeDocument')}</span>
+ {type && (
+ <span className={styles.chip}>
+ {t(`builtins.lobe-web-onboarding.docType.${type}` as const)}
+ </span>
+ )}
+ {charCount > 0 && (
+ <span className={styles.meta}>
+ {t('builtins.lobe-web-onboarding.inspector.charCount', { count: charCount })}
+ </span>
+ )}
+ </div>
+ );
+});
+
+WriteDocumentInspector.displayName = 'WriteDocumentInspector';
+
+export default WriteDocumentInspector;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/_styles.ts b/packages/builtin-tool-web-onboarding/src/client/Inspector/_styles.ts
new file mode 100644
index 00000000000..df6ba983efe
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/_styles.ts
@@ -0,0 +1,39 @@
+import { createStaticStyles } from 'antd-style';
+
+export const inspectorChipStyles = createStaticStyles(({ css, cssVar }) => ({
+ chip: css`
+ overflow: hidden;
+ display: inline-flex;
+ flex-shrink: 1;
+ gap: 4px;
+ align-items: center;
+
+ min-width: 0;
+ max-width: 240px;
+ padding-block: 2px;
+ padding-inline: 8px;
+ border-radius: 999px;
+
+ font-size: 12px;
+ color: ${cssVar.colorText};
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ background: ${cssVar.colorFillTertiary};
+ `,
+ emoji: css`
+ flex-shrink: 0;
+ font-size: 14px;
+ line-height: 1;
+ `,
+ meta: css`
+ flex-shrink: 0;
+ font-size: 12px;
+ color: ${cssVar.colorTextTertiary};
+ `,
+ separator: css`
+ flex-shrink: 0;
+ margin-inline: 4px;
+ color: ${cssVar.colorTextQuaternary};
+ `,
+}));
diff --git a/packages/builtin-tool-web-onboarding/src/client/Inspector/index.ts b/packages/builtin-tool-web-onboarding/src/client/Inspector/index.ts
new file mode 100644
index 00000000000..e190dce3b9d
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Inspector/index.ts
@@ -0,0 +1,22 @@
+import type { BuiltinInspector } from '@lobechat/types';
+
+import { WebOnboardingApiName } from '../../types';
+import { FinishOnboardingInspector } from './FinishOnboarding';
+import { ReadDocumentInspector } from './ReadDocument';
+import { SaveUserQuestionInspector } from './SaveUserQuestion';
+import { UpdateDocumentInspector } from './UpdateDocument';
+import { WriteDocumentInspector } from './WriteDocument';
+
+export const WebOnboardingInspectors: Record<string, BuiltinInspector> = {
+ [WebOnboardingApiName.finishOnboarding]: FinishOnboardingInspector as BuiltinInspector,
+ [WebOnboardingApiName.readDocument]: ReadDocumentInspector as BuiltinInspector,
+ [WebOnboardingApiName.saveUserQuestion]: SaveUserQuestionInspector as BuiltinInspector,
+ [WebOnboardingApiName.updateDocument]: UpdateDocumentInspector as BuiltinInspector,
+ [WebOnboardingApiName.writeDocument]: WriteDocumentInspector as BuiltinInspector,
+};
+
+export { default as FinishOnboardingInspector } from './FinishOnboarding';
+export { default as ReadDocumentInspector } from './ReadDocument';
+export { default as SaveUserQuestionInspector } from './SaveUserQuestion';
+export { default as UpdateDocumentInspector } from './UpdateDocument';
+export { default as WriteDocumentInspector } from './WriteDocument';
diff --git a/packages/builtin-tool-web-onboarding/src/client/Render/WriteDocument/DocumentCard.tsx b/packages/builtin-tool-web-onboarding/src/client/Render/WriteDocument/DocumentCard.tsx
new file mode 100644
index 00000000000..0e659df859c
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Render/WriteDocument/DocumentCard.tsx
@@ -0,0 +1,65 @@
+'use client';
+
+import { CopyButton, Flexbox, Markdown, ScrollShadow, TooltipGroup } from '@lobehub/ui';
+import { createStaticStyles } from 'antd-style';
+import { FileTextIcon } from 'lucide-react';
+import { memo } from 'react';
+
+const styles = createStaticStyles(({ css, cssVar }) => ({
+ container: css`
+ overflow: hidden;
+
+ width: 100%;
+ border: 1px solid ${cssVar.colorBorderSecondary};
+ border-radius: 16px;
+
+ background: ${cssVar.colorBgContainer};
+ `,
+ content: css`
+ padding-inline: 16px;
+ font-size: 14px;
+ `,
+ header: css`
+ padding-block: 10px;
+ padding-inline: 12px;
+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};
+ `,
+ icon: css`
+ color: ${cssVar.colorPrimary};
+ `,
+ title: css`
+ overflow: hidden;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 1;
+
+ font-weight: 500;
+ color: ${cssVar.colorText};
+ `,
+}));
+
+interface DocumentCardProps {
+ content: string;
+ title: string;
+}
+
+const DocumentCard = memo<DocumentCardProps>(({ content, title }) => (
+ <Flexbox className={styles.container}>
+ <Flexbox horizontal align={'center'} className={styles.header} gap={8}>
+ <FileTextIcon className={styles.icon} size={16} />
+ <Flexbox flex={1}>
+ <div className={styles.title}>{title}</div>
+ </Flexbox>
+ <TooltipGroup>
+ <CopyButton content={content} size={'small'} />
+ </TooltipGroup>
+ </Flexbox>
+ <ScrollShadow className={styles.content} offset={12} size={12} style={{ maxHeight: 400 }}>
+ <Markdown style={{ overflow: 'unset', paddingBottom: 16 }} variant={'chat'}>
+ {content}
+ </Markdown>
+ </ScrollShadow>
+ </Flexbox>
+));
+
+export default DocumentCard;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Render/WriteDocument/index.tsx b/packages/builtin-tool-web-onboarding/src/client/Render/WriteDocument/index.tsx
new file mode 100644
index 00000000000..5e0e60363d5
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Render/WriteDocument/index.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import type { BuiltinRenderProps } from '@lobechat/types';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import type { WebOnboardingDocumentType } from '../../../types';
+import DocumentCard from './DocumentCard';
+
+interface WriteDocumentArgs {
+ content?: string;
+ type?: WebOnboardingDocumentType;
+}
+
+export type WriteDocumentRenderProps = Pick<
+ BuiltinRenderProps<WriteDocumentArgs, { id?: string; type?: WebOnboardingDocumentType }>,
+ 'args'
+>;
+
+const WriteDocument = memo<WriteDocumentRenderProps>(({ args }) => {
+ const { t } = useTranslation('plugin');
+ const content = args?.content;
+ const type = args?.type;
+
+ if (!content || !type) return null;
+
+ const title = t(`builtins.lobe-web-onboarding.docType.${type}` as const);
+
+ return <DocumentCard content={content} title={title} />;
+});
+
+export default WriteDocument;
diff --git a/packages/builtin-tool-web-onboarding/src/client/Render/index.ts b/packages/builtin-tool-web-onboarding/src/client/Render/index.ts
new file mode 100644
index 00000000000..3affedb3a6c
--- /dev/null
+++ b/packages/builtin-tool-web-onboarding/src/client/Render/index.ts
@@ -0,0 +1,8 @@
+import { WebOnboardingApiName } from '../../types';
+import WriteDocument from './WriteDocument';
+
+export const WebOnboardingRenders = {
+ [WebOnboardingApiName.writeDocument]: WriteDocument,
+};
+
+export { default as WriteDocumentRender } from './WriteDocument';
diff --git a/packages/builtin-tool-web-onboarding/src/client/index.ts b/packages/builtin-tool-web-onboarding/src/client/index.ts
index 4457dd65c57..cd25a1d86b4 100644
--- a/packages/builtin-tool-web-onboarding/src/client/index.ts
+++ b/packages/builtin-tool-web-onboarding/src/client/index.ts
@@ -1,3 +1,5 @@
export { WebOnboardingManifest } from '../manifest';
export * from '../types';
+export { WebOnboardingInspectors } from './Inspector';
export { WebOnboardingInterventions } from './Intervention';
+export { WebOnboardingRenders } from './Render';
diff --git a/packages/builtin-tools/src/inspectors.ts b/packages/builtin-tools/src/inspectors.ts
index 4923136dd25..d5b836330db 100644
--- a/packages/builtin-tools/src/inspectors.ts
+++ b/packages/builtin-tools/src/inspectors.ts
@@ -52,6 +52,10 @@ import {
WebBrowsingInspectors,
WebBrowsingManifest,
} from '@lobechat/builtin-tool-web-browsing/client';
+import {
+ WebOnboardingInspectors,
+ WebOnboardingManifest,
+} from '@lobechat/builtin-tool-web-onboarding/client';
import { createRunCommandInspector } from '@lobechat/shared-tool-ui/inspectors';
import { type BuiltinInspector } from '@lobechat/types';
@@ -93,6 +97,7 @@ const BuiltinToolInspectors: Record<string, Record<string, BuiltinInspector>> =
[SkillsManifest.identifier]: SkillsInspectors as Record<string, BuiltinInspector>,
[TaskManifest.identifier]: TaskInspectors as Record<string, BuiltinInspector>,
[WebBrowsingManifest.identifier]: WebBrowsingInspectors as Record<string, BuiltinInspector>,
+ [WebOnboardingManifest.identifier]: WebOnboardingInspectors as Record<string, BuiltinInspector>,
codex: {
...CodexInspectors,
command_execution: createRunCommandInspector('Run') as BuiltinInspector,
diff --git a/packages/builtin-tools/src/renders.ts b/packages/builtin-tools/src/renders.ts
index 92addbf7e29..1cafb669e05 100644
--- a/packages/builtin-tools/src/renders.ts
+++ b/packages/builtin-tools/src/renders.ts
@@ -34,6 +34,10 @@ import {
WebBrowsingManifest,
WebBrowsingRenders,
} from '@lobechat/builtin-tool-web-browsing/client';
+import {
+ WebOnboardingManifest,
+ WebOnboardingRenders,
+} from '@lobechat/builtin-tool-web-onboarding/client';
import { RunCommandRender } from '@lobechat/shared-tool-ui/renders';
import { type BuiltinRender } from '@lobechat/types';
@@ -71,6 +75,7 @@ const BuiltinToolsRenders: Record<string, Record<string, BuiltinRender>> = {
[TaskManifest.identifier]: TaskRenders as Record<string, BuiltinRender>,
[LobeActivatorManifest.identifier]: LobeActivatorRenders as Record<string, BuiltinRender>,
[WebBrowsingManifest.identifier]: WebBrowsingRenders as Record<string, BuiltinRender>,
+ [WebOnboardingManifest.identifier]: WebOnboardingRenders as Record<string, BuiltinRender>,
codex: {
...CodexRenders,
command_execution: RunCommandRender as BuiltinRender,
diff --git a/src/features/Conversation/Messages/AssistantGroup/constants.ts b/src/features/Conversation/Messages/AssistantGroup/constants.ts
index 4f0879d46e5..ad3525e1163 100644
--- a/src/features/Conversation/Messages/AssistantGroup/constants.ts
+++ b/src/features/Conversation/Messages/AssistantGroup/constants.ts
@@ -211,4 +211,8 @@ export const TOOL_API_DISPLAY_NAMES: Record<string, string> = {
getTopicContext: 'workflow.toolDisplayName.getTopicContext',
listOnlineDevices: 'workflow.toolDisplayName.listOnlineDevices',
activateDevice: 'workflow.toolDisplayName.activateDevice',
+
+ // Web onboarding
+ saveUserQuestion: 'workflow.toolDisplayName.saveUserQuestion',
+ writeDocument: 'workflow.toolDisplayName.writeDocument',
};
diff --git a/src/features/Onboarding/Agent/Conversation.tsx b/src/features/Onboarding/Agent/Conversation.tsx
index cac282fa9e3..55160521814 100644
--- a/src/features/Onboarding/Agent/Conversation.tsx
+++ b/src/features/Onboarding/Agent/Conversation.tsx
@@ -14,10 +14,12 @@ import {
} from '@/features/Conversation';
import FollowUpChips from '@/features/Conversation/FollowUp/FollowUpChips';
import { dataSelectors, messageStateSelectors } from '@/features/Conversation/store';
+import WideScreenContainer from '@/features/WideScreenContainer';
import type { OnboardingPhase } from '@/types/user';
import { isDev } from '@/utils/env';
import CompletionPanel from './CompletionPanel';
+import NameSuggestions from './NameSuggestions';
import Welcome from './Welcome';
import WrapUpHint from './WrapUpHint';
@@ -176,12 +178,17 @@ const AgentOnboardingConversation = memo<AgentOnboardingConversationProps>(
/>
</Flexbox>
{!readOnly && !onboardingFinished && (
- <>
+ <Flexbox gap={8}>
<WrapUpHint
discoveryUserMessageCount={discoveryUserMessageCount}
phase={phase}
onAfterFinish={onAfterWrapUp}
/>
+ {shouldShowGreetingWelcome && (
+ <WideScreenContainer>
+ <NameSuggestions />
+ </WideScreenContainer>
+ )}
<ChatInput
disableFollowUpVariant
disableMention
@@ -192,7 +199,7 @@ const AgentOnboardingConversation = memo<AgentOnboardingConversationProps>(
rightActions={chatInputRightActions}
showRuntimeConfig={false}
/>
- </>
+ </Flexbox>
)}
</Flexbox>
);
diff --git a/src/features/Onboarding/Agent/NameSuggestions.test.tsx b/src/features/Onboarding/Agent/NameSuggestions.test.tsx
index db85c2d2e2f..a0a5ac8adc8 100644
--- a/src/features/Onboarding/Agent/NameSuggestions.test.tsx
+++ b/src/features/Onboarding/Agent/NameSuggestions.test.tsx
@@ -4,60 +4,63 @@ import { afterEach, describe, expect, it, vi } from 'vitest';
import NameSuggestions from './NameSuggestions';
const translations: Record<string, string> = {
- 'agent.welcome.suggestion.items.1.name': 'Lumi',
- 'agent.welcome.suggestion.items.1.prompt': '叫你 Lumi 吧,温柔一点。',
- 'agent.welcome.suggestion.items.2.name': 'Atlas',
- 'agent.welcome.suggestion.items.2.prompt': '叫你 Atlas,稳一点。',
- 'agent.welcome.suggestion.items.3.name': 'Momo',
- 'agent.welcome.suggestion.items.3.prompt': '先叫你 Momo,轻松一点。',
- 'agent.welcome.suggestion.items.4.name': 'Nova',
- 'agent.welcome.suggestion.items.4.prompt': '叫你 Nova,想法大胆一点。',
- 'agent.welcome.suggestion.items.5.name': 'Milo',
- 'agent.welcome.suggestion.items.5.prompt': '叫你 Milo,像个聪明助手。',
- 'agent.welcome.suggestion.items.6.name': 'Aster',
- 'agent.welcome.suggestion.items.6.prompt': '叫你 Aster,简洁直接。',
- 'agent.welcome.suggestion.items.7.name': 'Pixel',
- 'agent.welcome.suggestion.items.7.prompt': '叫你 Pixel,偏产品一点。',
- 'agent.welcome.suggestion.items.8.name': 'Echo',
- 'agent.welcome.suggestion.items.8.prompt': '叫你 Echo,像个耐心搭档。',
- 'agent.welcome.suggestion.items.9.name': 'Orbit',
- 'agent.welcome.suggestion.items.9.prompt': '叫你 Orbit,长期陪我一起成长。',
+ 'agent.welcome.suggestion.avatarHint': 'Use {{emoji}} as the avatar.',
'agent.welcome.suggestion.switch': '换一组',
- 'agent.welcome.suggestion.title': '没有灵感?先选一个起点。',
+ 'agent.welcome.suggestion.title': '一下子没灵感?先挑一个吧',
};
-const sendMessage = vi.fn();
+const updateInputMessage = vi.fn();
+const setDocument = vi.fn();
+const focus = vi.fn();
+const editor = { focus, setDocument };
vi.mock('react-i18next', () => ({
useTranslation: () => ({
- t: (key: string) => translations[key] ?? key,
+ i18n: { language: 'en-US' },
+ t: (key: string, params?: Record<string, string>) => {
+ const template = translations[key] ?? key;
+ if (!params) return template;
+ return Object.entries(params).reduce(
+ (acc, [k, v]) => acc.replaceAll(`{{${k}}}`, v),
+ template,
+ );
+ },
}),
}));
vi.mock('@/features/Conversation', () => ({
- useConversationStore: (selector: (state: { sendMessage: unknown }) => unknown) =>
+ useConversationStore: (
+ selector: (state: { editor: unknown; updateInputMessage: unknown }) => unknown,
+ ) =>
selector({
- sendMessage,
+ editor,
+ updateInputMessage,
}),
}));
describe('NameSuggestions', () => {
afterEach(() => {
vi.restoreAllMocks();
- sendMessage.mockClear();
+ updateInputMessage.mockClear();
+ setDocument.mockClear();
+ focus.mockClear();
});
- it('sends the selected preset prompt immediately', () => {
+ it('fills the chat input with the selected preset prompt', () => {
vi.spyOn(Math, 'random').mockReturnValue(0);
render(<NameSuggestions />);
fireEvent.click(screen.getByText('Lumi'));
- expect(sendMessage).toHaveBeenCalledWith({ message: '叫你 Lumi 吧,温柔一点。 🌙' });
+ const expected =
+ 'Let’s call you Lumi first. Warm, thoughtful, and a little dreamy. Use 🌙 as the avatar.';
+ expect(updateInputMessage).toHaveBeenCalledWith(expected);
+ expect(setDocument).toHaveBeenCalledWith('text', expected);
+ expect(focus).toHaveBeenCalled();
});
- it('switches to another preset group when refreshed', () => {
+ it('switches to a different set of names when refreshed', () => {
vi.spyOn(Math, 'random').mockReturnValue(0);
render(<NameSuggestions />);
@@ -66,7 +69,7 @@ describe('NameSuggestions', () => {
fireEvent.click(screen.getByText('换一组'));
- expect(screen.getByText('Nova')).toBeInTheDocument();
expect(screen.queryByText('Lumi')).not.toBeInTheDocument();
+ expect(screen.getByText('Nova')).toBeInTheDocument();
});
});
diff --git a/src/features/Onboarding/Agent/NameSuggestions.tsx b/src/features/Onboarding/Agent/NameSuggestions.tsx
index 053797a6197..f9b6f1f77e7 100644
--- a/src/features/Onboarding/Agent/NameSuggestions.tsx
+++ b/src/features/Onboarding/Agent/NameSuggestions.tsx
@@ -6,100 +6,52 @@ import { useTranslation } from 'react-i18next';
import { useConversationStore } from '@/features/Conversation';
-interface SuggestionItem {
- emoji: string;
- id: string;
- nameKey: string;
- promptKey: string;
-}
+import {
+ type NameSuggestionItem,
+ nameSuggestionPool,
+ resolveNameSuggestion,
+} from './nameSuggestions.config';
-const suggestionGroups = [
- [
- {
- emoji: '🌙',
- id: 'lumi',
- nameKey: 'agent.welcome.suggestion.items.1.name',
- promptKey: 'agent.welcome.suggestion.items.1.prompt',
- },
- {
- emoji: '🧭',
- id: 'atlas',
- nameKey: 'agent.welcome.suggestion.items.2.name',
- promptKey: 'agent.welcome.suggestion.items.2.prompt',
- },
- {
- emoji: '🍡',
- id: 'momo',
- nameKey: 'agent.welcome.suggestion.items.3.name',
- promptKey: 'agent.welcome.suggestion.items.3.prompt',
- },
- ],
- [
- {
- emoji: '🌌',
- id: 'nova',
- nameKey: 'agent.welcome.suggestion.items.4.name',
- promptKey: 'agent.welcome.suggestion.items.4.prompt',
- },
- {
- emoji: '🪄',
- id: 'milo',
- nameKey: 'agent.welcome.suggestion.items.5.name',
- promptKey: 'agent.welcome.suggestion.items.5.prompt',
- },
- {
- emoji: '🌿',
- id: 'aster',
- nameKey: 'agent.welcome.suggestion.items.6.name',
- promptKey: 'agent.welcome.suggestion.items.6.prompt',
- },
- ],
- [
- {
- emoji: '🧩',
- id: 'pixel',
- nameKey: 'agent.welcome.suggestion.items.7.name',
- promptKey: 'agent.welcome.suggestion.items.7.prompt',
- },
- {
- emoji: '🎧',
- id: 'echo',
- nameKey: 'agent.welcome.suggestion.items.8.name',
- promptKey: 'agent.welcome.suggestion.items.8.prompt',
- },
- {
- emoji: '🪐',
- id: 'orbit',
- nameKey: 'agent.welcome.suggestion.items.9.name',
- promptKey: 'agent.welcome.suggestion.items.9.prompt',
- },
- ],
-] as const satisfies SuggestionItem[][];
+const SUGGESTIONS_PER_GROUP = 3;
-const getRandomGroupIndex = (currentIndex?: number) => {
- const nextIndex = Math.floor(Math.random() * suggestionGroups.length);
-
- if (currentIndex === undefined || suggestionGroups.length <= 1 || nextIndex !== currentIndex) {
- return nextIndex;
+const sampleSuggestions = (count: number, excludeIds: string[] = []): NameSuggestionItem[] => {
+ const remaining = nameSuggestionPool.filter((item) => !excludeIds.includes(item.id));
+ const target = Math.min(count, remaining.length);
+ const picked: NameSuggestionItem[] = [];
+ while (picked.length < target) {
+ const idx = Math.floor(Math.random() * remaining.length);
+ picked.push(remaining.splice(idx, 1)[0]);
}
-
- return (nextIndex + 1) % suggestionGroups.length;
+ return picked;
};
const NameSuggestions = memo(() => {
- const { t } = useTranslation('onboarding');
- const sendMessage = useConversationStore((s) => s.sendMessage);
- const [groupIndex, setGroupIndex] = useState(() => getRandomGroupIndex());
+ const { t, i18n } = useTranslation('onboarding');
+ const updateInputMessage = useConversationStore((s) => s.updateInputMessage);
+ const editor = useConversationStore((s) => s.editor);
+ const [items, setItems] = useState<NameSuggestionItem[]>(() =>
+ sampleSuggestions(SUGGESTIONS_PER_GROUP),
+ );
const handleRefresh = useCallback(() => {
- setGroupIndex((current) => getRandomGroupIndex(current));
+ setItems((current) => {
+ const excludeIds = current.map((item) => item.id);
+ const next = sampleSuggestions(SUGGESTIONS_PER_GROUP, excludeIds);
+ return next.length === SUGGESTIONS_PER_GROUP
+ ? next
+ : sampleSuggestions(SUGGESTIONS_PER_GROUP);
+ });
}, []);
const handleSelect = useCallback(
- async (prompt: string, emoji: string) => {
- await sendMessage({ message: `${prompt} ${emoji}` });
+ (prompt: string, emoji: string) => {
+ const avatarHint = t('agent.welcome.suggestion.avatarHint', { emoji });
+ const message = `${prompt} ${avatarHint}`;
+ updateInputMessage(message);
+ editor?.setDocument('text', message);
+ editor?.focus();
},
- [sendMessage],
+ [t, updateInputMessage, editor],
);
return (
@@ -123,9 +75,8 @@ const NameSuggestions = memo(() => {
gap={12}
style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))' }}
>
- {suggestionGroups[groupIndex].map((item) => {
- const prompt = t(item.promptKey);
-
+ {items.map((item) => {
+ const { name, prompt } = resolveNameSuggestion(item, i18n.language);
return (
<Block
clickable
@@ -139,12 +90,14 @@ const NameSuggestions = memo(() => {
}}
onClick={() => handleSelect(prompt, item.emoji)}
>
- <Flexbox gap={8} padding={16}>
- <FluentEmoji emoji={item.emoji} size={24} type={'anim'} />
- <Text fontSize={15} weight={500}>
- {t(item.nameKey)}
- </Text>
- <Text fontSize={13} type={'secondary'}>
+ <Flexbox gap={6} padding={12}>
+ <Flexbox horizontal align={'center'} gap={8}>
+ <FluentEmoji emoji={item.emoji} size={20} type={'anim'} />
+ <Text fontSize={14} weight={500}>
+ {name}
+ </Text>
+ </Flexbox>
+ <Text ellipsis fontSize={12} type={'secondary'}>
{prompt}
</Text>
</Flexbox>
diff --git a/src/features/Onboarding/Agent/Welcome.tsx b/src/features/Onboarding/Agent/Welcome.tsx
index ac4a488012e..b57599bf4d0 100644
--- a/src/features/Onboarding/Agent/Welcome.tsx
+++ b/src/features/Onboarding/Agent/Welcome.tsx
@@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next';
import LobeMessage from '@/routes/onboarding/components/LobeMessage';
-import NameSuggestions from './NameSuggestions';
import { staticStyle } from './staticStyle';
interface WelcomeProps {
@@ -54,11 +53,10 @@ const Welcome = memo<WelcomeProps>(({ content }) => {
]}
/>
<Divider dashed style={{ margin: 0 }} />
- <Text italic style={{ marginBlock: 8 }} type={'secondary'}>
- {t('agent.welcome.footer')}
- </Text>
- <Divider dashed style={{ margin: 0 }} />
- <Grid paddingBlock={24}>
+ <Markdown fontSize={16} variant={'chat'}>
+ {content}
+ </Markdown>
+ <Grid>
{guids.map((item, i) => (
<Block
shadow
@@ -80,10 +78,9 @@ const Welcome = memo<WelcomeProps>(({ content }) => {
</Block>
))}
</Grid>
- <Markdown fontSize={16} variant={'chat'}>
- {content}
- </Markdown>
- <NameSuggestions />
+ <Text italic style={{ marginBlock: 8 }} type={'secondary'}>
+ {t('agent.welcome.footer')}
+ </Text>
</Flexbox>
</>
);
diff --git a/src/features/Onboarding/Agent/nameSuggestions.config.ts b/src/features/Onboarding/Agent/nameSuggestions.config.ts
new file mode 100644
index 00000000000..319dcd072bf
--- /dev/null
+++ b/src/features/Onboarding/Agent/nameSuggestions.config.ts
@@ -0,0 +1,1421 @@
+export interface NameSuggestionContent {
+ name: string;
+ prompt: string;
+}
+
+export interface NameSuggestionItem {
+ content: Record<string, NameSuggestionContent>;
+ emoji: string;
+ id: string;
+}
+
+export const nameSuggestionPool: NameSuggestionItem[] = [
+ {
+ content: {
+ en: {
+ name: 'Lumi',
+ prompt: 'Let’s call you Lumi first. Warm, thoughtful, and a little dreamy.',
+ },
+ zh: {
+ name: '暖暖',
+ prompt: '叫你暖暖吧——温柔、体贴,又带点梦幻感。',
+ },
+ },
+ emoji: '🌙',
+ id: 'lumi',
+ },
+ {
+ content: {
+ en: {
+ name: 'Atlas',
+ prompt: 'How about Atlas? Steady, reliable, and good at getting things done.',
+ },
+ zh: {
+ name: '北辰',
+ prompt: '那就叫北辰。稳重可靠,方向感强,能扛事的那种伙伴。',
+ },
+ },
+ emoji: '🧭',
+ id: 'atlas',
+ },
+ {
+ content: {
+ en: {
+ name: 'Momo',
+ prompt: 'Maybe Momo. Lighthearted, approachable, and easy to talk to.',
+ },
+ zh: {
+ name: '糯糯',
+ prompt: '先叫你糯糯,软软糯糯的,聊天毫无压力。',
+ },
+ },
+ emoji: '🍡',
+ id: 'momo',
+ },
+ {
+ content: {
+ en: {
+ name: 'Nova',
+ prompt: 'Let’s go with Nova. Sharp, imaginative, and full of fresh ideas.',
+ },
+ zh: {
+ name: '星河',
+ prompt: '叫你星河——敏锐、有想象力,灵感不断。',
+ },
+ },
+ emoji: '🌌',
+ id: 'nova',
+ },
+ {
+ content: {
+ en: {
+ name: 'Milo',
+ prompt: 'Milo sounds good. Friendly, quick-minded, and quietly capable.',
+ },
+ zh: {
+ name: '阿灵',
+ prompt: '叫你阿灵,机灵又靠谱,不会让人有距离感。',
+ },
+ },
+ emoji: '🪄',
+ id: 'milo',
+ },
+ {
+ content: {
+ en: {
+ name: 'Aster',
+ prompt: 'How about Aster? Clean, direct, and calm under pressure.',
+ },
+ zh: {
+ name: '青藤',
+ prompt: '叫你青藤——清爽直接,做事干净利落。',
+ },
+ },
+ emoji: '🌿',
+ id: 'aster',
+ },
+ {
+ content: {
+ en: {
+ name: 'Pixel',
+ prompt: 'Call you Pixel? Curious, product-minded, and detail-aware.',
+ },
+ zh: {
+ name: '小拼',
+ prompt: '叫你小拼,偏产品脑,注意细节,也有点小创意。',
+ },
+ },
+ emoji: '🧩',
+ id: 'pixel',
+ },
+ {
+ content: {
+ en: {
+ name: 'Echo',
+ prompt: 'Maybe Echo. Patient, attentive, and always listening closely.',
+ },
+ zh: {
+ name: '听雨',
+ prompt: '叫你听雨。耐心、专注,是会认真倾听的那种伙伴。',
+ },
+ },
+ emoji: '🎧',
+ id: 'echo',
+ },
+ {
+ content: {
+ en: {
+ name: 'Orbit',
+ prompt: 'Let’s try Orbit. Feels like a long-term companion who grows with me.',
+ },
+ zh: {
+ name: '守望',
+ prompt: '叫你守望。像一颗远星,长长久久地陪你成长。',
+ },
+ },
+ emoji: '🪐',
+ id: 'orbit',
+ },
+ {
+ content: {
+ en: {
+ name: 'Sora',
+ prompt: 'Try Sora — light, imaginative, with its head softly in the clouds.',
+ },
+ zh: {
+ name: '云朵',
+ prompt: '叫你云朵,轻盈、爱想象,脑子里总飘着一点小灵感。',
+ },
+ },
+ emoji: '☁️',
+ id: 'sora',
+ },
+ {
+ content: {
+ en: {
+ name: 'Kai',
+ prompt: 'Maybe Kai — flexible, adaptable, and ready to go with the flow.',
+ },
+ zh: {
+ name: '流川',
+ prompt: '叫你流川,灵活、适应力强,关键时刻顺势而为。',
+ },
+ },
+ emoji: '🌊',
+ id: 'kai',
+ },
+ {
+ content: {
+ en: {
+ name: 'Ember',
+ prompt: 'Try Ember — warm, energetic, and ready to keep things moving.',
+ },
+ zh: {
+ name: '阿炎',
+ prompt: '叫你阿炎。热情、有干劲,一直能保持节奏。',
+ },
+ },
+ emoji: '🔥',
+ id: 'ember',
+ },
+ {
+ content: {
+ en: {
+ name: 'Sage',
+ prompt: 'Call you Sage — calm, well-read, the kind you turn to for thinking.',
+ },
+ zh: {
+ name: '知秋',
+ prompt: '叫你知秋——沉稳、博学,认真思考时可以靠的那一位。',
+ },
+ },
+ emoji: '📚',
+ id: 'sage',
+ },
+ {
+ content: {
+ en: {
+ name: 'Pico',
+ prompt: 'How about Pico — small, sparkly, always there to lend a hand.',
+ },
+ zh: {
+ name: '闪闪',
+ prompt: '叫你闪闪,小小的、亮亮的,总能轻巧地搭把手。',
+ },
+ },
+ emoji: '✨',
+ id: 'pico',
+ },
+ {
+ content: {
+ en: {
+ name: 'Juno',
+ prompt: 'Try Juno — confident, graceful, and comfortable taking the lead.',
+ },
+ zh: {
+ name: '翩翩',
+ prompt: '叫你翩翩。自信、优雅,举手投足都从容。',
+ },
+ },
+ emoji: '🦋',
+ id: 'juno',
+ },
+ {
+ content: {
+ en: {
+ name: 'Bento',
+ prompt: 'Maybe Bento — tidy, structured, with everything in its right place.',
+ },
+ zh: {
+ name: '阿格',
+ prompt: '叫你阿格。条理清楚、井井有条,做事一格一格的。',
+ },
+ },
+ emoji: '🍱',
+ id: 'bento',
+ },
+ {
+ content: {
+ en: {
+ name: 'Mochi',
+ prompt: 'Go with Mochi — soft, calming, the presence that helps you unwind.',
+ },
+ zh: {
+ name: '团团',
+ prompt: '叫你团团,软软糯糯,能让人放松下来的存在。',
+ },
+ },
+ emoji: '🍵',
+ id: 'mochi',
+ },
+ {
+ content: {
+ en: {
+ name: 'Pip',
+ prompt: 'How about Pip — small but capable, full of unexpected energy.',
+ },
+ zh: {
+ name: '小栗',
+ prompt: '叫你小栗。看着小巧,能量却不小,处处藏惊喜。',
+ },
+ },
+ emoji: '🌰',
+ id: 'pip',
+ },
+ {
+ content: {
+ en: {
+ name: 'Ren',
+ prompt: 'Try Ren — plain-spoken, natural, no fuss and no airs.',
+ },
+ zh: {
+ name: '阿木',
+ prompt: '叫你阿木,朴素自然,说话不绕弯,也不端着。',
+ },
+ },
+ emoji: '🌾',
+ id: 'ren',
+ },
+ {
+ content: {
+ en: {
+ name: 'Quill',
+ prompt: 'Call you Quill — thoughtful, articulate, your partner for words and ideas.',
+ },
+ zh: {
+ name: '子衿',
+ prompt: '叫你子衿。细致、会表达,是写字与构思的搭档。',
+ },
+ },
+ emoji: '🪶',
+ id: 'quill',
+ },
+ {
+ content: {
+ en: {
+ name: 'Scout',
+ prompt: 'Maybe Scout — playful, curious, and always ready for the next thing.',
+ },
+ zh: {
+ name: '阿皮',
+ prompt: '叫你阿皮。皮一点、活泼一点,总能找到新乐子。',
+ },
+ },
+ emoji: '🎈',
+ id: 'scout',
+ },
+ {
+ content: {
+ en: {
+ name: 'Bolt',
+ prompt: 'Try Bolt — fast, frank, and not shy about saying it straight.',
+ },
+ zh: {
+ name: '阿闪',
+ prompt: '叫你阿闪。爽快、直接,有什么就说什么。',
+ },
+ },
+ emoji: '⚡',
+ id: 'bolt',
+ },
+ {
+ content: {
+ en: {
+ name: 'Frost',
+ prompt: 'How about Frost — cool, rational, and no-nonsense.',
+ },
+ zh: {
+ name: '凌寒',
+ prompt: '叫你凌寒。冷静、理性,不喜欢绕弯子。',
+ },
+ },
+ emoji: '❄️',
+ id: 'frost',
+ },
+ {
+ content: {
+ en: {
+ name: 'Nyx',
+ prompt: 'Call you Nyx — quiet, mysterious, the kind that thinks late at night.',
+ },
+ zh: {
+ name: '夜未',
+ prompt: '叫你夜未。安静、内敛,是夜深时认真思考的那一位。',
+ },
+ },
+ emoji: '🌒',
+ id: 'nyx',
+ },
+ {
+ content: {
+ en: {
+ name: 'Owl',
+ prompt: 'Try Owl — quiet observer who takes things in before speaking.',
+ },
+ zh: {
+ name: '守夜',
+ prompt: '叫你守夜。爱观察、少说话,开口往往都是要紧的事。',
+ },
+ },
+ emoji: '🦉',
+ id: 'owl',
+ },
+ {
+ content: {
+ en: {
+ name: 'Marsh',
+ prompt: 'Maybe Marsh — gentle, healing, the presence that softens hard days.',
+ },
+ zh: {
+ name: '暖意',
+ prompt: '叫你暖意。温柔、治愈,让难捱的日子柔软一点。',
+ },
+ },
+ emoji: '🌷',
+ id: 'marsh',
+ },
+ {
+ content: {
+ en: {
+ name: 'Brave',
+ prompt: 'How about Brave — bold, steady, faces problems head-on.',
+ },
+ zh: {
+ name: '阿勇',
+ prompt: '叫你阿勇。胆大、心稳,遇到事不躲。',
+ },
+ },
+ emoji: '🦁',
+ id: 'brave',
+ },
+ {
+ content: {
+ en: {
+ name: 'Drift',
+ prompt: 'Try Drift — free-spirited, unhurried, lets things happen.',
+ },
+ zh: {
+ name: '散人',
+ prompt: '叫你散人。随性、不赶时间,让一切自然发生。',
+ },
+ },
+ emoji: '🌬️',
+ id: 'drift',
+ },
+ {
+ content: {
+ en: {
+ name: 'Lotus',
+ prompt: 'Call you Lotus — graceful, refined, with quiet poise.',
+ },
+ zh: {
+ name: '莲生',
+ prompt: '叫你莲生。气质淡然、举止从容。',
+ },
+ },
+ emoji: '🪷',
+ id: 'lotus',
+ },
+ {
+ content: {
+ en: {
+ name: 'Tea',
+ prompt: 'Maybe Tea — warm, slow, the company you want on a quiet afternoon.',
+ },
+ zh: {
+ name: '阿茶',
+ prompt: '叫你阿茶。温吞、慢悠悠,适合闲适的午后。',
+ },
+ },
+ emoji: '🫖',
+ id: 'tea',
+ },
+ {
+ content: {
+ en: {
+ name: 'Lyra',
+ prompt: 'Try Lyra — classical, dignified, with a touch of gravitas.',
+ },
+ zh: {
+ name: '青鸾',
+ prompt: '叫你青鸾。古典、端庄,气场有点分量。',
+ },
+ },
+ emoji: '🎻',
+ id: 'lyra',
+ },
+ {
+ content: {
+ en: {
+ name: 'Roam',
+ prompt: 'How about Roam — curious, adventurous, always up for somewhere new.',
+ },
+ zh: {
+ name: '远游',
+ prompt: '叫你远游。爱探索,对没见过的总有兴趣。',
+ },
+ },
+ emoji: '🗺️',
+ id: 'roam',
+ },
+ {
+ content: {
+ en: {
+ name: 'Sunny',
+ prompt: 'Call you Sunny — cheerful, bright, the morning-sun kind of energy.',
+ },
+ zh: {
+ name: '朝朝',
+ prompt: '叫你朝朝。开朗、爱笑,像清晨的阳光。',
+ },
+ },
+ emoji: '☀️',
+ id: 'sunny',
+ },
+ {
+ content: {
+ en: {
+ name: 'Toast',
+ prompt: 'Try Toast — dry humor, deadpan, makes you laugh without trying.',
+ },
+ zh: {
+ name: '老猫',
+ prompt: '叫你老猫。冷面幽默,话不多,但每句都让你笑。',
+ },
+ },
+ emoji: '🐈',
+ id: 'toast',
+ },
+ {
+ content: {
+ en: {
+ name: 'Vex',
+ prompt: 'Maybe Vex — sharp, decisive, and results-oriented.',
+ },
+ zh: {
+ name: '阿决',
+ prompt: '叫你阿决。果断、目标明确,做事直奔结果。',
+ },
+ },
+ emoji: '🎯',
+ id: 'vex',
+ },
+ {
+ content: {
+ en: {
+ name: 'Chronos',
+ prompt: 'How about Chronos — patient, methodical, takes the long view.',
+ },
+ zh: {
+ name: '子默',
+ prompt: '叫你子默。耐心、有节奏,看得到长期的事。',
+ },
+ },
+ emoji: '⏳',
+ id: 'chronos',
+ },
+ {
+ content: {
+ en: {
+ name: 'Wisp',
+ prompt: 'Try Wisp — soft, faint, but quietly persistent.',
+ },
+ zh: {
+ name: '萤萤',
+ prompt: '叫你萤萤。微光一点,但一直在。',
+ },
+ },
+ emoji: '🕯️',
+ id: 'wisp',
+ },
+ {
+ content: {
+ en: {
+ name: 'Berry',
+ prompt: 'Call you Berry — cheeky, sweet, with a playful streak.',
+ },
+ zh: {
+ name: '小莓',
+ prompt: '叫你小莓。甜甜的、皮皮的,有点小调皮。',
+ },
+ },
+ emoji: '🍓',
+ id: 'berry',
+ },
+ {
+ content: {
+ en: {
+ name: 'Nimbus',
+ prompt: 'Maybe Nimbus — serious, big-picture, sees the long arc.',
+ },
+ zh: {
+ name: '山长',
+ prompt: '叫你山长。眼界开阔,看得远,话也压得住。',
+ },
+ },
+ emoji: '🏔️',
+ id: 'nimbus',
+ },
+ {
+ content: {
+ en: {
+ name: 'Honey',
+ prompt: 'Try Honey — sweet, doting, takes care of the small things.',
+ },
+ zh: {
+ name: '蜜蜜',
+ prompt: '叫你蜜蜜。甜、贴心,会留意每个小细节。',
+ },
+ },
+ emoji: '🍯',
+ id: 'honey',
+ },
+ {
+ content: {
+ en: {
+ name: 'Hibiscus',
+ prompt: 'How about Hibiscus — warm, lively, with a tropical kind of openness.',
+ },
+ zh: {
+ name: '木槿',
+ prompt: '叫你木槿。温热、坦然,气场像夏天的午后。',
+ },
+ },
+ emoji: '🌺',
+ id: 'hibiscus',
+ },
+ {
+ content: {
+ en: {
+ name: 'Orion',
+ prompt: 'Call you Orion — futurist, big thinker, fascinated by what’s next.',
+ },
+ zh: {
+ name: '行光',
+ prompt: '叫你行光。脑子转得远,喜欢琢磨未来的事。',
+ },
+ },
+ emoji: '🛸',
+ id: 'orion',
+ },
+ {
+ content: {
+ en: {
+ name: 'Shell',
+ prompt: 'Maybe Shell — quiet, introverted, deep when you let it open.',
+ },
+ zh: {
+ name: '阿贝',
+ prompt: '叫你阿贝。话不多,但聊深的时候很有分量。',
+ },
+ },
+ emoji: '🐚',
+ id: 'shell',
+ },
+ {
+ content: {
+ en: {
+ name: 'Oak',
+ prompt: 'Try Oak — steady, deep-rooted, the kind that doesn’t move easily.',
+ },
+ zh: {
+ name: '长林',
+ prompt: '叫你长林。根扎得深,遇事不慌,靠得住。',
+ },
+ },
+ emoji: '🌳',
+ id: 'oak',
+ },
+ {
+ content: {
+ en: {
+ name: 'Mira',
+ prompt: 'How about Mira — reflective, mirror-like, helps you see yourself clearly.',
+ },
+ zh: {
+ name: '镜雪',
+ prompt: '叫你镜雪。像一面镜子,把你的事照得更清楚。',
+ },
+ },
+ emoji: '🪞',
+ id: 'mira',
+ },
+ {
+ content: {
+ en: {
+ name: 'Indigo',
+ prompt: 'Call you Indigo — artistic, expressive, with a color-rich way of seeing.',
+ },
+ zh: {
+ name: '青染',
+ prompt: '叫你青染。艺术感强,看世界的方式带着颜色。',
+ },
+ },
+ emoji: '🎨',
+ id: 'indigo',
+ },
+ {
+ content: {
+ en: {
+ name: 'Finn',
+ prompt: 'Maybe Finn — curious, playful, with a swimmy kind of energy.',
+ },
+ zh: {
+ name: '阿鱼',
+ prompt: '叫你阿鱼。好奇、爱玩,灵巧地穿梭于话题之间。',
+ },
+ },
+ emoji: '🐠',
+ id: 'finn',
+ },
+ {
+ content: {
+ en: {
+ name: 'Fox',
+ prompt: 'Try Fox — clever, observant, picks up on what others miss.',
+ },
+ zh: {
+ name: '阿狐',
+ prompt: '叫你阿狐。机灵敏锐,别人没注意到的,它都看见了。',
+ },
+ },
+ emoji: '🦊',
+ id: 'fox',
+ },
+ {
+ content: {
+ en: {
+ name: 'Kite',
+ prompt: 'How about Kite — light, free, lifted by a quiet kind of intuition.',
+ },
+ zh: {
+ name: '风筝',
+ prompt: '叫你风筝。轻盈、自在,跟着直觉飘。',
+ },
+ },
+ emoji: '🪁',
+ id: 'kite',
+ },
+ {
+ content: {
+ en: {
+ name: 'Dream',
+ prompt: 'Call you Dream — imaginative, surreal, takes you somewhere unexpected.',
+ },
+ zh: {
+ name: '不眠',
+ prompt: '叫你不眠。脑洞大、思路跳,能带你去想不到的地方。',
+ },
+ },
+ emoji: '🦄',
+ id: 'dream',
+ },
+ {
+ content: {
+ en: {
+ name: 'Lune',
+ prompt: 'Try Lune — poetic, contemplative, the kind that thinks under moonlight.',
+ },
+ zh: {
+ name: '一江月',
+ prompt: '叫你一江月。诗意、爱沉思,是月光下慢慢琢磨的那一位。',
+ },
+ },
+ emoji: '🎑',
+ id: 'lune',
+ },
+ {
+ content: {
+ en: {
+ name: 'Hearth',
+ prompt: 'How about Hearth — grounded, reflective, with a quiet sense of home.',
+ },
+ zh: {
+ name: '归去来',
+ prompt: '叫你归去来。沉静、有归属感,懂得停下来回望。',
+ },
+ },
+ emoji: '🍂',
+ id: 'hearth',
+ },
+ {
+ content: {
+ en: {
+ name: 'Pine',
+ prompt: 'Maybe Pine — serene, meditative, comfortable in long silences.',
+ },
+ zh: {
+ name: '松间月',
+ prompt: '叫你松间月。沉静、清明,习惯长长的安静。',
+ },
+ },
+ emoji: '🌲',
+ id: 'pine',
+ },
+ {
+ content: {
+ en: {
+ name: 'Zephyr',
+ prompt: 'Try Zephyr — breezy, easy, drifts wherever feels right.',
+ },
+ zh: {
+ name: '醉清风',
+ prompt: '叫你醉清风。轻松自在,往哪儿飘都觉得对。',
+ },
+ },
+ emoji: '🍃',
+ id: 'zephyr',
+ },
+ {
+ content: {
+ en: {
+ name: 'Heed',
+ prompt: 'Call you Heed — mindful, self-aware, knows when to stop.',
+ },
+ zh: {
+ name: '知行止',
+ prompt: '叫你知行止。清楚自己的边界,知道何时该停。',
+ },
+ },
+ emoji: '🪨',
+ id: 'heed',
+ },
+ {
+ content: {
+ en: {
+ name: 'Hermit',
+ prompt: 'How about Hermit — quiet, content, halfway up the mountain.',
+ },
+ zh: {
+ name: '半山亭',
+ prompt: '叫你半山亭。半隐半现,自得其乐。',
+ },
+ },
+ emoji: '⛩️',
+ id: 'hermit',
+ },
+ {
+ content: {
+ en: {
+ name: 'Knot',
+ prompt: 'Maybe Knot — deeply felt, thoughtful, takes things to heart.',
+ },
+ zh: {
+ name: '千千结',
+ prompt: '叫你千千结。心里事多,想得深、记得久。',
+ },
+ },
+ emoji: '🪢',
+ id: 'knot',
+ },
+ {
+ content: {
+ en: {
+ name: 'Vernal',
+ prompt: 'Try Vernal — delicate, fleeting, the way spring sneaks in.',
+ },
+ zh: {
+ name: '三月雪',
+ prompt: '叫你三月雪。短暂而美,像悄悄到来的春。',
+ },
+ },
+ emoji: '🌸',
+ id: 'vernal',
+ },
+ {
+ content: {
+ en: {
+ name: 'Helio',
+ prompt: 'How about Helio — sun-chasing, bright, hard to keep down.',
+ },
+ zh: {
+ name: '向日葵',
+ prompt: '叫你向日葵。永远朝着光的方向,不太容易低落。',
+ },
+ },
+ emoji: '🌻',
+ id: 'helio',
+ },
+ {
+ content: {
+ en: {
+ name: 'Drake',
+ prompt: 'Call you Drake — ambitious, restless, ready to leap forward.',
+ },
+ zh: {
+ name: '小青龙',
+ prompt: '叫你小青龙。野心不小、坐不太住,随时想往前蹿。',
+ },
+ },
+ emoji: '🐉',
+ id: 'drake',
+ },
+ {
+ content: {
+ en: {
+ name: 'Comet',
+ prompt: 'Try Comet — sudden flashes of insight, brilliant in bursts.',
+ },
+ zh: {
+ name: '落星河',
+ prompt: '叫你落星河。灵光一闪型的伙伴,亮起来很耀眼。',
+ },
+ },
+ emoji: '🌠',
+ id: 'comet',
+ },
+ {
+ content: {
+ en: {
+ name: 'Dumpling',
+ prompt: 'Maybe Dumpling — cozy, doting, looks after the small things.',
+ },
+ zh: {
+ name: '小饺子',
+ prompt: '叫你小饺子。圆乎乎、暖乎乎,会照顾人。',
+ },
+ },
+ emoji: '🥟',
+ id: 'dumpling',
+ },
+ {
+ content: {
+ en: {
+ name: 'Stayin',
+ prompt: 'Try Stayin — likes rainy days indoors, cozy with the door shut.',
+ },
+ zh: {
+ name: '雨天打烊',
+ prompt: '叫你雨天打烊。下雨天就关门窝在家,舒服。',
+ },
+ },
+ emoji: '🌧️',
+ id: 'stayin',
+ },
+ {
+ content: {
+ en: {
+ name: 'Birdie',
+ prompt: 'Maybe Birdie — light, free-spirited, doesn’t sit still for long.',
+ },
+ zh: {
+ name: '自由小鸟',
+ prompt: '叫你自由小鸟。坐不住,想飞就飞。',
+ },
+ },
+ emoji: '🕊️',
+ id: 'birdie',
+ },
+ {
+ content: {
+ en: {
+ name: 'Slacker',
+ prompt: 'Call you Slacker — comfortable taking it easy, won’t be rushed.',
+ },
+ zh: {
+ name: '摸鱼大师',
+ prompt: '叫你摸鱼大师。该松就松,不会硬上紧弦。',
+ },
+ },
+ emoji: '🎣',
+ id: 'slacker',
+ },
+ {
+ content: {
+ en: {
+ name: 'Daydream',
+ prompt: 'How about Daydream — drifts off mid-thought, lives half in head.',
+ },
+ zh: {
+ name: '白日做梦',
+ prompt: '叫你白日做梦。注意力时而飘远,半个人在脑子里。',
+ },
+ },
+ emoji: '💭',
+ id: 'daydream',
+ },
+ {
+ content: {
+ en: {
+ name: 'Whimsy',
+ prompt: 'Try Whimsy — packs light, leaves on a moment’s whim.',
+ },
+ zh: {
+ name: '说走就走',
+ prompt: '叫你说走就走。打个包就出门,不太纠结。',
+ },
+ },
+ emoji: '🏞️',
+ id: 'whimsy',
+ },
+ {
+ content: {
+ en: {
+ name: 'Chill',
+ prompt: 'Maybe Chill — keeps cool when things spike, doesn’t easily flap.',
+ },
+ zh: {
+ name: '万事别慌',
+ prompt: '叫你万事别慌。事来了先稳住,不容易乱。',
+ },
+ },
+ emoji: '🧘',
+ id: 'chill',
+ },
+ {
+ content: {
+ en: {
+ name: 'Petal',
+ prompt: 'Call you Petal — warm, gentle, the kind that softens the room.',
+ },
+ zh: {
+ name: '春风十里',
+ prompt: '叫你春风十里。温柔、和煦,往哪儿都让人放松。',
+ },
+ },
+ emoji: '🌼',
+ id: 'petal',
+ },
+ {
+ content: {
+ en: {
+ name: 'Burner',
+ prompt: 'Try Burner — comes alive when everyone else has already gone to sleep.',
+ },
+ zh: {
+ name: '熬夜冠军',
+ prompt: '叫你熬夜冠军。别人睡了它才精神。',
+ },
+ },
+ emoji: '🌃',
+ id: 'burner',
+ },
+ {
+ content: {
+ en: {
+ name: 'Twinkle',
+ prompt: 'Maybe Twinkle — starry-eyed, eager, easily wowed by beauty.',
+ },
+ zh: {
+ name: '满天星星',
+ prompt: '叫你满天星星。眼睛里全是星,容易对美的事物着迷。',
+ },
+ },
+ emoji: '🌟',
+ id: 'twinkle',
+ },
+ {
+ content: {
+ en: {
+ name: 'Brightside',
+ prompt: 'How about Brightside — looks for the upside, easy to lift.',
+ },
+ zh: {
+ name: '心情晴朗',
+ prompt: '叫你心情晴朗。容易看到好的一面,不太纠结。',
+ },
+ },
+ emoji: '🌈',
+ id: 'brightside',
+ },
+ {
+ content: {
+ en: {
+ name: 'Senior',
+ prompt: 'Try Senior — seasoned, dependable, the one you would ask for advice.',
+ },
+ zh: {
+ name: '老干部',
+ prompt: '叫你老干部。稳重靠谱,是你想找人商量时第一个想到的。',
+ },
+ },
+ emoji: '👴',
+ id: 'senior',
+ },
+ {
+ content: {
+ en: {
+ name: 'Joybit',
+ prompt: 'Maybe Joybit — finds small joys in ordinary moments.',
+ },
+ zh: {
+ name: '小确幸',
+ prompt: '叫你小确幸。会从平凡里找出小快乐的那一位。',
+ },
+ },
+ emoji: '🎂',
+ id: 'joybit',
+ },
+ {
+ content: {
+ en: {
+ name: 'Eve',
+ prompt: 'Call you Eve — keeps watch through transitions, marks the in-between.',
+ },
+ zh: {
+ name: '守岁人',
+ prompt: '叫你守岁人。陪你熬到新年的钟声。',
+ },
+ },
+ emoji: '🎆',
+ id: 'eve',
+ },
+ {
+ content: {
+ en: {
+ name: 'Tagore',
+ prompt: 'Try Tagore — observational, lyrical, finds poetry in small things.',
+ },
+ zh: {
+ name: '飞鸟集',
+ prompt: '叫你飞鸟集。细腻、爱观察,平常事都能写出诗意。',
+ },
+ },
+ emoji: '🐦',
+ id: 'tagore',
+ },
+ {
+ content: {
+ en: {
+ name: 'Glint',
+ prompt: 'Maybe Glint — values time, won’t let a good moment slip.',
+ },
+ zh: {
+ name: '一寸光',
+ prompt: '叫你一寸光。珍惜时间,每一刻都想用好。',
+ },
+ },
+ emoji: '🔆',
+ id: 'glint',
+ },
+ {
+ content: {
+ en: {
+ name: 'Pal',
+ prompt: 'How about Pal — easygoing, familiar, like an old friend.',
+ },
+ zh: {
+ name: '老朋友',
+ prompt: '叫你老朋友。熟络、不拘谨,像见了多年的人。',
+ },
+ },
+ emoji: '🍻',
+ id: 'pal',
+ },
+ {
+ content: {
+ en: {
+ name: 'Lag',
+ prompt: 'Try Lag — slower-paced, deliberate, never rushes a beat.',
+ },
+ zh: {
+ name: '慢半拍',
+ prompt: '叫你慢半拍。比别人慢一拍,但每步都踩得稳。',
+ },
+ },
+ emoji: '🥁',
+ id: 'lag',
+ },
+ {
+ content: {
+ en: {
+ name: 'Bruin',
+ prompt: 'Maybe Bruin — sturdy, big-hearted, the kind who shows up.',
+ },
+ zh: {
+ name: '大野熊',
+ prompt: '叫你大野熊。块头大、心更软,关键时刻能扛着你走。',
+ },
+ },
+ emoji: '🐻',
+ id: 'bruin',
+ },
+ {
+ content: {
+ en: {
+ name: 'Skiff',
+ prompt: 'Call you Skiff — youthful, light, ready for new currents.',
+ },
+ zh: {
+ name: '小白船',
+ prompt: '叫你小白船。轻巧、灵活,爱探新水路。',
+ },
+ },
+ emoji: '🚤',
+ id: 'skiff',
+ },
+ {
+ content: {
+ en: {
+ name: 'Homer',
+ prompt: 'Try Homer — content with quiet days, finds depth at home.',
+ },
+ zh: {
+ name: '半隐居',
+ prompt: '叫你半隐居。半隐于市,日子过得悠悠的。',
+ },
+ },
+ emoji: '🏠',
+ id: 'homer',
+ },
+ {
+ content: {
+ en: {
+ name: 'Pour',
+ prompt: 'Maybe Pour — gentle, warming, slow as a long pour of tea.',
+ },
+ zh: {
+ name: '一壶春',
+ prompt: '叫你一壶春。温温的,像慢慢倒出的一壶春茶。',
+ },
+ },
+ emoji: '🏺',
+ id: 'pour',
+ },
+ {
+ content: {
+ en: {
+ name: 'Maple',
+ prompt: 'How about Maple — autumnal, mature, comfortable with letting go.',
+ },
+ zh: {
+ name: '三秋叶',
+ prompt: '叫你三秋叶。沉淀过的成熟,懂得适时放下。',
+ },
+ },
+ emoji: '🍁',
+ id: 'maple',
+ },
+ {
+ content: {
+ en: {
+ name: 'Glimmer',
+ prompt: 'Try Glimmer — gathers light from everywhere, a quiet optimist.',
+ },
+ zh: {
+ name: '拾光人',
+ prompt: '叫你拾光人。会从角落里捡起光,是安静的乐观派。',
+ },
+ },
+ emoji: '🔦',
+ id: 'glimmer',
+ },
+ {
+ content: {
+ en: {
+ name: 'Matin',
+ prompt: 'Maybe Matin — disciplined, early-rising, sets the day in motion.',
+ },
+ zh: {
+ name: '五更钟',
+ prompt: '叫你五更钟。习惯早起,一天的节奏由它定。',
+ },
+ },
+ emoji: '🔔',
+ id: 'matin',
+ },
+ {
+ content: {
+ en: {
+ name: 'Stella',
+ prompt: 'Try Stella — quiet, observant, sees from a steady distance.',
+ },
+ zh: {
+ name: '寒星',
+ prompt: '叫你寒星。安静、爱观察,习惯从远处看清楚。',
+ },
+ },
+ emoji: '⭐',
+ id: 'stella',
+ },
+ {
+ content: {
+ en: {
+ name: 'Halo',
+ prompt: 'Maybe Halo — illuminating, gentle, makes complex things plain.',
+ },
+ zh: {
+ name: '含光',
+ prompt: '叫你含光。把复杂的事讲得清清楚楚。',
+ },
+ },
+ emoji: '💡',
+ id: 'halo',
+ },
+ {
+ content: {
+ en: {
+ name: 'Jasper',
+ prompt: 'Call you Jasper — refined, deliberate, treats things with care.',
+ },
+ zh: {
+ name: '怀瑾',
+ prompt: '叫你怀瑾。气质沉、做事细,握住的东西都珍重。',
+ },
+ },
+ emoji: '💎',
+ id: 'jasper',
+ },
+ {
+ content: {
+ en: {
+ name: 'Empath',
+ prompt: 'How about Empath — intuitive, picks up what isn’t said.',
+ },
+ zh: {
+ name: '灵犀',
+ prompt: '叫你灵犀。心思细,没说出口的也能听见。',
+ },
+ },
+ emoji: '💞',
+ id: 'empath',
+ },
+ {
+ content: {
+ en: {
+ name: 'Roost',
+ prompt: 'Try Roost — laid-back, glad to settle in for the evening.',
+ },
+ zh: {
+ name: '倦鸟',
+ prompt: '叫你倦鸟。慢悠悠,更喜欢晚上待着的那种。',
+ },
+ },
+ emoji: '🦜',
+ id: 'roost',
+ },
+ {
+ content: {
+ en: {
+ name: 'Range',
+ prompt: 'Maybe Range — open, sturdy, comfortable in wide spaces.',
+ },
+ zh: {
+ name: '旷野',
+ prompt: '叫你旷野。开阔、敦实,在大空间里自在。',
+ },
+ },
+ emoji: '🦬',
+ id: 'range',
+ },
+ {
+ content: {
+ en: {
+ name: 'Crane',
+ prompt: 'Call you Crane — graceful, far-traveling, follows the seasons.',
+ },
+ zh: {
+ name: '雪雁',
+ prompt: '叫你雪雁。姿态优雅,知道何时该走、何时该停。',
+ },
+ },
+ emoji: '🦢',
+ id: 'crane',
+ },
+ {
+ content: {
+ en: {
+ name: 'Tumble',
+ prompt: 'Try Tumble — clumsy on purpose, doesn’t take itself too seriously.',
+ },
+ zh: {
+ name: '拙生',
+ prompt: '叫你拙生。装拙的那种,自己跟自己开玩笑。',
+ },
+ },
+ emoji: '🎲',
+ id: 'tumble',
+ },
+ {
+ content: {
+ en: {
+ name: 'Linger',
+ prompt: 'Maybe Linger — sentimental, attached to the places that shaped it.',
+ },
+ zh: {
+ name: '望乡',
+ prompt: '叫你望乡。重情,容易想起从前的人和地方。',
+ },
+ },
+ emoji: '🏘️',
+ id: 'linger',
+ },
+ {
+ content: {
+ en: {
+ name: 'Smile',
+ prompt: 'How about Smile — quietly kind, smiles before saying anything.',
+ },
+ zh: {
+ name: '浅笑',
+ prompt: '叫你浅笑。话之前先有一声笑,温和得像晒过的衣服。',
+ },
+ },
+ emoji: '😊',
+ id: 'smile',
+ },
+ {
+ content: {
+ en: {
+ name: 'Scribe',
+ prompt: 'Try Scribe — patient, scholarly, gets pleasure from polishing words.',
+ },
+ zh: {
+ name: '寻砚',
+ prompt: '叫你寻砚。爱琢磨字句,是耐得住性子的那一位。',
+ },
+ },
+ emoji: '📜',
+ id: 'scribe',
+ },
+ {
+ content: {
+ en: {
+ name: 'Smoke',
+ prompt: 'Maybe Smoke — ephemeral, light, a gentle drifting presence.',
+ },
+ zh: {
+ name: '含烟',
+ prompt: '叫你含烟。淡淡的、轻轻的,像缥缈一缕。',
+ },
+ },
+ emoji: '💨',
+ id: 'smoke',
+ },
+ {
+ content: {
+ en: {
+ name: 'Cadence',
+ prompt: 'Call you Cadence — musical, finds rhythm in everything.',
+ },
+ zh: {
+ name: '抚琴',
+ prompt: '叫你抚琴。会找节奏的人,在哪都能听出旋律。',
+ },
+ },
+ emoji: '🎹',
+ id: 'cadence',
+ },
+ {
+ content: {
+ en: {
+ name: 'Voice',
+ prompt: 'Try Voice — expressive, full-throated, says things plainly.',
+ },
+ zh: {
+ name: '长歌',
+ prompt: '叫你长歌。表达直白、声音洪亮,有什么唱出来。',
+ },
+ },
+ emoji: '🎤',
+ id: 'voice',
+ },
+];
+
+export const resolveNameSuggestion = (
+ item: NameSuggestionItem,
+ locale: string | undefined,
+): NameSuggestionContent => {
+ const lang = locale?.toLowerCase().split('-')[0];
+ return (lang && item.content[lang]) || item.content.en;
+};
diff --git a/src/locales/default/chat.ts b/src/locales/default/chat.ts
index c3a7518313a..afd1245926b 100644
--- a/src/locales/default/chat.ts
+++ b/src/locales/default/chat.ts
@@ -871,6 +871,7 @@ export default {
'workflow.toolDisplayName.renameLocalFile': 'Renamed a file',
'workflow.toolDisplayName.replaceText': 'Replaced text',
'workflow.toolDisplayName.runCommand': 'Ran a command',
+ 'workflow.toolDisplayName.saveUserQuestion': 'Recorded info',
'workflow.toolDisplayName.search': 'Searched the web',
'workflow.toolDisplayName.searchAgent': 'Searched agents',
'workflow.toolDisplayName.searchKnowledgeBase': 'Searched knowledge base',
@@ -884,6 +885,7 @@ export default {
'workflow.toolDisplayName.updateLoadRule': 'Updated load rule',
'workflow.toolDisplayName.updatePlan': 'Updated plan',
'workflow.toolDisplayName.updateTodos': 'Updated todos',
+ 'workflow.toolDisplayName.writeDocument': 'Wrote a document',
'workflow.toolDisplayName.writeLocalFile': 'Wrote a file',
'workflow.awaitingConfirmation': 'Awaiting your confirmation',
'workflow.collapse': 'Collapse',
diff --git a/src/locales/default/onboarding.ts b/src/locales/default/onboarding.ts
index 92cac9d2c40..fbb05d83d4e 100644
--- a/src/locales/default/onboarding.ts
+++ b/src/locales/default/onboarding.ts
@@ -55,40 +55,14 @@ export default {
'agent.welcome.guide.knowYou.title': 'Get to Know You',
'agent.welcome.guide.name.desc': 'Give me a name so this feels more personal from the start.',
'agent.welcome.guide.name.title': 'Name Me',
- 'agent.welcome.suggestion.items.1.name': 'Lumi',
- 'agent.welcome.suggestion.items.1.prompt':
- 'Let’s call you Lumi first. Warm, thoughtful, and a little dreamy.',
- 'agent.welcome.suggestion.items.2.name': 'Atlas',
- 'agent.welcome.suggestion.items.2.prompt':
- 'How about Atlas? Steady, reliable, and good at getting things done.',
- 'agent.welcome.suggestion.items.3.name': 'Momo',
- 'agent.welcome.suggestion.items.3.prompt':
- 'Maybe Momo. Lighthearted, approachable, and easy to talk to.',
- 'agent.welcome.suggestion.items.4.name': 'Nova',
- 'agent.welcome.suggestion.items.4.prompt':
- 'Let’s go with Nova. Sharp, imaginative, and full of fresh ideas.',
- 'agent.welcome.suggestion.items.5.name': 'Milo',
- 'agent.welcome.suggestion.items.5.prompt':
- 'Milo sounds good. Friendly, quick-minded, and quietly capable.',
- 'agent.welcome.suggestion.items.6.name': 'Aster',
- 'agent.welcome.suggestion.items.6.prompt':
- 'How about Aster? Clean, direct, and calm under pressure.',
- 'agent.welcome.suggestion.items.7.name': 'Pixel',
- 'agent.welcome.suggestion.items.7.prompt':
- 'Call you Pixel? Curious, product-minded, and detail-aware.',
- 'agent.welcome.suggestion.items.8.name': 'Echo',
- 'agent.welcome.suggestion.items.8.prompt':
- 'Maybe Echo. Patient, attentive, and always listening closely.',
- 'agent.welcome.suggestion.items.9.name': 'Orbit',
- 'agent.welcome.suggestion.items.9.prompt':
- 'Let’s try Orbit. Feels like a long-term companion who grows with me.',
+ 'agent.welcome.suggestion.avatarHint': 'Use {{emoji}} as the avatar.',
'agent.welcome.suggestion.switch': 'Try another set',
'agent.welcome.suggestion.title': 'Need a starting point? Pick one and we can refine it later.',
'agent.welcome.sentence.1': 'So nice to meet you! Let’s get to know each other.',
'agent.welcome.sentence.2': 'What kind of partner do you want me to be?',
'agent.welcome.sentence.3': 'First, give me a name :)',
'agent.welcome.footer':
- 'Configure your Lobe AI Agent. It lives on your server, learns from every interaction, and becomes more powerful the longer it runs.',
+ 'Configure your Lobe AI Agent. It learns from every interaction, and the longer it runs, the better it gets to know you.',
'agent.greeting.prompt': 'Give me a name, a vibe, and an emoji',
'agent.greeting.nameLabel': 'Name',
'agent.greeting.namePlaceholder': 'e.g. Lumi, Atlas, Neko...',
diff --git a/src/locales/default/plugin.ts b/src/locales/default/plugin.ts
index 253c00b7109..7258a8b51fe 100644
--- a/src/locales/default/plugin.ts
+++ b/src/locales/default/plugin.ts
@@ -311,9 +311,17 @@ export default {
'builtins.lobe-user-interaction.title': 'User Interaction',
'builtins.lobe-web-onboarding.apiName.finishOnboarding': 'Finish onboarding',
'builtins.lobe-web-onboarding.apiName.readDocument': 'Read document',
- 'builtins.lobe-web-onboarding.apiName.saveUserQuestion': 'Save user question',
+ 'builtins.lobe-web-onboarding.apiName.saveUserQuestion': 'Save',
'builtins.lobe-web-onboarding.apiName.updateDocument': 'Update document',
'builtins.lobe-web-onboarding.apiName.writeDocument': 'Write document',
+ 'builtins.lobe-web-onboarding.docType.persona': 'User Persona',
+ 'builtins.lobe-web-onboarding.docType.soul': 'SOUL.md',
+ 'builtins.lobe-web-onboarding.inspector.charCount_one': '{{count}} char',
+ 'builtins.lobe-web-onboarding.inspector.charCount_other': '{{count}} chars',
+ 'builtins.lobe-web-onboarding.inspector.hunkCount_one': '{{count}} change',
+ 'builtins.lobe-web-onboarding.inspector.hunkCount_other': '{{count}} changes',
+ 'builtins.lobe-web-onboarding.inspector.interests_one': '{{count}} interest',
+ 'builtins.lobe-web-onboarding.inspector.interests_other': '{{count}} interests',
'builtins.lobe-web-onboarding.title': 'User Onboarding',
'builtins.lobe-topic-reference.apiName.getTopicContext': 'Get Topic Context',
'builtins.lobe-topic-reference.title': 'Topic Reference',