refactor: remove retired agent provider integration
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user