🤯 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
✨ feat(labs): add experimental description to Labs settings header (#17446)
AmAzing-a69fab7e844d
diff --git a/locales/en-US/labs.json b/locales/en-US/labs.jsonindex 5ab8c207bea..8e5aba26ffc 100644--- a/locales/en-US/labs.json+++ b/locales/en-US/labs.json@@ -1,4 +1,5 @@{+ "description": "These features are experimental. We might remove them, and they might have bugs. We'd love your feedback while using them.","features.agentGraphConfig.desc": "Show graph runtime configuration in an agent profile advanced settings.","features.agentGraphConfig.title": "Agent Graph Runtime Configuration","features.agentSelfIteration.desc": "Allow the agent to reflect, build self-awareness, and continuously iterate through ongoing attempts and interactions.",diff --git a/locales/zh-CN/labs.json b/locales/zh-CN/labs.jsonindex cc2dbfbf2ea..74f75200b91 100644--- a/locales/zh-CN/labs.json+++ b/locales/zh-CN/labs.json@@ -1,4 +1,5 @@{+ "description": "这些功能仍处于实验阶段,可能会被移除,也可能存在问题。欢迎在使用过程中向我们提供反馈。","features.agentGraphConfig.desc": "在助理档案的进阶设置中显示 Graph 运行时配置。","features.agentGraphConfig.title": "Agent Graph 运行时配置","features.agentSelfIteration.desc": "允许助理自我反思、自我感知,并在持续的尝试与交互中不断自我迭代。",diff --git a/packages/locales/src/default/labs.ts b/packages/locales/src/default/labs.tsindex dc5f54dafc0..aa079a0a426 100644--- a/packages/locales/src/default/labs.ts+++ b/packages/locales/src/default/labs.ts@@ -1,4 +1,6 @@export default {+ 'description':+ "These features are experimental. We might remove them, and they might have bugs. We'd love your feedback while using them.",'features.agentGraphConfig.desc':'Show graph runtime configuration in an agent profile advanced settings.','features.agentGraphConfig.title': 'Agent Graph Runtime Configuration',diff --git a/src/routes/(main)/settings/features/SettingHeader.tsx b/src/routes/(main)/settings/features/SettingHeader.tsxindex fcfea97f6d6..4374b82a78d 100644--- a/src/routes/(main)/settings/features/SettingHeader.tsx+++ b/src/routes/(main)/settings/features/SettingHeader.tsx@@ -3,17 +3,21 @@ import { Divider } from 'antd';import { type FC, type ReactNode } from 'react';interface SettingHeaderProps {+ description?: ReactNode;extra?: ReactNode;title: ReactNode;}-const SettingHeader: FC<SettingHeaderProps> = ({ title, extra }) => {+const SettingHeader: FC<SettingHeaderProps> = ({ title, description, extra }) => {return (<Flexbox gap={24} style={{ paddingTop: 12 }}><Flexbox horizontal align={'center'} justify={'space-between'}>- <Text strong fontSize={24}>- {title}- </Text>+ <Flexbox gap={4}>+ <Text strong fontSize={24}>+ {title}+ </Text>+ {description && <Text type={'secondary'}>{description}</Text>}+ </Flexbox>{extra}</Flexbox><Divider style={{ margin: 0 }} />diff --git a/src/routes/(main)/settings/labs/index.test.tsx b/src/routes/(main)/settings/labs/index.test.tsxindex 8878c9b52fa..a88567ec826 100644--- a/src/routes/(main)/settings/labs/index.test.tsx+++ b/src/routes/(main)/settings/labs/index.test.tsx@@ -66,7 +66,12 @@ vi.mock('@lobehub/ui/base-ui', () => ({}));vi.mock('@/routes/(main)/settings/features/SettingHeader', () => ({- default: ({ title }: { title: string }) => <h1>{title}</h1>,+ default: ({ description, title }: { description?: string; title: string }) => (+ <header>+ <h1>{title}</h1>+ {description}+ </header>+ ),}));const createWrapper = () => {@@ -94,6 +99,12 @@ afterEach(() => {});describe('Labs settings page', () => {+ it('explains that Labs features are experimental', () => {+ renderPage();++ expect(screen.getByText('description')).toBeDefined();+ });+it('splits experiments into General and Desktop groups', () => {renderPage();diff --git a/src/routes/(main)/settings/labs/index.tsx b/src/routes/(main)/settings/labs/index.tsxindex 5e9b90ffb95..3946998b2ba 100644--- a/src/routes/(main)/settings/labs/index.tsx+++ b/src/routes/(main)/settings/labs/index.tsx@@ -253,7 +253,7 @@ const Page = memo(() => {return (<>- <SettingHeader title={tLabs('title')} />+ <SettingHeader description={tLabs('description')} title={tLabs('title')} /><Formcollapsible={false}items={items}