Skip to content

Conversation

jruales
Copy link
Contributor

@jruales jruales commented Oct 7, 2025

Fix for issues appearing in microsoft/vscode#269351 (comment).

  1. Fixes the issue where some of the text was missing from after each codeblock returned by the @vscode participant
  2. Fixes the issue where non-JSON code blocks were disappearing

Also cleans up unused properties showCodeBlock and codeBlock

@jruales jruales changed the title Fix missing text after code blocks in @vscode responses Fix missing text after code blocks and missing code blocks, in @vscode responses Oct 8, 2025
@jruales jruales requested a review from bhavyaus October 8, 2025 23:04
@bhavyaus
Copy link
Contributor

bhavyaus commented Oct 8, 2025

LGTM. Thanks!

bhavyaus
bhavyaus previously approved these changes Oct 8, 2025
@jruales jruales marked this pull request as ready for review October 9, 2025 01:24
@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 01:24
Copy link
Contributor

@Copilot 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 fixes two critical issues with the @vscode participant's response processing: missing text after code blocks and disappearing non-JSON code blocks. The fix ensures that all text content is properly displayed to users and that non-JSON code blocks are shown rather than being processed for settings/commands.

  • Refactors the code block processing logic to properly handle text before and after code blocks
  • Updates the parsing logic to skip non-JSON code blocks instead of trying to process them
  • Removes unused properties from the VSCodeParticipantMetadata interface

Reviewed Changes

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

File Description
src/extension/intents/node/vscodeIntent.ts Refactors processNonReporting method and applyDelta method to properly handle text surrounding code blocks and ensure all content is displayed
src/extension/context/node/resolvers/vscodeContext.ts Updates parseSettingsAndCommands function to return empty array for non-JSON blocks and removes unused showCodeBlock and codeBlock properties
src/extension/context/node/resolvers/test/vscodeContext.spec.ts Adds comprehensive test suite covering various scenarios for the updated parsing logic

@jruales jruales enabled auto-merge October 9, 2025 16:19
@jruales jruales added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit 68cb79d Oct 9, 2025
16 checks passed
@jruales jruales deleted the dev/jruales/fix-vscode-participant-extra-chars branch October 9, 2025 18:11
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.

2 participants