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

bug: false-positive warning for secret input

Open andreihh opened this issue 6 months ago • 8 comments

Describe the bug

There are 3 supported input providers:

  • native vim.ui.input
  • https://github.com/stevearc/dressing.nvim (archived, should only be provided for backwards compatibility)
  • https://github.com/folke/snacks.nvim

When inputting a secret (e.g., API key) with the native provider, a warning message is issued.

However, vim.ui.select is automatically set to snacks.input, and snacks.nvim must be loaded eagerly.

This means that adding an explicit dependency on snacks.nvim and setting the input.provider to snacks is not necessary, the native vim.ui.select is already using snacks.input, and the warning is a false-positive.

To reproduce

Start avante.nvim (e.g., with :AvanteChat) without setting any API keys in the environment to prompt inputting a key explicitly.

Expected behavior

Proposal: offer an input.silent option to suppress warnings.

Installation method

Use lazy.nvim:

{
  "yetone/avante.nvim",
  event = "VeryLazy",
  opts = {},
  build = "make",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

Neovim version: v0.11.2 OS: Ubuntu 25.04

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 = {
    {
      "yetone/avante.nvim",
      event = "VeryLazy",
      opts = {},
      build = "make",
      dependencies = {
        "nvim-lua/plenary.nvim",
        "MunifTanjim/nui.nvim",
      },
    },
    {
      "folke/snacks.nvim",
      priority = 1000,
      lazy = false,
      opts = {
        input = {}, -- Automatically enabled and registered as `vim.ui.select`
      }
    }
  },
})

andreihh avatar Jun 29 '25 09:06 andreihh

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 Jul 30 '25 02:07 github-actions[bot]

Issue is not stale.

andreihh avatar Jul 30 '25 20:07 andreihh

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 Aug 31 '25 02:08 github-actions[bot]

Issue is not stale.

andreihh avatar Aug 31 '25 10:08 andreihh

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 Oct 02 '25 02:10 github-actions[bot]

Issue is not stale.

andreihh avatar Oct 03 '25 13:10 andreihh

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 Nov 03 '25 02:11 github-actions[bot]

Issue is not stale.

andreihh avatar Nov 03 '25 08:11 andreihh

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 Dec 04 '25 02:12 github-actions[bot]

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

github-actions[bot] avatar Dec 09 '25 02:12 github-actions[bot]