mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
3408bba303
* feat(ai): add Cursor SDK agent support * fix(ai): harden Cursor SDK support * fix(ai): address Cursor SDK review findings * fix(ai): refresh Cursor environment handling * fix(ai): refresh Cursor discovery scans * fix(ai): enable Cursor recheck without path * Use official Cursor agent icon * Clarify Cursor SDK setup requirements * Split Cursor SDK setup status * Simplify Cursor settings copy * Improve Cursor API key error * Add safe Cursor auth diagnostics * Disable Cursor local sandbox by default * Show Cursor MCP tool names in tool cards * Add spacing inside tool call groups
21 lines
641 B
TypeScript
21 lines
641 B
TypeScript
import type { ExternalAgentConfig } from "../../infrastructure/ai/types";
|
|
import { getExternalAgentSdkBackend } from "../../infrastructure/ai/managedAgents";
|
|
|
|
export function findEnabledExternalAgent(
|
|
agents: ExternalAgentConfig[],
|
|
agentId: string,
|
|
): ExternalAgentConfig | undefined {
|
|
return agents.find((agent) =>
|
|
agent.id === agentId &&
|
|
agent.enabled &&
|
|
agent.available !== false &&
|
|
Boolean(getExternalAgentSdkBackend(agent)));
|
|
}
|
|
|
|
export function canSendWithAgent(
|
|
agentId: string,
|
|
agents: ExternalAgentConfig[],
|
|
): boolean {
|
|
return agentId === "catty" || Boolean(findEnabledExternalAgent(agents, agentId));
|
|
}
|