* fix: handle null/undefined token values in ContextCondenseRow to prevent UI crash
- Added null/undefined checks for prevContextTokens, newContextTokens, and cost
- Default to 0 when values are null or undefined
- Added comprehensive test coverage for edge cases
- Fixes#6914
* Delete webview-ui/src/components/chat/__tests__/ContextCondenseRow.spec.tsx
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* feat: add "Installed" filter to Roo Marketplace
- Added installed boolean filter to ViewState interface
- Implemented UI checkbox for "Show installed only" filter
- Updated filterItems method to filter by installation status
- Added translation strings for the new filter
- Updated tests to include the new filter property
Fixes#7004
* fix: add missing translations for "Installed" filter in marketplace
- Added "filters.installed.label" and "filters.installed.description" keys
- Updated all backend marketplace.json files (src/i18n/locales/*/marketplace.json)
- Updated all frontend marketplace.json files (webview-ui/src/i18n/locales/*/marketplace.json)
- All translation checks now pass successfully
* fix: improve code quality for installed filter feature
- Replace plain HTML checkbox with UI library Checkbox component for consistency
- Add proper TypeScript typing for installedMetadata (MarketplaceInstalledMetadata)
- Optimize filterItems method to avoid unnecessary object copying
- Remove dead code for subcomponent filtering
* refactor: improve installed filter UI and functionality
- Replace checkbox with dropdown for better UX
- Place dropdown inline with search field for better layout
- Add three filter options: All Items, Installed Only, Not Installed
- Update filter logic to handle all three states
- Improve translation labels to clarify it's a filter
- Optimize filterItems method for better performance
- Add proper TypeScript types throughout
* fix: ensure both filter dropdowns have matching height
- Set both Select and Button components to h-7 for visual consistency
- Installation status dropdown and tags dropdown now have identical height
- Improved visual alignment for better UX
* chore: remove redundant useEffect in MarketplaceListView to prevent re-render loop; rely on state manager handleMessage sync
* i18n: update tri-state Installed filter translations across all locales
- Replace checkbox-based installed keys with dropdown keys:
{ label, all, installed, notInstalled }
- Updated both frontend and backend marketplace.json files for all non-English locales
- Ensures translation completeness for CI check
* i18n: change Installed option text to 'Installed' (remove 'Only') across all locales (frontend + backend)
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix: omit temperature parameter when not explicitly set for OpenAI Compatible providers
- Modified OpenAiHandler to only include temperature when modelTemperature is defined
- Modified BaseOpenAiCompatibleProvider to only include temperature when modelTemperature is defined
- Added tests to verify temperature is omitted when undefined
- Updated existing tests to explicitly set temperature where needed
This allows backend services (LiteLLM, vLLM) to use their configured default temperatures
instead of being forced to use temperature=0 when "Use custom temperature" is unchecked.
Fixes#7187
* test: update tests to match new temperature handling behavior
- Remove temperature parameter expectations from provider tests
- Tests now expect temperature to be omitted when not explicitly set
- Aligns with PR #7188 changes to fix OpenAI Compatible provider behavior
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* feat: enable loading Roo modes from multiple files in .roo/roo_modes directory
- Add support for loading modes from .roo/roo_modes directory (both global and project)
- Implement proper precedence: project .roo/roo_modes > .roomodes > global .roo/roo_modes > settings
- Update file watchers to monitor .roo/roo_modes directories
- Preserve original source file when updating modes
- Add comprehensive tests for the new functionality
Fixes#7202
* refactor: rename .roo/roo_modes to .roo/modes for cleaner directory structure
- Changed ROO_MODES_DIR constant from "roo_modes" to "modes"
- Updated all references in CustomModesManager.ts
- Updated all test descriptions and mocks in CustomModesManager.spec.ts
- All tests passing successfully
* fix: normalize sourceFile paths to use forward slashes in exported YAML
- Fixes Windows test failure where backslashes in sourceFile paths were causing test assertions to fail
- Ensures cross-platform compatibility by normalizing all paths to use forward slashes in YAML exports
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Fixes first-time initialization issue with Z AI and Doubao providers
where the API keys were not recognized as valid secret keys, causing
the configuration to fail during initial setup.
Fixes#7082
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: prevent duplicate LM Studio models with case-insensitive deduplication
- Keep both listDownloadedModels and listLoaded APIs to support JIT loading
- Implement case-insensitive deduplication to prevent duplicates
- When duplicates are found, prefer loaded model data for accurate runtime info
- Add test coverage for deduplication logic
- Addresses feedback about LM Studio's JIT Model Loading feature (v0.3.5+)
Fixes#6954
* fix: correct deduplication logic to prefer loaded models
- When a loaded model ID is found in any downloaded model key (case-insensitive)
- Remove the downloaded model and replace with the loaded model
- This ensures loaded models with runtime info take precedence
- Updated tests to verify the correct deduplication behavior
* fix: improve deduplication logic and add comprehensive test coverage
- Enhanced deduplication to use path segment matching instead of simple substring
- Prevents false positives like 'llama' matching 'codellama'
- Added comprehensive test cases for edge cases and multiple scenarios
- Maintains support for JIT Model Loading feature
* feat: add support for OpenAI gpt-5-chat-latest model
- Added gpt-5-chat-latest model configuration to openAiNativeModels
- Updated OpenAiNativeHandler to recognize gpt-5-chat-latest as a Responses API model
- Added comprehensive tests for the new model
- Model is optimized for conversational AI and non-reasoning tasks
Fixes#7057
* fix: remove redundant condition and unnecessary test file
- Remove redundant gpt-5-chat-latest check in isResponsesApiModel since startsWith('gpt-5') already covers it
- Remove unnecessary dedicated test file for gpt-5-chat-latest
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* 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>