-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Add support for custom instructions paths in custom mode config #2374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
2df5462 to
2bba94c
Compare
|
@snoyiatk thanks for the PR? Does it change anything in your eyes now that we support rules folders, or do you still want more flexibility to point at specific files? |
- Implemented functionality in `custom-instruction.ts` to handle loading rules from custom instruction paths. - Refactored and fixed previously incorrect logic in `custom-instruction.ts` for better reliability and maintainability. (comment in RooCodeInc#2354) - Enhanced `system.ts` to pass custom instruction paths to `addCustomInstructions`. - Extended `roo-code.d.ts` and `types.ts` to include `customInstructionsPaths` in `ModeConfig`. - Modified `index.ts` schema to define `customInstructionsPathsConfigSchema` and integrate it into `ModeConfig`. - Updated `modes.ts` to support `customInstructionsPaths` in mode configuration and full mode details.
|
@mrubens I justed found that new PR #2354 few hours ago, to me it partially resolve (1), so this PR might still help with (2). Also, #2354 currently prioritize |
2bba94c to
63b77a6
Compare
|
Today I tried to refactor RooFlow custom instructions follow our new There are other cases that I found default folder structure couldn't fit and I want to customize the paths as my need. |
|
@mrubens yeah that was one of the solution I considered but ended up didn't choose it. |
|
Hi! I'm new to Roo and experimenting with its configuration. {
"customInstructions": "No rules",
"customInstructionsPaths": [
"~/.roo/ask-no-code/system-prompt-ask-no-code"
],
"groups": [
"read"
],
"name": "Ask(No System)",
"roleDefinition": "You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution.",
"slug": "ask-no-code",
"source": "global"
}I’m using the global Currently, it seems the only way to replace the system prompt is by adding a I have a suggestion to omit default roo code system prompt for mode like this: {
"customInstructions": "No rules",
"defaultSystemPrompt": false,
"customInstructionsPaths": [
"~/.roo/00-common/00-system-info",
"~/.roo/30-test/system-prompt-test"
],
"groups": [
"read"
],
"name": "Ask(No System)",
"roleDefinition": "You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution.",
"slug": "ask-no-code",
"source": "global"
}This way we can add back customize system prompt by ourself Thank you anyway! |
|
Edit: don't do this @fatihaziz you can globally override prompts for the built-in modes by editing global modes and placing a mode in with the same slug: |
|
@fatihaziz I lied, don't do this, it updates the UI but the agent is not passed the instructions which is very sad and a bug |
ohh ok haha,, i have tried it, when I check the preview prompt. the solition is not replacing built in instruction. instead it adds as additional prompt |
|
Hey @snoyiatk, |
Context
Add support to config multiple rule files for custom mode.
Adapting rules configuration allow user to easily switch between agent/assistant-tools without having to clone-duplicate rules. This promote user to try roo without too much hassle/workflow changes.
(Eg user can create rule in clines/cursor and re-use that rules in roo).
Usage
Define
customInstructionsPathsin custom-mode configuration.Path is array of
stringor{ path: string, isAbsolute?: boolean }Path can be file or directory (roo will read all files in directory recursively if path is directory)
Sample
Implementation
modeConfigSchemacustom-instruction.ts, updateaddCustomInstructionsto load rule files base on configurationImportant
Adds support for specifying multiple rule files in custom mode configurations via
customInstructionsPaths, updating relevant functions and schemas.customInstructionsPathsin custom mode configurations, allowing multiple rule files.addCustomInstructionsincustom-instructions.tsto load rules from specified paths, handling both files and directories.modeConfigSchemainschemas/index.tsto includecustomInstructionsPaths.GlobalSettingsandModeConfigtypes inroo-code.d.tsandtypes.tsto includecustomInstructionsPaths.generatePromptandSYSTEM_PROMPTinsystem.tsto passcustomInstructionsPathstoaddCustomInstructions.This description was created by
for d5e3791c025feb0d65327e08ec1e13ae4602d76b. It will automatically update as commits are pushed.