twinnydotdev / twinny

The most no-nonsense, locally or API-hosted AI code completion plugin for Visual Studio Code - like GitHub Copilot but completely free and 100% private.
https://twinny.dev
MIT License
2.3k stars 126 forks source link

Inline suggestion does not work when there is a .hg folder #212

Closed sebastianelsner closed 1 month ago

sebastianelsner commented 2 months ago

Describe the bug

It seems inline suggestion does not work in projects using mercurial, which has a .hg folder, as the files twinny uses have the extension of the SCM folder, which is removed in: https://github.com/rjmacarthy/twinny/blob/ef38e356186c19ffad43d67c3cf5cdd933da4990/src/extension/file-interaction.ts#L144

The Error is:

2024-04-16 10:27:29.269 [error] [rjmacarthy.twinny] provider FAILED 2024-04-16 10:27:29.269 [error] CodeExpectedError: cannot open file:///raid/standards/base-setups/risebase/production/scripts/auto_inactive.py.hg. Detail: Unable to read file '/raid/standards/base-setups/risebase/production/scripts/auto_inactive.py.hg' (Error: Unable to resolve nonexistent file '/raid/standards/base-setups/risebase/production/scripts/auto_inactive.py.hg') at r.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2163:62448)

To Reproduce Steps to reproduce the behavior:

  1. Have a mercurial repo (install mercurial, hg init)
  2. create file
  3. trigger inline completion
  4. See error in extension host output

Expected behavior The inline completions should work

rjmacarthy commented 2 months ago

Thanks for the report. Will investigate for future release.