Skip to content

Conversation

@liangfung
Copy link
Contributor

Summary

This pull request refactors the autoApprove state management in the VS Code Web UI. The autoApprove state has been moved from a persistent store to a session-based state. This ensures that the auto-approve setting is reset for each new session, preventing unintended tool execution approvals across different tasks.

Key changes include:

  • Removal of autoApprove from the persistent settings store.
  • Introduction of a new session-based store for autoApprove.
  • Updates to components to utilize the new session-based state.
  • Addition of i18n for new UI text.

This change enhances security and user experience by ensuring that the auto-approve setting is intentionally configured for each session.

Test plan

  1. Run the VS Code extension.
  2. Open the settings and enable "Auto Approve".
  3. Start a new task and verify that "Auto Approve" is disabled by default.
  4. Enable "Auto Approve" for the current task.
  5. Close the task and start a new one.
  6. Verify that "Auto Approve" is disabled again for the new task.

🤖 Generated with Pochi

Refactor the `autoApprove` state management by moving it from a persistent store to a session-based state. This ensures that the auto-approve setting is reset for each new session, preventing unintended tool execution approvals across different tasks.

Key changes:
- Removed `autoApprove` from the persistent settings store.
- Introduced a new session-based store for `autoApprove`.
- Updated components to use the new session-based state.
- Added i18n for new UI text.

This change improves security and user experience by ensuring that the auto-approve setting is intentionally set for each session.

🤖 Generated with [Pochi](https://getpochi.com)

Co-Authored-By: Pochi <[email protected]>
@liangfung liangfung requested review from wsxiaoys and zwpaper November 7, 2025 13:39
autoApproveSettings,
subtaskOffhand,
});
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

is this necessary? we already await the persist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to display the persistent success icon for one second

@wsxiaoys wsxiaoys added this pull request to the merge queue Nov 9, 2025
Merged via the queue into main with commit 4b939a8 Nov 9, 2025
3 checks passed
@wsxiaoys wsxiaoys deleted the feat/auto-approve-menu-state branch November 9, 2025 16:26
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.

4 participants