Skip to content

Conversation

@d-oit
Copy link
Contributor

@d-oit d-oit commented May 13, 2025

Related GitHub Issue

Closes: 3152

Description

The Roo Code prompt UI shows the correct output.
In the "real" API POST "Global Instructions" always adds "Mode-specific Instructions":

...
\n\nGlobal Instructions:\nstart text "Custom Instructions for All Modes" text end\n\nYou can analyze code, explain concepts, and access external resources. Make sure to answer the user's questions and don't rush to switch to implementing code. Include Mermaid diagrams if they help make your response clearer.\n\nMode-specific Instructions:\nYou can analyze code, explain concepts, and access external resources. Make sure to answer the user's questions and don't rush to switch to implementing code. Include Mermaid diagrams if they help make your response clearer."

with the changes:
// Only add global instructions if they differ from mode-specific instructions

Test Procedure

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

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.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
    • Tested with VSIX Testversion - see .sh script - local (Windows 11 and codespace)
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates are required. (Please describe what needs to be updated or link to a PR in the docs repository).

Additional Notes

Postman API Post test with the fix:


Important

Enhance addCustomInstructions to prioritize mode-specific instructions and prevent duplicate global instructions, with comprehensive tests added.

  • Behavior:
    • addCustomInstructions in custom-instructions.ts now prioritizes mode-specific instructions over global ones.
    • Global instructions are only added if they differ from mode-specific instructions.
  • Tests:
    • Added tests in custom-instructions.test.ts to verify prioritization of mode-specific instructions and prevention of duplicate global instructions.
    • Tests cover scenarios with identical, empty, and whitespace-only instructions.
  • Misc:
    • Added build-testing-version-vsix.sh script for packaging test versions of the extension.

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

@changeset-bot
Copy link

changeset-bot bot commented May 13, 2025

⚠️ No Changeset found

Latest commit: 9686762

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 14, 2025
@d-oit d-oit marked this pull request as ready for review May 14, 2025 09:56
@d-oit d-oit requested review from cte and mrubens as code owners May 14, 2025 09:56
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

System prompt: Global Instructions adds always Mode-specific Instructions

2 participants