continue icon indicating copy to clipboard operation
continue copied to clipboard

Jetbrains: Declining an inline completion leads to code being messed up and undo history being discarded

Open palle-k opened this issue 1 year ago • 1 comments

Before submitting your bug report

Relevant environment info

- OS: macOS 15.0 (24A335)
- Continue: 0.0.69
- IDE: PyCharm 2024.2.3 (Professional Edition)
- Model: Codestral
- config.json:
  
{
  "models": [
    {
      "model": "claude-3-5-sonnet-20240620",
      "provider": "anthropic",
      "apiKey": "sk-ant-api03-...",
      "title": "Claude 3.5 Sonnet"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Codestral",
    "provider": "mistral",
    "model": "codestral-latest",
    "apiKey": "..."
  },
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "contextProviders": [
    {
      "name": "diff",
      "params": {}
    },
    {
      "name": "folder",
      "params": {}
    },
    {
      "name": "codebase",
      "params": {}
    }
  ],
  "slashCommands": [
    {
      "name": "edit",
      "description": "Edit selected code"
    },
    {
      "name": "comment",
      "description": "Write comments for the selected code"
    },
    {
      "name": "share",
      "description": "Export the current chat session to markdown"
    },
    {
      "name": "commit",
      "description": "Generate a git commit message"
    }
  ]
}

Description

When rewriting code using inline completions (Command + I) and discarding the suggestion, the existing code is messed up and there is no undo history anymore.

To reproduce

  1. Open a code file
  2. Select some code
  3. Press Command + I
  4. Enter a prompt and confirm with Return key
  5. Discard suggestion

Log output

core.log: A bunch of `[object Object]` entries


[2024-10-01T12:46:46] [object Object]

palle-k avatar Oct 01 '24 12:10 palle-k