Skip to content

Applying code changes swallows some spaces and tabs from the LLM code reply #6908

@goekce

Description

@goekce

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: pre-release 1.1.71 2025-07-31 18:38:21
- IDE version: 1.102.35058 (VSCodium)
- Model: meta-llama/llama-4-scout-17b-16e-instruct
- config:
  
name: Local Assistant
version: 1.0.0
schema: v1
models:
  - name: Autodetect
    provider: groq
    model: AUTODETECT
    apiKey: ...
context:
  - provider: code
  - provider: docs
  - provider: diff
  - provider: terminal
  - provider: problems
  - provider: folder
  - provider: codebase

Description

When I apply code changes from the chat window, some spaces are swallowed.

To reproduce

  1. Create a new file main.c with the following input:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
  int total = 1000000;
  int inside = 0;
  srand(time(0));
  for (int i = 0; i < total; i++) {
    double x = (double)rand() / RAND_MAX;
    double y = (double)rand() / RAND_MAX;
    if (x * x + y * y <= 1)
      inside++;
  }
  double pi = 4.0 * inside / total;
  printf("Estimated pi: %f\n", pi);
}
  1. Prompt: format code by logical separation.
  2. Apply the replied code.
  3. You should see that space characters after = are gone from the reply
Image

Here is the reply:

Image

Log output

N/A

Metadata

Metadata

Assignees

Labels

area:applyide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windows

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions