* 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>
* fix: chunk large JCEF messages to prevent JetBrains sidebar freezes
When session data exceeds ~1MB (e.g. long conversations with many context
items), sendToWebview embeds the entire JSON payload in a single
executeJavaScript call. JCEF's JS parser/compiler cannot handle source
strings that large and freezes the IDE.
This adds a chunked sending path: payloads over 1MB are base64-encoded,
split into 512KB chunks sent as individual executeJavaScript calls that
each append to a buffer variable, then a final call decodes and dispatches
the reassembled message via window.postMessage. Each individual call is
trivial for JCEF to parse, and V8 handles the string concatenation and
final JSON.parse without issue.
Messages under 1MB (the vast majority) take the existing fast path unchanged.
* chore: trim verbose comments
* fix: clean up partial chunk buffer on failure
* fix: use array join instead of string concat for JCEF chunk reassembly
Replaces O(n²) string concatenation (+=) with O(n) array push + join
for JS-side chunk buffering. Extracts script generation into testable
buildChunkScripts() and adds unit tests for chunking logic.
* perf: increase chunk size from 512KB to 2MB
Reduces IPC round-trips by 4x (e.g. 7 calls instead of 26 for 10MB).
Safe because chunks are trivial JS with pure Base64 string literals.
* fix: decode chunked messages as UTF-8 to prevent mojibake
atob() returns Latin-1, so multi-byte UTF-8 characters (em dashes,
accented letters, CJK, emoji) were mangled. Use TextDecoder to
properly decode UTF-8 bytes after base64 decoding.
Response listeners were only removed when data contained `"done": true`,
but most message types (file events, autocomplete, nextEdit, etc.)
return responses without a `done` field. This caused every fire-and-forget
request to leak its callback lambda permanently in the map.
Over a long session with heavy autocomplete and file navigation, this
could accumulate hundreds of thousands of entries (40-100+ MB).
Fix: invert the removal logic — remove the listener by default, and
only keep it when `done == false` (i.e., a streaming response is still
in progress). This preserves existing streaming behavior while ensuring
all non-streaming responses are cleaned up immediately.
* fix: use Dispatchers.Default to avoid SideEffectNotAllowedException in JetBrains intention previews
DocumentChangeTracker and ActiveHandlerManager used Dispatchers.Main which
schedules work via INVOKE_LATER. JetBrains forbids this during intention
preview computation (autocomplete, inspections), throwing
SideEffectNotAllowedException. Neither class requires EDT for its coroutine
work, so switching to Dispatchers.Default resolves the issue.
Fixes#9463, #8035
* fix: use limitedParallelism(1) to prevent race conditions
Dispatchers.Default allows concurrent execution on a thread pool,
which breaks thread-safety for shared mutable state that was previously
serialized on the Main/EDT dispatcher. Using limitedParallelism(1)
preserves single-threaded execution while still avoiding the
SideEffectNotAllowedException from Dispatchers.Main.
fix: add missing pass-through message types for JetBrains
Three message types sent by the GUI were missing from JetBrains'
PASS_THROUGH_TO_CORE list, causing them to be misrouted to the IDE
protocol handler instead of core:
- history/loadRemote (loading remote sessions)
- controlPlane/getEnvironment
- controlPlane/getCreditStatus
* fix: add guard for disposed JCEF browser in sendToWebview
Before calling executeJavaScript, check if the browser is already closed
to prevent NPE propagation from deeper in JCEF. Also broadens the catch
from IllegalStateException to Exception to handle NPE and other errors
that can occur when the browser is in a disposed state.
Fixes#8085, #9159
* fix: add log warning when sending to disposed browser
Log the message type before early-returning on a closed JCEF browser
to aid debugging silent message drops during project disposal.
* fix: resolve crashes in DiffStreamHandler — unsafe cast and negative line numbers
- Use safe cast (as?) for TextEditor in undoChanges() to prevent ClassCastException
- Add early return for empty documents and clamp line numbers to prevent IndexOutOfBoundsException in initUnfinishedRangeHighlights()
- Remove redundant .toList() call in rejectAll()
Fixes#4267
* refactor: inline lineNum variable in initUnfinishedRangeHighlights
Remove Sentry error reporting from the sync catch block — the
service<ContinueSentryService>() call could itself throw from the
background thread, letting the original exception escape and silently
killing all future scheduled runs of the sync task.
Replace with IDEA Logger warnings so failures are visible in the IDE
log. Add explicit connect/read timeouts (5s) to prevent a hung server
from blocking the shared executor indefinitely. Early-return when the
remote config URL is not configured so no work is done at all.
Remove redundant addRemoteSyncJob() call from settings reset(), which
only restores UI fields and should not restart the sync.
Ref: https://github.com/continuedev/continue/discussions/8606#discussioncomment-15003299
* Fix StringIndexOutOfBoundsException in readRangeInFile
* fix: clamp endLine relative to startLine to ensure invariant
Ensures endLine >= startLine after clamping, preventing a potential
IllegalArgumentException from subList if both values were clamped
independently to conflicting bounds.
---------
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Node.js v20 entered Maintenance LTS six months ago. Update the version
from v20.19.0 (released over a year ago) to v20.20.1, the latest LTS
release this month.
This ensures the project leverages recent Node.js improvements,
including security updates, and stays on a supported LTS track.
When VirtualFile.toUriOrNull() generates unencoded URIs with spaces,
URI() throws. Fall back to File(path).toURI() which properly encodes
the path.
Fixes#10613
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite main, VS Code, and JetBrains READMEs to focus on
source-controlled AI checks enforceable in CI. Add community-maintained
notice to JetBrains plugin with CLI recommendation. Prefix IDE-specific
feature headings with platform names.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Discord links across docs, READMEs, GUI components, and issue templates
now point to https://github.com/continuedev/continue/discussions.
The Discord context provider (product feature) is left untouched.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove credentials.* and token.* patterns from IntelliJ security ignore
list to match the TypeScript core changes. This ensures consistent behavior
across both IDE extensions.
Co-authored-by: nate <nate@continue.dev>
* Fix IntelliJ remote config sync issues
- Only schedule sync job when remote server URL is configured
- Catch all exceptions including JsonSyntaxException
- Fix logic error where configJs and configJson overwrite each other
- Properly clean up sync job when cancelled
Fixes#8769
Co-authored-by: dallin <dallin@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
* Fix config.js and config.json file path separation
Use separate file paths for JavaScript (config.js) and JSON (config.json)
configuration files to maintain proper separation of concerns.
Co-authored-by: dallin <dallin@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
---------
Co-authored-by: continue[bot] <continue[bot]@users.noreply.github.com>
Co-authored-by: Continue <noreply@continue.dev>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix bug: set the property JS_QUERY_POOL_SIZE to use JBCefJSQuery after the browser has been created
* feat: add JCEF reload action
* fix: update reload action
* Revert "fix bug: set the property JS_QUERY_POOL_SIZE to use JBCefJSQuery after the browser has been created"
This reverts commit e998ae83b261a171b03e0473cf2b8aaeac481ed7.
* feat: sonnet lazy apply prompt should not change comments
* change for ApplyManager.getApplyPrompt
* change for ApplyToFileHandler.buildApplyPrompt
* remove unused edit prompts in edit templates
* add do not change comments to edit templates
* tweak prompt to remove explicitly
Replace 31+ scattered Gson() instantiations with a centralized application-level
GsonService singleton. This eliminates redundant object creation, particularly in
hot message handling paths (28 instances in IdeProtocolClient alone).
Changes:
- Created GsonService as application-scoped singleton (@Service annotation)
- Updated IdeProtocolClient to use GsonService via default constructor parameter
- Updated CoreMessenger to use GsonService via default constructor parameter
- Updated ContinueBrowser to use GsonService via default constructor parameter
Performance impact:
- Eliminates 31+ Gson object allocations per session
- Reduces reflection overhead from repeated Gson initialization
- Improves message handling performance in IDE-Core communication
Addresses: #8452