Register mercury-2 (128k context, tool-calling) and mercury-edit-2 in
llm-info, add Inception Labs provider to the GUI Add Chat Model form,
and flag mercury-2 as tool-capable in PROVIDER_TOOL_SUPPORT.
- Replace X-Title with X-OpenRouter-Title (the newer official header)
- Add X-OpenRouter-Categories: ide-extension for marketplace attribution
- Use "Continue" as the title (the product name)
Adds the same HTTP-Referer and X-Title headers from the openai-adapters
OpenRouter class (#11857) to the core/llm OpenRouter class, ensuring all
OpenRouter requests are identified as coming from Continue.dev.
Also updates X-Title from "Continue" to "Continue.dev" in both the
openai-adapters and core/llm OpenRouter classes.
User-configured requestOptions.headers take precedence over the defaults.
The version is bumped manually prior to release, so the automated
version bump and PR creation in the publish job is unnecessary and
was causing the workflow to report as failed despite successful publishing.
* feat: filter session history by workspace directory
Add optional workspaceDirectory field to ListHistoryOptions so callers
can scope session lists to a specific workspace. Filtering is
case-insensitive and applied before pagination. Omitting the field
preserves the existing behavior of returning all sessions.
Fixes#9936
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address bot review - typeof guard and test coverage
- Use typeof check instead of truthiness for workspaceDirectory to
handle malformed session metadata safely
- Rename test to match actual coverage (limit only)
- Add separate test for combined limit+offset with workspace filter
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: ensure config.yaml exists and is populated when accessed
- Opening a config profile (gear icon) now creates config.yaml with
defaults if the file is missing, matching startup behavior
- Empty config.yaml files are detected and populated with default config
instead of causing parse errors
* refactor: improve readability of config existence check
- Change alert from warning (yellow) to info (blue) styling
- Move banner inside chat scroll container so it scrolls away
- Render banner in settings page content area (not above sidebar)
- Make banner dismissable on all pages
- Update text to "v2.0.0", buttons side-by-side with primary export button
- Add "Learn more" secondary button
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: let explicit capabilities.tools override Ollama template tool detection
The Ollama provider checks the model template from /api/show for a
`.Tools` placeholder to decide whether to pass tools to the API. For
newer models (e.g. qwen3.5) whose templates may not yet include
`.Tools`, this silently strips tools from the request — even when the
user explicitly sets `capabilities: tools: true` in config.yaml.
Use nullish coalescing so an explicit capabilities.tools setting always
wins, with the template heuristic as a fallback.
* remove verbose comments
* remove templateSupportsTools check; trust upstream tool support detection
* fix: remove extra blank line to pass prettier check
* 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
- Fix LocalProfileLoader test: remove controlPlaneClient refs, update
default title to match "Main Config"
- Remove showStagingIndicator from Layout.tsx (variable was undefined)
- Remove usePlatform from MockIdeMessenger (removed from config types)
- Add GithubIcon component and DISCUSSIONS_LINK to StreamError.tsx
- Add overloaded retry constants to streamThunkWrapper.tsx
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>