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
18.92k stars 1.61k forks source link

Asking questions about selected code block not working as expected in JetBrains Webstorm #627

Open scpedicini opened 11 months ago

scpedicini commented 11 months ago

Before submitting your bug report

Relevant environment info

- OS: MacOS 12.6
- Continue: 0.0.18

Description

Highlighting a block of code (specifically a function) in a larger typescript file, then bringing up Continue - Continue correctly shows the "file.ts (284-294)" indicating the active block of code, but it references completely different parts and is clearly not using that block of code as its context.

Based on its answers, it's pulling the code from lines 299-314 so somehow below. This happens pretty arbitrarily, I'd say about 30% of time I use it.

To reproduce

No response

Log output

No response

sestinj commented 11 months ago

@scpedicini Is this with PyCharm, or a different JetBrains IDE? I'll do some testing myself later today to hopefully reproduce and get a fix out by end of week

scpedicini commented 11 months ago

Mentioned in the title - yeah Webstorm. I can try to create a simple video repro later today if you want.

scpedicini commented 11 months ago

@sestinj I'll try to create a video later, but in the meantime here's an example of where it occurred:

Pasted image 20231116140648

Pasted image 20231116140512

scpedicini commented 11 months ago

Also just other footnote: A lot of times the textbox for "ask a question" is disabled - I can't focus on it or type anything. The only way to bring it back is to close/reopen the sidebar a few times for Continue.

EDIT: I just realized it actually is editable, but there's no cursor blink inside it even after clicking into it so it appeared to me that it was disabled. You can actually type though.