mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
86ea252b56cf48d9ef277f6b87ee492fc079d29c
4690
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
86ea252b56 |
chore: bump cli version to 2.0.2 and update dependencies
- Update CLI version from 2.0.1 to 2.0.2 - Update @types/node to 18.19.130 - Update minimatch to 10.1.2 - Update path-scurry to 2.0.1 - Remove unused dependencies (@asamuzakjp/css-color, @csstools/*, rrweb-cssom) - Clean up peer dependency configurations |
||
|
|
28c2697ae1 |
Refresh LiteLLM models (#9070)
* Refresh LiteLLM models * return promise * Disable button while loading * Loading * Await the fetch |
||
|
|
cf01317885 |
fix(cli): await applyProviderConfig in handleProviderSelect
applyProviderConfig is async and for Cline/OpenRouter providers it awaits fetching model data before setting state. When switching to an already-configured provider (Cline, OCA), the call wasn't awaited, so refreshModelIds() ran before the model ID was set in state, causing the model to not update to the default. |
||
|
|
7d5eebe192 | Bump CLI version from 2.0.2 to 2.0.3 | ||
|
|
91a3636356 |
refactor(cli): add applyBedrockConfig utility, simplify saveConfiguration
- Added applyBedrockConfig to provider-config.ts for AWS Bedrock setup - AuthView saveConfiguration now uses applyProviderConfig/applyBedrockConfig - SettingsPanelContent handleBedrockComplete now uses applyBedrockConfig - Removed duplicate Bedrock config building code from both components - Cleaned up unused imports # Conflicts: # cli/src/components/SettingsPanelContent.tsx |
||
|
|
5d02eea9cd |
refactor(cli): use applyProviderConfig in ImportView, remove legacy apiProvider
- ImportView now uses applyProviderConfig instead of manual config building - Removed legacy apiProvider field from AuthView, ImportView, SettingsPanelContent (it's unused - runtime reads actModeApiProvider/planModeApiProvider instead) |
||
|
|
45b2786dbf |
fix(cli): ensure welcomeViewCompleted is flushed after applyProviderConfig
applyProviderConfig calls flushPendingState internally, so any state set after it needs its own flush. Added explicit flush after setting welcomeViewCompleted in OCA and OpenAI Codex auth success handlers. |
||
|
|
4924192b64 |
refactor(cli): use applyProviderConfig for auth success handlers
Simplifies OCA, Cline, and OpenAI Codex auth success handlers in AuthView to use the shared applyProviderConfig utility instead of manually constructing provider config objects. This removes duplicated logic around mode-specific provider keys and model ID keys that applyProviderConfig already handles. |
||
|
|
28c548b3ee |
simplify package-npm script (#9067)
cli/package.json is already formatted correctly for publishing Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
9b9035ea4a |
feat: add authentication support to oca provider in CLI (#9059)
* feat: add authentication support to oca provider in CLI This change integrates the OcaAuthService into the AuthView component. It adds a new 'oca_auth' step to the authentication flow, allowing users to select 'oca' as a provider and initiate the authentication request via OcaAuthService. * fix(cli): add subscription to OCA auth status updates The OCA auth flow was missing the subscription mechanism to know when browser auth completes. Without this, the CLI would spin indefinitely after opening the browser. Added a useEffect that subscribes to OcaAuthService.subscribeToAuthStatusUpdate when in oca_auth step. When auth succeeds (user.uid present), saves the provider config and transitions to success. * fix(cli): add OCA auth support to SettingsPanelContent AuthView only handles onboarding. Users also need to be able to switch to OCA provider from the settings panel after initial setup. Added: - handleOcaLogin callback to start OAuth flow - useEffect subscription to OCA auth status updates - Case in handleProviderSelect for "oca" provider - Escape key handling to cancel OCA auth - UI for "Waiting for OCA sign-in..." state - isWaitingForOcaAuth to input disabled check * refactor(cli): extract OCA auth logic into useOcaAuth hook Reduces code duplication between AuthView and SettingsPanelContent by extracting the OCA auth subscription and state management into a reusable hook. The hook handles: - Starting the OAuth flow (initialize + createAuthRequest) - Subscribing to auth status updates - Tracking waiting state - Calling onSuccess callback when auth completes - Exposing isAuthenticated for checking existing sessions Both components now use the hook with their own onSuccess handlers for component-specific state updates. --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> |
||
|
|
e4b39aeb22 |
fix: apply models cache retrieval across model refresh functions (#8976)
* fix: apply models cache retrieval across model refresh functions This change introduces a unified caching mechanism for model information retrieved from various API providers (Groq, OpenRouter, Vercel). Each service now first checks if the data is available in the shared StateManager's cache before making an API request. This improves performance by leveraging cached results and reduces redundant network calls when refreshing models multiple times. The cache is stored in memory for quick access during subsequent calls within a single execution context. Changes made: 1. Added import of `StateManager` to each relevant model refresh file. 2. Implemented initial cache check logic at the beginning of each function. 3. Updated error handling and logging consistency across services. 4. Added storage back into StateManager's cache after successful API retrieval for Groq, Vercel AI Gateway only (OpenRouter update already handled). * promises * add vercelModels * feat: add 1-hour TTL to model cache Adds a time-to-live mechanism to the model info cache so that: - Duplicate fetches are still prevented within a reasonable window - Users can get new models after 1 hour without restarting VS Code Changes: - Add MODEL_CACHE_TTL_MS constant (1 hour) - Update cache structure to include timestamp alongside data - Update setModelsCache to store timestamp with data - Update getModelsCache to check TTL and invalidate expired cache - Update getModelInfo to also respect TTL --------- Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com> |
||
|
|
f7c54e964f |
cli version bump (#9064)
Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
d116ac5dcf |
feat: render markdown table in UI (#9056)
* feat: display markdown table in UI Simplify the handlePartialBlock method in AttemptCompletionHandler by: - Removing conditional logic for command vs no-command cases - Always displaying partial result if present - Deferring command handling to the final execution step This fixes an issue where attempt completion response doesn't get streamed to the UI during partial result. Also replaced react-remark with react-markdown and remark-gfm dependencies to MarkdownBlock in UI for enhanced markdown rendering support with GitHub Flavored Markdown features, including displaying table. * add changeset * Update src/core/task/tools/handlers/AttemptCompletionHandler.ts handlePartialBlock hard-codes the partial flag to true when calling uiHelpers.say(...). For consistency with other tool handlers and to avoid incorrect behavior if this method is ever invoked with a non-partial block, pass block.partial through instead. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Robin Newhouse <robin@cline.bot> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
ac22d5d81a |
chore: add CLI type checking and caching to ci workflow (#9049)
* chore: add CLI type checking and caching to ci workflow - Added a new cache step for CLI dependencies in the GitHub Actions test workflow to improve build performance. - Included a step to install CLI dependencies using `npm ci`. - Updated the `ci:check-all` script in `package.json` to include CLI type checking. - Added a `cli:typecheck` script to handle type checking within the CLI directory. * Fix type and import issues for cli * Includes CI tests in test workflow * use npx npm-run-all * update ci:check-all * ci: skip npm ci steps on cache hit in test workflow Update the test workflow to conditionally run npm installation steps only when a cache hit is not found. This optimization reduces CI execution time by avoiding redundant dependency installations when the node_modules are already restored from cache. * ci: update cache keys and add dependency verification in test workflow Updated the cache keys for root, webview-ui, cli, and testing-platform dependencies by adding a version prefix (v1). This ensures a clean cache state and helps avoid potential corruption or mismatch issues. Additionally, added a verification step in the test job to log cache hit status and check for the presence of key dependencies like biome and globby. This helps diagnose issues where the cache might be restored but dependencies are not correctly available for subsequent steps. * update Verify and fix root dependencies * fix type check script * add isSettingsKey check * update settingskey set * apply feedback * npx * feat: flashing dot for streaming chat messages in CI (#9054) Introduce an ink-spinner to the DotRow component to provide visual feedback when messages are being streamed. This improves the CLI user experience by clearly indicating that a tool call or message is currently in progress. - Add `flashing` prop to `DotRow` component - Replace static dot with `toggle8` spinner when `flashing` is true - Update `ChatMessage` to pass `flashing` state based on `isStreaming` and `partial` message properties Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> * ci: simplify dependency caching using built-in npm cache Replace manual actions/cache steps with setup-node's built-in npm caching feature across all workflow jobs. This change: - Removes redundant cache action steps for root, webview-ui, cli, and testing-platform dependencies - Uses setup-node's native `cache: 'npm'` option with `cache-dependency-path` to handle multiple package-lock.json files - Eliminates conditional installation steps based on cache hits - Reduces workflow complexity and maintenance overhead while maintaining caching functionality The built-in caching provides the same performance benefits with less configuration and better integration with the Node.js setup action. --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> |
||
|
|
b57aefb5a1 |
Cli 2.0 docs (#9060)
* docs: restructure CLI reference to web-friendly format Replace embedded man page format with structured markdown sections for better readability. Simplify description, reorganize commands and options into clear categories, and update Next Steps navigation cards. * Add ACP editor integrations documentation (#9036) * Add ACP editor integrations documentation with JetBrains and Neovim video demos * Add Model Orchestration documentation with --config and --thinking flags - Document --config and --thinking flags in CLI reference - Create new model-orchestration.mdx sample page - Add patterns for CI/CD review, task phase optimization, and multi-model consensus - Link to production GitHub Actions workflow - Update samples overview with new card - Update docs navigation * Add Worktree Workflows documentation with --cwd flag - Document --cwd flag in CLI reference - Create comprehensive worktree-workflows.mdx sample page - Add patterns for parallel execution and cross-worktree piping - Include real-world examples and best practices - Add CLI section to features/worktrees.mdx for discoverability - Update samples overview and navigation - Cross-link between CLI and VS Code worktree docs * Remove broken image references from worktrees documentation - Remove worktrees-overview.png Frame (image not available) - Remove worktrees-merge.png Frame (image not available) - Documentation remains fully functional with comprehensive text explanations * Remove accidentally committed local test file - Delete src/test/verify-platformio-mcp.ts which was causing CI failures - File contained TypeScript errors and hardcoded local paths - Was meant for local testing only, should not have been committed * Add native JetBrains plugin recommendation to ACP docs - Add prominent Note recommending native JetBrains plugin - Link directly to JetBrains installation section - Position ACP setup as an alternative approach - Keep all existing ACP content and video * docs: refine CLI reference formatting and ACP title Improve CLI reference readability with clearer headings and descriptions, and clarify the ACP editor integration page title for better discovery.docs: refine CLI reference formatting and ACP title Improve CLI reference readability with clearer headings and descriptions, and clarify the ACP editor integration page title for better discovery. * Fix CLI 2.0 syntax in model-orchestration.mdx - Updated issue analysis pipeline to use shell variables for passing context - Added explanatory note about why direct piping doesn't work - Corrected example to complete each phase before starting the next - All examples now use proper CLI 2.0 syntax * Completely rewrite cli-reference.mdx with accurate CLI 2.0 information - Removed all outdated CLI 1.0 content (instance management, Cline Core architecture, gRPC references) - Added accurate CLI 2.0 commands: task, history, config, auth, update, version, dev - Corrected all command flags and options based on actual man page - Added proper examples for all commands - Included environment variables documentation (CLINE_DIR, CLINE_COMMAND_PERMISSIONS) - Added shell completion instructions - Removed incorrect three-layer architecture description - All content now matches cli/man/cline.1.md source of truth Fixes outdated documentation issue mentioned in PR#9036 * Fix MDX syntax error in cli-reference.mdx - Replace angle bracket URLs with proper markdown links - MDX parser was interpreting <https://...> as invalid HTML tags - Now uses [url](url) format which is proper MDX syntax Fixes deployment validation error --------- Co-authored-by: Renee Huang <renee@cline.bot> * docs: enhance interactive mode documentation with structured settings overview * docs: restructure and improve CLI reference documentation - Reorganize command structure with clearer global options section - Add mode behavior table explaining interactive vs plain text modes - Improve option descriptions with consistent formatting - Add horizontal rules between sections for better readability - Document timeout option and environment variables more clearly - Add Tips & Tricks section for common usage patterns - Update frontmatter description to reflect content changes * docs: improve ACP editor integrations page with editor descriptions - Update page title to be more concise ("ACP: Editor Integrations") - Remove redundant H1 header that duplicated the title - Add introductory descriptions for JetBrains, Neovim, and Zed sections - Rename "Zed Editor" section to just "Zed" for consistency * docs: expand CLI reference with modes of operation and agent behavior * Update docs/cline-cli/cli-reference-deprecated.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Tony Loehr <turingxo@gmail.com> Co-authored-by: Renee Huang <renee@cline.bot> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
11da3ee89e |
add windows to cli publish package json (#9063)
Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
e4e63912dd |
feat: add API key support for Cline provider (#9057)
* feat: add API key support for Cline provider Add support for authenticating with Cline provider using an API key as an alternative to account-based authentication. This change allows users to configure Cline with either a direct API key or through the existing account authentication flow. Changes: - Add `clineApiKey` option to ClineHandler and pass through API configuration - Update authentication check to accept either API key or account ID - Modify provider configuration detection to check both auth methods - Remove automatic Cline auth flow trigger on provider selection - Add `clineApiKey` to provider-to-API-key mapping for proper key management This provides more flexibility in authentication methods while maintaining backward compatibility with existing account-based authentication. * promise all --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> |
||
|
|
f17d523b2e |
Fix OTEL endpoints (#9050)
* Fix OTEL endpoints * refactor |
||
|
|
edbba8b7f6 |
return empty mcp config if cline_mcp_settings.json doesn't exist or is empty file (#9061)
Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
7b09999fdf | add man page to cli/package.json (#9044) | ||
|
|
01240744a2 |
Remove reliance on the extensionEnabled flag and verify the source of truth (#9046)
* Remove reliance on the extensionEnabled flag and verify the source of truth * Fix tests * Add try block * Fix telemetrySetting checks |
||
|
|
2944416758 |
feat(cli): show contextual hints when in settings subpages
When navigating to subpages within the Settings panel (model picker, provider picker, language picker, etc.), the Panel header now shows "Esc to go back" instead of "Esc to close" and hides the arrow key navigation hint since tabs cannot be switched while in a subpage. |
||
|
|
b5b503dd50 | adding in org and member tracking (#9037) | ||
|
|
a24ab0c6b8 |
fix(telemetry): capture event when user opts out of telemetry (#9041)
* fix(telemetry): capture event when user opts out of telemetry Previously, when a user disabled telemetry, we immediately called optOut() on providers without first capturing an event to record this decision. This meant we had no visibility into opt-out rates. This change captures a "user.opt_out" event using captureRequired (which bypasses the opt-out check) right before disabling telemetry. * also track when users opt back in to telemetry This allows seeing each user's final telemetry state: - user.opt_out = they disabled telemetry - user.telemetry_enabled = they re-enabled after opting out - neither = telemetry on by default, never changed * refactor: only capture telemetry events on explicit user action Move event capture from updateTelemetryState() to the controller's updateTelemetrySetting() method. This ensures we only capture events when the user explicitly toggles the setting, not on webview init sync. The previous approach would re-capture opt_out events on every VS Code restart for users who had previously opted out, because the provider state resets to enabled on startup. Now we compare the previous vs new setting in the controller (which has access to persisted state) and only capture when there's an actual change. * use distinct event name for explicit user opt-in The constructor already fires user.telemetry_enabled on startup. Add user.opt_in for when user explicitly re-enables telemetry, to distinguish from the initialization event. |
||
|
|
3bc6cc6a92 | Bump CLI package version | ||
|
|
bd7f2a29d6 |
error cline if someone piped in empty text (#9038)
Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
b1c5f0b811 |
cli/fix - quick auth should exit process with no interactive ui (#9035)
- this will support ci/cd use case Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
ac30e49e0b |
chore(deps): update package-lock.json peer dependency flags (#9040)
Update peer dependency markers in package-lock.json to correctly reflect the dependency relationships. This change moves the `peer: true` flag to packages that are actual peer dependencies (like react, vite, typescript, @opentelemetry/api, @modelcontextprotocol/sdk) and removes it from optional dependencies and platform-specific packages (like @rollup/* platform binaries, @csstools/* packages, and tldts-related packages). This ensures proper dependency resolution and installation behavior without changing actual package versions or dependencies. |
||
|
|
d86f5ed4c9 |
fix(cli): fetch fresh org data from server when switching organizations
The CLI was reading organization data from authService.getUserOrganizations() which returns cached data. This caused org switches to not persist across CLI restarts. Now uses accountService.fetchUserOrganizationsRPC() to fetch fresh data from /api/v1/users/me, matching how the webview's getUserOrganizations RPC works. |
||
|
|
336d31f95f | docs(cli): simplify README title to just 'Cline' | ||
|
|
fc9c413058 |
fix(cli): add Home/End key support (fn+left/right on macOS)
Ink's useInput hook parses Home/End keys but doesn't expose them (sets input='' and doesn't add key.home/key.end to the key object). Changes: - Add useHomeEndKeys hook to intercept Home/End from raw stdin - Create shared keyboard.ts constants for escape sequences - Remove dead Home/End code from useTextInput (was never firing) - Add numbered priority documentation to ChatView's useInput handler |
||
|
|
e0282826fc |
fix(cli): match 'Act mode' without 'to' prefix for (Tab) hint
The markdown parser splits 'toggle to **Act mode**' into separate chunks, so the previous regex requiring 'to Act Mode' as a complete phrase would fail to match when Act mode was inside bold/italic formatting. |
||
|
|
bf83b816e2 |
fix(cli): support auto-updates for nightly versions (#9034)
* fix(cli): support auto-updates for nightly versions Previously, the auto-update logic only checked npm's "latest" tag, so users on nightly builds (2.0.0-nightly.X) would never receive nightly updates. The update commands also hardcoded @latest. Changes: - Detect nightly versions by checking for "-nightly." in version string - Query npm "nightly" tag when current version is a nightly build - Use @nightly in update commands for nightly users - Fix compareVersions() to properly parse and compare nightly timestamps (previously it would produce NaN when parsing "2.0.0-nightly.X") * fix: tighten nightly version regex to require valid semver format |
||
|
|
24033613cd |
fix(cli): correct provider model ID key generation for anthropic and separate providers (#9033)
Two bugs fixed: 1. getProviderModelIdKey() returned invalid key for Anthropic because ProviderKeyMap used "apiModelId" (lowercase "a"), producing "actModeapiModelId" instead of "actModeApiModelId". Removed anthropic from the map so it falls through to the generic key as intended. 2. Settings panel derived both act/plan model keys from actModeApiProvider. If plan and act providers differ, plan model reads/writes targeted wrong keys. Now uses planModeApiProvider for plan model key lookups. |
||
|
|
f76cfbce48 |
remove cache hit check for npm publish workflows (#9032)
Co-authored-by: Max Paulus 🥪 <max@cline.bot> |
||
|
|
2a63545224 |
fix npm-nightly github workflow (#9031)
- use scripts/package-npm.mjs script and remove other unnecessary steps in the cli build process Co-authored-by: Max Paulus 🥪 <max@cline.bot> Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> |
||
|
|
5308dedc81 |
fix: updating script documentation and removing unnecessary continue on error (#8769)
* updating script documentation and removing unnecessary continue on error * test update * removing comment * removing unnecessary line --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> |
||
|
|
4c699da00b |
fix(ci): always run npm ci to prevent stale cache issues (#9030)
* fix(ci): always run npm ci to prevent stale cache issues ## Summary - Remove conditional `npm ci` execution that skipped install on cache hit - Fixes CI failures when cached `node_modules` becomes stale or incomplete (e.g., missing `npm-run-all`) ## Test plan - [ ] Verify CI passes on this PR - [ ] Re-run workflow to confirm it works with fresh and cached states * Add a step to install vsce globally in the e2e workflow, * Add `GITHUB_TOKEN` env var to `npm ci` steps to prevent rate limiting when `@vscode/ripgrep` downloads binaries from GitHub * removed the conditional checks on the npm ci steps * add GITHUB_TOKEN to the npm ci step. |
||
|
|
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
|
||
|
|
24dcd9ea7c | Fix metrics typo (#9023) | ||
|
|
3cded47baf |
feat(moonshot): add cache token tracking to usage metrics (#9016)
* feat(moonshot): add cache token tracking to usage metrics - Add cacheWriteTokens and cacheReadTokens fields to usage reporting - Subtract cached tokens from inputTokens to reflect actual prompt tokens - Read cached_tokens from Moonshot API response for accurate tracking * fixing |
||
|
|
7000bb1894 |
OTEL-compatible endpoints should end with v1/metrics and v1/logs (#8985)
* OTEL-compatible endpoints should end with v1/metrics and v1/logs * refactor |
||
|
|
0de65457c1 | fix: always write files as UTF-8 to prevent emoji corruption (#8991) | ||
|
|
c83b404764 |
Fix: decimal input crash in OpenAI Compatible price fields (#8129) (#8590)
* Fix: decimal input crash in OpenAI Compatible price fields (#8129) * refactor: use type-safe parsePrice helper for decimal input handling Replace the `as any` type bypass with a proper parsePrice utility function that safely handles edge cases (empty string, lone dot, invalid input) while maintaining type safety. Adds unit tests for the helper. --------- Co-authored-by: Robin Newhouse <robin@cline.bot> |
||
|
|
96b48182c6 |
fix: build complete handlers when updating the api config (#8984)
* fix: build complete handlers when upadting the api config * Add changeset * Refactor * refactor * Empty |
||
|
|
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). |
||
|
|
adb3759738 |
feat: fix missing OpenAI Subscription Provider Issue (#8986)
* feat: fix missing OpenAI Subscription Provider Issue * feat: changeset |
||
|
|
215fc36d17 |
feat(chat): use relative font size for thinking row content (#8987)
* feat(chat): use relative font size for thinking row content Replace fixed text-xs class with dynamic font sizing based on VSCode's font-size variable. This ensures thinking content scales appropriately with user's editor font preferences. * fixing |
||
|
|
53bd0ecd8d | Version bump to pick up rotated TELEMETRY_SERVICE_API_KEY (#8983) | ||
|
|
9e851a8f7c |
Add commit hash to PR review comments (#8982)
Include the HEAD commit hash at the top of PR review comments so readers know which commit was reviewed. Also log commit info in the GitHub Actions output for debugging. |