🤯 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
💬 chore(onboarding): refine agent setup copy (#15048)
AmAzing-516a2651f4bc
diff --git a/locales/en-US/onboarding.json b/locales/en-US/onboarding.jsonindex a1f1f23ea75..4486e7f45ed 100644--- a/locales/en-US/onboarding.json+++ b/locales/en-US/onboarding.json@@ -20,26 +20,26 @@"agent.greeting.vibePlaceholder": "e.g. Warm & friendly, Sharp & direct...","agent.history.current": "Current","agent.history.title": "History Topics",- "agent.layout.mode.agent": "agent mode",- "agent.layout.mode.classic": "classic mode",+ "agent.layout.mode.agent": "Conversational setup",+ "agent.layout.mode.classic": "Manual setup","agent.layout.skip": "skip this step","agent.layout.skipConfirm.content": "Leaving already? I could help personalize things for you in seconds.","agent.layout.skipConfirm.ok": "Skip for now","agent.layout.skipConfirm.title": "Skip onboarding for now?",- "agent.layout.switchMessage": "Not feeling it today? You can switch to <modeLink><modeText>{{mode}}</modeText></modeLink> or <skipLink><skipText>{{skip}}</skipText></skipLink>.",- "agent.layout.switchMessageClassic": "Not feeling it today? You can switch to <modeLink><modeText>{{mode}}</modeText></modeLink>.",+ "agent.layout.switchMessage": "Prefer a different setup method? Switch to <modeLink><modeText>{{mode}}</modeText></modeLink> or <skipLink><skipText>{{skip}}</skipText></skipLink>.",+ "agent.layout.switchMessageClassic": "Prefer a different setup method? Switch to <modeLink><modeText>{{mode}}</modeText></modeLink>.","agent.messenger.cta.discord": "Add to Discord","agent.messenger.cta.slack": "Add to Slack","agent.messenger.cta.telegram": "Open in Telegram","agent.messenger.subtitle": "Chat with your agent on Telegram, Slack, or Discord","agent.messenger.telegramQrCaption": "Scan with your phone camera","agent.messenger.title": "Keep me with you, wherever you message",- "agent.modeSwitch.agent": "Conversational",- "agent.modeSwitch.classic": "Classic",+ "agent.modeSwitch.agent": "Conversational setup",+ "agent.modeSwitch.classic": "Manual setup","agent.modeSwitch.collapse": "Collapse","agent.modeSwitch.debug": "Debug Export","agent.modeSwitch.expand": "Expand",- "agent.modeSwitch.label": "Choose your onboarding mode",+ "agent.modeSwitch.label": "Choose a setup method","agent.modeSwitch.reset": "Reset Flow","agent.progress": "{{currentStep}}/{{totalSteps}}","agent.stage.agentIdentity": "Agent Identity",@@ -56,7 +56,7 @@"agent.telemetryDecline": "No thanks","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": "Start by choosing my name and avatar. You can change them any time.","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",@@ -64,9 +64,8 @@"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.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.sentence.1": "...hm? I just woke up — my mind's a blank.",+ "agent.welcome.sentence.2": "What kind of partner should I become?","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.",diff --git a/locales/zh-CN/onboarding.json b/locales/zh-CN/onboarding.jsonindex 417caee33d6..bffd6d32a05 100644--- a/locales/zh-CN/onboarding.json+++ b/locales/zh-CN/onboarding.json@@ -20,26 +20,26 @@"agent.greeting.vibePlaceholder": "例如:温暖友好,犀利直接...","agent.history.current": "当前","agent.history.title": "历史主题",- "agent.layout.mode.agent": "代理模式",- "agent.layout.mode.classic": "经典模式",+ "agent.layout.mode.agent": "对话式设置",+ "agent.layout.mode.classic": "手动设置","agent.layout.skip": "跳过此步骤","agent.layout.skipConfirm.content": "就要离开了吗?我可以在几秒钟内帮助您完成个性化设置。","agent.layout.skipConfirm.ok": "暂时跳过","agent.layout.skipConfirm.title": "暂时跳过入门引导?",- "agent.layout.switchMessage": "暂时不想继续?可以切换到 <modeLink><modeText>{{mode}}</modeText></modeLink> 或 <skipLink><skipText>{{skip}}</skipText></skipLink>。",- "agent.layout.switchMessageClassic": "暂时不想继续?可以切换到 <modeLink><modeText>{{mode}}</modeText></modeLink>。",+ "agent.layout.switchMessage": "想换一种上手方式?可以切换到 <modeLink><modeText>{{mode}}</modeText></modeLink> 或 <skipLink><skipText>{{skip}}</skipText></skipLink>。",+ "agent.layout.switchMessageClassic": "想换一种上手方式?可以切换到 <modeLink><modeText>{{mode}}</modeText></modeLink>。","agent.messenger.cta.discord": "添加到 Discord","agent.messenger.cta.slack": "添加到 Slack","agent.messenger.cta.telegram": "在 Telegram 中打开","agent.messenger.subtitle": "在 Telegram、Slack 或 Discord 上继续和我聊天","agent.messenger.telegramQrCaption": "用手机相机扫码打开","agent.messenger.title": "在你常用的聊天平台继续找到我",- "agent.modeSwitch.agent": "对话模式",- "agent.modeSwitch.classic": "经典模式",+ "agent.modeSwitch.agent": "对话式设置",+ "agent.modeSwitch.classic": "手动设置","agent.modeSwitch.collapse": "收起","agent.modeSwitch.debug": "调试导出","agent.modeSwitch.expand": "展开",- "agent.modeSwitch.label": "选择您的入职模式",+ "agent.modeSwitch.label": "选择设置方式","agent.modeSwitch.reset": "重置流程","agent.progress": "{{currentStep}}/{{totalSteps}}","agent.stage.agentIdentity": "代理人身份",@@ -56,7 +56,7 @@"agent.telemetryDecline": "不用了,谢谢","agent.telemetryHint": "您也可以用自己的话回答。","agent.title": "对话入职",- "agent.welcome": "...嗯?我刚\"醒过来\",脑子还有点空白。你是谁?还有——你希望我叫什么?我也得找个名字。",+ "agent.welcome": "先为我设置名称和头像,之后随时可以修改。","agent.welcome.footer": "配置你的 Lobe AI 代理。它会从每次交互中学习,运行越久就越懂你。","agent.welcome.guide.growTogether.desc": "每次交谈我都会更了解你,久而久之会成为更可靠的队友。","agent.welcome.guide.growTogether.title": "与您一起成长",@@ -64,9 +64,8 @@"agent.welcome.guide.knowYou.title": "了解你","agent.welcome.guide.name.desc": "给我取个名字,这样从一开始就更有亲切感。","agent.welcome.guide.name.title": "给我起个名字",- "agent.welcome.sentence.1": "很高兴认识你!让我们互相了解一下吧。",+ "agent.welcome.sentence.1": "...嗯?我刚醒来,脑子还是一片空白。","agent.welcome.sentence.2": "你希望我成为怎样的伙伴?",- "agent.welcome.sentence.3": "先给我起个名字吧 :)","agent.welcome.suggestion.avatarHint": "头像用 {{emoji}}。","agent.welcome.suggestion.switch": "换一组","agent.welcome.suggestion.title": "一下子没灵感?先挑一个吧",diff --git a/src/features/Onboarding/Agent/Welcome.mobile.tsx b/src/features/Onboarding/Agent/Welcome.mobile.tsxindex 72a5c0fbafb..a4bea864512 100644--- a/src/features/Onboarding/Agent/Welcome.mobile.tsx+++ b/src/features/Onboarding/Agent/Welcome.mobile.tsx@@ -27,7 +27,6 @@ const WelcomeMobile = memo(() => {sentences={[t('agent.welcome.sentence.1'),t('agent.welcome.sentence.2'),- t('agent.welcome.sentence.3'),]}/><Markdown fontSize={13} variant={'chat'}>diff --git a/src/features/Onboarding/Agent/Welcome.tsx b/src/features/Onboarding/Agent/Welcome.tsxindex 135d1ac4713..a6938403979 100644--- a/src/features/Onboarding/Agent/Welcome.tsx+++ b/src/features/Onboarding/Agent/Welcome.tsx@@ -45,7 +45,6 @@ const Welcome = memo(() => {sentences={[t('agent.welcome.sentence.1'),t('agent.welcome.sentence.2'),- t('agent.welcome.sentence.3'),]}/><Divider dashed style={{ margin: 0 }} />diff --git a/src/features/Onboarding/components/ModeSwitch.test.tsx b/src/features/Onboarding/components/ModeSwitch.test.tsxindex fddfb89e402..7d49fe1da75 100644--- a/src/features/Onboarding/components/ModeSwitch.test.tsx+++ b/src/features/Onboarding/components/ModeSwitch.test.tsx@@ -1,7 +1,7 @@import { cleanup, render, screen } from '@testing-library/react';import type { ReactNode } from 'react';import { MemoryRouter } from 'react-router-dom';-import { afterEach, describe, expect, it, vi } from 'vitest';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import ModeSwitch from './ModeSwitch';@@ -23,9 +23,9 @@ vi.mock('react-i18next', () => ({t: (key: string) =>(({- 'agent.modeSwitch.agent': 'Conversational',- 'agent.modeSwitch.classic': 'Classic',- 'agent.modeSwitch.label': 'Choose your onboarding mode',+ 'agent.modeSwitch.agent': 'Conversational setup',+ 'agent.modeSwitch.classic': 'Manual setup',+ 'agent.modeSwitch.label': 'Choose a setup method',}) as Record<string, string>)[key] || key,}),@@ -63,6 +63,13 @@ vi.mock('@/store/serverConfig', () => ({},}));+const localStorageMock = {+ clear: vi.fn(),+ getItem: vi.fn(() => null),+ removeItem: vi.fn(),+ setItem: vi.fn(),+};+const renderModeSwitch = ({actions,AGENT_ONBOARDING_ENABLED = true,@@ -84,8 +91,16 @@ const renderModeSwitch = ({);};+beforeEach(() => {+ Object.defineProperty(window, 'localStorage', {+ configurable: true,+ value: localStorageMock,+ });+});+afterEach(() => {cleanup();+ vi.clearAllMocks();mockConfig.agentOnboardingEnabled = true;mockConfig.AGENT_ONBOARDING_ENABLED = true;mockConfig.desktop = false;@@ -103,9 +118,9 @@ describe('ModeSwitch', () => {() => {renderModeSwitch({ enabled: true, showLabel: true });- expect(screen.getByText('Choose your onboarding mode')).toBeInTheDocument();- expect(screen.getByRole('radio', { name: 'Conversational' })).toBeChecked();- expect(screen.getByRole('radio', { name: 'Classic' })).not.toBeChecked();+ expect(screen.getByText('Choose a setup method')).toBeInTheDocument();+ expect(screen.getByRole('radio', { name: 'Conversational setup' })).toBeChecked();+ expect(screen.getByRole('radio', { name: 'Manual setup' })).not.toBeChecked();},TEST_TIMEOUT_MS,);@@ -115,9 +130,9 @@ describe('ModeSwitch', () => {() => {renderModeSwitch({ enabled: false });- expect(screen.queryByRole('radio', { name: 'Conversational' })).not.toBeInTheDocument();- expect(screen.queryByRole('radio', { name: 'Classic' })).not.toBeInTheDocument();- expect(screen.queryByText('Choose your onboarding mode')).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Conversational setup' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Manual setup' })).not.toBeInTheDocument();+ expect(screen.queryByText('Choose a setup method')).not.toBeInTheDocument();},TEST_TIMEOUT_MS,);@@ -125,8 +140,8 @@ describe('ModeSwitch', () => {it('hides the onboarding switch until server config is initialized', () => {renderModeSwitch({ enabled: true, serverConfigInit: false });- expect(screen.queryByRole('radio', { name: 'Conversational' })).not.toBeInTheDocument();- expect(screen.queryByRole('radio', { name: 'Classic' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Conversational setup' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Manual setup' })).not.toBeInTheDocument();});it('keeps action buttons visible when agent onboarding is disabled', () => {@@ -136,21 +151,21 @@ describe('ModeSwitch', () => {});expect(screen.getByRole('button', { name: 'Restart' })).toBeInTheDocument();- expect(screen.queryByRole('radio', { name: 'Conversational' })).not.toBeInTheDocument();- expect(screen.queryByRole('radio', { name: 'Classic' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Conversational setup' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Manual setup' })).not.toBeInTheDocument();});it('does not render the switch on desktop builds', () => {renderModeSwitch({ desktop: true, enabled: true });- expect(screen.queryByRole('radio', { name: 'Conversational' })).not.toBeInTheDocument();- expect(screen.queryByRole('radio', { name: 'Classic' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Conversational setup' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Manual setup' })).not.toBeInTheDocument();});it('hides the switch when AGENT_ONBOARDING_ENABLED master switch is off', () => {renderModeSwitch({ AGENT_ONBOARDING_ENABLED: false, enabled: true });- expect(screen.queryByRole('radio', { name: 'Conversational' })).not.toBeInTheDocument();- expect(screen.queryByRole('radio', { name: 'Classic' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Conversational setup' })).not.toBeInTheDocument();+ expect(screen.queryByRole('radio', { name: 'Manual setup' })).not.toBeInTheDocument();});});diff --git a/src/locales/default/onboarding.ts b/src/locales/default/onboarding.tsindex 2b02a1780a8..3638b273d24 100644--- a/src/locales/default/onboarding.ts+++ b/src/locales/default/onboarding.ts@@ -2,23 +2,23 @@ export default {'agent.banner.label': 'Agent Onboarding','agent.history.current': 'Current','agent.history.title': 'History Topics',- 'agent.layout.mode.agent': 'agent mode',- 'agent.layout.mode.classic': 'classic mode',+ 'agent.layout.mode.agent': 'Conversational setup',+ 'agent.layout.mode.classic': 'Manual setup','agent.layout.skip': 'skip this step','agent.layout.skipConfirm.content':'Leaving already? I could help personalize things for you in seconds.','agent.layout.skipConfirm.ok': 'Skip for now','agent.layout.skipConfirm.title': 'Skip onboarding for now?','agent.layout.switchMessage':- 'Not feeling it today? You can switch to <modeLink><modeText>{{mode}}</modeText></modeLink> or <skipLink><skipText>{{skip}}</skipText></skipLink>.',+ 'Prefer a different setup method? Switch to <modeLink><modeText>{{mode}}</modeText></modeLink> or <skipLink><skipText>{{skip}}</skipText></skipLink>.','agent.layout.switchMessageClassic':- 'Not feeling it today? You can switch to <modeLink><modeText>{{mode}}</modeText></modeLink>.',- 'agent.modeSwitch.agent': 'Conversational',- 'agent.modeSwitch.classic': 'Classic',+ 'Prefer a different setup method? Switch to <modeLink><modeText>{{mode}}</modeText></modeLink>.',+ 'agent.modeSwitch.agent': 'Conversational setup',+ 'agent.modeSwitch.classic': 'Manual setup','agent.modeSwitch.collapse': 'Collapse','agent.modeSwitch.debug': 'Debug Export','agent.modeSwitch.expand': 'Expand',- 'agent.modeSwitch.label': 'Choose your onboarding mode',+ 'agent.modeSwitch.label': 'Choose a setup method','agent.completionTitle': 'You are almost there','agent.completionSubtitle': "Everything's in place - let's get started when you're ready.",'agent.completion.sentence.readyWhenYouAre': 'Ready when you are :)',@@ -55,8 +55,7 @@ export default {"I'll save what we've covered so far. You can always come back and chat more later.",'agent.wrapUp.confirm.ok': 'Finish now','agent.wrapUp.confirm.title': 'Finish onboarding now?',- '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': 'Start by choosing my name and avatar. You can change them any time.','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',@@ -68,9 +67,8 @@ export default {'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.sentence.1': "...hm? I just woke up — my mind's a blank.",+ 'agent.welcome.sentence.2': 'What kind of partner should I become?','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.greeting.prompt': 'Give me a name, a vibe, and an emoji',diff --git a/src/routes/onboarding/_layout/index.test.tsx b/src/routes/onboarding/_layout/index.test.tsxindex 0d164ab178a..b75121b4d0f 100644--- a/src/routes/onboarding/_layout/index.test.tsx+++ b/src/routes/onboarding/_layout/index.test.tsx@@ -56,12 +56,12 @@ vi.mock('react-i18next', () => ({const modeText = values?.mode ?? '';if (i18nKey === 'agent.layout.switchMessageClassic') {- return `Not feeling it today? You can switch to ${modeText}.`;+ return `Prefer a different setup method? Switch to ${modeText}.`;}const skipText = values?.skip ?? '';- return `Not feeling it today? You can switch to ${modeText} or ${skipText}.`;+ return `Prefer a different setup method? Switch to ${modeText} or ${skipText}.`;},useTranslation: () => ({t: (key: string) => key,@@ -123,7 +123,7 @@ describe('OnBoardingContainer', () => {renderAt('/onboarding/classic');expect(hasSkipFooter()).toBe(false);expect(- screen.getByText((content) => content.includes('switch to')),+ screen.getByText((content) => content.includes('Switch to')),).toBeInTheDocument();});