mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-16 20:11:08 +00:00
16 lines
466 B
TypeScript
16 lines
466 B
TypeScript
import type { ExternalAgentConfig } from "../../infrastructure/ai/types";
|
|
|
|
export function findEnabledExternalAgent(
|
|
agents: ExternalAgentConfig[],
|
|
agentId: string,
|
|
): ExternalAgentConfig | undefined {
|
|
return agents.find((agent) => agent.id === agentId && agent.enabled);
|
|
}
|
|
|
|
export function canSendWithAgent(
|
|
agentId: string,
|
|
agents: ExternalAgentConfig[],
|
|
): boolean {
|
|
return agentId === "catty" || Boolean(findEnabledExternalAgent(agents, agentId));
|
|
}
|