continue
continue copied to clipboard
Jetbrains: Declining an inline completion leads to code being messed up and undo history being discarded
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
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
- Open a code file
- Select some code
- Press Command + I
- Enter a prompt and confirm with Return key
- Discard suggestion
Log output
core.log: A bunch of `[object Object]` entries
[2024-10-01T12:46:46] [object Object]