diff --git a/scripts/openclaude-bin-heap.test.ts b/scripts/openclaude-bin-heap.test.ts index 9f2b5cacf..454a08f1a 100644 --- a/scripts/openclaude-bin-heap.test.ts +++ b/scripts/openclaude-bin-heap.test.ts @@ -8,7 +8,6 @@ import { HEAP_PERCENTAGE_ENV, HEAP_PERCENTAGE_FLAG, HEAP_SIZE_ENV, - HEAP_SIZE_FLAG, formatPercentageUnavailableStderr, getAvailableMemoryBytes, hasHeapLimitFlag, diff --git a/scripts/provider-launch.ts b/scripts/provider-launch.ts index 466e9ca64..ef0baa49e 100644 --- a/scripts/provider-launch.ts +++ b/scripts/provider-launch.ts @@ -97,10 +97,6 @@ async function resolveAtomicChatDefaultModel(): Promise { return models[0] ?? null } -function runCommand(command: string, env: NodeJS.ProcessEnv): Promise { - return runProcess(command, [], env) -} - export async function runProcess(command: string, args: string[], env: NodeJS.ProcessEnv): Promise { try { const child = Bun.spawn([command, ...args], { diff --git a/src/components/ClaudeMdExternalIncludesDialog.tsx b/src/components/ClaudeMdExternalIncludesDialog.tsx index 06513be51..fed41fdb8 100644 --- a/src/components/ClaudeMdExternalIncludesDialog.tsx +++ b/src/components/ClaudeMdExternalIncludesDialog.tsx @@ -32,7 +32,7 @@ function getUserClaudeMdDisplayPath(): string { return getDisplayPath(join(getClaudeConfigHomeDir(), 'CLAUDE.md')); } export function ClaudeMdExternalIncludesDialog(t0: Props) { - const $ = _c(18); + _c(18); const { onDone, isStandaloneDialog, externalIncludes, scope } = t0; React.useEffect(_temp, []); const handleSelection = React.useCallback((value: 'yes' | 'no') => { diff --git a/src/components/HighlightedCode/Fallback.tsx b/src/components/HighlightedCode/Fallback.tsx index 1457ca7c8..25b817774 100644 --- a/src/components/HighlightedCode/Fallback.tsx +++ b/src/components/HighlightedCode/Fallback.tsx @@ -1,7 +1,7 @@ import { c as _c } from "react-compiler-runtime"; import chalk from 'chalk'; import { extname } from 'path'; -import React, { Suspense, use, useMemo } from 'react'; +import React, { Suspense, use } from 'react'; import { Ansi, Text } from '../../ink.js'; import { getCliHighlightPromise } from '../../utils/cliHighlight.js'; import { logForDebugging } from '../../utils/debug.js'; diff --git a/src/components/PromptInput/PromptInput.tsx b/src/components/PromptInput/PromptInput.tsx index 3ac42fcce..a59e8f1ec 100644 --- a/src/components/PromptInput/PromptInput.tsx +++ b/src/components/PromptInput/PromptInput.tsx @@ -496,7 +496,6 @@ function PromptInput({ }, [rawFooterSelection, footerItemSelected, setAppState]); const tasksSelected = footerItemSelected === 'tasks'; const tmuxSelected = footerItemSelected === 'tmux'; - const bagelSelected = footerItemSelected === 'bagel'; const teamsSelected = footerItemSelected === 'teams'; const bridgeSelected = footerItemSelected === 'bridge'; function selectFooterItem(item: FooterItem | null): void { diff --git a/src/entrypoints/sdk/v2.ts b/src/entrypoints/sdk/v2.ts index a39d3ffa5..3123a6742 100644 --- a/src/entrypoints/sdk/v2.ts +++ b/src/entrypoints/sdk/v2.ts @@ -401,7 +401,7 @@ class SDKSessionImpl implements SDKSession { requestSdkRootAbort(this._abortController, source, 'sdk_session') } // Deny all pending permission prompts before clearing - for (const [toolUseId, pending] of this.pendingPermissionPrompts) { + for (const [, pending] of this.pendingPermissionPrompts) { pending.resolve({ behavior: 'deny', message: 'Session interrupted', diff --git a/src/memdir/autoExtractFacts.ts b/src/memdir/autoExtractFacts.ts index c8083b28d..7f6483849 100644 --- a/src/memdir/autoExtractFacts.ts +++ b/src/memdir/autoExtractFacts.ts @@ -7,7 +7,7 @@ */ import { writeFileSync, existsSync, mkdirSync, readFileSync } from 'fs' -import { join, dirname } from 'path' +import { join } from 'path' import { getAutoMemPath } from './paths.js' import { isAutoMemoryEnabled } from './paths.js' import { isMemoryWriteApprovalRequired } from '../utils/governancePolicy.js' diff --git a/src/memdir/vectorIndex.test.ts b/src/memdir/vectorIndex.test.ts index 4673df48e..94e1d60e6 100644 --- a/src/memdir/vectorIndex.test.ts +++ b/src/memdir/vectorIndex.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, beforeEach, afterEach } from 'bun:test' -import { mkdtempSync, writeFileSync, rmSync, existsSync, mkdirSync, symlinkSync } from 'fs' +import { mkdtempSync, writeFileSync, rmSync, existsSync, symlinkSync } from 'fs' import { tmpdir } from 'os' import { join } from 'path' import { diff --git a/src/screens/REPL.tsx b/src/screens/REPL.tsx index 388c403cc..35f975232 100644 --- a/src/screens/REPL.tsx +++ b/src/screens/REPL.tsx @@ -225,7 +225,6 @@ import { IdeOnboardingDialog } from '../components/IdeOnboardingDialog.js'; import { EffortCallout, shouldShowEffortCallout } from '../components/EffortCallout.js'; import { getDisplayedEffortLevel, type EffortValue } from '../utils/effort.js'; import { RemoteCallout } from '../components/RemoteCallout.js'; -import { getAPIProvider } from '../utils/model/providers.js'; import { activityManager } from '../utils/activityManager.js'; import { createAbortController } from '../utils/abortController.js'; import { @@ -361,12 +360,6 @@ async function launchUltraplan(_opts: { throw new Error('Ultraplan is not available in this build'); } -function median(values: number[]): number { - const sorted = [...values].sort((a, b) => a - b); - const mid = Math.floor(sorted.length / 2); - return sorted.length % 2 === 0 ? Math.round((sorted[mid - 1]! + sorted[mid]!) / 2) : sorted[mid]!; -} - /** * Small component to display transcript mode footer with dynamic keybinding. * Must be rendered inside KeybindingSetup to access keybinding context. diff --git a/src/services/api/bootstrap.ts b/src/services/api/bootstrap.ts index da3709858..5bfdd33c8 100644 --- a/src/services/api/bootstrap.ts +++ b/src/services/api/bootstrap.ts @@ -12,7 +12,6 @@ import { getVendor, } from '../../integrations/index.js' import { - getRouteDescriptor, resolveRouteCredentialValue, } from '../../integrations/routeMetadata.js' import { firstUsableCredential, hasInvalidCredentialPlaceholder } from './credentialPool.js' diff --git a/src/services/api/claude.lifecycle.test.ts b/src/services/api/claude.lifecycle.test.ts index 27b216748..8ecb0e6cd 100644 --- a/src/services/api/claude.lifecycle.test.ts +++ b/src/services/api/claude.lifecycle.test.ts @@ -357,26 +357,6 @@ async function drainGenerator( } } -async function waitForPromise( - promise: Promise, - timeoutMs: number, - timeoutMessage: string, -): Promise { - let timeoutId: ReturnType | undefined - try { - return await Promise.race([ - promise, - new Promise((_, reject) => { - timeoutId = setTimeout(() => { - reject(new Error(timeoutMessage)) - }, timeoutMs) - }), - ]) - } finally { - if (timeoutId !== undefined) clearTimeout(timeoutId) - } -} - function makeParams(context: { model: string }): BetaMessageStreamParams { return { model: context.model, diff --git a/src/services/api/openaiShim.ts b/src/services/api/openaiShim.ts index a35b02caf..bafd8bf77 100644 --- a/src/services/api/openaiShim.ts +++ b/src/services/api/openaiShim.ts @@ -91,7 +91,6 @@ import { executeOpenAIRequest } from './openaiShim/requestExecutor.js' import { getLocalProviderRetryBaseUrls, isAzureStyleBaseUrl, - isLocalProviderUrl, resolveProviderRequest, shouldAttemptLocalToollessRetry, } from './providerConfig.js' @@ -103,11 +102,6 @@ import { } from './openaiErrorClassification.js' import { redactSecretValueForDisplay } from '../../utils/providerProfile.js' import { logApiCallStart, logApiCallEnd } from '../../utils/requestLogging.js' -import { - createStreamState, - processStreamChunk, - getStreamStats, -} from '../../utils/streamingOptimizer.js' import { stableStringifyJson } from '../../utils/stableStringify.js' import { type NonStreamingOpenAIResponse, @@ -124,7 +118,6 @@ import { hasGeminiApiHost as matchesGeminiApiHost, hasMistralApiHost, isGithubModelsMode, - isGeminiModelName, mergeGeminiThoughtSignature, shouldPreserveGeminiThoughtSignature as shouldPreserveGeminiThoughtSignatureForRoute, } from './openaiShim/providerCompatibility.js' @@ -147,8 +140,6 @@ import { const GITHUB_429_MAX_RETRIES = 3 const GITHUB_429_BASE_DELAY_SEC = 1 const GITHUB_429_MAX_DELAY_SEC = 32 -const CREDENTIAL_POOL_COOLDOWN_MS = 30_000 -const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 90_000 const GEMINI_API_HOST = 'generativelanguage.googleapis.com' function isCopilotTokenExpiredError(text: string): boolean { const lower = text.toLowerCase() diff --git a/src/services/api/openaiShim/requestExecutor.integration.test.ts b/src/services/api/openaiShim/requestExecutor.integration.test.ts index 9776787b9..48ba9d4c1 100644 --- a/src/services/api/openaiShim/requestExecutor.integration.test.ts +++ b/src/services/api/openaiShim/requestExecutor.integration.test.ts @@ -158,185 +158,6 @@ function makeStallingResponse( } } -type ShimStream = AsyncIterable> & { - controller: AbortController -} - -type StreamDrainOutcome = - | { status: 'completed'; events: Array> } - | { - status: 'rejected' - events: Array> - error: unknown - } - -async function waitForPromise( - promise: Promise, - timeoutMs: number, - message: string, -): Promise { - let timer: ReturnType | undefined - try { - return await Promise.race([ - promise, - new Promise((_, reject) => { - timer = setTimeout(() => reject(new Error(message)), timeoutMs) - }), - ]) - } finally { - if (timer !== undefined) { - clearTimeout(timer) - } - } -} - -async function expectAbortStopsStream({ - abort, - cancelReasons, - expectedEventsBeforeAbort, - label, - stream, -}: { - abort: () => void - cancelReasons: unknown[] - expectedEventsBeforeAbort: number - label: string - stream: ShimStream -}): Promise { - const events: Array> = [] - let resolveReady!: () => void - const ready = new Promise(resolve => { - resolveReady = resolve - }) - - const drain = (async (): Promise => { - try { - for await (const event of stream) { - events.push(event) - if (events.length >= expectedEventsBeforeAbort) { - resolveReady() - } - } - return { status: 'completed', events } - } catch (error) { - return { status: 'rejected', events, error } - } - })() - - await waitForPromise( - ready, - 500, - `${label} did not produce initial stream events`, - ) - // Let the for-await loop ask the stream reader for the next chunk, so the - // abort has to wake a real pending read rather than only flipping a flag. - await Promise.resolve() - await Promise.resolve() - - abort() - - const outcome = await waitForPromise( - drain, - 500, - `${label} did not stop promptly after abort`, - ) - expect(cancelReasons).toHaveLength(1) - expect(outcome.status).toBe('rejected') - if (outcome.status === 'rejected') { - expect((outcome.error as { name?: unknown }).name).toBe('AbortError') - } - return outcome -} - -async function expectPausedAbortCancelsStream({ - cancelReasons, - label, - stream, -}: { - cancelReasons: unknown[] - label: string - stream: ShimStream -}): Promise>> { - const iterator = stream[Symbol.asyncIterator]() - const first = await waitForPromise( - iterator.next(), - 500, - `${label} did not produce first stream event`, - ) - expect(first.done).toBe(false) - - stream.controller.abort() - await waitForPromise( - (async () => { - for (let i = 0; i < 10; i++) { - if (cancelReasons.length > 0) return - await Promise.resolve() - } - throw new Error(`${label} did not cancel source on controller abort`) - })(), - 500, - `${label} did not cancel source on controller abort`, - ) - - const returned = await waitForPromise( - Promise.resolve(iterator.return?.()), - 500, - `${label} did not return promptly after abort while paused`, - ) - expect(cancelReasons).toHaveLength(1) - return returned as IteratorResult> -} - -async function expectBufferedAbortRejectsNext({ - expectedText, - label, - stream, -}: { - expectedText?: string - label: string - stream: ShimStream -}): Promise { - const iterator = stream[Symbol.asyncIterator]() - - try { - let firstDelta: Record | undefined - for (let i = 0; i < 5; i++) { - const next = await waitForPromise( - iterator.next(), - 500, - `${label} did not produce expected pre-abort events`, - ) - expect(next.done).toBe(false) - if (next.value?.type === 'content_block_delta') { - firstDelta = next.value - break - } - } - - expect(firstDelta).toBeDefined() - if (expectedText !== undefined) { - expect((firstDelta as { delta?: { text?: string } }).delta?.text).toBe(expectedText) - } - - stream.controller.abort() - const afterAbort = await waitForPromise( - iterator.next().then( - value => ({ status: 'resolved' as const, value }), - error => ({ status: 'rejected' as const, error }), - ), - 500, - `${label} did not stop after abort`, - ) - - if (afterAbort.status !== 'rejected') { - throw new Error(`${label} yielded after abort: ${JSON.stringify(afterAbort.value)}`) - } - expect((afterAbort.error as { name?: unknown }).name).toBe('AbortError') - } finally { - await Promise.resolve(iterator.return?.()).catch(() => {}) - } -} - function makeOpenAIStreamFrame( delta: Record, finishReason: string | null = null, diff --git a/src/services/api/openaiShim/requestExecutor.test.ts b/src/services/api/openaiShim/requestExecutor.test.ts index a9cc53d7f..f2b34f436 100644 --- a/src/services/api/openaiShim/requestExecutor.test.ts +++ b/src/services/api/openaiShim/requestExecutor.test.ts @@ -5,15 +5,13 @@ import { CannotRetryError, withRetry } from '../withRetry.js' import { afterEach, beforeEach, expect, jest, mock, test } from 'bun:test' import { acquireSharedMutationLock, releaseSharedMutationLock } from '../../../test/sharedMutationLock.js' import { asMockFetch } from '../../../test/typedMocks.js' -import { _clearRegistryForTesting, ensureIntegrationsLoaded, registerGateway } from '../../../integrations/index.ts' +import { _clearRegistryForTesting, ensureIntegrationsLoaded } from '../../../integrations/index.ts' import { applyProviderFlag } from '../../../utils/providerFlag.ts' -import { applyProviderProfileToProcessEnv } from '../../../utils/providerProfiles.ts' import { categorizeRetryableAPIError, getAssistantMessageFromError, - OPENCODE_GO_FREE_LIMIT_ERROR_MESSAGE, } from '../errors.ts' -import { createOpenAIShimClient, hasMistralApiHost } from '../openaiShim.ts' +import { createOpenAIShimClient } from '../openaiShim.ts' import { formatRetryAfterHint, sleepMs } from './requestExecutor.js' import * as realGithubModelsCredentials from '../../../utils/githubModelsCredentials.js' @@ -112,255 +110,6 @@ function makeSseResponse(lines: string[]): Response { ) } -function withResponseUrl(response: Response, url: string): Response { - Object.defineProperty(response, 'url', { - value: url, - configurable: true, - }) - return response -} - -type StallingResponse = { - response: Response - cancelReasons: unknown[] - close: () => void -} - -function makeStallingResponse( - firstChunk: string, - url = 'https://api.example.test/v1/chat/completions', - contentType = 'text/event-stream', -): StallingResponse { - const encoder = new TextEncoder() - const cancelReasons: unknown[] = [] - let streamController: ReadableStreamDefaultController | undefined - let closed = false - - const response = new Response( - new ReadableStream({ - start(controller) { - streamController = controller - controller.enqueue(encoder.encode(firstChunk)) - }, - cancel(reason) { - closed = true - cancelReasons.push(reason) - }, - }), - { - headers: { - 'Content-Type': contentType, - }, - }, - ) - - return { - response: withResponseUrl(response, url), - cancelReasons, - close: () => { - if (closed) return - closed = true - try { - streamController?.close() - } catch { - // The test may already have cancelled the stream. - } - }, - } -} - -type ShimStream = AsyncIterable> & { - controller: AbortController -} - -type StreamDrainOutcome = - | { status: 'completed'; events: Array> } - | { - status: 'rejected' - events: Array> - error: unknown - } - -async function waitForPromise( - promise: Promise, - timeoutMs: number, - message: string, -): Promise { - let timer: ReturnType | undefined - try { - return await Promise.race([ - promise, - new Promise((_, reject) => { - timer = setTimeout(() => reject(new Error(message)), timeoutMs) - }), - ]) - } finally { - if (timer !== undefined) { - clearTimeout(timer) - } - } -} - -async function expectAbortStopsStream({ - abort, - cancelReasons, - expectedEventsBeforeAbort, - label, - stream, -}: { - abort: () => void - cancelReasons: unknown[] - expectedEventsBeforeAbort: number - label: string - stream: ShimStream -}): Promise { - const events: Array> = [] - let resolveReady!: () => void - const ready = new Promise(resolve => { - resolveReady = resolve - }) - - const drain = (async (): Promise => { - try { - for await (const event of stream) { - events.push(event) - if (events.length >= expectedEventsBeforeAbort) { - resolveReady() - } - } - return { status: 'completed', events } - } catch (error) { - return { status: 'rejected', events, error } - } - })() - - await waitForPromise( - ready, - 500, - `${label} did not produce initial stream events`, - ) - // Let the for-await loop ask the stream reader for the next chunk, so the - // abort has to wake a real pending read rather than only flipping a flag. - await Promise.resolve() - await Promise.resolve() - - abort() - - const outcome = await waitForPromise( - drain, - 500, - `${label} did not stop promptly after abort`, - ) - expect(cancelReasons).toHaveLength(1) - expect(outcome.status).toBe('rejected') - if (outcome.status === 'rejected') { - expect((outcome.error as { name?: unknown }).name).toBe('AbortError') - } - return outcome -} - -async function expectPausedAbortCancelsStream({ - cancelReasons, - label, - stream, -}: { - cancelReasons: unknown[] - label: string - stream: ShimStream -}): Promise>> { - const iterator = stream[Symbol.asyncIterator]() - const first = await waitForPromise( - iterator.next(), - 500, - `${label} did not produce first stream event`, - ) - expect(first.done).toBe(false) - - stream.controller.abort() - await waitForPromise( - (async () => { - for (let i = 0; i < 10; i++) { - if (cancelReasons.length > 0) return - await Promise.resolve() - } - throw new Error(`${label} did not cancel source on controller abort`) - })(), - 500, - `${label} did not cancel source on controller abort`, - ) - - const returned = await waitForPromise( - Promise.resolve(iterator.return?.()), - 500, - `${label} did not return promptly after abort while paused`, - ) - expect(cancelReasons).toHaveLength(1) - return returned as IteratorResult> -} - -async function expectBufferedAbortRejectsNext({ - expectedText, - label, - stream, -}: { - expectedText?: string - label: string - stream: ShimStream -}): Promise { - const iterator = stream[Symbol.asyncIterator]() - - try { - let firstDelta: Record | undefined - for (let i = 0; i < 5; i++) { - const next = await waitForPromise( - iterator.next(), - 500, - `${label} did not produce expected pre-abort events`, - ) - expect(next.done).toBe(false) - if (next.value?.type === 'content_block_delta') { - firstDelta = next.value - break - } - } - - expect(firstDelta).toBeDefined() - if (expectedText !== undefined) { - expect((firstDelta as { delta?: { text?: string } }).delta?.text).toBe(expectedText) - } - - stream.controller.abort() - const afterAbort = await waitForPromise( - iterator.next().then( - value => ({ status: 'resolved' as const, value }), - error => ({ status: 'rejected' as const, error }), - ), - 500, - `${label} did not stop after abort`, - ) - - if (afterAbort.status !== 'rejected') { - throw new Error(`${label} yielded after abort: ${JSON.stringify(afterAbort.value)}`) - } - expect((afterAbort.error as { name?: unknown }).name).toBe('AbortError') - } finally { - await Promise.resolve(iterator.return?.()).catch(() => {}) - } -} - -function makeOpenAIStreamFrame( - delta: Record, - finishReason: string | null = null, -): string { - return `data: ${JSON.stringify({ - id: 'chatcmpl-abort-test', - object: 'chat.completion.chunk', - created: 1_780_000_000, - model: 'test-model', - choices: [{ index: 0, delta, finish_reason: finishReason }], - })}\n\n` -} - function makeStreamChunks(chunks: unknown[]): string[] { return [ ...chunks.map(chunk => `data: ${JSON.stringify(chunk)}\n\n`), @@ -374,25 +123,6 @@ function importFreshOpenAIShim( return import(`../openaiShim.ts?${cacheKey}`) } -type StreamIdleTestApi = { - StreamIdleTimeoutError: new (timeoutMs: number) => Error - getStreamIdleTimeoutMs: () => number - readWithIdleTimeout: ( - reader: ReadableStreamDefaultReader, - timeoutMs: number, - options?: { signal?: AbortSignal; onTimeout?: () => void }, - ) => Promise['read']>>> -} - -async function getStreamIdleTestApi(cacheKey: string): Promise { - const mod = await importFreshOpenAIShim(cacheKey) - const testApi = mod.__test as unknown as Partial - expect(typeof testApi.StreamIdleTimeoutError).toBe('function') - expect(typeof testApi.getStreamIdleTimeoutMs).toBe('function') - expect(typeof testApi.readWithIdleTimeout).toBe('function') - return testApi as StreamIdleTestApi -} - function makeChatCompletionResponse(model: string): Response { return new Response( JSON.stringify({ diff --git a/src/services/api/openaiShim/requestExecutor.ts b/src/services/api/openaiShim/requestExecutor.ts index d2cc77b44..bba0788a6 100644 --- a/src/services/api/openaiShim/requestExecutor.ts +++ b/src/services/api/openaiShim/requestExecutor.ts @@ -229,7 +229,6 @@ export async function executeOpenAIRequest( params, options, requestProcessEnv, - fastPath, shimConfig, runtimeShimContext, body, diff --git a/src/services/compact/compact.test.ts b/src/services/compact/compact.test.ts index 668be0125..df67f06f6 100644 --- a/src/services/compact/compact.test.ts +++ b/src/services/compact/compact.test.ts @@ -1,7 +1,6 @@ import { afterAll, afterEach, - beforeAll, beforeEach, describe, expect, @@ -20,7 +19,6 @@ import { releaseSharedMutationLock, } from '../../test/sharedMutationLock.js' import type { Message } from '../../types/message.js' -import * as realConfig from '../../utils/config.js' import { __getInterruptionTraceSnapshotForTests, __resetInterruptionTraceForTests, diff --git a/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.test.ts b/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.test.ts index 3bc6db67e..a7c83120d 100644 --- a/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.test.ts +++ b/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.test.ts @@ -67,20 +67,6 @@ afterAll(async () => { } }) -function makeCtx() { - const toolPermissionContext = getEmptyToolPermissionContext() - return { - abortController: new AbortController(), - agentId: undefined, - options: { isNonInteractiveSession: false, tools: [] }, - getAppState: () => ({ toolPermissionContext } as never), - setAppState: () => undefined, - setToolJSX: undefined, - toolUseId: 'test-exit-plan-mode', - addNotification: undefined, - } as never -} - test('surfaces write error when plan file write fails and asserts no side effects (standard)', async () => { const persistFileSnapshotIfRemoteMock = mock(() => Promise.resolve()) const unwritablePlanPath = makeUnwritablePlanPath() diff --git a/src/tools/WebSearchTool/providers/exa.ts b/src/tools/WebSearchTool/providers/exa.ts index 127d84eb5..175beb1da 100644 --- a/src/tools/WebSearchTool/providers/exa.ts +++ b/src/tools/WebSearchTool/providers/exa.ts @@ -28,7 +28,7 @@ import { isEnvDefinedFalsy } from '../../../utils/envUtils.js' import type { SearchInput, SearchProvider } from './types.js' -import { applyDomainFilters, safeHostname, type ProviderOutput } from './types.js' +import { safeHostname, type ProviderOutput } from './types.js' import { fetchJsonWithWebSearchTimeout } from './timeout.js' export const DEFAULT_EXA_NUM_RESULTS = 15 diff --git a/src/utils/conversationArc.ts b/src/utils/conversationArc.ts index 63dc3f161..ea158b127 100644 --- a/src/utils/conversationArc.ts +++ b/src/utils/conversationArc.ts @@ -17,7 +17,6 @@ import { rebuildIndex, clearIndex, } from '../memdir/vectorIndex.js' -import { extractKeywords } from './knowledgeGraph.js' import { isMemoryWriteApprovalRequired } from './governancePolicy.js' import { sanitizeMemoryIdentifier, sanitizeMemoryText } from '../memdir/memorySecurity.js' diff --git a/src/utils/knowledgeGraph.ts b/src/utils/knowledgeGraph.ts index 12543ef76..a186307b5 100644 --- a/src/utils/knowledgeGraph.ts +++ b/src/utils/knowledgeGraph.ts @@ -8,7 +8,7 @@ */ import { readFileSync, existsSync, readdirSync, rmSync, mkdirSync, writeFileSync, statSync } from 'fs' -import { join, basename } from 'path' +import { join } from 'path' import { getAutoMemPath } from '../memdir/paths.js' import { searchMemdirIndex, clearIndex, getIndexPath, getIndexMetaPath } from '../memdir/vectorIndex.js' import { parseFrontmatter } from './frontmatterParser.js' diff --git a/src/utils/providerValidation.test.ts b/src/utils/providerValidation.test.ts index 18a6df412..4823933bc 100644 --- a/src/utils/providerValidation.test.ts +++ b/src/utils/providerValidation.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeAll, beforeEach, expect, test } from 'bun:test' import { applyAgentProviderOverrideToEnv } from '../services/api/agentRouting.js' -import { ensureIntegrationsLoaded, getAllGateways } from '../integrations/index.js' +import { ensureIntegrationsLoaded } from '../integrations/index.js' import { acquireSharedMutationLock, releaseSharedMutationLock, diff --git a/src/utils/sessionStorage.ts b/src/utils/sessionStorage.ts index d7020414e..debd900ad 100644 --- a/src/utils/sessionStorage.ts +++ b/src/utils/sessionStorage.ts @@ -79,7 +79,7 @@ import { updateSessionName } from './concurrentSessions.js' import { getCwd } from './cwd.js' import { logForDebugging } from './debug.js' import { logForDiagnosticsNoPII } from './diagLogs.js' -import { getClaudeConfigHomeDir, getProjectsDir, isEnvTruthy } from './envUtils.js' +import { getProjectsDir, isEnvTruthy } from './envUtils.js' import { getErrnoCode, isFsInaccessible } from './errors.js' import { getTaskOutputPath } from './task/diskOutput.js' import type { FileHistorySnapshot } from './fileHistory.js' @@ -88,7 +88,6 @@ import { getFsImplementation } from './fsOperations.js' import { getWorktreePaths } from './getWorktreePaths.js' import { getBranch } from './git.js' import { gracefulShutdownSync, isShuttingDown } from './gracefulShutdown.js' -import { parseJSONL } from './json.js' import { logError } from './log.js' import { extractTag,