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(skills-list): use colorTextSecondary by default with hover swap (#15078)

Arvin Xu869f10a44c81
diff --git a/src/features/AgentDocumentsExplorer/SkillsList.tsx b/src/features/AgentDocumentsExplorer/SkillsList.tsx
index 9f36f3d7aa6..592aa0b1a36 100644
--- a/src/features/AgentDocumentsExplorer/SkillsList.tsx
+++ b/src/features/AgentDocumentsExplorer/SkillsList.tsx
@@ -163,7 +163,7 @@ const TreeRow = memo<TreeRowProps>(({ depth, expanded, node, onOpenFile, onToggl
/>
</span>
<Icon className={styles.childItemIcon} icon={FolderIcon} size={12} />
- <Text ellipsis style={{ flex: 1, fontSize: 12, minWidth: 0 }}>
+ <Text ellipsis style={{ color: 'inherit', flex: 1, fontSize: 12, minWidth: 0 }}>
{node.name}
</Text>
</Flexbox>
@@ -194,7 +194,7 @@ const TreeRow = memo<TreeRowProps>(({ depth, expanded, node, onOpenFile, onToggl
>
<span className={styles.treeChevronSlot} />
<Icon className={styles.childItemIcon} icon={FileIcon} size={12} />
- <Text ellipsis style={{ flex: 1, fontSize: 12, minWidth: 0 }}>
+ <Text ellipsis style={{ color: 'inherit', flex: 1, fontSize: 12, minWidth: 0 }}>
{node.name}
</Text>
</Flexbox>
@@ -251,7 +251,7 @@ const SkillRow = memo<SkillRowProps>(({ expanded, item, onOpenFile, onOpenSkill,
/>
</Flexbox>
<Icon className={styles.itemIcon} icon={SkillsIcon} size={14} />
- <Text ellipsis style={{ flex: 1, minWidth: 0 }} onClick={onOpenSkill}>
+ <Text ellipsis style={{ color: 'inherit', flex: 1, minWidth: 0 }} onClick={onOpenSkill}>
{item.name}
</Text>
<span className={styles.itemCount}>{item.fileCount}</span>
diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsx
index 1d796a69c56..b9c8b45c558 100644
--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsx
+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsx
@@ -43,7 +43,10 @@ vi.mock('antd', () => ({
modal: { confirm: modalConfirm },
}),
},
- Spin: () => <div data-testid="spin" />,
+}));
+
+vi.mock('@/components/NeuralNetworkLoading', () => ({
+ default: () => <div data-testid="neural-network-loading" />,
}));
vi.mock('@/libs/swr', () => ({
@@ -405,6 +408,6 @@ describe('AgentDocumentsGroup', () => {
});
render(<AgentDocumentsGroup />);
- expect(screen.getByTestId('spin')).toBeInTheDocument();
+ expect(screen.getByTestId('neural-network-loading')).toBeInTheDocument();
});
});
diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsx
index 1cf24b6477c..1ca99140eb9 100644
--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsx
+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsx
@@ -1,6 +1,6 @@
import { ActionIcon, Center, Empty, Flexbox, Text } from '@lobehub/ui';
import { SkillsIcon } from '@lobehub/ui/icons';
-import { App, Spin } from 'antd';
+import { App } from 'antd';
import { createStaticStyles, cx } from 'antd-style';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
@@ -11,6 +11,7 @@ import { memo, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useMatch, useNavigate } from 'react-router-dom';
+import NeuralNetworkLoading from '@/components/NeuralNetworkLoading';
import { DocumentExplorerTree } from '@/features/AgentDocumentsExplorer';
import SkillsList, { type SkillListItem } from '@/features/AgentDocumentsExplorer/SkillsList';
import { useClientDataSWR } from '@/libs/swr';
@@ -300,7 +301,7 @@ const AgentDocumentsGroup = memo<AgentDocumentsGroupProps>(({ style }) => {
if (isLoading) {
return (
<Center flex={1} paddingBlock={24}>
- <Spin />
+ <NeuralNetworkLoading size={32} />
</Center>
);
}
diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsx
index 4a12d37f6a6..c079eda3ecb 100644
--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsx
+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsx
@@ -2,12 +2,12 @@ import { isDesktop } from '@lobechat/const';
import { type ListProjectSkillsResult, type ProjectSkillItem } from '@lobechat/electron-client-ipc';
import { Center, Empty, Flexbox, Text } from '@lobehub/ui';
import { SkillsIcon } from '@lobehub/ui/icons';
-import { Spin } from 'antd';
import { createStaticStyles } from 'antd-style';
import path from 'pathe';
import { memo, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
+import NeuralNetworkLoading from '@/components/NeuralNetworkLoading';
import SkillsList, { type SkillListItem } from '@/features/AgentDocumentsExplorer/SkillsList';
import { useClientDataSWR } from '@/libs/swr';
import { localFileService } from '@/services/electron/localFileService';
@@ -78,7 +78,7 @@ const SkillsGroup = memo<SkillsGroupProps>(({ workingDirectory }) => {
</Flexbox>
{isLoading ? (
<Center paddingBlock={12}>
- <Spin size={'small'} />
+ <NeuralNetworkLoading size={24} />
</Center>
) : error || !data || data.skills.length === 0 ? (
<Center gap={8} paddingBlock={16}>