Skip to content

feat: Move streaming decision to the LS

Olena Horal-Koretska requested to merge 1201-detect-intent-on-LS-side into main

This MR refactors slightly the streaming logic so that the LS is responsible for deciding whether to stream data. Instead of sending request to detect intent from the client, the client starts with usual inline completion request. The server than detects the intent. And if intent is generation - it will return the response which indicates to the client that it should proceed with the streaming. streamId is provided in the LS response.

It needs to be tested together with the LS changes from this MR gitlab-org/editor-extensions/gitlab-lsp!208 (merged)

Make sure to use the new flow to link the LS with the extension https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/docs/developer/language-server.md#link-the-language-server-node-module

Note that there is still some future refactoring planned where the server will start right with the first chunk of the stream and the client won't need to do the additional request to start streaming - but this approach is still to be investigated and proved feasible.

🔴 The pipeline is failing as it needs the update LS package

References #1201 (closed)

Edited by Olena Horal-Koretska

Merge request reports