-
-
Notifications
You must be signed in to change notification settings - Fork 724
refactor(vscode): introduce ToolInterface
#15974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(vscode): introduce ToolInterface
#15974
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
559d637 to
4fd88d7
Compare
d006a1c to
c4aa9fc
Compare
4fd88d7 to
3a1d4a9
Compare
c4aa9fc to
eff297e
Compare
193ae0b to
3455e6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the VSCode extension's linter functionality by introducing a ToolInterface abstraction. The refactoring moves from function-based exports to a class-based architecture, preparing the codebase for supporting multiple tools (e.g., linter and formatter) with a consistent interface.
Key Changes:
- Introduced
ToolInterfaceas a generic interface for extension tools - Refactored procedural linter code into a
LinterToolclass implementingToolInterface - Moved helper functions to a dedicated
tools/directory structure - Updated imports across the codebase to reflect the new file structure
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| editors/vscode/client/tools/ToolInterface.ts | New interface defining the contract for extension tools (activate, deactivate, toggleClient, restartClient, onConfigChange) |
| editors/vscode/client/tools/linter.ts | Refactored linter functionality from procedural functions to a LinterTool class implementing ToolInterface |
| editors/vscode/client/tools/lsp_helper.ts | Moved LSP helper functions (runExecutable, onClientNotification) to the tools directory |
| editors/vscode/client/linter.ts | Removed (functionality moved to tools/linter.ts) |
| editors/vscode/client/extension.ts | Updated to instantiate and use the new LinterTool class instead of importing individual functions |
| editors/vscode/tests/lsp_helper.spec.ts | Updated import path to reference the new location of lsp_helper |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3455e6c to
6792d16
Compare
Merge activity
|
> This PR refactors the VSCode extension's linter functionality by introducing a ToolInterface abstraction. The refactoring moves from function-based exports to a class-based architecture, preparing the codebase for supporting multiple tools (e.g., linter and formatter) with a consistent interface.
6792d16 to
e8aa84a
Compare

Uh oh!
There was an error while loading. Please reload this page.