Skip to content

fix: streaming Duo Code Suggestion in VS Code 1.97.0

Description

This MR fixes [VS Code] Code generation (streaming) not worki... (#1818 - closed)

In 1.97.0 VS Code introduced a change that broke code suggestions streaming. AFAICT the VS Code stopped triggering inline completion if our provider returned an empty string as the first completion item. And that's what we were doing every time.

The fix is to ensure that our iterator doesn't return empty string unless it's the end of the stream.

Related Issues

Resolves [VS Code] Code generation (streaming) not worki... (#1818 - closed)

How has this been tested?

For all versions the procedure is the same:

  1. keep the npm watch:desktop task running in your extension project, no need to restart between tests with different versions
  2. Open the extension development host
  3. Try streaming (e.g. by running the GitLab: Tutorial command)

I tested the issue on 3 versions:

1.96.4 (the last one that was working before the bug)

Download https://code.visualstudio.com/updates/v1_96

1-96-4

1.97.1 (latest stable)

Download https://code.visualstudio.com/updates/v1_97

1-97-1

Insiders

Version: 1.98.0-insider
Commit: 8cc3b69feaf3b79f333256a511e84f20cf27c24f
Date: 2025-02-12T05:04:23.243Z (5 hrs ago)
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.3.0

insiders

Screenshots (if appropriate)

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Tomas Vik

Merge request reports

Loading