fix(intellij): handle square brackets in file paths for autocomplete (#11474)
- fix(intellij): handle square brackets in file paths for autocomplete
Use File.toURI() instead of URI constructor for Windows two-slash file:// URIs to properly percent-encode special characters like [ ]. Fixes #10978.
- test(intellij): strengthen Windows URI assertions for bracket encoding
Verify that square brackets are percent-encoded and drive letter and directory structure are preserved in parsed URI path.
- fix(intellij): make Windows bracket test cross-platform
The CI runs on Linux where C: is not a drive letter. Assert that brackets are encoded and structure is preserved without platform-specific path assumptions.
- fix: use cross-platform URI constructor instead of File.toURI()
File.toURI() is platform-dependent — on non-Windows hosts it treats Windows drive paths (e.g. C:/Users/…) as relative paths, producing corrupted URIs. The multi-arg URI(scheme, host, path, fragment) constructor is pure RFC 2396 string manipulation and works identically on all platforms.
Also strengthens the Windows bracket test with exact equality assertions instead of loose contains/assertFalse checks.
- chore: remove verbose comments for minimal diff
Co-authored-by: Dallin Romney dallinromney@gmail.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Continue
Source-controlled AI checks, enforceable in CI
Getting started
Paste this into your coding agent of choice:
How it works
Continue runs agents on every pull request as GitHub status checks. Each agent is a markdown file in your repo at
.continue/checks/. Green if the code looks good, red with a suggested diff if not. Here is an example that performs a security review:Install CLI
AI checks are powered by the open-source Continue CLI (
cn).macOS / Linux:
Windows (PowerShell):
Or with npm (requires Node.js 20+):
Then run:
Looking for the VS Code extension? See here.
Contributing
Read the contributing guide, and join the GitHub Discussions.
License
Apache 2.0 © 2023-2024 Continue Dev, Inc.