feat(settings): add model provider management with full CRUD support
Add a new settings page for managing API model providers (name, API URL, API key, applicable agent types). Includes database migration, SeaORM entity, backend CRUD commands/handlers, frontend settings UI with agent type filter, add/edit/delete dialogs, and i18n support for all 10 locales. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -220,6 +220,15 @@ export function compareAgentType(a: AgentType, b: AgentType): number {
|
||||
return aIndex - bIndex
|
||||
}
|
||||
|
||||
export const ALL_AGENT_TYPES: AgentType[] = [
|
||||
"claude_code",
|
||||
"codex",
|
||||
"open_code",
|
||||
"gemini",
|
||||
"open_claw",
|
||||
"cline",
|
||||
]
|
||||
|
||||
export const AGENT_LABELS: Record<AgentType, string> = {
|
||||
claude_code: "Claude Code",
|
||||
codex: "Codex",
|
||||
@@ -888,3 +897,13 @@ export interface ChatChannelMessageLog {
|
||||
error_detail: string | null
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface ModelProviderInfo {
|
||||
id: number
|
||||
name: string
|
||||
api_url: string
|
||||
api_key_masked: string
|
||||
agent_types: AgentType[]
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user