Skip to content

release/v6.0.1#80

Closed
code-crusher wants to merge 8 commits into
mainfrom
release/v6.0.1
Closed

release/v6.0.1#80
code-crusher wants to merge 8 commits into
mainfrom
release/v6.0.1

Conversation

@code-crusher

Copy link
Copy Markdown
Member

@matterai-app

matterai-app Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Context

Summary By MatterAI MatterAI logo

🔄 What Changed

Introduced the multi_file_edit tool to enable batch text replacements across multiple files in a single operation. Implemented a new /compact slash command and automated checkAndCondenseContext logic to proactively manage context window usage before heavy tool executions. Enhanced the AssistantMessageParser to gracefully handle streaming natural language mixed with JSON tool arguments.

🔍 Impact of the Change

Significantly improves agent efficiency by reducing the number of LLM round-trips required for complex refactors. Enhances system reliability by preventing context window overflows and stabilizing the parsing of streaming tool calls, leading to a smoother user experience in the Orbital IDE.

📁 Total Files Changed

Click to Expand
File ChangeLog
Batch Tool multi_file_edit.ts New tool implementation for atomic multi-file text replacements.
Parser Logic AssistantMessageParser.ts Added streaming-aware JSON detection for tool arguments.
Context Manager Task.ts Integrated proactive context condensation checks and /compact logic.
Slash Commands kilo.ts Added support for the /compact command to trigger condensation.
UI Components ChatTextArea.tsx Implemented rendering for slash command chips in the input area.
Tool Registry tool.ts Registered multi_file_edit as a core system tool.
Model Config kilocode-models.ts Refactored and cleaned up model metadata definitions.

🧪 Test Added/Recommended

Added

  • AssistantMessageParser.spec.ts: Validates multi-tool call retention and streaming natural language handling.
  • presentAssistantMessage.spec.ts: Verifies execution of batch tool blocks in native multi-tool responses.

Recommended

  • Add concurrency tests for multi_file_edit to ensure file system integrity when multiple edits target the same file.
  • Implement performance benchmarks for the context condensation flow under high-token scenarios.

🔒 Security Vulnerabilities

N/A - The PR includes robust path validation and write-protection checks for the new editing tools. 🛡️

Implementation

The core logic resides in multiFileEditTool.ts, which groups edits by file and applies them bottom-to-top to maintain line offsets. The Task.ts class now includes checkAndCondenseContext, which is invoked in presentAssistantMessage.ts before executing tools that add significant content (e.g., read_file). This ensures the context window is optimized before the LLM receives large data payloads.

Screenshots

before after
N/A N/A

How to Test

  1. Open the chat and type /compact to manually trigger context condensation.
  2. Provide a prompt that requires changing multiple files (e.g., "Rename variable X to Y in files A and B").
  3. Verify that the agent uses multi_file_edit and applies all changes in a single turn.
  4. Observe the UI for the new slash command chips in the text area.

Get in Touch

N/A

@code-crusher code-crusher reopened this May 4, 2026
@code-crusher code-crusher deleted the release/v6.0.1 branch May 4, 2026 10: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.

1 participant