Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
fix(embeddings): translate error messages before sending to UI
- Import t() function from i18n module
- Wrap error messages with t() translation function in _initializeEmbedder()
- Ensures proper localization of error messages in the UI
- Falls back to original message if no translation exists
* fix: use decodeURIComponent in openFile
* feat: add error handling for decodeURIComponent and tests
- Added try-catch block around decodeURIComponent to handle invalid escape sequences
- Falls back to original path if decoding fails
- Added comprehensive unit tests for the openFile function
- Tests cover invalid URI encoding, valid encoding, and various edge cases
* fix: update test to handle dynamic workspace paths in CI
* fix: handle Windows path separators in open-file tests
---------
Co-authored-by: Vivek Soni <vivex@Viveks-MacBook-Air-2.local>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
* fix: handle null/empty custom modes files to prevent 'Cannot read properties of null' error
- Fix SimpleInstaller to ensure existingData is always an object after yaml.parse
- Fix CustomModesManager.parseYamlSafely to return empty object instead of null
- Ensure customModes array is always initialized in both install and remove operations
- Add tests for empty/null file handling scenarios
- Update existing tests to match correct behavior
* fix: handle null/undefined settings in updateModesInFile and loadModesFromFile
- Ensure settings object exists before accessing customModes property
- Initialize customModes as empty array if undefined
- Prevent 'Cannot read properties of null' error during mode import
- Add proper validation in loadModesFromFile before schema check
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* fix: add embedder validation to prevent misleading status indicators (#4398)
* fix: address PR feedback and fix critical issues
- Fixed settings-save flow to save before validation
- Fixed Error constructor usage in scanner.ts
- Fixed segment identification in file-watcher.ts
- Added missing translation keys for embedder validation errors
* fix: add missing Ollama translation keys
- Added missing ollama.title, description, and settings keys
- Fixed translation check failure in CI/CD pipeline
- Synchronized all 17 non-English locale files
* feat: add proactive embedder validation on provider switch
- Validate embedder connection when switching providers
- Prevent misleading 'Indexed' status when embedder is unavailable
- Show immediate error feedback for invalid configurations
- Add comprehensive test coverage for validation flow
This ensures users get immediate feedback when configuring embedders,
preventing confusion when providers like Ollama are not accessible.
* fix: improve error handling and validation in code indexing process
* refactor: extract common embedder validation and error handling logic
- Created shared/validation-helpers.ts with centralized error handling utilities
- Refactored OpenAI, OpenAI-Compatible, and Ollama embedders to use shared helpers
- Eliminated duplicate error handling code across embedders
- Improved maintainability and consistency of error handling
- Fixed test compatibility in manager.spec.ts
- All 2721 tests passing
* refactor: simplify validation helpers by removing unnecessary wrapper functions
- Removed getErrorMessageForConnectionError and inlined logic into handleValidationError
- Removed isRateLimitError, logRateLimitRetry, and logEmbeddingError wrapper functions
- Updated openai.ts and openai-compatible.ts to inline rate limit checking and logging
- Reduced code complexity while maintaining all functionality
- All 311 tests continue to pass
* fix: add missing invalidResponse i18n key and fix French translation
- Added missing 'invalidResponse' key to all locale files
- Fixed French translation: changed 'and accessible' to 'et accessible'
- Ensures proper error messages are displayed when embedder returns invalid responses
* fix: restore removed score settings in webviewMessageHandler
- Restored codebaseIndexSearchMaxResults and codebaseIndexSearchMinScore settings that were unintentionally removed
- Keep embedder validation related changes
* fix: revert unintended changes to file-watcher and scanner
- Reverted point ID generation back to using line numbers instead of segmentHash
- Restored { cause: deleteError } parameter in scanner error handling
- These changes were unrelated to the embedder validation feature
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>