Duo Code Suggestions: Code Generation is invoked when user enters single space or single tab in empty file
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Code Generation is invoked when the user enters a single space or single tab within an empty file. This is confusing because Duo won't have sufficient context or guidance to provide any meaningful suggestion.
Steps to reproduce
In VS Code:
- Enter a single space or single tab
- Create new file
- Observe code generation suggestion
I was unable to reproduce this in the web IDE. I haven't tested additional IDE's outside of VS Code.
What is the current bug behavior?
Duo provides a code generation suggestion without sufficient context to provide anything helpful or useful. I believe it's invoking code generation based on the The file you’re editing has fewer than five lines of code.
logic [https://docs.gitlab.com/ee/user/project/repository/code_suggestions/#code-generation\\\].
What is the expected correct behavior?
In an empty file, there shouldn't be a suggested generation or completion when the user enters a single space or single tab.
Relevant logs and/or screenshots
Repro 1
Repro 2
https://gitlab.com/gitlab-org/gitlab/-/issues/503351#note_2216391564
comple-2024-11-18_18.56.03.mp4