Open jwortmann opened 1 month ago
Thank you for reporting this bug and proposing the detail solution.
Indeed, the tabby-agent does not fully respect all client capabilities regarding the method textDocument/completion
, including InsertMode.
I will fix it in the next tabby-agent minor release.
I want to report what I believe is a bug in tabby-agent.
tabby was started via
tabby serve --model StarCoder-1B --no-webserver
For testing a LSP client integration, I enabled the regular
textDocument/completion
request for now. The client declares ininitialze
that it only supports InsertTextMode.adjustIndentation, which means thatUsing the following Python file
and requesting
textDocument/completion
at the cursor position shown in the following screenshot, thetextEdit
of the completion item in the response contains extra (incorrect) indentation; see the JSON payload below.This results in wrong indentation when the completion item gets accepted:
The right thing to do for tabby-agent would be to remove leading indentation from the
newText
as if the code block (cursor position) had no initial indentation.Note that this is only relevant for
textDocument/completion
but not fortextDocument/inlineCompletion
, because afaik indentation in inline completions should always be handled asInsertTextMode.asIs
.