Skip to content

Commit 55ac92f

Browse files
claude[bot]claude
andauthored
feat(integration): connecting a coding agent always becomes the autofix executor (#39)
* feat(integration): connecting a coding agent always becomes the autofix executor The connect flow no longer asks 'Use <agent> for all autofixes?' and no longer sends useAsDefaultExecutor — the API now always routes autofixes through the newly connected agent. The --no-default-executor flag is removed and a one-line stderr note states the new routing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QMnjT62WtXyTgKraLdibe6 * fix(integration): address review notes on connect success output Key the code-agent success note on the server-confirmed integration.type via a CODE_AGENTS type guard instead of a hardcoded three-agent check, and reword it to state what connecting does rather than asserting server-side routing state the response does not carry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QMnjT62WtXyTgKraLdibe6 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 78a6eee commit 55ac92f

1 file changed

Lines changed: 8 additions & 19 deletions

File tree

‎src/commands/integration/connect.ts‎

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
note,
2929
promptSelectOrBack,
3030
promptPasswordOrBack,
31-
promptConfirmOrBack,
3231
} from '../../utils/prompt';
3332

3433
type ConnectBody = Parameters<PolylaneAPI['integrationsConnect']>[0];
@@ -128,6 +127,10 @@ const CODE_AGENTS = {
128127
},
129128
} as const;
130129

130+
function isCodeAgentType(value: Integration['type']): value is keyof typeof CODE_AGENTS {
131+
return value in CODE_AGENTS;
132+
}
133+
131134
// Baseline the integrations of one type so the poller can spot the one the
132135
// browser flow creates — or updates, when it's a re-install.
133136
async function integrationArrivalCheck(
@@ -477,9 +480,6 @@ async function connectWithCredentials(
477480
} else {
478481
const agent = CODE_AGENTS[type];
479482
let apiKey = '';
480-
// Matches the console default: route autofixes through the agent unless
481-
// the user opts out.
482-
let useAsDefaultExecutor = getArgBoolean(args, 'noDefaultExecutor') !== true;
483483
const ok = await runSteps([
484484
secretStep(
485485
config,
@@ -496,26 +496,16 @@ async function connectWithCredentials(
496496
apiKey = v;
497497
}
498498
),
499-
async () => {
500-
if (getArgBoolean(args, 'noDefaultExecutor') === true || !isInteractive(config.nonInteractive)) {
501-
return SKIPPED;
502-
}
503-
const answer = await promptConfirmOrBack(
504-
{ nonInteractive: config.nonInteractive },
505-
`Use ${agent.name} for all autofixes? (instead of the Polylane executor; you can change this later)`,
506-
true
507-
);
508-
if (answer === BACK) return BACK;
509-
useAsDefaultExecutor = answer;
510-
return;
511-
},
512499
]);
513500
if (!ok) return BACK;
514-
body = { type, workspaceId, apiKey, useAsDefaultExecutor };
501+
body = { type, workspaceId, apiKey };
515502
}
516503

517504
const integration = await api.integrationsConnect(body);
518505
printConnectSuccess(config, integration, TYPE_OPTIONS.find((o) => o.value === type)?.label ?? type);
506+
if (isCodeAgentType(integration.type) && !config.quiet && config.output !== 'json') {
507+
process.stderr.write(`Connecting ${CODE_AGENTS[integration.type].name} makes it the default autofix executor.\n`);
508+
}
519509
return;
520510
}
521511

@@ -566,7 +556,6 @@ export const integrationConnectCommand: Command = {
566556
{ flag: '--api-token <token>', description: 'API token (Axiom / Better Stack global token)', type: 'string' },
567557
{ flag: '--uptime-api-token <token>', description: 'Uptime API token (Better Stack only)', type: 'string' },
568558
{ flag: '--telemetry-api-token <token>', description: 'Telemetry API token (Better Stack only)', type: 'string' },
569-
{ flag: '--no-default-executor', description: 'Devin / Cursor / Factory: do not route autofixes through it', type: 'boolean' },
570559
{ flag: '--url <url>', description: 'MCP server URL', type: 'string' },
571560
{ flag: '--name <name>', description: 'MCP server display name', type: 'string' },
572561
{ flag: '--transport <t>', description: 'MCP transport: http | sse (default: http)', type: 'string' },

0 commit comments

Comments
 (0)