-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: add run_slash_command tool for executing slash commands #7473
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fdbf72d
feat: add run_slash_command tool for executing slash commands
roomote 6ba989a
Fixes
mrubens 3bc90d5
Merge remote-tracking branch 'origin/main' into feat/add-run-slash-co…
mrubens fa8da51
feat: add experimental flag for run_slash_command tool
mrubens 187375c
Tweaks to display and copy
mrubens 98ee237
Add translations
mrubens 01de0ad
Fix type
mrubens 2a18e22
Tweak prompt
mrubens df89bc8
fix: resolve failing tests for run_slash_command feature
daniel-lxs ec2247a
fix: update run_slash_command tool display to match apply_diff style
daniel-lxs 33d4549
fix: add providerRef mock to runSlashCommandTool tests
daniel-lxs 7aa06d5
fix: use camelCase for runSlashCommand tool to enable auto-approval
daniel-lxs 246d731
fix: update webview-ui tests to use camelCase runSlashCommand
daniel-lxs 712434f
fix: update test assertions to match component rendering
roomote File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /** | ||
| * Generates the run_slash_command tool description. | ||
| */ | ||
| export function getRunSlashCommandDescription(): string { | ||
| return `## run_slash_command | ||
| Description: Execute a slash command to get specific instructions or content. Slash commands are predefined templates that provide detailed guidance for common tasks. Commands can be built-in, defined globally, or project-specific. | ||
|
|
||
| Parameters: | ||
| - command: (required) The name of the slash command to execute (e.g., "init", "test", "deploy") | ||
| - args: (optional) Additional arguments or context to pass to the command | ||
|
|
||
| Usage: | ||
| <run_slash_command> | ||
| <command>command_name</command> | ||
| <args>optional arguments</args> | ||
| </run_slash_command> | ||
|
|
||
| Examples: | ||
|
|
||
| 1. Running the init command to analyze a codebase: | ||
| <run_slash_command> | ||
| <command>init</command> | ||
| </run_slash_command> | ||
|
|
||
| 2. Running a command with additional context: | ||
| <run_slash_command> | ||
| <command>test</command> | ||
| <args>focus on integration tests</args> | ||
| </run_slash_command> | ||
|
|
||
| Note: Available commands depend on the project and global configuration. The tool will list available commands if an invalid command is specified. Commands can be: | ||
| - Built-in: Predefined commands like "init" for codebase analysis | ||
| - Global: Custom commands defined in ~/.roo/commands/ | ||
| - Project: Project-specific commands defined in .roo/commands/ | ||
|
|
||
| The command content will be returned for you to execute or follow as instructions.` | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we mention in the description that commands are executed in priority order (project > global > built-in)? This would help users understand which command will be executed when there are multiple commands with the same name: