-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add options to always approve write and execute operations #1
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
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.
Awesome! 🚀
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.
❌ Changes requested. Reviewed everything up to 3c8a9c0 in 11 minutes and 23 seconds
More details
- Looked at
963
lines of code in10
files - Skipped
1
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. src/core/Cline.ts:1119
- Draft comment:
Consider refactoring the repeated logic for checkingalwaysAllowWrite
andalwaysAllowExecute
before callingaskApproval
into a separate function to improve code readability and maintainability. This pattern is repeated in several places, such as lines 1119, 1527, and 1510. - Reason this comment was not posted:
Confidence changes required:50%
The code inCline.ts
has multiple instances where theaskApproval
function is used to check for user approval before proceeding with certain actions. However, the logic for checkingalwaysAllowWrite
andalwaysAllowExecute
is repeated multiple times. This can be refactored to improve code readability and maintainability.
2. src/core/Cline.ts:1507
- Draft comment:
Consider refactoring the repeated logic for handlingalwaysAllowWrite
,alwaysAllowExecute
, andalwaysAllowReadOnly
flags into a helper function or shared utility to reduce redundancy. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d5818094a05ef707e188c0d5. This applies to other instances in this file as well. - Reason this comment was not posted:
Marked as duplicate.
3. src/core/Cline.ts:1116
- Draft comment:
Consider refactoring the repeated logic for handlingalwaysAllowWrite
,alwaysAllowExecute
, andalwaysAllowReadOnly
flags into a helper function or shared utility to reduce redundancy. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d5818094a05ef707e188c0d5. This applies to other instances in this file as well. - Reason this comment was not posted:
Marked as duplicate.
4. src/core/Cline.ts:1093
- Draft comment:
Consider refactoring the repeated logic for handlingalwaysAllowWrite
,alwaysAllowExecute
, andalwaysAllowReadOnly
flags into a helper function or shared utility to reduce redundancy. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d5818094a05ef707e188c0d5. This applies to other instances in this file as well. - Reason this comment was not posted:
Marked as duplicate.
5. src/core/Cline.ts:110
- Draft comment:
Consider refactoring the repeated logic for handlingalwaysAllowWrite
,alwaysAllowExecute
, andalwaysAllowReadOnly
flags into a helper function or shared utility to reduce redundancy. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d5818094a05ef707e188c0d5. This applies to other instances in this file as well. - Reason this comment was not posted:
Marked as duplicate.
6. src/core/Cline.ts:96
- Draft comment:
Consider refactoring the repeated logic for handlingalwaysAllowWrite
,alwaysAllowExecute
, andalwaysAllowReadOnly
flags into a helper function or shared utility to reduce redundancy. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d5818094a05ef707e188c0d5. This applies to other instances in this file as well. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_Cbit47NFizGGxsdB
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -1052,7 +1059,11 @@ export class Cline { | |||
if (block.partial) { |
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.
Consider refactoring the repeated logic for handling alwaysAllowWrite
, alwaysAllowExecute
, and alwaysAllowReadOnly
flags into a helper function or shared utility to reduce redundancy. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d5818094a05ef707e188c0d5. This applies to other instances in this file as well.
src/core/webview/ClineProvider.ts
Outdated
@@ -45,6 +45,8 @@ type GlobalStateKey = | |||
| "lastShownAnnouncementId" | |||
| "customInstructions" | |||
| "alwaysAllowReadOnly" |
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.
The constant alwaysAllowWrite
is already defined in the codebase, making this a duplicate. Please use the existing definition in src/core/Cline.ts
or src/core/webview/ClineProvider.ts
. Avoid redundancy.
- constant
alwaysAllowWrite
(Cline.ts) - constant
alwaysAllowWrite
(ClineProvider.ts)
Syncing sbc-roo-code main branch
… tools Fixes issue where isWriteProtected was incorrectly passed as the partial flag to task.ask(), causing "Current ask promise was ignored (#1)" error. Both tools now use the askApproval wrapper function which correctly handles the parameter ordering, passing undefined for progressStatus and isWriteProtected as the fourth parameter. Fixes #7648
… tools (#7649) Fixes issue where isWriteProtected was incorrectly passed as the partial flag to task.ask(), causing "Current ask promise was ignored (#1)" error. Both tools now use the askApproval wrapper function which correctly handles the parameter ordering, passing undefined for progressStatus and isWriteProtected as the fourth parameter. Fixes #7648 Co-authored-by: Roo Code <[email protected]>
… tools (RooCodeInc#7649) Fixes issue where isWriteProtected was incorrectly passed as the partial flag to task.ask(), causing "Current ask promise was ignored (RooCodeInc#1)" error. Both tools now use the askApproval wrapper function which correctly handles the parameter ordering, passing undefined for progressStatus and isWriteProtected as the fourth parameter. Fixes RooCodeInc#7648 Co-authored-by: Roo Code <[email protected]>
Description
Add setting to always approve write and execute operations.
Related Issues
N/A
Type of Change
Screenshots/How Has This Been Tested?
New settings UI:
Example task which doesn't prompt for write or execute permissions: