mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-13 04:59:51 +08:00
refactor(settings): remove wrapper layers, dead props and unused dictionary keys
- components/model-selector.tsx uses Dialog, Command and Tooltip directly; delete components/ai-elements/model-selector.tsx and components/button-with-tooltip.tsx; one renderGroups for both lists; no "Server · " prefix round trip - components/ui: drop CommandDialog, CommandShortcut and six unused shadcn exports - model-config-dialog: no type-to-confirm on provider delete; provider-credentials-fields: drop footer and bedrockApiKey - hooks/use-model-config.ts and lib/types/model-config.ts: remove the 2025-12 single-provider migration, resetConfig, selectedModel and fields nothing reads - components/chat/TemplateFormDialog.tsx replaces the create and edit dialogs; TemplatePanel drops the setInput fallback, the templatesChanged listener, dictionary fallbacks and formatLastUsed; lib/template-storage.ts drops getTemplate, clickCount and indexes - reasoning.tsx becomes one component; shimmer uses a CSS keyframe (motion and @radix-ui/react-use-controllable-state removed) - error-toast.tsx deleted in favour of toast.error; ValidationCard drops the idle status; dev-xml-simulator uses English literals - admin: no enum setting type, shared types from lib/admin (AdminProviderInput stays exported for that), ENABLE_HISTORY_XML_REPLACE entry removed - app/globals.css: drop check-pop, --ease-spring, --duration-normal and the shadow aliases - dictionaries: 81 unused keys removed from all four languages
This commit is contained in:
@@ -52,7 +52,6 @@ export interface ProviderConfig {
|
||||
vertexApiKey?: string // Express Mode API key
|
||||
|
||||
models: ModelConfig[]
|
||||
validated?: boolean // Has API key been validated
|
||||
}
|
||||
|
||||
// The complete multi-model configuration
|
||||
@@ -60,9 +59,6 @@ export interface MultiModelConfig {
|
||||
version: 1
|
||||
providers: ProviderConfig[]
|
||||
selectedModelId?: string // Currently selected model's UUID
|
||||
// Older versions saved here whether untested models were listed in the
|
||||
// model picker; they always are now
|
||||
showUnvalidatedModels?: boolean
|
||||
}
|
||||
|
||||
// Flattened model for dropdown display
|
||||
@@ -86,10 +82,6 @@ export interface FlattenedModel {
|
||||
source?: "user" | "server"
|
||||
// Whether this model is the server default (matches AI_MODEL env var)
|
||||
isDefault?: boolean
|
||||
// Custom env var name(s) for server models
|
||||
// Can be a single string or array of strings for load balancing
|
||||
apiKeyEnv?: string | string[]
|
||||
baseUrlEnv?: string
|
||||
}
|
||||
|
||||
// Providers whose server credentials live in fixed env vars
|
||||
@@ -557,7 +549,6 @@ export function createProviderConfig(provider: ProviderName): ProviderConfig {
|
||||
apiKey: "",
|
||||
baseUrl: PROVIDER_INFO[provider].defaultBaseUrl,
|
||||
models: [],
|
||||
validated: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user