diff --git a/adapters/common/__tests__/message-buffer.test.ts b/adapters/common/__tests__/message-buffer.test.ts index 9e8a037b..62d4991c 100644 --- a/adapters/common/__tests__/message-buffer.test.ts +++ b/adapters/common/__tests__/message-buffer.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, beforeEach } from 'bun:test' +import { describe, it, expect } from 'bun:test' import { MessageBuffer } from '../message-buffer.js' describe('MessageBuffer', () => { diff --git a/adapters/feishu/__tests__/streaming-card.test.ts b/adapters/feishu/__tests__/streaming-card.test.ts index 2cec35df..beaafc4f 100644 --- a/adapters/feishu/__tests__/streaming-card.test.ts +++ b/adapters/feishu/__tests__/streaming-card.test.ts @@ -11,7 +11,7 @@ * - 纯 patch fallback 路径 */ -import { describe, it, expect, beforeEach } from 'bun:test' +import { describe, it, expect } from 'bun:test' import { StreamingCard, buildInitialStreamingCard, diff --git a/adapters/feishu/index.ts b/adapters/feishu/index.ts index e332cc8b..566fe338 100644 --- a/adapters/feishu/index.ts +++ b/adapters/feishu/index.ts @@ -9,7 +9,6 @@ import * as Lark from '@larksuiteoapi/node-sdk' import * as path from 'node:path' -import * as fs from 'node:fs/promises' import { WsBridge, type ServerMessage, type AttachmentRef } from '../common/ws-bridge.js' import { MessageDedup } from '../common/message-dedup.js' import { StreamingCard } from './streaming-card.js' @@ -19,7 +18,6 @@ import { formatImHelp, formatImStatus, formatPermissionRequest, - splitMessage, } from '../common/format.js' import { formatPermissionDecisionStatus, @@ -31,7 +29,6 @@ import { SessionStore } from '../common/session-store.js' import { AdapterHttpClient, type RecentProject } from '../common/http-client.js' import { restoreStoredSessionBinding } from '../common/session-recovery.js' import { isAllowedUser, tryPair } from '../common/pairing.js' -import { optimizeMarkdownForFeishu } from './markdown-style.js' import { extractInboundPayload } from './extract-payload.js' import { FeishuMediaService } from './media.js' import { AttachmentStore } from '../common/attachment/attachment-store.js' diff --git a/adapters/telegram/__tests__/telegram.test.ts b/adapters/telegram/__tests__/telegram.test.ts index 16b97ec8..2b3f949c 100644 --- a/adapters/telegram/__tests__/telegram.test.ts +++ b/adapters/telegram/__tests__/telegram.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'bun:test' -import { splitMessage, formatPermissionRequest, truncateInput, escapeMarkdownV2 } from '../../common/format.js' +import { splitMessage, formatPermissionRequest, escapeMarkdownV2 } from '../../common/format.js' import { parsePermitCallbackData } from '../../common/permission.js' import { buildTelegramThinkingUpdate, diff --git a/adapters/whatsapp/index.ts b/adapters/whatsapp/index.ts index 47795e4b..42e7ece6 100644 --- a/adapters/whatsapp/index.ts +++ b/adapters/whatsapp/index.ts @@ -5,7 +5,6 @@ * then run: bun run whatsapp */ -import * as fs from 'node:fs/promises' import * as path from 'node:path' import { normalizeMessageContent, diff --git a/src/hooks/useMergedTools.ts b/src/hooks/useMergedTools.ts index 48b1deec..368db61f 100644 --- a/src/hooks/useMergedTools.ts +++ b/src/hooks/useMergedTools.ts @@ -2,7 +2,6 @@ import { useMemo } from 'react' import type { Tools, ToolPermissionContext } from '../Tool.js' import { assembleToolPool } from '../tools.js' -import { useAppState } from '../state/AppState.js' import { mergeAndFilterTools } from '../utils/toolPool.js' /** diff --git a/src/query.ts b/src/query.ts index b615aab2..a4badea9 100644 --- a/src/query.ts +++ b/src/query.ts @@ -107,7 +107,6 @@ import type { Terminal, Continue } from './query/transitions.js' import { feature } from 'bun:bundle' import { getCurrentTurnTokenBudget, - getSessionId, getTurnOutputTokens, incrementBudgetContinuationCount, } from './bootstrap/state.js' diff --git a/src/server/__tests__/cron-scheduler.test.ts b/src/server/__tests__/cron-scheduler.test.ts index 4662fb05..70ded18b 100644 --- a/src/server/__tests__/cron-scheduler.test.ts +++ b/src/server/__tests__/cron-scheduler.test.ts @@ -2,7 +2,7 @@ * Tests for CronScheduler — cron matching, task execution, log storage, and API endpoints */ -import { describe, it, expect, beforeEach, afterEach, mock, spyOn } from 'bun:test' +import { describe, it, expect, beforeEach, afterEach } from 'bun:test' import { Database } from 'bun:sqlite' import * as fs from 'fs/promises' import * as path from 'path' @@ -14,7 +14,7 @@ import { CronScheduler, type TaskRun, } from '../services/cronScheduler.js' -import { CronService, type CronTask } from '../services/cronService.js' +import { CronService } from '../services/cronService.js' import { resetScheduledRunReadModelForTests } from '../services/localIndex/scheduledRunReadModel.js' // ─── Test helpers ─────────────────────────────────────────────────────────── diff --git a/src/server/__tests__/team-watcher.test.ts b/src/server/__tests__/team-watcher.test.ts index 9cc6949e..4a519452 100644 --- a/src/server/__tests__/team-watcher.test.ts +++ b/src/server/__tests__/team-watcher.test.ts @@ -4,10 +4,8 @@ import { describe, it, expect, beforeEach, afterEach, mock } from 'bun:test' import * as fs from 'node:fs/promises' -import * as fsSyn from 'node:fs' import * as path from 'node:path' import * as os from 'node:os' -import type { TeamMemberStatus } from '../ws/events.js' // ============================================================================ // Test helpers diff --git a/src/server/api/__tests__/localFile.test.ts b/src/server/api/__tests__/localFile.test.ts index 8e17a49a..667a2459 100644 --- a/src/server/api/__tests__/localFile.test.ts +++ b/src/server/api/__tests__/localFile.test.ts @@ -7,7 +7,7 @@ import { symlinkSync, writeFileSync, } from 'node:fs' -import { tmpdir, homedir } from 'node:os' +import { homedir } from 'node:os' import * as path from 'node:path' import { handleLocalFile, reconstructAbsolutePath } from '../localFile' import { isAllowedFilesystemPath } from '../filesystem' diff --git a/src/server/api/mcp.ts b/src/server/api/mcp.ts index 69012f33..8d49ed83 100644 --- a/src/server/api/mcp.ts +++ b/src/server/api/mcp.ts @@ -12,7 +12,6 @@ import { addMcpConfig, findProjectMcpConfigPath, getAllMcpConfigs, - getClaudeCodeMcpConfigs, getMcpConfigByName, isMcpServerDisabled, projectDirDeclaresMcpServers, diff --git a/src/server/services/localIndex/reconciliationWatcher.ts b/src/server/services/localIndex/reconciliationWatcher.ts index a5399892..4debc6bf 100644 --- a/src/server/services/localIndex/reconciliationWatcher.ts +++ b/src/server/services/localIndex/reconciliationWatcher.ts @@ -1,6 +1,6 @@ import { watch, type FSWatcher } from 'node:fs' import { readdir, stat } from 'node:fs/promises' -import { basename, dirname, join, relative, resolve, sep } from 'node:path' +import { dirname, join, relative, resolve, sep } from 'node:path' export type ReconciliationBatch = { paths: string[] diff --git a/src/server/services/localIndex/sessionProjector.ts b/src/server/services/localIndex/sessionProjector.ts index d70e1ff1..aa41d1ab 100644 --- a/src/server/services/localIndex/sessionProjector.ts +++ b/src/server/services/localIndex/sessionProjector.ts @@ -24,7 +24,6 @@ import { reduceTranscriptWithLocators, } from './transcriptReducer.js' import type { - SessionListSummary, TranscriptChunk, TranscriptEntryLocator, TranscriptProjection, diff --git a/src/server/services/providerService.ts b/src/server/services/providerService.ts index c375889c..de673577 100644 --- a/src/server/services/providerService.ts +++ b/src/server/services/providerService.ts @@ -16,7 +16,7 @@ import { anthropicToOpenaiChat } from '../proxy/transform/anthropicToOpenaiChat. import { anthropicToOpenaiResponses } from '../proxy/transform/anthropicToOpenaiResponses.js' import { openaiChatToAnthropic } from '../proxy/transform/openaiChatToAnthropic.js' import { openaiResponsesToAnthropic } from '../proxy/transform/openaiResponsesToAnthropic.js' -import type { AnthropicRequest, AnthropicResponse } from '../proxy/transform/types.js' +import type { AnthropicRequest } from '../proxy/transform/types.js' import { OPENAI_OFFICIAL_PROVIDER, isOpenAIOfficialProviderId, diff --git a/src/services/mcp/config.ts b/src/services/mcp/config.ts index ebe83b65..04855f32 100644 --- a/src/services/mcp/config.ts +++ b/src/services/mcp/config.ts @@ -1,4 +1,3 @@ -import { feature } from 'bun:bundle' import { chmod, open, rename, stat, unlink } from 'fs/promises' import mapValues from 'lodash-es/mapValues.js' import memoize from 'lodash-es/memoize.js' diff --git a/src/utils/attachments.ts b/src/utils/attachments.ts index 556defeb..953e0a32 100644 --- a/src/utils/attachments.ts +++ b/src/utils/attachments.ts @@ -37,9 +37,7 @@ import { import { getPlanFilePath, getPlan } from './plans.js' import { getConnectedIdeName } from './ide.js' import { - filterInjectedMemoryFiles, getManagedAndUserConditionalRules, - getMemoryFiles, getMemoryFilesForNestedDirectory, getConditionalRulesForCwdLevelDirectory, type MemoryFileInfo, @@ -72,12 +70,6 @@ import type { } from '@anthropic-ai/sdk/resources/messages.mjs' import { maybeResizeAndDownsampleImageBlock } from './imageResizer.js' import type { PastedContent } from './config.js' -import { getGlobalConfig } from './config.js' -import { - getDefaultSonnetModel, - getDefaultHaikuModel, - getDefaultOpusModel, -} from './model/model.js' import type { ReadResourceResult } from '@modelcontextprotocol/sdk/types.js' import { getSkillToolCommands, getMcpSkillCommands } from '../commands.js' import type { Command } from '../types/command.js' diff --git a/src/utils/stats.ts b/src/utils/stats.ts index 785eca4a..01ac42cf 100644 --- a/src/utils/stats.ts +++ b/src/utils/stats.ts @@ -1,6 +1,6 @@ import { feature } from 'bun:bundle' import { open } from 'fs/promises' -import { basename, dirname, join, sep } from 'path' +import { basename, join, sep } from 'path' import type { ModelUsage } from 'src/entrypoints/agentSdkTypes.js' import type { Entry, TranscriptMessage } from '../types/logs.js' import { logForDebugging } from './debug.js'