Skip to content

Conversation

@nojaf
Copy link
Member

@nojaf nojaf commented Dec 14, 2025

I would like to wire this up in another editor, so I shuffled some logic to the server to more easily hook it up elsewhere.

Copy link
Contributor

Copilot AI left a 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 "dump server state" command by moving its logic from the client to the server to enable editor-agnostic usage. The refactoring converts a custom client-side command into a standard LSP executeCommand request, with the server handling file writing and opening via the window/showDocument LSP request.

Key changes:

  • Server now handles all dump logic including reading package.json version, formatting state, writing to disk, and opening the file
  • Client command simplified to a single executeCommand request
  • Old client-side dump_server_state.ts file removed entirely

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
server/src/server.ts Added async dumpServerState function, registered executeCommand capability, and added handler for workspace/executeCommand requests
client/src/extension.ts Simplified command handler to send executeCommand request to server instead of handling logic client-side
client/src/commands/dump_server_state.ts Removed entire file as functionality moved to server
client/src/commands.ts Removed export of now-deleted dumpServerState function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nojaf nojaf requested a review from zth December 14, 2025 11:28
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.

1 participant