🤯 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: translate non-English comments to English in src/routes (#13395)
LobeHub Bot4a63ea3dcc4c
diff --git a/packages/model-runtime/src/providerTestUtils.ts b/packages/model-runtime/src/providerTestUtils.tsindex 39c01b028f1..c4501968b76 100644--- a/packages/model-runtime/src/providerTestUtils.ts+++ b/packages/model-runtime/src/providerTestUtils.ts@@ -40,7 +40,7 @@ export const testProvider = ({beforeEach(() => {instance = new Runtime({ apiKey: 'test' });- // 使用 vi.spyOn 来模拟 chat.completions.create 方法或 responses.create 方法+ // Use vi.spyOn to mock the chat.completions.create method or responses.create methodvi.spyOn(instance['client'].chat.completions, 'create').mockResolvedValue(new ReadableStream() as any,);@@ -310,16 +310,16 @@ export const testProvider = ({describe('DEBUG', () => {it(`should call debugStream and return StreamingTextResponse when ${chatDebugEnv} is 1`, async () => {// Arrange- const mockProdStream = new ReadableStream() as any; // 模拟的 prod 流+ const mockProdStream = new ReadableStream() as any; // Mocked prod streamconst mockDebugStream = new ReadableStream({start(controller) {controller.enqueue('Debug stream content');controller.close();},}) as any;- mockDebugStream.toReadableStream = () => mockDebugStream; // 添加 toReadableStream 方法+ mockDebugStream.toReadableStream = () => mockDebugStream; // Add toReadableStream method- // 模拟 chat.completions.create 返回值,包括模拟的 tee 方法+ // Mock the chat.completions.create return value, including the mocked tee methodconst createMethod = test?.useResponsesAPI? instance['client'].responses.create: instance['client'].chat.completions.create;@@ -330,15 +330,15 @@ export const testProvider = ({const debugEnv = test?.useResponsesAPI? (responseDebugEnv ?? chatDebugEnv): chatDebugEnv;- // 保存原始环境变量值+ // Save the original environment variable valueconst originalDebugValue = process.env[debugEnv];- // 模拟环境变量+ // Mock the environment variableprocess.env[debugEnv] = '1';vi.spyOn(debugStreamModule, 'debugStream').mockImplementation(() => Promise.resolve());- // 执行测试- // 运行你的测试函数,确保它会在条件满足时调用 debugStream- // 假设的测试函数调用,你可能需要根据实际情况调整+ // Execute the test+ // Run your test function, ensuring it calls debugStream when the condition is met+ // This is a hypothetical test function call; adjust according to actual usageawait instance.chat({messages: [{ content: 'Hello', role: 'user' }],model: chatModel,@@ -346,9 +346,9 @@ export const testProvider = ({temperature: 0,});- // 验证 debugStream 被调用+ // Verify that debugStream was calledexpect(debugStreamModule.debugStream).toHaveBeenCalled();- // 恢复原始环境变量值+ // Restore the original environment variable valueprocess.env[debugEnv] = originalDebugValue;});});diff --git a/src/routes/(desktop)/desktop-onboarding/features/DataModeStep.tsx b/src/routes/(desktop)/desktop-onboarding/features/DataModeStep.tsxindex 6b902d61dc9..a02650fe80f 100644--- a/src/routes/(desktop)/desktop-onboarding/features/DataModeStep.tsx+++ b/src/routes/(desktop)/desktop-onboarding/features/DataModeStep.tsx@@ -55,7 +55,7 @@ const DataModeStep = memo<DataModeStepProps>(({ onBack, onNext }) => {<Text as={'p'}>{t('screen4.description')}</Text></Flexbox><Flexbox gap={16} style={{ width: '100%' }}>- {/* 共享数据选项 */}+ {/* Shared data option */}<Blockclickableflex={1}@@ -92,7 +92,7 @@ const DataModeStep = memo<DataModeStepProps>(({ onBack, onNext }) => {</Flexbox></Block>- {/* 隐私模式选项 */}+ {/* Privacy mode option */}<Blockclickableflex={1}diff --git a/src/routes/(desktop)/desktop-onboarding/features/LoginStep.tsx b/src/routes/(desktop)/desktop-onboarding/features/LoginStep.tsxindex 89df159f3f5..c841cb442af 100644--- a/src/routes/(desktop)/desktop-onboarding/features/LoginStep.tsx+++ b/src/routes/(desktop)/desktop-onboarding/features/LoginStep.tsx@@ -535,7 +535,7 @@ const LoginStep = memo<LoginStepProps>(({ onBack, onNext }) => {</Text></Divider>- {/* Self-host 选项 */}+ {/* Self-host option */}{renderSelfhostContent()}</>)}diff --git a/src/routes/(main)/(create)/features/GenerationWorkspace/EmptyState.tsx b/src/routes/(main)/(create)/features/GenerationWorkspace/EmptyState.tsxindex d6441f0425b..9e59e711b47 100644--- a/src/routes/(main)/(create)/features/GenerationWorkspace/EmptyState.tsx+++ b/src/routes/(main)/(create)/features/GenerationWorkspace/EmptyState.tsx@@ -5,7 +5,7 @@ import type { ComponentType } from 'react';import { memo } from 'react';interface EmptyStateProps {- /** 为 false 时由页面级输入框渲染,此处只显示占位 */+ /** When false, rendered by the page-level input box; only a placeholder is displayed here */embedInput?: boolean;/** Prompt input component to show when embedInput is true */PromptInput: ComponentType<{ disableAnimation?: boolean; showTitle?: boolean }>;diff --git a/src/routes/(main)/(create)/features/GenerationWorkspace/index.tsx b/src/routes/(main)/(create)/features/GenerationWorkspace/index.tsxindex 139097f5ece..4f8efd76362 100644--- a/src/routes/(main)/(create)/features/GenerationWorkspace/index.tsx+++ b/src/routes/(main)/(create)/features/GenerationWorkspace/index.tsx@@ -9,7 +9,7 @@ import Content from './Content';import EmptyState from './EmptyState';interface GenerationWorkspaceProps {- /** 为 false 时由页面级固定底部输入框渲染,不在此处嵌入(与 agent 布局一致) */+ /** When false, rendered by the page-level fixed bottom input box, not embedded here (consistent with agent layout) */embedInput?: boolean;GenerationFeed: ComponentType;PromptInput: ComponentType<{ disableAnimation?: boolean; showTitle?: boolean }>;diff --git a/src/routes/(main)/(create)/image/features/ImageWorkspace/SkeletonList.tsx b/src/routes/(main)/(create)/image/features/ImageWorkspace/SkeletonList.tsxindex 2313cd7dacc..c589ccb6110 100644--- a/src/routes/(main)/(create)/image/features/ImageWorkspace/SkeletonList.tsx+++ b/src/routes/(main)/(create)/image/features/ImageWorkspace/SkeletonList.tsx@@ -6,7 +6,7 @@ import { memo } from 'react';import PromptInput from '@/routes/(main)/(create)/image/features/PromptInput';interface SkeletonListProps {- /** 为 false 时由页面级输入框渲染,此处不渲染输入框(避免切换 topic 时双输入框闪现) */+ /** When false, rendered by the page-level input box; the input box is not rendered here (avoids double input flickering when switching topics) */embedInput?: boolean;}diff --git a/src/routes/(main)/(create)/image/features/ImageWorkspace/index.tsx b/src/routes/(main)/(create)/image/features/ImageWorkspace/index.tsxindex b0a87b4512d..c0ed21c37c6 100644--- a/src/routes/(main)/(create)/image/features/ImageWorkspace/index.tsx+++ b/src/routes/(main)/(create)/image/features/ImageWorkspace/index.tsx@@ -9,7 +9,7 @@ import PromptInput from '../PromptInput';import SkeletonList from './SkeletonList';interface ImageWorkspaceProps {- /** 为 false 时由页面级固定底部输入框渲染,不在此处嵌入(与 agent 布局一致) */+ /** When false, rendered by the page-level fixed bottom input box, not embedded here (consistent with agent layout) */embedInput?: boolean;}diff --git a/src/routes/(main)/_layout/DesktopLayoutContainer.tsx b/src/routes/(main)/_layout/DesktopLayoutContainer.tsxindex 482ce93ef7f..2a5dcd7b004 100644--- a/src/routes/(main)/_layout/DesktopLayoutContainer.tsx+++ b/src/routes/(main)/_layout/DesktopLayoutContainer.tsx@@ -15,7 +15,7 @@ const DesktopLayoutContainer: FC<PropsWithChildren> = ({ children }) => {const isDarkMode = useIsDark();const [expand] = useGlobalStore((s) => [systemStatusSelectors.showLeftPanel(s)]);- // CSS 变量用于动态样式+ // CSS variables for dynamic stylingconst outerCssVariables = useMemo<Record<string, string>>(() => ({'--container-padding-left': expand ? '0px' : '8px',diff --git a/src/routes/(main)/_layout/DesktopLayoutContainer/style.ts b/src/routes/(main)/_layout/DesktopLayoutContainer/style.tsindex 023786de65e..dcb64f79da3 100644--- a/src/routes/(main)/_layout/DesktopLayoutContainer/style.ts+++ b/src/routes/(main)/_layout/DesktopLayoutContainer/style.ts@@ -3,7 +3,7 @@ import { createStaticStyles } from 'antd-style';import { isDesktop } from '@/const/version';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 内层容器+ // Inner containerinnerContainer: css`position: relative;@@ -19,7 +19,7 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({background: ${cssVar.colorBgContainer};`,- // 外层容器+ // Outer containerouterContainer: css`position: relative;diff --git a/src/routes/(main)/_layout/style.ts b/src/routes/(main)/_layout/style.tsindex 406deb46efe..66b13594994 100644--- a/src/routes/(main)/_layout/style.ts+++ b/src/routes/(main)/_layout/style.ts@@ -1,12 +1,12 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 主容器 - 非 PWA 模式(无顶部边框)+ // Main container - non-PWA mode (no top border)mainContainer: css`position: relative;`,- // 主容器 - PWA 模式(带顶部边框)+ // Main container - PWA mode (with top border)mainContainerPWA: css`position: relative;border-block-start: 1px solid ${cssVar.colorBorder};diff --git a/src/routes/(main)/agent/features/Conversation/ThreadHydration.tsx b/src/routes/(main)/agent/features/Conversation/ThreadHydration.tsxindex 759d3a013fd..a0960a550b7 100644--- a/src/routes/(main)/agent/features/Conversation/ThreadHydration.tsx+++ b/src/routes/(main)/agent/features/Conversation/ThreadHydration.tsx@@ -27,7 +27,7 @@ const ThreadHydration = memo(() => {return () => {unsubscribe();};- }, [setThread]); // ✅ 现在 setValue 是稳定的,可以安全地添加到依赖数组+ }, [setThread]); // ✅ Now setValue is stable, can be safely added to the dependency array// should open portal automatically when portalThread is setuseEffect(() => {diff --git a/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsx b/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsxindex 073ba70c745..035d2700d96 100644--- a/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsx+++ b/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsx@@ -21,21 +21,21 @@ import { hydrationPrompt } from '@/utils/promptTemplate';import MentionDropdown from './MentionDropdown';import { type MentionListOption, type MentionMetadata } from './types';-// 根据 identifier 获取 Klavis 服务器类型配置+// Get Klavis server type config by identifierconst getKlavisServerType = (identifier: string) =>KLAVIS_SERVER_TYPES.find((type) => type.identifier === identifier);/**- * Klavis 服务器图标组件- * 对于 string 类型的 icon,使用 Image 组件渲染- * 对于 IconType 类型的 icon,使用 Icon 组件渲染,并根据主题设置填充色+ * Klavis server icon component+ * For string type icon, renders using Image component+ * For IconType type icon, renders using Icon component and sets fill color based on theme*/const KlavisIcon = memo<Pick<KlavisServerType, 'icon' | 'label'>>(({ icon, label }) => {if (typeof icon === 'string') {return <Image alt={label} height={20} src={icon} style={{ flex: 'none' }} width={20} />;}- // 使用主题色填充,在深色模式下自动适应+ // Fill with theme color, automatically adapts in dark modereturn <Icon fill={cssVar.colorText} icon={icon} size={20} />;});@@ -133,7 +133,7 @@ const useMentionOptions = () => {type: 'collection',});- // 优先使用 Klavis 图标,否则使用 PluginAvatar+ // Prefer Klavis icon, fall back to PluginAvatarconst klavisServerType = getKlavisServerType(tool.identifier);const icon = klavisServerType ? (<KlavisIcon icon={klavisServerType.icon} label={klavisServerType.label} />diff --git a/src/routes/(main)/community/(detail)/_layout/Header/style.ts b/src/routes/(main)/community/(detail)/_layout/Header/style.tsindex f9704fe6a69..846f08bed07 100644--- a/src/routes/(main)/community/(detail)/_layout/Header/style.ts+++ b/src/routes/(main)/community/(detail)/_layout/Header/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // Header 容器+ // Header containerheaderContainer: css`border-block-end: 1px solid var(--header-border-color, ${cssVar.colorBorderSecondary});`,diff --git a/src/routes/(main)/community/(detail)/_layout/style.ts b/src/routes/(main)/community/(detail)/_layout/style.tsindex 79b44bd4f95..e546291c1b4 100644--- a/src/routes/(main)/community/(detail)/_layout/style.ts+++ b/src/routes/(main)/community/(detail)/_layout/style.ts@@ -1,17 +1,17 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 内容容器+ // Content containercontentContainer: css`min-height: 100%;`,- // 主容器+ // Main containermainContainer: css`overflow-y: auto;`,- // 占位符+ // Placeholderspacer: css`flex: 1;`,diff --git a/src/routes/(main)/community/(detail)/agent/features/StatusPage/index.tsx b/src/routes/(main)/community/(detail)/agent/features/StatusPage/index.tsxindex a09fe5138a5..b15a249c835 100644--- a/src/routes/(main)/community/(detail)/agent/features/StatusPage/index.tsx+++ b/src/routes/(main)/community/(detail)/agent/features/StatusPage/index.tsx@@ -19,7 +19,7 @@ const StatusPage = memo<StatusPageProps>(({ status }) => {navigate('/community/agent');};- // 审核中状态+ // Under review statusif (status === 'unpublished') {return (<div@@ -60,7 +60,7 @@ const StatusPage = memo<StatusPageProps>(({ status }) => {);}- // 归档/拒绝状态+ // Archived/rejected statusconst isArchived = status === 'archived';const statusKey = isArchived ? 'archived' : 'deprecated';const statusIcon = isArchived ? (diff --git a/src/routes/(main)/community/(detail)/agent/index.tsx b/src/routes/(main)/community/(detail)/agent/index.tsxindex 4a7eefa2b34..383d2031f95 100644--- a/src/routes/(main)/community/(detail)/agent/index.tsx+++ b/src/routes/(main)/community/(detail)/agent/index.tsx@@ -31,7 +31,7 @@ const AssistantDetailPage = memo<AssistantDetailPageProps>(({ mobile }) => {if (isLoading) return <Loading />;if (!data) return <NotFound />;- // 检查助理状态+ // Check assistant statusconst status = (data as any)?.status;if (status === 'unpublished' || status === 'archived' || status === 'deprecated') {return <StatusPage status={status} />;diff --git a/src/routes/(main)/community/(detail)/skill/features/Sidebar/FileTree.tsx b/src/routes/(main)/community/(detail)/skill/features/Sidebar/FileTree.tsxindex 0df7f67b474..0b04aeea782 100644--- a/src/routes/(main)/community/(detail)/skill/features/Sidebar/FileTree.tsx+++ b/src/routes/(main)/community/(detail)/skill/features/Sidebar/FileTree.tsx@@ -103,7 +103,7 @@ const FileTree = memo(() => {const root = createNode('root', '/');const entries = Object.entries((resources || {}) as Record<string, unknown>);- // 至少包含主文件,避免出现空树+ // Include at least the main file to avoid an empty treeif (!entries.some(([path]) => path.toLowerCase() === 'skill.md')) {entries.push(['SKILL.md', {}]);}diff --git a/src/routes/(main)/community/(list)/_layout/Header/style.ts b/src/routes/(main)/community/(list)/_layout/Header/style.tsindex f9704fe6a69..846f08bed07 100644--- a/src/routes/(main)/community/(list)/_layout/Header/style.ts+++ b/src/routes/(main)/community/(list)/_layout/Header/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // Header 容器+ // Header containerheaderContainer: css`border-block-end: 1px solid var(--header-border-color, ${cssVar.colorBorderSecondary});`,diff --git a/src/routes/(main)/community/(list)/_layout/style.ts b/src/routes/(main)/community/(list)/_layout/style.tsindex fb9b8a82063..2079d69ffcc 100644--- a/src/routes/(main)/community/(list)/_layout/style.ts+++ b/src/routes/(main)/community/(list)/_layout/style.ts@@ -2,18 +2,18 @@ import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 内容容器+ // Content containercontentContainer: css`min-height: 100%;`,- // 主容器+ // Main containermainContainer: css`overflow-y: auto;`,- // 占位符+ // Placeholderspacer: css`flex: 1;`,diff --git a/src/routes/(main)/community/(list)/agent/_layout/style.ts b/src/routes/(main)/community/(list)/agent/_layout/style.tsindex 87afbc6a7a7..2de133da16b 100644--- a/src/routes/(main)/community/(list)/agent/_layout/style.ts+++ b/src/routes/(main)/community/(list)/agent/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;`,diff --git a/src/routes/(main)/community/(list)/mcp/_layout/style.ts b/src/routes/(main)/community/(list)/mcp/_layout/style.tsindex 87afbc6a7a7..2de133da16b 100644--- a/src/routes/(main)/community/(list)/mcp/_layout/style.ts+++ b/src/routes/(main)/community/(list)/mcp/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;`,diff --git a/src/routes/(main)/community/(list)/model/_layout/style.ts b/src/routes/(main)/community/(list)/model/_layout/style.tsindex 87afbc6a7a7..2de133da16b 100644--- a/src/routes/(main)/community/(list)/model/_layout/style.ts+++ b/src/routes/(main)/community/(list)/model/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;`,diff --git a/src/routes/(main)/community/_layout/Header/style.ts b/src/routes/(main)/community/_layout/Header/style.tsindex a389ea96cbc..27fa20fc9a4 100644--- a/src/routes/(main)/community/_layout/Header/style.ts+++ b/src/routes/(main)/community/_layout/Header/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // Header 容器+ // Header containerheaderContainer: css`position: relative;z-index: 10;diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsxindex 87a97ee372b..bda0c9e8bee 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsx@@ -94,7 +94,7 @@ const StatusBadge = memo<{ record: any }>(({ record }) => {}if (status === 'completed') {- // 完成代表运行完成 + 评测完成,不代表结果一定通过+ // 'completed' means run finished + evaluation finished, does not mean the result necessarily passedconst badge = <Badge color="blue" text={<BadgeText>{t('run.status.completed')}</BadgeText>} />;return <Tooltip title={t('run.status.completed.tooltip')}>{badge}</Tooltip>;}diff --git a/src/routes/(main)/eval/config/datasetPresets.ts b/src/routes/(main)/eval/config/datasetPresets.tsindex 413ea847505..bb62d478317 100644--- a/src/routes/(main)/eval/config/datasetPresets.ts+++ b/src/routes/(main)/eval/config/datasetPresets.ts@@ -6,9 +6,9 @@ export type PresetCategory = 'qa' | 'research' | 'tool-use' | 'memory' | 'refereexport interface DatasetPreset {category: PresetCategory;description: string;- // 示例文件+ // Example fileexampleFileUrl?: string;- // 自动推断配置+ // Auto-infer configurationfieldInference: {input: string[];expected: string[];@@ -16,7 +16,7 @@ export interface DatasetPreset {category: string[];sortOrder?: string[];};- // 格式说明+ // Format descriptionformatDescription: string;icon: LucideIcon;@@ -27,7 +27,7 @@ export interface DatasetPreset {requiredFields: string[];- // 验证规则+ // Validation rulesvalidation?: {requireExpected?: boolean;requireChoices?: boolean;@@ -272,7 +272,7 @@ export const getPresetById = (id?: string): DatasetPreset => {return DATASET_PRESETS[id || 'custom'] || DATASET_PRESETS.custom;};-// 按 category 分组获取 Presets+// Get Presets grouped by categoryexport const getPresetsByCategory = (): Record<PresetCategory, DatasetPreset[]> => {const grouped: Record<string, DatasetPreset[]> = {'research': [],diff --git a/src/routes/(main)/eval/features/DatasetCreateModal/index.tsx b/src/routes/(main)/eval/features/DatasetCreateModal/index.tsxindex 76dadff60c4..f57b32b5f99 100644--- a/src/routes/(main)/eval/features/DatasetCreateModal/index.tsx+++ b/src/routes/(main)/eval/features/DatasetCreateModal/index.tsx@@ -95,7 +95,7 @@ const DatasetCreateModal = memo<DatasetCreateModalProps>(const presetsByCategory = getPresetsByCategory();const currentPreset = DATASET_PRESETS[selectedPreset];- // 构建分组选项+ // Build grouped optionsconst selectOptions = Object.entries(presetsByCategory).filter(([_, presets]) => presets.length > 0).map(([category, presets]) => ({diff --git a/src/routes/(main)/group/_layout/style.ts b/src/routes/(main)/group/_layout/style.tsindex f668cde86b8..431e17cd31e 100644--- a/src/routes/(main)/group/_layout/style.ts+++ b/src/routes/(main)/group/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;overflow: hidden;diff --git a/src/routes/(main)/group/features/Conversation/ThreadHydration.tsx b/src/routes/(main)/group/features/Conversation/ThreadHydration.tsxindex 759d3a013fd..a0960a550b7 100644--- a/src/routes/(main)/group/features/Conversation/ThreadHydration.tsx+++ b/src/routes/(main)/group/features/Conversation/ThreadHydration.tsx@@ -27,7 +27,7 @@ const ThreadHydration = memo(() => {return () => {unsubscribe();};- }, [setThread]); // ✅ 现在 setValue 是稳定的,可以安全地添加到依赖数组+ }, [setThread]); // ✅ Now setValue is stable, can be safely added to the dependency array// should open portal automatically when portalThread is setuseEffect(() => {diff --git a/src/routes/(main)/group/profile/features/MemberProfile/MentionList/useMentionItems.tsx b/src/routes/(main)/group/profile/features/MemberProfile/MentionList/useMentionItems.tsxindex 073ba70c745..035d2700d96 100644--- a/src/routes/(main)/group/profile/features/MemberProfile/MentionList/useMentionItems.tsx+++ b/src/routes/(main)/group/profile/features/MemberProfile/MentionList/useMentionItems.tsx@@ -21,21 +21,21 @@ import { hydrationPrompt } from '@/utils/promptTemplate';import MentionDropdown from './MentionDropdown';import { type MentionListOption, type MentionMetadata } from './types';-// 根据 identifier 获取 Klavis 服务器类型配置+// Get Klavis server type config by identifierconst getKlavisServerType = (identifier: string) =>KLAVIS_SERVER_TYPES.find((type) => type.identifier === identifier);/**- * Klavis 服务器图标组件- * 对于 string 类型的 icon,使用 Image 组件渲染- * 对于 IconType 类型的 icon,使用 Icon 组件渲染,并根据主题设置填充色+ * Klavis server icon component+ * For string type icon, renders using Image component+ * For IconType type icon, renders using Icon component and sets fill color based on theme*/const KlavisIcon = memo<Pick<KlavisServerType, 'icon' | 'label'>>(({ icon, label }) => {if (typeof icon === 'string') {return <Image alt={label} height={20} src={icon} style={{ flex: 'none' }} width={20} />;}- // 使用主题色填充,在深色模式下自动适应+ // Fill with theme color, automatically adapts in dark modereturn <Icon fill={cssVar.colorText} icon={icon} size={20} />;});@@ -133,7 +133,7 @@ const useMentionOptions = () => {type: 'collection',});- // 优先使用 Klavis 图标,否则使用 PluginAvatar+ // Prefer Klavis icon, fall back to PluginAvatarconst klavisServerType = getKlavisServerType(tool.identifier);const icon = klavisServerType ? (<KlavisIcon icon={klavisServerType.icon} label={klavisServerType.label} />diff --git a/src/routes/(main)/home/_layout/index.tsx b/src/routes/(main)/home/_layout/index.tsxindex ee7fbdf9c5f..097e22cdf1a 100644--- a/src/routes/(main)/home/_layout/index.tsx+++ b/src/routes/(main)/home/_layout/index.tsx@@ -34,7 +34,7 @@ const Layout: FC<LayoutProps> = ({ children }) => {if (isHomeRoute) setHasActivated(true);}, [isHomeRoute]);- // CSS 变量用于动态背景色(colorBgContainerSecondary 不在 cssVar 中)+ // CSS variable for dynamic background color (colorBgContainerSecondary is not in cssVar)const cssVariables = useMemo<Record<string, string>>(() => ({'--content-bg-secondary': theme.colorBgContainerSecondary,diff --git a/src/routes/(main)/home/_layout/style.ts b/src/routes/(main)/home/_layout/style.tsindex cb2a4ab4415..288e2dd138c 100644--- a/src/routes/(main)/home/_layout/style.ts+++ b/src/routes/(main)/home/_layout/style.ts@@ -1,13 +1,13 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 绝对定位容器,占满父容器+ // Absolutely positioned container, fills parentabsoluteContainer: css`position: absolute;inset: 0;`,- // 内容区域 - 深色模式+ // Content area - dark modecontentDark: css`overflow: hidden;background: linear-gradient(@@ -17,7 +17,7 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({);`,- // 内容区域 - 浅色模式+ // Content area - light modecontentLight: css`overflow: hidden;background: var(--content-bg-secondary, ${cssVar.colorBgContainer});diff --git a/src/routes/(main)/memory/_layout/style.ts b/src/routes/(main)/memory/_layout/style.tsindex f668cde86b8..431e17cd31e 100644--- a/src/routes/(main)/memory/_layout/style.ts+++ b/src/routes/(main)/memory/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;overflow: hidden;diff --git a/src/routes/(main)/resource/(home)/_layout/style.ts b/src/routes/(main)/resource/(home)/_layout/style.tsindex f668cde86b8..431e17cd31e 100644--- a/src/routes/(main)/resource/(home)/_layout/style.ts+++ b/src/routes/(main)/resource/(home)/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;overflow: hidden;diff --git a/src/routes/(main)/resource/library/_layout/Header/LibraryHead.tsx b/src/routes/(main)/resource/library/_layout/Header/LibraryHead.tsxindex 23bcb8c2b7a..4ef297cfb4c 100644--- a/src/routes/(main)/resource/library/_layout/Header/LibraryHead.tsx+++ b/src/routes/(main)/resource/library/_layout/Header/LibraryHead.tsx@@ -57,7 +57,7 @@ const Head = memo<{ id: string }>(({ id }) => {(libraryId: string) => {setLibraryId(libraryId);setMode('explorer');- // 使用 setTimeout 确保在下一个事件循环中执行 navigate+ // Use setTimeout to ensure navigate is called in the next event loopsetTimeout(() => {navigate(`/resource/library/${libraryId}`);}, 0);diff --git a/src/routes/(main)/resource/library/_layout/style.ts b/src/routes/(main)/resource/library/_layout/style.tsindex f668cde86b8..431e17cd31e 100644--- a/src/routes/(main)/resource/library/_layout/style.ts+++ b/src/routes/(main)/resource/library/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;overflow: hidden;diff --git a/src/routes/(mobile)/(home)/_layout/MobileLayout/style.ts b/src/routes/(mobile)/(home)/_layout/MobileLayout/style.tsindex 5df7463d763..4e8e9309446 100644--- a/src/routes/(mobile)/(home)/_layout/MobileLayout/style.ts+++ b/src/routes/(mobile)/(home)/_layout/MobileLayout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 搜索栏容器+ // Search bar containersearchBarContainer: css`padding-block: 8px;padding-inline: 16px;diff --git a/src/routes/(mobile)/(home)/_layout/SessionHeader/style.ts b/src/routes/(mobile)/(home)/_layout/SessionHeader/style.tsindex 9587df18ad9..39e57742379 100644--- a/src/routes/(mobile)/(home)/_layout/SessionHeader/style.ts+++ b/src/routes/(mobile)/(home)/_layout/SessionHeader/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 左侧容器+ // Left containerleftContainer: css`margin-inline-start: 8px;`,diff --git a/src/routes/(mobile)/chat/_layout/style.ts b/src/routes/(mobile)/chat/_layout/style.tsindex 5cf3d2659ea..c7df4b11fc9 100644--- a/src/routes/(mobile)/chat/_layout/style.ts+++ b/src/routes/(mobile)/chat/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 主容器+ // Main containermainContainer: css`overflow-y: hidden;`,diff --git a/src/routes/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx b/src/routes/(mobile)/chat/settings/features/AgentInfoDescription/index.tsxindex bfbb70d0369..9ca738cc9c0 100644--- a/src/routes/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx+++ b/src/routes/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx@@ -70,7 +70,7 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(ttsConfig,}) => {const { t } = useTranslation('setting');- // 转换远程数据格式+ // Convert remote data formatconst getProcessedData = () => {if (!isRemote || !meta) {return {@@ -87,7 +87,7 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(};}- // 远程数据格式转换+ // Remote data format conversionconst remoteData = meta;const config = remoteData.config || {};@@ -129,14 +129,14 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(const renderAvatar = (avatar: string | undefined) => {if (!avatar) return unsetText;- // 如果是 http 或 https 链接,显示图片+ // If it's an http or https link, display the imageif (avatar.startsWith('http://') || avatar.startsWith('https://')) {return (<Image alt="avatar" height={40} src={avatar} style={{ borderRadius: '50%' }} width={40} />);}- // 否则直接显示字符(emoji)+ // Otherwise, display the character directly (emoji)return (<divstyle={{@@ -155,7 +155,7 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(return (<div style={{ height: '500px', overflow: 'auto' }}><Flexbox gap={16}>- {/* 基础信息 */}+ {/* Basic information */}<ProDescriptionsborderedcolumn={2}@@ -203,7 +203,7 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(}}/>- {/* 角色设定 */}+ {/* Role settings */}<ProDescriptionsborderedcolumn={1}@@ -231,7 +231,7 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(}/>- {/* 模型设置 */}+ {/* Model settings */}<ProDescriptionsborderedcolumn={2}@@ -274,7 +274,7 @@ const AgentInfoDescription = memo<AgentInfoDescriptionProps>(}}/>- {/* 聊天偏好 */}+ {/* Chat preferences */}<ProDescriptionsborderedcolumn={2}diff --git a/src/routes/(mobile)/community/(list)/_layout/style.ts b/src/routes/(mobile)/community/(list)/_layout/style.tsindex fd312e60c8e..f510518a039 100644--- a/src/routes/(mobile)/community/(list)/_layout/style.ts+++ b/src/routes/(mobile)/community/(list)/_layout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css }) => ({- // 主容器+ // Main containermainContainer: css`padding-block: 8px 48px;padding-inline: 16px;diff --git a/src/routes/share/t/[id]/_layout/style.ts b/src/routes/share/t/[id]/_layout/style.tsindex eb630b9bba7..68dfd0a85a2 100644--- a/src/routes/share/t/[id]/_layout/style.ts+++ b/src/routes/share/t/[id]/_layout/style.ts@@ -12,7 +12,7 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({width: 100%;`,- // Divider 样式+ // Divider styledivider: css`height: 24px;`,@@ -29,7 +29,7 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({padding: 8px;`,- // 内层容器 - 深色模式+ // Inner container - dark modeinnerContainerDark: css`position: relative;@@ -41,7 +41,7 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({background: ${cssVar.colorBgContainer};`,- // 内层容器 - 浅色模式+ // Inner container - light modeinnerContainerLight: css`position: relative;@@ -52,7 +52,7 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({background: ${cssVar.colorBgContainer};`,- // 外层容器+ // Outer containerouterContainer: css`position: relative;`,