Skip to content

Commit 21f7e57

Browse files
brookscjohannesjo
authored andcommitted
fix(coordinator): align agent arg tests after rebase
1 parent 5099957 commit 21f7e57

2 files changed

Lines changed: 2 additions & 38 deletions

File tree

electron/ipc/agents.test.ts

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { getMcpConfigArgs, getSkipPermissionsArgs } from './agents.js';
3-
4-
describe('getMcpConfigArgs', () => {
5-
it('returns flag + path for claude', () => {
6-
expect(getMcpConfigArgs('claude', '/tmp/config.json')).toEqual([
7-
'--mcp-config',
8-
'/tmp/config.json',
9-
]);
10-
});
11-
12-
it('returns flag + path for codex', () => {
13-
expect(getMcpConfigArgs('codex', '/tmp/config.json')).toEqual(['--config', '/tmp/config.json']);
14-
});
15-
16-
it('returns empty for gemini', () => {
17-
expect(getMcpConfigArgs('gemini', '/tmp/config.json')).toEqual([]);
18-
});
19-
20-
it('returns empty for opencode', () => {
21-
expect(getMcpConfigArgs('opencode', '/tmp/config.json')).toEqual([]);
22-
});
23-
24-
it('returns empty for copilot', () => {
25-
expect(getMcpConfigArgs('copilot', '/tmp/config.json')).toEqual([]);
26-
});
27-
28-
it('handles path-qualified claude command', () => {
29-
expect(getMcpConfigArgs('/usr/local/bin/claude', '/tmp/config.json')).toEqual([
30-
'--mcp-config',
31-
'/tmp/config.json',
32-
]);
33-
});
34-
35-
it('handles unknown agent', () => {
36-
expect(getMcpConfigArgs('unknown-agent', '/tmp/config.json')).toEqual([]);
37-
});
38-
});
2+
import { getSkipPermissionsArgs } from './agents.js';
393

404
describe('getSkipPermissionsArgs', () => {
415
it('returns a copy of default skip-permission args', () => {

electron/ipc/agents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const AGENT_CACHE_TTL = 30_000;
8585
export function getSkipPermissionsArgs(command: string): string[] {
8686
const base = path.basename(command);
8787
const agent = DEFAULT_AGENTS.find((a) => a.command === base || a.command === command);
88-
return agent ? agent.skip_permissions_args : [];
88+
return agent ? [...agent.skip_permissions_args] : [];
8989
}
9090

9191
export async function listAgents(): Promise<AgentDef[]> {

0 commit comments

Comments
 (0)