feat(vscode,lsp): real runAgent — extension + LSP server actually run the agent#65
Merged
Conversation
… the agent
VS Code extension:
· deepcode.run on selection: composes prompt + selection → runAgent →
streams text + tool events into a "DeepCode" output channel.
· deepcode.review: runs code-review-style prompt on the workspace
folder's git diff. Same output channel.
· ChatViewProvider webview chat: real bidirectional streaming.
User types → runAgent → text_delta events pipe back into the
webview as growing assistant message. Tool calls render inline.
LSP server:
· handleRunAgent now spawns @deepcode/core's runAgent in-process.
Loads credentials via CredentialsStore (same as CLI). On success,
streams every AgentEvent as a deepcode/agentEvent JSON-RPC
notification keyed by turnId. On failure, sends an 'error' event +
'turn_done' with stopReason 'error' so the client gets clean
termination signal.
· handler.test.ts updated to poll for turn_done instead of expecting
the prior placeholder events.
Tests: 549 still passing (core 478 + cli 47 + lsp 8 + scripts 16).
LSP test now runs the real agent and hits the no-credentials error
path cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both VS Code extension and LSP server now invoke @deepcode/core's runAgent. VS Code: output channel + webview chat with streaming. LSP: agent events fan out as JSON-RPC notifications. 549 tests still passing.