Skip to content

Conversation

@SannidhyaSah
Copy link
Collaborator

@SannidhyaSah SannidhyaSah commented Jan 30, 2026

Related GitHub Issue

Related to: #10513

Roo Code Task Context (Optional)

No Roo Code task context for this PR

Description

This PR enhances the Skills management UI by adding the ability to dynamically change which mode a skill applies to, building upon the Skills UI improvements in #10513.

Key Implementation Details:

  1. Backend (moveSkill() method): Uses fs.rename() to move skill directories between mode-specific folders (e.g., .roo/skills-code/.roo/skills-architect/). Automatically cleans up empty parent directories after moving.

  2. UI Enhancement: Replaced the static mode badge in SkillItem.tsx with an interactive dropdown that:

    • Shows current mode or "Any mode" for generic skills
    • Lists all available modes (built-in + custom)
    • Automatically moves the skill when selection changes
    • Is disabled for built-in skills (shows static badge instead)
  3. Message Flow: Added moveSkill message type with routing through webviewMessageHandler.tsskillsMessageHandler.tsSkillsManager.ts

  4. Smart Cleanup: After moving a skill, the system checks if the source directory is empty and automatically removes it to keep the .roo/ directory clean.

Design Trade-offs:

  • Used inline dropdown instead of a separate edit dialog for faster mode changes
  • Silently ignore cleanup errors (permissions/race conditions) to ensure move operation always succeeds
  • Empty directory cleanup only happens for mode-specific directories (not the generic skills/ directory)

Test Procedure

Automated Tests:

# Backend tests (42 tests passing)
cd src && npx vitest run services/skills/__tests__/SkillsManager.spec.ts

# Message handler tests (21 tests passing)
cd src && npx vitest run core/webview/__tests__/skillsMessageHandler.spec.ts

# UI component tests (16 tests passing)
cd webview-ui && npx vitest run src/components/settings/__tests__/SkillItem.spec.tsx

Manual Testing Steps:

  1. Open Settings → Skills section
  2. Create a new project skill with a specific mode (e.g., "code")
  3. Verify the skill appears with a mode dropdown showing "💻 Code"
  4. Change the mode dropdown to a different mode (e.g., "🏗️ Architect")
  5. Verify the skill directory moved from .roo/skills-code/ to .roo/skills-architect/
  6. Verify the old .roo/skills-code/ directory was automatically deleted (if it was empty)
  7. Try changing a skill to "Any mode" and verify it moves to .roo/skills/
  8. Verify built-in skills show a static badge and cannot be moved or deleted

Test Coverage:

  • ✅ Move from generic to mode-specific
  • ✅ Move between different modes
  • ✅ Move from mode-specific to generic
  • ✅ Empty directory cleanup
  • ✅ Conflict detection (skill already exists at destination)
  • ✅ Built-in skill protection
  • ✅ Error handling for missing skills

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

Skills Mode Dropdown
Screenshot shows the mode dropdown integrated into the skill item UI

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates are required. The Skills documentation should mention that skill modes can be changed after creation using the dropdown in the Settings → Skills UI.

Additional Notes

Implementation Notes:

  • The mode dropdown uses the same MODE_ANY sentinel pattern (__any__) as CreateSkillDialog.tsx for consistency
  • Empty directory cleanup is wrapped in try/catch to ensure the move operation succeeds even if cleanup fails
  • File watchers automatically detect the directory changes and refresh the skills list
  • All existing skills tests continue to pass without modification

Future Enhancements:

  • Could add a confirmation dialog for moves that would override global skills
  • Could add undo/redo functionality for skill moves
  • Could batch-move multiple skills at once

Get in Touch

Sa..


Important

Adds dynamic skill mode change feature in Skills UI with backend support for moving skill directories and UI dropdown for mode selection.

  • Behavior:
    • Adds moveSkill() method in SkillsManager.ts to move skill directories between mode-specific folders using fs.rename(), with cleanup of empty directories.
    • Replaces static mode badge with interactive dropdown in SkillItem.tsx to change skill modes dynamically.
    • Introduces moveSkill message type in webviewMessageHandler.ts and skillsMessageHandler.ts.
  • UI:
    • Dropdown in SkillItem.tsx lists all modes, allows changing modes, and is disabled for built-in skills.
  • Testing:
    • Adds tests for handleMoveSkill in skillsMessageHandler.spec.ts and moveSkill in SkillsManager.spec.ts.
    • Updates SkillItem.spec.tsx to test dropdown functionality and message sending.
  • Localization:
    • Updates translation files for new strings related to skill mode changes.

This description was created by Ellipsis for f99f57f. You can customize this summary. It will automatically update as commits are pushed.

- Add moveSkill() method to SkillsManager that moves skills between mode directories
- Replace static mode badge with interactive dropdown in SkillItem component
- Automatically clean up empty mode directories after moving skills
- Add comprehensive tests for move operation (42 backend tests, 21 message handler tests, 16 UI tests)
- Built-in skills show static badge and have dropdown disabled
- Support moving between: generic ↔ mode-specific, mode A ↔ mode B

Fixes the issue where users couldn't change which mode a skill applies to after creation.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Documentation Improvements or additions to documentation UI/UX UI/UX related or focused labels Jan 30, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 30, 2026

Rooviewer Clock   See task on Roo Cloud

All issues resolved. The unused variable newModeInfo has been removed.

  • Remove unused variable newModeInfo in SkillsManager.ts (dead code)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sannidhya added 2 commits January 30, 2026 09:18
- Add missing_move_fields error translation for all 17 locales
- Add changeMode and modeAny UI translations for all 17 locales
- Covers: ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
@SannidhyaSah
Copy link
Collaborator Author

@brunobergher Please take a look at this PR. It works, but if you think the UI/UX flow should be different, let me know.

@brunobergher
Copy link
Collaborator

Seems ok for now, I'll redesign that stuff soon enough.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 31, 2026
@mrubens mrubens merged commit 16fbabf into main Jan 31, 2026
12 checks passed
@mrubens mrubens deleted the feature/skills-mode-dropdown branch January 31, 2026 05:22
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 31, 2026
@roomote roomote bot mentioned this pull request Jan 31, 2026
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Feb 1, 2026
* feat(providers): add gpt-5.2-codex model to openai-native provider (RooCodeInc#10731)

* feat(e2e): Enable E2E tests - 39 passing tests (RooCodeInc#10720)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Clear terminal output buffers to prevent memory leaks (RooCodeInc#7666)

* feat: add OpenAI Codex provider with OAuth subscription authentication (RooCodeInc#10736)

Co-authored-by: Roo Code <[email protected]>

* fix(litellm): inject dummy thought signatures on ALL tool calls for Gemini (RooCodeInc#10743)

* fix(e2e): add alwaysAllow config for MCP time server tools (RooCodeInc#10733)

* Release v3.41.0 (RooCodeInc#10746)

* Changeset version bump (RooCodeInc#10747)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat: clarify Slack and Linear are Cloud Team only features (RooCodeInc#10748)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Release: v1.106.0 (RooCodeInc#10749)

* refactor(chat): replace current task display with last user feedback

* style(chat): adjust feedback text width calculation

* fix: handle missing tool identity in OpenAI Native streams (RooCodeInc#10719)

* Feat/issue 5376 aggregate subtask costs (RooCodeInc#10757)

* feat(chat): add streaming state to task header interaction

* feat: add settings tab titles to search index (RooCodeInc#10761)

Co-authored-by: Roo Code <[email protected]>

* fix: filter Ollama models without native tool support (RooCodeInc#10735)

* fix: filter out empty text blocks from user messages for Gemini compatibility (RooCodeInc#10728)

* fix: flatten top-level anyOf/oneOf/allOf in MCP tool schemas (RooCodeInc#10726)

* fix: prevent duplicate tool_use IDs causing API 400 errors (RooCodeInc#10760)

* fix: truncate call_id to 64 chars for OpenAI Responses API (RooCodeInc#10763)

* fix: Gemini thought signature validation errors (RooCodeInc#10694)

Co-authored-by: Roo Code <[email protected]>

* Release v3.41.1 (RooCodeInc#10767)

* Changeset version bump (RooCodeInc#10768)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat: add button to open markdown in VSCode preview (RooCodeInc#10773)

Co-authored-by: Roo Code <[email protected]>

* fix(openai-codex): reset invalid model selection (RooCodeInc#10777)

* fix: add openai-codex to providers that don't require API key (RooCodeInc#10786)

Co-authored-by: Roo Code <[email protected]>

* fix(litellm): detect Gemini models with space-separated names for thought signature injection (RooCodeInc#10787)

* Release v3.41.2 (RooCodeInc#10788)

* Changeset version bump (RooCodeInc#10790)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Roo Code Router fixes for the cli (RooCodeInc#10789)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Revert "feat(e2e): Enable E2E tests - 39 passing tests" (RooCodeInc#10794)

Co-authored-by: Hannes Rudolph <[email protected]>

* Claude-like cli flags, auth fixes (RooCodeInc#10797)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* Release cli v0.0.47 (RooCodeInc#10798)

* Use a redirect instead of a fetch for cli auth (RooCodeInc#10799)

* chore(cli): prepare release v0.0.48 (RooCodeInc#10800)

* Fix thinking block word-breaking to prevent horizontal scroll (RooCodeInc#10806)

Co-authored-by: Roo Code <[email protected]>

* chore: add changeset for v3.41.3 (RooCodeInc#10822)

* Removal of glm4 6 (RooCodeInc#10815)

Co-authored-by: Matt Rubens <[email protected]>

* Changeset version bump (RooCodeInc#10823)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat: warn users when too many MCP tools are enabled (RooCodeInc#10772)

* feat: warn users when too many MCP tools are enabled

- Add WarningRow component for displaying generic warnings with icon, title, message, and optional docs link
- Add TooManyToolsWarning component that shows when users have more than 40 MCP tools enabled
- Add MAX_MCP_TOOLS_THRESHOLD constant (40)
- Add i18n translations for the warning message
- Integrate warning into ChatView to display after task header
- Add comprehensive tests for both components

Closes ROO-542

* Moves constant to the right place

* Move it to the backend

* i18n

* Add actionlink that takes you to MCP settings in this case

* Add to MCP settings too

* Bump max tools up to 60 since github itself has 50+

* DRY

* Fix test

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Support different cli output formats: text, json, streaming json (RooCodeInc#10812)

Co-authored-by: Roo Code <[email protected]>

* chore(cli): prepare release v0.0.49 (RooCodeInc#10825)

* fix(cli): set integrationTest to true in ExtensionHost constructor (RooCodeInc#10826)

* fix(cli): fix quiet mode tests by capturing console before host creation (RooCodeInc#10827)

* refactor: unify user content tags to <user_message> (RooCodeInc#10723)

Co-authored-by: Roo Code <[email protected]>

* feat(openai-codex): add ChatGPT subscription usage limits dashboard (RooCodeInc#10813)

* perf(webview): avoid resending taskHistory in state updates (RooCodeInc#10842)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Fix broken link on pricing page (RooCodeInc#10847)

* fix: update broken pricing link to /models page

* Update apps/web-roo-code/src/app/pricing/page.tsx

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>

* Git worktree management (RooCodeInc#10458)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* feat: enable prompt caching for Cerebras zai-glm-4.7 model (RooCodeInc#10670)

Co-authored-by: Roo Code <[email protected]>

* feat: add Kimi K2 thinking model to VertexAI provider (RooCodeInc#9269)

Co-authored-by: Roo Code <[email protected]>

* feat: standardize model selectors across all providers (RooCodeInc#10294)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* chore: remove XML tool calling support (RooCodeInc#10841)

Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Fix broken link on pricing page (RooCodeInc#10847)

* fix: update broken pricing link to /models page

* Update apps/web-roo-code/src/app/pricing/page.tsx

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>

* Pr 10853 (RooCodeInc#10854)

Co-authored-by: Roo Code <[email protected]>

* Git worktree management (RooCodeInc#10458)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* feat: enable prompt caching for Cerebras zai-glm-4.7 model (RooCodeInc#10670)

Co-authored-by: Roo Code <[email protected]>
(cherry picked from commit c7ce8aa)

* feat: add Kimi K2 thinking model to VertexAI provider (RooCodeInc#9269)

Co-authored-by: Roo Code <[email protected]>
(cherry picked from commit a060915)

* feat: standardize model selectors across all providers (RooCodeInc#10294)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
(cherry picked from commit e356d05)

* fix: resolve race condition in context condensing prompt input (RooCodeInc#10876)

* Copy: update /slack page messaging (RooCodeInc#10869)

copy: update /slack page messaging

- Update trial CTA to 'Start a free 14 day Team trial'
- Replace 'humans' with 'your team' in value props subtitle
- Shorten value prop titles for consistent one-line display
- Improve Thread-aware and Open to all descriptions

* fix: Handle mode selector empty state on workspace switch (RooCodeInc#9674)

* fix: handle mode selector empty state on workspace switch

When switching between VS Code workspaces, if the current mode from
workspace A is not available in workspace B, the mode selector would
show an empty string. This fix adds fallback logic to automatically
switch to the default "code" mode when the current mode is not found
in the available modes list.

Changes:
- Import defaultModeSlug from @roo/modes
- Add fallback logic in selectedMode useMemo to detect when current
  mode is not available and automatically switch to default mode
- Add tests to verify the fallback behavior works correctly
- Export defaultModeSlug in test mock for consistent behavior

* fix: prevent infinite loop by moving fallback notification to useEffect

* fix: prevent infinite loop by using ref to track notified invalid mode

* refactor: clean up comments in ModeSelector fallback logic

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* Roo to main remove xml (#936)

* Fix broken link on pricing page (RooCodeInc#10847)

* fix: update broken pricing link to /models page

* Update apps/web-roo-code/src/app/pricing/page.tsx

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>

* Git worktree management (RooCodeInc#10458)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* feat: enable prompt caching for Cerebras zai-glm-4.7 model (RooCodeInc#10670)

Co-authored-by: Roo Code <[email protected]>

* feat: add Kimi K2 thinking model to VertexAI provider (RooCodeInc#9269)

Co-authored-by: Roo Code <[email protected]>

* feat: standardize model selectors across all providers (RooCodeInc#10294)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* chore: remove XML tool calling support (RooCodeInc#10841)

Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Pr 10853 (RooCodeInc#10854)

Co-authored-by: Roo Code <[email protected]>

* feat(commit): enhance git diff handling for new repositories

* feat(task): support fake_tool_call for Qwen model with XML tool call format

* feat(prompts): add snapshots for custom instructions and system prompt variations

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>
Co-authored-by: Chris Estreich <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: MP <[email protected]>

* feat: remove Claude Code provider (RooCodeInc#10883)

* refactor: migrate context condensing prompt to customSupportPrompts and cleanup legacy code (RooCodeInc#10881)

* refactor: unify export path logic and default to Downloads (RooCodeInc#10882)

* Fix marketing site preview logic (RooCodeInc#10886)

* feat(web): redesign Slack page Featured Workflow section with YouTube… (RooCodeInc#10880)

Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: Roo Code <[email protected]>

* feat: add size-based progress tracking for worktree file copying (RooCodeInc#10871)

* feat: add HubSpot tracking with consent-based loading (RooCodeInc#10885)

Co-authored-by: Roo Code <[email protected]>

* fix(openai): prevent double emission of text/reasoning in native and codex handlers (RooCodeInc#10888)

* Fix padding on Roo Code Cloud upsell (RooCodeInc#10889)

Co-authored-by: Roo Code <[email protected]>

* Open the worktreeinclude file after creating it (RooCodeInc#10891)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix: prevent task abortion when resuming via IPC/bridge (RooCodeInc#10892)

* fix: rename bot to 'Roomote' and fix spacing in Slack demo (RooCodeInc#10898)

* Fix: Enforce file restrictions for all editing tools (RooCodeInc#10896)

Co-authored-by: Roo Code <[email protected]>

* chore: clean up XML legacy code and native-only comments (RooCodeInc#10900)

* feat: hide worktree feature from menus (RooCodeInc#10899)

* fix(condense): remove custom condensing model option (RooCodeInc#10901)

* fix(condense): remove custom condensing model option

Remove the ability to specify a different model/API configuration for
condensing conversations. Modern conversations include provider-specific
data (tool calls, reasoning blocks, thought signatures) that only the
originating model can properly understand and summarize.

Changes:
- Remove condensingApiHandler parameter from summarizeConversation()
- Remove condensingApiConfigId from context management and Task
- Remove API config dropdown for CONDENSE in settings UI
- Update telemetry to remove usedCustomApiHandler parameter
- Update related tests

Users can still customize the CONDENSE prompt text; only model selection
is removed.

* fix: remove condensingApiConfigId from types and test fixtures

---------

Co-authored-by: Roo Code <[email protected]>

* test(prompts): update snapshots to fix indentation

* Fix EXT-553: Remove percentage-based progress tracking for worktree file copying (RooCodeInc#10905)

* Fix EXT-553: Remove percentage-based progress tracking for worktree file copying

- Removed totalBytes from CopyProgress interface
- Removed Math.min() clamping that caused stuck-at-100% issue
- Changed UI from progress bar to spinner with activity indicator
- Shows 'item — X MB copied' instead of percentage
- Updated all 18 locale files
- Uses native cp with polling (no new dependencies)

* fix: translate copyingProgress text in all 17 non-English locale files

---------

Co-authored-by: Roo Code <[email protected]>

* chore(prompts): clarify linked SKILL.md file handling (RooCodeInc#10907)

* Release v3.42.0 (RooCodeInc#10910)

* Changeset version bump (RooCodeInc#10911)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat: Move condense prompt editor to Context Management tab (RooCodeInc#10909)

* feat: Update Z.AI models with new variants and pricing (RooCodeInc#10860)

Co-authored-by: erdemgoksel <erdemgoksel@MAU-BILISIM42>

* fix: correct Gemini 3 pricing for Flash and Pro models (RooCodeInc#10487)

Co-authored-by: Roo Code <[email protected]>

* feat: add pnpm install:vsix:nightly command (RooCodeInc#10912)

* Intelligent Context Condensation v2 (RooCodeInc#10873)

* feat(gemini): add tool call support for Gemini CLI

* feat(condense): improve condensation with environment details, accurate token counts, and lazy evaluation (RooCodeInc#10920)

* docs: fix CLI README to use correct command syntax (RooCodeInc#10923)

Co-authored-by: Roo Code <[email protected]>

* chore: remove diffEnabled and fuzzyMatchThreshold settings (RooCodeInc#10298)

* Remove Merge button from worktrees (RooCodeInc#10924)

Co-authored-by: Roo Code <[email protected]>

* chore: remove POWER_STEERING experimental feature (RooCodeInc#10926)

- Remove powerSteering from experimentIds array and schema in packages/types
- Remove POWER_STEERING from EXPERIMENT_IDS and experimentConfigsMap
- Remove power steering conditional block from getEnvironmentDetails
- Remove POWER_STEERING entry from all 18 locale settings.json files
- Update related test files to remove power steering references

* chore: remove MULTI_FILE_APPLY_DIFF experiment (RooCodeInc#10925)

* chore: remove MULTI_FILE_APPLY_DIFF experiment

Remove the 'Enable concurrent file edits' experimental feature that
allowed editing multiple files in a single apply_diff call.

- Remove multiFileApplyDiff from experiment types and config
- Delete MultiFileSearchReplaceDiffStrategy class and tests
- Delete MultiApplyDiffTool wrapper and tests
- Remove experiment-specific code paths in Task.ts, generateSystemPrompt.ts, and presentAssistantMessage.ts
- Remove special handling in ExperimentalSettings.tsx
- Remove translations from all 18 locale files

The existing MultiSearchReplaceDiffStrategy continues to handle
multiple SEARCH/REPLACE blocks within a single file.

* fix: remove unused EXPERIMENT_IDS/experiments import from Task.ts

Addresses review feedback: removes the unused imports from
src/core/task/Task.ts that were left over after removing the
MULTI_FILE_APPLY_DIFF experiment routing code.

* fix: convert orphaned tool_results to text blocks after condensing (RooCodeInc#10927)

* fix: convert orphaned tool_results to text blocks after condensing

When condensing occurs after assistant sends tool_uses but before user responds,
the tool_use blocks get condensed away. User messages containing tool_results that
reference condensed tool_use_ids become orphaned and get filtered out by
getEffectiveApiHistory, causing user feedback to be lost.

This fix enhances the existing check in addToApiConversationHistory to detect when
the previous effective message is not an assistant and converts any tool_result
blocks to text blocks, preventing them from being filtered as orphans.

The conversion happens at the latest possible moment (message insertion) because:
- Tool results are created before we know if condensing will occur
- We need actual effective history state to make the decision
- This is the last checkpoint before orphan filtering happens

* Only include environment details in summary for automatic condensing

For automatic condensing (during attemptApiRequest), environment details
are included in the summary because the API request is already in progress
and the next user message won't have fresh environment details injected.

For manual condensing (via condenseContext button), environment details
are NOT included because fresh details will be injected on the very next
turn via getEnvironmentDetails() in recursivelyMakeClineRequests().

This uses the existing isAutomaticTrigger flag to differentiate behavior.

---------

Co-authored-by: Hannes Rudolph <[email protected]>

* refactor: remove legacy XML tool calling code (getToolDescription) (RooCodeInc#10929)

- Remove getToolDescription() method from MultiSearchReplaceDiffStrategy
- Remove getToolDescription() from DiffStrategy interface
- Remove unused ToolDescription type from shared/tools.ts
- Remove unused eslint-disable directive
- Update test mocks to remove getToolDescription references
- Remove getToolDescription tests from multi-search-replace.spec.ts

Native tools are now defined in src/core/prompts/tools/native-tools/ using
the OpenAI function format. The removed code was dead since XML-style tool
calling was replaced with native tool calling.

* Fix duplicate model display for OpenAI Codex provider (RooCodeInc#10930)

Co-authored-by: Roo Code <[email protected]>

* Skip thoughtSignature blocks during markdown export RooCodeInc#10199 (RooCodeInc#10932)

* fix: use json-stream-stringify for pretty-printing MCP config files (RooCodeInc#9864)

Co-authored-by: Roo Code <[email protected]>

* fix: auto-migrate v1 condensing prompt and handle invalid providers on import (RooCodeInc#10931)

* chore: add changeset for v3.43.0 (RooCodeInc#10933)

* Changeset version bump (RooCodeInc#10934)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Replace hyphen encoding with fuzzy matching for MCP tool names (RooCodeInc#10775)

* fix: truncate AWS Bedrock toolUseId to 64 characters (RooCodeInc#10902)

* feat: remove MCP SERVERS section from system prompt (RooCodeInc#10895)

Co-authored-by: Roo Code <[email protected]>

* feat(tools): enhance Gemini CLI with new tool descriptions and formatting

* feat(task): improve smart mistake detector with error source tracking and refined auto-switching

* feat: update Fireworks provider with new models (RooCodeInc#10679)

Fixes RooCodeInc#10674

Added new models:
- MiniMax M2.1 (minimax-m2p1)
- DeepSeek V3.2 (deepseek-v3p2)
- GLM-4.7 (glm-4p7)
- Llama 3.3 70B Instruct (llama-v3p3-70b-instruct)
- Llama 4 Maverick Instruct (llama4-maverick-instruct-basic)
- Llama 4 Scout Instruct (llama4-scout-instruct-basic)

All models include correct pricing, context windows, and capabilities.

* ux: Improve subtask visibility and navigation in history and chat views (RooCodeInc#10864)

* Taskheader

* Subtask messages

* View subtask

* subtasks in history items

* i18n

* Table

* Lighter visuals

* bug

* fix: Align tests with implementation behavior

* refactor: extract CircularProgress component from TaskHeader

- Created reusable CircularProgress component for displaying percentage as a ring
- Moved inline SVG calculation from TaskHeader.tsx to dedicated component
- Added comprehensive tests for CircularProgress component (14 tests)
- Component supports customizable size, strokeWidth, and className
- Includes proper accessibility attributes (progressbar role, aria-valuenow)

* chore: update StandardTooltip default delay to 600ms

As mentioned in the PR description, increased the tooltip delay to 600ms
for less intrusive tooltips. The delay is still configurable via the
delay prop for components that need a different value.

---------

Co-authored-by: Roo Code <[email protected]>

* fix(types): remove unsupported Fireworks model tool fields (RooCodeInc#10937)

fix(types): remove unsupported tool capability fields from Fireworks model metadata

Co-authored-by: Roo Code <[email protected]>

* ux: improve worktree selector and creation UX (RooCodeInc#10940)

* Delete modal

* Restructured

* Much more prominent

* UI

* i18n

* Fixes i18n

* Remove mergeresultmodel

* i18n

* tests

* knip

* code review

* feat: add wildcard support for MCP alwaysAllow configuration (RooCodeInc#10948)

Co-authored-by: Roo Code <[email protected]>

* fix: restore opaque background to settings section headers (RooCodeInc#10951)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Update and improve zh-TW Traditional Chinese locale and docs (RooCodeInc#10953)

* chore: remove POWER_STEERING experiment remnants (RooCodeInc#10980)

* fix: record truncation event when condensation fails but truncation succeeds (RooCodeInc#10984)

* feat: new_task tool creates checkpoint the same way write_to_file does (RooCodeInc#10982)

* fix: VS Code LM token counting returns 0 outside requests, breaking context condensing (EXT-620) (RooCodeInc#10983)

- Modified VsCodeLmHandler.internalCountTokens() to create temporary cancellation tokens when needed
- Token counting now works both during and outside of active requests
- Added 4 new tests to verify the fix and prevent regression
- Resolves issue where VS Code LM API users experienced context overflow errors

* fix: prevent nested condensing from including previously-condensed content (RooCodeInc#10985)

* fix: use --force by default when deleting worktrees (RooCodeInc#10986)

Co-authored-by: Roo Code <[email protected]>

* chore: add changeset for v3.44.0 (RooCodeInc#10987)

* Changeset version bump (RooCodeInc#10989)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Fix LiteLLM tool ID validation errors for Bedrock proxy (RooCodeInc#10990)

* Enable parallel tool calling with new_task isolation safeguards (RooCodeInc#10979)

Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>

* Add quality checks to marketing site deployment workflows (RooCodeInc#10959)

Co-authored-by: cte <[email protected]>

* Add temperature=0.9 and top_p=0.95 to zai-glm-4.7 model (RooCodeInc#10945)

Co-authored-by: Matt Rubens <[email protected]>

* Revert "Enable parallel tool calling with new_task isolation safeguards" (RooCodeInc#11004)

* Release v3.44.1 (RooCodeInc#11003)

* Changeset version bump (RooCodeInc#11005)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Revert "Revert "Enable parallel tool calling with new_task isolation safeguards"" (RooCodeInc#11006)

* Fix local model validation error for Ollama models (RooCodeInc#10893)

fix: prevent false validation error for local Ollama models

The validation logic was checking against an empty router models object
that was initialized but never populated for Ollama. This caused false
validation errors even when models existed locally.

Now only validates against router models if they actually contain data,
preventing the false error when using local Ollama models.

Fixes ROO-581

Co-authored-by: Roo Code <[email protected]>

* feat: enhance tool call parsing and enable smart mistake detection

* fix: use relative paths in isPathInIgnoredDirectory to fix worktree indexing (RooCodeInc#11009)

* fix: remove duplicate tool_call emission from Responses API providers (RooCodeInc#11008)

* Release v3.44.2 (RooCodeInc#11025)

* Changeset version bump (RooCodeInc#11027)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat(condense v2.1): add smart code folding (RooCodeInc#10942)

* feat(condense): add smart code folding with tree-sitter signatures

At context condensation time, use tree-sitter to generate folded code
signatures (function definitions, class declarations) for files read
during the conversation. Each file is included as its own <system-reminder>
block in the condensed summary, preserving structural awareness without
consuming excessive tokens.

- Add getFilesReadByRoo() method to FileContextTracker
- Create generateFoldedFileContext() using tree-sitter parsing
- Update summarizeConversation() to accept array of file sections
- Each file gets its own content block in the summary message
- Add comprehensive test coverage (12 tests)

* fix: skip tree-sitter error strings in folded file context

- Add isTreeSitterErrorString helper to detect error messages
- Skip files that return error strings instead of embedding them
- Add test for error string handling

* refactor: move generateFoldedFileContext() inside summarizeConversation()

- Update summarizeConversation() to accept filesReadByRoo, cwd, rooIgnoreController instead of pre-generated sections
- Move folded file context generation inside summarizeConversation() (lines 319-339)
- Update ContextManagementOptions type and manageContext() to pass new parameters
- Remove generateFoldedFileContext from Task.ts imports - folding now handled internally
- Update all tests to use new parameter signature
- Reduces Task.ts complexity by moving folding logic to summarization module

* fix: prioritize most recently read files in folded context

Files are now sorted by roo_read_date descending before folded context
generation, so if the character budget runs out, the most relevant
(recently read) files are included and older files are skipped.

* refactor: improve code quality in condense module

- Convert summarizeConversation to use options object instead of 11 positional params
- Extract duplicated getFilesReadByRoo error handling into helper method
- Remove unnecessary re-export of generateFoldedFileContext
- Update all test files to use new options object pattern

* fix: address roomote feedback - batch error logging and early budget exit

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* Release v3.45.0 (RooCodeInc#11036)

* Changeset version bump (RooCodeInc#11037)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: include reserved output tokens in task header percentage calculation (RooCodeInc#11034)

Co-authored-by: Roo Code <[email protected]>

* feat: lossless terminal output with on-demand retrieval (RooCodeInc#10944)

* refactor(core): optimize mistake detection and model switching logic

* fix: prevent time-travel bug in parallel tool calling (RooCodeInc#11046)

* feat: add AI SDK dependencies and message conversion utilities (RooCodeInc#11047)

* fix: calculate header percentage based on available input space (RooCodeInc#11054)

Co-authored-by: Roo Code <[email protected]>

* docs: clarify read_command_output search param should be omitted when not filtering (RooCodeInc#11056)

* feat(marketing): add Linear integration page (RooCodeInc#11028)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Michael Preuss <[email protected]>

* refactor(tools): restructure lite-descriptions and add read_command_output

* feat: add skills management UI to settings panel (RooCodeInc#10513) (RooCodeInc#10844)

Co-authored-by: Sannidhya <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Roo Code <[email protected]>

* Enable parallel tool calls by default (RooCodeInc#11031)

* feat: Add OpenAI-compatible base provider and migrate Moonshot to AI SDK (RooCodeInc#11063)

* Add React Compiler integration to webview-ui (RooCodeInc#9565)

* feat(vscode-lm): add image support for VS Code LM API provider (RooCodeInc#11065)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Revert "feat(vscode-lm): add image support for VS Code LM API provider" (RooCodeInc#11068)

* refactor: replace fetch_instructions with skill tool and built-in skills (RooCodeInc#10913)

* Revert "refactor: replace fetch_instructions with skill tool and built-in skills" (RooCodeInc#11083)

* refactor: replace fetch_instructions with skill tool and built-in skills (RooCodeInc#11084)

Co-authored-by: Roo Code <[email protected]>

* feat: migrate DeepSeek to @ai-sdk/deepseek + fix AI SDK tool streaming (RooCodeInc#11079)

* feat: migrate Cerebras provider to AI SDK (RooCodeInc#11086)

* refactor(read_file): Codex-inspired read_file refactor EXT-617 (RooCodeInc#10981)

* fix: add null safety checks for string trim operations and kimi2.5 thinking

* feat(zgsm): add reasoning detection and empty reasoning handling

* fix(chat): filter empty reasoning text in ChatRow

* Update next.js (RooCodeInc#11108)

* feat: migrate Groq provider to @ai-sdk/groq (RooCodeInc#11088)

* feat: add pnpm serve command for code-server development (RooCodeInc#10964)

Co-authored-by: Roo Code <[email protected]>

* feat(web): Replace bespoke navigation menu with shadcn navigation menu (RooCodeInc#11117)

Co-authored-by: Roo Code <[email protected]>

* feat(api): migrate Fireworks provider to AI SDK (RooCodeInc#11118)

* Release v3.46.0 (RooCodeInc#11121)

* Changeset version bump (RooCodeInc#11122)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* chore: treat extension .env as optional (RooCodeInc#11116)

* feat: allow import settings in initial welcome screen (RooCodeInc#10994)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* fix: sanitize tool_use_id in tool_result blocks to match API history (RooCodeInc#11131)

Tool IDs from providers like Gemini/OpenRouter contain special characters
(e.g., 'functions.read_file:0') that are sanitized when saving tool_use
blocks to API history. However, tool_result blocks were using the original
unsanitized IDs, causing ToolResultIdMismatchError.

This fix ensures tool_result blocks use sanitizeToolUseId() to match the
sanitized tool_use IDs in conversation history.

Fixes EXT-711

* feat: add mode dropdown to change skill mode dynamically (RooCodeInc#10513) (RooCodeInc#11102)

Co-authored-by: Sannidhya <[email protected]>

* chore: add changeset for v3.46.1 (RooCodeInc#11135)

* Changeset version bump (RooCodeInc#11136)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: add image content support to MCP tool responses (RooCodeInc#10874)

Co-authored-by: Roo Code <[email protected]>

* chore: remove Feature Request from issue template options (RooCodeInc#11141)

Co-authored-by: Roo Code <[email protected]>

* fix: queue messages during command execution instead of losing them (RooCodeInc#11140)

* test: update test mocks and snapshots for new language support

---------

Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: Archimedes <[email protected]>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: T <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>
Co-authored-by: Chris Estreich <[email protected]>
Co-authored-by: Seb Duerr <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: MP <[email protected]>
Co-authored-by: Erdem <[email protected]>
Co-authored-by: erdemgoksel <erdemgoksel@MAU-BILISIM42>
Co-authored-by: rossdonald <[email protected]>
Co-authored-by: Michaelzag <[email protected]>
Co-authored-by: Thanh Nguyen <[email protected]>
Co-authored-by: Peter Dave Hello <[email protected]>
Co-authored-by: SannidhyaSah <[email protected]>
Co-authored-by: Sannidhya <[email protected]>
Co-authored-by: Alik Aslanyan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

No open projects
Status: Triage

Development

Successfully merging this pull request may close these issues.

4 participants