Skip to content

Conversation

stea9499
Copy link

@stea9499 stea9499 commented Nov 1, 2024

Description

Add setting to always approve write and execute operations.

Related Issues

N/A

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Other

Screenshots/How Has This Been Tested?

New settings UI:

cline_settings

Example task which doesn't prompt for write or execute permissions:

task_with_write_or_execute

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🚀

Copy link

@ellipsis-dev ellipsis-dev bot left a 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 in 10 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 checking alwaysAllowWrite and alwaysAllowExecute before calling askApproval 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 in Cline.ts has multiple instances where the askApproval function is used to check for user approval before proceeding with certain actions. However, the logic for checking alwaysAllowWrite and alwaysAllowExecute is repeated multiple times. This can be refactored to improve code readability and maintainability.
2. src/core/Cline.ts:1507
3. src/core/Cline.ts:1116
4. src/core/Cline.ts:1093
5. src/core/Cline.ts:110
6. src/core/Cline.ts:96

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) {
Copy link

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.

@@ -45,6 +45,8 @@ type GlobalStateKey =
| "lastShownAnnouncementId"
| "customInstructions"
| "alwaysAllowReadOnly"
Copy link

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.

@stea9499 stea9499 merged commit 9ff9e6f into main Nov 1, 2024
mrubens pushed a commit that referenced this pull request Mar 5, 2025
Syncing sbc-roo-code main branch
mrubens pushed a commit that referenced this pull request Mar 11, 2025
mrubens pushed a commit that referenced this pull request Mar 15, 2025
@jtgsystems jtgsystems mentioned this pull request Apr 4, 2025
@XD1amond XD1amond mentioned this pull request May 14, 2025
4 tasks
@axmo axmo mentioned this pull request Jun 4, 2025
4 tasks
@sjf126 sjf126 mentioned this pull request Jul 22, 2025
6 tasks
roomote bot pushed a commit that referenced this pull request Sep 4, 2025
… 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
mrubens pushed a commit that referenced this pull request Sep 4, 2025
… 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]>
mtone pushed a commit to mtone/Roo-Code that referenced this pull request Sep 7, 2025
… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants