- Removed all console.info and console.log statements that were used for debugging
- Kept console.error statements for actual error reporting
- Fixed ESLint warnings for unused error variables
- Telemetry debug logs are now completely removed to prevent console spam
- Remove unused _isNetworkError variable in PostHogTelemetryClient
- Add TelemetryQueueManager.resetInstance() call in extension deactivation to prevent memory leaks and stale data when switching workspaces
- Move pendingPersist flag clearing inside persistQueue() method
- Implement loop-based draining to handle concurrent persist requests
- Add comprehensive tests for concurrent operations
- Ensures no telemetry events are lost during rapid enqueue operations
The previous implementation had a lost-notification bug where the pendingPersist
flag was cleared in the setImmediate callback before calling persistQueue().
This could cause events enqueued during an in-flight persist to remain unpersisted.
The fix implements Option A: clearing the flag inside persistQueue() and using
a while loop to drain all pending requests, ensuring any enqueue that happens
during a persist operation triggers another persist pass immediately after.
- Make console.log statements conditional based on debug flag
- Add singleton reset method for TelemetryQueueManager
- Fix race condition in persistQueue with debouncing and promise tracking
- Improve error handling in PostHogTelemetryClient to differentiate error types
- Make retry interval configurable in QueuedTelemetryClient
- Update tests to reflect 24-hour event expiration instead of retry-based removal
- Add test for handling corrupted JSON queue files
- Fix test expectations for retry count and event filtering
- Implement TelemetryQueueManager for persistent event storage
- Add QueuedTelemetryClient base class with retry logic
- Update PostHogTelemetryClient to use queuing system
- Store queue per-workspace to avoid conflicts
- Add exponential backoff retry (1s to 60s max)
- Events persist for 24 hours before expiring
- Queue limited to 100 events to manage file size
- Add comprehensive tests for queue functionality
- Disable PostHog's internal queue for better control
This ensures telemetry events are not lost during network
outages or server downtime, with events persisted to disk
and retried automatically when connectivity is restored.
* fix: add type check before calling .match() on diffItem.content
Fixes#6905 - Error during diff application "v.content.match is not a function"
- Added type check to ensure diffItem.content is a string before calling .match()
- Added comprehensive tests for handling non-string content values
- Prevents runtime errors when content is null, undefined, or other non-string types
* fix: validate content type earlier in diff parsing
- Move type check to where content is first extracted from XML
- Remove redundant check since content is now guaranteed to be string
- Add test for early content validation
* chore: remove comments
* fix: add TelemetryService mock to multiApplyDiffTool tests
* fix: add captureDiffApplicationError to TelemetryService mock
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* fix: enable save button for provider dropdown and checkbox changes
The save button wasn't enabling when users changed provider settings like
dropdowns and checkboxes because setApiConfigurationField was treating all
changes from undefined to a defined value as 'initial sync' and not marking
the form as dirty.
Added an optional isUserAction parameter (defaults to true) to distinguish:
- User actions (should enable save button) - the default
- Automatic initialization (shouldn't enable save button) - pass false
This fixes the issue where changing provider dropdowns, checkboxes with
default values, and other settings wouldn't enable the save button.
* fix: remove incorrect isUserAction=false from apiModelId sync
The useEffect that syncs apiModelId with selectedModelId was incorrectly
passing isUserAction=false, which prevented the save button from enabling
when users selected a different model. Since this effect responds to all
selectedModelId changes (including user selections), it should use the
default isUserAction=true behavior.
* test: fix ThinkingBudget test to expect isUserAction parameter
The test now correctly expects setApiConfigurationField to be called
with three arguments including the isUserAction=false parameter for
automatic thinking token adjustments.
* fix: prevent XML entity decoding in diff tools
- Add parseXmlForDiff function with processEntities: false to preserve exact content
- Update multiApplyDiffTool to use parseXmlForDiff instead of parseXml
- Add comprehensive tests for entity handling in parseXmlForDiff
This fixes the issue where fast-xml-parser was decoding HTML entities like &
causing mismatches in diff tools when comparing against original file content.
Fixes#7107
* refactor: eliminate code duplication between parseXml and parseXmlForDiff
- Refactored parseXml to accept optional ParseXmlOptions parameter
- parseXmlForDiff now delegates to parseXml with processEntities: false
- Added explanatory comment in multiApplyDiffTool.ts about why parseXmlForDiff is used
- Improved JSDoc documentation with specific use cases for parseXmlForDiff
This maintains backward compatibility while eliminating code duplication.
parseXml continues to be used for general XML parsing (file reads, follow-up questions),
while parseXmlForDiff is specifically for diff operations where entity processing must be disabled.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Previously, when users initiated context condensing and switched to another task before completion, the 'condensing context' indicator would persist on the new task.
This fix ensures the condensing state is properly reset in the task switching effect, preventing the indicator from appearing incorrectly on different tasks.
- Removed array slicing logic that limited messages to 500
- This eliminates array index shifting that caused Virtuoso to lose scroll position
- Virtuoso is designed to efficiently handle large lists through virtualization
- Fixes the scrollbar jumping issue reported in #7063 and #7052
Co-authored-by: Roo Code <roomote@roocode.com>
Fixes#6756
When ripgrep encounters file access errors (e.g., permission denied), it would cause the search_files tool to return empty results. Adding the --no-messages flag suppresses these error messages while still showing pattern syntax errors, allowing the search to continue and return valid results from accessible files.
Co-authored-by: Roo Code <roomote@roocode.com>