138 Commits

Author SHA1 Message Date
takuto
5cad31db07 feat(config): add option allow_access_to_git_ignored_files (#2882) 2025-12-29 17:41:23 +08:00
Waitzz
2ffe820ec1 fix: avante.llm_tools.helpers.is_ignored error (#2895) 2025-12-29 17:30:11 +08:00
XuJiawei
42028811e4 refine: replace vim.fn.system with vim.system (#2863) 2025-12-13 18:58:10 +08:00
Marius Niveri
15ef2a012c fix: never attempt to concatenate nil values, use empty strings (#2692) (#2812)
* fix: never attempt to concatenate nil values, use empty strings (#2692)

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-10-31 17:53:06 +08:00
yetone
159b452426 chore: replace replace_in_file references with str_replace (#2811) 2025-10-31 02:08:53 +08:00
yetone
c8bf0205b5 fix: enable think tool with acp provider (#2810) 2025-10-31 00:58:46 +08:00
yetone
b95e27b5a6 feat: supports OpenAI Response API and copilot's gpt-5-codex model (#2802)
* fix: upgrade vscode version

* feat: support openai response api

* refactor: refine todos tools

* fix: trim suffix empty lines
2025-10-30 02:18:48 +08:00
Dmitry Torokhov
4fc83dc308 cleanup: use vim.uv instead of vim.loop everywhere (#2762) 2025-10-15 18:44:40 +08:00
yetone
e1be2d21b7 fix: wrap confirm callback in vim.schedule_wrap (#2772) 2025-10-15 18:42:32 +08:00
Carlos Gomes
cecd0de6fc feat: Allow inline buttons and popup confirmation for both ACP and normal Providers (#2760)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-10-15 18:08:51 +08:00
Dmitry Torokhov
d0f0580d64 fix: sanitize loaded chat history
Ensure that chat history loaded from a file has resemblance of correct
data. Namely title and timestamp are present and are strings, and
entires, messages, and todos are lists. In case of inconsistencies
replace with empty/default data.

This should help with #2584.

More changes are needed to sanitize individual entries.
2025-10-11 16:41:45 -07:00
Eldad Zack
846736789e feat(git): Add configuration option for 'Generated-by' line in commit messages (#2708) 2025-09-15 13:16:35 +08:00
yetone
5e0aa7e5c0 feat: support acp (#2649) 2025-08-31 07:41:19 +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
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
8c5b3f9706 fix: duplicated replace blocks in diff (#2549) 2025-07-30 22:16:56 +08:00
yetone
8bc149ccd8 fix: react prompts (#2537) 2025-07-26 16:06:56 +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
7c9644ceb7 fix: diff format in k2 (#2516) 2025-07-23 11:48:33 +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
aa606b6147 refactor(history): change HistoryMessage:new() to accept role and item
Change the constructor to accept role and a single content item instead
of raw AvanteLLMMessage instance. This will help when we will start
changing message.content from being a string or a list of tables to just
a string or a single table.
2025-07-22 17:49:28 +08:00
Dmitry Torokhov
86e8563125 refactor(llm_tools): use History.Helpers.get_tool_result_data()
Avoid poking into internals of avante.HistoryMessage, and use
appropriate helper instead.
2025-07-22 17:49:28 +08:00
Dmitry Torokhov
e82b159f65 refactor(history): add a helper to fetch text from messages and use it
This adds History.Helpers.get_text_data() helper to fetch contents of a
"text" message. This removes the need to know internals of message
structure outside of history module.
2025-07-22 17:49:28 +08:00
yetone
27a88c095f fix: incorrect diff (#2500) 2025-07-21 23:59:12 +08:00
Dmitry Torokhov
7d60b51324 refactor(sidebar): move sub-windows into a table
Maintaining secondary table of window IDs is cumbersome and is prone to
getting out of sync with the true state of the sidebar. In preparation
for removal of winids table move all containers (sub-windows of the
sidebar) into "containers" table.

The change is mostly mechanical rename with following exceptions:

 - Sidebar:reifresh_winids() and other places where the code scanned
   entire Sidebar object looking for tables with specific fields, such
   as "winid", or "mount" needed to be adjusted for the new structure

 - Sidebar:new() and Sidebar:reset() have been adjusted to make better
   use of the new sub-table.
2025-07-21 13:31:07 +08:00
yetone
2d0b6875dd chores: refine top-level-symbols prompts 2025-07-21 13:22:40 +08:00
yetone
75ebef9fbe fix: tool_info is nil 2025-07-21 11:50:55 +08:00
yetone
b4c9246461 fix: find symbol definition ool 2025-07-17 20:37:57 +08:00
yetone
1dc195d9ef fix: edit_file cannot find old str 2025-07-17 19:49:08 +08:00
yetone
cd81fbf8af fix: tool_use_id is nil 2025-07-17 14:29:17 +08:00
yetone
5ea24f59fa fix: clear useless parameters 2025-07-17 13:50:33 +08:00
yetone
2a16e7d4d9 fix: do not modify the tool_use input 2025-07-16 20:18:24 +08:00
yetone
adbd296ba6 feat: integrated morph 2025-07-16 18:34:52 +08:00
Dmitry Torokhov
b64120749f refactor(history): use get_tool_(result|use_data)() in dispatch_agent.lua
Using these helpers simplifies the code and provides better
encapsulation.
2025-07-16 12:49:15 +08:00
Dmitry Torokhov
47ad90b389 fix: when deleting tool use also delete tool result
Tool results are not useful without their "use" messages, so delete them
when deleting "use" ones.

Makes use of the new get_tool_use_data() and get_tool_result_data()
helpers.
2025-07-16 12:49:15 +08:00
Dmitry Torokhov
34907fc1cd refactor(history): start moving history-related code into avante/history
The utils module has grown too big and contains unrelated functionality.
Start moving code related to managing history messages comprising chat
history into lua/avante/history module to keep the code more manageable.
2025-07-16 12:49:15 +08:00
yetone
127a12a878 fix: trim escapes for write_to_file tool (#2455) 2025-07-16 12:04:22 +08:00
yetone
154e5f578f feat: add timeout for bash tool (#2451) 2025-07-15 20:46:15 +08:00
yetone
b8bb0fd969 refactor: llm tool parameters (#2449) 2025-07-15 16:40:25 +08:00
Raul Luzetti
e06f55d353 fix(replace_in_file): added a replace substring logic (#2438) 2025-07-14 10:14:16 +08:00
yetone
14cfccdba9 fix: do not use str_replace_editor (#2428) 2025-07-10 10:17:48 +08:00
yetone
935234981b fix: missing new_str (#2407) 2025-07-04 00:38:17 +08:00
yetone
9bc5bf8053 fix: breaklines (#2403) 2025-07-03 14:43:44 +08:00