Problem Statement
Tab completion is obviously limited in quality by the demanded short inference time.
Composer and Chat, in the other hand, provide the option for high-quality code generation with user input.
However, I find that very often, I wish there was a way to have a manually triggered high-quality tab completion that does not require additional user input.
My use cases are common Situations where the solution to generate is straight-forward based on the already written code, Here, it seems that the tab completion without further user input would be perfectly suitable if it just had a bit more context.
For example, take the generation of import statements or the consideration of imported function or class definitions when generating function or constructor calls.
Proposed Solution
Provide a shortcut to trigger a high-quality tab completion. It may use the same model as the normal autocomplete, but should take additional context into account. For example, on trigger:
- Planning step: Generate preliminary completion
- Analyze which imports / classes / functions and so on were used in the completion
- Get the definitions of those used elements as context
- Revise the preliminary completion with the added context.
- Show the revised completion
In my opinion, as this is a manually triggered completion, it is completely fine if it takes a second or so to generate.
The advantage over chat and composer is that no further user input is required, so that it does not break the flow of writing code.
It hence represents a tool between standard autocompletion and chat / composer.
Alternative to manually triggered high quality autocompletion: shortcut to trigger a high-quality revision of a proposed autocomplete. so, when typing, if an autocomplete suggestion is shown that lacks factual correctness, but is fine in principle, do not press tab, but some other shortcut to trigger the steps 2-5 from above to provide a high-quality revised completion.