Environment
- mcphub.nvim version: latest
- Neovim version: 0.11+
- OS: Linux
- Chat plugin: CodeCompanion.nvim
Description
When write_file targets a path that doesn't exist yet, the file and any parent directories are created on disk before the interactive diff is shown. If the user rejects all changes, the empty file and directories remain.
Steps to Reproduce
- In a chat with the
neovim tools enabled, ask the LLM to create a new file (e.g. lua/foo/bar.lua)
- The interactive diff UI appears — reject all changes
- The empty file and parent directory still exist on disk
Expected Behavior
Rejecting changes should leave the filesystem unchanged. No file or directory should be created.