* 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: resolve critical and high security vulnerabilities across packages
Bump vulnerable dependencies and remove unused `request` package to
address ~351 of ~394 npm audit vulnerabilities reported by GitHub.
* fix: handle nullable textContent from @mozilla/readability v0.6.0
readability.textContent can be undefined in v0.6.0, add nullish
coalescing to satisfy ArticleComponent.body type constraint.
* 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>
- statusBar.ts: onDidChangeConfiguration was registered on every
setupStatusBar() call, accumulating unbounded listeners on each
config change or autocomplete toggle
- NextEditWindowManager: 4 event listeners in setupListeners() were
not added to this.disposables, surviving dispose() and accumulating
across Next Edit toggle cycles
- constructPrefixSuffix: accept pre-loaded file contents instead of
calling ide.readFile(), eliminating a redundant file read per
completion (the caller already has the contents loaded)
* fix(cli): gate free-trial status polling by model
* style(cli): format free-trial status changes
* fix(vscode): skip remote marketplace installs when ssh tests are disabled
* fix: remove unrelated e2e extension install changes
Address review feedback by reverting the unrelated changes to
extensions/vscode/package.json and removing the new
install-marketplace-extensions.mjs script.
* fix: clean up isModelUsingFreeTrial and remove NODE_ENV test workaround
- Add optional chaining on apiKeyLocation to prevent crash when undefined
- Remove unnecessary `as any` cast (union narrows via provider check)
- Remove process.env.NODE_ENV === "test" branch from production code;
fake timers in tests handle polling without it
* fix: remove FreeTrialStatus test file
* fix: narrow ModelConfig union before accessing apiKeyLocation
Use an if-statement so TypeScript narrows the discriminated union
to the continue-proxy variant before accessing apiKeyLocation.
* fix: use 'in' operator to narrow ModelConfig union for apiKeyLocation
The Zod schema uses z.string().refine() for the non-continue-proxy
variant, which infers as plain 'string' at the type level, preventing
TypeScript from narrowing via the provider discriminant. Use an 'in'
check to narrow instead.
---------
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* feat: add `useResponsesApi` option to allow opting out of OpenAI Responses API
Add a `useResponsesApi` config option that, when set to false, forces
o-series and gpt-5 models to use /chat/completions instead of /responses.
This helps users whose organizations are not verified avoid "organization
must be verified" errors related to reasoning summaries and streaming.
The option gates both code paths where the Responses API is selected:
- `canUseOpenAIResponses()` in BaseLLM (native path)
- `shouldUseResponsesEndpoint()` in the OpenAI adapter
Closes#11772
Related: #8209, #7129
* feat: suggest `useResponsesApi: false` in org verification error messages
Update error detection to also catch "organization must be verified to
stream" errors (in addition to reasoning summaries), and update the
error message to suggest adding `useResponsesApi: false` to model config
as a workaround.
* fix: improve org verification error message copy
* fix: add useResponsesApi to LLMOptions in index.d.ts
The actual type definitions used by tsc are in core/index.d.ts, not in
the string template in config/types.ts.
* fix: also check provider name when detecting org verification errors
The error message from OpenAI's API doesn't always contain the word
"openai" — check the provider name from the model config as well.
* feat: detect missing authentication header error and suggest adding apiKey
* fix: handle missing auth error directly in 401 dialog block
The 401 status code handler in StreamError.tsx renders before the
customErrorMessage check, so detect the missing authentication error
inline within the 401 block.
* Revert "fix: handle missing auth error directly in 401 dialog block"
This reverts commit 0053957d2df7c64ddea2279982f5e07e2cee1020.
* style: fix prettier formatting in index.d.ts
* style: revert unrelated prettier reformatting in index.d.ts
* fix: handle undefined providerName in error analysis
* fix: use YAML-style formatting in useResponsesApi suggestion
* fix: don't skip installs by default and sync lock file version
- Comment out SKIP_INSTALLS=true in .vscode/tasks.json so installs run
by default (avoids issues with missing binaries like ripgrep, sqlite)
- Sync package-lock.json version to match package.json (1.3.34)
* fix: override undici-types to 7.18.1 to fix corrupted tarball
undici-types@7.18.2 has a corrupted tarball on the npm registry,
causing npm install to error in the install-all-dependencies script.
Override to 7.18.1 which is not affected.
* fix: remove Llama 3.1 405B from Groq provider
The model `llama3.1-405b` is no longer available on Groq, causing 404
errors. Remove it from the Groq provider packages and provider options.
Closes#10832
* Remove llama3.1-405b from Groq model list in config_schema.json
---------
Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
* fix(gemini): update model catalog for retired/new Gemini models
Gemini 1.x models are fully retired (returning 404), gemini-3-pro-preview
was shut down March 9 2026, and new 3.1 series models were missing.
- Add gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview, gemini-3.1-flash-image-preview
- Replace gemini-3-pro-preview with gemini-3.1-pro-preview everywhere
- Remove retired Gemini 1.x models (gemini-1.0-pro, gemini-1.5-pro, gemini-1.5-flash, gemini-1.5-flash-8b)
- Remove retired experimental 2.0 image gen models
- Fix default model from retired gemini-pro to gemini-2.5-flash
- Update docs, onboarding config, VSCode schema, GUI model picker, VertexAI provider
- Update isRecommendedAgentModel regex and tests
Fixes#10996, #10998
* fix: address review comments
- Add missing gemini-3.1-flash-image-preview to VS Code schema enum
- Tighten isRecommendedAgentModel regex to match 3-flash-preview (not bare 3-flash)
- Update case-insensitivity tests for new model names
* fix: fix misleading test description and inconsistent doc heading
- Rename test to "Gemini 3.1 Pro and 3 Flash Preview models" to match assertions
- Update chat.mdx heading from "Gemini 3 Pro" to "Gemini 3.1 Pro"
* add support for gemini in ai sdk
* support thought signature conversion
* capture extra_content in assistasnt tool calls
* fix: update vercelStreamConverter tests for tool-call chunk emission
The tool-call case now returns a chunk (for Gemini thoughtSignature
support) instead of null, so tests need to expect the new behavior.
---------
Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
chore: remove Gemini 2.0 Flash from defaults/UI/docs and update Claude defaults to 4.6
Gemini 2.0 Flash is no longer supported for new Gemini users. Remove it
from the add model form, onboarding defaults, config schema, docs, and
CometAPI supported models list. Replace with Gemini 2.5 Flash where
appropriate. Gemini 2.0 Flash remains in llm-info for existing users.
Update Claude model defaults to 4.6 series (Sonnet 4.6 and Opus 4.6) in
onboarding config, workspace block templates, and documentation examples.
* add session export slash command
* import session
* Fix slashCommands test: mock path.isAbsolute and history manager
The import of historyManager in slashCommands.ts triggers
core/util/paths.ts which calls path.isAbsolute — not provided by
the existing path mock. Add the missing path exports and mock
core/util/history.js to avoid filesystem operations in tests.
---------
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* list all skills using /skills slash command
* make skills slash command invokable
* load the skill using skills tool
* make skills tool allowed by default
* add /import-skills slash command
* Update extensions/cli/src/tools/skills.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix stale in use effect
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
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.
* feat(cli): discover .continue/checks/ in cn review
The README and quickstart docs tell users to create check files in
.continue/checks/, but cn review only discovered files from
.continue/agents/. This caused a broken onboarding path where users
following the docs would get zero reviews when testing locally.
resolveFromLocal() now reads from both .continue/agents/ and
.continue/checks/, deduplicating by filename. Files in agents/ take
precedence if the same filename exists in both directories.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): correct readdirSync mock types in resolveReviews tests
Cast mock implementations with `as typeof fs.readdirSync` instead of
returning `as unknown as fs.Dirent[]`. The CI lint step runs
`tsc --noEmit` which caught the type mismatch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add Tensorix as an LLM provider
Adds Tensorix (https://tensorix.ai) as a new OpenAI-compatible
provider, giving users access to DeepSeek, Llama 4, Qwen, GLM,
and other models through a single API key.
Changes:
- New LLM class (core/llm/llms/Tensorix.ts)
- Registered in LLM index and config schema
- Added to VS Code extension config schema
- Added to GUI provider selection with AUTODETECT
* Fix missing commas in config_schema.json for tensorix entries
Co-authored-by: openhands <openhands@all-hands.dev>
* feat: address reviewer feedback for Tensorix provider
- Add tensorix to openai-adapters (types.ts + index.ts)
- Add tensorix to PROVIDER_HANDLES_TEMPLATING, PROVIDER_SUPPORTS_IMAGES,
and PARALLEL_PROVIDERS in autodetect.ts
- Add docs page for Tensorix under more providers
- Add tensorix to docs.json navigation
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: openhands <openhands@all-hands.dev>
* chore(deps): bump systeminformation in /extensions/vscode
Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 5.30.6 to 5.30.8.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/compare/v5.30.6...v5.30.8)
---
updated-dependencies:
- dependency-name: systeminformation
dependency-version: 5.30.8
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* Fix package-lock.json sync issues
Add back missing @types/node and undici-types peer dependencies that were
removed by dependabot but are still required by inquirer and vite-node packages.
The original dependabot PR incorrectly removed these peer dependency entries,
causing npm ci to fail in CI with 'Missing from lock file' errors.
Co-authored-by: dallin <dallin@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Co-authored-by: RomneyDa <RomneyDa@users.noreply.github.com>
Co-authored-by: Continue <noreply@continue.dev>
fix: guard BASH_SOURCE[0] against unbound variable in CLI install script
Add missing ':-' default value guard to the first BASH_SOURCE[0]
reference on line 327, matching the pattern already used in the
second reference on the same line. Without this guard, piping the
script via 'curl | bash' fails immediately with 'unbound variable'
under set -u.
Fixes#11268
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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>
* fix: extensions/vscode/package.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-TAR-15416075
* chore: package lock update for snyk bump
---------
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Added npm overrides to force minimatch@^9.0.7 for all dependencies
that use vulnerable versions (<9.0.7). This addresses:
- SNYK-JS-MINIMATCH-15309438: ReDoS (High Severity)
- SNYK-JS-MINIMATCH-15353387: ReDoS (High Severity)
- SNYK-JS-MINIMATCH-15353389: Inefficient Algorithmic Complexity (High Severity)
The vulnerable minimatch@9.0.5 was introduced as a transitive dependency
of @sentry/profiling-node > @sentry/node.
Generated with [Continue](https://continue.dev)
Co-authored-by: Continue Agent <noreply@continue.dev>
* feat: add hooks system for CLI event interception
Adds a Claude Code-compatible hooks system that allows external handlers
(shell commands, HTTP endpoints) to intercept and respond to CLI events.
Supports 16 event types with regex-based matching, typed inputs/outputs,
sync/async execution, and multi-source config merging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: register HookService in service container
The fireHook.ts module references services.hooks, which requires the
HookService to be registered in the service container and exposed in
the services object.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve eslint errors in hooks files and services/index.ts
Fix unused imports, import ordering, and negated condition lint errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: handle EPIPE errors on hook stdin writes
When a hook command exits before we finish writing to stdin, an EPIPE
error is emitted. Add an error handler to suppress it gracefully.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: skip hookRunner tests on Windows
The hookRunner tests use /bin/sh syntax (>&2, single-quote echo, sleep)
that is incompatible with Windows cmd.exe.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address cubic review - utf8 encoding, regex, EPIPE handling
- Use setEncoding("utf8") on stdout/stderr instead of data.toString()
to prevent multi-byte character corruption at buffer boundaries
- Fix env var interpolation regex to use alternation instead of
independent optionals, preventing unbalanced brace matching
- Only suppress EPIPE errors on stdin, log other errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove AI slop from hookRunner.ts
* Update AGENTS.md to document hooks system
* Fix React hooks best practices in useService.ts
* fix: correct indentation in useService.ts for prettier
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove invalid eslint-disable for react-hooks/exhaustive-deps
The react-hooks eslint plugin is not configured in the CLI package,
so the disable comment causes an eslint error.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
* fix: correct cache_hit_rate calculation and remove duplicate emission
Two bugs in prompt_cache_metrics telemetry:
1. Duplicate emission: prompt_cache_metrics was emitted twice per API
request — once using `actualInputTokens` and again using
`fullUsage.prompt_tokens`. This doubled all event counts in PostHog
and produced conflicting values.
2. Wrong denominator: cache_hit_rate was calculated as
`cacheReadTokens / prompt_tokens`, but the Anthropic adapter maps
`prompt_tokens` to only non-cached input tokens (`input_tokens`),
excluding cache reads and writes. When caching works well, this
produces ratios >> 1 (observed max: 89,892). The correct total is
`prompt_tokens + cache_read_tokens + cache_write_tokens`.
Fix: remove the first duplicate emission and compute total_prompt_tokens
as the sum of all three token types. cache_hit_rate is now a proper 0-1
ratio.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: emit tool call id/name from tool-input-start in Vercel stream converter
The Vercel AI SDK streams tool calls as tool-input-start → tool-input-delta
→ tool-input-end → tool-call. Previously, tool-input-start was ignored (returned
null) and tool-call emitted the full tool call at the end, which meant streaming
consumers never saw the tool call id on intermediate chunks.
Now tool-input-start emits the initial chunk with id and function name (matching
OpenAI's streaming format), and tool-call returns null to avoid duplicating args
already streamed via tool-input-delta.
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Continue <noreply@continue.dev>
Use setEncoding("utf8") on stdout/stderr streams instead of
per-chunk Buffer.toString() to avoid breaking multi-byte characters
at chunk boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move execa type import before vitest to satisfy eslint import/order.
Require SMOKE_PROXY_MODEL env var for continue-proxy test since the
proxy needs a 4-part model name (owner/package/provider/model) that
depends on org-specific configuration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>