ZIm/crates/assistant_tools/src
Danilo Leal 0be8bf1b12
agent: Improve action confirmation UX (#27932)
This PR makes the command permission prompt part of the tool card and
allow users to straight away change the `always_allow_tool_actions`
setting via the "Always Allow" button from that card. If that button is
clicked, that setting is turned on, and any command that requires
permission from that point on will auto-run.

Additionally, if a bash command spans multiple lines, we show the line
count at the end of the command string. (Note: this is not perfect yet
because it can likely be not visible by default, but we didn't think
this was a major blocker for now. We'll work on improving this next).

### Thread View

<img
src="https://github.com/user-attachments/assets/00f93c39-990f-4b79-84ec-0427b997167f"
width="500"/>

### Settings View

<img
src="https://github.com/user-attachments/assets/52d32435-7c8d-4ab4-a319-6cabc007267b"
width="500"/>


Release Notes:

- N/A

---------

Co-authored-by: Thomas Mickley-Doyle <tmickleydoyle@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-04-02 17:40:49 +00:00
..
bash_tool bash tool: Rename working_directory to cd and improve command wrap (#26702) 2025-03-13 18:29:25 +00:00
batch_tool Add Batch tool call for calling multiple tools (#27621) 2025-03-27 18:21:26 -04:00
code_symbols_tool Add Code Symbols tool (#27733) 2025-03-31 05:13:13 +00:00
copy_path_tool Add copy-path tool (#27371) 2025-03-24 21:21:55 -04:00
create_directory_tool Add Create Directory Tool (#27505) 2025-03-26 11:59:03 -04:00
create_file_tool Add create-file-tool (#27381) 2025-03-25 10:56:41 -04:00
delete_path_tool Delete tool uses paths instead of globs (#26715) 2025-03-16 11:58:25 +01:00
diagnostics_tool assistant2: Change system prompt to discourage doom loops (#27781) 2025-03-31 14:03:47 +00:00
edit_files_tool chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
fetch_tool assistant_tools: Add fetch tool (#26999) 2025-03-18 16:25:51 +00:00
find_replace_tool assistant2: Fail find-replace tool if both strings are equal (#27783) 2025-03-31 14:23:46 +00:00
list_directory_tool Add ListDirectoryTool (#26549) 2025-03-12 15:17:12 +00:00
move_path_tool Add move_path tool (#27366) 2025-03-24 14:45:19 +00:00
open_tool Add Open Tool (#27499) 2025-03-27 18:20:59 -04:00
path_search_tool Paginate regex and path search tools (#26997) 2025-03-18 15:44:41 +00:00
read_file_tool Remove list_worktrees and use relative paths instead (#26546) 2025-03-12 15:06:04 +00:00
regex_search_tool Add symbol info tool (#27742) 2025-03-31 00:23:03 -04:00
symbol_info_tool Add symbol info tool (#27742) 2025-03-31 00:23:03 -04:00
thinking_tool Add thinking tool (#26675) 2025-03-14 16:26:22 -04:00
assistant_tools.rs Add tool calling support for Gemini models (#27772) 2025-03-31 17:46:42 +02:00
bash_tool.rs agent: Improve action confirmation UX (#27932) 2025-04-02 17:40:49 +00:00
batch_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
code_symbol_iter.rs Add Code Symbols tool (#27733) 2025-03-31 05:13:13 +00:00
code_symbols_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
copy_path_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
create_directory_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
create_file_tool.rs Avoid requiring confirmation for tools that edit buffers (#27923) 2025-04-02 15:13:16 +00:00
delete_path_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
diagnostics_tool.rs assistant2: Adjust icons for some tools (#27814) 2025-03-31 20:12:51 -03:00
edit_files_tool.rs Avoid requiring confirmation for tools that edit buffers (#27923) 2025-04-02 15:13:16 +00:00
fetch_tool.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
find_replace_file_tool.rs Avoid requiring confirmation for tools that edit buffers (#27923) 2025-04-02 15:13:16 +00:00
list_directory_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
move_path_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
now_tool.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
open_tool.rs assistant2: Adjust icons for some tools (#27814) 2025-03-31 20:12:51 -03:00
path_search_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
read_file_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
regex_search_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
replace.rs Improve tracking for agent edits (#27857) 2025-04-01 22:13:28 +00:00
schema.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
symbol_info_tool.rs assistant2: Use snake_case for tool names (#27903) 2025-04-02 12:17:58 +02:00
thinking_tool.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00