-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete: dynamically switch to multliline completions #1894
Conversation
Hey @philipp-spiess, could you take an early look at this? I still have outstanding TODOs, but the core implementation is finished. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m SO excited for this. Pre-emptive approval but will stamp once it's ready for review :)
vscode/src/completions/providers/fetch-and-process-completions.ts
Outdated
Show resolved
Hide resolved
@valerybugakov Should this trigger a multiline completion: I ran it on the HumanEval multiline dataset we have - it's just Python but should show a significant difference here, but it didn't seem to be generating multiline completions for these cases. I have |
@umpox I think this example won't trigger a multi-line completion since it already has content that has a deeper indentation. Maybe that's a check we can bypass when manually triggering completions though? Can you try to comment this out: https://sourcegraph.com/github.com/sourcegraph/cody/-/blob/vscode/src/completions/detect-multiline.ts?L52%3A21-54%3A22 |
@philipp-spiess Yep that fixes it: There does seem to be something that seems off though, surely this should still generate a multi line completion?: 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ship it!
This is huge! Looking forward to trying this out 😄 |
Context
cody-autocomplete-dynamic-multline-completions
to run an experiment on the updated logic.cody.autocomplete.experimental.dynamicMultilineCompletions
to test the feature locally.completionPostProcessLogger
used for local debugging. It's disabled by default, and I will replace it with OpenTelemetry spans in a follow-up PR. I put a little effort into improving this logger because it's a throw-away code, but I need it here because debugging streaming-truncation bugs is much faster with it.Need to merge Autocomplete: fix parse completions edit positions #1891 first to reduce the diff in this PR.Screenshots
Follow-ups
Merged preparation PRs
Test plan
cody.autocomplete.experimental.dynamicMultilineCompletions
is set to true.