Skip to content

v2.0.0 - Complete File Editing Overhaul

Choose a tag to compare

@LegnaOS LegnaOS released this 10 Feb 08:43
· 45 commits to main since this release

v2.0.0 - Complete File Editing Overhaul

πŸŽ‰ Major Release - This release represents a complete rewrite of the file editing interception system based on deep reverse engineering of the Augment VS Code extension (v0.778.0).

✨ New Features

Advanced str-replace-editor Implementation

  • Multi-entry replacements: Support for old_str_1/new_str_1, old_str_2/new_str_2, etc. (up to 20 entries)
  • Three-tier matching algorithm:
    1. Exact verbatim matching
    2. Line number-based disambiguation (with 20% tolerance)
    3. Basic fuzzy matching (trimmed line matching)
  • Insert command support: insert command for adding content at specific line numbers
  • Line ending preservation: Automatically detects and preserves original line endings (CRLF/LF)

Unified Tool Interception Architecture

  • All providers now support interception: Anthropic, OpenAI, and Google providers all use the same interception logic
  • Proper result handling: Intercepted tool results are correctly returned to the AI as tool_result_node (type 1)
  • Consistent behavior: All providers now handle file editing tools identically

πŸ”§ Improvements

edit-file Tool Handling

  • Changed from conversion to error: Previously converted to view tool (wasting a round trip)
  • Now returns clear error: Instructs AI to use str-replace-editor instead
  • Better user experience: AI immediately knows to use the correct tool

Provider-Specific Enhancements

  • Anthropic provider: Added convertOrInterceptFileEdit call in tool_use completion handler
  • Google provider: Added fixToolCallInput and convertOrInterceptFileEdit in functionCall handler
  • OpenAI provider: Fixed intercepted result handling to return tool_result_node instead of null

πŸ› Bug Fixes

  • Fixed issue where intercepted tools would not return results to the AI
  • Fixed single-replacement limitation in str-replace-editor
  • Fixed missing line number disambiguation
  • Fixed lack of fuzzy matching fallback

πŸ“š Technical Details

Based on reverse engineering analysis of Augment extension's implementation:

  • PC class (str-replace-editor): Complete implementation including handleStrReplace, handleInsert, singleStrReplace
  • g$e class (edit-file): Server-side API call mechanism
  • Checkpoint system: addCheckpoint() β†’ qt().writeFile() β†’ WorkspaceEdit.replace()
  • Line ending handling: OD() normalization, JX() detection, sUe() restoration

πŸ”„ Breaking Changes

  • edit-file tool now returns an error instead of converting to view
  • processToolCallForAugment now returns tool_result_node for intercepted tools instead of null

πŸ“¦ Installation

Download augment-proxy-manager-2.0.0.vsix and install via:

Extensions: Install from VSIX...

Or use the command line:

code --install-extension augment-proxy-manager-2.0.0.vsix