Repository navigation
fix(intellij): handle Windows file URIs with spaces/brackets - #11065
siewcapital wants to merge 2 commits into
Conversation
|
I have read the CLA Document and I hereby sign the CLA 0 out of 2 committers have signed the CLA. |
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt">
<violation number="1" location="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt:43">
P2: Decoding file URI paths with `URLDecoder` corrupts literal `+` characters into spaces, producing wrong file paths.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
|
@siewcapital thanks for the contribution! |
Summary\nFixes a JetBrains-side URI parsing bug where autocomplete crashes on Windows when a file path contains unescaped characters (e.g. spaces or ).\n\n### What changed\n- Updated to normalize style URIs and parse file URIs through component-based URI construction () so reserved characters are safely encoded.\n- Added decoding + normalization before reconstruction to avoid double-encoding existing segments.\n- Added unit tests covering:\n - file paths containing square brackets\n - Windows URIs with square brackets\n - Windows URIs with spaces\n\n## Why\nCurrent logic builds a URI from raw strings, which throws on unescaped characters and breaks requests used by autocomplete in JetBrains IDEs.\n\nFixes #10978\nFixes #10613\n\n## Testing\n- Added/updated unit tests in .\n- Note: running in this environment is currently blocked by local JDK 25 + Kotlin/Gradle script parsing compatibility ( during Gradle config), so full suite execution could not be completed locally.
Continue Tasks: 🔄 7 running — View all
Summary by cubic
Fixes IntelliJ autocomplete crashes on Windows by safely parsing file URIs with spaces, plus signs, or square brackets. Normalizes file:// URIs and constructs them via components to ensure correct encoding. Fixes #10978, #10613.
Written for commit 1c7a830. Summary will update on new commits.