Skip to content

The wrong file is edited if the active file is different from the Edit file directive #5768

Open
@maximelebastard

Description

@maximelebastard

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version: 1.1.32
- IDE version: 1.100.2
- Model: any
- config:
  
%YAML 1.1
---
version: 1.0.16
schema: v1

bedrock: &bedrock
  provider: bedrock
  env:
    region: eu-central-1
    profile: bedrock

models:
  - name: (aws) Anthropic Claude 3.5 Sonnet
    <<: *bedrock
    model: anthropic.claude-3-5-sonnet-20240620-v1:0
    roles:
      - chat
      - edit
      - apply
  - name: (aws) Anthropic Claude 3.7 Sonnet
    <<: *bedrock
    model: eu.anthropic.claude-3-7-sonnet-20250219-v1:0
    roles:
      - chat
      - edit
  - name: (aws) Anthropic Claude 3 Haiku
    <<: *bedrock
    model: anthropic.claude-3-haiku-20240307-v1:0
    roles:
      - chat

  - name: (aws) Cohere Rerank
    <<: *bedrock
    model: cohere.rerank-v3-5:0
    roles:
      - rerank

  - name: (aws) Cohere Embed Multilingual
    <<: *bedrock
    model: cohere.embed-multilingual-v3
    roles:
      - embed
      
  - name: (local) Qwen 2.5 autocomplete
    provider: ollama
    model: qwen2.5-coder:3b
    roles:
      - chat

context:
  - provider: file
  - provider: code
  - provider: open
  - provider: folder
  - provider: clipboard
  - provider: diff
  - provider: terminal
  - provider: docs
  - provider: web
    params:
      n: 5
  - provider: codebase
  - provider: tree
  - provider: url

prompts:
  - name: commit
    description: Create a commit message from staged files
    prompt: "{{input}}"

docs:
  - name: Symfony
    startUrl: https://symfony.com/doc/6.4/index.html

defaultCompletionOptions:
  maxTokens: 4096
  
  OR link to assistant in Continue hub:

Description

When starting an Edit conversation, with specific lines to be Edited. If the user opens and focuses on another file, the changes are actually applied to that opened file - not the file set into the conversation.
This happens in VSCode and PHPStorm.

To reproduce

  1. Create A.txt and B.txt
  2. In edit mode, ask continue to edit A.txt on line 1 to say "Hello world"
  3. Open B.txt (so A.txt is still opened, but as an inactive tab)
  4. Submit the message on Continue
  5. B.txt is edited on line 1, instead of A.txt

Log output

Metadata

Metadata

Labels

area:editRelates to side panel Edit featurekind:bugIndicates an unexpected problem or unintended behaviorpriority:mediumIndicates medium priority

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions