feat: migrate configuration get to TypeScript#3614
Conversation
Replace the HTTP round-trip to the Go backend for loading a single configuration with an in-process TypeScript implementation. The new FSConfigurationStore reads TOML from disk, validates against the JSON schema, and converts snake_case keys to camelCase — matching the Go API's behavior without the HTTP overhead. New modules: - core/ports.ts: ConfigurationStore interface - core/errors.ts: error factory functions for parse/validation errors - core/conversion.ts: recursive snake_case→camelCase key converter - adapters/fs-configuration-store.ts: filesystem implementation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude's self review: ⏺ Here's my review. Three things I'd flag:
Everything else looks solid for the stated scope. The core/adapters split is clean, the workspace root injection we fixed is the right pattern, and the test coverage is thorough. The change to state.ts is minimal — it swaps one call and |
|
An interesting wrinkle that this caught: the Go subprocess has knowledge of the workspace baseDir because it is passed in at startup: publisher/extensions/vscode/src/servers.ts Lines 46 to 50 in 4850c4e That base dir is passed along to lots of the Go API handlers: So that will be a common requirement for a lot of our TypeScript replacements. |
Replace the HTTP round-trip to the Go backend for loading a single configuration with an in-process TypeScript implementation. The new FSConfigurationStore reads TOML from disk, validates against the JSON schema, and converts snake_case keys to camelCase — matching the Go API's behavior without the HTTP overhead.
New modules: