feat(07-uat): admin AI panel UX enhancements + DocumentCard status indicators
- GET /api/admin/ai-config/models — fetch model list from provider's /models endpoint - POST /api/admin/ai-config/test-connection — replaced GET; accepts unsaved form values (api_key, base_url, model_name) so admins can test before saving - TestConnectionRequest Pydantic model with provider_id validation - SearchableModelSelect.vue — new reusable combobox; Teleport to body avoids overflow:hidden clipping; shows all models on open, filters only on typing; static "Enter manually" item always pinned at bottom; caches per provider - AdminAiConfigTab: model name input replaced with SearchableModelSelect; testingProvider ref + spinner added to Test Connection button - DocumentCard: processing spinner + "Classifying…", pending "Queued" badge, classification_failed badge; topics section only shown when status=ready - FileManagerView: onUnmounted imported (polling wiring pending next session) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ac2dded35b
commit
3b11b9a596
@@ -304,9 +304,17 @@ export function saveAiConfig(body) {
|
||||
})
|
||||
}
|
||||
|
||||
export function testAiConnection(providerId) {
|
||||
export function testAiConnection(providerId, overrides = {}) {
|
||||
return request('/api/admin/ai-config/test-connection', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ provider_id: providerId, ...overrides }),
|
||||
})
|
||||
}
|
||||
|
||||
export function getAiModels(providerId) {
|
||||
return request(
|
||||
'/api/admin/ai-config/test-connection?provider_id=' + encodeURIComponent(providerId),
|
||||
'/api/admin/ai-config/models?provider_id=' + encodeURIComponent(providerId),
|
||||
{ method: 'GET' }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user