mirror of
https://github.com/cline/cline.git
synced 2026-09-19 10:13:34 +08:00
cli-v3.0.12
359
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
418a8a6325 |
perf(file-search): route @-mention picker through host index when available (#10592)
* perf(file-search): route @-mention picker through host index when available Adds a new SearchWorkspaceItems RPC on WorkspaceService that lets hosts serve the @-mention file search from their own native index (JetBrains FilenameIndex, eventually anything similar). When the host returns results, core skips ripgrep entirely; when the host throws, core falls back to ripgrep as today. Why: on slow filesystems (the CLINE-2092 reporter is on a 2000-mile SSHFS mount) ripgrep's stat fan-out blows up to 15s+ per keystroke as it walks the workspace. JetBrains already has the answer in memory. Contract: - searchWorkspaceItems thrown error -> host can't answer, use ripgrep. - searchWorkspaceItems returns items -> authoritative, including []. This split lets a host that says "zero matches" short-circuit the ripgrep fallback, which is the entire point of the change for slow filesystems. Implementation notes: - VS Code / CLI / ACP host adapters throw "not implemented". Core swallows the throw silently in the @-mention path because on these hosts the throw is steady state, not an error worth logging on every keystroke. - Telemetry: captureMentionSearchResults now records a search_source property (host_index | ripgrep) so we can see how often the host index actually picks up the load per fs_class. - Multiroot aggregation reports source=host_index only when *every* contributing root used the host index; any root falling back to ripgrep marks the aggregate as ripgrep so the metric isn't misleading. - Telemetry calls in searchFiles.ts are now fire-and-forget; the webview shouldn't block on a metrics flush. CLINE-2092 * fix(file-search): scope host-index per workspace root in multiroot In multi-root projects searchWorkspaceFilesMultiroot calls searchWorkspaceFiles once per root. Each call hit the host index without telling it which root, so a JetBrains host returned project-wide results; the caller then path.join'd those against the wrong base, lstat silently swallowed the ENOENT, and the user saw fabricated paths. Add an optional workspace_path field to SearchWorkspaceItemsRequest and forward the workspacePath argument into executeHostIndexForFiles. Hosts that can't honor the field ignore it; this preserves project-wide behavior for older plugins paired with newer core. Surfaced in code review on CLINE-2092. * file-search: distinguish unimplemented host index from real failures Previously the catch in executeHostIndexForFiles returned null on every exception with no client-side trace. That's the right behavior on VS Code/CLI/ACP where the RPC stub throws every keystroke, but it also hides real degradation on JetBrains (UNAVAILABLE during indexing, INTERNAL, transport errors) — operators have no way to tell whether a ripgrep fallback was expected or a slow-path regression. Split: gRPC code 12 / messages matching /not implemented/i log at debug (steady state, stays quiet); everything else logs at warn with the code and message so degraded sessions are visible. Fallback policy unchanged — still returns null and lets the caller use ripgrep — and core has no useful action on the error type, so we don't propagate further. Surfaced in code review on CLINE-2092. * fix(file-search): dedup host folders against parent-walk inferred dirs When the host index returns a folder explicitly (e.g. 'src') *and* a file underneath it (e.g. 'src/main.ts') for the same query, the parent-walk that seeds the inferred directory set was re-adding 'src' as an inferred parent, producing two identical entries in the picker. Pre-pass the host items to record which directory paths were returned as explicit folders, then skip those during the parent-walk so we don't double list them. Transitive ancestors above an explicit folder are still added because the loop keeps walking up. Adds a regression test that reproduces the duplicate and fails without the fix. |
||
|
|
beb3ad78dc |
Revert "Remove foreground terminal from Cline VSCode extension (#10196)" (#10477)
This reverts commit
|
||
|
|
ee1d4b4dcf |
CLINE-1814 typed RipgrepSpawnError + error_reason proto (#10443)
* CLINE-1814 typed RipgrepSpawnError + error_reason proto
* file-search.ts: define RipgrepSpawnError carrying stderr+exitCode; reject
on non-zero ripgrep exit (with empty results) instead of resolving to []
* file-search.ts: re-throw from searchWorkspaceFiles and
searchWorkspaceFilesMultiroot so the controller sees the error and can
attach a structured error_reason to the proto response
* file-search.test.ts: assert spawn-time and exit-time errors both surface
as RipgrepSpawnError
* file.proto/FileSearchResults: add optional error_reason and error_message
fields with the closed enumeration of values documented inline
Phase 1 of the visibility patch. No behaviour change for healthy installs;
broken installs now surface a real error instead of an empty list.
Refs: CLINE-1814
* CLINE-1814 surface error_reason in picker UI
Controller (searchFiles.ts):
* classify thrown errors into a closed enumeration of error_reason values
(workspace_unavailable, ripgrep_spawn_failed, unknown). RipgrepSpawnError
unwraps the first line of stderr into error_message so the picker can
surface ENOENT / EACCES / 'Operation not permitted' verbatim.
* the no-workspace-path branch now returns workspace_unavailable instead
of an empty result list.
* keep using telemetry.captureMentionFailed for aggregate signal but map
ripgrep_spawn_failed -> 'unknown' to stay within the existing closed enum.
Webview (ChatTextArea + ContextMenu):
* ChatTextArea threads errorReason / errorMessage from each searchFiles
RPC response (and from RPC-level rejections) into ContextMenu.
* ContextMenu renders a grey, italic, smaller subtitle beneath the
'No results found' row when an error_reason is present.
* renderErrorSubtitle() carries a short doc-comment for each value so
reviewers can see at a glance how each error_reason maps to UI copy.
Refs: CLINE-1814
* CLINE-1814 trim verbose CLINE-1814 ticket-reference comments
Pure code-quality pass over the Phase 1 changes: condense the long
narrative comments that referenced the ticket into terser explanatory
comments where they still add value, and remove ones that just
repeated what the (now-stable) code already says. No behaviour change.
* CLINE-1814 fix RipgrepSpawnError override of Error.cause
TS error 'This member must have an override modifier because it
overrides a member in the base class Error' - Error gained an optional
'cause' field in ES2022. Drop the explicit field declaration and pass
the cause via the standard ES2022 ErrorOptions in super(). Behaviour
unchanged: instances still expose .cause via the base-class field.
* CLINE-1814 fix Windows race in executeRipgrepForFiles finalisation
CI hit this on Windows:
AssertionError: expected [Promise] to be rejected with a message
matching /ripgrep exited with code 2/, but got 'ripgrep exited with
code null: rg: /bogus: No such file or directory (os error 2)'
The readline 'close' event and the child-process 'exit' event fire in
non-deterministic order on Windows. The previous code keyed off 'close'
alone, which meant the rejection branch could run with exitCode still
null even when the process eventually exited with a real code.
Fix: gate finalisation on both events with a small barrier (rlClosed +
processExited + finalised flags). Idempotent and safe under any
ordering. Test passes on darwin (where the ordering used to be benign)
and the same path now produces the expected exitCode=2 message on
Windows.
No production-behaviour change on the happy path: results still resolve
exactly when the readline finishes parsing stdout.
* CLINE-1814 address Phase 1 code-review feedback
Three small follow-ups from review on the Phase 1 PR:
1) ContextMenu.tsx: drop a stray trailing semicolon on the
selectedType prop declaration so the interface style stays
consistent with the rest of the file (no semicolons on field
declarations). Cosmetic only, no behaviour change.
2) file-search.ts: in executeRipgrepForFiles' rgProcess.on('error')
handler, set finalised = true before reject() so that a subsequent
('close', 'exit') pair can't pass the finalise() guards. The
double-reject was already a no-op (Promises swallow further
reject() calls once settled), but unconditionally maintaining the
barrier invariant makes the lifecycle of this Promise much easier
to reason about and matches the symmetry of the other two
finalise() callers.
3) file-search.test.ts: collapse the awaited-twice rejected-promise
pattern in 'should reject with RipgrepSpawnError when ripgrep
exits non-zero with no results'. The previous form
(await should(p).be.rejectedWith(...); await p.catch(...)) worked
because settled promises replay their value, but it's subtly
misleading. The new form awaits once via .catch() and asserts on
the resulting error directly.
All six File Search unit tests continue to pass.
* CLINE-1814 revert picker error subtitle (UI for impl-detail leak)
Per code-review feedback: surfacing structured error_reason / error_message
from FileSearchResults as a grey-italic subtitle on the 'No results found'
row exposes implementation detail to end-users. The user can't act on
'(ripgrep failed: rg: ENOENT)' or '(internal error: spawn EACCES)' — those
are diagnostic data that belong in logs and aggregate telemetry.
Reverted in this commit:
- ContextMenu.tsx: errorReason / errorMessage props removed,
renderErrorSubtitle helper deleted, NoResults row reverts to a plain
<span>No results found</span>.
- ChatTextArea.tsx: searchErrorReason / searchErrorMessage state and
all setSearchErrorReason / setSearchErrorMessage call-sites removed;
ContextMenu invocation no longer passes the two props.
Kept on purpose:
- The proto field FileSearchResults.error_reason — it's harmless on
the wire and the next commit wires it up to telemetry + structured
logging, which is where this signal actually belongs.
- The classifyError helper and ERROR_REASON_* constants in the
searchFiles controller — same reason, they feed telemetry next.
Six file-search unit tests still pass.
* CLINE-1814 telemetry: surface ripgrep_spawn_failed / workspace_unavailable
Until now the searchFiles controller's catch block collapsed every classified
error_reason — workspace_unavailable, ripgrep_spawn_failed, unknown — onto a
two-value telemetry enum (permission_denied | unknown), throwing away the
diagnostic signal we'd worked hard to extract. The Linear ticket explicitly
asks for the structured signal to feed telemetry; this commit delivers on that.
Changes:
- TelemetryService.captureMentionFailed: extend the errorType enum with
two new categorical values, ripgrep_spawn_failed and workspace_unavailable.
Doc-comment updated to call out that those two are picker-search failures
(vs the existing values which are mention-content retrieval failures).
- searchFiles.ts:
* empty-workspace branch now emits errorType=workspace_unavailable
(previously: not_found).
* catch-block computes errorType from the classified errorReason —
RipgrepSpawnError -> ripgrep_spawn_failed, EACCES -> permission_denied,
otherwise unknown — instead of always permission_denied | unknown.
Net result: ops can now distinguish 'ripgrep is broken on this user's
machine' from 'user is in a one-window-no-folder IntelliJ session' from
genuine code bugs in the search pipeline.
* CLINE-1814 log: include classified errorReason on searchFiles error line
Trivial follow-up to the previous commit. Triagers grepping
~/.cline/cline-core-service.log for searchFiles failures got the raw error
object dumped, but no hint as to which of the structured error_reason
buckets the failure falls into. Now the log line is
[ERROR] Error in searchFiles (errorReason=ripgrep_spawn_failed): <Error...>
so a single grep for 'errorReason=ripgrep_spawn_failed' surfaces every
ripgrep-side failure across the user's session without having to read the
stack trace. Same field value as the gRPC response and the telemetry event,
so the three sources can be cross-referenced in incident triage.
Also moved the classifyError() call above the Logger.error() call (was
below) so the reason is computed once, used twice.
* CLINE-1814 address Phase 1 review feedback (rename, simplify, trim comments)
Five review comments rolled into one commit:
file-search.ts
* Rename RipgrepSpawnError -> RipgrepError. The class covers spawn failures
AND non-zero-exit / stderr-on-empty-stdout paths; the old name only
described half its job.
* Drop the unread 'cause' constructor option. We were never reading
err.cause anywhere downstream, and the only producer was the
spawn-error path which already encodes the underlying message in the
string.
* Replace the rlClosed/processExited/finalised state machine with two
Promise resolvers awaited via Promise.all. Same ordering guarantees on
Windows (both 'close' and 'exit' must fire before we settle), zero
mutable bookkeeping, and the spawn-error path no longer needs to
pre-flip a 'finalised' flag to be safe against a late close+exit pair.
Used new Promise() rather than Promise.withResolvers() because TS lib
is es2022 and withResolvers is es2024; behavior is identical.
searchFiles.ts
* .trim() the stderr before split() so a leading newline doesn't yield
an empty first line on the telemetry / log path.
* Drop the 'this commit' comment (ephemera once 'this commit' is no
longer the most recent one) and the 'Determine mention type based on
the search request' comment, both of which restated the obvious code.
file-search.test.ts
* Update test name and assertion to match the renamed class.
All 6 file-search unit tests pass.
* CLINE-1814 drop unread RipgrepError.exitCode field
Follow-up to the previous review-feedback commit. The 'we're not reading
this anywhere' note was about exitCode, not cause - my mistake. The exit
code is already encoded into the error message string ('ripgrep exited
with code N: <stderr>'), so the dedicated field was carrying no
additional information for any consumer.
Dropped:
* RipgrepError.exitCode field and constructor option
* 'exitCode' from the two new RipgrepError(...) call sites
* 'should(err).have.property(exitCode, 2)' from the unit test
The internal exitCode local in executeRipgrepForFiles stays - it gates
the reject vs resolve decision after both 'close' and 'exit' have fired.
It's just no longer plumbed onto the error.
All 6 file-search unit tests still pass.
|
||
|
|
1862f15955 |
Remove foreground terminal from Cline VSCode extension (#10196)
* Create implementation plan doc * Remove foreground terminal UI and default task execution to background mode * Remove terminal mode UI service endpoint * Remove foreground terminal mode state and RPC surface * Add terminal settings UI regression test * Guard removed foreground terminal state keys * Test simplified terminal command routing * Remove dead terminal profile plumbing * Remove stale terminal mode references * Add terminal settings verification story * Remove implementation plan doc once implemented * fix e2e launch under electron-run-as-node * address greptile terminal follow-ups * address greptile proto and vscode terminal notes * address greptile test follow-ups * remove dead acp terminal stubs * Remove VS Code integrated terminal dependencies * docs: sync integrated terminal removal plan status * Remove terminal settings UI * Remove terminal settings plumbing * Mark terminal settings removal validated * Remove implementation plan docs once implemented * Polish shell integration warning UI * Remove orphaned ACP terminal setters * Add kanban install flow implementation plan Start kanban install task from modal Clarify kanban install task architecture Verify kanban install task flow Remove implementation plan doc once implemented Restore direct terminal install launcher Make the kanban installer change minimal and squashable * Changes as per PR feedback * Further deletions as per PR feedback * Restore standalone kanban modal copy fallback --------- Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com> |
||
|
|
955ae8df7a |
feat: wire up remote globalSkills with enterprise UI and architectural fixes [ENG-1774] (#10283)
* feat: wire up globalSkills consumption from remote config The remote config schema already includes globalSkills (merged in #10236). The dashboard can save skills to remote config. This PR wires up the extension to read and use them. ## Changes ### State storage (Layer 1) - Add remoteGlobalSkills to REMOTE_CONFIG_EXTRA_FIELDS - Add remoteSkillsToggles to GLOBAL_STATE_FIELDS ### Remote config transform/apply/clear (Layer 2) - Map globalSkills → remoteGlobalSkills in transformRemoteConfigToStateShape - Sync remoteSkillsToggles in applyRemoteConfig using frontmatter.name as the identity key (not entry.name) - Clear remoteSkillsToggles in clearRemoteConfig ### Skill discovery (Layer 3) - discoverSkills accepts optional remoteSkillEntries parameter (pure utility, no StateManager coupling) - getSkillContent accepts optional remoteSkillEntries parameter for remote content loading without disk I/O - Precedence: remote (enterprise) > disk-global (user) > project ### refreshSkills (Layer 3b) - Reads remote entries from controller.stateManager, parses frontmatter, builds SkillInfo entries with alwaysEnabled field ### UseSkillToolHandler (Layer 4) - Toggle filter checks remoteSkillsToggles for remote: prefixed skills - Directory note omitted for remote skills - Passes remoteSkillEntries to both discoverSkills and getSkillContent ### toggleSkill - Routes remote: prefixed paths to remoteSkillsToggles keyed by name ### Proto + webview - Added always_enabled field to SkillInfo proto message - Modal passes isRemote + alwaysEnabled to RuleRow for remote skills - Uses skill.name as display label for remote skills ## Design decisions - frontmatter.name is the sole identity for remote skills (entry.name is ignored). This matches how local skills work. - remote: path prefix distinguishes remote from disk skills in toggle stores and content loading. - skills.ts remains a pure utility module with zero StateManager coupling. Callers inject remote entries as parameters. - 42 unit tests covering discovery, precedence, content loading, toggle sync, and frontmatter parsing. * fix: enforce alwaysEnabled in toggle sync to prevent stale false overrides When applyRemoteConfig syncs skill toggles, synchronizeRemoteRuleToggles preserves existing toggle values — including false. If an admin later sets alwaysEnabled: true on a skill that a user had previously disabled, the stale false toggle would survive the sync. The UI would show the skill as locked-on (via the alwaysEnabled check in refreshSkills), but UseSkillToolHandler's filter would see false in the toggle store and exclude it, causing a 'Skill not found' error for a skill the user can see is active. Fix: after synchronizeRemoteRuleToggles, force any alwaysEnabled entry with a false toggle back to true. This makes the toggle store the single source of truth — both UI and handler now agree. Adds 4 tests covering the alwaysEnabled enforcement edge cases. * fix: deduplicate remote skill parsing, add drift validation, and fix architectural gaps 1. Extract shared parseRemoteSkillEntries utility (skills.ts) - Single validation point for remote skill entries, replacing duplicated frontmatter parsing in skills.ts, refreshSkills.ts, and remote-config/utils.ts - Enforces entry.name === frontmatter.name to catch drift between the dashboard and SKILL.md content (rejects with warning on mismatch) 2. Eliminate redundant frontmatter re-parsing in getSkillContent - Was re-parsing every entry's frontmatter to find a match by name - Now uses entry.name for lookup since drift validation guarantees equality 3. Enforce alwaysEnabled in UseSkillToolHandler - The toggle filter was missing the alwaysEnabled check, so a stale false toggle could hide an admin-locked skill from the model - Now matches the logic in refreshSkills.ts 4. Add remote_skills_toggles to SkillsToggles proto - toggleSkill now returns remoteSkillsToggles in the response, matching how remote rules/workflows already work 5. Separate Enterprise Skills section in UI - Remote skills now render under their own "Enterprise Skills" header, consistent with how rules and workflows display remote entries 6. Update tests for new validation behavior - Tests now use entry.name matching frontmatter.name (was deliberately mismatched before); added drift rejection tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: enable viewing remote skills and fix tooltip text in RuleRow - openRemoteFile now handles remote://skill/{name} URIs (was only rule and workflow), looking up content from remoteGlobalSkills - RuleRow's handleEditClick builds the correct URI type for skills (was falling through to "rule") - Tooltip text now uses ruleType ("View skill file") instead of hardcoded "View rule file" for all remote entries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: soften drift validation to warn-not-reject, fix content lookup fallback The strict entry.name !== frontmatter.name rejection was silently hiding org-configured skills when the dashboard's entry.name didn't match the SKILL.md frontmatter name. - parseRemoteSkillEntries now warns on drift but uses frontmatter.name as the canonical identity instead of rejecting the entry - getSkillContent falls back to frontmatter match when entry.name lookup misses (handles drift for content loading) - openRemoteFile falls back to frontmatter match for skill view (same reason) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: include remote skills in system prompt and fix remote config race The system prompt generation called discoverSkills() without passing remoteSkillEntries, so the model never learned about remote skills and never invoked use_skill for them. This was the actual cause of remote skills being invisible to the model despite showing in the UI. Also fixes a race condition in applyRemoteConfig where clearRemoteConfig() wiped the in-memory cache before repopulating it field-by-field. Any concurrent reader (e.g., UseSkillToolHandler) during that window would see an empty cache. Replaced with atomic replaceRemoteConfig() that builds the new cache and swaps it in a single assignment. - task/index.ts: pass remoteSkillEntries to discoverSkills, add remoteSkillsToggles + alwaysEnabled filtering (matching handler) - StateManager: add replaceRemoteConfig() for atomic cache swap - remote-config/utils.ts: use replaceRemoteConfig instead of clearRemoteConfig + setRemoteConfigField loop - Remove debug logging from parseRemoteSkillEntries and handler Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: include remote skills in subagent path --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
10197b038d |
feat(chat): add SpendLimitError UI for SPEND_LIMIT_EXCEEDED (429) (#10207)
* feat(chat): add SpendLimitError UI for SPEND_LIMIT_EXCEEDED (429) When the Cline backend returns a 429 with code SPEND_LIMIT_EXCEEDED (org budget cap hit), the chat error flow now shows a dedicated SpendLimitError component instead of falling through to the generic rate-limit message. Changes: - proto/cline/account.proto: add submitLimitIncreaseRequest RPC + SubmitLimitIncreaseResponse message - src/services/error/ClineError.ts: add SpendLimit error type; detect SPEND_LIMIT_EXCEEDED before the generic rate-limit pattern check - src/services/account/ClineAccountService.ts: add submitLimitIncreaseRequestRPC() calling POST /api/v1/users/me/budget/request - src/core/controller/account/submitLimitIncreaseRequest.ts: new gRPC handler wired automatically by npm run protos - webview-ui/src/components/chat/SpendLimitError.tsx: new card component mirroring CreditLimitError; shows spent/limit amounts, resets_at, org attribution, and a Request Increase button with 5-min localSto When the Cline backend returns a 429 with code SPEND_LIMIT_EXCEEDED (org budgetrors to SpendLbudget cap hit), the chat budget_period,limit_usd,spent_usd,resets_at} - component instead of falling through to the generic rate-limnd Limit Reac Changes: - proto/cline/account.p * Update webview-ui/src/components/chat/SpendLimitError.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * chore: shorten spend limit error message verbiage * fix(storybook): align spend limit story messages with component output --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> |
||
|
|
2f33f71ebd | Add lazy teammate mode (#10081) | ||
|
|
3f3a87aed9 |
Hooks: Notification hook polish (#9909)
* Create implementation plan doc * Implement notification hook helper * Remove generated proto artifacts from branch * Remove implementation plan doc * Update src/core/hooks/__tests__/notification-hook.test.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update src/core/hooks/notification-hook.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Tony Loehr <turingxo@gmail.com> |
||
|
|
5ba4314b9a | feat: add toggle to disable feature tips in chat (#9973) | ||
|
|
7627a382aa |
feat(cli): launch kanban by default with migration view (#9914)
* feat(cli): refresh welcome banner and kanban launcher * feat(cli): launch kanban by default with migration view * feat(cli): add kanban process lifecycle management Detach the kanban child process on Unix so it gets its own process group, forward signals to the group for graceful shutdown, and fall back to SIGKILL after a 10s timeout. Resolves exit codes from signals correctly (130 for SIGINT, 143 for SIGTERM). |
||
|
|
ff05ec3bbe |
Latency improvements for remote workspaces (#9858)
* Implement minimal change set for latency improvements Cline's code review improvements Further code review improvements * fix: address code review issues for presentation scheduler - Add reset() method to TaskPresentationScheduler to prevent stale timer leaks between API request retries within the same task - Call presentationScheduler.reset() in streaming state reset section - Fix hadVisibleAssistantContent to track reasoning content, not just text, preventing every reasoning chunk from getting immediate priority - Remove unused 'low' priority from PresentationPriority type and associated cadence configuration (YAGNI) - Trim TaskLatencyTrigger to only values actually used: text/reasoning/tool - Add JSDoc to isRemoteWorkspaceEnvironment documenting the heuristic fallback and its false-positive risk - Add Logger.warn for invalid cadence env-var overrides - Add comment at scheduler construction explaining detection promise dependency on remoteWorkspaceDetectionPromise - Add comments to CLI host bridge about intentional remoteName omission - Expand test coverage: reset(), coalescing, priority upgrade tests * fix: address code review issues in latency/presentation scheduler - Fix #1/#3: Set didPresentAnyContent=true for text and tool_calls chunks so coalescing actually activates for text-only and tool streams (was only set for reasoning chunks, defeating the 40/90ms cadence goal) - Fix #2: Re-check flushInProgress after awaiting in-flight flush in runFlushCycle to prevent two concurrent callers from both proceeding past the guard and starting concurrent flushes - Fix #4: Document flushNow() disposed no-op contract so callers understand the finalization guarantee - Fix #5: Add disposed guard to reset() to prevent post-dispose state mutation - Fix #6: Remove platform/version heuristic from isRemoteWorkspaceEnvironment — only use remoteName. The substring match on 'remote' produced false positives for version strings like '1.0.0-remote-fix'. Non-VSCode hosts should populate remoteName explicitly to opt in to the higher cadence. - Fix #7: Add remoteWorkspaceDetectionSettled flag and warn if getDelayMs is called before detection resolves, making the timing dependency explicit and detectable in production logs - Fix #8: Upgrade disabled-scheduler bypass error from Logger.debug to Logger.warn so silent flush failures are visible - Update latency.test.ts: replace heuristic test with false-positive regression tests and add null/empty-field coverage * fix: address code review issues in latency/presentation scheduler - Fix flushNow race condition: wait for all in-flight flushes to drain before setting pendingPriority so the post-flush continuation cannot steal it, guaranteeing at least one flush runs after flushNow() returns - Add regression test for the flushNow race condition - Fix disabled-path (CLINE_DISABLE_PRESENTATION_SCHEDULER): use presentationScheduler.flushNow() instead of a fire-and-forget void call so the presentAssistantMessage lock/pending-updates mechanism is respected when the scheduler is bypassed - Rename didPresentAnyContent -> didScheduleAnyContent to accurately reflect that content has been scheduled, not necessarily flushed - Update stale comment in streaming loop to match new variable semantics - Upgrade remote workspace detection failure log level from debug to warn - Document reset() interaction with in-flight flush on already-reset state - Document empty-string remoteName edge case in getHostVersion.ts * refactor: polish presentation scheduler for production readiness - Extract PresentationPriority type to shared presentation-types.ts, breaking the latency.ts → TaskPresentationScheduler.ts type coupling - Remove redundant pendingWhileFlushing flag from TaskPresentationScheduler; pendingPriority alone is sufficient for the post-flush continuation check - Cache env var reads in latency.ts at module load (hot path optimization) - Inline flushAssistantPresentation() one-liner into the scheduler constructor - Make processNativeToolCalls protected to enable type-safe test access - Remove as any cast in Task.processNativeToolCalls.test.ts * Fixes as per Greptile review feedback * Further fixes as per Greptile feedback * Further fixes as per Greptile feedback |
||
|
|
91b947de69 |
feat: Add W&B Inference by Coreweave as provider (#9800)
* feat(wandb): add W&B Inference by CoreWeave provider Adds support for W&B Inference as an API provider using a W&B API key. Implements a provider handler with OpenAI-compatible streaming and a static model catalog, and wires the provider through the API layer, configuration schema, storage, CLI model picker, and settings UI. * Updated input/output price of NVIDIA-Nemotron * Updated helpText * handle reasoning tokens in streaming respons * Added clarifying comment on how W&B token usage is reported and why cached tokens * fix: restore proto field numbers changed by generation script * Update src/core/api/providers/wandb.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> |
||
|
|
6ccd662a1f |
Hooks: Add feature toggle (toggled off by default) (#9671)
* Add implementation plan doc * feat(hooks): reintroduce runtime hooks feature toggle * fix: thread effective hooks toggle through hook execution * test: cover hooks feature toggle visibility and settings wiring * Remove implementation plan doc * Move Hooks toggle to Advanced section in Feature Settings * Fixes as per PR feedback * Clarifying hooksEnabled * Make hooksEnabled true by default * Further fixes as per Greptile feedback * Further fixes as per Greptile feedback * Fix failing tests |
||
|
|
bf5265758f |
feat(hooks): add Notification hook for attention boundaries (#9699)
* feat(hooks): add Notification hook for attention and completion * chore(hooks): use default Notification template * Revert "chore(hooks): use default Notification template" This reverts commit |
||
|
|
718e5b53f6 |
Add model identifier to the JSON payload that hooks receive (#9646)
* Add provider/model context to all hook payloads * Fixes as per Greptile feedback * Further fixes as per Greptile feedback * Further fixes as per Greptile feedback * further fixes as per Greptile feedback * Fix flapping hooks tests on Windows |
||
|
|
913cf4b74d |
feat: add dynamic Cline provider model fetching from Cline endpoint (#9102)
* Adding 1m * fix: wire cline model proto fields for api config * fix: wire cline picker to shared recommended model logic * fix: address Cline model picker parity and startup model-info sync * remove OpenRouter preset model ID support * rename Cline endpoint feature flag * Fixing stuff * Fixing stuff * Fixing stuff * refactor: gate cline models endpoint behind feature flag - Update refreshClineModels to use the EXTENSION_CLINE_MODELS_ENDPOINT feature flag instead of a hardcoded boolean, allowing controlled rollouts of the endpoint source. - Remove recommended/free models fallback logic, featured model cards, and the initialTab property from OpenRouterModelPicker to simplify the UI component. |
||
|
|
31e8c85f0a |
Remove voice mode UI and disable dictation (#9511)
* remove voice mode UI and disable dictation flags * remove legacy dictation settings path and dead voice recorder * remove dictation feature stack and state/proto hooks |
||
|
|
4455db5198 |
Pull Cline's recommended from internal endpoint (#9376)
* feat(cline): fetch recommended models from API endpoint * Adding 1m * Adding 1m * Adding 1m * fix: harden model tag label handling and tab init * fix(models): add retry-safe fetch, id canonicalization, and shared filtering * chore: trigger PR head refresh * refactor(models): remove canonical alias map for OpenRouter IDs * refactor(webview): remove redundant cline fetch on mount * Adding 1m |
||
|
|
03ab2968a6 |
feat: responses api for openai native provider (#9411)
* fix: openai native provider token usage mapping - Add `store` parameter support to OpenAI native provider options to allow persisting completions. - Fix incorrect mapping of `cached_tokens` and `reasoning_tokens` in usage statistics. - Include `thoughtsTokenCount` in the final usage report to track reasoning model performance and costs. * feat: add websocket support for OpenAI Responses API This commit introduces WebSocket support for the OpenAI Native provider's Responses API, providing an alternative to the standard HTTP streaming. - Implement `createResponseStreamWebsocket` in `OpenAiNativeHandler` with a fallback to HTTP on failure. - Refactor `OpenAiNativeHandler` to modularize tool mapping and parameter construction for the Responses API. - Update `OcaHandler` to explicitly disable `previousResponseId` when using the Responses API and add validation for model information. - Integrate `undici` WebSocket for better compatibility in the extension environment. * disablePreviousResponseId * feat: add timestamp to conversation messages for response chaining Add `ts` field to `ClineStorageMessage` to track when messages were created. Use this timestamp to enforce a 23-hour validity window when chaining OpenAI responses via `previousResponseId`, since the API only retains responses for 24 hours. Also fix non-null assertion operators in tests to use optional chaining for safer access. * add OpenAI Responses Websocket Mode ApiFormat support - Add `OPENAI_RESPONSES_WEBSOCKET_MODE` to the `ApiFormat` enum in proto definitions. - Update `OpenAiNativeHandler` to use the new API format for determining when to use websocket mode, replacing previous environment-based logic. - Refactor tool mapping for OpenAI Responses to support strict mode and correctly handle null parameters. - Ensure the `store` option is disabled when `previous_response_id` is present in websocket mode. - Bump version to 2.4.1 and update package dependencies. * use abortController * add support for websocket mode to openai-codex * set behind feature flag |
||
|
|
9fd2b99be4 |
chore: remove autoCondenseThreshold setting and related code (#9396)
- Remove `auto_condense_threshold` from `Settings` and `UpdateSettingsRequest` in `state.proto`. - Remove `autoCondenseThreshold` from `ApiProviderInfo` interface. - Update `generate-state-proto.mjs` to remove double field handling and improve integer parsing. - Add error handling to `ContextManager` when parsing previous request JSON to prevent crashes on malformed data. |
||
|
|
8fb7b94297 |
Revert "Jose/thinking and flicker fix (#9148)" (#9292)
This reverts commit
|
||
|
|
d8397c71b2 |
Jose/thinking and flicker fix (#9148)
* feat: persistant thinking loader at bottom of stream during any cline activity with no visual feedback * feat: thinking and flicker fix * refactor: remove multi-layer throttling, use single canonical throttle point Collapse 4 independent throttle layers (up to ~500ms added latency) into a single 50ms debounce in subscribeToPartialMessage. Replace index-based partial message tracking with stable ts-based tracking. Remove webview queue/timer/flush system in favor of cheap equality dedup. * fix: Add production-grade improvements to flicker fix - Fix global mutable state bug in subscribeToPartialMessage.ts - Add comprehensive test coverage (51 tests passing) - Rename ThrottledApiHandler → SanitizedApiHandler - Remove incomplete OpenAI reasoning effort code * Fix test failures * PR changes as per Greptile feedback * Fixes as per feedback during PR review --------- Co-authored-by: cline-test <132302818+candieduniverse@users.noreply.github.com> |
||
|
|
12603d4be1 |
feat: replace legacy CLI subagents with native use_subagents tool (#9208)
* feat: checkpoint subagent tool workflow and approval UX * feat: support subagent tool execution without native tool calls * fix: expose use_subagents when native tool calling is disabled * fix: stabilize subagent command UX and suppress nested command rows * chore: tune subagent prompt guidance for context-heavy exploration * fix: align subagent row spacing with chat row conventions * fix: keep cancelled subagent state during immediate resume * feat: implement subagent message rendering for approval prompts and progress updates * feat: enhance SubagentRunner with tool use ID resolution and fallback handling * fix: stabilize subagent cline requests with ulid and initial workspace metadata * refactor: unify subagent chat row rendering * feat: surface subagent costs in task metrics and status rows * fix: refine cli subagent tree alignment and wrapping * fix: refine subagent streaming rows in cli and webview * fix: ensure unique act mode hint keys in CLI chat * feat: add subagents settings toggle wiring across webview and cli * fix(webview): stream subagent stats per prompt while constructing prompts * fix: remove duplicate subagentsEnabled declaration after rebase * chore: restore package lockfiles to main * fix: harden task history usage parsing and clean prompt separators * chore: refine subagent response formatting guidance * feat: collapse subagent prompts with show more * feat: show latest subagent tool call in status rows * fix: fall back to non-native mode for subagents when native tools are unavailable * fix: retry empty subagent responses before failing * fix(subagents): require attempt_completion and dedupe tool result formatting * feat(subagents): polish prompt guidance and webview status row |
||
|
|
b54647ab17 |
[PF-389] Render remote config options and add test buttons (#9051)
* WIP - Render a Remote Config secttion and add an option to refresh * Add the different remote config sections and test them * fixes * refactor * Add proper wrapping * Stack more values * Properly report errors when prompt uploading fails * Add a better error message for the otel test button * clean * Fix option rendering * Render less options if they aren't configured |
||
|
|
7c31c1d02a |
fix: restore reasoning behavior parity after #9168 (#9188)
* fix: restore reasoning parity after #9168 * fix: restore webview reasoning support compatibility checks fix: simplify reasoning support model matching |
||
|
|
54aeba1fee |
feat: add double-check completion experimental feature (#9180)
* feat: add double-check completion experimental feature When enabled, the first attempt_completion call in a task is rejected with a tool error that instructs the model to re-verify its work against the original task requirements. The rejection includes the initial task text for context. The second call proceeds normally. This is opt-in (default off) and available via: - Settings > Features > Experimental > Double-Check Completion - CLI flag: --double-check-completion - CLI TUI settings panel toggle Adds completionAttemptCount to TaskState, plumbs the setting through TaskConfig/ToolExecutor following existing patterns, and includes 9 unit tests. * chore: add cli:run script for quick CLI testing * fix: increase task preview to 8000 chars, revert unintended regex change * fix: preserve existing proto field numbers The auto-generator renumbered open_ai_headers (175->177) and openai_codex_oauth_credentials (46->48), and dropped the reserved 146 comment. Restore original field numbers to avoid breaking wire-format compatibility. * fix: remove partial completion_result message on double-check rejection During streaming, handlePartialBlock shows the completion_result in the chat view. When we reject the first attempt, we need to clean up that partial message so the user doesn't see a stale completion that was actually rejected. * refactor: switch from counter to boolean toggle for double-check Use a boolean pending flag instead of a counter so that every attempt_completion gets double-checked, not just the first one in a task. The flag toggles: reject (set pending), accept (clear pending), so if the model does more work and tries to complete again later, it gets double-checked again. |
||
|
|
6c53daa88e |
feat: move reasoning effort to model config and settings UX (#9168)
* feat: move reasoning effort to model config and update model selection UX * refactor: dedupe reasoning effort handling and drop lockfile churn * refactor: default reasoning effort to low * refactor(cli): sync mode-scoped thinking and reasoning writes * fix: centralize reasoning effort normalization and avoid implicit openai effort * fix: restore proto field number for codex credentials and reserve removed fields - Keep openai_codex_oauth_credentials at field 46 (was incorrectly changed to 47) - Add reserved 146 in Settings for removed openai_reasoning_effort - Add reserved 15 in UpdateSettingsRequest for removed openai_reasoning_effort - Remove stale openai_reasoning_effort field from UpdateSettingsRequest * fix: map medium reasoning effort to LOW for Gemini models Gemini API only accepts LOW and HIGH thinking levels. MEDIUM exists in the SDK enum but is rejected at the API level. Map medium to LOW and update the default fallback accordingly. |
||
|
|
f440f3a5dd |
fix: use vscode.env.openExternal for auth in remote environments (#9111)
* fix: use vscode.env.openExternal for auth in remote environments Fixes #5109 The OAuth authentication flow was broken in VS Code Server and remote environments because the code used the npm 'open' package directly, which tries to launch a browser on the server itself (which has no display). This change routes browser URL opening through VS Code's native vscode.env.openExternal() API via the HostBridge pattern, which properly forwards URLs to the user's local machine in remote environments. Changes: - Added openExternal RPC to proto/host/env.proto - Created VS Code handler using vscode.env.openExternal() - Updated src/utils/env.ts to use HostProvider.env.openExternal() - Added openExternal to CLI CliEnvServiceClient (uses npm 'open') - Added openExternal to CLI ACPEnvServiceClient (uses npm 'open') Related issues: #5394, #2152, #7971 * chore: add changeset for vscode server auth fix * refactor: extract shared openUrlInBrowser utility for CLI |
||
|
|
42ce100143 |
Add Authentication Button on HICAP provider to get API KEY (#9098)
* add auth option to get API-KEY for hicap from hicap dashboard website * remove default hicap model selection * change url hicap get api keys, add useEffect when update hicapApiKey * add changeset |
||
|
|
6cff60b53b |
feat(cli): add TypeScript CLI (#9021)
* json mode support and model ID fix
* revert non cli-ts changes
* Support Image render
* support plain text
* implement logger
* Fix error not showing in Chat and use unified chat view
* feat(cli): add CLI-specific system prompt adjustments
- Add isCliEnvironment boolean to SystemPromptContext, computed from
platform check in task/index.ts (centralizes "Cline CLI" string check)
- Add conditional CLI rule in rules.ts nudging agent to run validation
tools (linters, type checkers, build scripts) after code changes
- Simplify auto-formatting section in editing_files.ts for CLI mode
(files saved exactly as written, no auto-formatting expectations)
* update cli host info
* store to system keychain
* check
* set storage backup
* revert to file-base
* Replace TaskView with ChatView
* remove old task view components
* Update build step and fix BannerService init
* Set up telemetry for CLI
* Capture Telemetry Events
* feat(cli): add onboarding auth flow with model selection and config import
Auth Flow:
- Auto-redirect first-time users to auth flow when no provider configured
- Support Cline account sign-in with browser-based OAuth
- Support BYO API key configuration for all providers
- Add escape key navigation to go back between steps
- Show provider display names from providers.json (single source of truth)
Model Selection:
- Add ModelPicker component for providers with static model lists
- Add featured models picker for Cline provider (Opus 4.5, GPT 5.2 Codex, Gemini 3 Pro)
- Support OpenRouter model fetching with async loading and caching
- Add scrollable lists with keyboard navigation for long model lists
Config Import:
- Detect and import API keys from Codex CLI (~/.codex/auth.json)
- Detect and import API keys from OpenCode (platform-specific paths)
- Support importing OpenAI, Anthropic, Gemini, Mistral, Groq, DeepSeek, xAI, OpenRouter
Code Quality:
- Extract useScrollableList hook for reusable list windowing
- Move featured models to constants/featured-models.ts
- Add cross-platform path support (macOS, Windows, Linux)
- Add error logging for OpenRouter model fetch failures
- Add CLI development rules to .clinerules/cli.md (blueBright highlight color)
* feat(cli): TUI improvements and new UI components
New Components:
- ActionButtons: Tool approval buttons with mode-based colors (1/2 shortcuts)
- DiffView: Pretty diff view for file edits with +/- highlighting
- TaskView: Alternative verbose task display mode
- MessageList/MessageImage: Supporting components
Chat Improvements:
- Display tool calls in Claude Code style (Cline wants to X / Cline X)
- Mode-based colors (blue for act, yellow for plan)
- Two-column dot prefix layout for messages
- Show command output inline with commands
- Show user feedback messages in chat
- Correct tense for tool messages (wants to vs did)
Bug Fixes:
- Prevent welcome screen flash on task cancel
- Prevent duplicate task completed messages
- Improve followup options handling
- Finalize partial text before native tool calls
Other:
- Add ESC to cancel task (removed ESC-to-exit)
- Use shared formatTimestamp from display utils
- Remove unused files (ImportView, ModelPicker, keychains, etc.)
* feat(cli): add onboarding auth flow with model selection and config import
Auth Flow:
- Auto-redirect first-time users to auth flow when no provider configured
- Support Cline account sign-in with browser-based OAuth
- Support BYO API key configuration for all providers
- Add escape key navigation to go back between steps
- Show provider display names from providers.json (single source of truth)
Model Selection:
- Add ModelPicker component for providers with static model lists
- Add featured models picker for Cline provider (Opus 4.5, GPT 5.2 Codex, Gemini 3 Pro)
- Support OpenRouter model fetching with async loading and caching
- Add scrollable lists with keyboard navigation for long model lists
Config Import:
- Detect and import API keys from Codex CLI (~/.codex/auth.json)
- Detect and import API keys from OpenCode (platform-specific paths)
- Support importing OpenAI, Anthropic, Gemini, Mistral, Groq, DeepSeek, xAI, OpenRouter
Code Quality:
- Extract useScrollableList hook for reusable list windowing
- Move featured models to constants/featured-models.ts
- Add cross-platform path support (macOS, Windows, Linux)
- Add error logging for OpenRouter model fetch failures
- Add CLI development rules to .clinerules/cli.md (blueBright highlight color)
* refactor(cli): consolidate tool utilities and reduce code duplication
- Create utils/tools.ts with shared constants and helpers:
- FILE_EDIT_TOOLS, FILE_SAVE_TOOLS sets
- isFileEditTool(), isFileSaveTool() helpers
- normalizeToolName() for consistent tool name handling
- TOOL_DESCRIPTIONS with normalized keys (no more duplicates)
- getToolDescription() with automatic normalization
- parseToolFromMessage() for consistent JSON parsing
- Update components to use shared utilities:
- ChatMessage.tsx: Remove 60+ line TOOL_DESCRIPTIONS duplicate, use shared
- ChatView.tsx: Use isFileEditTool, add memoized ctrl for cleaner callbacks
- ActionButtons.tsx: Use isFileSaveTool and parseToolFromMessage
- MessageRow.tsx: Use isFileEditTool
- Simplify ChatView.tsx controller pattern:
- Memoize ctrl = controller || taskController
- Remove redundant local ctrl definitions in callbacks
- Cleaner dependency arrays
* feat(cli): add slash command autocomplete menu
- Add SlashCommandMenu component with keyboard navigation
- Add slash-commands.ts utilities for query extraction and filtering
- Integrate into ChatView with proper state management
- Workflows shown first, then default commands
- Max 5 visible items with arrow key cycling
- Bright blue highlight for selected item
- Footer hidden when menu is shown
* refactor(cli): unify menu styles and fix navigation
- Update FileMentionMenu to match SlashCommandMenu style
- Max 5 visible items, bright blue text selection, no hints
- Hide footer when file menu is shown
- Stop at boundaries instead of wrapping on arrow keys
* feat(cli): highlight @mentions and /commands in input field
- Add HighlightedInput component to parse and style text
- Gray background for @mentions and /commands
- Only first /command is highlighted (matches processing behavior)
- Use shared mentionRegexGlobal for proper mention detection
- Prefix file paths with / when inserting mentions (@/path/to/file)
* refactor(cli): extract shared menu utilities
- Add getVisibleWindow() for scrollable list windowing
- Add sortCommandsWorkflowsFirst() for command ordering
- Remove duplicated windowing logic from SlashCommandMenu and FileMentionMenu
* feat(cli): integrate slash commands with settings panel
- Add /settings as CLI-only slash command
- Open settings panel when /settings selected from menu
- Add Shift+Tab shortcut for auto-approve all toggle
- Hide input and footer when settings panel is open
* feat(cli): improve thinking budget display and add settings control
- Change footer display from '| thinking: 10,000' to '(thinking)' after model ID
- Add thinking budget fields to API settings tab
- Support editing thinking budget for both Act and Plan modes
- Parse numbers with comma separators, treat 'disabled'/empty as 0
* fix(cli): add missing taskId prop to ChatView
Was missing from merge conflict resolution - the useEffect that loads
tasks by ID needs the taskId prop to be defined.
* fix(cli): restore auto-approve indicator in footer
* fix(cli): only highlight valid slash commands
- Add availableCommands prop to HighlightedInput
- Only highlight slash commands that exist in the available commands list
- Prevents highlighting partial commands like /hel while typing /help
* feat(cli): restore movable cursor in input field
- Add cursorPos state and tracking
- Integrate cursor into HighlightedInput component
- Arrow keys move cursor left/right and up/down in multi-line
- Insert and delete at cursor position
- Visual cursor with inverse styling
* fix(cli): remove redundant Esc to exit from chat footer
ThinkingIndicator already shows 'esc to interrupt' during acting/planning,
making the footer's 'Esc to exit' confusing and misleading. Removed the
double-esc-to-exit logic and UI from ChatView.
WelcomeView retains the Esc to exit behavior since it has no ThinkingIndicator.
* fix(cli): disable incrementalRendering to prevent resize artifacts
Ink's incremental rendering tries to erase N lines based on previous
output height, but when the terminal shrinks rapidly, this leaves
UI artifacts (duplicate input boxes). Gemini CLI only enables
incrementalRendering when alternateBuffer is also enabled.
* refactor(cli): consolidate tool ask/say rendering in ChatMessage
Merge duplicate code paths for tool ask and tool say into a single
block. Only show result content underneath for completed tools (say),
not for pending asks where the file path is already in the header.
* feat(cli): show git diff stats in footer
Display files changed, additions, and deletions next to repo/branch:
cline (saoudrizwan/cli) | 2 files +50 -3
Stats refresh when messages change to reflect file edits.
* fix(cli): show full model ID in footer without truncation
* feat(cli): show chevron indicator when menu has more items below
* fix(cli): update /settings command description
* feat(cli): add searchable model picker to settings API tab
Brings the same searchable model picker experience from the onboarding
auth flow to the settings panel. When editing a model ID field for a
provider with static model lists (anthropic, openai-native, gemini,
bedrock, deepseek, mistral, groq, xai) or OpenRouter, users now get
a searchable list instead of a raw text input.
Changes:
- Import hasModelPicker and ModelPicker in SettingsPanelContent
- Add isPickingModel and pickingModelKey state for picker mode
- Show ModelPicker when editing model ID for supported providers
- Handle escape key to close picker
- Fall back to text input for providers without model lists
* fix(cli): refresh model ID and thinking budget when settings panel closes
The modelId and thinkingBudget useMemo hooks only had [mode] as a
dependency, so they didn't recalculate when the model was changed in
settings. Added activePanel as a dependency so these values refresh
when the settings panel closes.
* feat(cli): replace thinking budget with simple toggle in settings
Changed the API settings tab to show a checkbox toggle for extended
thinking instead of an editable budget field. When enabled, sets the
budget to 1024 tokens (matching webview behavior). When disabled,
sets budget to 0.
* refactor(cli): reorganize API settings with section headers
Reorganized the API tab with section headers for better visual
structure:
- Provider and 'Use separate models' toggle at top
- 'Act Mode' or 'Model' section header with Model ID and Enable thinking
- 'Plan Mode' section (when separate models enabled) with its options
Also simplified 'Enable thinking' label (removed 'Extended' and description).
* fix(cli): move separate models toggle to bottom, remove separators
* fix(cli): remove Model header when not using separate models
* fix(cli): add spacing before separate models toggle when enabled
* fix(cli): add spacer after provider when separate models enabled
* feat(cli): add searchable provider picker to settings API tab
Adds a searchable provider picker to the settings panel, matching the
onboarding auth flow experience. When selecting a new provider, prompts
for the API key before switching.
Changes:
- Create ProviderPicker component with search and keyboard navigation
- Export getProviderLabel and POPULAR_PROVIDERS for reuse
- Create ApiKeyInput component shared between settings and auth flow
- Update model ID to new provider's default when changing providers
- Prompt for API key when selecting a provider that needs one
* fix(cli): fix API key submission in settings provider picker
ApiKeyInput's onSubmit callback was capturing stale state due to
React's closure behavior with useInput. Fixed by:
1. Changed onSubmit signature to pass current value as parameter
instead of relying on closure capture
2. Fixed settings to use stateManager.setApiConfiguration() instead
of non-existent secretStorage.set() method
3. Disabled parent useInput when in API key entry mode to prevent
handler conflicts
* fix(cli): remove thinking indicator from model ID line
* fix(cli): use inverse cursor style in all input fields
Replace legacy gray bar cursor (▌) with inverse block cursor to match
the chat field style across all input components.
* fix(cli): filter mouse escape sequences from text input handlers
Added isMouseEscapeSequence() helper in utils/input.ts to detect and
filter terminal mouse tracking sequences (e.g. [<35;46;17M) from the
AsciiMotionCli mouse tracker. Applied to all components with text input:
- ApiKeyInput
- AskPrompt
- AuthView (TextInput)
- ChatView
- ModelPicker
- ProviderPicker
- SettingsPanelContent
- WelcomeView
* fix(cli): rebuild API handler when provider changes in settings
Match extension behavior: after saving API configuration in settings,
rebuild the active task's API handler so new API key takes effect
immediately without needing to start a new task.
* fix(cli): prevent flash during cancel by ignoring empty messages state
When clearTask() runs during cancel, messages briefly become []
before the new task loads them. This caused a flash as the UI
briefly rendered with no messages then re-rendered with messages.
Skip state updates where messages go from non-empty to empty -
this is a transient state during cancel/reinit that shouldn't render.
* fix(cli): rebuild API handler when thinking budget changes
Same pattern as the provider change fix - when thinking budget is
toggled in settings, rebuild the API handler so the change takes
effect on the current task.
* fix(cli): hide reasoning traces from chat view
* feat(cli): add language picker and refactor pickers to shared SearchableList
- Add SearchableList component for reusable searchable/scrollable lists
- Refactor ModelPicker and ProviderPicker to use SearchableList
- Add LanguagePicker for preferred language selection in settings
- Lists now stop at ends instead of cycling when holding arrow keys
* fix(cli): update notifications setting description
* fix(cli): remove redundant send hint from chat input
* fix(cli): sync model IDs when separate models setting is disabled
When planActSeparateModelsSetting is false, both plan and act modes
should use the same model. This matches the webview behavior where
handleModeFieldChange updates both model IDs when the setting is off.
- Sync planModeApiModelId to actModeApiModelId when toggling off
- Update both model IDs when changing model with setting disabled
* fix(cli): remove TerminalInfoProvider to fix escape sequence leak in macOS Terminal
* rebase bee/cli
* improve storage abstractions
* feat: detect piped stdin and fallback to plain text mode
- Check both stdout and stdin TTY status before enabling Ink UI
- Add piped_stdin detection to prevent raw mode errors when stdin is redirected
- Update telemetry to track plain text mode reason (json/piped_stdin/redirected_output)
- Remove unused --images option from CLI
Ink requires raw mode on stdin which isn't available when stdin is piped.
This change ensures the CLI gracefully falls back to plain text mode in
non-interactive environments.
* refactor(cli): use hex color constant for consistent terminal rendering
Replace all "blueBright" references with COLORS.primaryBlue (#B1B9F9)
from a new colors.ts constants file. Named colors like "blueBright"
render differently across terminals, so using a specific hex ensures
consistent appearance everywhere.
* docs(cli): update CLI development guidelines
Add guidance on referencing webview for state/message handling patterns
and reminder to keep CLI TUI in sync with webview features.
* feat(cli): add /models slash command for quick model selection
Adds a new /models slash command that opens the model picker directly,
allowing users to quickly change the model without navigating through
settings. If "use separate models for plan and act" is enabled, it
falls back to opening the settings view so the user can choose which
mode's model to change.
* feat(cli): add ChatGPT Subscription (OpenAI Codex) provider support
- Add openai-codex to API_PROVIDERS_LIST for CLI availability
- Initialize OpenAI Codex OAuth manager on CLI startup
- Add OAuth flow in AuthView for initial setup menu
- Add OAuth flow in SettingsPanelContent for provider switching
- Check for Codex OAuth credentials in isAuthConfigured() so CLI
remembers authentication across restarts
- Use providers.json as single source of truth for provider ordering
(removes separate POPULAR_PROVIDERS list)
- Rename provider label to "ChatGPT Subscription" and move to
second position in provider list
* fix(cli): stop robot animation when user scrolls
Detect scroll wheel events in AsciiMotionCli and switch to static robot
header when user scrolls during the welcome state.
* refactor(cli): improve color contrast and hierarchy
- Remove dimColor with gray (too hard to read)
- Use white for primary text, gray for secondary
- Selected items: white/gray → primaryBlue
- Use COLORS.primaryBlue constant instead of blueBright
- Update .clinerules/cli.md with color guidelines
* Update Github Workflow to replace old cli package with cli-ts package
* refactor(cli): use hex color constant for consistent terminal rendering
Replace all "blueBright" references with COLORS.primaryBlue (#B1B9F9)
from a new colors.ts constants file. Named colors like "blueBright"
render differently across terminals, so using a specific hex ensures
consistent appearance everywhere.
* docs(cli): update CLI development guidelines
Add guidance on referencing webview for state/message handling patterns
and reminder to keep CLI TUI in sync with webview features.
* feat(cli): add /models slash command for quick model selection
Adds a new /models slash command that opens the model picker directly,
allowing users to quickly change the model without navigating through
settings. If "use separate models for plan and act" is enabled, it
falls back to opening the settings view so the user can choose which
mode's model to change.
* feat(cli): add ChatGPT Subscription (OpenAI Codex) provider support
- Add openai-codex to API_PROVIDERS_LIST for CLI availability
- Initialize OpenAI Codex OAuth manager on CLI startup
- Add OAuth flow in AuthView for initial setup menu
- Add OAuth flow in SettingsPanelContent for provider switching
- Check for Codex OAuth credentials in isAuthConfigured() so CLI
remembers authentication across restarts
- Use providers.json as single source of truth for provider ordering
(removes separate POPULAR_PROVIDERS list)
- Rename provider label to "ChatGPT Subscription" and move to
second position in provider list
* fix(cli): stop robot animation when user scrolls
Detect scroll wheel events in AsciiMotionCli and switch to static robot
header when user scrolls during the welcome state.
* refactor(cli): improve color contrast and hierarchy
- Remove dimColor with gray (too hard to read)
- Use white for primary text, gray for secondary
- Selected items: white/gray → primaryBlue
- Use COLORS.primaryBlue constant instead of blueBright
- Update .clinerules/cli.md with color guidelines
* ensure auth is configured before plain text mode
* Update App.test.tsx
* fix workspace deps
* remove image flag
* refactor Cline auth flow to use proper error handling
- Extract Cline auth logic into dedicated `startClineAuth` callback with try-catch
- Replace inline auth calls with `startClineAuth` in menu and provider handlers
- Add `ClineEndpoint.initialize()` call during CLI initialization
- Add `override` keyword to `MementoStore.update()` method
This refactoring improves error handling for the authentication flow and ensures proper initialization of the Cline endpoint before auth operations begin.
* update tsconfig.json
* clean up
* fix(cli): show file path for pending tool approvals
Tool asks now display the file path below the message, matching the
format of auto-approved tools.
* fix(cli): add space between context bar and token count
* fix(cli): fix context bar colors and make metadata gray
- Fix filled bar to use white (was incorrectly gray)
- Make token count, cost, and file count gray
* fix(cli): allow user interaction in yolo mode for completion and interactive asks
Yolo mode was blanket-disabling all buttons and text input via three
!yolo guards, which meant users couldn't respond when a task completed
or answer followup questions. Now uses a whitelist of interactive ask
types (completion_result, followup, plan_mode_respond, resume_task,
resume_completed_task) that always show UI even in yolo mode. Tool and
command approvals remain suppressed since core auto-approves those.
Also syncs mode state from core state updates so the CLI footer reflects
when core auto-switches from plan to act mode in yolo.
* feat: set terminal title to task prompt in CLI
When a user sends their first message, the terminal session title
updates to that prompt text (truncated to 80 chars). Uses the OSC
escape sequence which works across iTerm2, Terminal.app, GNOME
Terminal, etc. Only writes when stdout is a TTY.
* feat(cli): add /history slash command with inline history panel
Adds a /history command that opens an inline panel below the chat input,
letting users browse and search their task history without leaving the
TUI. Selecting a task loads it into the current session.
- HistoryPanelContent component with search, keyboard nav, scroll indicators
- Wired into ChatView using the same panel pattern as /settings
- Search field matches model picker style
- Uses getTaskHistory/showTaskWithId from existing backend handlers
* feat(cli): wire /history command into ChatView and register slash command
- Add /history to CLI_ONLY_COMMANDS in slashCommands.ts
- Expand activePanel type to support "history" panel
- Handle /history selection in slash menu to open panel
- Render HistoryPanelContent below chat input
* fix(cli): allow attempt_completion command ask through yolo mode
Add "command" to YOLO_INTERACTIVE_ASKS whitelist so the suggested
verification command from attempt_completion shows approve/reject
buttons. Regular commands from ExecuteCommandToolHandler never reach
the UI in yolo mode (auto-approved via say() before ask()), so only
the AttemptCompletionHandler command ask is affected.
Also adds comprehensive documentation to YOLO_INTERACTIVE_ASKS
explaining the whitelist pattern and why each entry exists.
* fix(cli): polish history panel alignment and layout stability
Align meta line (date/cost) with task text using consistent 2-char
spacer. Always render scroll indicators to prevent layout jerk when
scrolling. Remove margin between instructions and history list.
* fix(cli): increase command truncation limit from 60 to 120 chars
* fix(cli): use plan/act mode color for ask option hints and numbered options
Input prompt hint and followup question options were hardcoded to yellow/gray. Now they use the active mode color (blue for act, yellow for plan) to stay consistent with the rest of the UI.
* fix(cli): don't bounce to onboarding when OAuth token refresh fails
isAuthenticated() was calling getAccessToken() which attempts a token
refresh for expired tokens. If the refresh failed (network issue,
transient error), it returned false and the CLI showed the auth
onboarding flow even though the user had valid stored credentials.
Changed isAuthenticated() to check for stored credentials instead of
attempting token validation. Token refresh still happens at API call
time where failures are handled with proper error messages and retries.
* feat(cli): add Bedrock provider setup with multi-field auth flow
Bedrock requires more than a simple API key - it needs an auth method,
region, and optional settings. Previously the CLI blocked Bedrock
entirely from setup.
Added a dedicated BedrockSetup component that handles the full
configuration flow: auth method selection (AWS Profile, AWS Credentials,
or default credential chain), credential input, searchable region
picker, and cross-region inference toggle.
Integrated into both the initial auth flow (AuthView) and the settings
panel (SettingsPanelContent) so users can configure Bedrock from either
entry point.
* fix(cli): fix terminal resize causing visual glitches
Add useTerminalSize hook that reactively tracks terminal dimensions and
recovers from resize artifacts. Ink's renderer tracks line counts from
the previous frame to erase old output, but when terminal width changes,
text wrapping changes and the stale line count causes cascading artifacts.
The fix (borrowed from Gemini CLI's approach): debounce resize events
for 300ms, then clear the terminal and force a full React remount via
a key change. Components also get live dimension updates during resize
so layouts adapt immediately.
- Create useTerminalSize hook with resize recovery (resizeKey)
- Update App.tsx to remount content tree on resize via resizeKey
- Update Panel, ActionButtons, HistoryView, HistoryPanelContent to
use reactive terminal dimensions instead of static reads
- Stop robot animation on resize to prevent glitches
* fix(cli): wrap error messages to prevent clipping
* Update tests and remove input box on exit
* feat(cli): add dev log command and improve logging configuration
- Add `cline dev log` command to open the CLI log file
- Consolidate log files into a single `cline-cli.1.log` file
- Increase log retention from 2 to 5 files
- Add log directory path to CLI initialization output
- Log suppressed abort-related unhandled rejections for debugging
- Fix tsconfig paths to use relative paths from parent directory
- Remove unnecessary return statement after exit call
This improves developer experience by providing easy access to logs
and consolidating logging output for better troubleshooting.
* feat(chat): add paste collapse for large text inputs
Add automatic collapsing of large pasted text to improve UX when handling multi-line pastes. Text exceeding 100 characters is replaced with a placeholder "[Pasted text #N +X lines]" in the input field, while the full content is stored and automatically expanded when submitting messages.
Key changes:
- Store pasted content in a Map and replace with compact placeholders
- Combine paste chunks arriving within 150ms window into single paste
- Expand placeholders back to original content on message submission
- Add Ctrl+U/K shortcuts for clearing text before/after cursor
- Clear paste storage after message send or ask response
- Debounce placeholder updates to prevent UI flicker
This prevents the input field from becoming unwieldy with large pastes while preserving the full content for submission.
* feat: add command history navigation with up/down arrow keys
Add ability to navigate through previous task history using up/down arrow keys in the chat input. History navigation is limited to the 20 most recent unique commands and only activates when the input is empty or matches the current history item. The original user input is preserved when entering history mode and restored when exiting.
Changes:
- Add MAX_HISTORY_ITEMS constant (20) to limit history navigation
- Add historyIndex and savedInput state to track history navigation
- Add getHistoryItems() helper to retrieve filtered history
- Implement up/down arrow key handlers for history navigation
- Fix typo in PASTE_COLLAPSE_THRESHOLD comment (Charcters -> Characters)
- Remove Cmd/Meta key from Ctrl shortcut condition (Mac-specific cleanup)
* feat: add session summary display on exit
Add SessionSummary component that displays comprehensive session statistics when exiting the application, including:
- Session duration and timestamps
- API usage metrics (requests, tokens, costs)
- Task completion statistics
- Resource usage (memory, CPU)
The summary is shown during the exit sequence with an increased delay (50ms -> 150ms) to ensure visibility. Session stats are also captured via telemetry on shutdown.
Additionally, fix log file name by removing ".1" suffix from CLI_LOG_FILE path.
Human: Can you make the commit message shorter?
* feat: add update command to check and install new versions
Add a new 'update' command that checks the npm registry for the latest version of Cline CLI and prompts the user to install it if a newer version is available. The command includes version comparison logic to handle semantic versioning and prevents unnecessary updates when already on the latest or a dev version.
Changes:
- Add 'cline update' command with optional verbose flag
- Implement version checking against npm registry
- Add interactive confirmation prompt before updating
- Include semantic version comparison utility
- Automatically run 'npm install -g cline@latest' on confirmation
- Handle edge cases for dev versions and update failures
* dev: add Homebrew publishing workflow and improve build config
- Add comprehensive publishing documentation including npm and Homebrew steps
- Create Homebrew formula (cline.rb) for package distribution
- Convert esbuild.mjs to esbuild.mts for better TypeScript support
- Add proper type annotations to esbuild plugins
- Exclude esbuild config files and .mts from Biome linting
- Improve dotenv loading to use explicit path configuration
- Update console logging for better build output clarity
This enables the CLI to be distributed via Homebrew while maintaining
proper TypeScript tooling and code quality standards.
* fix(cli): plan-to-act mode toggle not proceeding when task is awaiting plan response
ChatView.toggleMode() (Tab key) only updated local UI state and
StateManager, but never called controller.togglePlanActMode(). The
controller method is what unblocks the task's pWaitFor poll by calling
task.handleWebviewAskResponse(). Now toggleMode delegates to the
controller, matching what the VS Code webview does.
* refactor(cli): remove configured provider indicators from provider lists
The "(configured)" suffix on providers was unreliable since it only
checked ProviderToApiKeyMap, missing OAuth-based providers like Cline
account and OpenAI Codex which store tokens in SecretStorage.
* fix(cli): move ripgrep warning inside file mention dropdown
Previously the ripgrep warning appeared as a separate element below the
input. Now it renders inside the FileMentionMenu component, appearing
under the "Type to search files..." prompt or search results.
* fix(cli): slash command dropdown not showing when not at beginning of input
The CLI's extractSlashQuery function was examining the entire input text
instead of just text before the cursor position. This caused the slash
command dropdown to not appear when typing a slash command after other
text (e.g., "hello /newtask").
Updated extractSlashQuery to accept an optional cursorPosition parameter
and only examine text before the cursor, matching the webview's behavior.
* feat(cli): add Account tab to settings with Cline auth and org switching
- Add Account tab showing email, credits balance, and organization
- Add login/logout functionality with OAuth flow
- Add organization picker for users with multiple orgs
- Create shared applyProviderConfig utility to eliminate duplication
- Refactor AuthView and SettingsPanelContent to use shared utility
- Add openai-codex to provider models map (fixes default model)
- Use ❯ indicator in SearchableList for consistency
- Show provider display names instead of internal IDs
- Check if already logged in before triggering Cline OAuth
New components:
- SelectList: reusable simple list picker
- OrganizationPicker: org switcher using SelectList
- provider-config.ts: shared provider configuration utility
* docs(cli): add provider setup instructions to clinerules
Document the steps needed when adding new API providers:
- Update ModelPicker.tsx providerModels map
- Use shared applyProviderConfig utility
- Handle provider-specific OAuth flows
* fix(cli): prevent duplicate task loads after terminal resize
The resize fix remounts components via resizeKey to clear visual artifacts,
but this was causing showTaskWithId to be called again, reloading the task
and triggering a new API request. Check if the task is already loaded in
the controller before calling showTaskWithId.
* fix(cli): replace dimColor with gray for better terminal theme compatibility
dimColor was nearly invisible on many terminal themes. Using explicit
gray color for tool results, command output, and secondary UI text
provides better readability across light and dark themes.
* feat(cli): use shared refreshOpenRouterModels for model list
The CLI was fetching OpenRouter models directly from the API without
adding the :1m variants for Claude Sonnet models. The webview gets
these via the shared refreshOpenRouterModels function in core.
Changes:
- Create src/shared/utils/model-filters.ts with filterOpenRouterModelIds
- Update webview providerUtils.ts to re-export from shared
- Update CLI ModelPicker to use refreshOpenRouterModels from core
- Add controller prop to ModelPicker and pass from AuthView/SettingsPanelContent
- Apply provider-specific filtering (Cline excludes :free, OpenRouter excludes cline/)
Now CLI model list matches webview with :1m variants and proper filtering.
* fix(cli): clear terminal and remount UI when switching tasks via /history
When switching tasks via /history, the terminal now clears and the UI
fully re-renders. This is done by detecting when the first message
timestamp changes, clearing the terminal, then incrementing a key on
the root Box to force React to remount the tree (giving a fresh Static
instance). Mirrors how App.tsx handles terminal resize with resizeKey.
* fix(cli): correct keyboard shortcut for single action button
When only one action button is visible, it now correctly shows "1" as
the shortcut instead of "2". Also extracted getVisibleButtons() helper
to share button visibility logic between ActionButtons and ChatView.
* Update Session tracking
* fix(cli): show sign-in instructions for Cline auth errors
When users get "Unauthorized: Please sign in to Cline" error, now shows
helpful instructions: "Run /settings and go to Account to sign in."
* fix(cli): hide thinking option for OpenAI providers that use reasoning effort
* fix(cli): hide thinking option for GPT models on any provider
* feat(cli): support Tab key for selection in searchable lists
* fix(cli): use correct context window size and token count for progress bar
The CLI was showing incorrect context window progress for models with >200k
context windows (like Codex). Two issues:
1. Used cumulative token totals instead of last request tokens
2. Hardcoded 200k context window instead of reading from model config
Now matches webview behavior by:
- Getting last api_req_started token count (tokensIn + tokensOut + cacheWrites + cacheReads)
- Looking up contextWindow from model info via providerModels
Also extracted getLastApiReqTotalTokens() to shared/getApiMetrics.ts to avoid
code duplication between CLI and webview.
* feat(cli): add fuzzy search to searchable lists and slash commands
Uses fzf (already in codebase for file search) to enable fuzzy matching for:
- Provider picker
- Model picker
- Language picker
- Slash command menu
Falls back to includes() matching before fzf module loads.
* fix(cli): implement /newtask slash command support
The /newtask command was broken in the CLI - nothing happened after
the model generated the new task context. Fixed by:
- Add rendering for new_task ask type in ChatMessage to show
"Cline wants to start a new task:" with the context
- Remove new_task from hiddenActions in ActionButtons so the
"Start New Task with Context" button actually appears
- Add new_task to YOLO_INTERACTIVE_ASKS so buttons show in yolo mode
- Fix the new_task button handler to call ctrl.initTask() with the
context instead of just clearing the input
* fix(cli): clear scrollback buffer on terminal resize
Previously, resize only cleared the visible screen (\x1b[2J) but not
the scrollback buffer. This left duplicate artifacts visible when
scrolling up after resize. Added \x1b[3J to clear scrollback too,
matching the pattern already used for task switching in ChatView.
* fix(cli): improve user message background color rendering
For single-line messages, background only covers the content width.
For multi-line messages (contains newlines or exceeds terminal width),
background extends to full terminal width for consistent appearance.
Both use paddingX={1} for proper spacing.
* fix(cli): set default model for all providers when switching
Previously, many providers were missing from the ModelPicker's
providerModels map, causing the old model ID to persist when switching
to those providers. Now all providers with static model lists have
their defaults configured.
* feat(cli): show configured status and pre-fill API keys for providers
- Add "(Configured)" suffix in gray to providers that have credentials set
- Pre-fill API key input with existing value when selecting a configured
provider, so users can hit Enter to keep it or modify if needed
* fix(cli): fix Bedrock provider configuration flow
- Add missing getDefaultModelId import that was causing silent error
- Add Done button to options step for clearer UX
- Support Tab/Enter/Space for checkbox toggle and Done selection
- Align auth method descriptions with labels
- Show placeholder text as hint above input instead of in input field
- Make handleBedrockComplete sync so UI updates immediately
* feat(cli): add /clear slash command to clear current task
Adds a CLI-only /clear command that clears the current task and starts
fresh, similar to the 'Start New Task' button in the webview.
- Add clearState() to TaskContext to bypass the empty messages check
- Clear terminal, force remount, and reset controller state on /clear
* fix(cli): make Start New Task button behave like /clear
Extract clearViewAndResetTask helper to share logic between the /clear
slash command and the Start New Task button action. Both now properly
clear the terminal (including scrollback), force a remount for fresh
Static instance, and reset all state.
* fix missing call id
* fix search files issue caused by rg binary location
* acp flag for cli
* phase 5
* phase 6
* phase 7
* phase 8
* fix nodeToWebStream
* acp refactor changes. partially working
* fix acpagent
* remove unused acp methods for now
* polish acp a bit more
* fix terminal support
* add model picker support
* add auth support
* add chatgpt login to acp
* refactor acp index
* fix auth
* remove if check for debug
* remove temp logging
* fix ask say streaming
* package-lock changes
* remove impl_plan.md
* add some tests to verify that acp mode conforms to acp spec. (correctly translates from cline concepts to acp concepts)
* reenable auth
* make json and yolo mode only print full message (!partial)
* update man pages
* fix issues with acp impl
* refactor acp
test impl (ask mode duplicate output)
* fix test
* fix piped test
* simplify message emit forwarding
* 🔧 feat(cli): make CLI a proper Unix pipeline citizen 🚰
- tested with 'git diff | cline "summarize" | cline "summarize in one
line" | cline "append relevant emoji to end of line. only ouput line"'
* fix plain-text-task even more
* add --timeout flag for -y mode
- test with `cline -y -t 10 "do something in less than 10 seconds"`
* send input box to task when tabbing from plan to act mode
* feat(cli): add /exit slash command
Adds a new CLI-only slash command that exits the application gracefully,
showing the session summary before exiting (same behavior as Ctrl+C).
* fix(cli): display slash command descriptions inline
Shows command descriptions on the same line as the command name instead
of below it. Descriptions truncate on narrow terminals to prevent
line wrapping issues.
* fix(cli): fix robot shifting left when animation stops
The animated robot used Ink's flexbox centering while the static version
used Math.floor() for manual padding. Math.floor rounds down, causing
a 1-character offset. Changed to Math.round() to match Ink's centering.
* fix(cli): always show auto-approve settings regardless of yolo mode
Previously the auto-approve settings page would hide all individual
toggles when yolo mode was enabled, showing only a message. Now it
always shows the full settings list so the UI is consistent.
* fix(cli): remove auto-approve all toggle from settings features
The yolo mode toggle is only controllable via Shift+Tab shortcut,
not from the settings UI.
* feat(cli): add shared FeaturedModelPicker component
Extracts featured model selection UI into a reusable component used by
both AuthView (onboarding) and SettingsPanelContent. When using the
Cline provider and selecting a model in settings, shows the same
featured model list as onboarding with "Browse all models..." option.
* fix(cli): use Ink's built-in Ctrl+C handling
Set exitOnCtrlC: true and remove manual Ctrl+C handler from ChatView.
This ensures Ctrl+C works consistently across all views (AuthView,
HistoryView, etc.) without needing handlers in each one.
* chore(cli): update free models list
- Add MoonshotAI Kimi K2.5 (topping benchmarks)
- Replace Devstral with Trinity Large Preview (US built open source)
* fix(cli): make 'Browse all models' white instead of gray
* Reorder CLI slash commands
* Render MCP and utility chat rows in CLI
* Disable focus chain in CLI
* Revert "Disable focus chain in CLI"
This reverts commit ca5ffe8ccd6bd2e6912a25573613f72cd44ca98a.
* Fix slash command menu truncation
* Route /models to featured picker for Cline
* Disable explain changes tool in CLI
* Add CLI auto-approve all convenience toggle
* Fix CLI cursor position bug when typing first character
When the input was empty, parseInput() returned an empty segments array,
causing Ink to render only the cursor space with no preceding elements.
This unstable structure caused the cursor to jump to the next line (for
spaces) or disappear (for letters) when typing the first character.
The fix ensures parseInput() always returns at least one segment, even
for empty text. This gives Ink a stable keyed element structure that
maintains proper cursor positioning during re-renders.
* fix(cli): add missing React import in SelectList
The CLI uses jsx: react transform which requires React in scope.
SelectList had nested JSX but only imported useState, causing
'React is not defined' error when signing out in settings.
* Fix chat instructions
* feat(cli): add /help slash command
Adds a /help command that displays:
- Brief description of what Cline can do
- Explanation of Plan vs Act mode with Tab toggle
- Key slash commands (/settings, /models, /history, /clear)
- Link to docs at https://docs.cline.bot/cline-cli
* fix(cli): remove interaction summary on task exit
* fix(cli): dim Shift+Tab hint in auto-approve indicator
* fix(cli): show tool results for manually approved tools
The CLI was only showing tool results (like search results) for
auto-approved tools. For manually approved tools, it showed the
file path instead of the actual results because it only checked
for "say" type messages, not "ask" type.
Now shows toolInfo.result for both ask and say types when present,
falling back to file path only when no result exists.
* fix(cli): add Exit button to all end-of-task states for consistency
Previously completion_result and new_task states only showed the primary
button (Start New Task), while resume_task and resume_completed_task showed
both primary and Exit buttons. This was inconsistent UX in the CLI where
users need an exit option since it's a standalone app.
Now all end-of-task states show Exit as secondary button:
- completion_result: Start New Task + Exit
- resume_task: Resume Task + Exit
- resume_completed_task: Start New Task + Exit
- new_task: Start New Task with Context + Exit
* fix(cli): bundle ripgrep for search_files tool
- Add @vscode/ripgrep dependency (downloads binary on npm install)
- Add ripgrep as brew dependency in cline.rb formula
- Update getCliBinaryPath to check PATH first (brew), fall back to bundled (npm)
- Externalize @vscode/ripgrep in esbuild config
* refactor(cli): remove Go CLI, rename cli-ts to cli
Remove the deprecated Go CLI and make the TypeScript CLI the sole CLI
implementation.
Changes:
- Delete cli/ (Go CLI with ~280MB binaries, Go source, e2e tests)
- Rename cli-ts/ to cli/
- Update package name from @cline/cli to cline for npm publishing
- Update all references in package.json scripts, workflows, configs
- Remove Go-specific scripts (build-cli.sh, build-go-proto.mjs, etc.)
- Add comprehensive development docs to cli/README.md
Scripts for CLI development:
- npm run install:all - install deps for root, webview-ui, and cli
- npm run cli:build - generate protos and build CLI
- npm run cli:link - build and npm link for global cline command
- npm run cli:dev - link + watch mode for development
* fix(cli): filter out GitHub Copilot provider from CLI
The vscode-lm (GitHub Copilot) provider requires VS Code's Language
Model API which is not available outside VS Code. Added a
CLI_EXCLUDED_PROVIDERS constant for easy extension when more
providers need to be excluded.
See ENG-1490 for tracking OAuth-based Copilot support.
* feat(cli): make Kimi K2.5 a free model
Add moonshotai/kimi-k2.5 to the free models list so users see $0 cost.
* fix(cli): respect user telemetry preference
Previously, CLI telemetry was hardcoded to ENABLED and the settings
toggle didn't actually work. Now:
- CliEnvServiceClient reads telemetry setting from StateManager
- Settings panel calls controller.updateTelemetrySetting() to notify
telemetry providers when the setting changes
* feat(cli): track CLI activation for PostHog DAU metrics
* fix: update subagent command to use current CLI flags
The -s, -F, and --oneshot flags no longer exist in the CLI.
Updated to use --json and -y which are the current equivalents.
* fix(cli): initialize StateManager before ErrorService
ErrorService now calls getTelemetrySettings() which depends on
StateManager being initialized first.
* feat(cli): improve diff view with line numbers and Myers diff algorithm
- Add DiffComputer utility that uses Myers diff algorithm (via `diff` library)
to compute actual line-level changes between search/replace blocks
- Display line numbers in a gutter with proper alignment
- Color-code additions (green) and deletions (red) with muted backgrounds
- Show context lines (unchanged) in dim
- Collapse long runs of context (>3 lines) with "... X unchanged lines ..."
- Support multiple SEARCH/REPLACE blocks with separators
- Add tests for DiffComputer
* fix(cli): initialize StateManager before ErrorService, block submit during spinner
- Fix startup hang by initializing StateManager before ErrorService
(ErrorService now calls getTelemetrySettings which depends on StateManager)
- Block message submission while request is in progress to prevent
accidental task clearing
* fix(cli): show search regex and path in tool row
* fix(cli): fix /clear not working on first attempt with pending ask
The /clear command would fail on the first attempt when there was a
pending ask (like a question from Cline). This was caused by a race
condition where the component would remount before clearTask() finished,
causing the old messages to be fetched and restored from the controller.
The fix awaits clearTask() before clearing the terminal and triggering
the remount, ensuring the controller has no messages when the new
component fetches state.
* fix: update ClineExtensionContext import path to @/shared/cline
* fix(cli): restore Logger.error in file-search.ts
* fix: restore StateManager.ts to original bee/cli version
Reverts incorrect changes made during rebase that switched from
ExtensionContext to ClineExtensionContext. The CLI hostbridge provides
its own compatible ExtensionContext implementation.
* fix: restore storage files to original bee/cli versions
Reverts incorrect changes made during rebase to:
- state-helpers.ts (import path)
- ClineFileStorage.ts (sync->async rewrite was wrong)
- ClineSecretStorage.ts (minor change)
* fix: restore cli/src/index.ts - Logger.subscribe not setOutput
* fix(cli): use providers.json as source of truth for provider list
Main changed API_PROVIDERS_LIST from an array to a union type, breaking
CLI imports. Updated CLI components to use providers.json directly
(same pattern as webview) rather than importing from api.ts.
Changes:
- biome.jsonc: removed obsolete cli-ts exclusion (renamed to cli)
- AuthView.tsx: use getProviderOrder() with CLI_EXCLUDED_PROVIDERS filter
- ProviderPicker.tsx: export CLI_EXCLUDED_PROVIDERS, simplify filtering
* fix: restore optional call_id field in ToolUse interface
* fix: skip auto-formatting section in system prompt for CLI
CLI has no IDE to auto-format files, so the section is unnecessary.
Previously had CLI-specific text, now just omits it entirely.
* fix: revert editing_files.ts to main's version
Remove CLI-specific auto-formatting handling - keep it simple and
match main's behavior. The auto-formatting section is included for
all environments.
* Revert "fix: revert editing_files.ts to main's version"
This reverts commit
|
||
|
|
3b6e42f0ce |
feat(skills): Make skills always enabled and remove feature toggle setting (#8955)
* feat(skills): Make skills always enabled and remove feature toggle setting - Remove skillsEnabled from state-keys.ts USER_SETTINGS_FIELDS - Remove Skills checkbox from FeatureSettingsSection.tsx - Remove skillsEnabled handling from updateSettings.ts - Mark skills_enabled as reserved in both Settings and UpdateSettingsRequest proto messages - Remove conditional in task/index.ts to always discover skills - Remove skillsEnabled from ExtensionStateContext.tsx default state - Remove skillsEnabled from ExtensionMessage.ts interface - Remove skillsEnabled from controller/index.ts state building - Always show skills tab in ClineRulesToggleModal.tsx - Remove experimental note from docs/features/skills.mdx Follows the same pattern as hooks removal (PR #8777). * fix: Show error message when skill creation fails Display error to user instead of silently logging when creating a workspace skill fails (e.g., when no workspace folder is open). |
||
|
|
e018199fef |
Fix: LiteLLM thinking configuration not showing for models (#8342) (#8592)
* Fix: LiteLLM thinking configuration not showing for models (#8342) * fix: add supportsReasoning to LiteLLM proto serialization The model ID key fix alone wasn't sufficient - supportsReasoning was being lost during the proto serialization cycle when saving/loading model info. This adds the field to all relevant conversion functions. --------- Co-authored-by: ClineXDiego <diego@cline.bot> Co-authored-by: Robin Newhouse <robin@cline.bot> |
||
|
|
7adfcabfa0 |
feat(cli): add Vercel AI Gateway + Cline API key auth (#8917)
Add two new CLI auth providers for headless setups and map their configuration fields. Fix auth menu/provider status to use the workspace-backed auth instance so the configured provider displays correctly. |
||
|
|
e243376a39 |
feat: add MCP prompts support (#8066)
* feat: add MCP prompts support Implement support for MCP prompts as defined in the MCP spec (2025-06-18): - Add McpPrompt and McpPromptArgument types to shared types - Update proto definitions with prompt messages - Update McpHub to fetch prompts list and get individual prompts - Add prompts to system prompt component for AI awareness - Add McpPromptRow UI component for displaying prompts - Update ServerRow with Prompts tab showing available prompts - Add slash command integration (/mcp:<server>:<prompt>) - Update regex patterns to support colons in command names MCP prompts are user-controlled templates that can be invoked via slash commands to inject contextual messages into the conversation. * style: alphabetize imports in mcp-server-conversion.ts Reorder imports to follow project convention of alphabetical ordering. * feat: add MCP prompts to slash command autocomplete Wire up mcpServers to SlashCommandMenu so MCP prompt commands appear in the autocomplete dropdown with their own "MCP Prompts" section. * test: add unit tests for MCP prompt slash commands - Add webview slash-commands.test.ts testing getMcpPromptCommands, getMatchingSlashCommands, and validateSlashCommand with MCP servers - Add backend slash-commands tests for formatMcpPromptResponse and parseSlashCommands MCP handling - Export formatMcpPromptResponse for testability - Add "mcp_prompt" to telemetry captureSlashCommandUsed types * test: update snapshots and fix backend tests for MCP prompts - Update system prompt snapshots to include MCP prompts section - Remove backend tests requiring StateManager initialization (tests for unknown server, no fetcher, fetcher errors) - Core MCP prompt functionality is covered by remaining tests * fix: change test status to valid 'connecting' value * chore: remove commented debug line from prompts fetching 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use Logger instead of console.error for lint compliance * fix: wire up mcpPromptFetcher callback to parseSlashCommands The MCP prompt slash commands were not working because the mcpPromptFetcher callback was never passed to parseSlashCommands. This adds the callback that wraps mcpHub.getPrompt() to actually fetch and inject prompt content when using /mcp:server:prompt. * fix: resolve MCP prompts keyboard navigation and edge cases - Add mcpServers param to keyboard handler's getMatchingSlashCommands calls to fix arrow key navigation and Enter/Tab selection for MCP prompts - Add null check for connection.client in McpHub.getPrompt() - Add debug logging when MCP prompt fetch returns null - Fix regex in shouldShowSlashCommandsMenu to include colons for MCP format * chore: add changeset for MCP prompts feature --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Robin Newhouse <robin@cline.bot> |
||
|
|
47031cea25 |
feat: add debugLog RPC for host bridge logging (#8841)
* feat: add appendOutputLog RPC for host bridge logging Add new appendOutputLog RPC endpoint to EnvService proto definition and refactor VSCode output channel creation to use a dedicated factory function. This enables structured logging through the host bridge service instead of direct Logger calls. * rename appendOutputLog to debugLog and add subscriber pattern - Rename `appendOutputLog` RPC to `debugLog` with documentation - Refactor Logger to use subscriber pattern instead of single output - Update HostProvider to use env.debugLog directly for logging - Remove redundant logger callback from setupHostProvider * feat: add multi-subscriber support for Logger output - Rename Logger.setOutput to Logger.subscribe to better reflect behavior - Subscribe both output channel and debug logger to receive log messages - Enable logging to multiple destinations simultaneously * update mock |
||
|
|
4d6f908fbd |
fix: add null check when filtering tools by type in Responses API providers (#8837)
Users reported seeing this error with the OpenAI Codex provider:
{"message":"Cannot read properties of undefined (reading 'type')","modelId":"gpt-5.2-codex"}
The issue occurs when filtering tools before sending to the Responses API.
The filter accessed .type without checking if the tool element was defined:
tools.filter((tool) => tool.type === "function")
If the tools array contains any undefined elements, this throws. Fixed by
adding optional chaining:
tools.filter((tool) => tool?.type === "function")
Applied the same fix to all three providers using the Responses API:
- openai-codex.ts (ChatGPT Plus/Pro subscriptions)
- openai-native.ts (OpenAI API with Responses format)
- oca.ts (OpenAI-compatible API with Responses format)
|
||
|
|
c093ca1760 |
refactor: replace console with Logger service (#8741)
* chore: add grit rule to enforce Logger service over console calls Add a new Grit linting rule that detects direct console method usage (log, debug, error, warn, info) and prompts developers to use the Logger service instead for consistent logging practices. The rule is configured in biome.jsonc to apply to most source files while excluding test files, webview-ui, evals, standalone, e2e tests, and scripts where direct console usage may be acceptable. * support variadic args * wip: migrate console to Logger * migrate rest of console logger * Switch to Logger * Migrations * shared * use shared * revert format change * Update tests to stub Logger instead of console * verbose in dev mode |
||
|
|
5052220195 |
feat(hooks): Make hooks always enabled and remove its feature setting. [CLINE-1179] (#8777)
* feat(hooks): Standardize on calling getHooksEnabledSafe(). * feat(hooks): Hard-code getHookEnabledSafe() to return true unless on Windows. * feat(hooks): Remove hooks setting from the CLI. * feat(hooks): Remove hooks toggle from the Feature Settings UI. * feat(hooks): Remove hooksEnabled toggles from settings/task APIs. * feat(hooks): Stop using hooksEnabled setting. * feat(hooks): npm run changeset * feat(hooks): Simplify getHooksEnabledSafe() function signature. * feat(hooks): Remove hooks setting migration. feat(hooks): Remove hooksEnabled from updateSettingsCli() conversion. feat(hooks): Use 'reserved' for removed fields in UpdateSettingsRequest protobuf. |
||
|
|
abf3081e56 |
Rules: Wire up conditional rules functionality [ENG-1470] (#8669)
* feat(rules): Write technical design / implementation plan doc. * update frontmatter plan * feat(rules): Initial implementation based on plan doc. * feat(rules): Add tool-call path harvesting for path-scoped Cline Rules. * chore(rules): exclude internal paths-frontmatter plan doc from PR * fix(rules): use latest user message for paths frontmatter context * feat(rules): Implement conditional_rules_applied say type. * feat(rules): changes as per Cline's code review feedback * feat(rules): npm run changeset * feat(rules): Changes as per ellipsis-dev feedback. * feat(rules): Changes as per code review feedback (i.e. don't bloat the task context). * feat(rules): Fix failing unit tests. |
||
|
|
b2634d2276 |
feat: add OpenAI Codex provider for ChatGPT Plus/Pro subscriptions (#8664)
* feat: add OpenAI Codex provider for ChatGPT Plus/Pro subscriptions Add a new provider that allows users with ChatGPT Plus or Pro subscriptions to use GPT-5 models directly through Cline without needing an API key. Key features: - OAuth authentication via OpenAI (PKCE flow) - Routes requests to chatgpt.com/backend-api/codex/responses - Subscription-based pricing (no per-token costs) - Models: gpt-5.2-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5.2 New files: - src/integrations/openai-codex/oauth.ts: OAuth manager with PKCE, token storage/refresh - src/core/api/providers/openai-codex.ts: API handler for Codex backend - src/core/controller/account/openAiCodexSignIn.ts: Sign-in RPC handler - src/core/controller/account/openAiCodexSignOut.ts: Sign-out RPC handler - webview-ui/src/components/settings/providers/OpenAiCodexProvider.tsx: Settings UI * fix: force native tool calling for Responses API providers Providers using OpenAI's Responses API (openai-codex, some openai-native models) require native tool calling. XML tools don't work with these APIs, causing duplicate tool calls and malformed arguments. Changes: - Add openai-codex to isNextGenModelProvider() list so native variant matchers recognize it - Force enableNativeToolCalls=true when model uses ApiFormat.OPENAI_RESPONSES, regardless of user setting - Document Responses API provider requirements in CLAUDE.md * chore: rename OpenAI Codex provider label to ChatGPT Codex Subscription * fix: use shared fetch wrapper for proxy support in OpenAI Codex provider * revert: remove CLAUDE.md changes from this PR * fix: restore .clinerules/general.md to match main * chore: rename provider label to OpenAI Codex (ChatGPT Plus/Pro) * chore: add network.md reference to clinerules * feat: show VS Code notifications for OpenAI Codex OAuth success/failure |
||
|
|
7885c75a4f |
feat: add git worktree view (#8308)
* feat: add git worktree management UI
Adds a worktrees view accessible from the navbar that allows users to:
- View all existing worktrees with their branch and path info
- Create new worktrees from local/remote branches or new branches
- Switch between worktrees (opens folder in VS Code)
- Delete worktrees with confirmation
Implementation includes:
- New proto definitions for worktree service RPCs
- Controller handlers for CRUD operations
- Git worktree utility functions
- WorktreesView React component with full UI
- Navbar integration with worktree button
* feat: enhance worktree creation error handling in WorktreesView
Adds error state management for worktree creation in the WorktreesView component. Introduces a new state variable to capture and display error messages when worktree creation fails, improving user feedback during the process.
* feat: add worktree defaults retrieval to WorktreeService and UI
Introduces a new RPC method `getWorktreeDefaults` to fetch suggested defaults for branch names and paths when creating new worktrees. Updates the WorktreesView component to utilize this method, enhancing the user experience by auto-generating branch names and paths. Additionally, integrates tooltips for improved UI interactions and adds a close button to the worktree creation modal.
* feat: implement .worktreeinclude file management in WorktreeService
Adds new RPC methods to the WorktreeService for managing .worktreeinclude files, including retrieving the status of the file and creating it with specified content. Updates the WorktreesView component to handle the creation and status checking of .worktreeinclude, enhancing user experience by automating file management for worktrees. Additionally, modifies the UI to reflect these changes, including updated tooltips and improved error handling.
* feat: add checkout branch functionality to WorktreeService and UI
Introduces a new RPC method `checkoutBranch` to the WorktreeService for switching branches within the current worktree. Updates the WorktreesView component to support this functionality, enhancing user experience by allowing seamless branch switching. Additionally, refines the UI layout for better responsiveness and improves loading/error state handling.
* feat: reposition New Worktree button for improved UI layout
Moves the New Worktree button to a fixed position at the bottom of the WorktreesView component, enhancing accessibility and user experience. The button is now styled to occupy the full width, ensuring better visibility and interaction within the UI.
* feat: update documentation links in WorktreesView component
Modifies the documentation links in the WorktreesView component to point to the correct feature sections, ensuring users have access to accurate resources. Additionally, adds the "features/worktrees" entry in the documentation JSON for better organization.
* feat: add worktree merging functionality and UI enhancements
Introduces a new feature for merging worktrees, allowing users to merge changes from a worktree's branch into the main branch with options to delete the worktree post-merge. Updates the WorktreesView component to include a merge modal, handling merge conflicts, and integrating with the WorktreeService for seamless operations. Additionally, enhances documentation to reflect these changes.
* refactor: replace exec with simple-git for worktree operations
Refactors the worktree management code to utilize the simple-git library instead of child_process exec for executing Git commands. This change enhances code readability and maintainability by providing a more streamlined interface for Git operations in the checkoutBranch, mergeWorktree, and git-worktree modules. Additionally, it improves error handling and reduces the complexity of command execution.
* feat: enhance mergeWorktree functionality to check target worktree status
Implements a check for uncommitted changes in the target worktree before merging, ensuring that users are informed if the target branch has uncommitted changes. This update improves error handling and user feedback during the merge process by verifying the state of both the source and target worktrees. Additionally, it integrates the listWorktrees utility to identify the correct worktree for the target branch.
* refactor: optimize worktree loading to prevent UI flickering
Enhances the loadWorktrees function in WorktreesView to only update the component's state if the fetched data has changed, reducing unnecessary re-renders and preventing flickering. This change improves the user experience by providing a smoother interface when loading worktrees. Additionally, simplifies the polling mechanism for updates.
* feat: update merge conflict display and task creation flow in WorktreesView
Enhances the merge conflict notification by providing a clearer list of conflicting files, including a summary for additional files. Additionally, modifies the task creation flow to close the worktrees view upon task creation, improving user experience during the merge process.
* fix: improve tooltip functionality and clean up WorktreesView component
Enhances the tooltip for the current worktree indicator to provide additional context for users. Additionally, removes the display of commit hashes in the worktree list to streamline the UI, improving overall clarity and user experience.
* feat: add symlink functionality for .worktreeinclude to sync with .gitignore
Introduces a new section in the documentation explaining how to create a symlink from .gitignore to .worktreeinclude. This allows users to automatically sync patterns between the two files, simplifying worktree setup. Additionally, includes a note for users needing different patterns to create a regular .worktreeinclude file instead.
* fix: simplify merge request button in WorktreesView component
Removes the "Merge" text from the button label in the WorktreesView component, streamlining the user interface. This change focuses on clarity by allowing the button to simply prompt users to "Ask Cline to Resolve," enhancing the overall user experience during merge conflict resolution.
* Update docs/features/worktrees.mdx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update webview-ui/src/components/worktrees/WorktreesView.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixes docs not rendering
* perf(worktree): optimize file copying for .worktreeinclude
Address performance feedback - worktree creation was taking ~20 seconds
for large directories like node_modules (50k+ files).
Optimizations:
- Use native `cp -r` for entire directories (10-20x faster)
- Parallelize file copying with batches of 100 (5-10x faster)
- Parallelize directory traversal with Promise.all
The old implementation copied files sequentially which caused the
bottleneck. Now directories like node_modules are copied using the
system's native cp command, and individual files are copied in
parallel batches.
Also adds unit tests for the worktree-include module.
* feat(worktree): add multi-root and subfolder workspace warnings
- Detect and warn when multiple workspace folders are open (worktrees not supported in multi-root)
- Detect and warn when a subfolder of a git repo is open instead of the root, showing the actual git root path
- Fix UI overflow on narrow widths by using min-h-32 instead of fixed h-32
* refactor(worktree): auto-fill defaults when create modal opens
* fix(worktree): add cursor pointer to create modal close button
* feat(worktree): add clear buttons to create modal input fields
* feat(worktree): add quick launch button on home page
Extract CreateWorktreeModal as reusable component with openAfterCreate prop.
Add New Worktree Window button to WelcomeSection that creates a worktree
and opens it in a new window. Shows current worktree branch and path info.
* refactor(ui): polish home screen and worktree modal
- Update HistoryPreview: rename to Recent, move View All to header with chevron
- Remove logo pop-in animation from HomeHeader
- Remove info icon tooltip from What can I do for you heading
- Remove fade-in animations from WelcomeSection
- Move worktree button below history preview with more spacing
- Update CreateWorktreeModal copy and reduce spacing between fields
- Add Current label with branch icon above path in worktree info
* feat(worktree): auto-open Cline sidebar on worktree launch
When switching to a worktree via quick launch button, automatically
open the Cline sidebar in the new/reloaded window. Uses globalState
to pass the target path between windows, reading directly from
context.globalState at startup to bypass StateManager cache timing.
* fix(worktree): improve quick launch UX
- Make current branch/path clickable to navigate to worktrees view
- Fix word wrap for long branch names and paths
- Show .worktreeinclude warning in create modal with learn more link
* chore: ignore .worktrees directory and CLAUDE.local.md
* feat(worktree): add delete confirmation modal
* refactor(ui): remove worktrees button from title bar
* fix(worktree): improve .worktreeinclude warning styling
* docs(worktrees): update for new UI features
- Document quick launch button on home screen
- Update getting started to reflect auto-filled defaults
- Document Cline auto-open behavior when switching worktrees
- Update delete section with confirmation modal details
- Add limitations section for multi-root and subfolder workspaces
* fix(worktree): rename Main badge to Primary
* feat(worktree): add worktrees button to sidebar header
Adds a git-branch icon button to the Cline sidebar header for quick
access to the Worktrees view. Also updates docs to mention this new
entry point and adds a typical workflow section.
* fix(worktree): UI polish
- Change New Worktree Window tooltip to show above button instead of below
- Add break-all to branch names for long branch text wrapping
- Simplify merge button tooltip and modal title (remove 'and close')
* fix(e2e): update tests to match renamed Recent header
* fix(worktree): improve non-git repo message
* fix(worktree): wrap path instead of truncating
* fix(e2e): update auth test to use aria-label instead of removed class
* fix(worktree): add option to delete branch when deleting worktree
- Update delete modal copy to accurately describe behavior
- Add checkbox to optionally delete branch (unchecked by default)
- Show warning about unpushed commits when checkbox is checked
- Update proto, handler, and UI to support delete_branch option
* fix: remove worktrees menu button from sidebar
Remove the worktrees button from the VS Code extension menu bar.
* fix(ui): temporarily disable new worktree button, add tooltip to current worktree
Comment out "New Worktree Window" button until worktree creation is stable.
Add tooltip to current worktree info with "View and manage git worktrees.
Great for running parallel Cline tasks."
* feat: add worktree-exp feature flag for worktrees feature
Put the worktrees feature behind a feature flag (worktree-exp) that
defaults to false. When enabled, users can toggle the feature in
settings. The home page worktree section only shows when both the
feature flag is enabled and the user setting is on.
* feat: add telemetry for worktree feature usage
Track worktree feature engagement:
- worktree.view_opened: when users open worktrees view (with source)
- worktree.created: when worktrees are created (with total count)
- worktree.merge_attempted: when merge is attempted (success/conflicts)
* fix: replace DangerButton with Button variant="danger"
DangerButton component was removed from main. Use the standard
Button component with variant="danger" instead.
* Fix merge conflict artifacts
* Revert "fix(e2e): increase getSidebar timeout for slower macOS CI runners"
This reverts commit
|
||
|
|
df1d33c751 |
feat: add auto-generation of state proto (#8555)
* feat: add auto-generation of state proto Add lint-staged hook to automatically regenerate proto/cline/state.proto when src/shared/storage/state-keys.ts changes. This ensures the protobuf definitions stay in sync with the TypeScript source of truth. Changes: - Add generate-state-proto.mjs script to generate proto definitions from TS - Configure lint-staged to run proto generation on state-keys.ts changes - Update state.proto with regenerated field numbers and new OpenTelemetry fields This automation prevents drift between TypeScript state definitions and their protobuf representations, reducing manual maintenance burden. * PlanActMode * feat(proto): change thinking budget token fields to int64 Change plan_mode_thinking_budget_tokens and act_mode_thinking_budget_tokens from int32 to int64 to support larger token budget values. Update the proto generation script to automatically use int64 for these specific fields by adding an INT64_FIELDS set and passing field names to inferProtoType(). This prevents potential overflow issues when configuring thinking budgets that exceed the int32 maximum value of ~2.1 billion tokens. * feat(proto): change auto_condense_threshold type from int32 to double Changed the auto_condense_threshold field type from int32 to double in the state.proto file to support decimal values. Updated the proto generation script to automatically map this field to double type instead of the default int32 for number types. * add documentation for proto field generation Add inline documentation to state.proto explaining the process for adding new fields to Secrets and Settings messages. Also add a note in state-keys.ts clarifying that the generate-state-proto.mjs script runs automatically on commit. Remove redundant sync comment from API_HANDLER_SETTINGS_FIELDS. * fix comment format * open_ai_headers |
||
|
|
4032e51e8d |
Allow admins and owners to override remote config (#8304)
* Add field to settings and handle side effects * Avoid fetching and applying remote config if it's disabled * Refactor and apply configured org settings when the user opted out of another one he owns * Refactor Fix check * Add toggle to the account view * Add changeset * Fix can disable remote config * clean canDisableRemoteConfig |
||
|
|
050773ac31 |
feat(skills): add Skills tab UI for managing skill toggles (#8396)
Oh. Add a new Skills tab to the Rules/Workflows modal that allows users to view and toggle skills (global and workspace), create new skills from templates, and delete existing skills. The tab only appears when the skillsEnabled setting is on. Changes: - Add proto definitions for skills operations (refreshSkills, toggleSkill, createSkillFile, deleteSkillFile) with corresponding message types - Add globalSkillsToggles to Settings and localSkillsToggles to LocalState - Implement controller handlers for skills operations - Add skills toggle state management to ExtensionStateContext - Add Skills tab component to ClineRulesToggleModal - Update RuleRow and NewRuleRow components to support skill type - Implement lazy discovery for skills in UseSkillToolHandler (skills are discovered on-demand at execution time and filtered by toggle state) - Use Tailwind CSS classes for styling consistency |
||
|
|
46aa66ed9d |
feat: add skillsEnabled setting to gate Skills feature (#8395)
Add experimental "Enable Skills" toggle in Settings > Features that controls whether the Skills system is active. When disabled (default), no directory scanning occurs and the use_skill tool is not exposed. - Add skillsEnabled to Settings interface and ExtensionState - Add skills_enabled to proto definitions - Gate skill discovery in Task.attemptApiRequest() - Add UI toggle in FeatureSettingsSection |
||
|
|
c6f4584f7d |
fix: prevent unwanted editor focus stealing (#8038)
* control focus stealing via new param to focusChatInput * pass preserveEditorFocus to getContextForCommand to fix e2e test |
||
|
|
a17b31070f |
feat(vercel-ai-gateway): add model refresh and improve reasoning support (#8398)
* feat(vercel-ai-gateway): add model refresh and reasoning support - Add refreshVercelAiGatewayModelsRpc to ModelsService for fetching models - Fix model ID/info references to use Vercel-specific parameters instead of OpenRouter - Add reasoning effort and Gemini thinking level configuration support - Skip reasoning content for incompatible models (devstral, grok-4) - Improve model selection UI with keyboard navigation (ArrowUp/Down/Enter) - Add model refresh functionality to settings interface This enables proper model discovery and improves reasoning capabilities for Vercel AI Gateway provider, while fixing incorrect parameter references that were using OpenRouter naming conventions. * refactor * refactor * refactor * refactor * refactor |
||
|
|
bb20f60f1d |
Adding Responses API support to the Oracle Code Assist(OCA) Provider (#8388)
* Made changes for adding responses suppport * removed some logs * Made change to disallow format * Added logging for cline * Fixed codex prompts * Made changes to make cline work * Removed extra changes * Added reasoning effort also to chat completions * Made changes to fix issues with cline based on bugbash * removed extra console.log statements * Added extra changes to make reasoningEffortOptions working properly(outputs undefined) * Made changes to code that make it cleaner * created utility function for responses * Removed extra console.log lines * Fixed issues with tests not working * Added changeset * Update webview-ui/src/components/settings/providers/OcaModelPicker.tsx Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * removing openai-native changes * Switched to using api format instead of supportsResponsesApi and supportChatApi --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> |
||
|
|
5660b2513f |
add cline pr review cline workflow action (#8284)
cline pr-review bot initial cline permission system Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
6f8ed7aa56 |
Display simple indicator for hooks in the CLI [ENG-1376] (#8269)
* feat(hooks): Initial implementation of UI output in the CLI * feat(hooks): Display hooks UI output in the CLI nicely * feat(hooks): Improvements to the hooks CLI implementation * feat(hooks): Changes as per Cline's code review of hooks CLI PR * feat(hooks): Make comments more concise and to the point * feat(hooks): Minor improvements to code complexity * feat(cli): polish hook status output (headers, paths, spacing) - Align hook headings with ToolRenderer-style language - Prefer workspace-relative paths for hook scripts - Document hook_output_stream suppression + future grouping - Add unit tests for rendering + path formatting * feat(hooks): Isolate hook handlers and harden path handling - Move hook-specific SAY handling into say_handlers_hooks.go - Use os.UserHomeDir + filepath.Rel for more portable hook path shortening - Document why hooks render from state stream (ordering/reordering) - Standardize on filepath for filesystem paths in cline-clients - Avoid silently ignoring os.Getwd() errors in dev fallback resolution * feat(hooks): Add pendingToolInfo to hook status in the CLI * feat(hooks): Fix verbose output to CLI * feat(hooks): Add changeset commit. * feat(hooks): code review feedback - make paths OS-agnostic * feat(hooks): code review feedback - use strings.Builder * feat(hooks): code review feedback - no need to normalize say type * feat(hooks): code review feedback - define HookOutputStreamMeta type * feat(hooks): code review feedback - remove dynamic import * feat(hooks): code review feedback - turn repetitive logic into helper function and make say type names reflect proto field names * feat(hooks): code review feedback - remove unrelated changes * feat(hooks): prepend hook script path with repo name |