mirror of
https://github.com/cline/cline.git
synced 2026-10-25 10:26:36 +08:00
dpc/remove-legacy-loader
1187
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6b0b05ceb4 | fix(vscode): harden nightly preview publishing | ||
|
|
0faf481e22 | chore(vscode): remove legacy bundle loader | ||
|
|
2e9571acf0 |
refactor(cli): simplify dashboard webview asset resolution (#15209)
* refactor(cli): simplify dashboard webview asset resolution * test(cli): remove obsolete wrapper layout dashboard test |
||
|
|
49648740e4 | Stack the restart button under the text in the desktop update toast (#15230) | ||
|
|
9cb0410253 |
fix(core): run plugin commands in the active session runtime (#14505)
* fix(core): own plugin commands in the runtime and hub * docs(core): separate session command ownership from resource loading * style(cli): sort imports after command activity integration * fix(core): preserve plugin command delivery and catalog recovery * test(desktop): require non-replaying plugin command dispatch * fix(core): bound catalog refresh and remove generated test code * fix(core): rearm plugin watches as discovery directories appear * fix(core): reconcile sources after watcher registration * fix(core): expose only plugin commands from resident sessions (#15185) * fix(core): own plugin commands in the runtime and hub * fix(core): expose only plugin commands from resident sessions Session registries also hold the built-in skill and workflow commands. Their handlers return the instruction text, which pluginCommands.run turned into a reply, so Desktop and the CLI showed the skill body and never sent it to the model. Mark commands registered through PluginRegistry and filter on that. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: abeatrix <beatrix@cline.bot> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(core): run workspace plugin commands for sessions the runtime lacks (#15186) * fix(core): own plugin commands in the runtime and hub * fix(core): run workspace plugin commands for sessions the runtime lacks list() already falls back to the workspace catalog when the runtime does not have the session, but run() threw SessionNotFoundError. Desktop calls run() before its hub-loss reconnect and connectors call it before their stale binding recovery, so a lost session failed the whole send. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * test(core): place missing-session plugin command test apart from sibling fixes Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: abeatrix <beatrix@cline.bot> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(core): treat hubs without plugin command RPCs as having no commands (#15188) * fix(core): own plugin commands in the runtime and hub * fix(core): treat hubs without plugin command RPCs as having no commands A running Hub that predates plugins.commands.* replies unsupported_command, and replacement defers while it has active work. The client threw on that reply, so every non-built-in slash command, skills included, failed in Desktop until the old Hub exited. Return an empty catalog and no command result instead. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(core): catch the unsupported_command error the hub client throws NodeHubClient.command() throws HubCommandError for a non-ok reply, so checking the reply never saw an older Hub's unsupported_command. Catch the thrown error instead, and make the regression test reject the way the real client does. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: abeatrix <beatrix@cline.bot> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(desktop): target plugin commands at the session's workspace root (#15189) * fix(core): own plugin commands in the runtime and hub * fix(desktop): target plugin commands at the session's workspace root Core checks a session command's workspace against the session's workspaceRoot ?? cwd, but Desktop sent cwd first. A session whose cwd is a subdirectory of its workspace root failed with 'Plugin command workspace does not match the session'. Resolve the live session's workspace the same way. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: abeatrix <beatrix@cline.bot> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(cli): refresh plugin command autocomplete when the active session changes (#15190) * fix(core): own plugin commands in the runtime and hub * fix(cli): refresh plugin command autocomplete when the active session changes Session commands come from the active session's plugins, but autocomplete only reloaded on mount or on a workspace catalog event. The first catalog loads before a session exists, so session-only commands stayed hidden. Notify the slash command subscription when a session starts or is cleared. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: abeatrix <beatrix@cline.bot> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(core): keep subprocess-loaded plugin commands in resident sessions (#15207) isPluginCommand only recognized commands wrapped by PluginRegistry, but with CLINE_PLUGIN_MODE=sandbox sessions load plugins through loadSandboxedPlugins, which registers commands directly. Resident sessions then listed no plugin commands and /commands stopped reaching their handlers. Move the marker into plugin-command-origin.ts and mark commands from both loaders. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(desktop): port packaged plugin runtime probe to runtime-owned plugin commands Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(desktop): keep skills and workflows working when the plugin catalog is unavailable (#15222) Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * refactor(core): replace plugin catalog push with per-request freshness (#15224) * refactor(core): replace plugin catalog push with per-request freshness - Drop pluginCommands.subscribe and the plugins.commands.changed event. Hub runtime hosts no longer open a global event stream, so the per-listener event ID dedupe in NodeHubClient is removed with it. - Reduce PluginCommandManager to a per-workspace catalog that fingerprints plugin sources and settings on every request, keeps healthy commands through a failed load, and retries that load after 30 seconds. File watchers, debounced source checks, backoff timers, and per-path recovery are removed. - Release workspace catalogs that have been idle for 10 minutes so the long-lived Hub does not keep plugin workers for every workspace it served. - CLI suggestions reload on mount and active session change; desktop composers re-list plugin and instruction commands when the slash menu opens. Client retry loops are removed. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(core): isolate workspace catalog loads from the shared plugin registry Catalog loads went through the process PluginRegistry, so a fatal import failure in a catalog worker blocked the shared entry: live sessions' copies failed their usability check, and the 30s retry was skipped as blocked until a source edit. Each catalog load now uses its own registry. The fingerprint no longer hashes the whole settings file. The resolved entry list already excludes plugins disabled in settings, so unrelated preference changes no longer restart workspace catalogs. * fix(core): require a registered workspace for Hub plugin commands An unregistered WebSocket connection reaches the plugin command handler with no authority, which skipped the workspace check and accepted any caller-chosen workspacePath. Reject it, matching task commands. Every NodeHubClient registers on connect, so real clients are unaffected. * fix(desktop): key cached plugin suggestions by session A resident session's plugin commands can differ from the workspace catalog. Switching sessions in the same workspace kept showing the previous session's commands, indefinitely if the new read failed, and a stale plugin name could hide a skill or workflow of the same name. --------- Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> |
||
|
|
82486434b3 |
fix(cli): make build:platforms:single work on Windows (#15206)
* fix(cli): make build:platforms:single work on Windows Replace shell rm -rf with rmSync in apps/cli/script/build.ts, retry temporary smoke-test directory cleanup while the detached hub process exits on Windows, and use mkdtempSync with non-Windows chmodSync in apps/cli/script/compile-binary.ts. * fix(cli): warn if smoke-test directory cleanup fails after retries Use rmSync maxRetries/retryDelay for post-smoke-test cleanup and log a warning with the directory path and error if removal still fails. |
||
|
|
2377a20973 |
fix(core): load embedded plugin and dashboard resources (#15080)
* fix(core): load embedded plugin and dashboard resources * fix(core): isolate subprocess Bun mode and retain system CA trust * fix(core): load compiled plugin resources directly from bunfs * test(desktop): compare native paths and tolerate Hub cleanup on Windows The standalone plugin test compared the child's process.execPath to realpathSync(cli), which keeps Windows 8.3 short names (RUNNER~1) while the child reports the long path. Use realpathSync.native. The dashboard test's cleanup could hit EBUSY while the stopped Hub released its cwd; retry it like the startup scenario cleanup does. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(core): package every declared SDK runtime export --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> |
||
|
|
d800bf8271 |
chore: pin the skills CLI release and let Dependabot bump it (#15144)
* chore: pin the skills CLI release and let Dependabot bump it cline skill, the marketplace skill fallback (desktop, hub, VS Code) and core's skill uninstall ran npx skills@latest, so a Vercel release could change behaviour or raise the Node floor under shipped builds without any change on our side (1.5.16 broke Node 18/20 on 2026-07-10, 1.5.19 raised the floor to >=22.20 on 2026-07-16, both within days of us adopting it). The release is now an exact devDependency of @cline/core, exposed as SKILLS_CLI_PACKAGE, and Dependabot opens a PR for each new version so bumps go through CI and review. The package's code is never executed by us; only its package.json version is read at build time. * test(core): guard the skills CLI pin against tags and ranges |
||
|
|
7e8d22c789 | fix(vscode): settle pending questions before posting state (#14839) | ||
|
|
41e75efc53 |
fix(vscode): honor disabled rule toggles in SDK sessions (#14605)
* fix(vscode): persist rule toggle state for SDK loader * fix(vscode): confine rule toggle frontmatter writes and preserve authored YAML - Only write rule documents the SDK loader actually reads (.md, .markdown, .txt, or the bare .clinerules file) that resolve, through symlinks, to a regular file inside the scope's rules root (global Rules dir or the workspace .clinerules). Anything else keeps the extension-state toggle only. - Edit the top-level `disabled` entry line by line instead of re-dumping the YAML block, so comments, key order, quoting, CRLF line endings and a UTF-8 BOM survive a toggle. Re-parse before writing and leave the file untouched if the result would not parse. Skills share the helper and get the same. - Reconcile extension state with frontmatter on rules refresh: toggles turned off before this fix are written to the file so SDK sessions honor them, and a file disabled by hand wins over a stale enabled toggle. * fix(vscode): write rule toggles into every rule root the panel scans Rebase adjustment: since the rules panel now scans both .clinerules and .cline/rules plus every global location the shared resolver knows, the frontmatter write and the state<->frontmatter reconcile take the same directory lists instead of the two hardcoded roots. * fix(vscode): make rule files authoritative for toggles after a one-time back-fill - Match the SDK's disabled precedence: a boolean `disabled` wins, `enabled: false` only counts when `disabled` is absent. - Recognize quoted frontmatter keys when editing the disabled line. - Return written/skipped/failed from the frontmatter write; on failure the toggle handler reverts the state toggle and returns the reverted map so the panel keeps showing what the SDK loads. - Back-fill state toggles into frontmatter once, behind a new global state flag; afterwards the file is the source of truth for the panel in both directions, so removing `disabled` from a file re-enables the rule. - Only write files the SDK loader reads: direct children of a rule root, or the single legacy .clinerules file. * fix(vscode): back-fill rule toggles per workspace and accept uppercase YAML booleans - The one-time back-fill marker is now keyed per scope (global, and one entry per workspace path), so a workspace opened after another one was migrated still gets its pre-fix off toggles written into its rule files instead of having them flipped on by the file-wins reconcile. - The enabled: false matcher accepts False and FALSE, which both YAML parsers in play read as boolean false, so re-enabling removes those lines too. * fix(vscode): keep the workspace back-fill marker in workspace state Each window holds its own copy of global state and the last writer wins per key, so two windows migrating different workspaces could erase each other's marker in the shared record. The global marker is a plain flag again and the workspace marker moves to workspace state, keyed by workspace path, which is per window and never shared. * fix(vscode): report a rule toggle as failed when the file could not be edited safely The frontmatter helper returns the document unchanged both when it already carries the requested state and when it cannot be edited safely (malformed YAML, or an edit that would not re-parse). The write wrapper treated both as success, so the toggle handler kept the new state while the SDK kept loading the old one. An unchanged document now counts as written only if it parses and already matches the requested state; otherwise the handler reverts. * fix(vscode): retry a failed rule back-fill and keep comments after inline disabled values - A back-fill write that fails (read-only file, malformed frontmatter) keeps the off toggle and leaves the scope's migration marker unset, so the next refresh retries instead of treating the unwritten file as re-enabled. - An entry with an inline scalar value is a single line, so an indented comment after `disabled: true` is no longer removed with it. * fix(vscode): track the rule back-fill per rule instead of per scope A scope-wide migration marker forced a choice between two failure modes: mark the scope done after a failed back-fill (the unwritten rule turns on), or keep the whole scope pending (a rule the user re-enabled by hand gets back-filled again). Each rule now records whether its file is authoritative. A rule joins that set when state and file agree, when the file disables it, when its back-fill succeeds, or when the toggle handler writes it; only a rule whose back-fill failed stays pending and is retried on the next refresh. The global set lives in global state and the workspace set in workspace state, replacing the unreleased scope markers. Also handle an inline disabled value that continues on later lines (a flow collection or a split quoted string) by taking lines until the entry parses. * fix(vscode): keep global rule authority records in their own settings file Every window caches global state and persists its whole snapshot, so a window that started before another one back-filled a global rule kept no record of it. After the user re-enabled that rule by editing its file, refreshing the stale window back-filled it again. The global records now live in settings/cline-rules-frontmatter-authority.json, re-read on every refresh and merged on every write, so windows only ever add to them. Records for deleted rule files are dropped on write. Workspace records stay in workspace state, which is a separate file per workspace. * fix(vscode): make the rule file the only source of truth for rule toggles Drop the one-time back-fill of toggles saved before the toggle wrote frontmatter. Telling such a toggle apart from a rule the user re-enabled by editing its file needs per-rule history, and every place to keep it (scope flags, global state, workspace state, a settings file) failed across multiple windows, crashes, or hand edits. The Rules panel now shows what the frontmatter says on every refresh, and the toggle writes it. A rule switched off before this fix shows as on after upgrading, which is what the SDK has been loading, and is switched off once more. Removes the per-rule authority records, the authority settings file, and the localClineRulesFrontmatterAuthoritative workspace key. The multi-layout refresh test now marks its disabled fixtures in frontmatter. * fix(vscode): verify the requested state before reporting a toggle write The rule and skill write paths trusted the frontmatter editor's output. An edit that left a disabling flag the editor did not recognize (for example a legacy `enabled: false` whose value is on the next line) was written and reported as success, so the panel showed the rule or skill as on while the SDK still excluded it. Both paths now re-parse the edited document and treat anything not in the requested state as a failure, so the rule toggle handler reverts and the skill write reports false without writing. * fix(vscode): edit rule and skill frontmatter by YAML source range The line-based editor guessed entry boundaries from line shapes. It missed a legacy `enabled: false` whose value sits on the next line, matched `disabled:` lines inside multi-line string values (changing unrelated metadata while still producing valid YAML), and dropped comments on and around the flag. The editor now parses the frontmatter with the SDK loader's YAML parser and splices only the source ranges of the top-level `disabled` and `enabled` entries. Disabling sets an existing value or appends `disabled: true`. Enabling removes those entries, or flips the value in place when the entry carries a comment so the comment survives. Anything the SDK would reject (invalid YAML, duplicate keys, non-boolean flags) is left untouched, and an edit is discarded unless every other value is unchanged and the result is in the requested state. The Rules panel reads state with the same parser. Declares `yaml` (already a workspace dependency through @cline/core) as a direct dependency of apps/vscode. * test(vscode): mock @cline/core before it is loaded in the bun harness The preload imported the real @cline/core to read its export names and then mocked it. Mocking an already-loaded module makes bun re-link the graph, and that re-link leaves a slice of @cline/shared's source-tree exports undefined (stripUtf8Bom among them) for everything under sdk/packages/core, which resolves @cline/shared to shared/src through core's tsconfig paths. Any real SDK function the stub re-exports then threw when called from a test. The export names now come from a child process, cached on the built package's mtime, the mock is registered first, and the stub and @cline/llms are imported after it. * fix(vscode): let the SDK parser decide a rule's enabled state The extension kept its own copy of the SDK's rules for reading a rule file's enabled state, and every review round found a case where the copy and the SDK disagreed: flag precedence, uppercase booleans, non-boolean values, and now frontmatter that is not a mapping, which the SDK loads as having no metadata but the copy treated as unloadable. A rule starting with a markdown divider line could not be switched off. The Rules panel, both write paths, and the editor now ask parseRuleConfigFromMarkdown / parseSkillConfigFromMarkdown from @cline/core, so they cannot disagree with what the SDK loads, now or after the SDK changes. The editor still parses the block as a YAML document, but only to locate the source ranges it edits. A file with non-mapping frontmatter is disabled by adding a disabled: true block above it, and re-enabling restores it exactly. A comment-only block gets the flag appended inside it. A file the SDK does not load at all (unparseable frontmatter, non-boolean flag, empty body) now shows as off in the panel, since nothing from it reaches the model; switching it on fails and reverts, with the reason logged. The bun test stub re-exports the two parsers from the SDK source. --------- Co-authored-by: 33modeling <33modeling@gmail.com> |
||
|
|
9857d19fc4 |
fix(vscode): keep the session's mode in sync when Plan/Act is toggled during a session start (#15026)
* test(vscode): cover Plan/Act toggles that race a session start A toggle that lands while a session is being started or replaced sees no active session, flips only the setting, and leaves the session running with the other mode's tools. These tests reproduce that and fail on main. * fix(vscode): keep the session's mode in sync when Plan/Act is toggled during a session start Starting or replacing a session detaches the outgoing one before the new one is active. A toggle in that window saw no session, flipped only the setting, and the session that finished starting kept the other mode's tools, so the UI showed Act while every write was blocked as plan mode. - Sessions record the mode they were built for. - The toggle decides under the rebuild lock, after waiting for session starts that run outside it (new task, edited message, checkpoint restore). - The toggle and the rebuild compare against the session's mode rather than the setting, which also fixes the stale mode notice the late rebuild left. * test(vscode): release session-start waiters when the start fails Cover a waiter that is already in place when a tracked start rejects. The previous check only waited after the rejection, so an implementation that rejected existing waiters would still have passed. |
||
|
|
dc3d7a58c9 |
fix(vscode): keep keyboard focus when revealing the terminal for a command (#15061)
* fix(vscode): keep keyboard focus when revealing the terminal for a command Every foreground run_commands execution called terminal.show() with no argument, which makes VS Code move keyboard focus into the terminal. A user typing in the chat input while Cline starts a command had the rest of their keystrokes land in the shell, corrupting the running command. Pass preserveFocus=true at both reveal sites (the per-command reveal in runCommand and the pre-cd reveal of a reused terminal). The terminal panel is still revealed, which is all shell-integration initialization needs. * test(vscode): stub the command process in the reveal-only terminal test The reveal test fed the process a never-ending stream, so its VS Code shell-execution and terminal-close listeners outlived the test. Stub run() instead; the test only checks the reveal call. |
||
|
|
731f48462b |
Support MCP Resources [NO-OP] (#15165)
* Support MCP Resources * Small fixes * Address PR comments * remove CreateMcpToolsOptions mcpApps option |
||
|
|
a42df8c8d5 | chore(desktop): release v0.0.48 | ||
|
|
c718573538 | chore(cli): release v3.0.73 | ||
|
|
44b388b998 |
chore(vscode): fix integration test runner on macOS (#15088)
* chore(vscode): fix integration test runner on macOS Bump @vscode/test-electron to 3.1.0, which resolves the macOS executable from Info.plist. VS Code 1.110+ renamed Contents/MacOS/Electron to Code and dropped the compatibility symlink, so 2.5.2 failed every run with `spawn .../Contents/MacOS/Electron ENOENT`. Also pass a short --user-data-dir on macOS. VS Code puts its IPC socket in the user data dir, and the default .vscode-test/user-data overflows the 103-char unix socket limit from deep checkouts such as worktrees (`listen EINVAL ... 1.14-main.sock`). Linux and Windows keep the default. * test(vscode): drop the macOS E2E executable fallback @vscode/test-electron 3.1.0 resolves the macOS executable from the app bundle's Info.plist for both Stable and Insiders, so downloadAndUnzipVSCode now returns Contents/MacOS/Code directly and the Code / Code - Insiders fallback never runs. |
||
|
|
f67e933376 | fix(desktop): bake the OTLP trace exporter into desktop builds and record who launched the hub (#15135) | ||
|
|
01b8a9724d | chore(vscode): release v4.1.25 | ||
|
|
98a53322f9 | chore(desktop): release v0.0.47 | ||
|
|
9098d603cc |
feat(webview): name the host editor in Cloud sessions copy (#15133)
* feat(webview): name the host editor in Cloud sessions copy The Cloud sessions copy said "your editor". Name the editor the user is actually in instead: "VS Code", "Cursor", "PyCharm" and so on. The extension already gets the product name from the host bridge (getHostVersion's platform); fetch it once and pass it to the webview as hostName. The webview shortens it the way users say it (drops the JetBrains edition, "Visual Studio Code" -> "VS Code") and falls back to "your editor" when the host is unknown. * fix: read the host name from HostRegistryInfo instead of a bridge call HostRegistryInfo already holds getHostVersion's platform from startup, so building webview state no longer waits on the host bridge. The tooltip test now asserts the visible text instead of reusing the function it tests. * fix(webview): fall back to "your IDE" when the host is unknown |
||
|
|
d9deb814e8 | chore(cli): release v3.0.72 | ||
|
|
1faa00fa25 |
fix(webview): use editor-neutral wording in Cloud sessions copy (#15123)
The webview is shared with the JetBrains plugin, where "after you close VS Code" is wrong. Say "your editor" instead in the onboarding/GitHub cards, the Run task hint and the cloud auto-approve tooltip. |
||
|
|
cd01a92faa | security: dependency floor lifts for open Dependabot advisories (#15132) | ||
|
|
23791b9323 |
fix(desktop): pass --use-system-ca when launching the backend on the bundled CLI (#15125)
The desktop backend now runs as `BUN_BE_BUN=1 cline-cli run <bundle>`. In that mode Bun ignores the flags baked into the CLI with --compile-exec-argv, so the backend lost the --use-system-ca that #14462 added and went back to trusting only Bun's bundled roots on macOS and Windows. Requests the backend makes itself (model lists from a LiteLLM or other intranet endpoint, sign-in refresh, marketplace, cloud sessions) failed with "unable to get local issuer certificate" behind a corporate CA. Pass the flag on the run command, and mirror it in the startup test. |
||
|
|
90f9ba059e |
feat(desktop): remove the Cloud sessions settings toggle (#15110)
* feat(desktop): enable cloud sessions for everyone Remove the Cloud sessions preview toggle from Settings and the code-cloud-agents rollout flag that revealed it. Cloud sessions are now on by default; CLINE_CODE_CLOUD_AGENTS=0 still turns them off for development and tests. * fix(desktop): keep the code-cloud-agents rollout flag as the cloud gate Only the Settings opt-in should go away. Cloud sessions are enabled wherever the code-cloud-agents PostHog flag is on (or the CLINE_CODE_CLOUD_AGENTS env override forces them). |
||
|
|
3834735da2 | fix(webview): keep the Run task card above the Auto-approve bar in JetBrains (#15120) | ||
|
|
2ffa920b0e |
fix: add /v1 to host-only OpenAI Compatible base URLs once, on VS Code and JetBrains (#15108)
* fix(vscode): migrate host-only OpenAI Compatible base URLs to /v1 once
Earlier extension builds sent requests for a host-only OpenAI Compatible base
URL to <host>/v1. #15057 now uses the URL as entered, so persist the /v1 for
existing users once instead of retrying requests at runtime.
* Revert "fix(vscode): migrate host-only OpenAI Compatible base URLs to /v1 once"
This reverts commit
|
||
|
|
0474213f6c |
fix(vscode): keep Auto Compact and its strategy together in Feature settings (#15109)
The Cloud toggle was appended to the agent toggle list, which renders before the Auto Compact Strategy dropdown, so it split Auto Compact from its strategy. Render the Cloud row after Web Search instead. |
||
|
|
adc7b15535 |
fix(vscode): include attachments in ask_question answers (#15059)
* fix(vscode): include attachments in ask_question answers Answer a pending ask_question with the user's images and attached files in the tool result itself, as the pre-SDK extension did, instead of dropping them. The SDK's AskQuestionExecutor may now return text and image blocks (the same shape read_file returns), and the answer bubble shows the attachments. * fix(vscode): let cancel settle an ask_question answer while attachments load Cancelling the task while an answer's attached files were still being extracted could not release the question, so the old run (and anything waiting for it to stop) stalled until extraction finished. Keep the claimed resolver reachable so clearPending settles it immediately. |
||
|
|
868464e4f3 |
fix(vscode): don't append default path to OpenAI Compatible base URL (#15057)
* fix(vscode): don't append default path to OpenAI Compatible base URL normalizeSdkBaseUrl inherited the SDK default path (/v1) for URLs with no path, turning https://abc.com into https://abc.com/v1. OpenAI Compatible endpoints are user-supplied and were passed verbatim by the legacy client, so skip default-path inheritance for this provider. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(vscode): reword base URL comment per review Co-authored-by: Mikołaj Kondratek <19799111+mkondratek@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Mikołaj Kondratek <19799111+mkondratek@users.noreply.github.com> |
||
|
|
83ea9a41d1 |
refactor: Start the desktop and SSH remote hubs through the bundled Cline CLI (#14792)
* Let hosts choose the hub daemon launcher and defer spawn-only setup Adds setHubDaemonLauncher so an embedding process can start the hub daemon through a bundled Cline CLI instead of its own executable, and a beforeSpawn hook on ensureDetachedHubServer that only runs when a new daemon is actually started. * Add programmatic options to cline hub ensure hub ensure/start gain --json (URL + auth token), --allow-port-fallback, --no-connectors and --login-shell-path, and the hub command accepts --discovery-path for a dedicated discovery record. These let the desktop app and SSH remotes start or reuse a hub through the CLI. Also extracts the standalone binary compile step into script/compile-binary.ts so other packages can build the CLI binary. * Run SSH remote hubs through the Cline CLI SSH remotes now upload the Cline CLI binary and start or reuse the remote hub with 'cline hub ensure --json --discovery-path ...', stopping it with 'cline hub stop'. The dedicated remote helper entrypoint is removed; cleanup records from older releases still stop through the old flag. * Run the desktop backend on the bundled Cline CLI The desktop app no longer compiles its own executable. It bundles the self-contained Cline CLI (externalBin cline-cli) plus the backend as a JS bundle that runs on the CLI's embedded runtime. At startup the backend has the CLI run 'hub ensure', which reuses a compatible healthy Hub or starts one, and any Hub it starts later also goes through the CLI binary. Linux CLI copies are bundled for SSH remotes. * Launch the desktop backend through the bundled Cline CLI The Tauri shell resolves the bundled cline-cli and the backend bundle (per-platform resource layouts) and starts 'cline-cli run' on it. The Windows installer stops users of cline-cli.exe, and also stops and removes the backend executable of earlier releases on upgrade. * Recognize the CLI-hosted desktop backend in cline doctor --fix * Update desktop publish workflow and docs for the bundled Cline CLI Telemetry selfchecks and smoke tests run the backend bundle on the bundled CLI, and the Windows signature gate verifies cline-cli.exe. * fix(desktop): address runtime packaging review findings * fix(desktop): preserve failed hub cleanup and handle exited daemons * fix(hub): distinguish missing discovery records from read failures * fix(hub): preserve discovery recovery while enforcing strict shutdown reads * fix(cli): do not count hub commands as CLI activations (#14870) * fix(cli): do not count hub commands as CLI activations The desktop app runs `cline-cli hub ensure` on every launch and the SSH remote flow runs `cline hub ensure` on every connect. Both went through runCli(), which captured user.extension_activated unconditionally, so each desktop launch was double-counted as a CLI activation and every SSH remote host (with its own distinct id) showed up as a new CLI user. Skip the activation capture for the hub subcommand; it is plumbing other clients invoke, not a user activation. Hub-owned task telemetry is unaffected since the daemon path never enters runCli(). * test(cli): clear the hub command mock between main.test.ts cases * test(cli): stop stubbing the hub command module in main.test.ts The module-wide vi.mock("./commands/hub") replaced createHubCommand with a no-op, so `cline hub dashboard` (routed through createHubCommand) never reached the dashboard mock and three dashboard tests failed. Drop the module mock and assert the activation exclusion through `hub dashboard --no-open`, which is already mocked. --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> |
||
|
|
1932d5dc37 |
feat(vscode): Cline Cloud sessions - run tasks in a hosted sandbox from the extension (#13799)
* feat(sdk): support header-authenticated remote Hub connections Ports the NodeHubClient resolveConnectionHeaders option from #13519 so a client can authenticate a remote proxy's WebSocket upgrade with HTTP headers (refreshed on every reconnect), and threads it through HubRuntimeHost and RemoteRuntimeHost so ClineCore remote runtimes can reach Cline Cloud sandboxes. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * feat(vscode): cloud session runtime, control-plane client and history integration Adds the extension-host side of Cline Cloud sessions: - CloudSessionsService: REST client for GitHub App status/repos/branches and the outer session records (create/list/status/delete/rename/history) - CloudSessionHost: an SdkSessionHost over RemoteRuntimeHost that dials the sandbox Hub through the api.cline.bot proxy with the account token, maps outer/inner ids and re-emits events so the existing chat pipeline is reused - SdkCloudSessionCoordinator: starts/reopens cloud tasks, keeps sandbox connections alive to track running/finished status, notifies on completion and projects cloud sessions into task history - CloudService proto + handlers, NewTaskRequest execution target, history cloud fields/filter, ext-cloud-sessions feature flag Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * feat(vscode): cloud sessions UI — home task-target panel, running strip, history and account - Home screen: Local | Cloud chooser above the composer with GitHub repo and branch pickers (prefilled from the workspace's origin remote and branch) and an onboarding card that walks through connecting GitHub, polling until done - Running-in-the-cloud strip and cloud status pills in Recent/History, plus a Cloud Only history filter - Task header cloud badge (repo @ branch, opens the dashboard); cloud tasks render inline diffs, hide checkpoint/restore and only attach images - Account view: Cline Cloud card with GitHub connection status Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(vscode): cloud task fixes found in manual testing - claim the task-view generation after clearTask (which bumps it), so cloud task start/open is not treated as superseded and left on Thinking - track completion from the agent done event and keep completed/failed over the trailing idle status so History shows Done instead of Cloud - stop the branch picker from re-querying on every render - readable popover text in the repo/branch pickers; hide cost chips on cloud rows Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * docs(vscode): cloud sessions follow-ups and test stub for org switch reset Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(vscode): make cloud sessions Act-only Match the desktop app and the cloud dashboard: cloud sessions are created in Act mode regardless of the selected mode, no per-turn mode is sent, the host refuses Plan/Act toggles while a cloud session is active, and the webview pins the toggle to Act (disabled, with a tooltip) while a cloud task is shown or about to start. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * test(vscode): add local cloud session boundary * fix(vscode): preserve cloud outcomes and stale-work ownership * fix(vscode): drain cloud cleanup before account changes * fix(vscode): build cloud sandbox config through the Cline path * docs(vscode): clarify cloud proxy rollout boundary * fix(vscode): close cloud picker when leaving chat * fix(vscode): wait for cloud session before opening dashboard * fix(vscode): keep account history in document flow * fix(vscode): report available cloud task usage * fix(vscode): cancel cloud tasks during provisioning * fix(vscode): make cloud model billing explicit * fix(vscode): hide local approvals for cloud tasks * fix(vscode): resolve cloud prompt before session adoption * fix(vscode): seed local cloud development profile * fix(vscode): sanitize local cloud fixture errors * fix(vscode): handle cloud state before hydration * fix(core): honor proxies for remote Hub WebSockets * fix(vscode): preserve cloud task IDs * fix(vscode): explain cloud auto-approval * test: repair cloud and proxy CI fixtures * fix(vscode): resolve cloud status after restart * fix(vscode): resolve flags for restored accounts * fix(vscode): keep cloud tasks in the cloud and in Act mode * test(vscode): let the local cloud fixture delay model replies CLINE_LOCAL_CLOUD_MODEL_DELAY_MS holds the scripted reply so cancellation and navigation can be exercised while a cloud task is still thinking. * fix(vscode): cancel a cloud task that is still provisioning Cancelling during "Starting a cloud sandbox..." did not stop the start: - Cancel arriving while initTask awaited remote config found no pending start, so the sandbox went on to provision, connect and run the prompt behind a "Resume Task" view, and the user paid for a sandbox they had cancelled. initTask now claims the cloud start before its first await. - Cancel arriving during the readiness poll took effect only after the sandbox came up. createSession accepts an abort signal that stops the poll, so the unused record is deleted as soon as the control plane answers. - clearTask (New Task) now cancels a pending cloud start too; a provisioning task has no SDK session for the task controller to end. The local cloud fixture reports `ready` like the hosted control plane and accepts CLINE_LOCAL_CLOUD_PROVISION_DELAY_MS to hold new sandboxes in `provisioning`, so this window is reproducible. The cloud Vitest config restores the Zod namespace export the same way vitest.config.ts does. * fix(vscode): keep cloud status displays truthful and hosts open while in use A status check that resolved a cloud task as idle or finished closed the host while openCloudTask could still be reading messages or attaching the session on that same host. Entries now count the openCloudTask calls using them, and neither status resolution nor the idle sweep disposes a host that is pinned or belongs to the displayed task. Cancelling a cloud start while remote config was still loading left the turn phase at streaming after the view had returned home. initTask no longer sets the phase for cloud starts; the coordinator sets it once the start is still current and its task view is installed. useResolvedCloudStatuses kept a resolved status after history reported a newer one, so a task resolved as running stayed "Working" after it completed. The hook now returns statuses only for tasks history still reports as unknown, and the running strip lists a task only while its effective status is active or unconfirmed. An unknown status showed a spinner labelled "Checking" for as long as connections kept failing. It is now shown as Unconfirmed with a static icon; only provisioning and running animate. * test(core): run the proxy tunnel fixture with a real Node executable When Bun runs vitest it reports its own Node-compatible shim as process.execPath and places it first on PATH. That runtime ignores NODE_EXTRA_CA_CERTS, so the spawned fixture failed TLS verification on the Windows CI runner. The test now looks past the shim for an installed Node and is skipped when none is available. * fix(vscode): remember cloud task status across restarts After a restart every cloud row in History showed "Unconfirmed" and joined the running strip until a socket to each sandbox re-learned its status, and the first status a socket reported bumped the row's timestamp to now, reordering History (CLINE-3307, CLINE-3424, CLINE-3418). The coordinator now writes the last settled status it confirmed over a live connection to global state (`cloudSessionStatuses`, keyed by session id with the observation time) and reads it back when it first sees a record. The remembered status is trusted only while the control plane's `updatedAt` is no later than the observation plus a one-minute grace, because the control plane touches `updatedAt` when a client connects; a later touch means another client may have run the agent, so the row falls back to unknown and is resolved live as before. Active statuses are never remembered. Ids the account no longer lists are pruned on every list refresh. A connection that only learns the current status no longer counts as activity; the row's timestamp moves only when the status changes while connected or the user sends a follow-up. * fix(vscode): settle account switches without blocking History * fix(vscode): refresh stale cloud outcomes without restarting * test(vscode): wait for cloud run cleanup before removing sandbox * fix(vscode): reserve switch errors for account transitions * refactor(vscode): remove unused cloud accessors and refresh notes * test(vscode): seed expired sessions and a 402 model reply in the cloud fixture The loopback fixture only ever served live sandboxes, so the read-only expired path and the out-of-credits path could not be exercised without a day's wait or real spend. CLINE_LOCAL_CLOUD_SEED_EXPIRED=1 seeds two Personal sessions whose sandboxes are gone: one with an archived transcript, one that answers /history with the control plane's 404 "no history captured". Their WebSocket upgrade returns 410 like the real proxy and /status reports "expired". CLINE_LOCAL_CLOUD_INSUFFICIENT_CREDITS=1 makes every scripted model reply the hosted API's 402 insufficient_credits body. * fix(vscode): explain expired cloud sessions instead of showing an error Opening a cloud task whose sandbox the control plane retired showed a red error row and, when no transcript had been archived, a synthetic Done row above it. QA read this as data loss (CLINE-3322). The row is now an informational notice that says the sandbox was retired after 24 idle hours and names the repository to start a new cloud task on. It tells three cases apart: the archived conversation is shown above it; no conversation was archived (the control plane answered 404); or the archive could not be loaded right now, with the error. An empty transcript is no longer rendered, so no Done row appears. The History pill reads Archived with a tooltip explaining the retirement. * fix(vscode): show the out-of-credits card for cloud task failures A cloud turn that failed on the Cline API's 402 insufficient_credits reply ended with Retry / Start New Task and no explanation (CLINE-3376). A Hub-hosted session does not forward the agent's "error" event; the client learns of the failure only from run.failed, which the runtime host turns into done(reason: "error") with the failure message as its text. The translator recorded the error outcome for that event but rendered nothing. done(reason: "error") now renders the same api_req_started and api_req_failed rows as an "error" event, once per turn, so ErrorRow shows the Buy Credits card (or the plain error) for cloud tasks as it does for local ones. Both paths share one helper. * fix(vscode): explain cloud sessions deleted or retired since History loaded Opening a cloud task deleted from the dashboard showed "Could not connect to this cloud session: Unexpected server response: 404" and left the row in History (CLINE-3377). The Hub client reports only the HTTP status of the refused upgrade. A failed connection now asks the control plane for the session's status. A deleted session shows a notice and leaves History; a session retired since the list was fetched opens as expired, with its archived conversation if one exists. Other failures keep the connection error. The loopback fixture now answers an unknown session's upgrade with 404, as the hosted proxy does, instead of 401. * fix(vscode): only suggest cloud branches that exist on GitHub The cloud branch picker was prefilled with the workspace's checked-out branch even when it had never been pushed. The sandbox clones from GitHub, so the session then failed to start (CLIENTS-109). The workspace default is now the remote branch the checkout corresponds to: its upstream on origin when one is configured, otherwise the same name when origin has it. A local-only branch yields no suggestion and the picker falls back to the repository's default branch. Branches listed from the GitHub API were already remote. * fix(vscode): accumulate streamed text for cloud tasks A cloud task's reply flickered chunk by chunk and only appeared whole when the message finished (CLIENTS-111). The translator showed each content_start's `accumulated` text, falling back to the chunk alone. A local session sends the running total, but a Hub-hosted session forwards assistant.delta as a bare chunk, so each update replaced the last. The translator now keeps the running total itself when `accumulated` is absent, and clears it with the other per-block streaming state. * fix(vscode): show the cloud model in the composer while Cloud is selected With Cloud selected, or a cloud task open, the composer footer still showed the local provider and model, e.g. anthropic:claude-opus, although the sandbox runs a Cline model (CLIENTS-116). The extension now reports cloudModelId in state: the model the displayed cloud task runs on, else the one a new cloud task would start with. The start path and the label share one function, so they cannot disagree. The composer shows it as cline:<model> whenever it pins the mode to Act for Cloud. * fix(vscode): release the retained host of a deleted cloud session When a session opened from History turns out to have been deleted, its entry leaves the registry. A connection retained from an earlier status check stayed open with nothing to watch; dispose it with the entry. * fix(vscode): keep expired-session and cloud-model displays truthful An archived cloud transcript was rendered with the final turn marked completed, so the last reply of a task that was still running when its sandbox retired showed as a green Done box. Retirement is not completion; the final reply now stays a plain text row. An archive that exists but holds no messages rendered nothing yet the notice pointed at "the conversation above", and the History tooltip promised a readable conversation for every Archived row. An empty archive now reads as none, and the tooltip says to open the session to see whether one was saved. With a non-Cline local provider the composer showed the cached or fallback recommendation while the start path refreshed the list first and could pick a different model. The start now uses the model shown when the user submitted, snapshotted before any await, and the composer warms the recommendation cache once so the label moves from the fallback to the live recommendation before the next submit. * fix(vscode): confirm an account switch overtaken by its own auth update switchOrganization confirmed a switch by re-reading the organizations and treating an answer overtaken by a newer read as no answer. The extension's auth refresh after the PUT starts such a newer read, so a switch that succeeded returned false and the ClinePass switch control asked the user to retry it. Every read now returns the server's answer; only the newest read still writes context state. * fix(core): connect header-authenticated Hub sockets under Bun The desktop sidecar runs the cloud session controller under Bun. Since a2cefba05 the header-authenticated Hub client imported the npm `ws` package through a `node-ws` alias so a proxy agent could be attached. Under Bun 1.3.13, the toolchain this branch was pinned to, Bun's node:http client never emits `upgrade`, so the npm `ws` treats the 101 as an ordinary response and connect() fails with "Unexpected server response: 101". Cloud sessions in the desktop app could not connect. Import `ws` directly again. Bun substitutes its own client, which reads the proxy URL and Proxy-Authorization from the same `agent` option that Node's `ws` uses, so one socket shape tunnels on both runtimes and the `node-ws` dependency and its @ts-expect-error go away. The tunnel test now runs the fixture under Bun as well as Node. Bun's TLS client does not read NODE_EXTRA_CA_CERTS, so the Bun leg tunnels a plain ws:// destination; it still checks the CONNECT, the upgrade and where the credentials land. With the `node-ws` import the Bun leg fails on 1.3.13 and the Node leg passes, which is the gap that let this ship. * fix(vscode): retry the cloud model recommendation after a failed fetch The composer shows the model a new cloud task will run on. When the local provider is not Cline that is the top recommendation, warmed once by the coordinator. A fetch that failed returned the built-in fallback without caching it, but the coordinator kept its warm-up handle, so it never asked again and the fallback stayed in the composer and in new sandboxes until the extension restarted. Release the handle when a fetch settles without filling the cache, so the next state post retries. * fix(vscode): stop the recommendation warm-up from polling a failing endpoint The warm-up posted state after every fetch, including one that returned the built-in fallback. That post reads the model again, which starts the next fetch, so a recommendation endpoint that keeps failing was polled without bound while Cloud was selected with a non-Cline provider. Post state only when the fetch filled the cache. A failed fetch still releases the handle, so the next read the user causes retries. * fix(vscode): disable the composer while a cloud sandbox is provisioning The composer allows sending during the streaming phase so follow-ups can queue on a running task, and a cloud start sets that phase while the sandbox is still provisioning. There is no session to queue on yet, so askResponse hit the expired-session guard and answered "This cloud session is no longer running" while the sandbox kept starting, dropping the message. The displayed cloud task now reports status provisioning while its start is pending, and the composer keeps submit disabled on that status so the draft stays in place until the sandbox is running. * fix(vscode): re-enable the composer after a failed cloud start The failure path posts state while the start is still pending, so the composer kept seeing "provisioning" and stayed disabled. Post state once more after the pending start is cleared. The askResponse guard, still reachable through the extension API while the composer is disabled, now says the sandbox is starting instead of that the session is gone. * style(vscode): wrap two JSX lines the CI formatter rejects Biome 2.4.5 on main wraps these attributes; the branch's Quality Checks failed on them after the rebase onto that formatter version. * test(vscode): pin the composer's provisioning status through a failed start The displayed cloud task reports provisioning while its start is pending, and the last state post after a failed start no longer carries it, so the composer re-enables without waiting for an unrelated refresh. * fix(vscode): keep a draft typed while a cloud task is provisioning handleSendMessage cleared the composer a second time after its RPC resolved. Every send path already clears the draft before the RPC, so the second clear only ever removed text the user typed while the RPC was pending. A local newTask resolves too quickly to notice; a cloud newTask resolves only after the sandbox is provisioned, so the draft the disabled composer was holding for the user vanished when the sandbox came up. * fix(vscode): follow main's rename of the sign-in retry field #14628 replaced pendingClineAuthRetryPrompt with pendingClineAuthRetry. The cloud coordinator's clearTask callback and the cloud branch of initTask still cleared the old field, which no longer exists. * fix(vscode): tear down cloud sessions when ClinePass switches the account Selecting the ClinePass provider switches the active account to Personal by calling switchAccount directly. The Account view's organization switch runs the same call inside resetCloudSessions, which detaches the displayed cloud task and its authenticated hosts and drains pending cleanup before the account changes. Without that, an organization cloud task stayed on screen after the account became Personal, and a still-pending DELETE could use the new account's credentials. Route the ClinePass switch through the same reset, and only when an organization is active: every API configuration update passes through this path, and the reset would otherwise clear a displayed cloud task for a model change that switches nothing. * fix(vscode): page History's Cloud Only filter after filtering The Cloud Only filter ran on a page already cut from the merged local-and-cloud list, and hasMore was computed from that page. With more than a page of newer local tasks the first page came back empty while cloud tasks existed further down, and hasMore said there was nothing more. When Cloud Only is on, list the whole history, filter, then apply offset, limit and hasMore to the filtered records. * fix(vscode): stop reporting a model change the cloud sandbox never made CloudSessionHost.updateSessionModel called an optional method that RemoteRuntimeHost does not have, then recorded the new model anyway. Choosing a different local model while a cloud task was displayed made the composer name that model while the sandbox kept running on the one it was started with. The Hub protocol has no command to change a running session's model, so drop the method. The lifecycle already treats a host without it as unable to switch, and the composer keeps naming the model the sandbox was started on. * fix(vscode): hide a cloud task's cost until the sandbox reports usage The task header decided whether to show the cost badge from the local provider's cost display setting. For a cloud task with no usage yet that showed $0.0000, which reads as a confirmed zero for a charge that is not known. Cloud tasks now show the badge only when the sandbox has reported usage; local tasks keep the provider-based decision. * fix(vscode): do not offer to open a cloud task's files in the local editor Cloud edits render through DiffEditRow, whose file name and open icon call openFileRelativePath. The path is relative to the sandbox's /workspace, so clicking opened an unrelated local file or failed. The row now takes canOpenFile; ChatRow passes false for cloud tasks, which drops the click action and the open icon and leaves the path as plain text. * fix(vscode): keep the cloud repository and branch choice truthful Two ways the stored cloud target could name something the current account cannot start a sandbox on: - The repository selection persists across account changes. When the new account has no accessible repositories the panel showed onboarding, but the old URL stayed stored, so the composer still treated the target as ready to submit. Clear the stored repository once the account's list is known and does not contain it. - The workspace branch was persisted from the local remote-tracking ref without checking GitHub. A branch deleted on GitHub but not pruned locally was suggested and submitted, and provisioning failed. Start on the repository's default branch and ask GitHub for the workspace branch by name; the unfiltered branch list is paginated, so its first page cannot decide. Suggest the branch only if GitHub returns it and the default branch is still selected, so a branch the user has since chosen stays. * fix(vscode): reconcile retained cloud connections with the account's list Two ways a cloud session's record and its connection could disagree: - A list refresh kept any entry that still had a host, so a task deleted from the dashboard stayed in History with an open authenticated connection, and a 401 cleared the entries without closing their hosts. An entry whose record has left the list, or every entry on a 401, is now dropped and its host closed. The displayed task is the exception in both cases: its host stays so that opening it can explain a deletion, and so that signing in again after a 401 leaves a task that can continue. - When a sandbox retires after History was listed, its WebSocket rejects with 410 while /status may answer 200 with status "expired". The probe treated every successful /status as "not expired", so the task opened to a connection error instead of the retirement notice. A 200 that says expired now counts as retirement, like a 410. * fix(vscode): subscribe monitored cloud tasks to their Hub event stream The Hub streams a session's events only to clients subscribed to it, and the runtime host subscribes when it first sends a command for that session. A connection opened only to resolve a History row's status sent none: it listed sessions, read the status, and then waited on an event stream that was never opened. A turn finished by another client left the row on Running and the completion notification never fired. Listing the task's pending prompts after discovery sends that first command and opens the stream. * test(vscode): keep the local cloud fixture alive when a client drops its socket An extension host that reloads or exits closes its bridged WebSocket without a close frame. The bridge attached no "error" listener to either side, so ws raised an unhandled error and the fixture process exited, taking every sandbox with it. Terminate the failed socket instead. * Own the account boundary in switchAccount Four paths changed the active account (the Account view, ClinePass selection and two remote-config paths) and only one of them tore down the previous account's cloud task and connections first. Each caller had to remember to wrap the switch, and two did not. switchAccount now runs every change inside a boundary the controller installs once (the cloud coordinator's reset), and serialises switches: one requested while another is in flight waits for it and then decides against the account as it is then. A caller that read a stale account cannot skip a needed switch or repeat one that just happened, so the ClinePass gate and the Account view's pending-switch map are gone. * Resolve the cloud task target in the extension The task-target panel computed the whole stored target from five effects (account repositories, workspace remote, GitHub branch check, repository click, Local/Cloud click), each writing the result back. Any two could interleave and the later write won: a branch check that landed after the user clicked Local flipped the target back to Cloud. The extension now stores only what the user chose, one field per choice (Local/Cloud, a repository, a branch), and resolves the rest on every state post: the stored repository if this account can reach it, else the workspace's, else the first; the user's branch, else the workspace branch once GitHub confirms it exists, else the default. Nothing derived is written, so no lookup can override a click, and a repository chosen under another account is never submitted. Failed lookups retry after 30 seconds; the GitHub connection is cached per account and shared with the Account view. The webview panel renders the resolved view and sends each click as one choice. * test(vscode): keep the cloud fixture alive when the Hub socket fails early The fixture's session proxy attached its error handler to the upstream Hub socket only after "open". An error during the handshake was unhandled and exited the fixture process, which the extension then saw as "Timed out connecting to hub after 8000ms". Attach the handler at construction for both sides of the bridge. * Refresh aged cloud-target inputs and always restore the server account The task-target resolver cached repositories and the workspace checkout for as long as the account and directory stayed the same. Repository access changes in the browser and the checkout changes in the terminal, and neither notifies the extension, so the picker could keep offering a revoked repository or suggesting the previous branch. A loaded input now ages out (repositories after 60 s, the checkout after 10 s): a read past that returns the cached answer and reloads behind it. switchAccount skipped the request when the cached account already matched. The server's active account is shared by every client on the login, so another client may have moved it. The request is now always sent; only the cloud teardown is gated on the cached account changing. * Retry a failed cloud start instead of declaring the session gone A cloud task whose sandbox never came up shows "Failed to start the cloud session" with Retry / Start New Task, but Retry appended "This cloud session is no longer running" and the footer then stayed disabled: the webview holds its recovery claim until the turn phase advances, and the refusal never advanced it. The coordinator now hands the failed input to the controller, which keeps it as the same pending start retry a "Sign in to Cline" error uses. Retry runs the cloud task again on the same repository and branch; a prompt typed into the composer starts one with that prompt. Refusing a response to a session that is gone sets the turn phase, so the footer releases its claim either way. The task-header tooltip no longer doubles its full stop when the task has no repository. The local cloud fixture starts a sandbox's Hub when the session becomes ready rather than on the first socket upgrade, so a cold start cannot outlast the client's connect timeout. * test(vscode): let the cloud fixture refuse session sockets CLINE_LOCAL_CLOUD_REFUSE_SOCKETS=1 answers every session socket upgrade with 503, so a cloud start fails after its sandbox is ready and the footer's Retry path can be exercised by hand. * Replace the carried-forward transcript when the new epoch's snapshot lands Retrying a failed cloud start appended the new attempt below the old one instead of replacing it. The new task's first partials reach the webview before the debounced state snapshot of the new epoch; the reducer deliberately carries the old rows forward on a lone newer-epoch partial, but then treated the snapshot as same-epoch and merged, so the old rows were never removed. The replica now remembers that it carried rows forward, and the first snapshot at that epoch replaces them while keeping the newer-epoch partials already held. A prompt typed after a failed start also left its optimistic bubble below the new task row: the bubble is user_feedback, but a restart is confirmed by a task row. Any user-authored row with the same text and attachments now confirms the bubble. * test(vscode): keep the cloud scope fixture complete Supply the failed-start callback required by the cloud retry path and assert that the coordinator hands it the failed task and original input. Check the fixture keys against the options interface before casting its partial service doubles, so a new required option fails typechecking. * fix(vscode): send Cancel to the task on screen, not a cloud start left behind (#14794) A cloud start stays pending after the user opens another task from History. Cancel always cancelled that pending start first, so cancelling a running task (cloud or local) cleared its view instead, and a cloud turn kept running in its sandbox. Only cancel the pending start when its own view, or no task, is on screen. * fix(vscode): delete cloud sandboxes left provisioning by a reload or quit (#14791) * fix(vscode): delete cloud sandboxes left provisioning by a reload or quit A terminating extension host cannot reach the network (VS Code's fetch resolves proxies through the window it is detaching from), so the cleanup DELETE a reload or quit triggers during provisioning never leaves the process and the sandbox is orphaned. Record each provisioning sandbox in a per-extension-host file under the Cline data directory until its task starts or its cleanup is confirmed, and let the next extension host delete records whose owner has exited. * fix(vscode): recover abandoned cloud starts only when it is safe Address review of the abandoned-start journal: - Keep a record until the control plane confirms the sandbox is gone. A 401, 429 or 5xx no longer erases it; only a successful DELETE or a 404 under the account and endpoint that started it settles it. - Keep a record until the sandbox has started the first turn, not just until the send was queued. Recovery connects to a sandbox before deleting it and leaves one that already holds a conversation, in case the host exited after the turn was accepted but before recording that. - Name each journal by pid and extension-host lifetime and refresh it while it has records, so an earlier lifetime of this pid, or a pid reused by another process, reads as abandoned instead of being skipped or overwritten. - Run recovery as one scope operation of the account that started the sandboxes: an account change waits for a DELETE in flight and stops the rest, nothing runs after disposal, and reset and dispose cancel the recheck timer. * fix(vscode): never recover a cloud start that may still be live - A sandbox's saved transcript stays empty until the first turn's iteration ends, so recovery could delete a task whose first turn was running. Treat any Hub session status other than idle as a turn the sandbox has taken. - Drop the journal heartbeat. A missed refresh does not prove the owner exited (it may be paused in a debugger or asleep), so a journal whose pid is alive is never taken; a pid reused by another process only delays recovery until that process exits. - Bound the sandbox inspection with a timeout and stop awaiting its detach, so an unresponsive sandbox cannot hold the account scope. * refactor(vscode): simplify abandoned cloud start recovery Drop the record right before the first prompt is sent instead of waiting for the sandbox to report turn acceptance. A surviving record then means the prompt never left the extension host, so its sandbox holds no user work and recovery can just DELETE it. This removes the turn-acceptance tracking in CloudSessionHost and the sandbox inspection (connect, status check, transcript read, timeout) that recovery needed to tell an orphan from a live task. Also fail the start when the record cannot be written, so its normal cleanup DELETE runs while the host can still reach the network, and treat only ESRCH as proof that a journal's owner has exited. * fix(vscode): fail a cloud start whose pending record cannot be dropped Recovery deletes any recorded sandbox without inspecting it, so the record must be gone before the first prompt is sent. If dropping it fails, fail the start instead of sending; its normal cleanup then deletes the sandbox. After a confirmed deletion a leftover record is harmless, so that path only logs. * fix(vscode): preserve provisioning tasks opened from History (#14793) Keep a pending cloud start alive when its own History row is opened, reject older selections, and relist its sandbox when startup settles. Carry the task-view fence across clearTask instead of claiming again. Retain abandoned-start journaling from the target branch and verify its record survives own-row reopening until immediately before the first send. * fix(vscode): keep a failed cloud start's images when Retry is clicked The webview's Retry response omits images, which protobuf decodes as an empty list, so `images ?? retry.images` dropped the attachments and the retried sandbox ran on the text prompt alone. Fall back to the failed start's images unless the response actually carries some. * fix(vscode): stop sending the account token into cloud sandboxes (#14970) * fix(vscode): keep cloud sessions out of Delete All History (#14967) * fix(vscode): keep cloud sessions out of Delete All History * fix(vscode): report the actual Delete All History count * fix(vscode): cancel a provisioning cloud start when the account changes (#14968) * fix(vscode): forget a remembered cloud status once the agent runs again (#14969) * fix(vscode): forget a remembered cloud status once the agent runs again * test(vscode): cover forgetting a remembered status on connect * feat(vscode): resume suspended cloud sandboxes and use the SDK's cloud client (#14973) * test(vscode): let the local cloud fixture suspend and resume sandboxes * fix(vscode): resume suspended cloud sandboxes instead of treating them as unknown * fix(vscode): reopen cloud tasks whose last turn failed * refactor(vscode): talk to the cloud control plane through the SDK's CloudSessionApi * feat(vscode): show cloud provisioning progress and dashboard renames * refactor(core): export the cloud session system prompt * feat(vscode): give cloud sandboxes the SDK's shared prompt and work-branch rules * perf(vscode): keep the local model catalog out of cloud session.create * docs(vscode): update cloud session follow-ups for the SDK alignment * fix(vscode): reconnect from scratch after resuming a suspended sandbox * fix(vscode): link an organization to its own GitHub connect page * test(vscode): only auto-suspend resumable fixture sandboxes * fix(vscode): show the resume notice when a suspended cloud task is opened from History showTaskWithId only dismisses the History view after the open completes, which for a suspended sandbox is after the whole resume. The notice the coordinator posts stayed covered and History sat unchanged for the duration. Bring the chat view forward right after the notice is posted. * fix(vscode): keep the UI on the server's account after a slow switch (#14971) * fix(vscode): keep the UI on the server's account after a slow switch * fix(vscode): retract a switch error only from the newest account read * feat(vscode): opt-in Cloud toggle in Settings behind ext-cloud-sessions (#15018) * feat(vscode): add opt-in Cloud toggle in Settings behind the ext-cloud-sessions flag * fix(vscode): refresh History when the Cloud toggle changes * fix(vscode): close four cloud-session gaps found in review and QA - A cancelled cloud start left a ghost STARTING row in History. A list during provisioning adds an entry for the new record before the start holds one, and cleanupUnusedSession only dropped the caller's entry. It now drops the entry by session id and invalidates History after the DELETE settles. - A failed DELETE left entry.host pointing at a disposed host, so a reopened task stopped reporting status. The host is cleared before disposal. - Switching repositories left the previous repository's branches selectable while the new list loaded, so a stale branch could be saved against the new repository. The list is cleared and the picker disabled until it loads. - Attached files were silently dropped from a cloud start. The composer now refuses the send and says why. - compile-tests could not resolve @cline/core/cloud under classic node resolution; tsconfig.test.json maps the subpath to the built declarations. * docs(vscode): track cloud session follow-ups as GitHub issues instead of a checked-in file * merge: preserve latest VS Code cloud updates with reviewed fixes * Saoudrizwan/cloud greptile fixes 26ac (#15073) * test(vscode): stub @cline/core/cloud for the CommonJS integration host * fix(vscode): keep the open cloud task's model visible when Cloud is turned off * fix(vscode): restore a cloud runtime the Hub lost after a turn reports it missing --------- Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Cline Agent <cline-agent@users.noreply.github.com> Co-authored-by: Dominic Cooney <dominic.cooney@cline.bot> Co-authored-by: Dominic Cooney <dominiccooney@users.noreply.github.com> Co-authored-by: Dominic Cooney <55120+dominiccooney@users.noreply.github.com> Co-authored-by: Dominic Coon <dominic@cline.bot> Co-authored-by: John Choi <john.choi@cline.bot> |
||
|
|
8009be6e33 |
fix(desktop): ship the SDK packages plugins import in production builds (#15068)
* fix(desktop): ship the SDK packages plugins import in production builds Plugin installs strip @cline/* dependencies because the host provides them, and the plugin worker resolves those from node_modules beside its bootstrap. The packaged desktop app ships only the bootstrap, so a marketplace plugin like goal failed with "Cannot find module '@cline/sdk'" (dev builds worked because the repo's node_modules sit above src-tauri). Bundle self-contained @cline/sdk, core, agents, llms and shared next to the bootstrap (one shared copy via code splitting, ~17 MB), and widen the Tauri resource glob so the nested files are actually bundled. * fix(desktop): ship the SDK packages' subpath exports for plugins Plugins can import supported subpaths such as @cline/shared/storage or @cline/core/telemetry. Bundle every runtime export of each package and write its exports map, skipping type-only exports that have no JS. |
||
|
|
26cea2fa8b |
fix: stop undici's 5-minute idle timeout killing local model requests (#15024)
* fix(lmstudio): disable undici's idle-body timeout so slow local generations aren't killed mid-stream * fix(lmstudio): compose the bodyTimeout override onto the active dispatcher instead of replacing it * fix(vscode): disable undici idle timeouts for local model providers Node's fetch applies undici's default 300s headersTimeout/bodyTimeout, each measuring time since the last byte received. Local servers (LM Studio, Ollama) legitimately go silent for longer while processing a large prompt (headers arrive immediately, then no body bytes until the first token), so long requests died mid-task with 'terminated: BodyTimeoutError (UND_ERR_BODY_TIMEOUT)' even though the server was still generating. Route LM Studio and Ollama inference through a fetch bound to an EnvHttpProxyAgent with headersTimeout/bodyTimeout disabled. This calls undici's own fetch rather than global fetch because VS Code's http.fetchAdditionalSupport patch replaces caller-supplied dispatchers with its own default-timeout Agent. Cancellation stays with each request's AbortSignal. Fixes #13464 Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(vscode): disable undici idle timeouts for providers that may run a local model Combine the two earlier drafts: dispatch through undici's own fetch so the override survives VS Code's global fetch wrapper, and keep the env-var proxy agent so JetBrains proxy support is unchanged. Widen the provider set from LM Studio and Ollama to also cover OpenAI Compatible and LiteLLM, which telemetry shows carry most of the UND_ERR_BODY_TIMEOUT failures. The net test now exercises real undici fetch against a local server that flushes headers and then stays silent, with a short-timeout control to prove the silence is long enough to trip the default timer. * test(vscode): keep the idle-timeout net test off any machine-level proxy * chore: drop the changeset file, the repo no longer uses changesets * fix(vscode): only skip idle timeouts when the base URL is on the local network OpenAI Compatible and LiteLLM often point at remote corporate gateways. On VS Code, fetchWithoutIdleTimeouts bypasses the host's proxy handling (http.proxy, OS/PAC proxy, proxyStrictSSL), so routing those through it would break proxied setups. Gate on the base URL as well: loopback, private/link-local/CGNAT ranges, single-label hosts and .local/.internal names get the idle-timeout-free fetch; remote gateways keep the proxy-aware fetch and its dead-connection cap. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(vscode): keep loopback direct in fetchWithoutIdleTimeouts, cover 0.0.0.0 and mapped IPv4 EnvHttpProxyAgent sends loopback through http_proxy whenever no_proxy is unset, which VS Code's own resolver never does. Pick a plain Agent for loopback hosts and the env-var proxy agent for everything else, both with idle timeouts off. The local-network gate now also accepts 0.0.0.0 and IPv4-mapped IPv6 addresses, which Ollama and LM Studio print when bound to all interfaces. The net test now runs with HTTP_PROXY set and NO_PROXY unset against a recording CONNECT proxy: loopback never touches it, an unroutable host goes through it, and neither path has an idle timeout. * fix(vscode): match loopback by address so IPv4-mapped IPv6 stays direct The URL parser rewrites [::ffff:127.0.0.1] to [::ffff:7f00:1], which a string match on "127." misses. Use a BlockList, which checks mapped addresses against the IPv4 rules, for the loopback bypass and drop the now-redundant unwrapping in the local-network gate. --------- Co-authored-by: lizhe <marshal_li_b@163.com> Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> |
||
|
|
ed469c753a | chore(vscode): release v4.1.24 | ||
|
|
1a25410ccd | chore(desktop): release v0.0.46 | ||
|
|
c606894cb1 |
Revert "fix(vscode): preserve attachments in pending question responses (#14986)" (#15058)
This reverts commit
|
||
|
|
f8997dac23 |
fix(vscode): preserve attachments in pending question responses (#14986)
* fix: preserve attachments in VS Code question responses * fix(vscode): preserve pending question response ordering * fix(core): preserve display text in Hub submitted prompt events |
||
|
|
c96fb0992a | chore(cli): release v3.0.71 | ||
|
|
df56169ed5 |
fix(cli): let the compiled binary resolve plugin SDK imports natively (#15048)
* fix(cli): let the compiled binary resolve plugin SDK imports natively
Plugins import @cline/core from the wrapper's node_modules. Bun standalone
executables skip package.json loading at runtime by default, so every bare
import from those files failed to resolve natively and jiti fell back to
babel-transpiling the whole SDK graph (~440 files, ~8s cold). That blew the
8s plugin load timeout after an upgrade or reboot and left the plugin
failed for the life of the hub. With autoloadPackageJson the cold load
takes ~1.4s, matching the 3.0.70 subprocess sandbox.
* fix(cli): show the resumed transcript when startup posts a notice
Resuming a session hydrates the transcript after the session starts. A
plugin load failure posts a status notice during that start, and the
hydration guard treated any existing entry as user activity and skipped
the transcript, so the resumed session looked empty. Skip only once the
user has submitted, and keep startup notices after the transcript.
* Revert "fix(cli): show the resumed transcript when startup posts a notice"
This reverts commit
|
||
|
|
12a4c6bfe2 |
feat(core): load plugins in the hub process and surface plugin errors (#14957)
* feat(core): load plugins in the hub process and surface plugin errors
Plugins now load in-process through one registry per process instead of a
node/bun subprocess. The compiled CLI and the hub it starts no longer need a
runtime on PATH, and plugins can use the Bun global under the Bun-built hub.
The subprocess sandbox stays available with CLINE_PLUGIN_MODE=sandbox.
The registry wraps import, setup, every hook, tool, and command call with
timeouts and error capture, and tracks loading/ready/degraded/failed/disabled
per plugin with the last error's phase, message, stack, and counts. A failing
plugin no longer silently drops its tools:
- session.create takes a `plugins` policy shaped like toolPolicies, and its
reply and session.created event carry `pluginIssues`
- failures after start (setup and hooks run on the first turn) reach each
affected session as a status notice
- the hub answers plugins.list/status/reload and broadcasts
plugin.status_changed; `cline hub plugins [--reload]` wraps them
- the daemon marks a plugin failed instead of shutting down when an uncaught
error's stack points into it
- the CLI prints a warning naming the plugin and error, and
`cline config tools --json` lists failed plugins as plugin_failure entries
Setup and tool contexts gain cwd and emitEvent; __clinePluginHost keeps
working as a shim. Compiled binaries fall back to jiti/static when babel is
not on disk next to them.
* fix(core): give each session its own copy of every plugin module
Plugins written for the per-session sandbox keep state at module level. The
cline-monitor plugin, for example, builds one plugin object per import and
throws "Create a separate monitor plugin handle for each session" on a second
setup(). Sharing one imported copy across hub sessions broke it on the
second session.
The registry now hands each session its own copy: the first session claims
the copy imported at startup, and later ones re-evaluate the module while
reusing jiti's transform cache (about 180ms for cline-monitor instead of
2.8s with no cache).
A setup() failure now costs only the session it happened in: other sessions
keep their copies, the next session tries again, and a successful setup
returns the status to ready. Import failures, attributed uncaught errors, and
repeated hook/tool failures still turn the plugin off for every session.
* docs(sdk): document the plugin hooks that exist and how hook failures behave
The Hook Stages list (snake_case stages such as tool_call_before) and the
Hook Policies table (mode, retries, queueLimit, maxConcurrency) described no
code: plugin hooks are the seven runtime hooks, and there is no per-hook
policy object. Replace both with the real hooks, what each can return, and
how hookErrorMode and the 3-second hook timeout apply.
* fix(core): report failed plugins as failed in settings
Settings marked a plugin "failed" only when the plugin tool report had no
entry for it. The report now lists failed plugins with their state, so they
showed as "available" (desktop Extensions page and other core settings
hosts). Use the reported state, and fill loadError with the failing phase
and message so the reason is visible.
Also tell only the calling session about a per-session setup failure;
other sessions' copies still work. Keep the hub log line's own message
instead of letting the plugin error text overwrite it.
* fix(core): address plugin registry review findings
Reload and generations: each session copy records the generation (import)
it came from. A reload starts a new generation without invalidating older
copies, so running sessions keep working. Failures and blocking are counted
per generation, so a broken reload cannot turn off copies that still work,
and an old copy's failures cannot change the current status. A stray error
attributed by stack turns off every live generation, since a stack cannot
tell copies of one file apart.
Sandbox mode: the hub daemon no longer preloads plugins in sandbox mode,
and tool listing and MCP settings sync inspect plugins through the sandbox.
The session plugin policy now applies in sandbox mode: paths whose file
name the policy turns off never reach the sandbox, and plugins matched only
by their exported name are dropped after import.
Calls: commands, rule content, and message builders go through the same
guarded path as hooks and tools (timeout, error capture, failure count), and
calls into a copy that is turned off, failed setup, or whose session ended
are refused. A failing rule contributes no text and a failing message
builder leaves messages unchanged.
Cleanup: ctx.onDispose registers per-session cleanup. Timers a copy creates
while its own code runs, including at import, are tracked and cleared when
the session releases the copy; host callbacks given to plugins run outside
that scope so host timers are never cleared with them. Release runs on
session stop and dispose, and now also when building the session runtime
fails. The automation-events example uses ctx.onDispose.
Registrations: automation event types are validated while setup runs. If
the host still rejects a registration on commit, the copy's setup is
recorded as failed and the error is rethrown so the partial registrations
are discarded.
Also: forward importTimeoutMs, hookTimeoutMs, and contributionTimeoutMs to
the in-process registry per session; key the plugin tool inspection cache on
registry status; keep the module copy imported by preload for the first
session; report settings-disabled plugins a session would use as issues
with reason "settings".
* fix(core): keep this bindings and route import-time plugin events
- Timer tracking forwards the runtime's this (the timer handle in Node and
Bun) to plugin callbacks.
- Plugin methods keep their receiver: rule content, message builders,
command handlers, and setup() are called on their own objects, including
setup() in the existing in-process loader.
- Each plugin copy owns one async scope from import onward. Claiming the
copy for a session fills in that scope's session id and event callback,
so events emitted by work the module started at import reach the session.
- Each generation tracks its own health, so an older copy's first failure
after a reload is reported to its sessions even though the status shows
the reloaded generation.
* fix(core): bind plugin changes to sessions started afterwards
Plugins are bound to a session when it starts; added, edited, or reloaded
plugins reach only sessions started afterwards. Change detection used the
entry file's mtime and size, which missed edits to files the entry imports
(common for package plugins) and same-size edits within one clock tick, so
the next new session could claim a stale preloaded copy.
Detect changes with a content fingerprint of the entry file and every file
it reaches through relative static imports, for the registry, the plugin
tool inspection cache, and the plugin command service. Add a bootstrap test
that a session started before a plugin is added or changed keeps its
original tools even when its setup runs afterwards, and a registry test for
a change outside the entry file.
* fix(core): include side-effect imports in plugin change fingerprints
The fingerprint only followed `from`, `import()`, and `require()`
specifiers, so a fix to a file the entry imports only for side effects
(`import "./setup.js"`) left the fingerprint unchanged and new sessions kept
getting the failed entry.
Scan statement-level side-effect imports for the fingerprint only. They are
kept out of the dependency preflight, where a loose match on text inside a
string (`'run import "x" first'`) would reject a valid plugin.
* fix(core): retry failed plugin imports on a backoff
Change detection follows static and side-effect relative imports, but a
broken import can also be fixed where no fingerprint sees it: a dynamically
imported file, a file behind a block comment, or a dependency installed in
node_modules. Such plugins stayed failed until an explicit reload.
Retry a plugin whose import failed when a session starts, at most every 30
seconds, even if no change was detected. A broken plugin costs at most one
extra import attempt per 30 seconds, bounded by the import timeout.
Replace the SHA-1 fingerprint with a non-cryptographic checksum; it only has
to notice edits to plugin source.
* feat(desktop): show plugin failures in the chat
Plugin failures reached the desktop webview only as core logs written to the
devtools console. Show them as status lines in the chat:
- session start returns `pluginWarnings` for plugins the session asked for
but could not load, and the webview adds one status line per warning
- plugin notices that arrive later on the session stream (setup and hooks
run on the first turn) carry `metadata.pluginIssue`; the webview adds
those as status lines too, while other core logs stay out of the
transcript
* fix(desktop): keep plugin warnings when saved history reloads
Finishing a turn replaces the live transcript with saved history, which
never contains plugin warnings (they come from the start reply and stream
notices), so the explanation of a missing plugin disappeared after the first
turn. Carry the session's live plugin-warning lines into canonical history
at their original position by time.
* refactor(core): simplify the in-process plugin registry (#14999)
* refactor(core): simplify the plugin registry
Drop the pieces added in review rounds that cost more than they buy:
- Global timer tracking. It monkeypatched setTimeout/setInterval/
setImmediate and their clear* counterparts on globalThis for the whole
host process (the hub, the CLI, and the shared VS Code extension host),
and attributed timers by async scope, so a host callback invoked from
inside a plugin call had its timers cancelled when the session released
its plugin copy. Plugins stop what they start in ctx.onDispose, which
stays.
- Plugin generations and per-generation health. Blocking and consecutive
failures are counted per plugin again; a re-import (reload or source
change) resets them. Running sessions keep their copies callable unless
the plugin is turned off, so a broken reload fails closed for them.
- Automatic retry of failed imports on a 30 s backoff, and the side-effect
import scan in the change fingerprint. plugins.reload covers changes the
fingerprint cannot see.
- The duplicated registerAutomationEventType validation; the commit
try/catch already records a host-rejected registration as a setup
failure.
* refactor(core): do not apply the session plugin policy in sandbox mode
The sandbox is an opt-in escape hatch and the per-session policy is new;
filtering sandbox results by file-derived and exported names added two
passes nobody needs yet. The policy is documented as in-process only.
* revert(desktop): drop the live plugin-warning merge into saved history
Reverts
|
||
|
|
79341eb295 | fix(desktop): retain catalog counts on installed connectors (#15042) | ||
|
|
d2cbeea6ff | fix(composio): discover connector tools through meta search (#15041) | ||
|
|
cbe3a4d4f0 | fix(desktop): drain copy feedback timer in chat test (#15040) | ||
|
|
55d32c22ab |
fix(desktop): allow cancelling cloud account sign-in (#14943)
* fix(desktop): allow cancelling cloud account sign-in * fix(desktop): keep cancel label stable during sign-in cancellation * fix(desktop): swap account creation for cancel during sign-in * fix(desktop): keep sign-in controls visible during account refresh * fix(desktop): keep sign-in retry responsive during account refresh * fix(desktop): ignore stale account reloads after sign-in retry * fix(desktop): limit sign-in changes to cancellation and stop polling * fix(desktop): keep sign-in cancellation in existing screen handlers * refactor(desktop): share sign-in cancellation mechanics * refactor(desktop): remove redundant sign-in error callback * fix(desktop): preserve sign-in cancellation across screens * test(desktop): simplify sign-in cancellation coverage |
||
|
|
ff255c08a9 |
feat(vscode): show dedicated ai& provider settings (#14611)
* feat(vscode): show dedicated ai& provider settings Selecting ai& in the extension showed the generic OpenAI-compatible form (base URL, model ID, custom headers, Azure options). Register aiand as a known provider so it gets the standard API key + model picker form, backed by the SDK builtin (fixed base URL https://api.aiand.com/v1, catalog models, default zai-org/glm-5.3). * chore: drop unused changeset file |
||
|
|
a48408909b |
fix(desktop): keep Cloud setup cards visible (#14954)
* fix(desktop): compact signed-out cloud welcome spacing * fix(desktop): keep cloud sign-in card near window bottom * fix(desktop): tighten signed-out cloud onboarding spacing * fix(desktop): use existing setup card for welcome spacing |
||
|
|
62f690d6ca |
fix: load and watch symlinked rule files (#14912)
* fix: load symlinked rule files from config directories
* fix(core): automatically reload symlinked instruction targets
* fix(core): drop symlink target watching, keep link-path loading
Review feedback on #14912: reading rules through the link path already
fixes the reported bug, and each new session re-reads the rules. Watching
wherever links point is a larger change than the bug needs and carried
loose ends (directory links in the target path, a readlink per file on
every refresh).
- revert the target-directory watching, chain walk and broken-link
retention from
|
||
|
|
8eba11b270 |
fix(schedules): stuck pending runs, silent model failures, stale editor models (#14998)
* fix(schedules): claim queued runs under bun:sqlite claimDueRuns bound unprefixed named parameters, which bun:sqlite binds as NULL, so the desktop hub never claimed a queued run and every scheduled run stayed pending with no error. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(schedules): fail runs whose agent turn ends with an error Provider failures such as a retired model id resolve the turn with finishReason 'error' instead of throwing, so these runs were recorded as successful with no error message. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(desktop): load live models in the schedule editor The editor only used the bundled provider catalog, so it kept offering retired models (e.g. space-bunny) that the live list no longer has. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(schedules): skip superseded queued cron occurrences Once queued runs are claimable again, the backlog that piled up while claiming was broken would replay every missed slot back to back. Cancel queued cron occurrences that a newer queued occurrence of the same schedule supersedes so only the latest runs. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * fix(schedules): keep usage and tool calls in error-finish run reports Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * test(schedules): cover claimDueRuns under bun:sqlite Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> |
||
|
|
bf71bf7cd9 |
Default to the first Cline recommended model (Sonnet 5.5 fallback) across CLI, extension, and desktop (#14959)
* Default to the first Cline recommended model (Sonnet 5.5 fallback) across CLI, extension, and desktop - @cline/shared: CLINE_DEFAULT_MODEL_ID is now the anthropic/claude-sonnet-5.5 fallback - @cline/llms: the cline provider's defaultModelId prefers GENERATED_CLINE_RECOMMENDED_MODELS.recommended[0] - CLI: resolve the provider's SDK default before falling back to the first catalog entry; drop the hardcoded sonnet-4.6 fallback - VS Code: openRouterDefaultModelId -> anthropic/claude-sonnet-5.5; cline provider falls through to the SDK default Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Default the SDK openrouter provider to anthropic/claude-sonnet-5.5 The VS Code extension's OpenRouter model field is populated from this SDK default via resolveModelInfo, so the extension-side openRouterDefaultModelId constant alone did not change the fresh-install selection. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Desktop: adopt the provider catalog default model once the catalog loads A fresh install booted on CLINE_DEFAULT_MODEL_ID and kept it when the user skipped onboarding, so the chat bar never picked up the Cline provider's recommended-list default. Swap the bootstrap fallback for the catalog default unless a model was already remembered for that provider. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Scope the recommended-model default to the Cline providers Only cline/cline-pass declare a curated default; other manifests may expose a placeholder like "default" (ollama, lmstudio), so the CLI keeps falling back to the first catalog entry for them. The desktop bootstrap swap now also applies only to new Cline chats, never to hydrated sessions. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Test both branches of the cline default model selection Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Simplify: drop the desktop bootstrap swap and connector catalog lookup The desktop app keeps CLINE_DEFAULT_MODEL_ID as its pre-onboarding default (onboarding already stores the provider's recommended default), and the connector only swaps its hardcoded literal for the shared constant. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * CLI: only the cline provider uses the SDK default before the catalog cline-pass's manifest default is just the first bundled model, not a curated pick, so it keeps the live catalog's own ordering. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Connectors: prefer the provider's declared default over the Cline fallback Non-Cline connector sessions with no saved model were handed a Claude id. Use the provider manifest default when it is a real model, skipping the "default" placeholder that catalog-less local providers expose. Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> |