Commit Graph

1455 Commits

Author SHA1 Message Date
yetone
35acffad9a feat: support selected code prompt for ACP (#2657) 2025-08-31 16:24:20 +08:00
yetone
8a956123ca fix: clean up configuration examples in README.md (#2656) 2025-08-31 07:49:12 +08:00
yetone
5e0aa7e5c0 feat: support acp (#2649) 2025-08-31 07:41:19 +08:00
brook hong
9008fc4f41 feat: add project_root in AskOptions so that project root can be specified from api (#2652) 2025-08-30 18:07:59 +08:00
brook hong
f70c4b8b88 fix: use common files to find project root (#2651) 2025-08-29 21:10:08 +08:00
brook hong
751e4c0913 feat: support multiple models for bedrock (#2648) 2025-08-28 20:23:05 +08:00
brook hong
9fe429eb62 fix: dispatch cancel message on user cancelling request in retry. (#2644)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-27 12:23:32 +08:00
Fabian Klopfer
11e457e56b [feat] Add basic support for IBM's watsonx code assistant (#2617)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-26 17:26:15 +08:00
Yinzuo Jiang
29111ac042 fix: AvanteShowRepoMap failed to parse query for c (#2629)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-26 17:19:47 +08:00
Yinzuo Jiang
f643b262cc fix: empty tool array reports an error for some LLM models (#2639)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-26 17:19:29 +08:00
brook hong
fe57497123 fix: log response headers for debug (#2642) 2025-08-26 16:43:03 +08:00
brook hong
ce2c9ea5a2 fix: reset cache for project root if buf name changed (#2638) 2025-08-25 10:30:00 +08:00
brook hong
2791db9984 fix: stop timer for retry on canceling inflight request (#2637)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-24 16:31:57 +08:00
忍野ペンギン
8a2ed691c0 fix: handle is already closing (#2613)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-24 16:21:55 +08:00
Oren Sayag
4966f20be8 fix(docs): added missing , in README lua config (#2633) 2025-08-24 16:10:12 +08:00
brook hong
b3289ff51a fix: wrap user input in task only in agentic mode (#2636) 2025-08-24 15:47:30 +08:00
brook hong
40af7113a2 Add option custom_init to enable user to customize behaviour of sidebar (#2630)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-24 02:57:52 +08:00
Ahmed Siddiqui
212797a2f2 Add config to limit max height for selected files (#2618) 2025-08-19 15:39:08 +08:00
samuelm00
24f7dbbe76 fix typo 2025-08-19 14:53:40 +08:00
samuelm00
6da110b1c0 add some best practices for the instruction file 2025-08-19 14:53:40 +08:00
samuelm00
0a603efad1 add possibility to define a project based instruction file 2025-08-19 14:53:40 +08:00
Dmitry Torokhov
fed6902c9a feat!(selection): do not display hint immediately
Selection hint that is displayed immediately upon entering visual mode
([<leader>aa: ask, <leader>ae: edit]) gets old pretty quickly. Add a
config option to control when the hint is displayed:

  selection = {
    enabled = true,
    hint_display = "delayed",
  },

The "hint_display" option recognizes the following values:

- "immediate" results in the hint being shown immediately after entering
  visual mode. This is the old behavior.
- "delayed" causes the hint be displayed only if the cursor has not been
  moved for vim.o.updatetime milliseconds. This is the new default.
- "none" suppresses showing the hint completely.

Unfortunately "CursorHold" event is not emitted in visual mode so we
have to emulate it using Utils.debounce().

This is a breaking change because selection behavior was controller by
"hints" config entry which makes little sense, so the config section and
associated commands were renamed to "selection".

Additionally the "hints"/"selection" was mapped to "<leader>ah", but the
very same key combination was used to select from old Avante chat
histories, which overrode the toggle. New selection toggle keymap is
"<leader>aC".
2025-08-16 14:45:52 +08:00
yetone
bd2079a5cc chore: remove dead code and commented out blocks (#2611) 2025-08-16 14:45:27 +08:00
brook hong
c1ccb7867a fix: remove trailing spaces each line when editing files (#2612) 2025-08-16 14:16:38 +08:00
yetone
be0937a459 fix: timer already closed (#2608) 2025-08-14 17:55:24 +08:00
Ivan Jaramillo
4eb8bd97e1 chore: update html2md dependency to fix build errors on termux(android) (#2605) 2025-08-14 16:01:59 +08:00
yetone
4e0a8620b6 docs: add FAQ section about disabling agentic mode (#2604) 2025-08-13 22:20:25 +08:00
Peter Cardenas
59ba16202e fix: lazy load AvanteEdit (#2602) 2025-08-13 20:11:27 +08:00
yetone
1e0c8520bc fix: the last used model caused the loss of the model configured in the profile in the model selector (#2600) 2025-08-12 15:33:31 +08:00
Dmitry Torokhov
638d237b75 refactor(utils): make prepend_line_numbers() more efficient and idiomatic
Between Utils.prepend_line_number() and its only caller, there is a lot
of conversions from list to string to list and back to string. Simplify
all of this by making it accept and return a list of strings, which
avoids unnecessary splitting and joining.

The implementation was updated to use vim.iter():map() and
string.format() for better performance and to align with the idiomatic
functional style used elsewhere in the project.

The name of the function has also been tweaked and is now
"prepend_line_numbers()" to better reflect that it operates on a list of
strings.

The caller has been updated to match the new function signature.
2025-08-12 15:14:37 +08:00
Dmitry Torokhov
76fe3f615a refactor(utils): switch debounce() and throttle() to use vim.defer_fn()
vim.defer_fn() does exactly what half of Utils.debounce() and
Utils.throttle() code does, so use it.

While at it add function annotations.
2025-08-12 15:14:37 +08:00
you-n-g
16c58c2e6f fix: update config.lua default value for gpt-5-chat (#2594) 2025-08-12 15:13:44 +08:00
Peter Cardenas
dd151e7f45 fix: allow lazy loading AvanteAskNew (#2598) 2025-08-12 15:13:20 +08:00
brook hong
5a4ed4ac92 feat: add mappings to toggle code window from input in sidebar (#2591) 2025-08-08 20:11:06 +08:00
brook hong
2fc63d4128 feat: toggle code window from result container in sidebar (#2579) 2025-08-06 11:39:38 +08:00
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