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:
程序员阿江(Relakkes)
2026-08-04 20:42:27 +08:00
parent a5fe04a485
commit bde985d202
17 changed files with 9 additions and 28 deletions
+1 -1
View File
@@ -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'