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

bug: User input split gets cleared when toggling with <leader> aa

Open AndreVicencio opened this issue 1 year ago • 4 comments

Describe the bug

While I'm in the middle of writting a prompt in Avante, it's very common scenario to copy some text or get reference from the user's main buffer and I would hide the avante window, Then when I re-open the Avante split my unsent input has now been wiped and I have to do it all again.

My current workaround is to control the Avante split display, instead of invoking it with leader-aa so the split is always present and the buffer is never list.

To reproduce

  1. Open avante side bar with leader-aa
  2. Input some text in the prompt window
  3. Close avante side bar with leader-aa
  4. Open avante side bar with leader-aa

Expected behavior

The Avante user input split buffer should not get reset when toggling with leader-aa

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-treesitter/nvim-treesitter",
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

not relevant

Repro

AndreVicencio avatar Nov 14 '24 07:11 AndreVicencio

This is pretty concerning, as cleared chat means losing a whole conversation context and wasting tokens basically. Just looked up the issues to see if I was missing a history/save feature, apparently not... Is this feature the backlog?

If not, I'm considering just dumping Avante's split's content into a log file in the project. Not ideal, but at least wet keep the trace

Console-buche avatar Dec 08 '24 22:12 Console-buche

To reproduce

1. Open avante side bar with leader-aa

2. Input some text in the prompt window

3. Close avante side bar with leader-aa

4. Open avante side bar with leader-aa

I can confirm this happens to me as well. I think the generated code goes missing when it's mid-generating and not completed before closing the window -- aa

hanpham32 avatar Dec 11 '24 02:12 hanpham32

Tried it even when generation is completed, same issue.

Is it possible this is related to Mac? I'm using a Mac

Jawkx avatar Dec 21 '24 04:12 Jawkx

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 24 '25 02:03 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Mar 30 '25 02:03 github-actions[bot]