Skip to content

Release/v5.3.5#49

Merged
code-crusher merged 6 commits intomainfrom
release/v5.3.5
Feb 7, 2026
Merged

Release/v5.3.5#49
code-crusher merged 6 commits intomainfrom
release/v5.3.5

Conversation

@code-crusher
Copy link
Member

No description provided.

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 7, 2026

Code Quality type: new feature

Context

Summary By MatterAI MatterAI logo

🔄 What Changed

This PR finalizes the release of version 5.3.5. It consolidates several major enhancements including native support for AI model reasoning (thinking) fields, pagination for file-reading tools, and UI robustness improvements. The specific change in this patch is the version increment in package.json from the internal development state to the production release.

🔍 Impact of the Change

Users will now have access to the official 5.3.5 features: transparent AI reasoning processes, more efficient file handling via offset/limit parameters, and a more stable chat UI that prevents malformed diff headers. This version bump triggers the deployment pipeline for the updated extension.

📁 Total Files Changed

Click to Expand
File ChangeLog
src/package.json Version Bump: Updated extension version to 5.3.5.
webview-ui/src/components/chat/ChatRow.tsx Diff Guard: Added validation to buildFileEditDiff to return undefined on empty content.
src/api/providers/openrouter.ts Reasoning Support: Logic to capture reasoning from streams.
src/api/transform/openai-format.ts Data Preservation: Preserves reasoning fields during conversion.
src/core/task-persistence/apiMessages.ts Type Update: Added reasoning fields to ApiMessage.
src/core/task/Task.ts Stream Processing: Implemented <think> tag stripping.
src/core/tools/readFileTool.ts Pagination Logic: Integrated offset and limit into results.
src/shared/ExtensionMessage.ts Schema Update: Added pagination fields to interface.

🧪 Test Added/Recommended

Recommended

  • Smoke Test: Verify the extension loads correctly in VS Code with the new version number.
  • Regression: Confirm that reasoning blocks from DeepSeek/OpenRouter still render correctly.
  • Pagination: Validate that readFile still respects line range boundaries.

🔒 Security Vulnerabilities

N/A

Implementation

The release is finalized by updating the version field in package.json. This follows the implementation of reasoning capture logic in the API providers and the addition of guard clauses in the React components to handle empty file edits gracefully.

Screenshots

before after
N/A N/A

How to Test

  1. Install the generated VSIX for version 5.3.5.
  2. Verify the version in the Extensions view.
  3. Trigger a reasoning-capable model to ensure the UI displays the thought process.
  4. Use the file read tool to ensure pagination parameters are passed correctly.

Get in Touch

Axon Code Discord: @matterai_agent

⏳ Estimated code review effort

LOW (~5 minutes)

Tip

Quality Recommendations

  1. Ensure the CHANGELOG.md is updated to match the 5.3.5 version bump

  2. Verify that the production build correctly bundles the updated webview-ui assets

♫ Tanka Poem

The version is set, 🚀
Reasoning flows through the stream, 🧠
Logic now refined.
Data paginated with care, 📊
The release is ready now. ✨

Sequence Diagram

sequenceDiagram
    participant VSCode as VS Code Extension
    participant API as AI Provider (OpenRouter)
    participant UI as Webview UI
    
    VSCode->>API: Request with Reasoning Support
    API-->>VSCode: Stream (Reasoning + Content)
    Note over VSCode: Strip <think> tags & Update State
    VSCode->>UI: Post Message (ApiMessage with Reasoning)
    UI->>UI: buildFileEditDiff(check empty content)
    UI-->>VSCode: Render ChatRow
Loading

Copy link
Contributor

@matter-ai-bot matter-ai-bot bot left a comment

Choose a reason for hiding this comment

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

🧪 PR Review is completed: The PR introduces support for reasoning fields and improves UI for file offsets. However, there are critical issues: debug code left in production (memory leak risk) and a potential UI crash due to unsafe optional chaining. Also found redundant regex logic.

let fullReasoning = "" // kilocode_change: variable kept for structural integrity if needed, but unused logs removed

let isThinking = false
const _allRawChunks: any[] = [] // DEBUG: collect all chunks
Copy link
Contributor

Choose a reason for hiding this comment

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

🟡 Performance

Issue: Debug code _allRawChunks is defined and accumulates data in memory but is never used. This creates a memory leak for long-running streams.

Fix: Remove the debug variable definition.

Impact: Prevents unnecessary memory consumption

Suggested change
const _allRawChunks: any[] = [] // DEBUG: collect all chunks

const _allRawChunks: any[] = [] // DEBUG: collect all chunks

for await (const chunk of stream) {
_allRawChunks.push(chunk) // DEBUG: collect
Copy link
Contributor

Choose a reason for hiding this comment

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

🟡 Performance

Issue: Debug code pushing chunks to _allRawChunks is left in the loop. This is part of the memory leak issue.

Fix: Remove the debug usage.

Impact: Prevents unnecessary memory consumption

Suggested change
_allRawChunks.push(chunk) // DEBUG: collect

Comment on lines +817 to +823
{tool.offset !== undefined && tool.limit !== undefined
? `#L${tool.offset}-${tool.offset + tool.limit - 1}`
: tool.reason
?.replace("lines", "#L")
?.replaceAll(" ", "")
.replaceAll("(", "")
.replaceAll(")", "")}
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Bug

Issue: Potential runtime crash. If tool.reason is undefined, tool.reason?.replace(...) returns undefined. The subsequent .replaceAll(...) call will throw TypeError: Cannot read properties of undefined (reading 'replaceAll').

Fix: Use nullish coalescing to ensure a string is always returned before chaining methods.

Impact: Prevents UI crash when tool reason is missing

Suggested change
{tool.offset !== undefined && tool.limit !== undefined
? `#L${tool.offset}-${tool.offset + tool.limit - 1}`
: tool.reason
?.replace("lines", "#L")
?.replaceAll(" ", "")
.replaceAll("(", "")
.replaceAll(")", "")}
{tool.offset !== undefined && tool.limit !== undefined
? `#L${tool.offset}-${tool.offset + tool.limit - 1}`
: (tool.reason ?? "")
.replace("lines", "#L")
.replaceAll(" ", "")
.replaceAll("(", "")
.replaceAll(")", "")}

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 7, 2026

✅ Reviewed the changes: The changes correctly implement a guard clause to prevent generating empty diffs. The logic is sound and handles edge cases appropriately.

@code-crusher code-crusher merged commit 459f880 into main Feb 7, 2026
4 of 12 checks passed
@code-crusher code-crusher deleted the release/v5.3.5 branch February 7, 2026 10:53
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 7, 2026

✅ Reviewed the changes: Version bump to 5.3.5 looks correct and matches the release title.

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