Skip to content

Update UI fixes#4

Merged
code-crusher merged 3 commits intomainfrom
update_ui_fixes
Nov 11, 2025
Merged

Update UI fixes#4
code-crusher merged 3 commits intomainfrom
update_ui_fixes

Conversation

@code-crusher
Copy link
Member

No description provided.

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Nov 11, 2025

Summary By MatterAI MatterAI logo

🔄 What Changed

This PR introduces a new file_edit tool that allows for targeted text replacements within files without constructing manual diff blocks. It also includes UI updates for better visualization of file edit operations, enhanced task management with manual message queuing, and improvements to the system prompt documentation. The changes enable more deterministic file editing while maintaining user approval workflows.

🔍 Impact of the Change

The introduction of the file_edit tool provides a more straightforward approach to file modifications compared to the existing apply_diff tool. The UI enhancements improve user experience by clearly displaying file edit operations. Task management improvements ensure better handling of manual user messages during active conversations. System prompt updates provide clearer guidance on tool usage.

📁 Total Files Changed

File ChangeLog
tool.ts Added file_edit to native tools list
nativeToolCallHelpers.ts Updated tool call parameters and native tools usage
openrouter.ts Added custom request options for task metadata and logging
presentAssistantMessage.ts Integrated file_edit tool handling and presentation
system-prompt snapshots Updated documentation to include file_edit tool usage examples
sections.spec.ts Updated test cases to include file_edit in capabilities
capabilities.ts Enhanced capabilities section to include file_edit tool
rules.ts Updated rules to reference file_edit tool
system.ts Added detailed apply_diff tool description and effective diff strategy
file-edit.ts Added new file with file_edit tool description
tools/index.ts Integrated file_edit tool description and updated tool management
apply_diff.ts Added strict mode to apply_diff tool
ask_followup_question.ts Updated mode description for follow-up questions
file_edit.ts Added new native tool definition for file_edit
getAllowedJSONToolsForMode.ts Updated tool filtering to include file_edit
native-tools/index.ts Integrated file_edit native tool
search_files.ts Enhanced file pattern description
Task.ts Implemented manual message queue for user responses and improved task handling
fileEditTool.ts Added new implementation for file_edit tool with validation and replacement logic
ExtensionMessage.ts Added fileEdit to tool types and replaceAll parameter
experiments.ts Enabled MORPH_FAST_APPLY experiment
tools.ts Added file_edit tool parameters and interface definitions
ChatRow.tsx Added UI components for fileEdit tool display
ChatView.tsx Enhanced message handling for task resumption and sending
FollowUpSuggest.tsx Updated follow-up suggestion styling
MarkdownBlock.tsx Adjusted paragraph margins

🧪 Test Added/Recommended

Added

  • Updated test cases in sections.spec.ts to include file_edit in capabilities section

Recommended

  • Add comprehensive unit tests for fileEditTool.ts covering various replacement scenarios
  • Add integration tests for manual message queue functionality in Task.ts
  • Add UI tests for fileEdit tool display components

🔒Security Vulnerabilities

N/A

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Nov 11, 2025

✅ Reviewed the changes: This PR introduces the new file_edit tool and updates UI components. Key areas need review for correctness and security.

@code-crusher
Copy link
Member Author

/matter review-full

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Nov 11, 2025

✅ Reviewed the changes: This PR introduces a new file_edit tool and integrates it across the system. Key changes include tool definitions, prompt updates, UI components, and the core implementation in fileEditTool.ts. Several issues were identified, including a critical regex escaping bug, performance concerns with polling intervals, and debug logs that should be removed.

@code-crusher
Copy link
Member Author

/matter review-full

@code-crusher code-crusher merged commit fc9b85c into main Nov 11, 2025
6 of 14 checks passed
@code-crusher
Copy link
Member Author

/matter release-notes

@code-crusher code-crusher deleted the update_ui_fixes branch November 11, 2025 15:49
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Nov 11, 2025

What's Changed

Summary

This PR introduces a new file_edit tool for precise text replacements within files, enhances UI/UX elements, and refactors tool management logic to support Morph fast apply features. It also includes prompt improvements and task handling optimizations.

New Features

  • Introduced a new file_edit tool that allows targeted text replacements within a single file without manual diff construction.
  • Added detailed tool descriptions and usage instructions for file_edit in system prompts and documentation.
  • Implemented manual message queue processing in Task.ts to handle user inputs asynchronously during streaming or ask-response states.
  • Enabled strict mode for apply_diff tool usage to enforce precise content matching.
  • Added support for replaceAll parameter in fileEdit tool use interface and UI components.
  • Introduced resume task and resume completed task states in ChatView for better task lifecycle management.
  • Added a new experiment configuration MORPH_FAST_APPLY enabled by default for Morph fast apply capabilities.

Bug fixes

  • Fixed UI rendering issues in ChatRow by adding proper icons and styling for file edit operations.
  • Improved error handling and validation in fileEditTool.ts to prevent invalid replacements and missing parameters.
  • Corrected prompt descriptions to include file_edit alongside other editing tools for better clarity.
  • Resolved issues with tool exclusion logic when Morph fast apply is enabled by updating native tool filtering.
  • Enhanced replacer logic in fileEditTool.ts with multiple strategies for improved text matching accuracy.

Commits

Dependencies added

  • Added new TypeScript interfaces and type definitions in src/shared/tools.ts for FileEditToolUse to support structured tool usage.
  • Introduced new UI components in webview-ui/src/components/chat/ChatRow.tsx to render fileEdit tool operations with appropriate icons and accordions.
  • Added new prompt description modules in src/core/prompts/tools/file-edit.ts and updated index files to include fileEdit tool documentation.
  • Integrated new native tool definitions in src/core/prompts/tools/native-tools/file_edit.ts with strict parameter validation.
  • Updated experiment configurations in src/shared/experiments.ts to enable MORPH_FAST_APPLY by default.

@code-crusher
Copy link
Member Author

/matter generate the changelog in markdown

@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Nov 11, 2025

I encountered an error while processing your request. Please try again later.

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