ZIm/crates/assistant_tool/src
Oleksiy Syvokon c7158f0bd7
Improve distinguishing user from agent edits (#34716)
We no longer rely on the `author` field to tell if a change was made by
the user or the agent. The `author` can be set to `User` in many
situations that are not really user-made edits, such as saving a file,
accepting a change, auto-formatting, and more. I started tracking and
fixing some of these cases, but found that inspecting changes in
`diff_base` is a more reliable method.

Also, we no longer show empty diffs. For example, if the user adds a
line and then removes the same line, the final diff is empty, even
though the buffer is marked as user-changed. Now we won't show such
edit.

There are still some issues to address:

- When a user edits within an unaccepted agent-written block, this
change becomes a part of the agent's edit. Rejecting this block will
lose user edits. It won't be displayed in project notifications, either.

- Accepting an agent block counts as a user-made edit.

- Agent start to call `project_notifications` tool after seeing enough
auto-calls.

Release Notes:

- N/A
2025-07-22 14:23:50 +03:00
..
action_log.rs Improve distinguishing user from agent edits (#34716) 2025-07-22 14:23:50 +03:00
assistant_tool.rs Fix typo in assistant_tool.rs (#32207) 2025-06-06 05:23:25 +00:00
outline.rs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
tool_registry.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tool_schema.rs tools: Ensure properties always exists in JSON Schema (#34015) 2025-07-07 15:34:14 +00:00
tool_working_set.rs agent: Fix issue with duplicated tool names from MCP servers (#33811) 2025-07-02 20:32:07 +00:00