MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / parseAgentTarget

Function parseAgentTarget

src/index.ts:66–74  ·  view source on GitHub ↗
(input?: string)

Source from the content-addressed store, hash-verified

64}
65
66function parseAgentTarget(input?: string): AgentTarget {
67 const normalized = (input ?? "claude").toLowerCase();
68 if (normalized === "claude" || normalized === "claude-code") return "claude";
69 if (normalized === "cursor") return "cursor";
70 if (normalized === "vscode" || normalized === "vs-code" || normalized === "vs") return "vscode";
71 if (normalized === "windsurf") return "windsurf";
72 if (normalized === "opencode" || normalized === "open-code") return "opencode";
73 throw new Error(`Unsupported coding agent \"${input}\". Use one of: claude, cursor, vscode, windsurf, opencode.`);
74}
75
76function parseRunner(args: string[]): "npx" | "bunx" {
77 const explicit = args.find((arg) => arg.startsWith("--runner="));

Callers 1

runInitCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected