diff --git a/cptr/frontend/src/lib/apis/admin.ts b/cptr/frontend/src/lib/apis/admin.ts index a8140ff..b567453 100644 --- a/cptr/frontend/src/lib/apis/admin.ts +++ b/cptr/frontend/src/lib/apis/admin.ts @@ -130,6 +130,7 @@ export interface Connection { name: string; provider: string; api_type: string; + provider_type?: 'default' | 'llama.cpp' | null; prefix_id: string | null; base_url: string | null; api_key: string | null; @@ -146,6 +147,7 @@ export const createConnection = (conn: { name: string; provider: string; api_type?: string; + provider_type?: 'default' | 'llama.cpp' | null; prefix_id?: string | null; base_url?: string | null; api_key?: string | null; diff --git a/cptr/frontend/src/lib/components/Admin/Agents.svelte b/cptr/frontend/src/lib/components/Admin/Agents.svelte index 59477f7..f081951 100644 --- a/cptr/frontend/src/lib/components/Admin/Agents.svelte +++ b/cptr/frontend/src/lib/components/Admin/Agents.svelte @@ -10,6 +10,7 @@ } from '$lib/apis/admin'; import Icon from '$lib/components/Icon.svelte'; import Spinner from '$lib/components/common/Spinner.svelte'; + import ToggleSwitch from '$lib/components/common/ToggleSwitch.svelte'; import { t } from '$lib/i18n'; import { refreshChatState } from '$lib/stores/chat'; import AgentProfileModal from './AgentProfileModal.svelte'; @@ -179,8 +180,7 @@ modal = null; } - function toggleProfile(e: Event, index: number) { - e.stopPropagation(); + function toggleProfile(index: number) { const profile = profiles[index]; if (!profile) return; const mode = profile.mode === 'disabled' ? 'enabled' : 'disabled'; @@ -262,11 +262,12 @@ {:else}