mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 03:43:11 +08:00
chore: drop 27 imports nothing references in src and adapters
Found by widening scripts/pr/dead-imports.ts past src/server/ws once its lexer stopped desyncing. None of these bindings appear anywhere in their own file; several are the tail of a move that left the import behind, and useMergedTools still lists replBridgeEnabled in a dependency array after the useAppState call that set it was stubbed out. Nine statements lost their last binding. Each target was checked for a top-level side effect first: node:fs, node:fs/promises and bun:bundle have none, ws/events.js is a type-only import that never emits, AppState.tsx, model/model.ts and markdown-style.ts declare only, and utils/config.ts does register a cleanup but is imported by 157 other files in src, so attachments.ts dropping it cannot unregister anything. No behavior change intended and none observed: src is 2995 pass / 37 skip / 30 fail across 273 files before and after, with the 30 failures identical test for test, and adapters is 437 pass / 0 fail both times. The 30 are pre-existing and unrelated.
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* - 纯 patch fallback 路径
|
||||
*/
|
||||
|
||||
import { describe, it, expect, beforeEach } from 'bun:test'
|
||||
import { describe, it, expect } from 'bun:test'
|
||||
import {
|
||||
StreamingCard,
|
||||
buildInitialStreamingCard,
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* then run: bun run whatsapp
|
||||
*/
|
||||
|
||||
import * as fs from 'node:fs/promises'
|
||||
import * as path from 'node:path'
|
||||
import {
|
||||
normalizeMessageContent,
|
||||
|
||||
Reference in New Issue
Block a user