216 Commits

Author SHA1 Message Date
Jie Liu
7608dce00e Support loading ACP sessions if agent can (#2889) 2025-12-29 19:11:30 +08:00
Adrian Cole
148998b1db feat(acp): support mcp_servers in acp_providers config (#2883)
Allow acp_providers to specify an mcp_servers array that gets passed
to create_session. This enables agents to connect to HTTP MCP servers
configured by the client.

- Read mcp_servers from Config.acp_providers[provider]
- Pass to acp_client:create_session for MCP tool support
- Add mock transport tests verifying mcpServers propagation
2025-12-29 17:50:24 +08:00
Nayab Sayed
b62b6370fc fix: wrap nvim_del_autocmd in vim.schedule to avoid fast event context error (#2873)
nvim_del_autocmd was being called in a callback from acp_client, which is a
fast event context where it's not allowed. Wrapping it with vim.schedule()
defers the execution to a safe context.

Signed-off-by: Nayab Sayed <nayabbasha.sayed@microchip.com>
2025-12-21 18:35:19 +08:00
Peter Cardenas
cf352f6f46 fix: make acp client send requests async (#2848) 2025-12-21 03:32:04 +08:00
Peter Cardenas
80f7079556 fix: support cancelling acp providers (#2847) 2025-12-16 19:07:10 +08:00
Adrian Cole
0336666a73 fix(acp): return JSON-RPC error for fs/read_text_file on missing files (#2849)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-12-13 23:30:11 +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
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
yetone
fb28520067 Refine buffer updates and tool call metadata (#2784) 2025-10-20 13:58:34 +08:00
yetone
b3448420fd Improve ACP history message tracking (#2781) 2025-10-20 00:32:20 +08:00
Carlos Gomes
cc7a41262e feat: follow the ACP agent edit and open files automatically (#2780) 2025-10-19 00:32:08 +08:00
yetone
0971d8f421 fix: stabilize ACP streaming updates (#2776) 2025-10-16 21:28:45 +08:00
1A7432
7dfd086e21 fix: add proper ACP process cleanup on exit (#2723)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-10-16 19:08:35 +08:00
yetone
487972386e feat: support acp slash commands (#2775) 2025-10-16 19:05:57 +08:00
yetone
4a68e29165 feat: support codex acp provider (#2774) 2025-10-16 01:26:04 +08:00
Dmitry Torokhov
0716819a0e feat(providers): fail gracefully when a provider is misconfigured (#2768) 2025-10-15 18:43:55 +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
Jack Wright
4c0493440b Add Goose as an ACP provider (#2730)
Co-authored-by: Jack Wright <jack.wright@nike.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-09-30 17:19:06 +08:00
1A7432
44db8eba87 feat: add automatic ACP session recovery with intelligent history truncation (#2711) 2025-09-18 15:22:26 +08:00
yetone
00224ea378 fix: use acp to editing (#2701) 2025-09-11 18:39:00 +08:00
yetone
10e0312ec4 feat: request permission button group (#2685) 2025-09-04 15:35:40 +08:00
yetone
9f0bb4bfb9 fix: compatible with zed claude code acp (#2676) 2025-09-03 00:12:49 +08:00
yetone
ebed32d7e3 fix: resource link for acp (#2674) 2025-09-02 22:17:34 +08:00
yetone
a4a4c91711 fix: wrap all ACP handlers in vim.schedule to ensure safe UI operations (#2670) 2025-09-02 13:37:26 +08:00
yetone
15d19518b1 feat: better tool ui (#2668) 2025-09-01 22:31:38 +08:00
yetone
b3b9327fec fix: reload buffer after the file is written (#2667) 2025-09-01 18:54:46 +08:00
yetone
fe928d2f96 fix: get buffer in fast event (#2666) 2025-09-01 18:42:48 +08:00
yetone
35acffad9a feat: support selected code prompt for ACP (#2657) 2025-08-31 16:24:20 +08:00
yetone
5e0aa7e5c0 feat: support acp (#2649) 2025-08-31 07:41:19 +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
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
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
brook hong
b3289ff51a fix: wrap user input in task only in agentic mode (#2636) 2025-08-24 15:47:30 +08:00
samuelm00
0a603efad1 add possibility to define a project based instruction file 2025-08-19 14:53:40 +08:00
yetone
be0937a459 fix: timer already closed (#2608) 2025-08-14 17:55:24 +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
8bc149ccd8 fix: react prompts (#2537) 2025-07-26 16:06:56 +08:00
Joshua Petitma
a72ee55b20 fix: typo (#2513) 2025-07-23 11:42:59 +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
394e4d79eb refactor(message): add helper to update contents of simple text message
Add update_content() helper so code outside of history module does not
need to know details of the message structure.
2025-07-22 17:49:28 +08:00
doodleEsc
3fcfa6ec05 refactor: refactor TODO handling to context messages
- Refactor TODOs handling: move logic to `context_messages` instead of using `template_opts`
- Improve todo message filtering by using more precise tags (`<todos>...</todos>`)
- Append TODOs after history messages
- Remove the TODOs section from `_task-guidelines.avanterules` template

Signed-off-by: doodleEsc <cinuor@gmail.com>
2025-07-21 16:56:03 +08:00
Dmitry Torokhov
2335ea3d15 refactor(history): reduce computational complexity when handling history
When updating chat history to be used in LLM request there are several
instances where we do O(n^2) operations: scanning all messages to locate
a tool "use" and for each use scan messages again to locate
corresponding "result".

Refactor the code to scan messages once collecting tool uses and results
together, and then do 2nd scan to drop incomplete tool invocations and
refresh "view" and "edit" results with the latest content.

Also reduce number of pre-scan loops (where we discard partially
generated messages or messages that are not interesting or too-old) by
combining them when possible.

This reduces time to scan initial 417 messages on my system (which
result in 576 final messages) from 0.32 to 0.12 seconds.
2025-07-18 22:36:21 -07:00
Dmitry Torokhov
c2e4ae5ef6 fix(llm): fix rate limit handling
Rate limit handling seems to be broken: it starts an one-shot timer
with callback that reschedules the timer each second and prints/updates
messages. Simultaneously it schedules a deferred by 1 second function
that cancels the timer and resumes the stream. This results in the timer
executing at most once, and stream resume happening way too early.

Fix this by switching to use repeating timer with first instance
executing immediately. All message handling is moved into the timer
callback. Once countdown is complete the same callback will stop and
destroy the timer and resume the stream.
2025-07-18 22:35:44 -07:00
yetone
bc1de981d8 fix: on_complete is nil 2025-07-17 16:41:43 +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