Skip to content

Conversation

@LeoAnders
Copy link
Collaborator

Refactor: CCS structure

Summary

This PR reorganizes the CCS module to improve clarity, scalability, and maintainability.

Changes

  • Moved CCS-related code into a dedicated src/ccs/ folder.
  • Introduced clear separation of concerns:
    • config/ → settings reader and schema docs
    • core/ → HTTP client, logging, shared types
    • sourcecontrol/ → REST API clients and routes
    • commands/ → editor commands (e.g., Go to Definition, Context Help)
  • Added barrel index.ts to expose the public CCS surface.

Motivation

  • Centralize all CCS-specific logic under one module.
  • Provide a foundation for adding new endpoints/features without mixing concerns.
  • Make onboarding easier by having a documented schema and consistent layout.

- Introduced ContextExpressionClient to encapsulate API calls for \/resolveContextExpression\, applying settings, timeout and logging
- Updated contextHelp.ts to consume the new client instead of creating SourceControlApi manually
- Added routes.ts with BASE_PATH and resolveContextExpression route
- Updated extension.ts to import CCS commands/providers from barrel
- Adapted SourceControlApi client to use centralized routes (only resolveContextExpression for now)
@LeoAnders LeoAnders added the enhancement New feature or request label Sep 29, 2025
@LeoAnders LeoAnders merged commit f810825 into prerelease Sep 29, 2025
3 checks passed
@LeoAnders LeoAnders deleted the ccs-structure branch September 29, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants