Code suggestions - accept "generation_type" parameter in completions API
In gitlab-org/editor-extensions/gitlab-lsp#173 (closed) we plan to detect the "type event" of code generation (cursor is below comment, cursor is in empty method, file is too small) on client side. Client will send this type of event as part of code generation request so we can add additional prompt info based on the type of event.
We should accept generation_type
parameter on completions endpoint and it can be one of following values: empty_method
, comment
, small_file
. When this parameter is sent, then we can skip detecting if the file is too small or if cursor is inside an empty method on Rails side using regular expressions.