-
Notifications
You must be signed in to change notification settings - Fork 2.7k
new: shortcut to create new task without prompt #10080
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
base: main
Are you sure you want to change the base?
Conversation
Reviewed PR #10080. Found 2 suggestions for improvement:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| "newTask.noPrompt": async () => { | ||
| const visibleProvider = getVisibleProviderOrLog(outputChannel) | ||
|
|
||
| if (!visibleProvider) { | ||
| return | ||
| } | ||
|
|
||
| TelemetryService.instance.captureTitleButtonClicked("plus") | ||
|
|
||
| await visibleProvider.removeClineFromStack() | ||
| await visibleProvider.refreshWorkspace() | ||
| await visibleProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" }) | ||
| // Send focusInput action immediately after chatButtonClicked | ||
| // This ensures the focus happens after the view has switched | ||
| await visibleProvider.postMessageToWebview({ type: "action", action: "focusInput" }) | ||
| }, |
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.
This implementation is identical to plusButtonClicked (lines 88-103). Consider extracting the shared logic into a helper function to avoid duplication and simplify future maintenance. For example:
const handlePlusAction = async () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)
if (!visibleProvider) return
TelemetryService.instance.captureTitleButtonClicked("plus")
await visibleProvider.removeClineFromStack()
await visibleProvider.refreshWorkspace()
await visibleProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })
await visibleProvider.postMessageToWebview({ type: "action", action: "focusInput" })
}Then both commands could use: plusButtonClicked: handlePlusAction, "newTask.noPrompt": handlePlusAction
Fix it with Roo Code or mention @roomote and request a fix.
| { | ||
| "command": "roo-cline.newTask.noPrompt", | ||
| "title": "%command.newTask.noPrompt.title%", | ||
| "category": "%configuration.title%" | ||
| } |
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.
Minor formatting issue: these lines use 4 spaces for indentation while the rest of the file uses tabs. This inconsistency also appears in the new keybinding entry (lines 301-306). Consider reformatting to use tabs for consistency.
Fix it with Roo Code or mention @roomote and request a fix.
Related GitHub Issue
Closes: #10079
Description
Test Procedure
Screenshots / Videos
there are no ui changes
Documentation Updates
I have not written the documentation changes
Get in Touch
lmtr0
Important
Adds
newTask.noPromptcommand to create tasks without prompts, with translations and keybindings.newTask.noPromptcommand inregisterCommands.tsto create tasks without user prompts.newTask.noPromptinpackage.jsonwith keybindingctrl+m ctrl+n.command.newTask.noPrompt.titletopackage.nls.jsonand 18 other language files.This description was created by
for d7dde44. You can customize this summary. It will automatically update as commits are pushed.