Skip to content

Conversation

EamonNerbonne
Copy link
Contributor

@EamonNerbonne EamonNerbonne commented Oct 17, 2025

Delete a bunch more stuff manually
Removed the following unused features and stubs:
- quickEdit/ directory (EditDecorationManager stub - 5 lines)
- stubs/ directory (SecretStorage stub - 12 lines)
- suggestions.ts (visual diff UI system - 373 lines)
- editLoggingUtils.ts stub and its usage in VsCodeExtension.ts

These features are not related to autocomplete, NextEdit, or tree-sitter functionality.

All removals include:
- Implementation files deleted
- Related imports removed from ideUtils.ts and VsCodeExtension.ts
- Usage of handleTextDocumentChange removed from VsCodeExtension.ts

Verified with:
- npm run typecheck: passes
- npm test: all 778 tests pass
@EamonNerbonne EamonNerbonne marked this pull request as ready for review October 18, 2025 13:51
@EamonNerbonne EamonNerbonne changed the title Initial steps to merge some of continue into kilo Initial merge of some parts of continue into kilo Oct 18, 2025
@EamonNerbonne
Copy link
Contributor Author

EamonNerbonne commented Oct 20, 2025

I had the AI collect merge and risk-analysis on the process of integration, and it came up with this, which isn't bad (well, I told it to do that 20 times, and to actually dig into the commits, and THEN to synthesize something, and then it finally came up with something actually usable rather than a tiny irrelevant sampling):


ContinueDev Integration: Synthesized Review Summary (for Maintainers)

Audience and intent: maintainer-focused synthesis based primarily on git log --no-merges --author='eamon@nerbonne.org' --pretty=format:'%H %aI %s%n' --name-status -M -C 2ea036bb4440a5e05a2dcb98d0372add4cd20b32^..f208a48579b36c58f5ed5577c2908d9443f11e64. Objective data is presented to inform decisions; no merge verdict is issued here.

Period: Oct 9–20, 2025. Scope: extract Continue OSS autocomplete + NextEdit and integrate into Kilocode monorepo.

Executive summary (short)

  • Tests: 857 passing (up from 532), Vitest only.
  • Integration model: pure TypeScript source under services/continuedev.
  • Dependencies added (audit): 5 total (runtime 4, dev 1). See Dependency Impact.
  • Codebase size: reduction framed two ways; see Data reconciliation notes.
  • Highest technical risk: tree-sitter upgrade 0.21 → 0.25 with pervasive null-handling; extensive tests added.
  • Native build sensitivity: sqlite3 optional; graceful degradation in absence of native build.
  1. Architectural outcome
  1. Dependency impact and version alignments
  • Added (per audit):
    • js-tiktoken (runtime) for token counting.
    • quick-lru (runtime) for in-memory caches; used in openedFilesLruCache.ts
    • sqlite + sqlite3 (runtime) for persistent completion cache; see AutocompleteLruCache.ts
    • myers-diff (dev) for test validation of streaming diff.
  • Reused from workspace (not added): LLM SDKs (@anthropic-ai/sdk, @aws-sdk/*, @google/genai, openai), tree-sitter-wasms, web-tree-sitter, diff 7.x, zod, etc.
  • Version alignments:
    • web-tree-sitter 0.21 → 0.25.6; commit 09e90f5.
    • diff 5.x → 7.0.0; commit 6fe118d.
    • pnpm workspace onlyBuiltDependencies adds sqlite3 to permit native builds in CI; commit ac5153a.
  • Optional native dependency policy:
    • sqlite3 marked optional; fallback path executes without persistence (more LLM calls).
  1. Process and test safety
  • Extraction performed in eight phases with test invariants; 49 plan/analysis docs retained under legacy_code_rewrite.
  • Test framework migration to Vitest:
    • API translation: jest.mock → vi.mock; uniform suffix .test.ts; commit 9509f31.
    • Test runners chained in src/vitest.config.ts; continuedev setup loaded via ./services/continuedev/core/test.
  • Post-integration validations:
    • cd src && npx vitest run → all tests pass.
  • TypeScript compile clean; ESLint clean; fixtures protected via ignore patterns in src/.prettierignore and src/eslint.config.mjs.
  • Import path mapping removed in tests to ensure runtime resolution correctness; commits 3bc1bbd and eaabd59. Paths updated to explicit relatives.
  1. Critical risk inventory (maintainer-facing)
  • Tree-sitter upgrade (highest technical risk)
  • sqlite3 native build (medium)
    • Risk: installation failures on some platforms. Mitigation: optional dep; CI config via onlyBuiltDependencies; graceful runtime fallback.
    • Monitoring signal: CI install logs, post-install warnings; relative cache hit rate vs. expected.
  • Import path resolution (low)
    • Risk: unresolved module errors if path mapping sneaks back in. Safeguard: explicit relatives; TypeScript checks catch misses.
  • Configuration limitations (medium)
    • Minimal runtime configurability retained; some docs reference full ConfigHandler; for this integration expect code-level changes for configuration until a minimal runtime layer is reintroduced.
  1. Test coverage quality
  • Totals: 857 tests in 46 files.
  • Breakdown (approximate):
    • Autocomplete: ~400
    • NextEdit: ~210
    • Infrastructure (diff, tree-sitter, security, caches): ~161
    • VSCode harness integration: 86
  • Strengths:
    • Real parsing via tree-sitter grammars, not mocks.
    • Streaming diff validated against myers-diff reference (dev dep).
    • Cross-language fixtures and acceptance behaviors.
  • Gaps to note:
    • LLM provider APIs mocked; provider-side API changes could slip.
    • Limited failure/timeout simulation in streaming paths.
    • No load or perf testing captured in-suite.
  1. Monorepo integration state
  1. Challenging technical problems (evidence-driven)
  • Tree-sitter null-handling refactor (commit 09e90f5); required cross-cutting changes and test updates.
  • Fixture auto-format protection; required ignore patterns across Prettier, ESLint, tsconfig and file restorations.
  • Import depth recalculation after package merges; updated 80+ imports; verified in small batches with tests.
  • Package dependency replacements: uuid → crypto.randomUUID, handlebars → template literals, winston → console logging; each change backed by tests.
  1. Operational monitoring considerations (post-integration)
  • Autocomplete quality:
    • Track completion acceptance rate and abandonment; correlate with language/grammar and file sizes.
    • Add transient error logging at key null-check sites in core/util/treeSitter.ts.
  • Build/install health:
    • Surface optional sqlite3 install results in CI dashboards. Watch for spikes in “optional dep not installed”.
  • Performance and caching:
  • Provider integration drift:
    • Periodically validate provider SDKs against live APIs for breaking changes not covered by mocks.
  1. Notable commit references
  • a359bf5: initial move to subdirectory; start of extraction.
  • 4dc49ab: remove nested package.json/lock; full monorepo merge under src/.
  • 09e90f5: tree-sitter upgrade to 0.25.x; null handling changes across codebase.
  • 9509f31: standardize test files to .test.ts.
  • 6fe118d: align diff to 7.0.0.
  • ac5153a: allow sqlite3 native compilation in CI (pnpm onlyBuiltDependencies).
  • 3bc1bbd, eaabd59: remove path aliases; fix mocks to use relatives.
  • 58f0f68, 5b32671: cross-platform line ending and path normalization in diff tests.
  • 32586e0, dfa5686, 1d14119, f37ec2b, 85b3dd2: fixture protection and restorations; add ignore patterns.
  1. Data reconciliation notes (discrepancies across documents)
  • Dependencies added:
    • Audit states 5 (runtime 4, dev 1) and lists reuse of ~45 existing deps.
    • Other summaries count 9–12, often including workspace-wide LLM/analysis packages and tooling upgrades that were already present or later trimmed. For maintainer decisions, prefer the audit’s delta against Kilocode’s pre-existing dependencies.
  • Codebase size reduction:
    • Audit frames integration as 55% reduction (112k → 50k) reflecting removal of non-autocomplete features while keeping a focused library with tests and infra.
  • Executive/Journey docs cite ~99.4% reduction when counting only “core logic” lines (e.g., ~650 lines) and excluding tests, harness, infra; treat this as a different lens. Use the audit’s whole-library view for repo impact.
  • Config system status:
    • Some docs describe hardcoded MinimalConfig; later plans and code retain a fuller config surface in places due to coupling. For this integration, assume “minimal required runtime configuration” with plan to evaluate simplification separately.
  • Path aliases:
    • Some docs illustrate path mappings; final state removes aliases in tests in favor of relatives (see commits above).
  1. Pointers to key source files
  1. Quick validation checklist (maintainers)
  • Verify: cd src && npx vitest run passes locally (all 857).
  • Verify: types compile (pnpm check-types) and lints clean (pnpm lint).
  • Verify: optional sqlite3 handled appropriately in your environment; if not present, verify fallback completes with acceptable latency.
  • Verify: real-world code samples parse successfully across your team’s primary languages (TS/JS, Python, Go, PHP, Java, C++).
  • Verify: no reintroduction of path aliases in tests; ensure imports remain relative.

@EamonNerbonne
Copy link
Contributor Author

To validate size requirements, will close for now.

@EamonNerbonne EamonNerbonne deleted the eamon/cleancont branch October 21, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants