ex3ndr / llama-coder

Replace Copilot local AI
https://marketplace.visualstudio.com/items?itemName=ex3ndr.llama-coder
MIT License
1.37k stars 95 forks source link

Inconsistent Tab Behavior Due to Suggestions Ending with Newline #50

Open NekoSosu opened 3 months ago

NekoSosu commented 3 months ago

s

I've noticed that code suggestions from the extension sometimes include a trailing newline as shown in the screenshot, leading to an issue where pressing the Tab key inserts a tab space instead of accepting the suggestion. This disrupts the coding flow. Maybe this could be fixed by triming the newline from the end of suggestions before they're returned, as shown below:

if (res.endsWith('\n')) {
    res = res.slice(0, -1);
}