- Rename experiment ID from smartContextTracking to smartRead
- Apply smart read logic to @ file mentions (skip files already in context)
- Add parseMentions parameters for experiments and apiConversationHistory
- Add English translation keys for SMART_READ experiment
- Fix TypeScript errors and update tests
- Use pendingUserMessageTs in flushPendingToolResultsToHistory() instead of Date.now()
to ensure the message timestamp matches what was set during tool execution via
setCurrentMessageContext(). This fixes the issue where containingMessageTs could
point to a non-existent message and cause redundant re-reads.
- Add smartContextTracking property to the experiments mock object in
ExtensionStateContext.spec.tsx to fix TypeScript error.
Added new 'smartContextTracking' experiment to gate the file context
tracking optimization. When disabled (default), the read_file tools
behave as before. When enabled, files that haven't changed and still
have content in the conversation context return a short 'unchanged'
response instead of re-reading the full content.
Changes:
- Added smartContextTracking to experimentIds in packages/types
- Added SMART_CONTEXT_TRACKING to experiments.ts
- Updated simpleReadFileTool.ts to check experiment before optimization
- Updated ReadFileTool.ts to check experiment before optimization
- Add containingMessageTs field to FileMetadataEntry schema
- Create FileContextStatusChecker to detect unchanged files in context
- Modify read_file tools to check context status before re-reading
- Return short response when file content is already in effective context
- Still show unchanged files in UI approval like normal reads
- Add 19 unit tests for FileContextStatusChecker
- Update test mocks with getTaskMetadata and apiConversationHistory
* feat: add metadata to error details dialog
- Prepends extension version, provider, model, and repository info to error details
- Helps users provide better bug reports with context
- Uses useExtensionState and useSelectedModel hooks for data
* Tweaks
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
* feat: add WorkspaceTaskVisibility type and workspaceTaskVisibility property to OrganizationCloudSettings
* refactor: create workspaceTaskVisibilitySchema and derive WorkspaceTaskVisibility type from it
---------
Co-authored-by: Roo Code <roomote@roocode.com>
OpenRouter wraps upstream provider errors in a generic message but includes
the actual error in metadata.raw. This change:
- Adds OpenRouterErrorResponse interface for proper typing
- Creates handleStreamingError() helper for DRY error handling
- Extracts metadata.raw for actionable error messages in PostHog
- Includes nested error structure so getErrorMessage() can extract raw message
Before: PostHog receives '400 Provider returned error' (generic)
After: PostHog receives 'Model xyz not found' (actionable)
This enables proper error tracking and debugging via PostHog telemetry.