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(labs): split self-evolving description and call out extra quota usage (#22293)

AmAzing-2a8c0486ea08
diff --git a/locales/en-US/labs.json b/locales/en-US/labs.json
index 1e727dff433..5e0a3fee8b7 100644
--- a/locales/en-US/labs.json
+++ b/locales/en-US/labs.json
@@ -34,7 +34,8 @@
"features.oauthApps.title": "OAuth Apps",
"features.projects.desc": "Organize long-running goals into dedicated workspaces with their own agents, knowledge bases, and tasks.",
"features.projects.title": "Project Workspaces",
- "features.selfLearning.desc": "Let every agent learn from your conversations in the background: it remembers facts, refines skills, collects lessons, and reviews its day each night. Rounds you send back become rules. Each nightly review covers at most 50 conversations. See it all under Memory → Self-evolving.",
+ "features.selfLearning.desc": "Agents learn from your conversations in the background and review their day each night. See the results under Memory → Self-evolving.",
+ "features.selfLearning.note": "This runs model calls in the background and uses additional quota. Each nightly review covers up to 50 conversations.",
"features.selfLearning.title": "Self-evolving",
"features.taskVerify.desc": "Add an Acceptance section to the task detail: describe acceptance in one sentence and let AI generate editable verify criteria.",
"features.taskVerify.title": "Acceptance",
diff --git a/locales/zh-CN/labs.json b/locales/zh-CN/labs.json
index 7e7a0fde9d8..f70057d602a 100644
--- a/locales/zh-CN/labs.json
+++ b/locales/zh-CN/labs.json
@@ -34,7 +34,8 @@
"features.oauthApps.title": "OAuth 应用",
"features.projects.desc": "将长期目标组织到独立工作空间中,并集中管理相关智能体、资料库与任务。",
"features.projects.title": "项目工作空间",
- "features.selfLearning.desc": "让所有 Agent 在后台从对话中学习:记住信息、完善技能、积累经验,并在每晚复盘。你打回的验收会沉淀成规矩。每晚复盘最多覆盖 50 个话题。在「记忆 → 自进化」里统一查看。",
+ "features.selfLearning.desc": "让 Agent 在后台从对话中学习,并在每晚复盘。在「记忆 → 自进化」中查看结果。",
+ "features.selfLearning.note": "开启后会在后台调用模型,产生额外的额度消耗。每晚复盘最多处理 50 个话题。",
"features.selfLearning.title": "自进化",
"features.taskVerify.desc": "在任务详情里增加「交付验收」模块:一句话描述验收要求,AI 自动生成可编辑的验收项。",
"features.taskVerify.title": "任务交付验收",
diff --git a/packages/locales/src/default/labs.ts b/packages/locales/src/default/labs.ts
index 296b58c0e3e..cb58b4f3a03 100644
--- a/packages/locales/src/default/labs.ts
+++ b/packages/locales/src/default/labs.ts
@@ -55,7 +55,9 @@ export default {
'Add an Acceptance section to the task detail: describe acceptance in one sentence and let AI generate editable verify criteria.',
'features.taskVerify.title': 'Acceptance',
'features.selfLearning.desc':
- 'Let every agent learn from your conversations in the background: it remembers facts, refines skills, collects lessons, and reviews its day each night. Rounds you send back become rules. Each nightly review covers at most 50 conversations. See it all under Memory → Self-evolving.',
+ 'Agents learn from your conversations in the background and review their day each night. See the results under Memory → Self-evolving.',
+ 'features.selfLearning.note':
+ 'This runs model calls in the background and uses additional quota. Each nightly review covers up to 50 conversations.',
'features.selfLearning.title': 'Self-evolving',
'features.topicBugReport.desc':
'Adds Report Bug to the topic menu. Send the topic’s IDs, your app environment, and optional attachments to the LobeHub support team.',
diff --git a/src/features/Settings/labs/features.ts b/src/features/Settings/labs/features.ts
index 1909d3ee99f..388d07c313c 100644
--- a/src/features/Settings/labs/features.ts
+++ b/src/features/Settings/labs/features.ts
@@ -30,6 +30,9 @@ type LabFeatureI18nKey =
| 'selfLearning'
| 'topicBugReport';
+/** Locale key stems that also carry a `features.${stem}.note` line */
+type LabFeatureNoteI18nKey = 'selfLearning';
+
export interface LabFeatureItem {
/**
* Only offered when business features are on: the experiment needs a service
@@ -42,6 +45,11 @@ export interface LabFeatureItem {
flag: keyof typeof labPreferSelectors;
/** Locale key stem in the `labs` namespace: `features.${i18nKey}.title|desc` */
i18nKey: LabFeatureI18nKey;
+ /**
+ * Second description line for what the user must know before turning it on
+ * (e.g. extra usage cost): `features.${noteI18nKey}.note`
+ */
+ noteI18nKey?: LabFeatureNoteI18nKey;
/** Extra untranslated English synonyms for the settings search index */
searchKeywords: string[];
stage: LabStage;
@@ -65,6 +73,7 @@ const ALL_LAB_FEATURES: LabFeatureItem[] = [
{
flag: 'enableSelfLearning',
i18nKey: 'selfLearning',
+ noteI18nKey: 'selfLearning',
searchKeywords: [
'self-evolving',
'self learning',
diff --git a/src/features/Settings/labs/index.test.tsx b/src/features/Settings/labs/index.test.tsx
index d77f15ad98e..7f89f7603b4 100644
--- a/src/features/Settings/labs/index.test.tsx
+++ b/src/features/Settings/labs/index.test.tsx
@@ -115,6 +115,15 @@ describe('Labs settings page', () => {
expect(within(splitView).getByText('stage.alpha.label')).toBeDefined();
});
+ it('puts the self-evolving usage note on its own line below the description', () => {
+ renderPage();
+
+ const desc = screen.getByText('features.selfLearning.desc');
+ const note = screen.getByText('features.selfLearning.note');
+ expect(note).not.toBe(desc);
+ expect(desc.nextElementSibling).toBe(note);
+ });
+
it('renders the OAuth Apps lab toggle', () => {
renderPage();
diff --git a/src/features/Settings/labs/index.tsx b/src/features/Settings/labs/index.tsx
index 6febfc0b36e..5434a2401cd 100644
--- a/src/features/Settings/labs/index.tsx
+++ b/src/features/Settings/labs/index.tsx
@@ -87,7 +87,7 @@ const LabsForm = memo(() => {
LAB_FEATURES.map(({ flag }, index) => [flag, labChecked[index]]),
);
- const toFormItem = ({ flag, i18nKey, stage }: LabFeatureItem): FormFieldProps => ({
+ const toFormItem = ({ flag, i18nKey, noteI18nKey, stage }: LabFeatureItem): FormFieldProps => ({
children: (
<Switch
checked={checkedByFlag[flag]}
@@ -95,7 +95,14 @@ const LabsForm = memo(() => {
onChange={(next: boolean) => updateLab({ [flag]: next })}
/>
),
- desc: tLabs(`features.${i18nKey}.desc`),
+ desc: noteI18nKey ? (
+ <Flexbox>
+ <span>{tLabs(`features.${i18nKey}.desc`)}</span>
+ <span>{tLabs(`features.${noteI18nKey}.note`)}</span>
+ </Flexbox>
+ ) : (
+ tLabs(`features.${i18nKey}.desc`)
+ ),
label: (
<SettingsSearchAnchor id={`labs-${flag}`}>
<Flexbox horizontal align={'center'} gap={8}>