Commit Graph

845 Commits

Author SHA1 Message Date
Francesco Tassi
2b0e7e09ae fix: ignore git crypt files (#1465)
* Exclude file patterns from git-crypt in pathspec

git-crypt could be used to encrypt files in a repository.
These files should be excluded from the pathspec to avoid
sending them to the RAG service.
git-crypt relies on a filter attribute in the .gitattributes so we can
use ls-files to get the files that are encrypted.

* Add some logging about ignored file

The logging is quite verbose, given it logs every ignored file but I
think it useful for the end user to have an explicit feedback about
sensitive files that are being ignored.

* Fix lint errors

* Avoid Shell=true for subprocess.run() (S604)

Removing S604 "Avoid Shell=true for subprocess.run()" we get S603 "subprocess call: check for execution of untrusted input"
I dit not found a way to fix this issue, so I'm putting it in the ignore list.
I also used shutil to retrieve the absolute git path to run the subprocess commands.
2025-03-06 18:34:12 +08:00
teleivo
dec794ac85 fix: contradictory lazy.nvim installation spec (#1506)
setting `lazy=false` means eagerly loading the plugin while `event =
"VeryLazy"` suggests the plugin should be lazy loaded

https://lazy.folke.io/spec/lazy_loading

> Plugins will be lazy-loaded when one of the following is true:
>
> * The plugin only exists as a dependency in your spec
> * It has an event, cmd, ft or keys key
> * config.defaults.lazy == true

see example

6c3bda4aca/lua/lazy/example.lua (L58-L60)
2025-03-06 18:33:52 +08:00
yetone
5aa55689ff fix: bedrock claude do not support prompt caching (#1507) 2025-03-06 18:31:56 +08:00
Sávio Carlos Martins Costa
6d39e06f57 fix: return statement of the "Utils.has", as "pcall" never returns nil (#1501) 2025-03-06 08:21:22 +08:00
yetone
662b6a547b fix: cache prompt count (#1499) 2025-03-06 00:08:59 +08:00
Vinicius Zenha
cad42ac00f Update README.md (#1497) 2025-03-05 22:25:35 +08:00
yetone
93c2e1fd83 feat: cache tool use (#1496) 2025-03-05 19:43:18 +08:00
Grimaldi Baptiste
232d4b1340 feature model selection custom display name (#1477)
* feature model selection custom display name

Added an option for a custom display name
I had the need for this option for multiple similar custom model
configurations where I wanted to have more indicative titles.

* linting error
2025-03-05 19:25:48 +08:00
nzlov
7919fe010b docs: add custom tool (#1487)
* docs: add custom tool

* fix: add func params
2025-03-05 19:24:57 +08:00
yetone
f6484a0e61 feat: add glob llm tool (#1495) 2025-03-05 19:22:22 +08:00
yetone
093c09b760 fix: search keyword ignore vcs when using rg (#1493) 2025-03-05 18:55:23 +08:00
yetone
cc078a5337 feat: support redacted thinking (#1492) 2025-03-05 18:53:24 +08:00
Jie Liu
a652db7608 fix: add instruct for creating new files (#1485)
* Add instruct for creating new files

* Update lua/avante/templates/planning.avanterules

Co-authored-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>

---------

Co-authored-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>
2025-03-05 17:04:29 +08:00
yetone
ce3c47b6ec fix: allow reset rag service chromadb (#1491) 2025-03-05 17:01:00 +08:00
yetone
7578f13d8d feat: upgrade rag service image version (#1488) 2025-03-05 16:22:25 +08:00
Francesco Tassi
232c9a635c feat: improve avante-rag-service container execution (#1448)
* Refactor Docker mount to mount only user home

Mounting the whole filesystem expose the user to security risks,
considering the container is running are root.

This mounts only the user home directory in the container, to mitigate
the security risks. The user home directory is mounted in read only mode
to even reduce the risks of accidental or malicious modifications.

Mounting the whole should allow the user to have multiple neovim instances runinng at
the same time and sharing the same rag_service.

Also the container is started with the --rm flag to remove it after it stops.

* RAG mount point is not configurable

* Remove useless filter.lua file

* Use Path to join paths

This should be more safe than just concatenating strings.
2025-03-05 16:18:52 +08:00
yetone
3e7c059246 fix: tools priority (#1486) 2025-03-05 14:51:54 +08:00
Jorge Luis Suarez
e408b820c8 feat: add Nix as Rag service runner option (#1480)
* feat: add nix as option for RAG runner

* fix: remove default embedding model

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* stylua format

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-04 23:50:24 +08:00
brook hong
e1d2d825e2 fix: handle bedrock exceptions (#1483) 2025-03-04 23:47:28 +08:00
Limbo Peng
ab63b52ffb feat: add Brave Search as web search engine provider (#1481)
* feat: add Brave Search as web search engine provider

* docs: update README
2025-03-04 23:47:04 +08:00
nzlov
de7cccd089 feat: add support for ollama RAG providers (#1427)
* fix: openai env

* feat: add support for multiple RAG providers

- Added provider, model and endpoint configuration options for RAG service

- Updated RAG service to support both OpenAI and Ollama providers

- Added Ollama embedding support and dependencies

- Improved environment variable handling for RAG service configuration

Signed-off-by: wfhtqp@gmail.com <wfhtqp@gmail.com>

* fix: update docker env

* feat: rag server add ollama llm

* fix: pre-commit

* feat: check embed model and clean

* docs: add rag server config docs

* fix: pyright ignore

---------

Signed-off-by: wfhtqp@gmail.com <wfhtqp@gmail.com>
2025-03-04 11:07:40 +08:00
yetone
b01121bc39 fix: tools priority (#1478) 2025-03-04 00:44:33 +08:00
brook hong
6bd966e8e2 fix: pass context to provider for stream data parsing (#1475)
* fix: pass context to provider for stream data parsing

* fix: luatype

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2025-03-04 00:20:27 +08:00
Hanchin Hsieh
c6d5527ea8 fix(llm_tools): fix permission checking to use relative path (#1473)
The has_permission_to_access function was incorrectly using absolute paths when checking against gitignore patterns. This could cause issues when the binary name matches the project root directory name, particularly in Go projects.

Changes:

- Extract relative path from absolute path by removing project root prefix

- Use relative path for gitignore pattern matching

- Add comments explaining the path handling logic

Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
2025-03-03 18:02:59 +08:00
yetone
6f13034845 fix: remove accidentally introduced files (#1472) 2025-03-03 15:18:35 +08:00
Jie Liu
3fae794ea8 fix: sub-folder creation on Windows (#1468) 2025-03-03 15:08:39 +08:00
Peter Cardenas
de1e6a4212 feat: add custom tools config (#1461)
* chore: add string literal types for tool params, and returns

* feat: add custom tools config
2025-03-03 15:06:13 +08:00
Omar Crespo
6bbf9b3c42 doc: document disabled_tools option (#1471) 2025-03-03 15:01:58 +08:00
yetone
981edcaf44 fix: do not use tools aggressively (#1462) 2025-03-02 16:27:05 +08:00
Peter Cardenas
1428648609 feat: run python tool asynchronously (#1455) 2025-03-02 11:31:04 +08:00
Peter Cardenas
7704c21856 fix: do not change cwd for async bash command (#1456) 2025-03-02 11:30:16 +08:00
Peter Cardenas
ac9d2b3888 feat: disable tools with config (#1459)
* chore: use missing generic for AvanteLLMToolFunc

* feat: add disabled_tools config
2025-03-02 11:29:23 +08:00
Gael PHILIPPE
e471f2347b feat(repo-map): add swift, java and php support (#1446) 2025-03-02 01:21:34 +08:00
yetone
615ccdbef3 fix: typo (#1451) 2025-03-02 01:19:25 +08:00
Omar Crespo
7d28e9b233 docs: add select model binding to readme (#1443) 2025-03-01 17:44:43 +08:00
yetone
7c9ee0760a docs: add mcp in todos (#1444) 2025-03-01 17:43:07 +08:00
yetone
0d592f440c Revert "refactor: message content (#1424)" (#1442)
This reverts commit ae8497faf1.
2025-03-01 13:25:51 +08:00
yetone
5bb055795f feat(suggestions): add tags around json (#1441) 2025-03-01 13:11:12 +08:00
Ben Burgess
86feaf3e38 docs: add sidebar toggle keymap (#1439) 2025-03-01 12:48:06 +08:00
Thomas Müller
a0af22df2e fix: custom vendors listed twice in model selection dropdown (#1435) 2025-03-01 12:47:13 +08:00
yetone
814bba5ef2 fix: edit supports think tag (#1430) 2025-02-28 15:24:36 +08:00
yetone
4cbba9f95e fix: lua test (#1429) 2025-02-28 14:57:01 +08:00
yetone
6d24da510e refactor: rename run_command llm tool to bash (#1428) 2025-02-28 14:50:41 +08:00
yetone
ae8497faf1 refactor: message content (#1424) 2025-02-28 14:43:39 +08:00
yetone
ebadba7420 fix: claude extended thinking (#1419) 2025-02-27 15:21:00 +08:00
yetone
77c5ffeb78 fix: lua type (#1418) 2025-02-27 12:55:19 +08:00
yetone
5abe579019 fix: retry when rate limited (#1417) 2025-02-27 12:52:58 +08:00
Matthew Brookhart
e69e7eceeb feat: support Microsoft Entra ID authentication (#1274)
Co-authored-by: Matthew Brookhart <Matthew Brookhart>
2025-02-27 12:00:36 +08:00
yetone
ae5a86103d feat(ci): close stable issues and prs (#1416) 2025-02-27 11:57:46 +08:00
yetone
1097f1dfae feat: update rag service image (#1415) 2025-02-27 11:54:38 +08:00