- Introduced tests for streaming overlay consistency to ensure proper handling of assistant messages during state changes.
- Added tests for file change buffering to isolate failed deletions and ensure proper handling of update failures.
- Enhanced indexing service tests to verify concurrent initialization and proper handling of completed-index markers.
- Implemented tests for structural index SQLite store to tolerate repeated chunk IDs without aborting the build.
- Created tests for TreeSitter chunking to prevent duplicate chunk IDs and ensure correct chunk retention.
- Added tests for vector store batch updates to handle deletion failures gracefully.
- Implemented tests for sensitive settings to prevent access to credential keys.
- Enhanced provider credential store tests to ensure non-destructive legacy OAuth migration.
- Added tests for relaunch protocol to handle parent process accessibility issues.
- Introduced tests for large preview write guard to prevent unintended file truncation.
- Enhanced performance monitor memory tests to verify heap limit detection and provider behavior.
- Introduced lazy loading for the tokenizer in `tokenCounter.ts` to optimize initial load times.
- Removed the `monacoTypeService` and its related functionalities to streamline the codebase.
- Updated `LargeFileViewer` to utilize `MonacoEditor` for better performance and user experience.
- Enhanced the `Sidebar` component with lazy loading for improved rendering efficiency.
- Implemented a new file logging service with rotation capabilities to manage log files effectively.
- Added tests for the new logging service and ensured token counting tests are aligned with the new tokenizer setup.
- Cleaned up unused imports and optimized existing code for better maintainability.
- Updated the read_file schema to allow both path and paths to coexist without conflict, treating them as a union.
- Implemented logic to normalize input, ensuring that empty paths do not persist and that valid single or multi-file requests are processed correctly.
- Added comprehensive tests to cover various scenarios, including regression tests for previously failing cases.
- Introduced memory leak detection improvements in PerformanceMonitor, with new thresholds and conditions to avoid false positives during startup.
- Added synchronous log flushing in Logger to ensure critical logs are not lost during process exit.
- Enhanced AiAttributionService to improve commit analysis and caching of existing notes.
- Add js-tiktoken dependency for precise token counting across different languages
- Create new tokenCounter utility module with countTokens and countContentTokens functions
- Replace estimateTokens approximation logic with accurate tiktoken-based counting
- Update CompressionManager to use new token counter utilities for better context management
- Refactor estimateMessagesTokens to leverage accurate token counting with proper overhead calculation
- Add comprehensive test coverage for token counter utility
- Update tsconfig for proper module resolution
- Improve token estimation accuracy for Chinese characters, code, and structured content
- Remove estimateTokens from public exports in favor of new utility functions
- Replace handleError with toAppError in IPC handlers (debug, llm, lsp, mcp, resources)
- Rename logAndThrowError to logAndThrowError for consistency in LLM service
- Update error handling in LSP installer and manager modules
- Standardize error handling in security modules (fileWatcher, secureFile, secureTerminal, securityModule)
- Refactor StreamingService error handling with improved error type conversion
- Update MCP client, config loader, and manager error handling patterns
- Standardize error handling in update service and agent services
- Improve error handling in tool providers and registry
- Update terminal, workspace, and completion service error handling
- Refactor shared error handler utility with better type safety
- Update error handler tests to reflect new toAppError API
- Consolidate error handling patterns across main and renderer processes for better maintainability
- Add centralized error handler utility in shared/utils/errorHandler.ts for consistent error processing across the application
- Add usePerformance hook for renderer-side performance monitoring and metrics collection
- Update all IPC handlers (debug, lsp, mcp, resources) to use centralized error handling instead of inline try-catch blocks
- Standardize error handling in main process services (LSP installer, MCP client/manager, security modules, update service)
- Improve error handling in renderer services (git, completion, health check, LSP, MCP, terminal manager)
- Update tool executors and providers to use consistent error handling patterns
- Add .tsbuildinfo to .gitignore to exclude TypeScript build cache files
- Add comprehensive test coverage for error handler utility
- Refactor error catching patterns from `catch (error: any)` to `catch (err)` with proper type safety
- Consolidate error handling logic to reduce code duplication across 40+ files
This refactoring improves maintainability, consistency, and provides better error tracking throughout the application.