avante.nvim icon indicating copy to clipboard operation
avante.nvim copied to clipboard

bug: Screenshots being pasted outside of project directory with no access

Open workflow opened this issue 2 months ago • 0 comments

Describe the bug

When I paste a screenshot into Avante, it gets copied to $HOME/.local/state/nvim/avante/pasted_images/ and the str_replace_based_edit_tool(view) tool (Claude Sonnet 4.5 in this case) doesn't have access to it since that's outside of the current project directory.

To reproduce

Paste an image into Avante.

Expected behavior

Avante can access the image.

Installation method

Use lazy.nvim:

{
  "yetone/avante.nvim",
  event = "VeryLazy",
  lazy = false,
  version = false, -- set this if you want to always pull the latest change
  opts = {
    -- add any opts here
  },
  -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
  build = "make",
  -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
  dependencies = {
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

❯ nvim -v NVIM v0.11.4 Build type: Release LuaJIT 2.1.1741730670 Run "nvim -V1 -v" for more info

❯ uname -a Linux numenor 6.17.2-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 x86_64 GNU/Linux

Avante is 0.0.27-unstable-2025-10-06

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    -- add any other plugins here
  },
})

workflow avatar Nov 03 '25 17:11 workflow