Code Suggestion blinks and immediately disappears
Checklist
-
I'm using the latest version of the extension (see the latest version in the right column of this page) - Extension version: 3.86.1
-
I'm using the latest VS Code version (find the latest version here) - VS Code version: 1.84.2
-
I'm using a supported version of GitLab (see README for the supported version) - GitLab version: happens on
gitlab.com
- GitLab version: happens on
Summary
Reported by @odupre in slack:
I have an issue with Code Suggestion in VSCode which does not generate/create anything anymore.
The
suggestion_rejected
pops-up immediately, and I don't even see the proposal (it somethings blink very fast, but that's all). While the Chat for example is working fine.
Steps to reproduce
https://www.loom.com/share/d82979fba9894fcb8b1c1f6365bdcbf2?sid=8692c129-c10a-48df-b6b6-68d426946935
What is the current bug behavior?
Either no code suggestions/generations or sometimes they blink very fast and disappear.
What is the expected correct behavior?
Having suggestions ;)
Relevant logs and/or screenshots
2023-11-22T18:14:57:785 [debug]: Telemetry: Reject all opened suggestions
2023-11-22T18:14:58:097 [debug]: fetch: request to https://gitlab.com/api/v4/projects/46820979/repository/commits/33a7f109d06f00a2d5f119f56fcc6c2f151026f3/statuses?stage=external&ref=main returned HTTP 200 after 321 ms
2023-11-22T18:14:58:291 [debug]: AI Assist: fetching completions ... (telemetry: [])
2023-11-22T18:14:58:291 [debug]: Telemetry: Received request to create a new suggestion
2023-11-22T18:14:58:291 [debug]: Telemetry: Reject all opened suggestions
2023-11-22T18:14:58:291 [debug]: Telemetry: Sending event for suggestion 1326844b-44be-4a44-9037-58a6d8ce64bf
2023-11-22T18:14:58:292 [debug]: Telemetry: New suggestion 1326844b-44be-4a44-9037-58a6d8ce64bf has been requested
2023-11-22T18:14:58:292 [debug]: AI Assist: fetching completions via monolith...
2023-11-22T18:14:58:292 [debug]: Using non-expired account https://gitlab.com|14509426.
2023-11-22T18:14:58:292 [debug]: Using non-expired account https://gitlab.com|14509426.
2023-11-22T18:14:58:411 [debug]: fetch: request to https://gitlab.com/api/v4/projects/46820979/pipelines/1049418139/jobs returned HTTP 200 after 636 ms
2023-11-22T18:15:03:042 [debug]: fetch: request to https://gitlab.com/api/v4/code_suggestions/completions returned HTTP 200 after 4749 ms
2023-11-22T18:15:03:042 [debug]: Telemetry: Received request to set model for suggestion 1326844b-44be-4a44-9037-58a6d8ce64bf
2023-11-22T18:15:03:042 [debug]: Telemetry: Transist 1326844b-44be-4a44-9037-58a6d8ce64bf to suggestion_loaded
2023-11-22T18:15:03:042 [debug]: Telemetry: Sending event for suggestion 1326844b-44be-4a44-9037-58a6d8ce64bf
2023-11-22T18:15:03:043 [debug]: Telemetry: 1326844b-44be-4a44-9037-58a6d8ce64bf transisted from suggestion_requested to suggestion_loaded
2023-11-22T18:15:03:043 [debug]: AI Assist: got 1 completions
2023-11-22T18:15:03:043 [debug]: Telemetry: Transist 1326844b-44be-4a44-9037-58a6d8ce64bf to suggestion_shown
2023-11-22T18:15:03:043 [debug]: Telemetry: Sending event for suggestion 1326844b-44be-4a44-9037-58a6d8ce64bf
2023-11-22T18:15:03:043 [debug]: Telemetry: 1326844b-44be-4a44-9037-58a6d8ce64bf transisted from suggestion_loaded to suggestion_shown
2023-11-22T18:15:03:048 [debug]: Telemetry: Reject all opened suggestions
2023-11-22T18:15:03:048 [debug]: Telemetry: Transist 1326844b-44be-4a44-9037-58a6d8ce64bf to suggestion_rejected
2023-11-22T18:15:03:048 [debug]: Telemetry: Sending event for suggestion 1326844b-44be-4a44-9037-58a6d8ce64bf
2023-11-22T18:15:03:048 [debug]: Telemetry: 1326844b-44be-4a44-9037-58a6d8ce64bf transisted from suggestion_shown to suggestion_rejected
2023-11-22T18:15:03:048 [debug]: Telemetry: Sending event for rejected suggestion request. Reason "unchanged_document".
Possible fixes
The Reason "unchanged_document"
bit in the logs makes @francoisrose wonder if the issue is related to this MR which seems to have added it last week with 3.86.1: !1149 (diffs)
Edited by Olivier Dupré