Fixes: Bugs fixed #10703 (#11154)

### What problem does this PR solve?

Fixes: Bugs fixed
- Removed invalid code,
- Modified the user center style,
- Added an automatic data source parsing switch.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-11-11 11:18:07 +08:00
committed by GitHub
parent ba6470a7a5
commit 7db6cb8ca3
43 changed files with 1201 additions and 757 deletions

View File

@ -44,7 +44,6 @@ export const AvailableModels: FC<{
const [searchTerm, setSearchTerm] = useState('');
const [selectedTag, setSelectedTag] = useState<string | null>(null);
// 过滤模型列表
const filteredModels = useMemo(() => {
return factoryList.filter((model) => {
const matchesSearch = model.name
@ -57,7 +56,6 @@ export const AvailableModels: FC<{
});
}, [factoryList, searchTerm, selectedTag]);
// 获取所有唯一的标签
const allTags = useMemo(() => {
const tagsSet = new Set<string>();
factoryList.forEach((model) => {
@ -94,10 +92,10 @@ export const AvailableModels: FC<{
<Button
variant={'secondary'}
onClick={() => setSelectedTag(null)}
className={`px-1 py-1 text-xs rounded-md bg-bg-card bg-bg-card h-5 transition-colors ${
className={`px-1 py-1 text-xs rounded-sm bg-bg-card h-5 transition-colors ${
selectedTag === null
? ' text-text-primary border border-text-primary'
: 'text-text-secondary bg-bg-input border-none'
? ' text-bg-base bg-text-primary '
: 'text-text-secondary bg-bg-card border-none'
}`}
>
All
@ -107,10 +105,10 @@ export const AvailableModels: FC<{
variant={'secondary'}
key={tag}
onClick={() => handleTagClick(tag)}
className={`px-1 py-1 text-xs rounded-md bg-bg-card h-5 transition-colors ${
className={`px-1 py-1 text-xs rounded-sm bg-bg-card h-5 transition-colors ${
selectedTag === tag
? ' text-text-primary border border-text-primary'
: 'text-text-secondary border-none'
? ' text-bg-base bg-text-primary '
: 'text-text-secondary border-none bg-bg-card'
}`}
>
{tag}
@ -123,7 +121,7 @@ export const AvailableModels: FC<{
{filteredModels.map((model) => (
<div
key={model.name}
className=" border border-border-default rounded-lg p-3 hover:bg-bg-input transition-colors"
className=" border border-border-default rounded-lg p-3 hover:bg-bg-input transition-colors group"
>
<div className="flex items-center space-x-3 mb-3">
<LlmIcon name={model.name} imgClass="h-8 w-auto" />
@ -131,7 +129,7 @@ export const AvailableModels: FC<{
<h3 className="font-medium truncate">{model.name}</h3>
</div>
<Button
className=" px-2 flex items-center gap-0 text-xs h-6 rounded-md transition-colors"
className=" px-2 items-center gap-0 text-xs h-6 rounded-md transition-colors hidden group-hover:flex"
onClick={() => handleAddModel(model.name)}
>
<Plus size={12} />