🤯 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
:rotating_light: chore: fix lint
arvinxxa3fc406b7da0
diff --git a/src/app/[variants]/(main)/resource/features/store/action.ts b/src/app/[variants]/(main)/resource/features/store/action.tsindex 0d6a85a221e..f0a60ea14d0 100644--- a/src/app/[variants]/(main)/resource/features/store/action.ts+++ b/src/app/[variants]/(main)/resource/features/store/action.ts@@ -80,14 +80,14 @@ export interface Action {* Set selected file IDs*/setSelectedFileIds: (ids: string[]) => void;- /**- * Set the field to sort files by- */- setSorter: (sorter: 'name' | 'createdAt' | 'size') => void;/*** Set the sort direction*/setSortType: (sortType: SortType) => void;+ /**+ * Set the field to sort files by+ */+ setSorter: (sorter: 'name' | 'createdAt' | 'size') => void;/*** Set the file explorer view mode*/@@ -109,7 +109,7 @@ export const store: CreateStore = (publicState) => (set, get) => ({},loadMoreKnowledgeItems: async () => {- const { fileListHasMore, fileListOffset } = get();+ const { fileListHasMore } = get();// Don't load if there's no more dataif (!fileListHasMore) return;@@ -131,7 +131,6 @@ export const store: CreateStore = (publicState) => (set, get) => ({const { selectedFileIds, libraryId } = get();const { useFileStore } = await import('@/store/file');const { useKnowledgeBaseStore } = await import('@/store/knowledgeBase');- const { useAddFilesToKnowledgeBaseModal } = await import('@/features/LibraryModal');const { isChunkingUnsupported } = await import('@/utils/isChunkingUnsupported');const fileStore = useFileStore.getState();@@ -267,14 +266,14 @@ export const store: CreateStore = (publicState) => (set, get) => ({set({ selectedFileIds });},- setSorter: (sorter) => {- set({ sorter });- },-setSortType: (sortType) => {set({ sortType });},+ setSorter: (sorter) => {+ set({ sorter });+ },+setViewMode: (viewMode) => {set({ viewMode });},diff --git a/src/app/[variants]/(main)/resource/features/store/initialState.ts b/src/app/[variants]/(main)/resource/features/store/initialState.tsindex 8d0e7a078b8..83b3b538d33 100644--- a/src/app/[variants]/(main)/resource/features/store/initialState.ts+++ b/src/app/[variants]/(main)/resource/features/store/initialState.ts@@ -52,14 +52,14 @@ export interface State {* Selected file IDs in the file explorer*/selectedFileIds: string[];- /**- * Field to sort files by- */- sorter: 'name' | 'createdAt' | 'size';/*** Sort direction (ascending or descending)*/sortType: SortType;+ /**+ * Field to sort files by+ */+ sorter: 'name' | 'createdAt' | 'size';/*** File explorer view mode (list or masonry)*/@@ -79,7 +79,7 @@ export const initialState: State = {pendingRenameItemId: null,searchQuery: null,selectedFileIds: [],- sorter: 'createdAt',sortType: SortType.Desc,+ sorter: 'createdAt',viewMode: 'list',};diff --git a/src/features/AgentBuilder/TopicSelector.tsx b/src/features/AgentBuilder/TopicSelector.tsxindex 03a743c2240..c1b46b21da0 100644--- a/src/features/AgentBuilder/TopicSelector.tsx+++ b/src/features/AgentBuilder/TopicSelector.tsx@@ -17,14 +17,15 @@ dayjs.extend(relativeTime);const styles = createStaticStyles(({ css, cssVar }) => ({time: css`+ margin-inline-start: 6px;font-size: 12px;color: ${cssVar.colorTextTertiary};- margin-left: 6px;`,title: css`+ overflow: hidden;+font-size: 14px;font-weight: 500;- overflow: hidden;text-overflow: ellipsis;white-space: nowrap;`,diff --git a/src/features/DesktopOnboarding/Navigation.tsx b/src/features/DesktopOnboarding/Navigation.tsxindex 328c5a2a670..92208c6ebef 100644--- a/src/features/DesktopOnboarding/Navigation.tsx+++ b/src/features/DesktopOnboarding/Navigation.tsx@@ -58,6 +58,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({navigationButton: css`position: relative;z-index: 2;+&:not(:disabled) > * {color: #000 !important;}diff --git a/src/features/DesktopOnboarding/OnboardingContainer.tsx b/src/features/DesktopOnboarding/OnboardingContainer.tsxindex 03e125b8ec3..bc43d5ef524 100644--- a/src/features/DesktopOnboarding/OnboardingContainer.tsx+++ b/src/features/DesktopOnboarding/OnboardingContainer.tsx@@ -1,7 +1,7 @@'use client';import { ConfigProvider } from 'antd';-import { createStaticStyles, cssVar, cx } from 'antd-style';+import { createStaticStyles, cx } from 'antd-style';import { AnimatePresence, motion } from 'motion/react';import React, { useCallback, useEffect, useState } from 'react';diff --git a/src/features/ResourceManager/components/Explorer/ListView/index.tsx b/src/features/ResourceManager/components/Explorer/ListView/index.tsxindex 0f91b63b5c0..22d8d5c3784 100644--- a/src/features/ResourceManager/components/Explorer/ListView/index.tsx+++ b/src/features/ResourceManager/components/Explorer/ListView/index.tsx@@ -38,8 +38,8 @@ const styles = createStaticStyles(({ css }) => ({`,loadingIndicator: css`padding: 16px;- color: ${cssVar.colorTextDescription};font-size: 14px;+ color: ${cssVar.colorTextDescription};`,}));@@ -102,7 +102,7 @@ const ListView = memo(() => {const end = Math.max(lastSelectedIndex, clickedIndex);const rangeIds = data.slice(start, end + 1)- .filter((item) => item)+ .filter(Boolean).map((item) => item.id);const prevSet = new Set(selectFileIds);diff --git a/src/features/ResourceManager/components/Explorer/MasonryView/index.tsx b/src/features/ResourceManager/components/Explorer/MasonryView/index.tsxindex b05c4703dee..4d07d780e20 100644--- a/src/features/ResourceManager/components/Explorer/MasonryView/index.tsx+++ b/src/features/ResourceManager/components/Explorer/MasonryView/index.tsx@@ -3,7 +3,7 @@import { Center } from '@lobehub/ui';import { VirtuosoMasonry } from '@virtuoso.dev/masonry';import { cssVar } from 'antd-style';-import { memo, useCallback, useMemo, useState } from 'react';+import { type UIEvent, memo, useCallback, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';import { useResourceManagerStore } from '@/app/[variants]/(main)/resource/features/store';@@ -54,7 +54,7 @@ const MasonryView = memo<MasonryViewProps>(// Handle scroll event to detect when near bottomconst handleScroll = useCallback(- (e: React.UIEvent<HTMLDivElement>) => {+ (e: UIEvent<HTMLDivElement>) => {const target = e.currentTarget;const scrollTop = target.scrollTop;const scrollHeight = target.scrollHeight;diff --git a/src/features/ResourceManager/components/Explorer/index.tsx b/src/features/ResourceManager/components/Explorer/index.tsxindex da77e99578e..8ef847a3453 100644--- a/src/features/ResourceManager/components/Explorer/index.tsx+++ b/src/features/ResourceManager/components/Explorer/index.tsx@@ -9,7 +9,7 @@ import {useResourceManagerFetchKnowledgeItems,useResourceManagerStore,} from '@/app/[variants]/(main)/resource/features/store';-import { selectors, sortFileList } from '@/app/[variants]/(main)/resource/features/store/selectors';+import { sortFileList } from '@/app/[variants]/(main)/resource/features/store/selectors';import EmptyPlaceholder from './EmptyPlaceholder';import Header from './Header';@@ -43,7 +43,6 @@ const ResourceExplorer = memo(() => {searchQuery,selectedFileIds,setSelectedFileIds,- pendingRenameItemId,loadMoreKnowledgeItems,fileListHasMore,sorter,@@ -57,7 +56,6 @@ const ResourceExplorer = memo(() => {s.searchQuery,s.selectedFileIds,s.setSelectedFileIds,- s.pendingRenameItemId,s.loadMoreKnowledgeItems,s.fileListHasMore,s.sorter,diff --git a/src/features/ResourceManager/components/Explorer/useResourceExplorer.ts b/src/features/ResourceManager/components/Explorer/useResourceExplorer.tsindex 78a2cbd4b8f..25bd9006fc5 100644--- a/src/features/ResourceManager/components/Explorer/useResourceExplorer.ts+++ b/src/features/ResourceManager/components/Explorer/useResourceExplorer.ts@@ -30,13 +30,11 @@ export const useResourceExplorer = ({// Get state from Resource Manager storeconst [- mode,viewMode,currentViewItemId,isTransitioning,isMasonryReady,searchQuery,- setCurrentViewItemId,setCurrentFolderId,setIsTransitioning,setIsMasonryReady,@@ -48,13 +46,11 @@ export const useResourceExplorer = ({sorter,sortType,] = useResourceManagerStore((s) => [- s.mode,s.viewMode,s.currentViewItemId,s.isTransitioning,s.isMasonryReady,s.searchQuery,- s.setCurrentViewItemId,s.setCurrentFolderId,s.setIsTransitioning,s.setIsMasonryReady,diff --git a/src/layout/GlobalProvider/Query.tsx b/src/layout/GlobalProvider/Query.tsxindex 07769b92883..9ecde42a81d 100644--- a/src/layout/GlobalProvider/Query.tsx+++ b/src/layout/GlobalProvider/Query.tsx@@ -22,7 +22,7 @@ const SWRMutateInitializer = ({ children }: PropsWithChildren) => {useWatchBroadcast('remoteServerConfigUpdated', () => {try {- const result = mutate((key) => true, undefined, { revalidate: true });+ const result = mutate(() => true, undefined, { revalidate: true });void result?.catch?.(() => {});} catch {// Ignore: SWR cache may not be ready yet in early boot.diff --git a/src/locales/default/desktop-onboarding.ts b/src/locales/default/desktop-onboarding.tsindex 88d7211f688..c040ed03acb 100644--- a/src/locales/default/desktop-onboarding.ts+++ b/src/locales/default/desktop-onboarding.ts@@ -26,7 +26,8 @@ export default {'screen3.actions.granted': 'Access Granted','screen3.actions.openSettings': 'Open Settings','screen3.badge': 'Permissions',- 'screen3.description': "Grant the following permissions to experience LobeHub's full capabilities",+ 'screen3.description':+ "Grant the following permissions to experience LobeHub's full capabilities",'screen3.permissions.1.description':'Send system notifications for task completions, AI responses, and important updates when the app is running in background','screen3.permissions.1.title': 'Notification Permission',@@ -62,13 +63,15 @@ export default {'screen5.actions.connectToServer': 'Connect to Server','screen5.actions.connecting': 'Connecting...','screen5.actions.signInCloud': 'Sign in to LobeHub Cloud',- 'screen5.actions.signingIn': 'Signing in...','screen5.actions.signOut': 'Sign out',+ 'screen5.actions.signingIn': 'Signing in...','screen5.actions.signingOut': 'Signing out...','screen5.actions.tryAgain': 'Try Again','screen5.badge': 'Sign in',- 'screen5.description': 'Sign in to sync your AI agents, settings, and conversations across all devices.',- 'screen5.errors.desktopOnlyOidc': 'OIDC authorization is only available in the desktop app runtime.',+ 'screen5.description':+ 'Sign in to sync your AI agents, settings, and conversations across all devices.',+ 'screen5.errors.desktopOnlyOidc':+ 'OIDC authorization is only available in the desktop app runtime.','screen5.methods.cloud.description': 'Authorization by Official cloud-based version','screen5.methods.cloud.name': 'LobeHub Cloud','screen5.methods.selfhost.description': 'Connect to your own LobeHub server instance',@@ -77,4 +80,3 @@ export default {'screen5.selfhost.endpointPlaceholder': 'Endpoint URL (Example: https://your-server.com)','screen5.title': 'Connect Your Account',};-diff --git a/src/locales/default/index.ts b/src/locales/default/index.tsindex 02d57baed5a..aedf8e69cb9 100644--- a/src/locales/default/index.ts+++ b/src/locales/default/index.ts@@ -8,6 +8,7 @@ import clerk from './clerk';import color from './color';import common from './common';import components from './components';+import desktopOnboarding from './desktop-onboarding';import discover from './discover';import editor from './editor';import electron from './electron';@@ -25,7 +26,6 @@ import migration from './migration';import modelProvider from './modelProvider';import models from './models';import oauth from './oauth';-import desktopOnboarding from './desktop-onboarding';import onboarding from './onboarding';import plugin from './plugin';import portal from './portal';@@ -49,6 +49,7 @@ const resources = {color,common,components,+ 'desktop-onboarding': desktopOnboarding,discover,editor,electron,@@ -58,8 +59,8 @@ const resources = {hotkey,image,knowledgeBase,- labs,+ labs,marketAuth,memory,metadata,@@ -67,7 +68,6 @@ const resources = {modelProvider,models,oauth,- 'desktop-onboarding': desktopOnboarding,onboarding,plugin,portal,