Replace always_allow_tool_actions with tool_permissions.default#48553
Merged
Replace always_allow_tool_actions with tool_permissions.default#48553
always_allow_tool_actions with tool_permissions.default#48553Conversation
0ceb5f2 to
12396ad
Compare
- Add copy_path tool to permissions configuration - Replace local RuleType enum with ToolPermissionMode from settings crate - Improve rule summary display (singular "1 rule", show invalid count) - Add terminal command parsing preview (using extract_commands to match engine behavior) - Add verdict label showing authoritative permission decision - Log disagreements between pattern preview and engine verdict - Display invalid regex patterns section with error details - Add regex validation error banner with dismiss action - Add compile-time validated tool_index for macro-generated render functions - Update SettingsInputField with clear_on_confirm and editor reconciliation fix - Rename "Configure Tool Rules" to "Tool Permissions" in navigation - Update move_path/copy_path regex explanations for multi-input tools - Add test validating all tools have ToolInfo entries or exclusions
cfdc048 to
fad4554
Compare
… message Instead of displaying the raw regex patterns (which are very long and hard to read), show a concise human-readable message: `rm -rf` on `/`, `~`, `$HOME`, `.`, and `..` are always blocked. The backtick-delimited code spans are rendered with code background highlighting using StyledText. The same message is shown when the verification section detects a hardcoded security rule denial.
fad4554 to
7ab9b18
Compare
with_default_highlights expects non-overlapping sorted ranges. The whole-range color highlight overlapped with the code span highlights, causing 'invalid text run' panic. Set text color on parent div instead.
with_default_highlights captures the text style eagerly at call time, before the parent div's .text_color() takes effect during layout. Switch to with_highlights which defers to layout time, so the text color set on the parent div is properly inherited.
- Add global default permission mode to tool_permissions settings - Change per-tool default_mode to optional default (falls back to global) - Change ToolPermissionContext inputs from single string to Vec<String> - Add settings migration (m_2026_02_04) for old → new schema - Add restore_file_from_disk tool permission support - Remove always_allow_tool_actions setting - Add global default mode selector to settings UI - Update documentation
7ab9b18 to
4ae7f38
Compare
Base automatically changed from
pr/tool-permissions-settings-ui-improvements
to
main
February 10, 2026 15:30
…chema-redesign # Conflicts: # crates/agent/src/tests/mod.rs # crates/agent/src/tools/subagent_tool.rs # crates/settings_ui/src/pages/tool_permissions_setup.rs
- Create dedicated docs/src/ai/tool-permissions.md reference page - Add cross-links from SUMMARY, overview, privacy-and-security, agent-panel, mcp - Simplify inline tool permissions docs in agent-settings.md (link to new page) - Add restore_file_from_disk, save_file, subagent to tools.md - Fix model name (gpt-5-mini), font size setting name (agent_ui_font_size), single_file_review default (true), model_parameters JSON wrapping - Clarify that per-tool regex patterns only apply to native Zed agent - Add doc comments on ToolPermissions::default field
- Reject empty regex patterns in compile_regex_rules (security fix) - Expand tool permissions documentation (agent-settings.md, agent-panel.md, mcp.md) - Update settings content doc comments and default.json comments - Add tests: empty regex validation, default.json parsing, explicit global default, precedence - Replace .ok()/let _ = with .log_err() in visual_test_runner.rs - Add doc comments on HardcodedSecurityRules and clarifying test comments
…laude Code and Codex When always_allow_tool_actions was true, also set: - agent_servers.claude.default_mode = "bypassPermissions" - agent_servers.codex.default_mode = "full-access" This preserves the auto-accept behavior for ACP agents that was previously provided by always_allow_tool_actions. Without this, users who had always_allow_tool_actions: true would be prompted for every ACP agent tool call after the migration, since the new tool_permissions.default setting only applies to Zed's built-in agent.
Replace convoluted std::mem::take + unwrap_or_default + unreachable! pattern with direct pattern matching. Drop the entry API in favor of a matches! check for absent/null followed by get_mut, making the flow linear and eliminating the intermediate null insertion.
The migrate_tool_permission_defaults migration no longer touches agent_servers, so remove agent_servers from expected test outputs where it wasn't in the input, and update comments accordingly.
morgankrey
added a commit
that referenced
this pull request
Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have generated for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
added a commit
that referenced
this pull request
Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have generated for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
added a commit
that referenced
this pull request
Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have generated for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
added a commit
that referenced
this pull request
Feb 14, 2026
Example output showing what the docs-suggest automation would generate for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Files: - docs/.suggestions/v0.224-suggestions.md: Raw suggestion output - docs/src/update.md: Update notification UI documentation - docs/src/vim.md: Added :bdelete command - docs/src/dev-containers.md: Root config file location support Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the boolean
always_allow_tool_actionssetting with a three-valuedtool_permissions.defaultfield ("allow"/"confirm"/"deny").Release Notes:
always_allow_tool_actionssetting withtool_permissions.default.