* 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.
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)
* 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
* 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.
* 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>
* 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>
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>