Skip to content

Add search.confirmReplaceAll setting to disable Replace All confirmation dialog #251760

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 17, 2025

This PR adds a new configuration option search.confirmReplaceAll that allows users to disable the confirmation dialog for "Replace All" operations in the Search view, similar to existing Explorer confirmation settings like explorer.confirmDelete and explorer.confirmDragAndDrop.

Changes

  • Configuration: Added search.confirmReplaceAll boolean setting with default value true
  • Interface: Updated ISearchConfigurationProperties to include the new optional property
  • Logic: Modified SearchView.replaceAll() method to conditionally show confirmation dialog based on configuration
  • Testing: Added comprehensive unit tests covering all configuration scenarios

Usage

Users can now add the following to their VS Code settings to disable the Replace All confirmation:

{
  "search.confirmReplaceAll": false
}

Behavior

  • true (default): Shows confirmation dialog before replace all operations (preserves existing behavior)
  • false: Proceeds directly with replace all without showing confirmation dialog
  • undefined/null: Defaults to showing confirmation dialog

Implementation Details

The implementation follows established VS Code patterns:

  • Uses the same configuration structure as other confirmation settings
  • Maintains backward compatibility by defaulting to true
  • Extracts replace logic into a reusable function to avoid code duplication
  • Uses the same configuration access pattern as other search settings

Fixes #250272.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits June 17, 2025 22:41
Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Allow to disable Replace All confirmation Add search.confirmReplaceAll setting to disable Replace All confirmation dialog Jun 17, 2025
@Copilot Copilot AI requested a review from osortega June 17, 2025 22:45
Copilot finished work on behalf of osortega June 17, 2025 22:45
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.

Allow to disable Replace All confirmation
2 participants