continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
15.73k stars 1.19k forks source link

Indentation issues #1032

Open PawelSzpyt opened 5 months ago

PawelSzpyt commented 5 months ago

Before submitting your bug report

Relevant environment info

- OS: macOS 14.4.1
- Continue: 0.8.23
- IDE: VSCode 1.87.2
- Ollama v0.1.29

Description

I have a problem with indentations, somehow continue breaks indentation when I try to edit / generate code. The model provides correct code but it is not applied correctly. I hope the attached movie explains the issue better than words :)

https://github.com/continuedev/continue/assets/95582824/69883496-4a08-458f-a91b-d568052f8794

I tried adjusting VS code settings regarding indentations, tabulations, paste formatting - nothing helped.

[edit] Changed .mov to .mp4 movie format

To reproduce

  1. create new python file
  2. CMD+I (ask Continue to generate new code)
  3. enter simple prompt "generate fibonacci sequence"
  4. all "elif" statements and "else" statement are indented too far

Log output

No response

sestinj commented 5 months ago

@PawelSzpyt thanks for the clear video! I have a few improvements on the way for cmd+I that should clean this up

vills commented 1 week ago

I have same bug with v0.9.202 (pre-release) version. it also appears when using "Optimize this Code" shortcut.

I also tried to disable all extensions for workspace and enable back only Continue. Same problem.

BTW, i also check indentation with python code, as @PawelSzpyt did.

sestinj commented 1 week ago

@vills what LLM are you using? This seems very much to be a model-specific problem

vills commented 1 week ago

@sestinj Tried both gpt-4o and gpt-4o mini. Also tried llama3.1 and mistral-nemo through Ollama. And claude sonnet. With all this models indent issue persist.