Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: issues building on aarch64 within a proot-distro alias of Debian GNU/Linux proot chroot in an unrooted Termux #890

Open
b9Joker108 opened this issue Nov 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@b9Joker108
Copy link

b9Joker108 commented Nov 23, 2024

Describe the bug

Issues building on aarch64 within a proot-distro alias of Debian GNU/Linux proot chroot guest of an unpriviliged user in an unrooted Termux host environment. I have pretty much the same bug as this other Android Termux user:

#879

I have left a comment on the closed issue for them to respond, outlining if they could please advise how they resolved the issue, as they have not included any specifics when they closed the issue to say how it was resolved.

The error from within Noice:

Error executing vim.schedule lua callback: 
...my.neovim.config/lazy/avante.nvim/lua/avante/            
repo_map.lua:23: Failed to load avante_repo_map     
L 4 stack traceback:                                                                                    

3 > [C]: in function 'error'                                                                     
2 > ...my.neovim.config/lazy/avante.nvim/lua/avante/repo_map.lua:23: in function ''
1 > vim/_editor.lua: in function ''                                                                   

7 > vim/_editor.lua: in function <vim/_editor.lua:0>

Now, I tweaked a few files of the install in ~/.local..., as follows to get a successful build manually:

  1. Cargo.toml

    • Filepath: /home/hummingbird108/.local/share/b9Joker108/my.neovim.config/lazy/avante.nvim/Cargo.toml
  2. lib.rs

    • Filepath: /home/hummingbird108/.local/share/b9Joker108/my.neovim.config/lazy/avante.nvim/crates/avante-templates/src/lib.rs

Here's a summary of the tweaks made to the avante.nvim plugin to get it to build:

  1. Apply changes to Cargo.toml

    • Purpose: Added mlua dependency with specific features to ensure compatibility with Lua 5.4 and module support.
  2. Update lib.rs

    • Purpose: Integrated mlua and minijinja libraries.
    • Changes:
      • Defined a new State struct to handle the environment with a mutex for thread safety.
      • Created TemplateContext struct for template rendering.
      • Implemented render and initialize functions for rendering templates and initializing the environment.
      • Added avante_templates function to register the Lua module with the required functionality.
      • Included a helper function from_value to convert Lua values to TemplateContext.
  3. Rebuild the plugin

    • Command: Navigated to the plugin directory and executed cargo build --release to compile the plugin with the new changes.

But, I am not sure how best to apply this fix to the automatically generated builds requested from avante.lua going forward and also, even whether I should instigate a patch and dynamic build shell script to handle this process or if there is more appropriate and elegant solution. My Lua, Rust, Cargo and Neovim skills are not very refined and I am far from even being of intermediate level, but I give it a go.

To reproduce

I got most of this code from another user who included it in Discussion and adapted it:

(/home/hummingbird108/python_home) ai|debian_proot_termux_nvim⚡ ⇒ cat avante.lua
-- /lua/plugins/extras/coding/ai/avante.lua                                                           
return {                                                                                                  
    {
        "yetone/avante.nvim",
        event = "VeryLazy",
        lazy = false,
        version = false, -- set this if you want to always pull the latest changes
        opts = {
            provider = "ollama",
            use_absolute_path = true,                                                                             
            vendors = {
                ---@type AvanteProvider
                ollama = {
                    ['local'] = true,
                    endpoint = "http://127.0.0.1:11434", -- Updated to match your endpoint
                    model = "qwen2.5-coder:1.5b",          -- Updated to your specific model
                    parse_curl_args = function(opts, code_opts)
                        return {
                            url = opts.endpoint .. "/chat/completions",
                            headers = {
                                ["Accept"] = "application/json",
                                ["Content-Type"] = "application/json",
                                ['x-api-key'] = 'ollama',
                            },
                            body = {
                                model = opts.model,
                                messages = require("avante.providers").copilot.parse_message(code_opts),
                                max_tokens = 4096,                -- Updated to match your max_tokens
                                temperature = 0.6,  -- Adjusted from 60 to 0.6 for proper scaling
                                stream = true,
                            },
                        }
                    end,
                    parse_response_data = function(data_stream, event_state, opts)
                        require("avante.providers").openai.parse_response(data_stream, event_state, opts)
                    end,
                },
            },
            behaviour = {
                auto_suggestions = false, -- Experimental stage
                auto_set_highlight_group = true,
                auto_set_keymaps = true,
                auto_apply_diff_after_generation = false,                                                             
                support_paste_from_clipboard = true,
            },
            mappings = {
                --- @class AvanteConflictMappings
                diff = {
                    ours = 'co',                                                                                       
                    theirs = 'ct',
                    all_theirs = 'ca',
                    both = 'cb',
                    cursor = 'cc',
                    next = ']x',
                    prev = '[x',
                },                                                                                                    
                suggestion = {
                    accept = '<M-l>',
                    next = '<M-]>',
                    prev = '<M-[>',
                    dismiss = '<C-]>',
                },
                jump = {
                    next = ']]',
                    prev = '[[',                                                                                      },
                submit = {
                    normal = '<CR>',
                    insert = '<C-s>',                                                                                 },
            },
            hints = { enabled = true },
            windows = {                                                                                               ---@type "right" | "left" | "top" | "bottom"
                position = 'right',   -- the position of the sidebar
                wrap = true,          -- similar to vim.o.wrap
                width = 30,           -- default % based on available width
                sidebar_header = {
                    align = 'center', -- left, center, right for title
                    rounded = true,
                },
            },
            highlights = {
                ---@type AvanteConflictHighlights
                diff = {
                    current = 'DiffText',
                    incoming = 'DiffAdd',
                },
            },
            --- @class AvanteConflictUserConfig
            diff = {
                autojump = true,
                ---@type string | fun(): any
                list_opener = 'copen',
            },
        },
        -- Build from source if necessary
        build = "make BUILD_FROM_SOURCE=true",
        -- dependencies required for full functionality
        dependencies = {
            "nvim-treesitter/nvim-treesitter",                                                                    "stevearc/dressing.nvim",
            "nvim-lua/plenary.nvim",
            "MunifTanjim/nui.nvim",
            --- Optional dependencies                                                                             "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
            {
                -- support for image pasting                                                                          "HakonHarnes/img-clip.nvim",
                event = "VeryLazy",
                opts = {
                    -- recommended settings
                    default = {
                        embed_image_as_base64 = false,
                        prompt_for_file_name = false,
                        drag_and_drop = {
                            insert_mode = true,
                        },
                        -- required for Windows users                                                                         use_absolute_path = true,                                                                         },
                },
            },
            {                                                                                                         -- Markdown rendering support
                'MeanderingProgrammer/render-markdown.nvim',
                opts = {
                    file_types = { "markdown", "Avante" },
                },
                ft = { "markdown", "Avante" },
            },
        },
        -- Keybindings for Avante
        keys = {
            {
                "<leader>aa",                                                                                         
function()
                    require("avante.api").ask()
                end,
                desc = "avante: ask",
                mode = { "n", "v" },
            },
            {
                "<leader>ar",
                function()
                    require("avante.api").refresh()
                end,
                desc = "avante: refresh",
            },
            {
                "<leader>ae",
                function()
                    require("avante.api").edit()
                end,
                desc = "avante: edit",
                mode = "v",
            },
        },
    }
}

Expected behavior

I just want a successful, straightforward build. I tweaked with some code in a few files and got it to build successfully through manual intervension, and then saved the tweaks and am contemplating how I can make a dynamic and adaptive patch and script going forward, but I am not adept at any of this and wonder if there isxa quicker, easier, more robust and rigorous solution, because the build happens every time I use Neovim with this plugin enabled.

Installation method

I use the lazy.nvim framework ans the Lazy package manager:

{
  "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",
  },
}

Lazy build failed message:
avante.nvim 1070.69ms  start ■ build failed
cargo build --release --features=luajit -p avante-tokenizers
Compiling proc-macro2 v1.0.86
Compiling unicode-ident v1.0.12
Compiling shlex v1.3.0
Compiling libc v0.2.158
Compiling pkg-config v0.3.30
Compiling cfg-if v1.0.0 Compiling memchr v2.7.4 Compiling cc v1.1.21 Compiling serde v1.0.209 Compiling autocfg v1.3.0
Compiling vcpkg v0.2.15 Compiling byteorder v1.5.0
Compiling crossbeam-utils v0.8.20
Compiling getrandom v0.2.15
Compiling aho-corasick v1.1.3
Compiling quote v1.0.37
Compiling ring v0.17.8
Compiling openssl-sys v0.9.103
Compiling syn v2.0.77
Compiling regex-syntax v0.8.5
Compiling tinyvec_macros v0.1.1
Compiling once_cell v1.19.0
Compiling fnv v1.0.7
Compiling strsim v0.11.1
Compiling ident_case v1.0.1
Compiling tinyvec v1.8.0
Compiling regex-automata v0.4.8
Compiling foreign-types-shared v0.1.1
Compiling rustls-pki-types v1.8.0
Compiling darling_core v0.20.10
Compiling untrusted v0.9.0
Compiling smallvec v1.13.2
Compiling openssl v0.10.66
Compiling serde_derive v1.0.209
Compiling zerocopy-derive v0.7.35
Compiling either v1.13.0
Compiling spin v0.9.8
Compiling darling_macro v0.20.10
Compiling zerocopy v0.7.35
Compiling openssl-macros v0.1.1
Compiling foreign-types v0.3.2
Compiling unicode-normalization v0.1.23
Compiling crossbeam-epoch v0.9.18
Compiling lock_api v0.4.12
Compiling num-traits v0.2.19
Compiling rustls v0.23.12
Compiling rayon-core v1.12.1
Compiling portable-atomic v1.7.0
Compiling percent-encoding v2.3.1
Compiling unicode-bidi v0.3.15
Compiling native-tls v0.2.12
Compiling adler2 v2.0.0
Compiling lazy_static v1.5.0
Compiling log v0.4.22
Compiling parking_lot_core v0.9.10
Compiling bitflags v2.6.0
Compiling serde_json v1.0.127 Compiling rustls-webpki v0.102.7
Compiling miniz_oxide v0.8.0 Compiling idna v0.5.0
Compiling form_urlencoded v1.2.1
Compiling crossbeam-deque v0.8.5
Compiling ppv-lite86 v0.2.20
Compiling darling v0.20.10
Compiling rand_core v0.6.4
Compiling onig_sys v69.8.1
Compiling crc32fast v1.4.2
Compiling zeroize v1.8.1
Compiling paste v1.0.15
Compiling subtle v2.6.1
Compiling ryu v1.0.18
Compiling typeid v1.0.2
Compiling thiserror v1.0.65
Compiling openssl-probe v0.1.5
Compiling bit-vec v0.6.3
Compiling scopeguard v1.2.0
Compiling itoa v1.0.11
Compiling unicode-width v0.1.13
Compiling option-ext v0.2.0
Compiling dirs-sys v0.4.1
Compiling console v0.15.8
Compiling bit-set v0.5.3
Compiling mlua-sys v0.6.4
Compiling flate2 v1.0.33
Compiling rand_chacha v0.3.1
Compiling derive_builder_core v0.20.1
Compiling url v2.5.2
Compiling thiserror-impl v1.0.65
Compiling webpki-roots v0.26.5
Compiling esaxx-rs v0.1.10
Compiling socks v0.3.4
Compiling base64 v0.22.1
Compiling anyhow v1.0.86
Compiling number_prefix v0.4.0
Compiling minimal-lexical v0.2.1
Compiling indicatif v0.17.8
Compiling nom v7.1.3
Compiling ureq v2.10.1
Compiling parking_lot v0.12.3
Compiling ordered-float v2.10.1
Compiling rayon v1.10.0
Compiling derive_builder_macro v0.20.1
Compiling rand v0.8.5
Compiling fancy-regex v0.13.0
Compiling dirs v5.0.1 Compiling itertools v0.11.0
Compiling monostate-impl v0.1.13 Compiling bstr v1.10.0
Compiling regex v1.11.1
Compiling macro_rules_attribute-proc_macro v0.2.0
Compiling unicode-segmentation v1.11.0
Compiling bitflags v1.3.2
Compiling base64 v0.13.1
Compiling monostate v0.1.13
Compiling bstr v1.10.0 Compiling regex v1.11.1
Compiling macro_rules_attribute-proc_macro v0.2.0
Compiling unicode-segmentation v1.11.0
Compiling bitflags v1.3.2
Compiling base64 v0.13.1
Compiling monostate v0.1.13
Compiling rayon-cond v0.3.0
Compiling macro_rules_attribute v0.2.0
Compiling spm_precompiled v0.1.4
Compiling erased-serde v0.4.5
Compiling hf-hub v0.3.2
Compiling derive_builder v0.20.1
Compiling serde-value v0.7.0
Compiling itertools v0.12.1
Compiling mlua_derive v0.10.0
Compiling unicode-normalization-alignments v0.1.12
Compiling rustc-hash v2.0.0
Compiling unicode_categories v0.1.1
Compiling base64 v0.21.7
Compiling rustc-hash v1.1.0
Compiling mlua v0.10.0
Compiling tiktoken-rs v0.6.0
Compiling onig v6.4.0
Compiling tokenizers v0.20.0
nvim/lazy/avante.nvim/crates/avante-tokenizers)
Finished release profile [optimized] target(s) in 1m 28s
cp target/release/libavante_tokenizers.so build/avante_tokenizers.so
cargo build --release --features=luajit -p avante-templates
Compiling version_check v0.9.4
Compiling syn v2.0.77
Compiling v_htmlescape v0.15.8
Compiling bstr v1.10.0 Compiling memo-map v0.3.3
Compiling aho-corasick v1.1.3 Compiling self_cell v1.0.4
Compiling unicode-ident v1.0.12
Compiling unicase v2.7.0
Compiling serde_derive v1.0.209
Compiling mlua_derive v0.10.0
Compiling serde v1.0.209
Compiling serde_json v1.0.127
Compiling erased-serde v0.4.5
Compiling serde-value v0.7.0
Compiling mlua v0.10.0
Compiling minijinja v2.4.0
Compiling avante-templates v0.1.0 (/home/hummingbird108/.local/share/
nvim/lazy/avante.nvim/crates/avante-templates)
Finished release profile [optimized] target(s) in 24.32s
cp target/release/libavante_templates.so build/avante_templates.so
cargo build --release --features=luajit -p avante-repo-map
Compiling tree-sitter-language v0.1.0
Compiling aho-corasick v1.1.3
Compiling regex-syntax v0.8.5
Compiling tree-sitter-c v0.23.1
Compiling tree-sitter-typescript v0.23.0
Compiling tree-sitter-ruby v0.23.0
Compiling tree-sitter-scala v0.23.2
Compiling tree-sitter-javascript v0.23.0
Compiling tree-sitter-lua v0.2.0
Compiling tree-sitter-go v0.23.1
Compiling tree-sitter-rust v0.23.0
Compiling tree-sitter-zig v1.0.2
Compiling tree-sitter-python v0.23.2
Compiling tree-sitter-cpp v0.23.1
Compiling tree-sitter v0.23.0
Compiling regex-automata v0.4.8
make: *** [Makefile:57: luajit-repo-map] Terminated
Process was killed because it reached the timeout
934602b fix: fix installation build in powershell (windows) (24 hours
ago)
341ecd2 feat: minimal diff (#583) (2 days ago)
2863473 fix: do not ignore curl error (#877) (4 days ago)
56ebcad fix: must not be called in a lua loop (#876) (4 days ago)
5dd4254 fix: use relative path (#875) (4 days ago)
d17905a fix(doc): vim-plug missing setup (#873) (4 days ago)
3c010e3 feat: update copilot model version (#872) (5 days ago)
3beed68 fix: copilot url join (#871) (5 days ago)



### Environment

```zsh
(/home/hummingbird108/python_home) ai|debian_proot_termux_nvim⚡ ⇒ nvim -v                            NVIM v0.10.2                                                                                          Build type: Release
LuaJIT 2.1.1713484068                                                                                 Run "nvim -V1 -v" for more info
...
(/home/hummingbird108/python_home) ai|debian_proot_termux_nvim⚡ ⇒ uname -a                           Linux localhost 6.2.1-PRoot-Distro #1 SMP PREEMPT Mon Oct 14 00:51:42 UTC 2024 aarch64 GNU/Linux
...
(/home/hummingbird108/python_home) ai|debian_proot_termux_nvim⚡ ⇒ rustup --version
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.                   info: The currently active `rustc` version is `rustc 1.82.0 (f6e511eec 2024-10-15)`
(/home/hummingbird108/python_home) ai|debian_proot_termux_nvim⚡ ⇒ cargo --version
cargo 1.82.0 (8f40fc59f 2024-08-21)
...
❯ termux-info
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=31764
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirror.freedif.org/termux/termux-main stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
# sources.list.d/ivam3-termux-packages.list
deb [trusted=yes arch=all] https://ivam3.github.io/termux-packages stable extras
# x11-repo (sources.list.d/x11.list)
deb https://mirror.freedif.org/termux/termux-x11 x11 main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# root-repo (sources.list.d/root.list)
deb https://mirror.freedif.org/termux/termux-root root stable
# sources.list.d/rendiix.list
deb https://rendiix.github.io android-tools termux
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
Updatable packages:
All packages up to date
termux-tools version:
1.44.1
Android version:
14
Kernel build information:
Linux localhost 5.15.123-android13-8-29539737-abX910XXS4BXJ7 #1 SMP PREEMPT Mon Oct 14 00:51:42 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-X910
LD Variables:
LD_LIBRARY_PATH=:/data/data/com.termux/files/home/.local/lib/ollama:/data/data/com.termux/files/usr/lib:/data/data/com.termux/files/home/install/lib
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.widget versionCode:13
com.termux.x11 versionCode:14
com.termux.api versionCode:51
com.termux.boot versionCode:1000
com.termux.window versionCode:15
com.termux.styling versionCode:1000
com.termux.tasker versionCode:6

Repro

I did this step, but I am not sure what it achieved.
@b9Joker108 b9Joker108 added the bug Something isn't working label Nov 23, 2024
@b9Joker108
Copy link
Author

b9Joker108 commented Nov 23, 2024

Though the people I based this ollama config on:

#687

...favoured the copilot API endpoints, I noted that my research seems to point to favouring openai. But, following them as they got their locally served ollama configs working with the copilot API parser endpoints, I have rolled with that. The patches that I endeavoured to fix the broken Termux Debian proot chroot build of the plugin in the config have not worked. When I try to chat with qwen, errors are generated in Neovim. This is the base config I have settled on. I think it is conforming with your project. There are no Lua syntax in it:

-- File: /lua/plugins/extras/coding/ai/avante.lua
-- Configured to use Copilot API endpoints while retaining Ollama model and endpoint

---@class AvanteProvider
---@field local boolean
---@field endpoint string
---@field model string

---@class AvanteConflictHighlights

return {
  {
    "yetone/avante.nvim",
    event = "VeryLazy",
    lazy = false,
    version = false, -- set this if you want to always pull the latest changes
    opts = {
      provider = "copilot", -- Changed from "openai" to "copilot"
      use_absolute_path = true,
      vendors = {
        ---@type AvanteProvider
        copilot = { -- Changed key from "openai" to "copilot"
          ["local"] = true,
          endpoint = "http://127.0.0.1:11434", -- Retained Ollama's endpoint
          model = "qwen2.5-coder:1.5b", -- Retained Ollama's model
          parse_curl_args = function(opts, code_opts)
            return {
              url = opts.endpoint .. "/chat/completions",
              headers = {
                ["Accept"] = "application/json",
                ["Content-Type"] = "application/json",
              },
              body = {
                model = opts.model,
                messages = require("avante.providers").copilot.parse_messages(code_opts), -- Updated to use copilot parser
                max_tokens = 4096, -- Adjust as needed
                temperature = 0.6, -- Proper scaling
                stream = true,
              },
            }
          end,
          parse_response_data = function(data_stream, event_state, opts)
            require("avante.providers").copilot.parse_response(data_stream, event_state, opts) -- Updated to use copilot parser
          end,
        },
      },
      behaviour = {
        auto_suggestions = true, -- Experimental stage
        auto_set_highlight_group = true,
        auto_set_keymaps = true,
        auto_apply_diff_after_generation = true,
        support_paste_from_clipboard = true,
      },
      mappings = {
        --- @class AvanteConflictMappings
        diff = {
          ours = "co",
          theirs = "ct",
          all_theirs = "ca",
          both = "cb",
          cursor = "cc",
          next = "]x",
          prev = "[x",
        },
        suggestion = {
          accept = "<M-l>",
          next = "<M-]>",
          prev = "<M-[>",
          dismiss = "<C-]>",
        },
        jump = {
          next = "]]",
          prev = "[[",
        },
        submit = {
          normal = "<CR>",
          insert = "<C-s>",
        },
      },
      hints = { enabled = true },
      windows = {
        ---@type "right" | "left" | "top" | "bottom"
        position = "right", -- the position of the sidebar
        wrap = true, -- similar to vim.o.wrap
        width = 30, -- default % based on available width
        sidebar_header = {
          align = "center", -- left, center, right for title
          rounded = true,
        },
      },
      highlights = {
        ---@type AvanteConflictHighlights
        diff = {
          current = "DiffText",
          incoming = "DiffAdd",
        },
      },
      --- @class AvanteConflictUserConfig
      diff = {
        autojump = true,
        ---@type string | fun(): any
        list_opener = "copen",
      },
    },
    -- Build from source if necessary
    build = function()
      -- Build from source and reapply custom patches
      vim.fn.system(
        "make BUILD_FROM_SOURCE=true && sh $HOME/.config/b9Joker108/my.neovim.config/patches/avante.lua/apply_patches.sh"
      )
    end,
    -- Dependencies required for full functionality
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "stevearc/dressing.nvim",
      "nvim-lua/plenary.nvim",
      "MunifTanjim/nui.nvim",
      --- Optional dependencies
      "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
      {
        -- support for image pasting
        "HakonHarnes/img-clip.nvim",
        event = "VeryLazy",
        opts = {
          -- recommended settings
          default = {
            embed_image_as_base64 = false,
            prompt_for_file_name = false,
            drag_and_drop = {
              insert_mode = true,
            },
            -- required for Windows users
            use_absolute_path = true,
          },
        },
      },
      {
        -- Markdown rendering support
        "MeanderingProgrammer/render-markdown.nvim",
        opts = {
          file_types = { "markdown", "Avante" },
        },
        ft = { "markdown", "Avante" },
      },
    },
    -- Keybindings for Avante
    keys = {
      {
        "<leader>aa",
        function()
          require("avante.api").ask()
        end,
        desc = "avante: ask",
        mode = { "n", "v" },
      },
      {
        "<leader>ar",
        function()
          require("avante.api").refresh()
        end,
        desc = "avante: refresh",
      },
      {
        "<leader>ae",
        function()
          require("avante.api").edit()
        end,
        desc = "avante: edit",
        mode = "v",
      },
    },
  },
}

@b9Joker108
Copy link
Author

b9Joker108 commented Nov 24, 2024

After a successful manual build, well a build with no errors or warnings in verbose logging and doing only a Lazy sync with the local files, this is the error that was generated on executing Neovim:

Error executing vim.schedule lua callback: ...y.neovim.config/lazy/avante.nvim/lua/avante/repo_map.lua:23: Failed
to load avante_repo_map
stack traceback:
        [C]: in function 'error'
        ...y.neovim.config/lazy/avante.nvim/lua/avante/repo_map.lua:23: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
        ...108/my.neovim.config/lazy/avante.nvim/lua/avante/llm.lua:45: Make sure to build avante (missing
    avante_templates)
  3 stack traceback:
  4 > [C]: in function 'error'
  5 > ...08/my.neovim.config/lazy/avante.nvim/lua/avante/path.lua:96: in function 'get'
  6 > ...108/my.neovim.config/lazy/avante.nvim/lua/avante/llm.lua:45: in function '_stream'
  7 > ...108/my.neovim.config/lazy/avante.nvim/lua/avante/llm.lua:365: in function 'stream'
  8 > ...neovim.config/lazy/avante.nvim/lua/avante/suggestion.lua:70: in function 'suggest'
  9 > ...neovim.config/lazy/avante.nvim/lua/avante/suggestion.lua:282: in function 'func'                          
  10 > ...neovim.config/lazy/avante.nvim/lua/avante/utils/init.lua:556: in function <...neovim.config/lazy/avante.
      nvim/lua/avante/utils/init.lua:555>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant