Skip to content

Conversation

@yordyi
Copy link

@yordyi yordyi commented Jul 25, 2025

Summary

This PR refactors the codebase by extracting and modularizing core system components to improve maintainability and code organization.

Key Changes

  • RipgrepInstaller: Extracted ripgrep installation logic from ripgrep.ts
  • TreeBuilder: Separated file tree construction logic into dedicated module
  • TimeoutManager: Added adaptive timeout handling with configurable strategies
  • DiagnosticsManager: Centralized LSP diagnostics coordination and event handling
  • StreamHandler: Implemented atomic file operations for better data integrity
  • MigrationManager: Created extensible database schema migration system
  • ReplaceStrategy & Replacers: Modularized text replacement system with multiple strategies

Benefits

  • Improved separation of concerns
  • Better code reusability
  • Enhanced maintainability
  • Cleaner architecture
  • More testable components

Files Changed

  • Modified core files: ripgrep.ts, client.ts, storage.ts, edit.ts, trace/index.ts
  • Added 12+ new modular components
  • Maintained backward compatibility

Test Plan

  • Existing functionality remains unchanged
  • All extracted modules maintain the same public APIs
  • Enhanced error handling and timeout management

🤖 Generated with Claude Code

yordyi and others added 2 commits July 25, 2025 11:39
- Extract RipgrepInstaller from ripgrep.ts for better maintainability
- Add TreeBuilder module for file tree construction logic
- Implement TimeoutManager for adaptive timeout handling
- Create DiagnosticsManager for LSP diagnostics coordination
- Add StreamHandler for atomic file operations
- Introduce MigrationManager for database schema migrations
- Extract ReplaceStrategy and Replacer system for text replacement
- Improve code organization and separation of concerns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Integrated ZipReader functionality into RipgrepInstaller for Windows zip extraction
- Merged new assistant message mode migration with existing migration system
- Updated TreeBuilder to exclude .opencode directories (from dev branch)
- Preserved refactored modular architecture while incorporating new features
- Enhanced edit tool with improved block anchor replacer and similarity thresholds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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