-
Notifications
You must be signed in to change notification settings - Fork 2.6k
add new task command #1648
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
add new task command #1648
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ada4513
add new task command
qdaxb 9087566
Merge remote-tracking branch 'origin/main' into support_new_task_command
mrubens e89441e
Internationalize
mrubens c139dd3
Revert README changes
mrubens 3dec327
More i18n
mrubens 3820db6
Fix tests
mrubens cc5912c
Fix i18n
mrubens a7ca93e
Missing translations
mrubens 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import * as vscode from "vscode" | ||
| import { COMMAND_IDS } from "../core/CodeActionProvider" | ||
| import { ClineProvider } from "../core/webview/ClineProvider" | ||
|
|
||
| export const handleNewTask = async (params: { prompt?: string } | null | undefined) => { | ||
| let prompt = params?.prompt | ||
| if (!prompt) { | ||
| prompt = await vscode.window.showInputBox({ | ||
| prompt: "What should Roo do?", | ||
| placeHolder: "Type your task here", | ||
| }) | ||
| } | ||
| if (!prompt) { | ||
| await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus") | ||
| return | ||
| } | ||
|
|
||
| await ClineProvider.handleCodeAction(COMMAND_IDS.NEW_TASK, "NEW_TASK", { | ||
| userInput: prompt, | ||
| }) | ||
| } |
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
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.
Does it need to be added here?
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.
Just thinking that this adds another tab at the bottom of the prompts view right?
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.
In my scenario, other plugins will send tasks to Roo, and I hope Roo can define its own prompt words when receiving instructions from other plugins.
In addition, because this pr also supports users to create tasks directly through the command palette, this option can also be used for users to define their own "quick start" prompt words.
Uh oh!
There was an error while loading. Please reload this page.
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.
Does this work for the problem you're trying to solve?
https://github.com/RooVetGit/Roo-Code/blob/878b3820d2f41809f6063c5c54597d6bf0d3c591/src/exports/roo-code.d.ts#L24-L31
This should allow other extensions to interface with Roo Code. Or is it more convenient to use an action?
Uh oh!
There was an error while loading. Please reload this page.
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.
API can meet the needs, but I think command is more convenience. it can be called from the command palette, shortcut keys, other plugins or the command line