Create custom "/" commands that will inject a prompt #2916
Replies: 2 comments
-
Prompts could have their own directory in .roo I also use this but I create my own tools so being able to do this or @mention them could be useful |
Beta Was this translation helpful? Give feedback.
-
Hi there! ## Instruction Alias
- When processing instructions (e.g., from Markdown files or messages), if you encounter an XML structure `<alias><trigger>TRIGGER_TEXT</trigger><definition>DEFINITION_TEXT</definition></alias>` within lines containing instructions:
- Internally and temporarily register (for the current set of instructions) that `TRIGGER_TEXT` is an alias for `DEFINITION_TEXT`. If `TRIGGER_TEXT` was already defined, the new `DEFINITION_TEXT` replaces it.
- For *subsequent* instructions, if an instruction contains *exactly* a registered `TRIGGER_TEXT`, replace that `TRIGGER_TEXT` with its corresponding `DEFINITION_TEXT` and immediately execute the instructions within.
<alias><trigger><pause/></trigger><definition>Generate the following `ask_followup_question`:
`<ask_followup_question>\n<question>**PAUSE** MODE</question>\n<follow_up>\n<suggest>\nContinue\n</suggest>\n</follow_up>\n</ask_followup_question>`
</definition></alias>
<alias><trigger><alldone/></trigger><definition><attempt_completion><result># **ALL DONE!**
</result></attempt_completion>
</definition></alias> Well, add this to
To limit usage only within a specified mode as you stated, just add the above code on the To make an alias such as yours:
Just add an alias for it ANYWHERE as long as the Instruction Alias section has already been processed:
Then, you can simply use the trigger text as an instruction:
This mechanism allows you to create as many such command-to-prompt mappings as you need, both globally or mode-specifically. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I thought Roo had this feature but upon researching I did not find it.
The use case is I have an MCP server where I want to instruct the AI to save everything it knows about the current session so when starting a new session it can pick up where it left off. I don't want to have to type out the instruction to "save" or "read" each time.
Please add the ability in the UI to create a custom prompt associated with a key combination or specific text to cause the prompt to inject.
Example:
Command: /SaveMCP
Prompt: Use the Qdrant MCP server to save everything you learned during this session. What worked, what didn't work, next steps, etc. Save everything you will need to know to continue with a new session.
Command: /ReadMCP
Prompt: Use the Qdrant MCP to read status from last session and then confirm you understand next steps.
It should allow us to create as many of those as we want. Globally for all projects.
I know i can create a custom mode to kind of do the same thing but I think this addition would be much more powerful and useful
Beta Was this translation helpful? Give feedback.
All reactions