Skip to content

Conversation

@code-crusher
Copy link
Member

  • minor patch in line diff counter logic
  • minor update to system prompt for long running cmd tool

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Jan 21, 2026

Description

Summary By MatterAI MatterAI logo

🔄 What Changed

Integrated the myersDiff algorithm to replace manual line counting for file edits in webviewMessageHandler.ts and FileEditReviewController.ts. Updated the system prompt to include a critical instruction regarding long-running CLI processes. Bumped version to 5.2.6.

🔍 Impact of the Change

Provides users with accurate addition/deletion metrics during code reviews. Improves AI reliability by preventing unintended execution of blocking CLI commands, enhancing the overall user experience and system stability.

📁 Total Files Changed

Click to Expand
File ChangeLog
Prompt Update src/core/prompts/system.ts Added safety instructions for long-running CLI commands.
Diff Logic src/core/webview/webviewMessageHandler.ts Replaced manual stats logic with myersDiff algorithm.
Review Stats src/integrations/editor/FileEditReviewController.ts Switched to myersDiff for precise line change tracking.
Version Bump src/package.json Updated extension version to 5.2.6.

🧪 Test Added/Recommended

Recommended

  • Unit tests for myersDiff integration with various file sizes.
  • Regression tests for CLI command execution prompts.

🔒 Security Vulnerabilities

N/A

Implementation

The PR replaces basic string-based line counting with a robust Myers diff implementation. This allows the system to correctly identify which lines were added versus modified or deleted. The system prompt update acts as a guardrail for the execute_command tool.

Screenshots

before after
N/A N/A

How to Test

  • Trigger a file edit and check the review controller's line stats.
  • Verify the AI's response when asked to run npm start or similar long-running tasks.

Get in Touch

N/A

@code-crusher code-crusher merged commit e52b3c8 into main Jan 21, 2026
4 of 12 checks passed
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Jan 21, 2026

✅ Reviewed the changes: The changes correctly implement myersDiff for more accurate diff statistics in both the webview handler and the review controller. I found a minor issue in the system prompt text that should be corrected.

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