🤯 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: clean up unnecessary comments (#11659)
Innei47fd5e68750c
diff --git a/apps/desktop/src/main/core/infrastructure/I18nManager.ts b/apps/desktop/src/main/core/infrastructure/I18nManager.tsindex 6e879053f9e..d316232ce3b 100644--- a/apps/desktop/src/main/core/infrastructure/I18nManager.ts+++ b/apps/desktop/src/main/core/infrastructure/I18nManager.ts@@ -149,17 +149,6 @@ export class I18nManager {*/private notifyRendererProcess(lng: string) {logger.debug(`Notifying renderer process of language change: ${lng}`);-- // Send language change event to all windows- // const windows = this.app.browserManager.windows;- //- // if (windows && windows.length > 0) {- // windows.forEach((window) => {- // if (window?.webContents) {- // window.webContents.send('language-changed', lng);- // }- // });- // }}private async loadLocale(language: string) {diff --git a/packages/database/src/models/__tests__/session.test.ts b/packages/database/src/models/__tests__/session.test.tsindex 54d6c324eba..465fbc584cf 100644--- a/packages/database/src/models/__tests__/session.test.ts+++ b/packages/database/src/models/__tests__/session.test.ts@@ -235,35 +235,6 @@ describe('SessionModel', () => {});});- // describe('getAgentConfigById', () => {- // it('should return agent config by id', async () => {- // await serverDB.transaction(async (trx) => {- // await trx.insert(agents).values([- // { id: '1', userId, model: 'gpt-3.5-turbo' },- // { id: '2', userId, model: 'gpt-3.5' },- // ]);- //- // // @ts-ignore- // await trx.insert(plugins).values([- // { id: 1, userId, identifier: 'abc', title: 'A1', locale: 'en-US', manifest: {} },- // { id: 2, userId, identifier: 'b2', title: 'A2', locale: 'en-US', manifest: {} },- // ]);- //- // await trx.insert(agentsPlugins).values([- // { agentId: '1', pluginId: 1 },- // { agentId: '2', pluginId: 2 },- // { agentId: '1', pluginId: 2 },- // ]);- // });- //- // const result = await sessionModel.getAgentConfigById('1');- //- // expect(result?.id).toBe('1');- // expect(result?.plugins).toBe(['abc', 'b2']);- // expect(result?.model).toEqual('gpt-3.5-turbo');- // expect(result?.chatConfig).toBeDefined();- // });- // });describe('count', () => {it('should return the count of sessions for the user', async () => {// 创建测试数据diff --git a/src/app/[variants]/(main)/agent/features/Conversation/AgentWelcome/OpeningQuestions.tsx b/src/app/[variants]/(main)/agent/features/Conversation/AgentWelcome/OpeningQuestions.tsxindex 30bb90c400f..0317111fd75 100644--- a/src/app/[variants]/(main)/agent/features/Conversation/AgentWelcome/OpeningQuestions.tsx+++ b/src/app/[variants]/(main)/agent/features/Conversation/AgentWelcome/OpeningQuestions.tsx@@ -7,8 +7,6 @@ import { useTranslation } from 'react-i18next';import { useConversationStore } from '@/features/Conversation';-// import { useSend } from '../../features/ChatInput/useSend';-const styles = createStaticStyles(({ css, cssVar }) => ({card: css`padding-block: 8px;diff --git a/src/app/[variants]/(main)/community/(detail)/agent/features/Sidebar/TocList/index.tsx b/src/app/[variants]/(main)/community/(detail)/agent/features/Sidebar/TocList/index.tsxindex a8d2e473125..d72ca7e9de8 100644--- a/src/app/[variants]/(main)/community/(detail)/agent/features/Sidebar/TocList/index.tsx+++ b/src/app/[variants]/(main)/community/(detail)/agent/features/Sidebar/TocList/index.tsx@@ -16,42 +16,6 @@ const TocList = memo(() => {const { t } = useTranslation('discover');const { toc = [] } = useToc();const { activeTab = AssistantNavKey.Overview } = useQuery() as { activeTab: AssistantNavKey };- // const { deploymentOptions = [], tools = [], prompts = [] } = useDetailContext();- //- // const schemaToc: AnchorProps['items'] = useMemo(() => {- // return [- // {- // href: `#tools`,- // key: `tools`,- // level: 2,- // title: t('mcp.details.schema.tools.title'),- // },- // ...tools.map((item) => ({- // href: `#tools-${item.name}`,- // key: `tools-${item.name}`,- // level: 3,- // title: item.name,- // })),- // {- // href: `#prompts`,- // key: `prompts`,- // level: 2,- // title: t('mcp.details.schema.prompts.title'),- // },- // ...prompts.map((item) => ({- // href: `#prompts-${item.name}`,- // key: `prompts-${item.name}`,- // level: 3,- // title: item.name,- // })),- // {- // href: `#resources`,- // key: `resources`,- // level: 2,- // title: t('mcp.details.schema.resources.title'),- // },- // ].filter(Boolean) as AnchorProps['items'];- // }, [tools, prompts, t]);const items: AnchorProps['items'] | undefined = useMemo(() => {switch (activeTab) {diff --git a/src/app/[variants]/(main)/community/(list)/_layout/Header.tsx b/src/app/[variants]/(main)/community/(list)/_layout/Header.tsxindex 5776ae425fd..5a8a7f0c3d9 100644--- a/src/app/[variants]/(main)/community/(list)/_layout/Header.tsx+++ b/src/app/[variants]/(main)/community/(list)/_layout/Header.tsx@@ -13,7 +13,6 @@ import { styles } from './Header/style';const Header = memo(() => {const location = useLocation();- // const { activeKey } = useNav();const isHome = location.pathname === '/';const cssVariables: Record<string, string> = {@@ -27,7 +26,6 @@ const Header = memo(() => {right={!isHome && (<>- {/*{activeKey === DiscoverTab.Assistants && <MarketSourceSwitch />}*/}<SortButton /><UserAvatar /></>diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMember.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMember.tsxindex f0f646bbfe2..cd8a55c41f1 100644--- a/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMember.tsx+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMember.tsx@@ -41,12 +41,8 @@ const GroupMember = memo<GroupMemberProps>(({ addModalOpen, onAddModalOpenChangeconst toggleThread = useAgentGroupStore((s) => s.toggleThread);const pushPortalView = useChatStore((s) => s.pushPortalView);- // Get members from store (excluding supervisor)const groupMembers = useAgentGroupStore(agentGroupSelectors.getGroupMembers(groupId || ''));- // const [agentSettingsOpen, setAgentSettingsOpen] = useState(false);- // const [selectedAgentId, setSelectedAgentId] = useState<string | undefined>();-const handleAddMembers = async (selectedAgents: string[]) => {if (!groupId) {console.error('No active group to add members to');diff --git a/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx b/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsxindex e9ac392e7d2..3f0cb59c52a 100644--- a/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx+++ b/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx@@ -18,8 +18,6 @@ import ThreadHydration from './ThreadHydration';import { useActionsBarConfig } from './useActionsBarConfig';import { useGroupContext } from './useGroupContext';-// import { useGroupHooks } from './useGroupHooks';-interface ConversationAreaProps {mobile?: boolean;}@@ -45,18 +43,13 @@ const Conversation = memo<ConversationAreaProps>(({ mobile = false }) => {// Get operation state from ChatStore for reactive updatesconst operationState = useOperationState(context);- // Get actionsBar config with branching support from ChatStoreconst actionsBarConfig = useActionsBarConfig();- // Get group-specific hooks for send logic- // const groupHooks = useGroupHooks(context);-return (<ConversationProvideractionsBar={actionsBarConfig}context={context}hasInitMessages={!!messages}- // hooks={groupHooks}messages={messages}onMessagesChange={(messages, ctx) => {replaceMessages(messages, { context: ctx });diff --git a/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx b/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsxindex 57e0444e704..b7d0c657daf 100644--- a/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx+++ b/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx@@ -35,7 +35,6 @@ const rightActions: ActionKeys[] = [];*/const Desktop = memo((props: { targetMemberId?: string }) => {const { t } = useTranslation('chat');- // const { send, generating, disabled, stop } = useSendGroupMessage();const isDMPortal = !!props.targetMemberId;const currentGroupMembers = useAgentGroupStore(agentGroupSelectors.currentGroupAgents, isEqual);@@ -93,7 +92,6 @@ const Desktop = memo((props: { targetMemberId?: string }) => {useChatStore.setState({ inputMessage: content });}}rightActions={isDMPortal ? [] : rightActions}- // sendButtonProps={{ disabled, generating, onStop: stop }}sendMenu={{items: sendMenuItems,}}diff --git a/src/app/[variants]/(main)/home/_layout/Body/index.tsx b/src/app/[variants]/(main)/home/_layout/Body/index.tsxindex 4e6dbd8b00d..97d47d92269 100644--- a/src/app/[variants]/(main)/home/_layout/Body/index.tsx+++ b/src/app/[variants]/(main)/home/_layout/Body/index.tsx@@ -12,11 +12,9 @@ export enum GroupKey {}const Body = memo(() => {- // const { enableKnowledgeBase } = useServerConfigStore(featureFlagsSelectors);return (<Flexbox paddingInline={4}><Accordion defaultExpandedKeys={[GroupKey.Project, GroupKey.Agent]} gap={8}>- {/*{enableKnowledgeBase && <Repo itemKey={GroupKey.Project} />}*/}<Agent itemKey={GroupKey.Agent} /><BottomMenu /></Accordion>diff --git a/src/app/[variants]/(main)/page/_layout/Body/List/Item/useDropdownMenu.tsx b/src/app/[variants]/(main)/page/_layout/Body/List/Item/useDropdownMenu.tsxindex fa5ff776dc8..7c8644bd07d 100644--- a/src/app/[variants]/(main)/page/_layout/Body/List/Item/useDropdownMenu.tsx+++ b/src/app/[variants]/(main)/page/_layout/Body/List/Item/useDropdownMenu.tsx@@ -56,12 +56,6 @@ export const useDropdownMenu = ({label: t('rename'),onClick: () => toggleEditing(true),},- // {- // icon: <Icon icon={Copy} />,- // key: 'copy',- // label: t('pageList.copyContent', { ns: 'file' }),- // onClick: handleCopy,- // },{icon: <Icon icon={CopyPlus} />,key: 'duplicate',diff --git a/src/app/[variants]/(main)/page/_layout/Body/useDropdownMenu.tsx b/src/app/[variants]/(main)/page/_layout/Body/useDropdownMenu.tsxindex 57d9c24c595..ae198245751 100644--- a/src/app/[variants]/(main)/page/_layout/Body/useDropdownMenu.tsx+++ b/src/app/[variants]/(main)/page/_layout/Body/useDropdownMenu.tsx@@ -32,21 +32,6 @@ export const useDropdownMenu = (): MenuProps['items'] => {}));return [- // {- // icon: <Icon icon={Check} style={{ opacity: !showOnlyPagesNotInLibrary ? 1 : 0 }} />,- // key: 'all',- // label: t('pageList.filter.all'),- // onClick: () => setShowOnlyPagesNotInLibrary(false),- // },- // {- // icon: <Icon icon={Check} style={{ opacity: showOnlyPagesNotInLibrary ? 1 : 0 }} />,- // key: 'onlyInPages',- // label: t('pageList.filter.onlyInPages'),- // onClick: () => setShowOnlyPagesNotInLibrary(true),- // },- // {- // type: 'divider' as const,- // },{children: pageSizeItems,icon: <Icon icon={Hash} />,diff --git a/src/app/[variants]/(main)/resource/features/DndContextWrapper.tsx b/src/app/[variants]/(main)/resource/features/DndContextWrapper.tsxindex 25319dd82a7..c7cf6a5e196 100644--- a/src/app/[variants]/(main)/resource/features/DndContextWrapper.tsx+++ b/src/app/[variants]/(main)/resource/features/DndContextWrapper.tsx@@ -141,11 +141,6 @@ export const DndContextWrapper = memo<PropsWithChildren>(({ children }) => {return;}- // Save current drag data before clearing state- // const draggedItemId = currentDrag.id;- // const draggedItemData = currentDrag.data;-- // Clear drag state immediately for better UXsetCurrentDrag(null);// Show loading toastdiff --git a/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx b/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsxindex 6cbaaf504b3..0f499af9f0d 100644--- a/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx+++ b/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx@@ -51,7 +51,6 @@ const ModelConfigModal = memo<ModelConfigModalProps>(({ open, setOpen }) => {setLoading(false);closeModal();} catch {- /* */setLoading(false);}}}diff --git a/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx b/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsxindex b43ede9c284..f8765932c4d 100644--- a/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx+++ b/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx@@ -240,16 +240,6 @@ const ModelItem = memo<ModelItemProps>({...abilities}contextWindowTokens={contextWindowTokens}/>- {/*{removed && (*/}- {/* <Tooltip*/}- {/* overlayStyle={{ maxWidth: 300 }}*/}- {/* placement={'top'}*/}- {/* style={{ pointerEvents: 'none' }}*/}- {/* title={t('ModelSelect.removed')}*/}- {/* >*/}- {/* <ActionIcon icon={Recycle} style={{ color: theme.colorWarning }} />*/}- {/* </Tooltip>*/}- {/*)}*/}</Flexbox></Flexbox><div>diff --git a/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx b/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsxindex 98dc3fe6236..e22ccde3fd6 100644--- a/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx+++ b/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx@@ -66,7 +66,6 @@ const Actions = memo<ActionProps>(({ group, id, openCreateGroupModal, parentTypeconst { modal, message } = App.useApp();const isDefault = group === SessionDefaultGroup.Default;- // const hasDivider = !isDefault || Object.keys(sessionByGroup).length > 0;const items = useMemo(() =>diff --git a/src/app/[variants]/layout.tsx b/src/app/[variants]/layout.tsxindex 2088dbe4ccb..907abf8bb78 100644--- a/src/app/[variants]/layout.tsx+++ b/src/app/[variants]/layout.tsx@@ -52,8 +52,6 @@ const RootLayout = async ({ children, params }: RootLayoutProps) => {<head>{/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}<script dangerouslySetInnerHTML={{ __html: `(${outdateBrowserScript.toString()})();` }} />-- {/* <script dangerouslySetInnerHTML={{ __html: 'setTimeout(() => {debugger}, 16)' }} /> */}{process.env.DEBUG_REACT_SCAN === '1' && (<ScriptcrossOrigin={'anonymous'}diff --git a/src/envs/__tests__/app.test.ts b/src/envs/__tests__/app.test.tsindex b5b803cb93c..962da872a03 100644--- a/src/envs/__tests__/app.test.ts+++ b/src/envs/__tests__/app.test.ts@@ -7,12 +7,6 @@ describe('getServerConfig', () => {vi.resetModules();});- // it('correctly handles values for OPENAI_FUNCTION_REGIONS', () => {- // process.env.OPENAI_FUNCTION_REGIONS = 'iad1,sfo1';- // const config = getAppConfig();- // expect(config.OPENAI_FUNCTION_REGIONS).toStrictEqual(['iad1', 'sfo1']);- // });-describe('index url', () => {it('should return default URLs when no environment variables are set', async () => {const { getAppConfig } = await import('../app');diff --git a/src/features/ChatInput/ActionBar/Knowledge/useControls.tsx b/src/features/ChatInput/ActionBar/Knowledge/useControls.tsxindex 81532494903..4874246b81c 100644--- a/src/features/ChatInput/ActionBar/Knowledge/useControls.tsx+++ b/src/features/ChatInput/ActionBar/Knowledge/useControls.tsx@@ -33,28 +33,6 @@ export const useControls = ({]);const items: ItemType[] = [- // {- // children: [- // {- // icon: <RepoIcon />,- // key: 'allFiles',- // label: <KnowledgeBaseItem id={'all'} label={t('knowledgeBase.allFiles')} />,- // },- // {- // icon: <RepoIcon />,- // key: 'allRepos',- // label: <KnowledgeBaseItem id={'all'} label={t('knowledgeBase.allLibraries')} />,- // },- // ],- // key: 'all',- // label: (- // <Flexbox horizontal justify={'space-between'}>- // {t('knowledgeBase.all')}- // {/*<Link href={'/files'}>{t('knowledgeBase.more')}</Link>*/}- // </Flexbox>- // ),- // type: 'group',- // },{children: [// first the filesdiff --git a/src/features/ChatInput/store/action.ts b/src/features/ChatInput/store/action.tsindex d410cf4fa2f..ec8fc75d239 100644--- a/src/features/ChatInput/store/action.ts+++ b/src/features/ChatInput/store/action.ts@@ -15,8 +15,6 @@ export interface Action {export type Store = Action & State;-// const t = setNamespace('ChatInput');-type CreateStore = (initState?: Partial<PublicState>,) => StateCreator<Store, [['zustand/devtools', never]]>;diff --git a/src/features/Conversation/Messages/Task/TaskDetailPanel/index.tsx b/src/features/Conversation/Messages/Task/TaskDetailPanel/index.tsxindex 4676bf0dfde..4f1b64ce0ba 100644--- a/src/features/Conversation/Messages/Task/TaskDetailPanel/index.tsx+++ b/src/features/Conversation/Messages/Task/TaskDetailPanel/index.tsx@@ -19,16 +19,6 @@ interface TaskDetailPanelProps {const TaskDetailPanel = memo<TaskDetailPanelProps>(({ taskDetail, content, messageId }) => {return (<>- {/* Instruction Header */}- {/*{instruction && (*/}- {/* <Block padding={12}>*/}- {/* <Text fontSize={13} type={'secondary'}>*/}- {/* {instruction}*/}- {/* </Text>*/}- {/* </Block>*/}- {/*)}*/}-- {/* Status Content */}<StatusContent content={content} messageId={messageId} taskDetail={taskDetail} /></>);diff --git a/src/features/DataImporter/ImportDetail.tsx b/src/features/DataImporter/ImportDetail.tsxindex cd206b5f7b9..4640fb7b644 100644--- a/src/features/DataImporter/ImportDetail.tsx+++ b/src/features/DataImporter/ImportDetail.tsx@@ -170,26 +170,6 @@ const ImportPreviewModal = ({size="small"/></div>-- {/*<Flexbox>*/}- {/* 重复数据处理方式:*/}- {/* <div className={styles.duplicateOptions}>*/}- {/* <Radio.Group*/}- {/* onChange={(e) => setDuplicateAction(e.target.value)}*/}- {/* value={duplicateAction}*/}- {/* >*/}- {/* <Space>*/}- {/* <Radio value="skip">跳过</Radio>*/}- {/* <Radio value="overwrite">覆盖</Radio>*/}- {/* </Space>*/}- {/* </Radio.Group>*/}- {/* </div>*/}- {/* <div className={styles.duplicateDescription}>*/}- {/* {duplicateAction === 'skip'*/}- {/* ? '选择跳过将仅导入不重复的数据,保留现有数据不变。'*/}- {/* : '选择覆盖将使用导入数据替换系统中具有相同 ID 的现有记录。'}*/}- {/* </div>*/}- {/*</Flexbox>*/}</Flexbox></div></Modal>diff --git a/src/features/DevPanel/features/Table/TableCell.tsx b/src/features/DevPanel/features/Table/TableCell.tsxindex b830f4a3f2d..b0ed42d3947 100644--- a/src/features/DevPanel/features/Table/TableCell.tsx+++ b/src/features/DevPanel/features/Table/TableCell.tsx@@ -2,27 +2,6 @@ import dayjs from 'dayjs';import { get, isDate } from 'es-toolkit/compat';import React, { useMemo } from 'react';-// import TooltipContent from './TooltipContent';--// const { Text } = Typography;--// const useStyles = createStyles(({ token, css }) => ({-// cell: css`-// font-family: ${token.fontFamilyCode};-// font-size: ${token.fontSizeSM}px;-// `,-// tooltip: css`-// border: 1px solid ${token.colorBorder};-//-// font-family: ${token.fontFamilyCode};-// font-size: ${token.fontSizeSM}px;-// color: ${token.colorText} !important;-// word-break: break-all;-//-// background: ${token.colorBgElevated} !important;-// `,-// }));-interface TableCellProps {column: string;dataItem: any;@@ -30,7 +9,6 @@ interface TableCellProps {}const TableCell = ({ dataItem, column, rowIndex }: TableCellProps) => {- // const { styles } = useStyles();const data = get(dataItem, column);const content = useMemo(() => {if (isDate(data)) return dayjs(data).format('YYYY-MM-DD HH:mm:ss');@@ -52,21 +30,8 @@ const TableCell = ({ dataItem, column, rowIndex }: TableCellProps) => {return (<td key={column} onDoubleClick={() => console.log('Edit cell:', rowIndex, column)}>- {content}-{/* 不能使用 antd 的 Text, 会有大量的重渲染导致滚动极其卡顿 */}- {/*<Text*/}- {/* className={styles.cell}*/}- {/* ellipsis={{*/}- {/* tooltip: {*/}- {/* arrow: false,*/}- {/* classNames: { body: styles.tooltip },*/}- {/* title: <TooltipContent>{content}</TooltipContent>,*/}- {/* },*/}- {/* }}*/}- {/*>*/}- {/* {content}*/}- {/*</Text>*/}+ {content}</td>);};diff --git a/src/features/DevPanel/index.tsx b/src/features/DevPanel/index.tsxindex 3a043faa2f6..6f6f2dfc227 100644--- a/src/features/DevPanel/index.tsx+++ b/src/features/DevPanel/index.tsx@@ -15,15 +15,6 @@ const FloatPanel = dynamic(() => import('./features/FloatPanel'), {const DevPanel = () => (<FloatPanelitems={[- // ...(isDesktop- // ? [- // {- // children: <PostgresViewer />,- // icon: <DatabaseIcon size={16} />,- // key: 'Postgres Viewer',- // },- // ]- // : []),{children: <MetadataViewer />,icon: <BookText size={16} />,diff --git a/src/features/Portal/GroupThread/Body/index.tsx b/src/features/Portal/GroupThread/Body/index.tsxindex 49a1e4484ad..6efcb659208 100644--- a/src/features/Portal/GroupThread/Body/index.tsx+++ b/src/features/Portal/GroupThread/Body/index.tsx@@ -3,20 +3,14 @@import { Flexbox } from '@lobehub/ui';import { memo } from 'react';-// import ChatInput from '@/app/[variants]/(main)/chat/features/Conversation/ChatInput';-// import { useChatGroupStore } from '@/store/chatGroup';-import ThreadChatList from './ThreadChatList';const Body = memo(() => {- // const activeThreadAgentId = useChatGroupStore((s) => s.activeThreadAgentId);-return (<Flexbox height={'100%'}><Flexbox flex={1} style={{ overflow: 'hidden', position: 'relative' }}><ThreadChatList /></Flexbox>- {/*{activeThreadAgentId && <ChatInput targetMemberId={activeThreadAgentId} />}*/}</Flexbox>);});diff --git a/src/features/ResourceManager/components/Header/AddButton.tsx b/src/features/ResourceManager/components/Header/AddButton.tsxindex b166c7092ce..c26e0627883 100644--- a/src/features/ResourceManager/components/Header/AddButton.tsx+++ b/src/features/ResourceManager/components/Header/AddButton.tsx@@ -187,22 +187,6 @@ const AddButton = () => {label: 'Notion',onClick: handleOpenNotionGuide,},- // {- // icon: <Icon icon={Notion} />,- // key: 'connect-google-drive',- // label: 'Google Drive',- // onClick: () => {- // // TODO: Implement Google Drive connection- // },- // },- // {- // icon: <Icon icon={Notion} />,- // key: 'connect-onedrive',- // label: 'OneDrive',- // onClick: () => {- // // TODO: Implement OneDrive connection- // },- // },],icon: <Icon icon={Link} />,key: 'connect',diff --git a/src/features/ShareModal/ShareImage/index.tsx b/src/features/ShareModal/ShareImage/index.tsxindex b86bfead113..1b722549b8a 100644--- a/src/features/ShareModal/ShareImage/index.tsx+++ b/src/features/ShareModal/ShareImage/index.tsx@@ -56,14 +56,6 @@ const ShareImage = memo<{ mobile?: boolean }>(() => {name: 'withSystemRole',valuePropName: 'checked',},- // {- // children: <Switch />,- // label: t('shareModal.withBackground'),- // layout: 'horizontal',- // minWidth: undefined,- // name: 'withBackground',- // valuePropName: 'checked',- // },{children: <Switch />,label: t('shareModal.withFooter'),diff --git a/src/hooks/useProviderName.ts b/src/hooks/useProviderName.tsindex a323460b4b9..c3abab81359 100644--- a/src/hooks/useProviderName.ts+++ b/src/hooks/useProviderName.ts@@ -1,7 +1,6 @@import { DEFAULT_MODEL_PROVIDER_LIST } from 'model-bank/modelProviders';export const useProviderName = (provider: string) => {- // const { t } = useTranslation('modelProvider');const providerCard = DEFAULT_MODEL_PROVIDER_LIST.find((p) => p.id === provider);return providerCard?.name || provider;diff --git a/src/layout/GlobalProvider/Locale.tsx b/src/layout/GlobalProvider/Locale.tsxindex 0eaf2613996..e08d4c84895 100644--- a/src/layout/GlobalProvider/Locale.tsx+++ b/src/layout/GlobalProvider/Locale.tsx@@ -12,7 +12,6 @@ import { getAntdLocale } from '@/utils/locale';import Editor from './Editor';const updateDayjs = async (lang: string) => {- // load default langlet dayJSLocale;try {// dayjs locale is using `en` instead of `en-US`@@ -38,21 +37,10 @@ const Locale = memo<LocaleLayoutProps>(({ children, defaultLang, antdLocale }) =const [lang, setLang] = useState(defaultLang);const [locale, setLocale] = useState(antdLocale);- // if run on server side, init i18n instance everytimeif (isOnServerSide) {- // use sync mode to init instantlyi18n.init({ initAsync: false });-- // load the dayjs locale- // if (lang) {- // const dayJSLocale = require(`dayjs/locale/${lang!.toLowerCase()}.js`);- //- // dayjs.locale(dayJSLocale);- // }} else {- // if on browser side, init i18n instance only onceif (!i18n.instance.isInitialized)- // console.debug('locale', lang);i18n.init().then(async () => {if (!lang) return;diff --git a/src/layout/GlobalProvider/index.tsx b/src/layout/GlobalProvider/index.tsxindex 2d5a7c72254..a8a5738b943 100644--- a/src/layout/GlobalProvider/index.tsx+++ b/src/layout/GlobalProvider/index.tsx@@ -67,7 +67,6 @@ const GlobalLayout = async ({<QueryProvider><StoreInitialization /><FaviconProvider>- {/* {process.env.NODE_ENV === 'development' && <FaviconTestPanel />} */}<GroupWizardProvider><DragUploadProvider><LazyMotion features={domMax}>diff --git a/src/libs/better-auth/sso/helpers.ts b/src/libs/better-auth/sso/helpers.tsindex ddea07e187e..68b6e98ec52 100644--- a/src/libs/better-auth/sso/helpers.ts+++ b/src/libs/better-auth/sso/helpers.ts@@ -55,7 +55,6 @@ export const buildOidcConfig = ({pkce,providerId,scopes,- // ...fallbackEndpoints,...overrides,} satisfies GenericOAuthConfig;};diff --git a/src/locales/create.ts b/src/locales/create.tsindex 042daed9165..75312906c45 100644--- a/src/locales/create.ts+++ b/src/locales/create.ts@@ -45,21 +45,6 @@ export const createI18nNext = (lang?: string) => {return instance.init({debug: debugMode,defaultNS: ['error', 'common', 'chat'],-- // detection: {- // caches: ['cookie'],- // cookieMinutes: 60 * 24 * COOKIE_CACHE_DAYS,- // /**- // Set `sameSite` to `lax` so that the i18n cookie can be passed to the- // server side when returning from the OAuth authorization website.- // ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value- // discussion: https://github.com/lobehub/lobe-chat/pull/1474- // */- // cookieOptions: {- // sameSite: 'lax',- // },- // lookupCookie: LOBE_LOCALE_COOKIE,- // },fallbackLng: DEFAULT_LANG,initAsync,@@ -67,8 +52,6 @@ export const createI18nNext = (lang?: string) => {interpolation: {escapeValue: false,},- // Use flat keys with dots (e.g. "notFound.title") instead of nested objects.- // This keeps both runtime lookup and TS key inference consistent.keySeparator: false,lng: lang,diff --git a/src/services/aiChat.ts b/src/services/aiChat.tsindex 026b4270a2e..b427e20a341 100644--- a/src/services/aiChat.ts+++ b/src/services/aiChat.ts@@ -20,10 +20,6 @@ class AiChatService {signal: abortController?.signal,});};-- // sendGroupMessageInServer = async (params: SendMessageServerParams) => {- // return lambdaClient.aiChat.sendGroupMessageInServer.mutate(cleanObject(params));- // };}export const aiChatService = new AiChatService();diff --git a/src/services/debug.ts b/src/services/debug.tsindex 21db0d619cb..5fc42ee40b6 100644--- a/src/services/debug.ts+++ b/src/services/debug.ts@@ -1,38 +1,5 @@class DebugService {- async insertLargeDataToDB() {- // await DEBUG_MODEL.createRandomData({- // messageCount: 100_000,- // sessionCount: 40,- // startIndex: 0,- // topicCount: 200,- // });- //- // console.log('Inserted 100k');- //- // await DEBUG_MODEL.createRandomData({- // messageCount: 300_000,- // sessionCount: 40,- // startIndex: 100_001,- // topicCount: 200,- // });- // console.log('Inserted 400k');- //- // await DEBUG_MODEL.createRandomData({- // messageCount: 300_000,- // sessionCount: 40,- // startIndex: 400_001,- // topicCount: 200,- // });- // console.log('Inserted 700k');- //- // await DEBUG_MODEL.createRandomData({- // messageCount: 300_000,- // sessionCount: 40,- // startIndex: 700_001,- // topicCount: 200,- // });- // console.log('Inserted 1M');- }+ async insertLargeDataToDB() {}}export const debugService = new DebugService();diff --git a/src/services/models.ts b/src/services/models.tsindex 253b4528408..f55e5f4e00c 100644--- a/src/services/models.ts+++ b/src/services/models.ts@@ -25,10 +25,8 @@ export type ProgressCallback = (progress: ModelProgressInfo) => void;export type ErrorCallback = (error: { message: string }) => void;export class ModelsService {- // Controller for aborting downloadsprivate _abortController: AbortController | null = null;- // Get model listgetModels = async (provider: string): Promise<ChatModelCard[] | undefined> => {const headers = await createHeaderWithAuth({headers: { 'Content-Type': 'application/json' },@@ -66,7 +64,6 @@ export class ModelsService {{ onProgress }: { onError?: ErrorCallback; onProgress?: ProgressCallback } = {},): Promise<void> => {try {- // Create a new AbortControllerthis._abortController = new AbortController();const signal = this._abortController.signal;@@ -99,7 +96,6 @@ export class ModelsService {throw await getMessageError(res);}- // Process response streamif (res.body) {await this.processModelPullStream(res, { onProgress });}@@ -112,14 +108,11 @@ export class ModelsService {console.error('download model error:', error);throw error;} finally {- // Clean up AbortControllerthis._abortController = null;}};- // Abort model downloadabortPull = () => {- // Use AbortController to abort downloadif (this._abortController) {this._abortController.abort();this._abortController = null;@@ -136,17 +129,14 @@ export class ModelsService {response: Response,{ onProgress, onError }: { onError?: ErrorCallback; onProgress?: ProgressCallback },): Promise<void> => {- // Process response streamconst reader = response.body?.getReader();if (!reader) return;- // Read and process stream data// eslint-disable-next-line no-constant-conditionwhile (true) {const { done, value } = await reader.read();if (done) break;- // Parse progress dataconst progressText = new TextDecoder().decode(value);// One line may contain multiple progress updatesconst progressUpdates = progressText.trim().split('\n');@@ -162,10 +152,6 @@ export class ModelsService {if (progress.status === 'canceled') {console.log('progress:', progress);- // const abortError = new Error('abort');- // abortError.name = 'AbortError';- //- // throw abortError;}if (progress.status === 'error') {@@ -173,7 +159,6 @@ export class ModelsService {throw new Error(progress.error);}- // Call progress callbackif (progress.completed !== undefined || progress.status) {onProgress?.(progress);}diff --git a/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts b/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.tsindex 2278f608d23..edaf42be694 100644--- a/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts+++ b/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts@@ -120,11 +120,6 @@ export const createGroupOrchestrationExecutors = (};}- // Variable to capture the decision from tool handler- // let decision: ExecutorResult['type'] | undefined;- // let decisionParams: Record<string, unknown> = {};- // let skipCallSupervisor = false;-// Execute Supervisor agent with the supervisor's agentId in context// Mark isSupervisor=true so assistant messages get metadata.isSupervisor for UI rendering// Note: Don't pass operationId - let it create a new child operation (same as call_agent)@@ -139,10 +134,6 @@ export const createGroupOrchestrationExecutors = (log(`[${sessionLogId}] Supervisor agent finished`);- // Check what decision was made by the supervisor- // This is captured from the groupOrchestration callbacks registered by tools- // const orchestrationCallbacks = get().getGroupOrchestrationCallbacks();-// If no tool was called (supervisor finished normally), end orchestration// The actual decision is captured via the afterCompletion callbacks// For now, return a finish decision if we reach herediff --git a/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts b/src/store/chat/slices/aiChat/actions/conversationLifecycle.tsindex 7ab341addd6..df3b4a2ca8c 100644--- a/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts+++ b/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts@@ -399,9 +399,6 @@ export const conversationLifecycle: StateCreator<skipCreateFirstMessage: true,});- //- // // if there is relative files, then add files to agent- // // only available in server modeconst userFiles = dbMessageSelectors.dbUserFiles(get()).map((f) => f?.id)diff --git a/src/store/chat/slices/aiChat/actions/index.ts b/src/store/chat/slices/aiChat/actions/index.tsindex 8e8a2149a3b..7bd013c4023 100644--- a/src/store/chat/slices/aiChat/actions/index.ts+++ b/src/store/chat/slices/aiChat/actions/index.ts@@ -14,9 +14,7 @@ export interface ChatAIChatActionConversationLifecycleAction,ConversationControlAction,StreamingExecutorAction,- StreamingStatesAction {- /**/-}+ StreamingStatesAction {}export const chatAiChat: StateCreator<ChatStore,diff --git a/src/store/file/slices/chat/action.test.ts b/src/store/file/slices/chat/action.test.tsindex 18f4b0d1464..a6bfc286388 100644--- a/src/store/file/slices/chat/action.test.ts+++ b/src/store/file/slices/chat/action.test.ts@@ -16,7 +16,6 @@ vi.mock('@/components/AntdStaticMethods', () => ({},}));-// mock the arrayBufferbeforeAll(() => {Object.defineProperty(File.prototype, 'arrayBuffer', {writable: true,@@ -33,7 +32,6 @@ beforeAll(() => {});beforeEach(() => {- // Reset all mocks before each testvi.resetAllMocks();});@@ -41,7 +39,6 @@ describe('useFileStore:chat', () => {it('clearChatUploadFileList should clear the inputFilesList', () => {const { result } = renderHook(() => useStore());- // Populate the list to clear it lateract(() => {useStore.setState({ chatUploadFileList: [{ id: 'abc' }] as any });});@@ -54,90 +51,4 @@ describe('useFileStore:chat', () => {expect(result.current.chatUploadFileList).toEqual([]);});-- // it('removeFile should call fileService.removeFile and update the store', async () => {- // const { result } = renderHook(() => useStore());- //- // const fileId = 'test-id';- //- // // Mock the fileService.removeFile to resolve- // vi.spyOn(fileService, 'removeFile').mockResolvedValue(undefined);- //- // // Populate the list to remove an item later- // act(() => {- // useStore.setState(({ inputFilesList }) => ({ inputFilesList: [...inputFilesList, fileId] }));- // // // result.current.inputFilesList.push(fileId);- // });- //- // await act(async () => {- // await result.current.removeFile(fileId);- // });- //- // expect(fileService.removeFile).toHaveBeenCalledWith(fileId);- // expect(result.current.inputFilesList).toEqual([]);- // });-- // describe('uploadFile', () => {- // it('uploadFile should handle errors', async () => {- // const { result } = renderHook(() => useStore());- // const testFile = new File(['content'], 'test.png', { type: 'image/png' });- //- // // 模拟 fileService.uploadFile 抛出错误- // const errorMessage = 'Upload failed';- // vi.spyOn(uploadService, 'uploadFile').mockRejectedValue(new Error(errorMessage));- //- // // Mock console.error for testing- //- // await act(async () => {- // await result.current.uploadFile(testFile);- // });- //- // expect(uploadService.uploadFile).toHaveBeenCalledWith({- // createdAt: testFile.lastModified,- // data: await testFile.arrayBuffer(),- // fileType: testFile.type,- // name: testFile.name,- // saveMode: 'local',- // size: testFile.size,- // });- // // 由于上传失败,inputFilesList 应该没有变化- // expect(result.current.inputFilesList).toEqual([]);- //- // // 确保错误提示被调用- // expect(notification.error).toHaveBeenCalled();- // });- //- // it('uploadFile should upload the file and update inputFilesList', async () => {- // const { result } = renderHook(() => useStore());- // const testFile = new File(['content'], 'test.png', { type: 'image/png' });- //- // // 模拟 fileService.uploadFile 返回的数据- // const uploadedFileData = {- // createdAt: testFile.lastModified,- // data: await testFile.arrayBuffer(),- // fileType: testFile.type,- // name: testFile.name,- // saveMode: 'local',- // size: testFile.size,- // };- //- // // Mock the fileService.uploadFile to resolve with uploadedFileData- // vi.spyOn(uploadService, 'uploadFile').mockResolvedValue(uploadedFileData as DB_File);- // vi.spyOn(fileService, 'createFile').mockResolvedValue({ id: 'new-file-id', url: '' });- //- // await act(async () => {- // await result.current.uploadFile(testFile);- // });- //- // expect(fileService.createFile).toHaveBeenCalledWith({- // createdAt: testFile.lastModified,- // data: await testFile.arrayBuffer(),- // fileType: testFile.type,- // name: testFile.name,- // saveMode: 'local',- // size: testFile.size,- // });- // expect(result.current.inputFilesList).toContain('new-file-id');- // });- // });});diff --git a/src/store/file/slices/chunk/selectors.ts b/src/store/file/slices/chunk/selectors.tsindex 93e7fc136f4..9bba6fdf2a9 100644--- a/src/store/file/slices/chunk/selectors.ts+++ b/src/store/file/slices/chunk/selectors.ts@@ -1,4 +1,3 @@-// import { FileStore } from '../../store';import { type FilesStoreState } from '@/store/file/initialState';const showSimilaritySearchResult = (s: FilesStoreState) => s.isSimilaritySearch;diff --git a/src/store/file/slices/fileManager/selectors.ts b/src/store/file/slices/fileManager/selectors.tsindex 652a09deec1..76a2f2a0a18 100644--- a/src/store/file/slices/fileManager/selectors.ts+++ b/src/store/file/slices/fileManager/selectors.ts@@ -1,4 +1,3 @@-// import { FileStore } from '../../store';import { type FilesStoreState } from '@/store/file/initialState';import { type FileUploadStatus } from '@/types/files/upload';diff --git a/src/store/file/slices/tts/selectors.ts b/src/store/file/slices/tts/selectors.tsindex c59f60b1373..80b4389a9dd 100644--- a/src/store/file/slices/tts/selectors.ts+++ b/src/store/file/slices/tts/selectors.ts@@ -1,3 +1 @@-// import { FileStore } from '../../store';-export const ttsFilesSelectors = {};diff --git a/src/store/tool/slices/customPlugin/index.ts b/src/store/tool/slices/customPlugin/index.tsindex 1d9afcc4054..279e5868539 100644--- a/src/store/tool/slices/customPlugin/index.ts+++ b/src/store/tool/slices/customPlugin/index.ts@@ -1,3 +1,2 @@export * from './action';export * from './initialState';-// export * from './selectors';diff --git a/src/store/tool/slices/mcpStore/index.ts b/src/store/tool/slices/mcpStore/index.tsindex 1d9afcc4054..279e5868539 100644--- a/src/store/tool/slices/mcpStore/index.ts+++ b/src/store/tool/slices/mcpStore/index.ts@@ -1,3 +1,2 @@export * from './action';export * from './initialState';-// export * from './selectors';diff --git a/src/store/tool/slices/oldStore/index.ts b/src/store/tool/slices/oldStore/index.tsindex 1d9afcc4054..279e5868539 100644--- a/src/store/tool/slices/oldStore/index.ts+++ b/src/store/tool/slices/oldStore/index.ts@@ -1,3 +1,2 @@export * from './action';export * from './initialState';-// export * from './selectors';diff --git a/src/store/tool/slices/plugin/index.ts b/src/store/tool/slices/plugin/index.tsindex 1d9afcc4054..279e5868539 100644--- a/src/store/tool/slices/plugin/index.ts+++ b/src/store/tool/slices/plugin/index.ts@@ -1,3 +1,2 @@export * from './action';export * from './initialState';-// export * from './selectors';diff --git a/src/utils/router.tsx b/src/utils/router.tsxindex 2d7b0f72329..8f6af4fb5a7 100644--- a/src/utils/router.tsx+++ b/src/utils/router.tsx@@ -147,12 +147,6 @@ export function renderRoutes(routes: RouteConfig[]): ReactElement[] {return routes.map((route, index) => {const { path, element, children, index: isIndex, loader } = route;- // Handle redirect loaders (convert to Navigate element)- if (loader && !element && isIndex) {- // Check if loader is a redirect by inspecting it- // For now, we'll handle this case in the config itself- }-const childRoutes = children ? renderRoutes(children) : undefined;if (isIndex) {diff --git a/src/utils/server/parseModels.ts b/src/utils/server/parseModels.tsindex 5829ad28af2..8d415c78923 100644--- a/src/utils/server/parseModels.ts+++ b/src/utils/server/parseModels.ts@@ -26,7 +26,6 @@ export const parseModelString = async (if (withDeploymentName) {[id, deploymentName] = id.split('->');- // if (!deploymentName) deploymentName = id;}if (disable) {