1570 Commits

Author SHA1 Message Date
yetone
6bcf7dfbe7 fix: still use str_replace_editor (#2587) 2025-08-06 11:39:13 +08:00
Dmitry Torokhov
70a73d4f98 fix(config): remove last used model data if it is damaged (#2580) 2025-08-05 15:44:13 +08:00
brook hong
6f28f132e5 fix: failed to write correct entry into prompt log file at very begin… (#2581) 2025-08-05 15:19:35 +08:00
yetone
b941cd902d chore: update input height from 6 to 8 (#2582) 2025-08-04 20:55:01 +08:00
brook hong
66cfbb4c19 fix: re-implement prompt logger (#2574)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-03 21:34:38 +08:00
yetone
03f0456d30 fix: add nil check for message before sending notifications 2025-08-02 23:38:21 +08:00
yetone
5fedb3a2c6 feat: add check-added-large-files and check-merge-conflict pre-commit hooks 2025-08-02 18:44:17 +08:00
yetone
f475e95eb7 fix: add buffer validation checks in replace_in_file 2025-08-02 17:57:31 +08:00
yetone
657b418c46 fix: check if path is a directory before opening it 2025-08-02 17:53:07 +08:00
yetone
54ef723283 optimize: parallelize test dependencies installation 2025-08-02 17:48:47 +08:00
yetone
751d1855e7 fix: download the correct lua-language-server 2025-08-02 17:43:55 +08:00
Dmitry Torokhov
3b1f65e46d fix(tests): specify initial branch when initializing git repository
Git may complain if init.defaultBranch is not set up on the system:

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"

Use "git init -m main" to suppress this message.
2025-08-02 17:43:55 +08:00
Dmitry Torokhov
61c1bf8bfe feat(luatest): create a self-contained test runner
Adds a new scripts/run-luatest.sh script to provide a consistent,
self-contained way to run project unit tests, including locally.

The script handles:

 - Checking for necessary tools (rg, ag)
 - Cloning or updating plenary.nvim into the target/tests/deps directory

The Makefile is updated to use this new script, making make luatest the
single entry point for running unit tests.

The lua.yaml workflow is simplified to use this new make target,
ensuring the CI environment uses the exact same testing logic.
2025-08-02 17:43:55 +08:00
Dmitry Torokhov
59a518cf86 feat(typecheck): add local mode mirroring github to lua-typecheck.sh
This implements mode mirroring github workflow in scripts/lua-typecheck.sh
so that it can run locally.

A supporting script scripts/setup_deps.sh is created to define and
download/clone dependencies (plugins), as well as download luals, neovim
runtime, and create luarc.json. setup_deps.sh is now the only and
authoritative source of dependencies and luals version. Neovim version
still comes from lua.yaml.

To fetch neovim version from lua.yaml as well as figure out the right
source of neovim package, dependency on yq is introduced when running
locally in "managed" mode.

Dependencies, neovim runtime, and luals are downloaded to
target/tests subdirectory on local machine. luarc.json is created
from a template there as well.

The ability to run against the live system is preserved with "--live"
option. In this case it assumes that neovim is using lazy package
manager and optionally Mason, so if luals is not present in path the
script will try to see if it is installed by Mason.

When running in github CI neovim is set up through github action while
dependencies and luals are handled by the scripts.
2025-08-02 17:43:55 +08:00
PlacidFireball
6d372a9135 fix: set the content property to the empty string (#2566)
Co-authored-by: Jared Weiss <jared.weiss@quiq.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-02 15:37:19 +08:00
brook hong
7965546a34 fix: do not ask for API key for bedrock if aws_profile was set (#2564) 2025-08-02 13:00:00 +08:00
yetone
b225094dca fix: breaklines within the content (#2567) 2025-08-02 12:56:20 +08:00
Umut Sahin Onder
6c2a785ebb fix(config): suppress last model info messages if redundant
Only show "Using last model" notification when the loaded model
differs from the original configuration to reduce UI noise
2025-07-31 21:30:41 -07:00
yetone
1830917ceb fix(docs): incorrect installation instructions (#2555) 2025-07-31 14:26:39 +08:00
Shogo Nakamoto
ca63356a99 feat: allow overriding bedrock provider endpoint (#2540) 2025-07-31 14:15:34 +08:00
Boshen
72444ac217 docs: improve vim-plug installation guide (#2548) 2025-07-31 14:14:54 +08:00
Dmitry Torokhov
5bc4ffa19f refactor(bedrock): replace vim.uv.spawn() with vim.system()
Instead of implementing synchronous call to a command line utility via
vim.uv.spawn() switch to using vim.system(). Its return value (object)
wait() method allows to specify timeout too.

This makes code much simpler.
2025-07-31 14:12:13 +08:00
Dmitry Torokhov
d737fa6109 build: remove presubmit dependency on luvit-meta
As discussed in https://github.com/yetone/avante.nvim/pull/2536 the
project should either use luv bindings from luals or luvit-meta
library, but not both, as they conflict with each other (especially
with uv.uv_timer_t). Given that other projects such as kickstart.nvim
and lazydev.nvim are switching to use the former, we should do the same
and drop luvit-meta dependency.

Also adjust code that was using luvit-meta's annotations for timers.
2025-07-31 14:12:13 +08:00
skt041959
d77e1272a0 fix: check before set keymap (#2543) 2025-07-30 22:17:28 +08:00
yetone
8c5b3f9706 fix: duplicated replace blocks in diff (#2549) 2025-07-30 22:16:56 +08:00
NekoNekoNiko120
5e4eb8652b feat: remember the last selected model (#2518)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: yetone <yetoneful@gmail.com>
2025-07-28 13:21:49 +08:00
yetone
7e50de8904 fix: ReAct tool use format in few-shot (#2542) 2025-07-28 11:14:45 +08:00
yetone
0a2143586a fix: incorrect json in tool_use example (#2541) 2025-07-28 11:03:01 +08:00
Marcos Romero Lamas
daa419c79b fix: statusline hidden in Avante (#2477) 2025-07-27 14:57:24 +08:00
Peter Cardenas
d8ec4e4aa4 fix: gracefully handle html2md failure (#2533) 2025-07-26 16:19:38 +08:00
Dmitry Torokhov
53dcb55896 fix(sidebar): keep header aligned when sidebar width changed (#2535) 2025-07-26 16:16:23 +08:00
yetone
8bc149ccd8 fix: react prompts (#2537) 2025-07-26 16:06:56 +08:00
Amaury Cannesson
bd69ae14f6 fix(utils): fix gsub in trim_line_numbers() (#2528) 2025-07-24 17:47:10 +08:00
yetone
1452c7233b fix: invalid json format (#2531) 2025-07-24 17:37:10 +08:00
yetone
02aa0a4241 fix: compatible with some incorrect tool results (#2530) 2025-07-24 16:44:05 +08:00
yetone
7af303b421 fix: missing curl error message (#2527) 2025-07-24 16:03:15 +08:00
yetone
ca1271c996 fix: use path instead of target_file in the edit_file input (#2526) 2025-07-24 15:37:26 +08:00
yetone
57311d80ea fix: not enough room (#2525) 2025-07-24 14:33:16 +08:00
yetone
f199625ee4 fix: diff format in k2 v2 (#2524) 2025-07-24 14:31:03 +08:00
yetone
430cac8d91 feat: introduce beast-mode-3.1 (#2523) 2025-07-24 14:16:21 +08:00
yetone
888a49d8c1 fix: bad tool use (#2520) 2025-07-23 23:47:23 +08:00
doodleEsc
faa3945428 feat: implement user-defined text shortcuts (#2512)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-07-23 11:54:59 +08:00
yetone
8b8a777ec3 fix: typo in prompts (#2517) 2025-07-23 11:50:25 +08:00
yetone
7c9644ceb7 fix: diff format in k2 (#2516) 2025-07-23 11:48:33 +08:00
Dmitry Torokhov
6c9c4365a2 fix(sidebar): do not error when selecting text from help window (#2514) 2025-07-23 11:43:34 +08:00
Joshua Petitma
a72ee55b20 fix: typo (#2513) 2025-07-23 11:42:59 +08:00
yetone
ef29a01840 fix: str_replace (#2515) 2025-07-23 11:06:39 +08:00
yetone
c65604837c fix: diff format (#2510) 2025-07-22 20:38:57 +08:00
Yomi Colledge
f4f82a09d7 fix(llm_tools): Improve the permissions logic (#2506)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-07-22 17:54:46 +08:00
Dmitry Torokhov
10c0a8d942 feat(sidebar): allow external users identify selected code buffer
External users such as, for example, lualine may want to identify and
add special handling for Avante buffers. This is easily done for Avante
result, input, selected files and todos buffers as they all set a unique
file type. However the selected code buffer inherits file type from the
buffer where the code came from (to have proper syntax highlighting),
and so filetype can not be used to identify it as Avante buffer.

One option would be to add a custom buffer variable, such as
vim.b.avante_buf_type and use it in plugins. Unfortunately lualine
triggers everything on file type, so that would not work.

Solve this by setting file type of the selected code buffer to
"AvanteSelectedCode" and manually activate treesitter parser with
language of the source buffer if treesitter is active there. If the
original code buffer uses legacy syntax highlighting then activate it.
This keeps syntax highlighting active for the code while allowing
external users identify Avante selected code buffer.
2025-07-22 17:50:23 +08:00