Skip to content

Conversation

@samhvw8
Copy link
Contributor

@samhvw8 samhvw8 commented Apr 29, 2025

Now custom mode can customize objective, rule & capabilities can be template via ejs

Context

When tool has remove from custom mode but sometime Roo still want access to there tool because those tool are mentioned in objective, rule & capabilities section.

This pr will address above problems

Implementation

Screenshots

before after

How to Test

Get in Touch


Important

Enhance custom modes with EJS template support for objectives, rules, and capabilities, including schema updates, UI changes, and tests.

  • Behavior:
    • Custom modes can now override objective, rules, and capabilities sections using EJS templates in src/core/prompts/templates.
    • New copyEjsTemplates plugin in esbuild.js to copy EJS templates to dist/templates.
    • Added EJS rendering support in renderEjs.ts.
  • Schema and Types:
    • Updated modeConfigSchema in schemas/index.ts to include objectiveSectionOverride, rulesSectionOverride, and capabilitiesSectionOverride.
    • Updated GlobalSettings and PromptComponent types in types.ts and roo-code.d.ts.
  • UI Changes:
    • Updated PromptsView.tsx to allow editing of new override sections.
    • Added translations for new UI elements in prompts.json.
  • Tests:
    • Added tests in custom-system-prompt.test.ts to verify new override functionality.

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

@changeset-bot
Copy link

changeset-bot bot commented Apr 29, 2025

⚠️ No Changeset found

Latest commit: 9a6d174

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

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Apr 29, 2025
@samhvw8 samhvw8 marked this pull request as draft April 29, 2025 17:35
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Apr 29, 2025

The pull request contains a variety of changes, including new features, tests, documentation, and refactoring. While these changes are substantial, they appear to be interconnected, focusing on improving the custom mode with new objectives, rules, and capabilities.

However, if there are distinct groups of changes that can be logically separated without affecting the overall functionality, consider splitting the pull request into smaller ones. For example, documentation updates could be separated from feature additions if they do not directly depend on each other. This can help streamline the review process and ensure each set of changes is thoroughly evaluated.

Please review the changes and assess if any sections can be independently split into separate pull requests.

@dosubot dosubot bot added the enhancement New feature or request label Apr 29, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 75 refers to 'Pug templates', but the code actually loads EJS templates (objective.ejs, rules.ejs, capabilities.ejs). Consider updating the comment to accurately reflect that these are EJS templates.

Suggested change
// Load default Pug templates
// Load default EJS templates

@hannesrudolph hannesrudolph linked an issue Apr 29, 2025 that may be closed by this pull request
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 29, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request May 6, 2025
@hannesrudolph hannesrudolph moved this from PR [Pre Approval Review] to PR [Draft/WIP] in Roo Code Roadmap May 10, 2025
@samhvw8 samhvw8 force-pushed the feat/custom-mode-improvement branch 2 times, most recently from a91e970 to 126566e Compare May 12, 2025 23:04
Now objective, rule & capabilities can be template via ejs
@samhvw8 samhvw8 force-pushed the feat/custom-mode-improvement branch from 126566e to 9a6d174 Compare May 14, 2025 14:36
@hannesrudolph hannesrudolph moved this from New to PR [Draft/WIP] in Roo Code Roadmap May 20, 2025
@hannesrudolph hannesrudolph moved this from PR [Draft / In Progress] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs daniel-lxs moved this from TEMP to PR [Needs Review] in Roo Code Roadmap May 26, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Review] to TEMP in Roo Code Roadmap May 26, 2025
@hannesrudolph hannesrudolph moved this from TEMP to PR [Needs Review] in Roo Code Roadmap May 26, 2025
@hannesrudolph
Copy link
Collaborator

Thanks for submitting this PR—really appreciate your effort here, and sorry it's been sitting in draft status for so long.

We're closing this for now but would love to see this idea move forward. Please start by creating an issue using our issue-first approach. This way, we can have the dev team properly review and approve the proposal before you resubmit a PR.

Thanks again for your patience and contribution!

@github-project-automation github-project-automation bot moved this from PR [Draft/WIP] to Done in Roo Code Roadmap May 27, 2025
@github-project-automation github-project-automation bot moved this from Needs Preliminary Review to Done in Roo Code Roadmap May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants