410 Commits

Author SHA1 Message Date
Peter Cardenas
80f7079556 fix: support cancelling acp providers (#2847) 2025-12-16 19:07:10 +08:00
yetone
7f48770e66 fix(kimi-acp): kimi acp tool call update is missing the kind field (#2814) 2025-10-31 20:41:12 +08:00
yetone
d45b622193 Auto select Copilot Response API for GPT-5 Codex models (#2808) 2025-10-30 22:38:32 +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
Carlos Gomes
cc7a41262e feat: follow the ACP agent edit and open files automatically (#2780) 2025-10-19 00:32:08 +08:00
Dmitry Torokhov
f0ad738e5a fix(sidebar): avoid crashing in WinNew handler (#2777) 2025-10-17 17:05:04 +08:00
yetone
487972386e feat: support acp slash commands (#2775) 2025-10-16 19:05:57 +08:00
芦苇
216ba4a8b2 fix: should not add 'add current keymap' if auto_set_keymaps is false (#2773) 2025-10-16 03:18:52 +08:00
yetone
4a68e29165 feat: support codex acp provider (#2774) 2025-10-16 01:26:04 +08:00
Copilot
60cb63cdd2 feat: Add option to disable auto-adding current file when opening new chat (#2764)
Co-authored-by: yetone <1206493+yetone@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-10-13 11:34:44 +08:00
Dmitry Torokhov
f092bb3ec0 refactor(sidebar): move handle_submit() from create_input_container
handle_submit() is not directly related to the input container, and may
be called from other places. Make it a method of Sidebar class and
adjust the callers.
2025-10-11 22:14:55 -07: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
Dmitry Torokhov
b08dc79088 refactor(promptLogger): move highlight definition into promptLogger code
Separate managing of a sign (">") placement for the input buffer and
defining a highlight for prompt logger and move the latter into
PromptLogger.init().
2025-10-11 16:39:52 -07:00
Dmitry Torokhov
5aafbdf3f9 fix(sidebar): fix handling of multiple windows when toggling full view (#2758) 2025-10-12 00:58:21 +08:00
Dmitry Torokhov
27f650d295 fix(sidebar): fix closing sidebar when closing its components (#2759) 2025-10-11 15:40:54 +08:00
brook hong
ed89d0a1cd feat: filter prompt history by user input (#2734) 2025-09-29 21:15:25 +08:00
yetone
46583943b6 fix(sidebar): persist ACP session id in chat history (#2687) 2025-09-04 21:31:00 +08:00
yetone
10e0312ec4 feat: request permission button group (#2685) 2025-09-04 15:35:40 +08:00
yetone
4ac4c8ed3f feat(ui): expand tool use message (#2684) 2025-09-04 00:17:32 +08:00
Shaobin Jiang
0aaa91d267 fix: switch_windows keymap not reflected in sidebar (#2675) 2025-09-03 14:01:31 +08:00
yetone
fe928d2f96 fix: get buffer in fast event (#2666) 2025-09-01 18:42:48 +08:00
yetone
4af25547db fix: refine separator in full view (#2664) 2025-08-31 23:11:00 +08:00
yetone
8ca7f75ce4 fix: new chat width in full view state (#2663) 2025-08-31 23:07:13 +08:00
yetone
7c4f88606c fix: full view width (#2662) 2025-08-31 23:02:42 +08:00
yetone
e63427fb9a fix: do not auto resize in full view (#2661) 2025-08-31 22:09:18 +08:00
yetone
bcbe0347d8 feat: supports full view in multi-window mode (#2660) 2025-08-31 21:33:57 +08:00
yetone
ff116a5673 feat: add full_view_ask api (#2658) 2025-08-31 19:17:20 +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
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
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
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
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
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
skt041959
d77e1272a0 fix: check before set keymap (#2543) 2025-07-30 22:17:28 +08:00
Marcos Romero Lamas
daa419c79b fix: statusline hidden in Avante (#2477) 2025-07-27 14:57:24 +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
yetone
57311d80ea fix: not enough room (#2525) 2025-07-24 14:33:16 +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
Dmitry Torokhov
6c9c4365a2 fix(sidebar): do not error when selecting text from help window (#2514) 2025-07-23 11:43:34 +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
Dmitry Torokhov
c6d2783975 fix(sidebar): account for sidebar header on/off for selected code
Current implementation always says that first 5 lines of code is shown
when selected code does not fully fit into its window. This is not
correct as the window can be resized, may have a header occupying one
line, and the lines may not be the first ones. Also the wording is
awkward.

Correct these issues by checking current window height, accounting for
the potential header presence by checking sidebar.enabled config flag,
and updating the message format to be more concise:

" Selected Code (4/15 lines)"

While at it switch to using Utils.count_lines() which does not need
creating temporary tables.

Note that this does not deal with the header info being stale after
resizing sidebar windows.
2025-07-22 17:49:56 +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
2d9f8fd252 refactor(sidebar): use helpers when working with history
Do not poke directly into avante.HistoryMessage instances, use
appropriate helpers instead.
2025-07-22 17:49:28 +08:00
yetone
db56901594 fix: result winid is nil (#2508) 2025-07-22 17:45:14 +08:00
Dmitry Torokhov
0fe0f219e4 fix(sidebar): correctly exit visual mode
Commit a9b01e7 ("chores: use stopinsert (#1745)") replaced uses of
vim.api.nvim_feedkeys(...) with proper commands to exit and enter insert
mode. However "stopinsert" does not help when editor is in visual mode.

Unfortunately there is no dedicated command to exit visual mode so we
have to go back to simulating keystrokes again.
2025-07-21 16:49:08 +08:00