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:
Marius
2026-03-09 12:31:20 +01:00
committed by GitHub
parent 7b15e8c738
commit 9d6dca1863
34 changed files with 130 additions and 201 deletions
+4
View File
@@ -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