Skip to content

Revert "Add save_file and restore_file_from_disk agent tools"#44949

Merged
benbrandt merged 1 commit intomainfrom
revert-44789-fix-save-on-cancel
Dec 16, 2025
Merged

Revert "Add save_file and restore_file_from_disk agent tools"#44949
benbrandt merged 1 commit intomainfrom
revert-44789-fix-save-on-cancel

Conversation

@nathansobo
Copy link
Contributor

@nathansobo nathansobo commented Dec 16, 2025

Reverts #44789

Need to fix a bug

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 16, 2025
@benbrandt benbrandt merged commit 9c32c29 into main Dec 16, 2025
25 checks passed
@benbrandt benbrandt deleted the revert-44789-fix-save-on-cancel branch December 16, 2025 08:53
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 16, 2025
nathansobo added a commit that referenced this pull request Dec 16, 2025
This re-introduces the save_file and restore_file_from_disk agent tools
that were reverted in #44949. The revert was needed to unblock the build,
but the actual issue was a missed step: the tools weren't added to the
default profile settings in default.json.

Changes:
- Add save_file and restore_file_from_disk to the 'write' profile in default.json
- Add Thread::has_tool() method to check tool availability at runtime
- Make edit_file_tool's dirty buffer error message conditional on whether
  save_file/restore_file_from_disk tools are available
- Update test to match new conditional error message behavior
nathansobo added a commit that referenced this pull request Dec 16, 2025
This re-introduces the `save_file` and `restore_file_from_disk` agent
tools that were reverted in #44949.

I pushed that original PR without trying it just to get the build off my
machine, but I had missed a step: the tools weren't added to the default
profile settings in `default.json`, so they were never enabled even
though the code was present.

## Changes

- Add `save_file` and `restore_file_from_disk` to the "write" profile in
`default.json`
- Add `Thread::has_tool()` method to check tool availability at runtime
- Make `edit_file_tool`'s dirty buffer error message conditional on
whether `save_file`/`restore_file_from_disk` tools are available (so the
agent gets appropriate guidance based on what tools it actually has)
- Update test to match new conditional error message behavior

Release Notes:

- Added `save_file` and `restore_file_from_disk` agent tools to handle
dirty buffers when editing files
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…es#45005)

This re-introduces the `save_file` and `restore_file_from_disk` agent
tools that were reverted in zed-industries#44949.

I pushed that original PR without trying it just to get the build off my
machine, but I had missed a step: the tools weren't added to the default
profile settings in `default.json`, so they were never enabled even
though the code was present.

## Changes

- Add `save_file` and `restore_file_from_disk` to the "write" profile in
`default.json`
- Add `Thread::has_tool()` method to check tool availability at runtime
- Make `edit_file_tool`'s dirty buffer error message conditional on
whether `save_file`/`restore_file_from_disk` tools are available (so the
agent gets appropriate guidance based on what tools it actually has)
- Update test to match new conditional error message behavior

Release Notes:

- Added `save_file` and `restore_file_from_disk` agent tools to handle
dirty buffers when editing files
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…es#45005)

This re-introduces the `save_file` and `restore_file_from_disk` agent
tools that were reverted in zed-industries#44949.

I pushed that original PR without trying it just to get the build off my
machine, but I had missed a step: the tools weren't added to the default
profile settings in `default.json`, so they were never enabled even
though the code was present.

## Changes

- Add `save_file` and `restore_file_from_disk` to the "write" profile in
`default.json`
- Add `Thread::has_tool()` method to check tool availability at runtime
- Make `edit_file_tool`'s dirty buffer error message conditional on
whether `save_file`/`restore_file_from_disk` tools are available (so the
agent gets appropriate guidance based on what tools it actually has)
- Update test to match new conditional error message behavior

Release Notes:

- Added `save_file` and `restore_file_from_disk` agent tools to handle
dirty buffers when editing files
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
…es#45005)

This re-introduces the `save_file` and `restore_file_from_disk` agent
tools that were reverted in zed-industries#44949.

I pushed that original PR without trying it just to get the build off my
machine, but I had missed a step: the tools weren't added to the default
profile settings in `default.json`, so they were never enabled even
though the code was present.

## Changes

- Add `save_file` and `restore_file_from_disk` to the "write" profile in
`default.json`
- Add `Thread::has_tool()` method to check tool availability at runtime
- Make `edit_file_tool`'s dirty buffer error message conditional on
whether `save_file`/`restore_file_from_disk` tools are available (so the
agent gets appropriate guidance based on what tools it actually has)
- Update test to match new conditional error message behavior

Release Notes:

- Added `save_file` and `restore_file_from_disk` agent tools to handle
dirty buffers when editing files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants