refactor: remove retired agent provider integration

This commit is contained in:
2026-11-12 15:53:33 -08:00
parent d88018fd64
commit 91c7c0310e
42 changed files with 271 additions and 245 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import type { Provider } from "./api";
import { PROVIDERS } from "./workspace-domain.ts";
type PersistedChatModel = {
lastUsedProvider: Provider | null;
@@ -11,7 +12,7 @@ export type ChatModelSelection = {
};
export function getChatModelSelection(chat: PersistedChatModel | null): ChatModelSelection | null {
if (!chat?.lastUsedProvider || !chat.lastUsedModel?.trim()) return null;
if (!chat?.lastUsedProvider || !PROVIDERS.includes(chat.lastUsedProvider) || !chat.lastUsedModel?.trim()) return null;
return {
provider: chat.lastUsedProvider,
model: chat.lastUsedModel.trim(),