diff --git a/src/commands/integration/connect.ts b/src/commands/integration/connect.ts index 037fe9d..9317679 100644 --- a/src/commands/integration/connect.ts +++ b/src/commands/integration/connect.ts @@ -63,7 +63,6 @@ type ConnectableType = | 'devin' | 'cursor' | 'factory' - | 'conductor' | 'capy' | 'amp' | 'linear' @@ -114,7 +113,6 @@ const TYPE_OPTIONS: Array<{ value: ConnectableType; label: string; hint: string; { value: 'devin', label: 'Devin', hint: 'API key · coding agent', category: 'code-agent' }, { value: 'cursor', label: 'Cursor', hint: 'API key · coding agent', category: 'code-agent' }, { value: 'factory', label: 'Factory', hint: 'API key · coding agent', category: 'code-agent' }, - { value: 'conductor', label: 'Conductor', hint: 'API key · coding agent', category: 'code-agent' }, { value: 'capy', label: 'Capy', hint: 'API key · coding agent', category: 'code-agent' }, { value: 'amp', label: 'Amp', hint: 'access token · coding agent', category: 'code-agent' }, { value: 'linear', label: 'Linear', hint: 'personal API key · issue tracking', category: 'issue-tracking' }, @@ -393,14 +391,6 @@ const CODE_AGENTS = { link: 'https://app.factory.ai/settings/api-keys', linkLabel: 'Create API key', }, - conductor: { - keyLabel: 'API key', - name: 'Conductor', - instructions: - 'Create an API key in Conductor under Users > API keys. The key starts with sk_. Handed-off autofixes run as agents in Conductor Cloud workspaces on your account.', - link: 'https://app.conductor.build/users/api-keys', - linkLabel: 'Create API key', - }, capy: { keyLabel: 'API key', name: 'Capy', @@ -1600,7 +1590,7 @@ export const integrationConnectCommand: Command = { { flag: '--api-key ', description: - 'API key (Datadog / Honeycomb / OpenStatus / Logfire project key / New Relic User key / LangSmith / Braintrust service token / incident.io / Amplitude / CircleCI personal API token / Devin / Cursor / Factory / Conductor / Capy / Amp access token / Linear)', + 'API key (Datadog / Honeycomb / OpenStatus / Logfire project key / New Relic User key / LangSmith / Braintrust service token / incident.io / Amplitude / CircleCI personal API token / Devin / Cursor / Factory / Capy / Amp access token / Linear)', type: 'string', }, { flag: '--secret-key ', description: 'Secret key (Amplitude only)', type: 'string' }, diff --git a/src/commands/thread/ask.ts b/src/commands/thread/ask.ts index 2eb97e9..c0109bd 100644 --- a/src/commands/thread/ask.ts +++ b/src/commands/thread/ask.ts @@ -59,7 +59,6 @@ export const threadAskCommand: Command = { ...(name ? { name } : {}), ...(context.length > 0 ? { context } : {}), }); - await api.messagesPost({ workspaceId, threadId: thread.id, prompt }); const url = await threadConsoleUrl(config, api, thread); if (noWait) { diff --git a/test/integration-connect-category.test.ts b/test/integration-connect-category.test.ts index a85eb7d..531434b 100644 --- a/test/integration-connect-category.test.ts +++ b/test/integration-connect-category.test.ts @@ -10,7 +10,7 @@ import { isCLIError } from '../src/errors/base'; describe('typeOptionsForCategory', () => { it('returns every option when no category is given', () => { const all = typeOptionsForCategory(undefined); - assert.equal(all.length, 28); + assert.equal(all.length, 27); }); it('narrows to exactly the observability integrations', () => { @@ -37,7 +37,7 @@ describe('typeOptionsForCategory', () => { it('narrows to exactly the code agents', () => { const types = typeOptionsForCategory('code-agent').map((o) => o.value); - assert.deepEqual(types.sort(), ['amp', 'capy', 'conductor', 'cursor', 'devin', 'factory']); + assert.deepEqual(types.sort(), ['amp', 'capy', 'cursor', 'devin', 'factory']); }); it('narrows to exactly the incident management and CI/CD integrations', () => { @@ -95,9 +95,9 @@ describe('typeOptionsForCategory', () => { describe('resolveTypeOptions', () => { it('lets --type win over the filter', () => { - assert.equal(resolveTypeOptions('observability', true).length, 28); + assert.equal(resolveTypeOptions('observability', true).length, 27); assert.equal(resolveTypeOptions('observability', false).length, 11); - assert.equal(resolveTypeOptions(undefined, false).length, 28); + assert.equal(resolveTypeOptions(undefined, false).length, 27); }); it('rejects an unknown category even when --type is present', () => { diff --git a/test/thread-ask.test.ts b/test/thread-ask.test.ts new file mode 100644 index 0000000..8de2d53 --- /dev/null +++ b/test/thread-ask.test.ts @@ -0,0 +1,53 @@ +import { after, before, beforeEach, describe, it } from 'node:test'; +import assert from 'node:assert/strict'; +import { threadAskCommand } from '../src/commands/thread/ask'; +import { mockConfig } from './helpers/config'; + +type Sent = { method: string; url: string; body: unknown }; + +const thread = { + id: 'thrd_1', + workspaceId: 'ws_1', + name: '', + _html_url: 'https://console.example.test/acme/threads/thrd_1', +}; + +describe('thread ask', () => { + const originalFetch = globalThis.fetch; + const originalWrite = process.stdout.write; + let sent: Sent[] = []; + + before(() => { + process.stdout.write = ((): boolean => true) as typeof process.stdout.write; + }); + + beforeEach(() => { + delete process.env.POLYLANE_API_KEY; + sent = []; + globalThis.fetch = (async (input: RequestInfo | URL, init?: RequestInit) => { + const url = String(input); + sent.push({ method: String(init?.method ?? 'GET'), url, body: init?.body ? JSON.parse(String(init.body)) : undefined }); + if (url.endsWith('/v1/threads')) { + return Response.json({ success: true, error: null, result: thread }, { status: 201 }); + } + return Response.json({ success: true, error: null, result: {} }, { status: 202 }); + }) as typeof fetch; + }); + + after(() => { + globalThis.fetch = originalFetch; + process.stdout.write = originalWrite; + }); + + it('sends the prompt once, inside the thread create call', async () => { + const config = mockConfig({ apiKey: 'test-key', apiKeySource: 'flag', workspaceId: 'ws_1' }); + await threadAskCommand.execute(config, {}, { _: ['hello', 'there'], noWait: true }); + assert.deepEqual(sent, [ + { + method: 'POST', + url: 'https://api.example.test/v1/threads', + body: { workspaceId: 'ws_1', prompt: 'hello there', visibility: 'workspace' }, + }, + ]); + }); +});