mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-10-28 02:42:15 +08:00
feat(vscode): add knip dead code detection to agent-manager (#6773)
* feat(vscode): add knip dead code detection to agent-manager
Add knip to the kilo-vscode package to detect and prevent dead code in
the agent-manager. This includes:
- knip.json config scoped to src/agent-manager/ and webview-ui/agent-manager/
- CI pipeline step in test-vscode.yml to run knip on every PR
- Clean up unused exports: narrow interfaces/types to non-exported where
only used locally, remove unused re-exports from FileTree.tsx and
review-comments.ts
* expand knip scope to entire kilo-vscode package
- Widen project scope from agent-manager only to src/**/*.ts and
webview-ui/**/*.{ts,tsx}
- Exclude vendored src/services/autocomplete/** from analysis
- Enable ignoreExportsUsedInFile for component Props patterns
- Delete 4 dead files: legacy-migration barrel/messages, settings
barrel, webview telemetry util
- Trim barrel re-exports in cli-backend, telemetry, browser-automation
to only what consumers actually import through the barrel
- Unexport private helpers: getNonce, joinCspDirectives,
NEW_EXTENSION_IS_STILL_EXPERIMENTAL flag, getVSCodeAPI,
dispatchMockProviders, errorCodes
- Narrow 5 unused exported types to non-exported
This commit is contained in:
@@ -34,3 +34,7 @@ jobs:
|
||||
- name: Run unit tests
|
||||
working-directory: packages/kilo-vscode
|
||||
run: bun run test:unit
|
||||
|
||||
- name: Check for dead code (knip)
|
||||
working-directory: packages/kilo-vscode
|
||||
run: bun run knip
|
||||
|
||||
Reference in New Issue
Block a user