feat(providers): add provider categorization system
- Add ProviderCategory type with official, cn_official, aggregator, third_party, and custom categories - Update Provider interface and Rust struct to include optional category field - Enhance ProviderForm to automatically sync category when selecting presets - Improve PresetSelector to show category-based styling and hints - Add category classification to all provider presets - Support differentiated interactions (e.g., hide API key input for official providers) - Maintain backward compatibility with existing configurations
This commit is contained in:
@@ -2,6 +2,7 @@ import React from "react";
|
||||
import { Provider } from "../types";
|
||||
import { Play, Edit3, Trash2, CheckCircle2, Users } from "lucide-react";
|
||||
import { buttonStyles, cardStyles, badgeStyles, cn } from "../lib/styles";
|
||||
// 不再在列表中显示分类徽章,避免造成困惑
|
||||
|
||||
interface ProviderListProps {
|
||||
providers: Record<string, Provider>;
|
||||
@@ -99,6 +100,7 @@ const ProviderList: React.FC<ProviderListProps> = ({
|
||||
<h3 className="font-medium text-gray-900 dark:text-gray-100">
|
||||
{provider.name}
|
||||
</h3>
|
||||
{/* 分类徽章已移除 */}
|
||||
{isCurrent && (
|
||||
<div className={badgeStyles.success}>
|
||||
<CheckCircle2 size={12} />
|
||||
|
||||
Reference in New Issue
Block a user