Compare commits

...

2173 Commits

Author SHA1 Message Date
abeatrix fe53ab914e feat(rules): add safe-dir check and refactor external toggles
- Skip processing rules when workspace is in home or Desktop via
  isSafeDirectory; return empty toggles for unsafe dirs to avoid
  unintended rule loading from sensitive locations
- Refactor external rules sync using typed configs (RuleSource/RuleConfig)
  and a syncRuleSource helper; combine Cursor rules from both sources
- Switch to node: imports (fs/promises, path, os) for clarity

This improves safety, code clarity, and maintainability while preserving
expected behavior for valid workspaces.
2025-11-13 03:39:37 -08:00
Saoud Rizwan 3881e3d2d5 Add AGENTS.md support 2025-11-12 21:34:07 -08:00
Saoud Rizwan ba6e1671cb fix: delete agents.md 2025-11-12 21:32:12 -08:00
Saoud Rizwan f215cadf2a docs: add support for AGENTS.md standard in Cline rules documentation 2025-11-12 21:12:04 -08:00
Saoud Rizwan e591c2af54 Update font size for documentation link in ClineRulesToggleModal component 2025-11-12 20:57:06 -08:00
Saoud Rizwan 899d334f0d Update webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 20:52:29 -08:00
Saoud Rizwan 859bf80ecb Update webview-ui/src/components/cline-rules/RuleRow.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 20:51:50 -08:00
Saoud Rizwan 01736423ac feat: add AGENTS.md support 2025-11-12 20:41:48 -08:00
Bee 8ca2706cca chore: cleanup leftover code from anthropic provider (#7434)
Follow up from https://github.com/cline/cline/pull/7399

- Only add the redacted reasoning block when a reasoningSignature is present,
  instead of checking message length. This aligns with Claude extended thinking
  requirements and prevents unsignatured reasoning content from being sent.
- Remove leftover thinkingDeltaAccumulator from the Anthropic provider.
2025-11-12 18:33:13 -08:00
Bee e747d211e6 refactor: standardize reasoning yield types across providers [ENG-1226] (#7399)
* refactor(api): standardize reasoning yield types across providers

- Unify reasoning output format in Anthropic, Cline, and Minimax handlers
- Change "ant_thinking" and "reasoning_details" to "reasoning" type
- Add signature and redacted_data properties for consistency
- Wrap message_start cases in braces for scoping
- Consolidate yields to reduce redundancy and improve maintainability

* VercelAIGatewayHandler

* feat: add model information tracking to tasks and messages

Add modelId field to TaskResponse and TaskItem proto messages, and introduce ClineModelInfo message type to track provider and model IDs throughout the system. Update API transform functions to use ClineStorageMessage types and refactor message handling to support model information tracking.

This enables better tracking and auditing of which AI models are used for specific tasks and messages, improving observability and allowing for model-specific analytics.

* clean up protos

* remove console log

* minimax

* use new interface

* clean up
2025-11-12 15:33:48 -08:00
Bee 19aa81a1cc fix(dev): add back CLINE_ENVIRONMENT_OVERRIDE support (#7427)
CLINE_ENVIRONMENT_OVERRIDE was removed in https://github.com/cline/cline/pull/6621 accidentally. This PR adds it back:
Prioritize CLINE_ENVIRONMENT_OVERRIDE over CLINE_ENVIRONMENT when
setting the runtime environment at module load.
This enables temporary/test-specific environment selection without
modifying the base env var. Existing behavior is unchanged when the
override is not set. Updated inline comment for clarity.
2025-11-12 14:58:53 -08:00
Bee f5f3654966 refactor: Extract model info into method in WriteToFileToolHandler (#7420)
* refactor: Extract provider and model info into method in WriteToFileToolHandler

- Introduce private getModelInfo method to centralize extraction of providerId and modelId
- Replace duplicated telemetry extraction logic across multiple function calls
- Update telemetry service invocations to use the new method's return values for consistency and reduced code duplication/script>

* Update src/core/task/tools/handlers/WriteToFileToolHandler.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-11-12 14:40:51 -08:00
Bee 344b99988b feat: add native tool calls tracking to task events (#7429)
Add `isNativeToolCall` parameter to telemetry service to track when
assistant turns and provider API errors occur with native tool calls
enabled. This enables better analytics and debugging of native tool
call behavior across conversation turns.
2025-11-12 13:03:41 -08:00
Bee 7d3c39bcdb feat: make baseUrl dynamic by removing static field (#7428)
Remove the static _baseUrl field and replace all references with direct calls to ClineEnv.config().apiBaseUrl. This ensures the base URL updates correctly when configuration changes, fixing an issue where the URL remained static even after configuration updates.
2025-11-12 12:38:13 -08:00
celestial-vault 33c1692f8a add remotely configured rules and workflows (#7411)
* add remotely configured rules and workflows

* fix toggles state not being passes to webview on updates; minor format updates

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-11-12 10:33:19 -08:00
Bee 3be3ffae4c fix: prevent duplicate tool results by adding existence check (#7419)
* fix: prevent duplicate tool results by adding existence check

Add a check in ToolResultUtils to skip adding a tool result if one already exists for the same tool_use_id, logging a warning to avoid redundant entries in userMessageContent and maintain message integrity. Introduces Logger import for warning output.

* add changeset
2025-11-11 21:37:11 -08:00
murkvin 87c6708fbe fix: restore commit msg generation functionality to command palette (#7417)
Co-authored-by: Kevin Murphy <murkvin@amazon.com>
Co-authored-by: CandiedUniverse <132302818+candieduniverse@users.noreply.github.com>
2025-11-11 17:36:30 -08:00
Juan Pablo Flores b296706bc0 docs: add guidance for handling strings with quotes in JSON payloads for hooks (#7396)
* docs: add guidance for handling strings with quotes in JSON payloads in hooks documentation

- Introduced a new section on using jq's --arg flag for proper escaping of unescaped quote characters in JSON output.
- Provided a code example demonstrating how to handle complex strings or nested JSON structures safely.

This update enhances the documentation by clarifying how to manage JSON payloads effectively within hooks.

* docs: clarify context modification behavior in hooks documentation

- Updated the explanation regarding context modifications and their effect on AI decisions.
- Emphasized the need to return `cancel: true` in PreToolUse hooks to block actions effectively.

This change enhances the clarity of the documentation, ensuring users understand how to implement immediate effects in their hooks.

---------

Co-authored-by: CandiedUniverse <132302818+candieduniverse@users.noreply.github.com>
2025-11-11 15:24:52 -08:00
canvrno 7fdc82ae23 Renamed Nous proto config strings (#7416)
* Renamed Nous proto config strings

* Revert "feat: migrate terminal execution mode default to background" (#7412)

This reverts commit 0b7393f50e.

---------

Co-authored-by: Ara <arafat.da.khan@gmail.com>
2025-11-11 14:42:13 -08:00
Bee 246ed87350 fix: ensure temperature parameter is explicitly converted to number (#7397)
* fix(openai): ensure temperature parameter is explicitly converted to number

Changed temperature assignment to explicitly check for undefined and convert
the value to Number type before use. This prevents potential type issues when
the temperature configuration is provided as a string or other non-number type,
ensuring consistent numeric handling for the OpenAI API.

* set 0 tempature to undefined

* add changeset
2025-11-11 14:10:21 -08:00
Ara a28465151f Revert "feat: migrate terminal execution mode default to background" (#7412)
This reverts commit 0b7393f50e.
2025-11-11 12:53:18 -08:00
Saoud Rizwan f1967bc3a1 feat: Add OAuth 2.1 authentication support for remote MCP servers (#7376) 2025-11-11 12:35:11 -08:00
Bee ccc83d6728 feat: add feature flag to toggle between new and old onboarding view [ENG-1224] (#7410)
* feat: add feature flag to toggle between new and old onboarding view

Add a new feature flag `show_onboarding_flow` that controls whether users see the new onboarding experience or the legacy welcome view. This enables A/B testing and gradual rollout of the new onboarding flow, and gives me better control when model list has changed and the onboarding model list is outdated.

Changes:
- Add ONBOARDING feature flag (enabled by default)
- Add showOnboardingFlow to ExtensionState and proto definitions
- Add getOnboardingEnabled() method to FeatureFlagsService
- Update App component to conditionally render OnboardingView or WelcomeView based on flag
- Extend ExtensionStateContext with showOnboardingFlow state management

This allows for controlled rollout and easy rollback if issues arise with the new onboarding experience.

* default true

* default to false unless e2e test

* showOnboardingFlow default to off
2025-11-11 11:33:42 -08:00
Szymon Stasik c151d719c8 fix: Handle tool_use blocks in Claude Code backward compatibility path (#7394)
- Transform tool_use content blocks to tool_calls format
- Map Anthropic tool_use structure to ApiStreamToolCallsChunk
- Fixes 'tool_use is not supported yet' error
- Resolves 'Current ask promise was ignored' downstream errors
2025-11-11 11:13:22 -08:00
canvrno cc25833963 Add Nous Research provider (#7141)
* Added Nous Research provider

* Fix casing on import
2025-11-11 10:43:12 -08:00
canvrno 2ef3b7cf0f Nous Hermes-4 family system prompt (#7142)
* Hermes-4 model family system prompt

* Update src/core/prompts/system-prompt/variants/hermes/overrides.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-11-11 10:14:24 -08:00
Mike Mikula 19d7bd5198 fix: Fix XML entity escaping in model content processor (#7385)
* refactor(task): replace HTML escaping logic with model-specific content fixes

Updated ExecuteCommandToolHandler and WriteToFileToolHandler to utilize a new utility function, applyModelContentFixes, for handling model-specific quirks. This change centralizes the logic for fixing escaped characters and invalid characters, improving maintainability and consistency across command execution and file writing processes. Additionally, introduced ModelContentProcessor to encapsulate the new content processing logic.

* test(ModelContentProcessor): add comprehensive unit tests for applyModelContentFixes

Introduced a new test suite for the ModelContentProcessor, covering various scenarios for the applyModelContentFixes function. Tests include model ID detection, file type handling, orchestration logic, and integration with real-world use cases, ensuring robust validation of content processing for different model types and file formats.

* fix: add changeset for XML escaping bug fix

* refactor(ModelContentProcessor): make modelId parameter optional in applyModelContentFixes

Updated the applyModelContentFixes function to accept an optional modelId parameter, allowing for fixes to be applied even when the model ID is not provided. Adjusted related logic in ExecuteCommandToolHandler and added a test case to verify this new behavior.
2025-11-11 07:26:27 -08:00
Ara 121066f938 feat: migrate terminal execution mode default to background (#7368)
- Add one-time migration to set all users to backgroundExec mode
- Change default terminal execution mode from vscodeTerminal to backgroundExec
- Update UI labels to clarify background mode is recommended
- Add migration sentinel flag to prevent re-running

This migration improves the default user experience by using background
terminal execution, which provides a cleaner UI and better performance
compared to the interactive VSCode terminal mode. Existing users will be
automatically migrated once, while new users will get the improved default.
2025-11-10 14:06:32 -08:00
Juan Pablo Flores f9b88318ea docs(dictation): add notice on Windows support (#7059)
* docs(dictation): remove Windows support from system requirements

- Add note indicating dictation is currently unavailable on Windows
- Remove Windows FFmpeg installation instructions from the list
- Clarify that Windows support is planned for a future release

This update reflects the current state of the feature and sets proper user expectations about platform availability.

* Update docs/features/dictation.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-10 13:26:10 -08:00
Ara 1d64f64f43 Enable voice mode for linux also (#7369) 2025-11-10 12:19:41 -08:00
canvrno 766e2e6a25 Model-family specific variants for deep-planning slash command (#7337) 2025-11-10 11:23:40 -08:00
Ara 8bd7260350 Fix Standalone Terminal Background Transition Issues (#7390) 2025-11-10 11:11:16 -08:00
canvrno a1f4e8b9d4 Adjusted focus chain prompting - more guidance for models using native tool calling, consolidated prompting for other models (#7340) 2025-11-10 11:05:51 -08:00
Johnny Rice aa3e0860cd docs: add missing proto generation step in CONTRIBUTING.md (#7336)
- Add step 4 in Local Development Instructions to run npm run protos
- Add proto generation step in Extension section
- Create new npm run dev script that runs protos + watch
- Update Terminal Workflow documentation to mention npm run dev

Fixes #7335
2025-11-10 10:20:44 -08:00
Dominic Cooney 67bc9932e5 Add proxy configuration to more network fetches. (#7328) 2025-11-10 09:54:54 -08:00
Ara ba98b44504 feat(task): cancel active background command during task abort (#7363)
Add cleanup logic to cancel any active background command when aborting a task. This ensures background processes are properly terminated before the task abort completes, preventing orphaned background commands.
2025-11-07 19:13:31 -08:00
celestial-vault fdeb639f75 make field mask type a string array so that the kotlin/go protobuf libraries don't convert it to snake case (#7364) 2025-11-07 18:52:38 -08:00
Ara 76410b42b0 Removing deprecated Fireworks Models (#7268) 2025-11-07 14:34:29 -08:00
Tomás Barreiro e4e347a8a4 Add Remote Server MCPs to the remote config (#7357) 2025-11-07 23:33:07 +01:00
canvrno 59e7c2b7b9 Fix CLI quick auth issue in docker envs (#7256) 2025-11-07 14:26:39 -08:00
Ara 5371377b21 Removing Minimax M2 from free models list (#7359) 2025-11-07 14:13:19 -08:00
canvrno 5a444dc30a Hide context window usage from env details until usage reaches elevated state (ng models only) (#7345) 2025-11-07 13:46:36 -08:00
Bee 34c48264c0 fix(models): ensure thinking config has default maxBudget value (#7319)
* fix(models): ensure thinking config has default maxBudget value

- Add ANTHROPIC_MAX_THINKING_BUDGET import and use as fallback
- Check for both "include_reasoning" and "reasoning" parameters
- Set default maxBudget when thinking is supported but value not provided
- Ensures thinking models always have valid budget configuration

This prevents issues when OpenRouter API doesn't return thinking_config.maxBudget, ensuring all thinking-enabled models have a proper budget value set as it's used to determine if a model support thinking in some part of our code.

* update thinkingConfig placeholder
2025-11-07 12:52:14 -08:00
Tomás Barreiro daf14ef181 Add LiteLLM to the remote config (#7307)
* Add Google Vertex and LiteLLM to the remote config

* Add the LiteLLM models and export types
2025-11-07 20:24:27 +01:00
Bee f1bf9b3f90 feat: new onboarding flow [ENG-1128] (#7088)
* feat(auth): new onboarding UI

- Add optional `strict` parameter to `createAuthRequest()` to prevent opening new auth windows when already authenticated
- Update onboarding flow with new UI text and button labels ("Login to Cline", "I have my own key", "Ready")
- Add new onboarding data models and step configuration for improved user experience
- Update all e2e tests to reflect new button labels and authentication flow
- Remove obsolete `closeBanners` utility function
- Refactor authentication logic to support strict mode for better control over auth window behavior

This change improves the authentication UX by preventing duplicate auth windows and provides a more streamlined onboarding experience with clearer call-to-action buttons.

* Debug buttons

* Update model list

* Add search box

* improve model selection with names and improved search

- Add name field to ModelInfo interface for better model identification
- Populate model name from OpenRouter API response
- Improve model search filtering to exclude embedding models
- Add case-insensitive search for better UX
- Enhance UI with badges for model capabilities and pricing
- Update styling for better visual hierarchy and selected state
- Display model names in search results for clarity

This improves the onboarding experience by making model selection more informative and user-friendly with better search capabilities and visual feedback.

* clean up

* async onboarding

* Update langauge

* spacing

* search result info text

* update e2e test

* update badge

* style(onboarding): adjust max-width constraint placement

Move max-width constraint from parent container to content wrapper div to improve responsive layout behavior. This ensures the full width is utilized at the top level while constraining only the scrollable content area.

Changes:
- Added w-full to root container for proper width handling
- Removed max-w-lg from middle container
- Applied max-w-lg to content wrapper instead

* Update search box placeholder text

* remove unused description field

* clean up

* Fix search box reset state

* feat: add loading screen to onboarding flow

- Add loading state (step 2) during authentication process
- Simplify welcomeViewCompleted logic by removing auth service check
- Move welcomeViewCompleted state update to auth success handler
- Display loading spinner during sign-in to improve UX
- Ensure auth status update occurs in finally block for reliability

The loading screen provides visual feedback while authentication completes, preventing users from seeing incomplete UI states during the sign-in process.

* update AuthServiceMock

* capture onboarding events

* smaller badge radius

* radius-xs = 4px & add speed label

* update to MiniMax M2
2025-11-07 10:30:50 -08:00
Bee 6e20047c3e refactor(ui): simplify flexible SettingsView (#7352)
* refactor(ui): simplify SettingsView tab system

- Remove ResizeObserver-based compact mode detection and related state
- Replace dynamic CSS class constants with inline Tailwind classes using cn utility
- Remove debounce dependency and handleTabChange callback
- Simplify tab rendering logic by removing conditional compact/full mode rendering
- Clean up unused imports (debounce, useRef) and state management
- Streamline component architecture for better maintainability
- simplify ModelDescriptionMarkdown

This refactoring reduces complexity while maintaining the same visual functionality, making the code easier to understand and maintain.

* clean up
2025-11-07 10:01:14 -08:00
celestial-vault 1d4fe88bec simplify updateApiConfiguration calls (#7299)
* simplify calls to updateApiConfiguration by moving the logic around which mode to update to the RPC; change proto field name; use new calls in MoonshotProvider, and update calls in LiteLlmProvider

* remove console logs
2025-11-07 08:12:20 -08:00
Sarah Fortune 74dbbb9d6b Use staging endpoint for MCP marketplace (#7348) 2025-11-07 00:03:02 -08:00
github-actions[bot] 3073cf40be v3.36.1 Release Notes (#7317)
* changeset version bump

* Updating CHANGELOG.md format

* Update changelog format for version 3.36.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-11-06 18:54:30 -08:00
canvrno 50056768d6 Add MCP tool usage to GLM prompt (#7347)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-11-06 18:03:23 -08:00
Bee e7cd32b830 fix: function declarations tool converter for native tool calling (#7342)
* fix:  function declarations tool converter for native tool calling

- Replace crypto-based ID generation with nanoid in McpHub that is causing invalid function name issue with Gemini models
- Refactor Google tool parameter schema mapping with typed constant
- Improve parameter properties handling in toolSpecFunctionDeclarations
  - Add support for nested properties and enum values
  - Skip $schema property during parameter processing

This change fix type safety for Google Gemini function calling parameter definitions.

* disable native tool calling by default

* Always starts with a letter

* whoops

* reuse id

* fix run time package issue
2025-11-06 17:06:17 -08:00
Bee d983b451e1 fix: Remove Gemini and XAI from next-gen model providers (#7341)
Removes "gemini" and "xai" from the list of providers considered "next-gen" in `isNextGenModelProvider`.
This change prevents Cline from attempting to use native tool callings with these providers until existing issues are resolved.
2025-11-06 14:18:55 -08:00
Bee bb32aac8e7 fix: exclude grok-code from Grok-4 model family check (#7338)
Remove "grok-code" from isGrok4ModelFamily function to exclude it from the next-gen model list, disabling native tool calling for grok-code as it does not work well with the model.
2025-11-06 12:59:58 -08:00
chenxue e6d5f55fb2 fix bug (#7324) 2025-11-06 11:42:14 -08:00
Tomás Barreiro 93f60ebe5b Share provider information (#7331)
* Share provider information

* Move files

* Move files
2025-11-06 20:40:32 +01:00
Bee a3e000d5dd fix: refactor APPLY_PATCH tool [ENG-1174] (#7189)
* feat: refactor APPLY_PATCH tool

Replace separate file creation and editing tools with unified APPLY_PATCH tool for the native-gpt-5 model variant. This consolidation simplifies file operations through a single patch-based interface.

Changes:
- Replace FILE_NEW and FILE_EDIT tools with APPLY_PATCH in config for gpt-5 with native tool calling
- Disable EDITING_FILES system prompt section (no longer needed)
- Remove EDITING_FILES section from base template
- Refactor ApplyPatchHandler with improved architecture:
  - Extract patch parsing logic into PatchParser utility class
  - Extract file operations into FileProviderOperations utility
  - Extract path resolution into PathResolver utility
  - Add comprehensive error handling with DiffError types
  - Improve type safety with shared Patch types
- Add extensive test coverage for PatchParser including:
  - Edge cases (empty files, large files, unicode)
  - Error conditions (malformed patches, invalid operations)
  - Complex scenarios (multiple chunks, context matching)
- Export PATCH_MARKERS and BASH_WRAPPERS for reusability

This refactoring improves maintainability, testability, and provides a more robust patch application system for the GPT-5 model variant when native tool calling is enabled.

* Add diagnostic to result

* Update unit tests

* add feedback

* typo

* captureToolUsage

* fix test

* fix test

* Update ClineMessage

* update diff editor on stream

* revert content partial stream

* Disable Apply patch and add native gpt snap shot

* Remove delete action and make preserveEscaping conditional

* Add delete function to diff provider

* Update UI for file deletion
2025-11-05 20:10:26 -08:00
Bee 0076be531d fix: removes reasoning_details field from Anthropic and Gemini providers (#7282)
* fix: sanitize Anthropic message and removes reasoning_details field

- Extract duplicate Anthropic message formatting code into sanitizeAnthropicMessages function
- Remove code duplication between AnthropicHandler and VertexHandler
- Add support for claude-sonnet-4-5-20250929:1m model
- Remove unused MessageParam import from anthropic provider

* add changeset

* Create thinking content block for gemini
2025-11-05 20:10:09 -08:00
github-actions[bot] 9de4fc2a2f v3.36.0 Release Notes (#7271)
- Add: Hooks allow you to inject custom logic into Cline's workflow
- Add: new provider AIhubmix
- Add: Use http_proxy, https_proxy and no_proxy in JetBrains
- Fix: Oca Token Refresh logic
- Fix: issues where assistant message with empty content is added to conversation history
- Fix: bug where the checkbox shows in the model selector dropdown
- Fix: Switch from defaultUserAgentProvider to customUserAgent for Bedrock
- Fix: support for `<think>` tags for better compatibility with open-source models, and refinements to the GLM-4.6 system prompt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 18:10:09 -08:00
CandiedUniverse 8a4b87a133 feat(hooks): Improve examples in .clinerules/hooks/ directory (#7316) 2025-11-05 16:52:26 -08:00
Juan Pablo Flores 571480e3b6 Hooks docs (#7173)
* docs(features): add comprehensive hooks documentation

Add detailed documentation for the Hooks feature, including:
- Overview of hooks functionality and use cases
- Getting started guide with step-by-step setup instructions
- Hook types and lifecycle explanations
- JSON communication format and examples
- Validation and blocking capabilities
- Best practices and implementation patterns

Update docs navigation to include the new hooks documentation page
in the features section.

* docs(features): reorganize and clarify Hooks documentation

- add frontmatter description and insert demo GIF in Getting Started
- reorganize Hook Types into Task Lifecycle and Communication categories
- convert tables into dedicated sections per hook with explicit "Input Fields" examples
- add JSON input/output examples and clarify execution timing, limits, and context behavior
- remove embedded bash examples and Advanced Topics clutter; streamline troubleshooting and security warning

* Update docs/features/hooks.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: reorganize hooks documentation into four categories

Restructure the hooks documentation to improve clarity and organization:

- Change from two categories to four logical categories: Tool Execution,
  User Interaction, Task Lifecycle, and API Response
- Reorder hooks by category based on trigger points and use cases
- Add complete JSON examples with all base fields for each hook type
- Enhance descriptions with clearer use case explanations
- Improve consistency across hook documentation format

This reorganization makes it easier for developers to find the right hook
for their specific needs and understand the complete data structure they
will receive.

* docs: enhance TaskStart hook example with JSON payload handling

Replace basic "Hello World" example with practical demonstration of reading JSON input from stdin and using jq to inspect payload structure and field types. Added explanatory text to help developers understand hook input/output mechanics before building complex logic.

* Update docs/features/hooks.mdx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* comments out preCompact and taskComplete

* fix: clarify description of hook types in documentation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: CandiedUniverse <132302818+candieduniverse@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-11-05 16:50:22 -08:00
Chris Sells 5c2c264a1d initial CLI samples (#7040)
* initial CLI samples

* Add GitHub integration and root cause analysis samples to CLI documentation

* docs(cline-cli): restructure samples into nested documentation group

Convert the single samples page into a grouped navigation structure with three separate sample pages:
- Overview (main samples page)
- GitHub Issue RCA
- GitHub Integration

Add redirect from the old `/cline-cli/samples` path to the new `/cline-cli/samples/overview` location to maintain backward compatibility with existing links.

* docs: improve GitHub issue RCA sample docs with better structure and links

Reorganize documentation with source code links, move demo video to prominent position,
simplify explanations, and add tutorial references for better discoverability.

* docs: improve github-issue-rca documentation and add download instructions

- Remove redundant "Demo Video" heading from mdx documentation
- Add "Getting the Script" section to README with two options:
  - Option 1: Clone/view repository with direct link to script
  - Option 2: Direct download using curl with example commands

These changes make it easier for users to quickly access and download
the analyze-issue.sh script without needing to navigate the repository
structure, improving the overall user experience.

* docs: update GitHub Root Cause Analysis sample links and enhance README with installation instructions

* docs(samples): improve GitHub integration setup guide and add prerequisites

Enhanced the GitHub integration sample documentation with:
- Added prerequisites section listing required knowledge and resources
- Improved setup instructions with direct curl commands for downloading files
- Added prominent warning callout for editing GITORG and GITREPO variables
- Included beginner-friendly note recommending simpler sample first
- Updated documentation link to point directly to GitHub repository
- Provided two options for adding analysis script (download or copy)
- Enhanced formatting and clarity throughout the guide

These changes make the sample more accessible to new users and reduce
setup friction by providing copy-paste commands and clearer guidance.

* docs(samples): consolidate CLI samples documentation and enhance GitHub integration README with improved image formatting

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* removes bookmarks and creates padding for images

* Update image source in README for CLI sample

* Add GitHub CLI samples and update docs navigation

- Add GitHub Issue RCA sample (docs/cline-cli/samples/github-issue-rca.mdx)
- Add GitHub Actions integration sample (docs/cline-cli/samples/github-integration.mdx)
- Add samples overview page (docs/cline-cli/samples/overview.mdx)
- Update docs.json to include new CLI samples navigation entries

* docs: simplify "Getting the Script" section in GitHub Issue RCA sample

Reorder options so curl download is Option 1 and the full script view is Option 2.
Remove the clone/view-repo entry, move the chmod +x instruction into a Note
after the script accordion, and clarify the Basic Usage intro text.

* docs: tidy GitHub Integration sample — remove redundant workflow placement note, simplify script copy options, fix GitHub Action capitalization and related-samples link

* docs: remove GitHub Integration and GitHub Issue RCA sample READMEs

---------

Co-authored-by: Juan Pablo <juan@cline.bot>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-05 16:49:57 -08:00
CandiedUniverse 04549cf1e3 feat(hooks): Trim characters around JSON in hook output (#7314) 2025-11-05 15:59:56 -08:00
Bee f2a93b6201 fix(account): correct tooltip visibility logic for remote config lock (#7313)
Invert the boolean condition for TooltipContent's hidden prop to properly
show the tooltip when organization has remote configuration enabled.
Previously, the tooltip was hidden when it should be visible and vice versa.
2025-11-05 15:57:47 -08:00
CandiedUniverse 2f09b994dd feat(hooks): Fix contextModification injection into API Request (#7311) 2025-11-05 15:28:34 -08:00
Bee 8aac67bf75 feat: enable native tool call by default (#7304)
Change the default value of `nativeToolCallEnabled` from `false` to `true` in the global state initialization. This enables native tool calling functionality by default when no previous state exists, improving the out-of-box experience for users.
2025-11-05 15:23:02 -08:00
CandiedUniverse 10422dd3fc feat(hooks): Remove hooks feature flag (step 1), keeping hooks setting toggle (#7309) 2025-11-05 14:51:11 -08:00
CandiedUniverse 6191c681ce feat(hooks): Fix the missing Start New Task button after task completion (#7303) 2025-11-05 14:49:42 -08:00
CandiedUniverse 9ab7b41c24 feat(hooks): Remove debug logging to the console (#7306) 2025-11-05 14:10:19 -08:00
Saoud Rizwan bddfb93b38 fix: order of AIHubMix in API providers (#7302) 2025-11-05 12:51:18 -08:00
Bee a219eb8000 fix(settings): remove highlight function from provider search (#7300)
Remove redundant highlight import and simplify provider search results
mapping in ApiOptions component. Search results now directly map to
items without applying highlighting, reducing unnecessary dependencies
and simplifying the code.
2025-11-05 12:44:34 -08:00
Saoud Rizwan 515b4e5d6a Fix vercel gateway thinking and model list (#7196) 2025-11-05 12:43:44 -08:00
Sarah Fortune aaa3846b82 Add GCP Vertex provider to remote config schema (#7200)
* Add global rules and workflows to the remote config schema

Add a way for the admin to configure global cline rules and workflows for their users.

* Add GCP Vertex provider to remote config

Add config settings for the GCP Vertex provider
2025-11-05 12:28:08 -08:00
canvrno 8229dcfe88 Fix openai compatible auth issue in CLI (#7291) 2025-11-05 11:34:31 -08:00
Dominic Cooney b4ea1a17a5 WIP proxy patch (#7263)
Better documentation in shared/net

Better docs, wire up when running standalone.

Use esbuild to statically decide which proxying we are doing.

Add the changeset.

Add the ability to mock this fetch.
2025-11-05 11:26:12 -08:00
Nick Baumann e263c74325 Add model/provider attribution to telemetry events (#7230)
- Add provider parameter to diff edit failure events
- Add provider parameter to context summarization events
- Add mode parameter to conversation turn events
- Add model/provider parameters to focus chain completion events

Addresses review feedback by removing checkpoint telemetry changes.
Follows pattern from PR #7214 for consistent telemetry attribution.
2025-11-05 11:15:01 -08:00
nihar-oracle 08ca115c66 fix: Fixing token refresh logic for oca on startup (#7209)
* fix: Fixing token refresh logic for oca on startup

* fix: Fixing token refresh logic for oca on startup
2025-11-05 09:14:42 -08:00
Bee 68ffe20b7d feat(telemetry): add native tool call tracking (#7279) 2025-11-05 06:57:38 -08:00
TechBrewBoss 4517408537 Fixes Hicap model selector dropdown display (#7285)
* Fixes Hicap model selector dropdown display

Fixes a bug where the checkbox was showing in the model selector dropdown.

The z-index was being improperly applied to the VSCodeTextField, causing the dropdown to be obscured. This change moves the z-index styling to be applied directly to the style attribute of the VSCodeTextField component, resolving the display issue.

* Update .changeset/proud-humans-itch.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-04 23:56:12 -08:00
AJ Juaire 42c947afd4 Fix Bedrock user agent to report full SDK details (#7273)
* switch from defaultUserAgentProvider to customUserAgent for Bedrock

* update to userAgentAppId
2025-11-04 18:47:08 -08:00
Bee d4736afce2 fix(navbar): align navbar tooltip buttons with new shadcn component (#7283)
Switch Navbar actions to the shared Button component and tooptip to use the new shadcn tooltip component so the navbar render correctly and spacing matches the previous design.
2025-11-04 18:22:35 -08:00
Bee b00053ff16 fix(settings): restore Native Tool Call setting option (#7284)
Re-add the Native Tool Call checkbox setting to the FeatureSettingsSection
that was accidentally removed in PR #7126 due to merge conflicts.

The setting allows users to enable/disable native tool calling through the
API when the feature flag is enabled. The UI includes an experimental
warning and descriptive text explaining the functionality.

Changes:
- Add nativeToolCallSetting to useExtensionState destructuring
- Add conditional checkbox UI for Native Tool Call feature
- Include experimental warning and feature description
2025-11-04 18:17:49 -08:00
Bee 2ab8fcb54f fix(task): prevent empty assistant messages in conversation history (#7280)
* fix(task): prevent empty assistant messages in conversation history

Add conditional check to only append assistant content to API conversation
history when the content array is not empty. This prevents unnecessary empty
assistant messages from cluttering the conversation history and potentially
causing issues with the API.

Changes:
- Wrap addToApiConversationHistory call in length check
- Add explanatory comment for the conditional logic

* add changeset
2025-11-04 16:15:37 -08:00
celestial-vault e697c12e94 Remote config - add info banner for mcp marketplace lockdown state (#7278)
* filter mcp marketplace results based on remote config

* add info ui banner for mcp marketplace remote config state

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-11-04 13:57:59 -08:00
celestial-vault 64dcc3fc89 filter mcp marketplace results based on remote config (#7277) 2025-11-04 13:50:50 -08:00
Bee 8215d3fdb9 fix: flaky e2e test for slash commands (#7206)
* fix: flaky e2e test for slash commands

* use click

* @problems

* newtask click

* exact: false

* exact: false

* revert unrelated change
2025-11-04 12:43:29 -08:00
canvrno 59260cefab Small timeout increaase in diff.test (#7270) 2025-11-04 11:04:07 -08:00
chenxue a767f844b9 feat: add new provider AIhubmix (#7259)
* feat: add AIhubmix provider integration

- Add AIhubmix as a new provider with full API integration
- Implement AIhubmixHandler for API interactions
- Add model fetching functionality via getAihubmixModels
- Create UI components for AIhubmix configuration
- Update proto definitions and API configuration
- Add changeset for version tracking

* docs: add AIhubmix integration documentation

* fix: add plan/act mode fields for AIhubmix and Hicap providers

- Add planModeAihubmixModelId and planModeAihubmixModelInfo
- Add actModeAihubmixModelId and actModeAihubmixModelInfo
- Add planModeHicapModelId and planModeHicapModelInfo
- Add actModeHicapModelId and actModeHicapModelInfo
- Ensures model selection works correctly in both plan and act modes

* merge

* Delete AIHUBMIX_INTEGRATION.md

* fix: bot

* Update providerUtils.ts
2025-11-04 10:51:45 -08:00
canvrno bb7c3556d6 Use context-aware task manager for quick auth (#7255) 2025-11-03 21:34:52 -08:00
github-actions[bot] 8b80c337ae v3.35.1 Release Notes (#7207)
- Add: Hicap API integration as provider
- Fix: enable Add Header button in OpenAICompatibleProvider UI
- Fix: Remove orphaned tool_results after truncation and empty content field issues in native tool call
- Fix: render model description in markdown

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-11-03 20:08:34 -08:00
celestial-vault d0cac53d5b Add a field mask to the new updateApiConfiguration RPC (#7197)
* add a field mask to updateApiConfiguration and update LiteLLM provider component calls to use it

* remove console log
2025-11-03 19:43:45 -08:00
celestial-vault 8aedc90214 add configured providers to remote config to limit options (#7250) 2025-11-03 19:39:52 -08:00
celestial-vault 0c118086df fix: add explicit wait for slash commands menu in e2e test (#7063)
This fixes a flaky e2e test by adding an explicit wait for the slash
commands menu to be visible before attempting to interact with it.

Changes:
- Add data-testid to SlashCommandMenu component for test targeting
- Add waitFor() call in test to ensure menu is visible before Tab press
2025-11-03 18:10:42 -08:00
Bee 261a7dd505 fix: enable Add Header button in OpenAICompatibleProvider (#7246)
* fix: enable Add Header button in OpenAICompatibleProvider

Implement functionality for the Add Header button that was previously disabled. The button now:
- Enables when headers are not managed by remote configuration
- Creates new header entries with auto-incremented keys (header1, header2, etc.)
- Updates the API configuration state with the new header

This allows users to add custom headers to their OpenAI-compatible provider configuration unless restricted by organization settings.

* add changeset
2025-11-03 15:01:14 -08:00
canvrno 9abf2f567a Fix empty content field issue (#7247) 2025-11-03 14:57:49 -08:00
Marco Alejandro Chavez Santos 42de7c81b4 Hicap integration as new provider (#6988)
* Feat:
* add hicap as provider option
* add new variable to handle hicapApiKey
* add variable to handle hicapModelId in Plan and Act mode
* get hicap available model from Hicap Endpoint
* create hicap provider (ui)
* hicap handler

* rebase main into this branch and fixing errors

* add changeset

* fix typo with hicap api key

* resolve comments from cline team on PR

* revert some delete console logs

* HicapModelPicker changed styled components for tailwind format, remove unnecessary hicapModelId migration, refreshHicapModel use setGlobalState function

* rebase main branch
2025-11-03 14:57:23 -08:00
Saoud Rizwan 06b710f62b fix: context mentions are positioned incorrectly (#7248) 2025-11-03 14:43:52 -08:00
Ara ea9b8fe0b1 Enable Terminal Timeouts by defualt (#7171)
* Remove redundant test code that's very confusing

* feat: add vscodeTerminalExecutionMode to TaskConfig and apply timeout

Add vscodeTerminalExecutionMode parameter to TaskConfig and thread it through ToolExecutor and Task classes. Apply default 30-second timeout to commands executed in backgroundExec mode, similar to existing yolo mode behavior.

This change enables different execution strategies for VSCode terminal commands and ensures background executions have appropriate timeout protection to prevent hanging processes.
2025-11-03 11:33:10 -08:00
canvrno 05213f2a71 fix: Remove orphaned tool_results after truncation (#7225) 2025-11-03 10:25:16 -08:00
Ara d5bad1357d fix: Support interleaved thinking for miniMax provider (#7162)
* fix: interleaved thinking

* Adding native tool calling
2025-11-03 09:31:08 -08:00
Saoud Rizwan a4b1549dac Revise title in README.md
Updated the title of the README file and removed the subtitle.
2025-11-02 23:29:49 -08:00
Andrei Eternal e015ce94c0 cli polish ahead of release - disable doctor, better node errors (#7215)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-11-02 14:52:54 -08:00
Wahaj Ahmed Khan be076cf407 feat: Add support for Claude 4.5 Sonnet in SAP AI Core provider (#7217)
- Add anthropic--claude-4.5-sonnet model definition to sapAiCoreModels
- Update SAP AI Core provider to handle Claude 4.5 Sonnet in anthropicModels array
- Enable caching support for Claude 4.5 Sonnet using converse-stream endpoint
- Add Claude 4.5 Sonnet to streamCompletionSonnet37 method for proper response handling

Fixes #7216

Co-authored-by: Wahaj Ahmed Khan <“wahaj.khan@sap.com”>
2025-11-01 20:01:04 -07:00
Nick Baumann 580db36476 Add provider field to tool usage telemetry events (#7214)
- Add provider parameter to captureToolUsage() and captureDiffEditFailure() methods in TelemetryService
- Update all 11 tool handlers to extract and pass provider information
- Extract provider using plan/act mode differentiation from state manager
- Update UIHelpers.ts captureTelemetry wrapper to include provider
- Update test file to include provider parameter in test calls

This enables tracking which API provider (anthropic, openai, etc.) was used for each tool execution.
2025-10-31 18:31:45 -07:00
Sarah Fortune 8f8b98bb58 Add global rules and workflows to the remote config schema (#7198)
Add a way for the admin to configure global cline rules and workflows for their users.
2025-10-31 10:24:40 -07:00
CandiedUniverse 36022438cb 🪝Hooks: Exclude .clinerules/hooks/ files from Rules feature (#7202)
* Exclude .clinerules/hooks/ files from Rules feature

* Escape whitespace in paths correctly when discovering hooks/ directories
2025-10-31 10:18:51 -07:00
Bee c7afb61e28 fix: react-remark rendering in ModelDescriptionMarkdown (#7205)
* fix: react-remark rendering in ModelDescriptionMarkdown

- Add useRemark hook to properly parse and render markdown content that was removed in last git commit
- Extract props interface to ModelDescriptionMarkdownProps for better type safety
- Add useEffect to reactively update markdown when content changes
- Set fixed height (h-20) for collapsed state to improve layout consistency
- Replace raw markdown text display with processed reactContent

This change ensures markdown formatting (links, bold, italics, etc.) is correctly rendered in model descriptions instead of showing raw markdown syntax.

* changeset
2025-10-31 10:03:27 -07:00
CandiedUniverse dfd113a6e5 🪝Hooks: Gorgeous UI [ENG-994] (#7126)
* feat(hooks): Initial implementation of hooks UI using background terminal UI

* Hooks UI improvements

* Hook discovery improvements

* Separate hooks UI into separate files

* Fix failing tests

* Add missing docs

* Hooks hardening and handling edge cases

* Improvements to hooks error messaging

* Improve TaskCancel hook UI

* Simplify and improve console.log() output from hooks

* Changes from usability feedback

* test: verify linting fixes

* fix: resolve cancel functionality in PostToolUse hook using flag pattern

* fix: add cancel button support for TaskResume and UserPromptSubmit hooks

* Getting things working again

* Fixing cancel behaviors

* Trying another fix

* Demoed

* Add examples to .clinerules/hooks/ directory

* Refactored away loadTaskStateWithoutWorkflow

* Fix unsafe return in finally block

Refactored PostToolUse hook execution to avoid using return statement
in finally block, which the linter flags as unsafe. Instead of early
return, wrapped the hook logic in a conditional check for abort status.

This resolves the biome lint error:
lint/correctness/noUnsafeFinally - Unsafe usage of 'return' in finally block

* Remove unnecessary files from branch

* remove cancelHookExecution() in favor of cancelTask()

* Remove unnecessary polling pattern for hook cancellation

* Fixing cancel behavior

* Fixing cancel behavior

* Fix resume

* Sqaush commits to improve merge tool behavior

Plan out the work needed to resolve race conditions

Fix race conditions (1)

Fix race conditions (2)

Fix race conditions (3)

Fix race conditions (4)

Fix race conditions (5)

Fix unit tests

Updated implementation plan doc

Code quality improvement

Temporary logging to troubleshoot race conditions in hooks UI blocks

Fix streaming output for hooks

Remove in-progress planning file

Revert breakage

Remove unneeded arg output in PreToolUse hook UI

Fix race condition with PreToolUse and PostToolUse hooks

Fix PreToolUse attempt_completion use case

Fix ChatTextArea prompt input

Fixed part of the rersume bug

Clean-up before code review

Change cancel button to abort button

Fixed TaskCancel behavior

Fixing resume behavior (partially fixed)

Make notch arrow visible in hooks block up expand/contract toggle

Prevent cancel/abort from clearing unsent user message

Change 'Cancelled' to 'Aborted' in hook UI block

Use color styles consistent with background terminal

Fix npm compile issue

Remove unneeded hot-cold tracking from hooks

Remove unused constant as per PR feedback

Minor changes

Skip combineHookSequences() if hooks feature setting not enabled

Improve mutex pattern for general use and fix additional race condition

Refactor to reduce duplication (keep it DRY)

Refactor to reduce duplication (keep it DRY) part 2

Fix tests

Skip some tests on Windows (not yet supported)

Hooks unsupported on Windows

Fix broken unit tests

* Fix broken unit tests

* Bee and Eve fixing 'API Request...' test in e2e tests

* Add comment as per ellipsis-dev PR feedback

* Changes as per PR feedback from Evan

* Remove if that always resolves to true

* Don't use vscode API; use cross-compatible solutions instead

* Remove mention of obsolete clineAsk handler
2025-10-31 05:50:18 -07:00
github-actions[bot] 3698d2356c v3.35.0 Release Notes (#7127)
- Add native tool calling support with configurable setting.
- Auto-approve is now always-on with a redesigned expanding menu. Settings simplified and notifications moved to General Settings.
- added zai-glm-4.6 as a Cerebras model
- Created GPT5 family specific system prompt template
- Fix: show reasoning budget slider to models with valid thinking config
- Requesty base URL, and API key fixes
- Delete all Auth Tokens when logging out
- Support for <think> tags for models that prefer that over <thinking>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 18:41:23 -07:00
Bee ff20c4addc feat: add native tool call setting with feature flag support (#7193)
* feat: add native tool call setting with feature flag support

Add a new native tool call setting that allows users to enable/disable native tool calling functionality. The setting is controlled by both a user preference and a feature flag, providing flexibility for gradual rollout. Changes include:
- Added native_tool_call_enabled field to UpdateSettingsRequest proto
- Implemented state management for the setting in controller and storage
- Added UI toggle in feature settings section
- Updated task execution logic to check both user setting and feature flag
- Extended extension state interface to include the new setting

* Add changeset
2025-10-30 17:47:35 -07:00
Bee 8eeeabb966 fix: ensure hasThinkingBudget validates non-empty thinkingConfig object (#7192)
Previously, hasThinkingBudget would return true for empty objects ({}),
causing incorrect behavior. Now checks both for truthiness and that the
object contains at least one key.

Also updates thinkingConfig assignment logic to avoid setting empty
objects and converts imports to type-only imports for better tree-shaking.
2025-10-30 16:22:51 -07:00
Saoud Rizwan 9b1dc5bd92 Improve auto-approve menu design and remove unnecessary options (#7180) 2025-10-30 16:10:14 -07:00
CandiedUniverse 1cfff0a45f Hide hooks toggle from appearing in the the Feature Settings (#7191) 2025-10-30 15:44:31 -07:00
Bee e7d00dec2d refactor(ui): improve tooltip and task header responsiveness (#7186)
Refine TaskHeader controls so actions wrap naturally and the cost
label scales down on narrow viewports.
Update tooltip content to wrap flexibly, tweak padding,
add collision padding, and cap width on small screens.
Introduce xs and xxs breakpoint variables to support responsive styles.
2025-10-30 11:41:23 -07:00
Bee 2c5748ccfd fix: set free pricing for featured models in Cline provider (#7179)
* fix: set free pricing for featured models in Cline provider

Add isFree flag to featured models and ensure free models have $0 pricing when using Cline provider. This updates the OpenRouterModelPicker to automatically set input, output, and cache prices to zero for free featured models, preventing confusing info display to users.

* update

* fix
2025-10-30 11:41:14 -07:00
Bee 5196adce33 fix: adjust mode toggle hover and colors (#7177)
* fix: adjust mode toggle hover and colors

- add hover state to plan/act toggle buttons with toolbar hover color
- set inactive text color to text-foreground
- align toggle styling with previous design

* feat: toggle spacing fix and transparent color

* SwitchContainer to tailwind

* revert

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-10-30 10:20:30 -07:00
celestial-vault d95d86f329 updateApiConfiguration v2 (#7160)
* add new version of updateApiConfiguration that splits options and secrets

* remove console log

* remove unnecessary modelInfo conversion
2025-10-29 22:39:51 -06:00
Bee f6eb3aa386 update: GPT-5 native tools apply_patch to write_to_file (#7178)
- extend replace_in_file and write_to_file specs with a native GPT-5 variant to support the model
- swap native GPT-5 config to use write_to_file and replace_in_file tools instead of apply_patch tool
2025-10-29 19:56:29 -07:00
Bee 5c4b9e54c2 Bee/mcp server key (#7175)
* refactor: use hashed keys for MCP server names in native tool identifiers

- Replace server names with unique hashed keys in MCP tool names to avoid length issues and ensure uniqueness.
- Add McpHub methods to generate and retrieve server names from keys.
- Update McpServer type to include uid field.
- Modify tool-use-handler to resolve server names from keys during tool execution.

* Add server name to tool description

* Fix collision case

* clean up on error
2025-10-29 18:59:29 -07:00
Juan Pablo Flores 29a1d08685 docs: updates Cursor AI Panel drag instructions and updates Gif (#7176)
* docs: clarify Cursor AI Panel drag instructions and fix image path

* docs: replace "AI Panel" with "AI Pane" in Cursor right-sidebar instructions
2025-10-29 18:58:48 -07:00
Tomás Barreiro 9664ddd106 Ensure WorkOS Auth token deletion when logging out (#7174)
* Ensure WorkOS Auth token deletion when logging out

* Add changeset

* refactor
2025-10-30 02:19:33 +01:00
Daniel Steigman 3c1327b115 fix(cli): Fix config set overwriting all settings instead of merging (#6980)
* fix(cli): Fix config set overwriting all settings instead of merging

ENG-1115

This fix resolves the issue where 'cline config set' would overwrite all
settings instead of merging with existing values.

Changes:
1. CLI (cli/pkg/cli/config.go): Changed setCommand to use
   UpdateSettingsPartial() instead of UpdateSettings()

2. Server (src/core/controller/state/updateSettingsCli.ts): Added defensive
   checks for defaultTerminalProfile to prevent undefined errors

3. Added merge.go with proper settings merge logic

The fix follows git-style behavior where 'cline config set key=value'
merges with existing settings, preserving all other values.

Tested and verified:
- Setting max-requests to 999 works
- Setting edit-files-externally preserves max-requests
- Multiple successive config sets preserve all previous values

* fix: use optional proto bools to fix config set field overwrite

Root cause: Non-optional bool fields in AutoApprovalSettings proto were
transmitting zero values (false) even when not set by user, causing the
server-side merge to overwrite existing settings.

Solution: Made 'enabled' and 'enableNotifications' fields optional in proto,
matching the pattern used by AutoApprovalActions fields. This allows proper
server-side merge detection using 'field !== undefined' checks.

Changes:
- proto/cline/state.proto: Added optional keyword to two bool fields
- cli/pkg/cli/task/settings_parser.go: Use boolPtr() for optional fields
- cli/pkg/cli/task/manager.go: Fix UpdateTaskAutoApprovalAction to use boolPtr()
- Removed client-side merge logic (merge.go, UpdateSettingsPartial method)
- Simplified config.go to use UpdateSettings() directly

This approach is simpler and more maintainable than the previous client-side
merge solution, relying on the existing server-side merge logic that already
handles undefined values correctly.

* fix: Address celestial-vault feedback on proto optional fields

- Remove unnecessary error suppression in updateSettingsCli.ts
- Make max_requests optional in AutoApprovalSettings proto
- Update Go parser to use int32Ptr() for optional max_requests
- Remove hardcoded MaxRequests default in UpdateTaskAutoApprovalAction

This prevents the CLI from overwriting user-configured maxRequests values
and maintains consistency with other optional fields (enabled, enableNotifications).

* fix: Remove error suppression for missing terminal manager in updateSettingsCli

Addresses celestial-vault's feedback on ENG-1115 PR.

Previously, the check 'if (controller.task && controller.task.terminalManager)'
silently suppressed errors when a task existed but terminalManager was missing.

Now properly throws an error if task exists without terminalManager (error case),
while allowing terminal profile updates when no task is running (normal case).
2025-10-29 17:40:10 -07:00
Sarah Fortune bb993e4a9a Remove duplicated code for getting the MCP catalog from the server (#7163)
Combine almost identitical methods for getting the MCP catalog.

We are always using silent=true, so remove the param and silent=false code path.
2025-10-29 17:01:15 -07:00
Sarah Fortune 473b3d0204 Update remote config schema to use URL for MCP ID (#7168) 2025-10-29 17:01:03 -07:00
Bee 7e68614631 refactor(ui): update BrowserSessionRow URL bar spacing (#7158)
* refactor(ui): update BrowserSessionRow URL bar spacing

Replace inline styles with Tailwind CSS classes for the URL bar component in BrowserSessionRow. This change:
- Removes the `urlTextStyle` CSSProperties object
- Converts inline style objects to Tailwind utility classes using `cn()`
- Maintains the same visual appearance and conditional styling
- Improves code maintainability and consistency with the project's styling approach

* width

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-10-29 16:10:34 -07:00
Bee a19e9907d5 fix(ui): hide tooltip arrow for auto approve menu item (#7157)
* fix(ui): hide tooltip arrow for auto approve menu item

Remove the arrow from the tooltip in AutoApproveMenuItem by setting showArrow={false} on TooltipContent. This improves the visual appearance of the tooltip for auto-approve action descriptions.

* clean up

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-10-29 16:03:02 -07:00
canvrno 19f74cac01 Add domain to openai compatible telemetry (#7170)
* OpenAI compatible domain telemetry

* Updated tests for openAiCompatibleDomain inclusion in telemtry
2025-10-29 15:51:50 -07:00
Bee b877abc708 fix(ui): align toolbar buttons and improve modal visibility control (#7159)
* fix(ui): align toolbar buttons and improve modal visibility control

- Remove inconsistent top margin (mt-0.5, mt-1) from toolbar buttons for consistent vertical alignment
- Add explicit `open` prop to ServersToggleModal Popover for better visibility state control
- Replace inline style with Tailwind class (mb-2.5) for consistent spacing
- Restructure ClineRulesToggleModal layout with proper flex container hierarchy
- Standardize icon sizing and remove redundant flex classes
- Remove trailing whitespace in ServersToggleModal

These changes ensure toolbar buttons align properly and modal visibility states are managed consistently across the chat interface.

* remove space

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-10-29 15:12:48 -07:00
Thibault Jaigu c90e64e763 feat: add Requesty OAuth with custom base URL support (#6953)
* feat: add Requesty OAuth with custom base URL support

* fix: changing base url to undefined when user unselected base url checkbox

* chore: adding change set

* chore: minor style changes to requesty provider

---------

Co-authored-by: John Costa <john@requesty.ai>
2025-10-29 14:47:11 -07:00
Bee e02e1eca7f adjust see more styles (#7150) 2025-10-29 14:44:48 -07:00
Bee f8925fb8fd fix: improve CheckpointError layout and Alert component flex behavior (#7148)
* fix: improve CheckpointError layout and Alert component flex behavior

- Add explicit sizing and spacing classes to AlertTriangleIcon in CheckpointError
- Refactor Alert component to use flex layout instead of absolute positioning
- Reduce padding from p-4 to p-2 and adjust gap spacing for tighter layout
- Remove absolute positioning from dismiss button and icon elements
- Update AlertTitle to use grow class for proper flex behavior

This fixes layout issues with the CheckpointError component on flex containers by replacing absolute positioning with flexbox, resulting in more predictable and responsive behavior.

* alert styles

* title
2025-10-29 14:44:39 -07:00
Zhongying Qiao ac81aeaf4e feat: Add banner api calls and evaluate banner display rule sets locally (#7087)
* scaffold banner api calls

* feat: add basic json rules local evaludation

* use another way to fetch ide name and version

* refine rules as well as rules evaluations in BannerService

* refactor: refactor BannerService so it is unit testable

* feat: add tests to banner service

* refactor: use separate initialize and get for banner service

* refactor: use Logger.error to log errors

* refactor: rename personal to personal only

* fix: move import to the top

* fix: remove unnecessary  wrapper

* move banner initialization to common.ts

* fix test

* fix: move import statement to the top in common.ts

* fix: remove feature targeting from rulesets

* fix: remove this._controller check in BannerService

* fix: add getProviderName in AuthService

* fix: include the owner role, treat it same as admin in applying banner rules
2025-10-29 14:03:33 -07:00
Ara f12b5a1573 fix: Removing language selection from voice mode to support aqua voice (#7086)
* fix: Removing language selection from voice mode to support aqua voice

* fix: Removing language selection from voice mode to support aqua voice

* fix: Removing language selection from voice mode to support aqua voice

* fix: bug fixes

* fix: bug fixes
2025-10-29 13:29:22 -07:00
Tomás Barreiro a66b57ef51 Add MCP settings to the remote config (#7123)
* Add MCP settings to the remote config

* Refactor MCP server schema

* Add model list to the root remote config

* Add tests

* Add type
2025-10-29 12:20:29 -07:00
Tomás Barreiro 944ed41f4a Add headers to the OTEL remote settings (#7149) 2025-10-29 16:36:31 +01:00
canvrno 970e941e57 Remove <think> tags for models that prefer this tag over <thinking> (#7144) 2025-10-28 20:24:46 -07:00
Bee 45abe977e4 update: use diff edit tools for gpt-5 (#7147)
GPT-5 with native tool calling support has updated to use the new apply_patch tool. Before we can confirm the new tool works consistently, the old GPT-5 variant without native tool calling enabled should continue to use the current file edit tools.
2025-10-28 18:10:30 -07:00
Bee 5755b30bce refactor: migrate ModelDescriptionMarkdown to Tailwind CSS (#7145)
Replace styled-components with Tailwind CSS classes in ModelDescriptionMarkdown component. Remove react-remark dependency in favor of simpler rendering approach. Update component to use shadcn/ui Button component instead of VSCodeLink for "See more" action. Add displayName for better debugging. Remove duplicate and unused styled markdown implementation from OpenRouterModelPicker and RequestyModelPicker.

This change improves consistency with the project's UI component library and codebase clean up.

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-28 17:51:26 -07:00
Bee 5fde21dffd native tool calling (#6921)
* (WIP)feat(api): add tool calling support to openai API handlers

Add ChatCompletionTool parameter to createMessage interface and implement tool calling functionality across API providers. Includes new StreamingToolCallHandler for processing tool call deltas and utility functions for converting tool specifications to OpenAI format.

* Replace path with absolutePath

* Simplify tool spec

* Parse stream and use variant matcher

* Simplify StreamingToolCallHandler

* Add CLINE_NEXT_GEN

* Enable parallel_tool_calls

* ApplyPatchHandler

* Simplify ApplyPatchHandler

* store tool use chunk

* feat(anthropic): add streaming tool use support with OpenAI-compatible format

Add comprehensive support for streaming tool use blocks from Anthropic API:

- Add tool_use case handler in AnthropicHandler to convert streaming tool
  calls to OpenAI-compatible format during content block start events
- Implement ToolUseHandler class to accumulate and parse streaming tool use
  deltas with incremental JSON parsing support
- Add proper handling for undefined tool message content in openai-format
  converter to prevent errors
- Integrate ToolUseHandler into TaskState for managing streaming tool calls
  across the request lifecycle

This enables real-time processing of tool calls as they stream from Anthropic's
API while maintaining compatibility with OpenAI's tool calling format.

* feat(anthropic): add tool support with OpenAI tool conversion

Add support for passing tools to Anthropic API with automatic conversion from OpenAI tool format. Implements tool_choice configuration to force tool usage when tools are provided.

Changes:
- Add tools parameter to createMessage method in AnthropicHandler
- Implement openAIToolToAnthropic converter to transform OpenAI ChatCompletionTool format to Anthropic Tool format
- Set tool_choice to "any" when tools are provided to ensure Claude uses one of the available tools
- Fix tool result handling to avoid invalid tool_use_id "cline" by converting to text blocks for backward compatibility
- Add documentation for tool_choice options (none, auto, any)

This enables proper tool calling functionality with Anthropic models while maintaining compatibility with the existing OpenAI tool definitions.

* oops

* fix: remove .mjs extensions from import paths

Remove `.mjs` file extensions from OpenAI and Anthropic SDK import paths to ensure compatibility with current module resolution. This updates imports across multiple files:
- openai/resources/chat/completions.mjs → openai/resources/chat/completions
- @anthropic-ai/sdk/resources/index.mjs → @anthropic-ai/sdk/resources/index

* revert styles.css change from merge main

* Update config and fix tests

* gpt-5 variant for cline provider only

* Fix GPT-5 web fetch tool

* Add native next gen for supported openai providers

* add native tool calling support to more openai comp providers

* list supported providers for gpt-5

* clean up

* Update ApplyPatchHandler

* clean up

* Update ask_followup_question

* Add system prompt test for cline claude 4.5 sonnet

* noToolsUsed

* Add support to gemini api provider

* add native tool calling to more providers

* Skip XML parsing

* clean up

* add back TASK_PROGRESS_PARAMETER to native tools

* feature flag NATIVE_TOOL_CALLS_NEXT_GEN_MODELS

* add allowNativeToolCalls to system prompt context

* add grok-code

* feat(context): ensure tool_result blocks follow tool_use blocks

Add validation to ensure every tool_use block in assistant messages has a corresponding tool_result in the following user message. When tool_result blocks are missing, they are automatically added with "result missing" content to maintain proper message pairing required by the Anthropic API.

This prevents API errors caused by orphaned tool_use blocks and ensures conversation history integrity after context management operations.

* feat(task): refactor ApplyPatchHandler to use FileEditProvider with revert support

Refactor the ApplyPatchHandler to use FileEditProvider and DiffViewProvider
for file operations instead of direct filesystem access. This change adds:

- State tracking for applied commits to enable rollback functionality
- Automatic revert of changes when user denies approval or errors occur
- Enhanced response format that includes full file contents after patching
- Consistent file reading through DiffViewProvider for better editor integration
- Proper cleanup of applied state after successful operations

This improves the patch application workflow by ensuring changes can be
safely reverted and provides better visibility into the applied changes.
The refactoring also aligns file operations with the existing editor
integration patterns used elsewhere in the codebase.

* Finalizing...

* MCP tools converter

* remove ClineDefaultTool.MCP_USE

* Update snapshot

* comments

* use diffViewProvider

* Fix MCP tool use with images

* fix mcp tool converter with reserved keys

* Fix apply patch streaming issue

* add vercel-ai-gateway to supported provider & clean up

* simplfy apply patch handler

* Turn off thinking when native tools are enabled for anthropic provider

* clean up ToolUseHandler

* anthropic tool_choice logic

* improve tool result ordering

- Extract anthropic message mapping logic into a separate variable for better readability
- Add MessageParam import from Anthropic SDK
- Update ensureToolResultsFollowToolUse to maintain tool_result order matching tool_use blocks
- Improve documentation to clarify tool result ordering requirements

This refactoring improves code maintainability by separating the message transformation logic and ensures tool results are properly ordered to match their corresponding tool use blocks in the conversation flow.
<budget:token_budget>200000</budget:token_budget>

* refactor tool result validation for improved efficiency

Simplify ensureToolResultsFollowToolUse method by streamlining the logic
for validating and reordering tool_result blocks. Changes include:

- Use early returns to reduce nesting and improve readability
- Process tool results and other blocks in a single pass instead of multiple iterations
- Eliminate unnecessary deep cloning by mutating content array directly
- Add flag-based update detection to avoid unnecessary array rebuilding
- Simplify the reordering logic while maintaining the same validation rules

This refactoring maintains the same functional behavior (ensuring tool_result
blocks follow their corresponding tool_use blocks) while reducing complexity
and improving performance through more efficient array operations.
<budget:token_budget>200000</budget:token_budget>

* attempt_completion

* use helper function

* remove FreeModelIDs from merge conflicts

* clean up

* Add NATIVE_GPT_5 & exclude gpt-5-chat

* shouldAutoApproveToolWithPath for apply patch

* add openai-native to supported provider

* add lightweight incremental chunk extraction

* update apply patch handler

* revert version regex

* Fix browser action
2025-10-28 17:49:19 -07:00
canvrno cf9f2a8630 Package updates (#7001) 2025-10-28 17:45:19 -07:00
nihar-oracle 5a3416ff09 Feat/nturumel/proto-python (#7090)
* feat(proto-python): add script-generated Python gRPC stubs, Go-like client, docs, and PyPI publish workflow

- add scripts/build-python-proto.mjs

  - invokes python -m grpc_tools.protoc over proto/**/*.proto
  - outputs to src/generated/grpc-python
  - mirrors Go layout under client/: connection.py, cline_client.py, services/_client.py
  - supports PYTHON env override (use a venv interpreter easily)
  - generates src/generated/grpc-python/pyproject.toml so output can be pip installed (pip install -e src/generated/grpc-python)

- package.json

  - add protos-python script to run the generator

- docs

  - add docs/exploring-clines-tools/python-protos.mdx with venv setup, generation steps, and import examples
  - emphasize: everything in src/generated is produced by scripts (do not commit manual edits)

- CI: publish to PyPI only

  - add .github/workflows/publish-grpc-python.yml
  - workflow generates code via script, builds wheel/sdist from src/generated/grpc-python, and uploads to PyPI
  - requires repo secret: PYPI_API_TOKEN (TWINE_USERNAME=__token__)
  - optional version override input for workflow_dispatch

Notes:

- generation strictly produces all content under src/generated/grpc-python (including pyproject.toml)
- default package name in generated pyproject is cline-grpc-python (adjustable in the script if needed)
- recommended usage on macOS: PYTHON=/Users/nturumel/projects/oracle-github/cline/.venv-proto/bin/python npm run protos-python

* Delete .github/workflows/publish-grpc-python.yml

* Delete docs/exploring-clines-tools/python-protos.mdx

* Update tired-banks-show.md

---------

Co-authored-by: Andrei Eternal <206184+Garoth@users.noreply.github.com>
2025-10-28 17:43:05 -07:00
Bee 826b2b1276 refactor: replace HeroUI Alert with shadcn Alert component (#7137)
* refactor: replace HeroUI Alert with shadcn Alert component

Replace HeroUI Alert component with a new custom Alert component in CheckpointError. The new component provides better control over styling and behavior, removes the dismiss functionality from CheckpointError, and uses a cleaner structure with AlertTitle and AlertDescription. This change improves consistency with the UI design system and simplifies the error display logic.

* Add storybook for TaskHeader with CheckpointError

* clean up
2025-10-28 17:29:51 -07:00
Kevin Taylor 8da38b2a2e Add Cerebras GLM 4.6 model support and set as default (#7143)
* Add Cerebras GLM 4.6 model support and set as default

- Add zai-glm-4.6 model configuration with 128k context window
- Set GLM 4.6 as default Cerebras model (replacing qwen-3-coder-480b-free)
- Configure 40k max tokens and 2,000 tokens/s performance

* add changeset
2025-10-28 14:22:31 -07:00
Saoud Rizwan cb121170cb Revise tip for opening Cline on the right (#7122)
Updated the tip section to provide a link for opening Cline in the sidebar.
2025-10-28 13:55:23 -07:00
Bee e9d2d344c6 fix: stop event propagation on task header button clicks (#7139)
Prevent default actions and stop event propagation on button clicks to avoid unintended behavior.
2025-10-28 12:19:13 -07:00
Daniel Steigman 69fb954a6c feat: Set default OpenTelemetry exporters to console,otlp (#7129)
* feat(ci): configure OpenTelemetry exporters for production

Set default OpenTelemetry log and metric exporters to console,otlp in both nightly and release workflows to ensure proper telemetry collection in production environment.

* ci: remove OTEL_METRIC_EXPORT_INTERVAL from publish workflows

Removed the OTEL_METRIC_EXPORT_INTERVAL environment variable from both nightly and stable publish workflows as it's no longer needed for the publishing process.
2025-10-28 11:31:11 -07:00
Bee e9e616e317 Replace HeroUI Tooltip with shadcn (#6872)
* Set up Tailwind v4

npx @tailwindcss/upgrade                                                                                                                                   1 ↵
≈ tailwindcss v4.1.13

│ Searching for CSS files in the current directory and its subdirectories…

│ Migrating stylesheets…

│ ↳ Migrated stylesheet: `./src/index.css`

│ Updating dependencies…

│ ↳ Updated package: `tailwindcss`

│ ↳ Updated package: `@tailwindcss/vite`

│ Migrating templates…

│ ↳ Migrated templates for: `./src/index.css`

│ Verify the changes and commit them to your repository.

* Migrate HeroUITooltip to radix-ui shadcn components

* import main.css

* Update e2e test text

* clean up

* Update mode switch test

* Fix auto approve modal z-index number

* Unify styles with theme

* fix spacing and sizes

* update logo id

* Fix e2e test

* Clean up

* npm install tailwindcss @tailwindcss/vite

* npx @tailwindcss/upgrade
≈ tailwindcss v4.1.14

│ ↳ Upgrading from Tailwind CSS `v4.1.14`

│ Searching for CSS files in the current directory and its subdirectories…

│ Migrating stylesheets…

│ ↳ Migrated stylesheet: `./webview-ui/src/index.css`

│ Updating dependencies…

│ ↳ Updated package: `tailwindcss`

│ ↳ Updated package: `@tailwindcss/vite`

│ Migrating templates…

│ ↳ Migrated templates for: `./webview-ui/src/index.css`

│ Verify the changes and commit them to your repository.

* clean up

* clean up

* Remove DRY code and update descriptionForeground class name

* Update TaskHeader classnames

* unify font size

* clean up

* update test with clear test id

* size

* Fix tooltip trigger in settings

* Apply feedback - hide arrow for autoapprove menu

* Align chat toolbox icon stylings

* update data-testid

* set

* CheckpointError

* feat: arrow alignment issues

* text-wrap tooltip

* feat: mcp tooltip arrow fix

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-10-28 09:15:29 -07:00
canvrno 545ac29e07 GPT5 system prompt snapshots + small adjustment. (#7120)
* gpt5 system prompt adjustments

* changeset
2025-10-27 15:19:47 -07:00
canvrno d38489aebc glm-4.6 system prompt adjustments (#7121) 2025-10-27 14:35:43 -07:00
github-actions[bot] 8d47026640 v3.34.1 Release Notes (#7061)
- Added support for MiniMax provider with MiniMax-M2 model
- Remove Cline/code-supernova-1-million model
- Changes to allow users to manually enter model names (eg. presets) when using OpenRouter

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-27 13:49:59 -07:00
Ara 268cd5c527 feat(settings): allow Minimax models with :free suffix for Cline provider (#7119)
Update OpenRouterModelPicker to include Minimax M2 models even when they
have the :free suffix. Previously, all :free models were filtered out for
the Cline provider, but Minimax models should be available regardless of
their pricing tier to ensure users have access to these specific models.
2025-10-27 13:01:59 -07:00
Ara c7c4e43322 Remove old models (#7118)
* refactor: remove CodeSupernova model and related code

Remove the deprecated cline/code-supernova-1-million model from the codebase:
- Delete clineCodeSupernovaModelInfo export from shared API
- Remove CodeSupernova model entry from CLINE_STEALTH_MODELS
- Remove CodeSupernova announcement UI and related state management
- Clean up unused imports (EmptyRequest, AccountServiceClient)
- Update import formatting in refreshOpenRouterModels

This model is no longer supported and has been replaced by other offerings.

* hel

* fix: bug fixes
2025-10-27 12:26:09 -07:00
Maosghoul aae9d432fd Feat: Add MiniMax AI provider (#7094)
* feat: add minimax ai

* feat: api

* feat: mmx

* feat: name

* feat: model name

* feat: fix

* feat: fix

* feat: add model info

* feat: format code

* feat: format code

* feat: code

* fix: log

* feat: param

* feat: add m2

* feat: add m2

* feat: format code

* feat: info

---------

Co-authored-by: xiaose <xiaose@minmaxi.com>
2025-10-27 11:18:34 -07:00
Saoud Rizwan 604dbd7bb0 fix: error_retry message breaking browser session row flow (#7106) 2025-10-26 09:43:01 -07:00
Bee 062a32f93d fix(scripts): fix proto-lint script execution on Windows (#7089)
* fix(scripts): fix proto-lint script execution on Windows

On Windows, directly calling 'scripts/proto-lint.sh' fails because it's not recognized as an internal or external command. This change wraps the script in an npm run command to ensure cross-platform compatibility. Added a new 'lint:proto' script for better organization.

* Update lint:proto script path to use relative path

* bash
2025-10-24 19:57:12 -07:00
canvrno 535b29f465 Support OpenRouter presets entry (#7083) 2025-10-24 17:18:59 -07:00
nihar-oracle a8027dc570 feat: Adding oracle code assist to the cli (#7004)
wip:

wip:

wip:

fix: Adding oca auth state instead of using model id check

fix: Adding oca auth state instead of using model id check

chore: Undoing debug changes
2025-10-24 14:50:37 -07:00
Toshii 978a8a0aa6 update e2e evals to use cline cli (#6977)
* remove un-implemented tests and create foundation for running cline in cli for exercism

* running version for python language

* remove unused code and reorder benchmark adapter

* remove optional helper functions from BenchmarkAdapter

* unskipping tests for java and javascript

* updating db schema

* updating output to match schema

* functional tests for all languages

* clean up unused commit and stored result

* nits

* small changes to wording

* adding to the test outputs

* using stdin for cline task send

* adding results dir to gitignore

* updating readme

* small nits for readme
2025-10-24 09:21:21 -07:00
Sarah Fortune 0cd462a414 Add linter check for proto files and add autoformatting (#7066)
Add a linter check for proto files to avoid issues like https://github.com/cline/cline/pull/7054
Format the proto files while linting
2025-10-23 14:37:26 -07:00
canvrno 65dbd85a92 Updating trending model list (#7018)
* Updating trending model list

* exacto
2025-10-23 14:33:00 -07:00
Tomás Barreiro ee1bb2f788 Support Feature Flags default values (#7027)
* Support Feature Flags default values

* Update src/services/feature-flags/FeatureFlagsService.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update FeatureFlag support for unknown values

* refactor isFeatureFlagEnabeld

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
2025-10-23 23:30:09 +02:00
celestial-vault 6f69ffb16f Remove apiConfiguration conversion function from updateApiConfiguration (#7045)
* remove massive conversion function and only convert what's needed

* add modelinfo conversion for all providers
2025-10-23 10:47:59 -07:00
canvrno f91769bda7 Fixed proto name issue (#7054) 2025-10-23 09:05:05 -06:00
Juan Pablo Flores 7692adacf5 Claude docs update and fixing missing images (#7041)
* Remove Windows setup accordion and streamline instructions for finding Claude Code path

* fix: update image source for Cline chat prompt to use a public URL
2025-10-22 19:43:32 -07:00
Ara a98faf5af4 fix: Removing Eslint from package lock json (#7047) 2025-10-22 19:32:59 -07:00
github-actions[bot] e3f4ce618f Changeset version bump (#7037)
* v3.34.0 Release Notes

- Cline Teams is now free through 2025 for unlimited users. Includes Jetbrains, RBAC, centralized billing and more.
- Use the “exacto” versions of GLM-4.6, Kimi-K2, and Qwen3-Coder in the Cline provider for the best balance of cost, speed, accuracy and tool-calling.

* fix: Adding Fallbacks

* fix: Adding Fallbacks

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
2025-10-22 17:35:54 -07:00
canvrno dcf519d2f7 GLM 4.6 prompt changes (#7046)
* GLM 4.6 prompt changes

* GLM MCP prompt tweaks

* Update src/core/prompts/system-prompt/__tests__/__snapshots__/zai_glm_4_6-no-browser.snap

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* snapshot update

* snapshot update again

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-22 16:42:45 -07:00
pashpashpash 3ef4aea0f7 added opinionated preferences for open source model providers (#7020)
* added opinionated preferences for open source model providers

* moving to apits instead of refreshopenroutermodels

* aras recommendations

* zai fix

* changed name and removed free models

* fix: Adding Fallbacks

---------

Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
2025-10-22 16:24:54 -07:00
canvrno a820026e0b Multiple CLI auth wizard changes (#7005) 2025-10-22 13:06:23 -07:00
Tomás Barreiro 29d1b0507c Update stored WorkOS Auth Data after refreshing it (#7029)
* Update stored Auth Data after refreshing it

* Update src/services/auth/providers/ClineAuthProvider.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
2025-10-22 19:17:26 +02:00
Ara 929d13a4dd Fix(task): use background terminal for subagent command execution (#7017)
* refactor(task): use background terminal for subagent command execution

Replace VSCode terminal with StandaloneTerminalManager for CLI subagent
commands to enable hidden background execution. Falls back to standard
TerminalManager if standalone module is unavailable.

This change allows subagent commands to run in a background terminal
instead of visible VSCode terminals, improving user experience by
reducing terminal clutter during subagent operations.

* fix: added links

* Update src/core/task/index.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update src/core/task/index.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
2025-10-22 10:09:03 -07:00
Bee c729e8c7c6 feat: expandable long task header (#6966)
* fix: add Read More for long task in header

- Truncate task description to first 3 lines by default and add a
  Read More/Show Less toggle to expand/collapse the full text
- Compute highlighted text based on expansion state; introduce local
  isHighlightedTextExpanded state
- Increase task details container max height (max-h-20 -> max-h-80) for
  better readability when expanded
- Remove unused useAutoCondense from context destructuring

Improves UX by preventing long task text from overwhelming the UI while
giving users control to view more when needed. Also includes minor cleanup.

* update

* Set to 25vh instead

* highlightText

* feat(ui): task text expansion with click-outside collapse

- Replace "Read More/Show Less" button with click-to-expand interaction
- Add click-outside listener to automatically collapse expanded text
- Apply gradient mask to truncated text for better visual indication
- Optimize rendering by removing conditional text highlighting
- Refactor layout to use single container with dynamic height constraints

This improves UX by making text expansion more intuitive and reducing visual clutter from the toggle button.

* update changeset

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-22 10:05:24 -07:00
celestial-vault 737452b2b1 wire open command with -s flag to use tasksettings (#7016) 2025-10-22 09:32:41 -06:00
Sarah Fortune ba6a72cf15 Update the remote config when the user logs in (#7025)
* Update the remote config when the user logs in

Subscribe to changes in the auth state, and fetch the remote config when the user logs in.

Move the error handling into `fetchRemoteConfig` to remove duplication.

* Update src/core/storage/remote-config/fetch.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-22 09:31:15 -06:00
AJ Juaire 65a0c35163 Add Qwen 3 Coder models to Amazon Bedrock models (#7022)
* Add Qwen 3 Coder models to Amazon Bedrock models

* Update comments to reference qwen

* Update cost.ts to round to avoid flakey tests

* remove math.round
2025-10-21 20:10:34 -07:00
Tomás Barreiro 0c8e02c6e4 Fetch the complete user info when the user logs in using WorkOS (#7026)
* Fetch the complete user info when the user logs in using WorkOS

* Add changeset

* fallback to token data
2025-10-22 03:29:52 +02:00
pashpashpash b636018ef5 fixing no-tty / stdin + standardizing color codes in plain mode (#6992)
* terminal shift enter support

* not needed

* detecting windows

* removing enhancedkeyboard

* removing enhanced keyboard

* ghostty

* proper ghostty support

* docs for posterity

* better logging

* removing md

* doctor command

* adding arguments for sync/async for doctor and keyboard setup - and moved keyboard setup to doctor command

* doctor help

* cleaning up logging and making things more explicit

* language and positioning

* standardizing color codes in plain mode

* wow even more hidden rendering - removed

* fixing stdin for restrictive shell environments
2025-10-21 13:22:20 -07:00
Alex Ker cfc6b0d7f5 added ZAI GLM4.6 to static models list and set as default (#6989)
* added ZAI GLM4.6 to static models list and set as default

* changest

---------

Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
2025-10-21 13:06:11 -06:00
Bee f116a6323d refactor: simplify BedrockProvider UI code (#7015)
* refactor(settings): migrate BedrockProvider to Tailwind and extract constants

- Extract Claude models and AWS regions into reusable constants
- Add className prop support to DebouncedTextField component
- Replace inline styles with Tailwind CSS classes throughout BedrockProvider
- Improve code maintainability and consistency with modern styling approach

This refactoring improves code organization by moving hardcoded lists to
constants and standardizes the styling approach across the settings UI
components.

* lock icons
2025-10-21 11:32:28 -07:00
Toshii 46d3b2a3ed auto compact updates (#6909)
* update prompting around first task message and summarization prompt and add file read parsing

* replace first user message to handle issue of refousing on old task after condense

* add line about focusing on initial task for history

* adding prompting around our removing of context history and verbosity

* prompting changes

* fix spelling nit in prompting

* update displayPath,absolutePath logic to match read file tool handler

* increment the auto approval usage
2025-10-20 17:04:44 -07:00
pashpashpash 9679917532 cline doctor command: terminal shift enter support + auto updates (#6883)
* terminal shift enter support

* not needed

* detecting windows

* removing enhancedkeyboard

* removing enhanced keyboard

* ghostty

* proper ghostty support

* docs for posterity

* better logging

* removing md

* doctor command

* adding arguments for sync/async for doctor and keyboard setup - and moved keyboard setup to doctor command

* doctor help

* cleaning up logging and making things more explicit

* language and positioning
2025-10-20 16:47:07 -07:00
canvrno 89bf81f7f6 Package updates (#6991)
* tar-fs

* playwright

* mammoth
2025-10-20 13:42:51 -07:00
canvrno afe01df8b4 Added new AWS SE regions (#6990) 2025-10-20 11:26:47 -07:00
celestial-vault eb1325686e separate core and rpc wrappers for refresh models (#6981)
* separate core and rpc wrappers for cleaner calling on the extension

* tweak jsdoc strings

* fix function name error go code
2025-10-20 12:20:46 -06:00
Ara 7c7962ce0f fix: Solve the issue where the notch on the terminal doesn't have full visibility (#6972) 2025-10-20 09:46:34 -07:00
celestial-vault 0707df2205 add cline provider (#6927) 2025-10-19 19:22:14 -06:00
celestial-vault ca87c21b77 use setglobalstatebatch for refresh models instead of setapiconfiguration (#6971) 2025-10-18 11:05:41 -07:00
CandiedUniverse d6f736e8d5 feat(hooks): Implement TaskCancel hook (#6962) 2025-10-17 18:24:23 -07:00
CandiedUniverse 4336471d84 feat(hooks): Implement TaskResume hook (#6928) 2025-10-17 18:23:50 -07:00
Bee 3191e23c1d fix(dev): deauth user on env changed (#6969) 2025-10-17 16:47:04 -07:00
Ara c5f12b8dc6 Fixing banner to not show CLI release for windows users (#6942)
* Fixing banner to not show CLI release for windows users

* Fixing banner

* Fixing banner
2025-10-17 11:36:54 -07:00
celestial-vault b21ff1e44a remove unused ApiConfiguration proto message (#6941) 2025-10-17 11:11:30 -07:00
celestial-vault 2860ffe147 add auto approve option to interactive (#6937)
* add auto approve option to interactive

* removing redundant options

---------

Co-authored-by: pashpashpash <nik@nugbase.com>
2025-10-17 10:25:01 -07:00
Bee 2b25ef63b5 chore: remove unnecessary debug logs for cline env (#6960)
Remove unnecessary console.info debug statements from config methods and fix log message formatting. Add explicit "no-op" case to TelemetryProviderFactory for cleaner telemetry provider selection logic.
2025-10-17 09:59:20 -07:00
pashpashpash e70d60d5c4 fixing duplicate ask headers for tool approvals, and fixing ask statestream not waiting for partial=false (#6945) 2025-10-16 23:40:37 -07:00
Ara bddbea04ef fix: Disable subagents for jetbrains (#6933)
* fix: Disable subagents for jetbrains

* fix: Disable subagents for jetbrains
2025-10-16 21:15:40 -07:00
canvrno 176ccedb2a Updated banner to add that Linux is supported in Cline CLI (#6922)
* Updated banner to note Linux is supported in Cline CLI

* Updated settings for subagents to enable on Linux
2025-10-16 21:06:13 -07:00
pashpashpash 63276aba70 fixing bug where yolo mode didnt output body in plan mode (#6940)
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-16 20:54:24 -07:00
CandiedUniverse ae0f2557fe Remove unneeded test that's slowing down the test suite (#6932) 2025-10-16 18:47:13 -07:00
celestial-vault 0d9909c80e partially update autoApprovalSettings (#6929)
* make autoApprovalSettings partially updatable

* typos

* make actions fields pointers since they are now optional
2025-10-16 15:17:53 -07:00
Juan Pablo Flores c0b4081a53 Enhance documentation: Add supported model providers and installation… (#6925)
* Enhance documentation: Add supported model providers and installation details for Cline CLI

* Refactor supported model providers list for clarity and consistency
2025-10-16 14:55:17 -07:00
Bee 0c0ba93a41 feat(config): add runtime environment switching support (#6621)
* refactor: convert config module to singleton class

Replaced functional config getters with a singleton ClineEndpoint class to improve encapsulation, enable dynamic environment updates, and eliminate static caching for better flexibility in configuration management. Updated import in cline provider accordingly.

* feat(config): add runtime environment switching support

Add ability to dynamically change Cline environment at runtime through settings:

- Add `cline_env` field to UpdateSettingsRequest proto message
- Refactor ClineEndpoint.setEnvironment() to accept string and parse environment
- Initialize environment with default value to prevent undefined state
- Add early return in constructor when valid environment is set
- Update updateSettings handler to process cline_env changes
- Replace direct clineEnvConfig usage with ClineEnv singleton pattern
- Ensure consistent environment access across auth and remote config modules

This enables users to switch between production, staging, and local environments without restarting the extension, improving developer experience and testing workflows.

* clean up

* Add trusted testers

* UpdateSettingsCli
2025-10-16 13:36:37 -07:00
Sarah Fortune 513c518d19 Add the cline provider to the remote config schema (#6908)
* Add the cline provider to the remote config schema

fixes PF-159

* Remove thinking budget

* Update unit tests for schema
2025-10-16 13:11:09 -07:00
pashpashpash 03d6561383 show cli version in banner instead of core version (#6915)
* v3.33.0 Release Notes (#6732)

- Added Cline CLI (Preview)
- Added Subagent support (Experimental)
- Added Multi-Root Workspaces support (Enable in feature settings)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>

* show cli version in banner instead of core version

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-16 11:51:59 -07:00
Juan Pablo Flores 8f8c4561a6 Docs upgrade (#6907)
* style(docs): update background color scheme to neutral tones

Update documentation background colors from purple-tinted theme to neutral gray tones. Changed light mode from lavender (#F0E6FF) to off-white (#fafaf9) and dark mode from pure black (#000000) to dark gray (#0f0f0f) for improved visual consistency.

* refactor(docs): remove gradient decoration from theme config

Remove the "decoration": "gradient" property from the documentation
theme configuration. This simplifies the theme settings by removing
the gradient decoration option from the color configuration object.

* docs: change documentation font family to Geist Mono

Replace Roboto with Geist Mono as the default font family in the documentation configuration. This updates the visual styling of the documentation to use a monospace font, which may improve readability for code-heavy content.

* docs: update branding and restructure navigation

- Replace robot panel logos with new Cline brand logos
- Add icons to navbar links (Docs, GitHub, Discord)
- Restructure navigation from groups to tabs format
- Add icons to navigation items for improved UX
- Include new Docs link in navbar with book icon

This update modernizes the documentation appearance and improves navigation hierarchy for better user experience.

* docs: restructure navigation with hierarchical groups and pages

Restructured documentation navigation from flat menu to organized groups:
- Removed redundant "Docs" link from navbar
- Migrated from "menu" to "groups/pages" structure
- Added comprehensive page organization with nested groups:
  * Introduction, Getting Started, Features
  * Prompting Skills, Cline's Tools, Enterprise Solutions
  * MCP Servers, Provider Configuration
- Organized features into logical subgroups (@ Mentions, Commands,
  Customization, Slash Commands)
- Improved documentation discoverability and hierarchy

This change provides better content organization and easier navigation
for users exploring different aspects of Cline documentation.

* docs: remove contextual options from documentation config

Remove the contextual configuration section containing the "copy" option from docs.json. This simplifies the documentation configuration by removing unused contextual menu options.

* docs(multiroot): improve workspace documentation with limitations and technical details

- Add important note about experimental limitations affecting Cline rules and checkpoints
- Add "How it works" section explaining automatic workspace detection and tracking
- Reorganize technical behavior section with detailed subsections for workspace detection, path resolution, and command execution
- Document workspace hint syntax for explicit file references (@workspaceName:path)
- Standardize heading capitalization to sentence case for consistency
- Improve overall content organization and clarity for better user understanding

This update provides users with clearer information about the multiroot feature's current state, its limitations, and how to effectively use workspace hints when working with multiple project folders.

* docs: restructure overview page with enhanced visual layout

- Convert plain markdown sections to CardGroup and Card components with icons
- Add tabbed interface for Plan & Act Mode explanation
- Update description from "development assistant" to "coding agent"
- Reorganize content for improved readability and visual hierarchy
- Enhance feature presentations with icon-based cards

Improves user experience by transforming the overview documentation into a more visually appealing and scannable format using modern documentation components.

* docs: improve installation guide with enhanced structure and UX

Restructure the Cline installation documentation to improve readability and user experience:

- Add prominent note highlighting 2-minute installation time
- Convert prerequisites into visual card components for better clarity
- Transform installation steps into structured Step components for easier following
- Add manual installation instructions for JetBrains IDEs
- Include feature compatibility accordion for JetBrains users
- Enhance visual hierarchy with improved component usage (CardGroup, Steps, Accordion)
- Simplify language and improve descriptions throughout

This makes the installation process clearer for new users and reduces friction during onboarding.

* style(docs): remove text opacity reduction for better readability

* docs: refactor model selection guide with visual step-by-step instructions

- Replace tab-based layout with linear step-by-step flow
- Add screenshots for each configuration step (config, provider, API, model)
- Reorganize content structure for improved clarity and user experience
- Add quickstart options and streamlined provider recommendations
- Improve navigation with visual aids to help users configure Cline faster

* docs: add installation screenshots and context management guide

* docs: flatten provider config structure in documentation

Remove the "Alternative Providers" grouping and move all provider configuration pages (OpenRouter, Cerebras, DeepSeek, Groq, xAI Grok, Mistral AI, Doubao, Fireworks, and ZAI) to the main provider configuration list. This simplifies the documentation navigation by treating all providers equally rather than categorizing some as alternatives.

* docs: restructure context management docs and improve content clarity

**Changes:**
- Reorganized documentation structure by moving context management from
  `/best-practices` to `/prompting` section for better categorization
- Added URL redirect to maintain backward compatibility for old links
- Updated navigation references in welcome page to point to new location
- Improved readability of context management explanations with more
  narrative, conversational prose
- Enhanced context window documentation by adding cache tokens indicator
  and using emoji-based formatting for better visual clarity
- Streamlined Cline Memory Bank setup instructions from 4 to 3 steps
- Updated context bar screenshot to use newer image asset

**Why:**
Better documentation organization and improved user experience through
clearer explanations of how Cline builds and manages context during tasks.

* docs(context-management): convert Quick Reference to Info component

Replace blockquote formatting with Info component for the Quick Reference
section in the context management documentation. This improves visual
presentation and maintains consistency with documentation standards.

Also removes trailing whitespace at the end of the file for cleaner
formatting.

* docs: add Cline Enterprise overview and restructure enterprise section

- Add comprehensive enterprise overview documentation covering security,
  governance, observability, and developer experience features
- Rename "Enterprise & Security" navigation group to "Enterprise"
- Consolidate enterprise documentation by replacing 4 pages with 2:
  new overview page and security concerns
- Document BYOI (Bring Your Own Inference), SSO authentication, and
  role-based access control capabilities

This restructuring provides a clearer entry point for enterprise users
and consolidates previously scattered enterprise information into a
cohesive overview document.

* docs(enterprise): streamline enterprise overview and update font

- Change documentation font from Geist Mono to Geist Sans
- Add enterprise website link card for detailed information
- Remove Developer Experience, Proven at Scale, and Pricing sections
- Consolidate Flexible Inference section content
- Simplify enterprise overview to focus on core capabilities

These changes reduce redundancy by directing users to the enterprise
website for pricing and detailed features while keeping the docs
focused on technical implementation and core capabilities.

* clean-images

* Update docs/getting-started/installing-cline.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/styles.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs(cline-cli): add platform availability warning to overview

Add a prominent warning callout indicating that Cline CLI is currently in preview and only supports macOS and Linux, with Windows support coming soon. This sets clear expectations for users about platform compatibility.

Also remove redundant introductory text in the "What you can build with this" section to improve content clarity.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-16 11:51:20 -07:00
pashpashpash 45d751b913 auto update for cli root command (#6914)
* v3.33.0 Release Notes (#6732)

- Added Cline CLI (Preview)
- Added Subagent support (Experimental)
- Added Multi-Root Workspaces support (Enable in feature settings)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>

* auto update for cli root command

* moving to data dir

* auto update

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-16 11:44:46 -07:00
CandiedUniverse 915259ca96 Oops. Putting back a small detail that I accidentally removed. (#6920) 2025-10-16 11:04:36 -07:00
CandiedUniverse 46ef8b10b0 🪝Hooks: TaskStart hook [ENG-1001] (#6895)
* feat(hooks): Implement TaskStart hook

* feat(hooks): Change as per code review feedback from ellipsis-dev

* feat(hooks): Fix implementation from manual testing
2025-10-16 10:42:28 -07:00
Saoud Rizwan e4e07fc0d3 v3.33.1 Release Notes 2025-10-16 10:15:00 -07:00
Ara 738e959030 fix: Copy link for CLI installation (#6919) 2025-10-16 10:12:59 -07:00
Chris Sells 16e1c02b98 add cli docs (#6836)
* ready for review

* WIP: late-breaking cli arg change fix-ups (still more to double-check)

* updates for late-breaking CLI changes

* updated docs to match yesterday's usage updates

* docs(cli): restructure documentation and add dedicated installation guide

- Extract installation instructions into separate installation.mdx page
- Simplify overview.mdx to focus on use cases and getting started
- Improve cli-reference.mdx with quick help commands section
- Reorganize content for better information architecture
- Make documentation more user-friendly and action-oriented

This restructuring separates concerns: installation details are now in their
own page, the overview focuses on what Cline CLI can do, and the reference
page is more accessible with inline help examples before the full manual.

---------

Co-authored-by: Juan Pablo <juan@cline.bot>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-16 10:07:11 -07:00
github-actions[bot] 9e3c3982ec v3.33.0 Release Notes (#6732)
- Added Cline CLI (Preview)
- Added Subagent support (Experimental)
- Added Multi-Root Workspaces support (Enable in feature settings)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-10-16 01:24:59 -07:00
Saoud Rizwan 2ed5ce9b15 fix: new terminal design showing incorrect states when running in background; use expanded state style by default 2025-10-16 01:24:59 -07:00
Saoud Rizwan 7dceaea056 fix: show auth command suggestion in subagents setting 2025-10-15 23:15:53 -07:00
Saoud Rizwan b351a8b92b feat: add banner to install Cline for CLI and experimental subagents feature (#6782)
* feat: add banner to install Cline for CLI and experimental subagents feature

* Update snapshots

* Fix copy

* Style fixes

* A few small changes to cli detection, prompting, cleanup

* Prompting tweaks and npm command update

* Prompting, bug fix

* Prompt changes around command syntax

* Command parsing and flag substitution for easier subagent invocation

* Added terminal output slider setting for subagents

* Improved CLI subagent settings injection

* Added max_consecutive_mistakes setting and cli flag

* Terminal line limit added to enchanced terminal, prompting and settings tweaks

* feat: Add OpenTelemetry settings schema and state infrastructure (1/5) (#6826)

* feat: Add OpenTelemetry settings schema and state infrastructure (1/5)

- Add 16 OpenTelemetry configuration fields to Settings interface
- Add 17 OpenTelemetry fields to RemoteConfig schema
- Add state persistence helpers for OpenTelemetry settings
- Foundation for dynamic OpenTelemetry configuration

Part 1 of 5 in the telemetry settings refactor series.

* chore: add changeset for OpenTelemetry schema

* fix: Address PR review feedback for OpenTelemetry settings

- Remove | undefined from 8 OpenTelemetry fields with default values
- Add default values in state-helpers.ts for all non-optional fields
- Add OpenTelemetry field mappings to remote-config/utils.ts
- Add comprehensive test coverage for OpenTelemetry fields in schema.test.ts
- Update changeset terminology from 'Otel' to 'OpenTelemetry'

Addresses feedback from:
- sjf: Remote config transformation and test coverage
- celestial-vault: Type cleanup and default values
- Copilot: Terminology improvement

* Prompting changes

* Fixed system prompt empty sections issue, fixed rebase mistake

* Added telemetry for CLI subagent use in IDEs

* Platform aware banner, fixed settings layout issues

* Post rebase fixes & changes to accomodate new terminal UI

* Cline Icon SVG in ChatRow - WIP

* Fixed outputLine limit issue

* Fixed rebase merge conflict remnant

* Rebase fix

* Cleanup and changes to instructions for new CLI users

* Added CLI documentation link

* Small prompt adjustments

* One more bullet point

* Updated remaining npm install command

* Updated subagent command format for CLI release spec

* Added check to prevent subagents from getting  subagent prompt

* Added subagent slash command

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Remove workdir

* Update src/core/prompts/system-prompt/variants/xs/overrides.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* removed logging

* Updated expected version output

* Removed checkCliInstallation check in getStateToPostToWebview

* removed more logging

* fix: force subagents to use terminal stuff

---------

Co-authored-by: Kevin Bond <kevin@cline.bot>
Co-authored-by: Daniel Steigman <35793213+NightTrek@users.noreply.github.com>
Co-authored-by: Andrei Eternal <206184+Garoth@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
2025-10-15 22:10:08 -07:00
pashpashpash 78c3664bf3 cliversion in hostbridge env implementation (#6912) 2025-10-15 21:43:42 -07:00
Andrei Eternal ec543a230f make cli version built in rather than reading the package.json at runtime (#6910)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 21:31:53 -07:00
pashpashpash 43fabaab8e approval with feedback fix (#6911) 2025-10-15 21:03:51 -07:00
celestial-vault 86c526b029 fetch all remote configs and lock user to remote config org (#6902)
Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-10-15 19:33:27 -07:00
Saoud Rizwan 7162b26430 Fix Claude Sonnet 4 support on Vertex (#6904) 2025-10-15 19:14:29 -07:00
Daniel Steigman e9eb7ae179 fix(cli): Add telemetry settings support to Go host bridge (#6906)
* build: add npm package build script with telemetry injection

Add a new build script that automates the NPM package creation process with proper telemetry key injection. The script:

- Validates required environment variables (TELEMETRY_SERVICE_API_KEY, ERROR_SERVICE_API_KEY)
- Verifies Node.js can access environment variables
- Builds Go CLI binaries for all platforms
- Compiles standalone package with esbuild
- Verifies telemetry keys are properly injected into compiled code
- Provides colored output and detailed error messages

Added npm script `build:npm` to package.json for easy invocation.

This ensures consistent builds with telemetry properly configured for production deployments.

* feat(hostbridge): add telemetry settings support for CLI mode

Add GetTelemetrySettings and SubscribeToTelemetrySettings methods to EnvService to handle telemetry configuration in CLI mode.

- GetTelemetrySettings retrieves telemetry status from POSTHOG_TELEMETRY_ENABLED environment variable
- SubscribeToTelemetrySettings provides a stream for telemetry setting updates, sending initial state and keeping stream open
- In CLI mode, telemetry settings are static and determined by environment variable at startup

This enables proper telemetry control and monitoring in CLI environments.
2025-10-15 19:13:39 -07:00
Andrei Eternal 546e7002e1 improve auth docs to say it configures models too, from influencer feedback (#6905)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 19:04:56 -07:00
Andrei Eternal fadc961d8f Remove --workdir / -w flag (wasnt completed) (#6903)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 18:50:43 -07:00
Andrei Eternal 958801e8a8 fix 10s wait when using cline instance kill -a (#6901)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 18:40:56 -07:00
Andrei Eternal 5152b970c0 fix version output with cli ver + core ver (#6899)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 18:39:13 -07:00
CandiedUniverse 947996b02e 🪝Hooks: UserPromptSubmit hook [ENG-1000] (#6893)
* feat(hooks): Implement UserPromptSubmit hook

* feat(hooks): Add tests for UserPromptSubmit hook

* feat(hooks): Add fixture-based tests for UserPromptSubmit

* feat(hooks): More UserPromptSubmit tests

* feat(hooks): Change as per ellipsis-dev code review feedback on the PR

* Apply the complete hooks.proto and hook-factory.ts changes
2025-10-15 18:38:05 -07:00
Andrei Eternal 0a25484ea0 ensure t v / t v -f / t c output an error if no task is active (#6894)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 17:44:17 -07:00
Andrei Eternal 91c5434b5e reference man page in cline --help (#6897)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 17:40:14 -07:00
Sarah Fortune 6f59480b79 Remove duplicated log (#6869) 2025-10-15 15:51:07 -07:00
celestial-vault e42f0a9aea remote url type from vscode text field (#6890)
Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-10-15 14:39:39 -07:00
Ara 385ac33623 fix: add excluded standalone file needed for terminal runs (#6892) 2025-10-15 14:21:07 -07:00
Sarah Fortune 6b963c243a Update remote config schema (#6867)
* Update remote config schema

Update the schema to make models field optional, so we can use undefined to mean unset like the other fields.

* Make the OpenAI headers an otional field

* Update src/shared/remote-config/__tests__/schema.test.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-15 14:07:13 -07:00
Saoud Rizwan 66a4eb0f8e hotfix: Add Claude Haiku 4.5 support (#6889)
* Add Claude Haiku 4.5 support

* Fix Claude Haiku 4.5 outputting "<function_calls>"

* v3.32.8 Release Notes
2025-10-15 13:03:04 -07:00
canvrno 9a7c6ed201 CLI Subagents - settings & telemetry framework (#6888)
* Added new settings for future subagent PR

* Updated test

* Update src/integrations/terminal/TerminalManager.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-15 12:49:11 -07:00
CandiedUniverse c7143a627a Initial global clinerules dir implementation (#6846) 2025-10-15 12:18:09 -07:00
CandiedUniverse b09751b841 feat(hooks): Implement test fixtures (#6862) 2025-10-15 11:42:32 -07:00
pashpashpash 7c51236aef approval hints in task view (#6887)
* approval hints in task view

* more descriptive
2025-10-15 08:42:51 -07:00
pashpashpash f47d07784a clean exits (#6886)
* clean exits

* cleanup
2025-10-15 08:37:51 -07:00
pashpashpash 65e5f0feb7 fixing control c cancel task reliably (#6885) 2025-10-15 08:37:42 -07:00
Tomás Barreiro b2e3e9b3f9 Allow package secrets when publishing the nightly release (#6884) 2025-10-15 07:38:06 -07:00
pashpashpash 7be84fd5bf cli banner (#6882)
* banner

* banner

* nice

* side by side

* more color alignment

* preview

* nicer
2025-10-15 06:13:15 -07:00
pashpashpash 43683440dc cli polish round 3 (#6880)
* colors and bold

* matching colors for plan act

* dark mode for all
2025-10-15 04:11:27 -07:00
Andrei Eternal 153e24b94a fix ctrl-c in task view. should just disconnect the view (#6876)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 03:40:12 -07:00
pashpashpash 65d46a3691 setting input width to 46 to minimize resize issues (#6879)
* setting input width to 48 to minimize resize issues

* fixing typo

* text

* 46 instead of 48
2025-10-15 03:38:49 -07:00
pashpashpash aa2cbc39a4 bubbles (#6871)
* bubbles

* making the input look nicer

* okay nice - clearing properly

* not allowing input while streaming command output

* better placeholder text

* way better resize handling
2025-10-15 03:02:25 -07:00
Andrei Eternal 689e7f0e13 fix piping stdin into cline (#6874)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 01:16:48 -07:00
Andrei Eternal 3c3188073b Fix: cline provider auth should print url in case it doesn't auto-open (#6873)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-15 00:38:47 -07:00
Andrei Eternal 8e3ee11966 Man page for cline command, and build system to do it (#6870)
* cline manpage

* completed man cline

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-14 23:14:26 -07:00
Ara 4d525e065c Adding Terminal background process (#6598)
* adding terminal Background process

* Adding match making blog

* Adding match making blog

* fixing colors

* fixing cancel

* Fixing: Ripgrep download for integration tests

* Fixing: Ripgrep download for integration tests

* fixing animation

* fixing animation

* fixing animation

* fixing animation

* fixing animation

* make theme aware

* make theme aware

* feat(cli): fixing cancel command

* feat(cli): fixing cancel command

* fix: minor nits

* fix: remove logs

* fix: remove logs

* fix: remove logs

* fix: remove logs

* fix: remove logs

* fix: standalone mode
2025-10-14 23:07:28 -07:00
celestial-vault 5832ca4792 add task settings rpc (#6866) 2025-10-14 21:49:25 -07:00
celestial-vault d85fea15c9 fix telemetry toggle not displaying properly (#6832) 2025-10-14 21:27:02 -07:00
Andrei Eternal 9be3fa5acf NPM install for cline (#6861)
* WIP npm publish setup

* verbose startup + error if cline core not found

* working npm release

* modifications for linux npm package to work

* remove publish npm workflow for now

* readme & package.json tweaks

* fix old reference to compile-standalone-cli in test workflow

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-14 20:54:50 -07:00
Toshii e76d9527c8 finalizing the cline task view commands based on spec (#6864)
* updating the cline task view commands

* remove unused function
2025-10-14 20:53:21 -07:00
celestial-vault e8b8ec4f05 bypass auto-approval count for yolo mode (#6859) 2025-10-14 19:06:39 -07:00
canvrno 664ec1e0ac Folder, Task, and Checkpoints locking in cline-core (#6823) 2025-10-14 18:27:51 -07:00
Toshii e34c62ade9 add -o to top level cline command, and remove oneshot command (#6860) 2025-10-14 17:49:42 -07:00
Toshii ffabde6985 rename instance use to instance default and add the --default flag to instance new (#6851)
* updating instance use to instance default

* adding --default flag
2025-10-14 16:51:44 -07:00
Daniel Steigman a8c62dddc6 feat: Add OpenTelemetry settings schema and state infrastructure (1/5) (#6826)
* feat: Add OpenTelemetry settings schema and state infrastructure (1/5)

- Add 16 OpenTelemetry configuration fields to Settings interface
- Add 17 OpenTelemetry fields to RemoteConfig schema
- Add state persistence helpers for OpenTelemetry settings
- Foundation for dynamic OpenTelemetry configuration

Part 1 of 5 in the telemetry settings refactor series.

* chore: add changeset for OpenTelemetry schema

* fix: Address PR review feedback for OpenTelemetry settings

- Remove | undefined from 8 OpenTelemetry fields with default values
- Add default values in state-helpers.ts for all non-optional fields
- Add OpenTelemetry field mappings to remote-config/utils.ts
- Add comprehensive test coverage for OpenTelemetry fields in schema.test.ts
- Update changeset terminology from 'Otel' to 'OpenTelemetry'

Addresses feedback from:
- sjf: Remote config transformation and test coverage
- celestial-vault: Type cleanup and default values
- Copilot: Terminology improvement
2025-10-14 16:27:41 -07:00
Toshii 2b5d6e5d0e add instance check to cline task new and full yolo flags (#6844) 2025-10-14 16:02:57 -07:00
Toshii 0440898584 rename task follow to task chat, remove top level cline send (#6845)
* removing cline send command

* rename task follow to task chat
2025-10-14 16:02:41 -07:00
Toshii 3288defb67 finalize cline task send according to spec - adds yolo flag and instance check (#6843)
* adding the yolo flags

* do not create an instance on send, if one doesn't already exist
2025-10-14 15:24:50 -07:00
CandiedUniverse ec6daccf5f Hooks: Improving tests (step 1) [ENG-989, ENG-990] (#6831)
* feat(hooks): Add comprehensive testing utilities for hooks system

Introduces reusable testing infrastructure to reduce code duplication
and improve test maintainability across the hooks system.

New Utilities:
- setupHookTests(): Standard test environment with automatic cleanup
- createTestHook(): Platform-agnostic hook creation
- buildPreToolUseInput() / buildPostToolUseInput(): Type-safe input builders
- assertHookOutput(): Consistent assertion helper
- MockHookRunner: Fast mock for integration tests without process spawning
- loadFixture(): Fixture loading and platform handling

Benefits:
- Eliminates ~300+ lines of duplicated setup code
- Provides consistent patterns across test files
- Enables platform-neutral testing (Unix/Windows)
- Supports both unit tests (real execution) and integration tests (mocks)

These utilities will be used in subsequent PRs to refactor existing
tests and add comprehensive error scenario coverage.

Related: Part 1 of hooks testing infrastructure improvements

* feat(hooks): Update tests to reflect future plans for Windows implementation
2025-10-14 15:20:34 -07:00
pashpashpash e399a70bd0 terminal-line-wrapping (#6842) 2025-10-14 15:17:36 -07:00
Toshii b52edae01e updated cline task open to include settings, yolo, and mode flags (#6840) 2025-10-14 14:47:39 -07:00
Toshii 467838ac4c adding to cline task send separate --approve and --deny flags (#6838)
* added new approve and deny, separate flags

* adding shorthand for approve and deny flags
2025-10-14 14:46:51 -07:00
Toshii 9be95f2401 updating cline task cancel to pause (#6837) 2025-10-14 14:46:28 -07:00
Ara 814988c929 feat(cli): add local installation script with improved build process (#6834) 2025-10-14 12:45:07 -07:00
Ara 7b7a006123 feat(cli): Fixes CLI authentication redirect error (#6835)
* fix: redirect for CLI after login

* fix: redirect for CLI after login
2025-10-14 12:42:59 -07:00
Juan Pablo Flores 08286a8465 docs(multiroot-workspace): enhance documentation with limitations and… (#6822)
* docs(multiroot-workspace): enhance documentation with limitations and technical details

- Add important note about experimental limitations (Cline rules and checkpoints)
- Expand technical behavior section with workspace detection, path resolution, and command execution details
- Document workspace hints syntax (@workspaceName:path/to/file) for explicit file referencing
- Reorganize content with improved section structure and "How it works" overview
- Normalize heading capitalization for consistency
- Remove outdated experimental date marker

These changes provide users with clearer understanding of multiroot workspace functionality, current limitations, and advanced features like workspace hints for precise file targeting across multiple project folders.

* Update docs/features/multiroot-workspace.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-14 11:54:47 -07:00
Saoud Rizwan d252c84a04 fix: reasoning_details not consolidated for how openrouter expects in requests (#6772)
* fix: reasoning_details not consolidated for how openrouter expects in requests

* Fix openai models getting different shape for ReasoningDetail with encrypted data

* Show richer error

* Only use last encrypted reasoning chunk for openai format reasoning details preservation

* Fix tests
2025-10-14 10:52:59 -07:00
Remy495 9cd2729d47 Include gpt-5 in reasoning models in openai.ts (#6450)
* Updated openai.ts

Updated openai.ts to passdown reasoning effort parameter for GPT-5 (only reasoning supported models)

* Added GPT-5 for Reasoning Family. Added changeset
2025-10-14 10:12:31 -07:00
celestial-vault bb94a572ac lock down org switching if remote config is detected (#6818)
Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-10-14 09:56:57 -07:00
John Costa a7ec39270b Requesty base URL cannot be unchecked (#6804)
* fix: changing base url to undefined when user unselected base url checkbox

* chore: change set
2025-10-14 02:52:16 -07:00
Toshii 600bcab19a updating the task list to read from disk and not use an instance (#6817) 2025-10-13 23:24:07 -07:00
AJ Juaire 85bf52036a Add Bedrock defaultUserAgentProvider for Cline version identification (#6821)
* Add Bedrock defaultUserAgentProvider for Cline version identification

* Use ExtensionRegistryInfo.version instead
2025-10-13 21:10:52 -07:00
Toshii 5e768aceae using a ephemeral instance for cline auth rather than default (#6819)
* updating cline auth to spawn a new instance just for auth, then close it once complete

* using contextKey for ctx
2025-10-13 20:52:24 -07:00
Sarah Fortune c166d36788 Fix deprecation warning (#6820) 2025-10-13 20:24:15 -07:00
Sarah Fortune fc8517b52d Update flakey test for getOpenTabs (#6816)
From the output of this run, it looks like that tabs are not resetting properly in between test runs. Make the file names unique per test so this is easier to debug.
https://github.com/cline/cline/actions/runs/18479896861/job/52652420536#step:12:802
2025-10-13 16:53:35 -07:00
celestial-vault c2f98b6ed7 fetch remote config when switching accounts and when starting a task (#6815) 2025-10-13 16:15:19 -07:00
celestial-vault 98c84cdc8f add interval to fetch and set remote config (#6813)
* add interval to fetch and set remote config

* clear the remote config if the user goes from an org to a private account
2025-10-13 15:51:52 -07:00
Bee cdffc002eb feat(telemetry): add OpenTelemetry integration (#6605)
* feat: Modular telemetry architecture with Jitsu provider support

- Add dual-provider telemetry architecture supporting both Jitsu and PostHog
- Implement JitsuTelemetryProvider with full API compatibility
- Add required telemetry bypass for critical system health events
- Create modular event handler base class for future extensibility
- Add Jitsu configuration with environment variable controls
- Update TelemetryService to support multiple providers with error isolation
- Add .env.example template for development setup
- Maintain backward compatibility with existing PostHog integration
- Enable easy PostHog removal via POSTHOG_TELEMETRY_ENABLED=false
- Install dotenv for local development environment support

Key benefits:
- Dual tracking during transition period
- Error isolation between providers
- Memory efficient static method architecture
- Easy provider enable/disable via environment variables
- Wednesday deployment ready for Jitsu migration

* fix(build): Load environment variables from .env file during development builds

- Add dotenv.config() to esbuild.mjs to load .env variables
- Include all telemetry-related environment variables in build injection:
  - TELEMETRY_SERVICE_API_KEY (PostHog)
  - ERROR_SERVICE_API_KEY (PostHog error tracking)
  - JITSU_WRITE_KEY (Jitsu telemetry)
  - JITSU_HOST (Jitsu host URL)
  - JITSU_ENABLED (Jitsu provider control)
  - POSTHOG_TELEMETRY_ENABLED (PostHog provider control)

This ensures telemetry services work correctly in development builds
by properly injecting API keys and configuration from .env file.

Also updates TelemetryService tests to support multi-provider architecture.

* fix(telemetry): Replace Record<string, unknown> with proper JSON-serializable types

- Add TelemetryPrimitive, TelemetryValue, TelemetryObject, and TelemetryProperties types to ITelemetryProvider
- Update JitsuTelemetryProvider to use TelemetryProperties instead of Record<string, unknown>
- Update PostHogTelemetryProvider to use TelemetryProperties instead of Record<string, unknown>
- Update TelemetryService to use TelemetryProperties for type-safe telemetry data
- Ensures all telemetry properties are JSON-serializable, preventing runtime errors
- Fixes TypeScript compatibility issue between Jitsu's JSONObject type and Record<string, unknown>

* moved and organized the telemetry files and updated the example env file to be more descriptive

* refactor: remove Jitsu telemetry provider

- Remove Jitsu provider implementation and config files
- Remove Jitsu environment variables from .env.example
- Remove Jitsu build configuration from esbuild.mjs
- Update TelemetryProviderFactory to only support PostHog
- Uninstall @jitsu/js dependency
- Add .env to .gitignore to prevent committing local env files

* chore: add changeset for Jitsu removal

* removed jitsu

* fix: update import paths after PostHogClientProvider relocation

* fix: remove race condition in captureToProviders and reorganize PostHog providers

- Changed captureToProviders from async to synchronous method
- Removed unnecessary Promise.allSettled overhead since provider.log() and provider.logRequired() are synchronous
- Changed from .map() to .forEach() for better clarity
- Moved PostHog provider files into posthog/ subdirectory for better organization
- Updated all import paths to reflect new folder structure

* refactor(telemetry): remove unnecessary addProperties method and improve type safety

- Remove addProperties helper method that used 'any' types
- Replace with inline typed spread operations in capture(), captureRequired(), and identifyAccount()
- Fix type errors in captureConversationTurnEvent and captureBrowserError
- All telemetry properties now properly typed as TelemetryProperties
- Ensures OpenTelemetry compatibility through type system enforcement

* refactor: remove dotenv dependency and use launch.json envFile

- Remove dotenv import and config() call from esbuild.mjs
- Add envFile parameter to all launch.json configurations to load .env
- Remove dotenv from package.json devDependencies

Environment variables are now loaded via VSCode's envFile feature for local
development, while CI/production continues to inject via GitHub Actions.
This provides cleaner separation between build-time and runtime environment
handling.

* feat(telemetry): add browser telemetry properties and improve typing

- Add remoteBrowserHost and endpoint fields to browser telemetry events
- Replace generic Record<string, unknown> with TelemetryObject type in EventHandlerBase for better type safety
- Import TelemetryObject type from ITelemetryProvider

These changes enhance browser telemetry tracking capabilities and improve type consistency across the telemetry service.

* feat(telemetry): add OpenTelemetry integration

Add comprehensive OpenTelemetry support alongside existing PostHog telemetry:

- Add OpenTelemetry provider with metrics and logs/events support
- Support multiple exporters: console, OTLP (gRPC/HTTP/Protobuf), and Prometheus
- Implement flexible configuration via environment variables
- Add detailed .env.example documentation with usage examples
- Integrate with existing telemetry infrastructure via TelemetryClient
- Support independent or parallel operation with PostHog
- Add proper attribute flattening for OpenTelemetry primitives
- Include configurable export intervals and protocols

This enables users to export telemetry data to any OpenTelemetry-compatible
backend (Grafana, Jaeger, etc.) while maintaining backward compatibility
with PostHog integration.

* add changeset

* Update packages

* .vscodeignore

* fixed type error

* fix(telemetry): Fix OpenTelemetry gRPC exporter endpoint format

- Strip http:// prefix from gRPC endpoints (gRPC requires 'localhost:4317' not 'http://localhost:4317')
- Clean up debug logging from OpenTelemetry provider classes
- Add helpful comment to .env.example about gRPC endpoint format

This fixes the issue where metrics were being recorded in-memory but silently
failing to export to the OpenTelemetry collector. Metrics now flow end-to-end
from the extension through the collector to Prometheus.

Verified working with test infrastructure at ~/code/@cline/cline-otel-testing

* merged from main and handled conflcits

* fix: ensure exportTimeoutMillis is less than exportIntervalMillis in OpenTelemetry metrics

Changed the timeout calculation to dynamically compute as 80% of the export interval,
capped at 30 seconds. This fixes the error: 'exportIntervalMillis must be greater than
or equal to exportTimeoutMillis' that occurred when the configured interval was less
than 30 seconds.

* feat(otel): add insecure gRPC connection support for development

- Add OTEL_EXPORTER_OTLP_INSECURE config option
- Support insecure (non-TLS) gRPC connections for local testing
- Update OpenTelemetryClientProvider to use grpcCredentials.createInsecure()
- Add comprehensive debug logging for troubleshooting
- Tested and validated with local OTel collector

This enables testing of OTLP gRPC protocol without TLS certificates,
useful for local development and testing environments.

* feat(otel): add comprehensive debug logging for troubleshooting

- Add configuration summary logging at initialization
- Log all exporter creation steps with success/failure status
- Log connection details (protocol, endpoint, insecure mode)
- Log header presence (keys only, not values for security)
- Add try-catch blocks around exporter creation with error logging
- Log reader/processor counts for validation
- Improve visibility for TLS handshake and authentication issues

* test: validate HTTP/Protobuf protocol with path appending fix

- Tested HTTP/Protobuf exporter with binary encoding
- Confirmed path appending fix works for /v1/metrics and /v1/logs
- Validated bearer token authentication over HTTP/Protobuf
- All exports successful with complete data fidelity
- Documented test results in scenario-5-http-protobuf.md

Test Status:  PASSED - HTTP/Protobuf production ready

* pre-cleanup

* refactor(telemetry): clean up OpenTelemetry provider architecture

Major refactoring to improve code quality, maintainability, and align with domain-driven design principles:

**Architecture Improvements:**
- Created OpenTelemetryExporterFactory with pure functions for exporter creation
- Extracted exporter logic from OpenTelemetryClientProvider into factory
- Removed Prometheus support (not a requirement)
- Simplified diagnostic logging with minimal wrapper gated by TEL_DEBUG_DIAGNOSTICS flag

**Interface & Provider Updates:**
- Extended ITelemetryProvider with optional incrementCounter() and recordHistogram() methods
- No OpenTelemetry types leak into provider interface (provider-agnostic)
- Implemented no-op metric stubs in PostHogTelemetryProvider
- Removed eventCounter from OpenTelemetryTelemetryProvider (was incorrectly tracking events as metrics)
- Added lazy counter/histogram creation with Map caches in OpenTelemetry provider
- Logs are now the primary telemetry path, metrics are optional/future-ready

**Code Quality:**
- ~50% reduction in complexity through factory pattern
- Clear separation of concerns between interface, implementation, client management, and exporter creation
- Improved testability with pure functions and lazy instrument creation
- Better maintainability with cleaner code structure

**Configuration:**
- Updated .env.example with comprehensive OpenTelemetry documentation
- Added TEL_DEBUG_DIAGNOSTICS flag for enabling diagnostic logging
- Clarified all configuration options with detailed comments
- Removed Prometheus references

**Verified Working:**
- All protocols tested and working: gRPC, HTTP/JSON, HTTP/Protobuf
- Bearer token authentication validated
- Console exporter functional
- Maintains full compatibility with TelemetryService interface

* OTel: make flattenProperties circular-safe with depth guard and array truncation

Use WeakSet to detect circular references; add MAX_DEPTH=10; limit arrays to 100 items with _truncated and _original_length flags; handle Date via toISOString and Error via message; skip __proto__, constructor, prototype keys; wrap JSON.stringify in try/catch.

* security: restrict sensitive OTel logging to debug mode only

Only log OTLP endpoints and header information when TEL_DEBUG_DIAGNOSTICS=true or IS_DEV=true. In production mode, only show whether these values are configured without exposing actual values. This prevents sensitive infrastructure details and authentication information from appearing in production logs.

* removed debug logging from non debug mode

* feat: add batch configuration for OpenTelemetry log processor

Add configurable batch settings for BatchLogRecordProcessor to allow tuning for different use cases:

- OTEL_LOG_BATCH_SIZE: Maximum logs per batch (default: 512)
- OTEL_LOG_BATCH_TIMEOUT: Maximum wait time in ms (default: 5000)
- OTEL_LOG_MAX_QUEUE_SIZE: Maximum queue size (default: 2048)

Benefits:
- High-volume scenarios can increase queue size to prevent dropped events
- Real-time monitoring can reduce timeout for faster exports
- Low-volume scenarios can reduce batch size to minimize delays

All settings are optional with sensible defaults matching OpenTelemetry SDK standards. Configuration is validated to ensure positive values.

* feat(telemetry): add build-time OpenTelemetry environment variable injection

Add support for injecting OpenTelemetry configuration at build time from
GitHub Actions secrets, following the same pattern as PostHog telemetry.
This enables production builds to have default OpenTelemetry collector
configuration while still allowing runtime overrides.

Changes:

1. esbuild.mjs:
   - Added build-time injection for 7 OpenTelemetry environment variables:
     * OTEL_TELEMETRY_ENABLED - Enable/disable OpenTelemetry
     * OTEL_LOGS_EXPORTER - Logs exporter type (console/otlp)
     * OTEL_METRICS_EXPORTER - Metrics exporter type (console/otlp)
     * OTEL_EXPORTER_OTLP_PROTOCOL - OTLP protocol (grpc/http/json/http/protobuf)
     * OTEL_EXPORTER_OTLP_ENDPOINT - Collector endpoint URL
     * OTEL_EXPORTER_OTLP_HEADERS - Authentication headers (e.g., bearer tokens)
     * OTEL_METRIC_EXPORT_INTERVAL - Metric export interval in milliseconds
   - Variables are read from process.env at build time and injected into
     the bundle via esbuild's define option
   - Follows exact same pattern as existing PostHog API key injection

2. .github/workflows/publish.yml:
   - Added OpenTelemetry environment variables to 'Package and Publish Extension' step
   - Variables are populated from GitHub Actions secrets
   - Applied to both release and pre-release builds

3. .github/workflows/publish-nightly.yml:
   - Added same OpenTelemetry environment variables to nightly builds
   - Ensures consistent configuration across all build types

How it works:

- Build Time (Production):
  * GitHub Actions reads secrets and sets environment variables
  * esbuild.mjs injects these values into the bundled code
  * Production builds ship with default OpenTelemetry configuration

- Runtime (Development):
  * Developers use .env file with their own configuration
  * No changes needed to existing development workflow

- Runtime (Production):
  * Users can override build-time defaults by setting environment variables
  * Runtime values take complete precedence over build-time defaults
  * Enterprise users can point to their own collectors

Next steps:
- Add GitHub secrets to repository (Settings → Secrets and variables → Actions)
- Required secrets: OTEL_TELEMETRY_ENABLED, OTEL_LOGS_EXPORTER,
  OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_ENDPOINT,
  OTEL_EXPORTER_OTLP_HEADERS
- Optional secrets: OTEL_METRICS_EXPORTER, OTEL_METRIC_EXPORT_INTERVAL

Benefits:
- Consistent with existing PostHog telemetry pattern
- Secure: production secrets stay in GitHub, not in code
- Flexible: users can override defaults at runtime
- Development-friendly: .env file continues to work as before
- Production-ready: default collector configuration for all users

* removed ai slop

* updated lock file

* fix: use ExtensionRegistryInfo.version for cross-platform compatibility

Replace process.env.npm_package_version with ExtensionRegistryInfo.version
in OpenTelemetry service version to ensure compatibility across VSCode,
JetBrains, and CLI environments.

Addresses PR #6605 inline comment from Sarah Fortune (sjf)

* fix: restore package-lock.json with proper biome dependencies

Fixes CI test failures caused by corrupted biome package entries.
Restores package-lock.json from main and reinstalls to properly
update OpenTelemetry dependencies while preserving biome integrity.

Addresses PR #6605 comment from Sarah Fortune (sjf) about test failures

---------

Co-authored-by: NightTrek <Daniels@dual4t.com>
Co-authored-by: Daniel Steigman <35793213+NightTrek@users.noreply.github.com>
2025-10-13 15:49:48 -07:00
Toshii 3dc09d698d adding to CheckSendEnabled a check for if there is a curren task (#6812) 2025-10-13 15:41:16 -07:00
Ara c04e2185f9 Fixing: Ripgrep download for integration tests (#6810)
Co-authored-by: CandiedUniverse <132302818+candieduniverse@users.noreply.github.com>
2025-10-13 14:34:47 -07:00
Daniel Steigman 3846e3fca0 Remove MULTI_ROOT_WORKSPACE feature flag (#6808)
* Remove MULTI_ROOT_WORKSPACE feature flag

The multi-root workspace feature is now rolled out to 100% of users,
so the feature flag is no longer needed.

Changes:
- Removed MULTI_ROOT_WORKSPACE from FeatureFlag enum
- Removed getMultiRootEnabled() method from FeatureFlagsService
- Updated isMultiRootEnabled() to only check user setting
- Set multiRootSetting.featureFlag to true (always enabled)
- Updated tests to remove feature flag stubs

* Add changeset for multi-root feature flag removal
2025-10-13 12:20:24 -07:00
Igor Tceglevskii 663e75203b feat: add environment-based visual indicators to UI (#6777) 2025-10-13 11:46:26 -07:00
pashpashpash c5d153551c fixing terminalapp rendering of input forms (#6807) 2025-10-13 11:40:46 -07:00
pashpashpash 1553611dbc added ripgrep download to github action workflow (#6806) 2025-10-13 10:40:28 -07:00
pashpashpash 64bd618779 version v alias (#6801) 2025-10-13 10:26:50 -07:00
pashpashpash fc32061c35 packaging ripgrep cli (#6805) 2025-10-13 10:16:53 -07:00
pashpashpash aeab0d25be onboarding cli + log verbosity cleanup + fixing bug with default instances (#6787)
* starting instance before anything else

* auth wizard from root if no credentials

* removing debug logs

* better design

* moving more things to verbose flag

* ensuring that when a new cline instance is started and there are no others, that it is set as default

* auth wizard should always have an instance at the beginning with ensuredefaultinstance

* setting welcome state to true when user inputs credentials
2025-10-13 09:44:29 -07:00
Igor Tceglevskii d19c043b14 environment override (#6784) 2025-10-13 09:21:41 -07:00
pashpashpash b5fde0adbf added instance list support for jetbrains and kill all (#6800)
* added instance list support for jetbrains and kill all

* copilot reviews
2025-10-13 00:59:59 -07:00
Daniel Steigman 7135fe4c49 feat: Add version information injection to CLI build script (#6780)
* feat: add version information injection to CLI build script

- Extract version from package.json
- Capture git commit hash, build date, and builder info
- Inject version info into CLI binaries via Go ldflags
- Update both cline and cline-host builds with version data

* chore: add changeset for CLI version injection
2025-10-13 00:18:18 -07:00
pashpashpash 1241a2fce2 some chill cleanup (#6799)
* some chill cleanup

* more cleaning
2025-10-12 23:29:35 -07:00
celestial-vault 0957e86046 remote config disable ui (#6794)
* pass remote config state to frontend and disable corresponding UI components

* move state-keys to shared folder

* fix field potentially undefined type error

* move workspace types to shared folder

* fix url validation runtime error

* add lock and tooltip to api provider dropdown and remove filtering
2025-10-12 22:33:51 -07:00
pashpashpash c7712e69d2 org selection in auth wizard in cli (#6798) 2025-10-12 22:14:41 -07:00
pashpashpash e56490106c Pashpashpash/error handling cli (#6797)
* error handling in cli

* error display
2025-10-12 22:14:24 -07:00
Alex Ker 2fce6ef194 Baseten provider Kimi K2 0711, Llama 4 Maverick and Llama 4 Scout Model APIs deprecation (#6681)
* model api deprecation

* changeset

---------

Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
2025-10-12 20:48:03 -07:00
Toshii b50c2db8b8 add instructions for using summarize task in plan and act modes (#6793) 2025-10-12 18:20:15 -07:00
pashpashpash d0da0b22db logging and cleanup (#6790) 2025-10-13 01:03:05 +00:00
Toshii cc0c9560be add setting deleted range to taskState in checkpoint object (#6788) 2025-10-12 17:33:25 -07:00
pashpashpash 844ecdee38 normie friendly root command (#6778)
* normie friendly root command

* control c logic

* prompt to cline root works

* ask question tool streaming

* simplified & unified tool handling and approval messages, and supporting edge case with attempt completion calling terminal command
2025-10-12 04:40:48 -07:00
canvrno 128b721c0e initial (#6779) 2025-10-12 07:43:35 +00:00
pashpashpash b5ae93dec9 Pashpashpash/UI enhancements cli (#6775)
* adding input to follow mode

* nice cancelling behavior

* approval wip

* fixing ask handling

* unified rendered

* textarea instead of input and unlimited width

* textarea
2025-10-11 23:13:05 -07:00
canvrno 24b5bfd77e auto-cleanup stale default instance config (#6693) 2025-10-11 23:06:17 -07:00
canvrno e7dc04fe56 Add subscribeToCheckpoints proto (#6770)
* Added subscribeToCheckpoints proto

* Following proto conventions for timestamp, better typeing
2025-10-11 21:21:50 -07:00
celestial-vault 42bad19889 remote config state setting (#6776)
* set remote config state and make it override task and global state

* remove console logs

* remove console log
2025-10-11 20:29:40 -07:00
canvrno 5c7bb7c5db Added getCwdHash proto (#6773) 2025-10-12 03:23:56 +00:00
pashpashpash 8c05a9923d help wanted (#6751) 2025-10-11 18:29:29 -07:00
celestial-vault 67ed86ada7 function to fetch remote config (#6756)
* function to fetch remote config

* remove logs

* return undefined if no org and update expected response structure

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-10-11 17:10:38 -07:00
CandiedUniverse f212ba20d6 Hooks: Initial implementation of hooks foundation logic [ENG-1011, ENG-985] (#6755)
* Initial implementation of hooks foundation

* Remove duplicate property

* Resolving/implementing TODOs and complexity refactors as per qlty test failures

* Implement tests for hooks changes

* Fix unit tests for CI windows machine (executable files need file extension)

* Adding README and improved examples in .clinerules/hooks/
2025-10-11 12:42:26 -07:00
canvrno 77e3e1e4ed CLI config list changes (#6765)
* Censor cli config list secrets

* addl redaction

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-11 03:10:29 -07:00
Ara 0858ff517a Fix CLI installation script (#6760)
* feat(install): improve CLI release detection and error handling

- Redirect error messages to stderr for proper error stream handling
- Filter releases to only match tags ending in '-cli' suffix when fetching latest
- Add explicit .tar.gz extension matching in download URL detection
- Improve error messages to be more specific about missing packages
- Add informative messages about which CLI release is being installed

This ensures the install script correctly identifies CLI-specific releases
and provides better feedback when releases or platform packages are not found.
The stderr redirection prevents error messages from being captured in command
substitutions.

* feat(install): improve shell detection and PATH configuration

- Add support for fish shell and XDG_CONFIG_HOME standard
- Check if bin directory is already in current PATH before modifying config
- Detect shell from $SHELL variable instead of relying on version variables
- Create default config file if none exists for the detected shell
- Use grep -Fq for more reliable PATH entry detection
- Support multiple possible config file locations per shell (zsh, bash, fish)

This improves the installation experience across different shell environments
and prevents duplicate PATH entries when re-running the installer.

* refactor

* better install script

---------

Co-authored-by: pashpashpash <nik@nugbase.com>
2025-10-10 20:55:35 -07:00
Ara 3472e6068c Standalone CLI Installation (#6689)
* Phase 1 download node binary

* Phase 2 include cli binaries

* Phase 3 add scripts

* Phase 4 bug fix

* Phase 5: adding install script

* Phase 6: pushing github actions

* Phase 7: fixing redundancy

* Phase 7: fixing redundancy

* Temporary commit for workspace stuff

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Adding JB fixes

* Adding JB fixes

* Adding CLI-JB fixes

* Refactor

* Refactor

* refactor

* Update release-standalone.yml

Remove VSCode packaging env vars from CLI workflow.

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-10-10 17:37:32 -07:00
canvrno a670c1efa2 CLI Auth Wizard 🧙 (#6742)
* CLI auth wizard

Default Cline model, better menu UX, display active provider and model at main menu

Model switcher for BYO providers

Provider switching, UI changes

List configured providers now shows all providers user has configured

Added remove provider feature

Changes to model picker for BYO providers

Model fetch filtering tweaks

Only update model fields for provider when possible

Consolidated provider field mapping

Change to not set provider as active when updating model

Dont set Cline as active provider when setting Cline model

Added model fetching for OpenAI provider (req API key)

Added model fetching for Ollama provider

Added support for model listing from providers.go for models without remote fetch

Moved auth specific code out of manager

Bedrock fields, OpenAI Native BaseURL

More graceful fetch failure

Fixed auth callback issue

* Added model list feature for AWS
AWS - Profile only support in CLI for now, UX changes (WIP
Remove Save and Exit option
Auto enable filtering/search in model lists
Added cancel option for some menus
2025-10-10 15:33:24 -07:00
Sarah Fortune 078f33a285 Add missing remote config setting for AWS use global inference (#6758) 2025-10-10 14:31:21 -07:00
Toshii a09f70023e remove emojis (#6746) 2025-10-10 14:22:38 -07:00
pashpashpash 4247f7f0d5 removing streaming markdown in favor of stable output (#6747)
* removing streaming markdown in favor of stable output

* proper handling of ask messages

* switching theme to auto

* fixing spacing
2025-10-10 14:22:00 -07:00
pashpashpash 787cd3063d making instance list aesthetic (#6750) 2025-10-10 14:21:44 -07:00
Sarah Fortune 33b3dde9e8 Remove out of date comment (#6757) 2025-10-10 13:43:18 -07:00
Toshii 518733d875 implement cline config get and update listing to use kebab case (#6745)
* implements the newConfigGetCommand function

* change list rendering to kebab case to match inputs
2025-10-10 09:30:57 -07:00
Saoud Rizwan 3b636e1a76 Add auto-retry with exponential backof for failed API requests (#6727)
* add first version of auto-retry failed requests

Remove auto-retry as an option and do it by default for all errors that aren't credit issues for cline provider

Fix error retry showing for insufficient credits error

remove lastAutoRetryDelay

Fixes

Fixes

Fix

Fix

remove retrymessage for consistent UI

* Create lucky-mayflies-arrive.md

* Fix autoRetryAttempt counter not getting reset
2025-10-10 04:27:31 -07:00
pashpashpash 79fd3a99d9 webfetch listdefinitions search and more tools added to cli rendering (#6740)
* webfetch listdefinitions search and more tools added to cli rendering

* code definitions

* removed .rust

* cleanup
2025-10-10 02:10:05 -07:00
CandiedUniverse b7a5e3290a Add hooks feature flag (#6734)
* Add hooks feature flag

* Re-apply the feature flag changes

* Add missing detail about setting state
2025-10-09 22:28:33 -07:00
Ara b1ae417e05 ci: add workflow to auto-label JetBrains plugin issues (#6664)
* ci: add workflow to auto-label JetBrains plugin issues

Add GitHub Actions workflow that automatically applies the 'JetBrains' label to issues when the JetBrains Plugin type is selected in the issue template. The workflow triggers on issue creation and edits, parsing the issue body to detect the plugin type selection and applying the appropriate label for better issue categorization and triage.

* Update .github/workflows/label-jetbrains-issues.yml

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* adding CLI

* Update .github/workflows/label-jetbrains-issues.yml

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-09 21:52:27 -07:00
Toshii 2d496ed62c reusing ensureConfigManager inside of setCommand (#6743) 2025-10-09 20:17:35 -07:00
Toshii 1704df14e1 adding config list command with renderer (#6741)
* adding list command with renderer

* showing empty strings for empty values
2025-10-09 19:23:03 -07:00
celestial-vault e65590c9a0 parse secret fields and set along with config set command (#6739) 2025-10-09 18:11:40 -07:00
pashpashpash a43d375366 fixed plan mode respond reading from memory in cli (#6738)
* fixed plan mode respond partial in cli and cline core

* reverting planmoderespondhandler
2025-10-09 16:26:33 -07:00
Saoud Rizwan 7f05e06d8e Update plan mode response with latest content and partial = false in yolo mode (#6737) 2025-10-09 16:21:32 -07:00
celestial-vault 724c7c778c add config set command (#6736) 2025-10-09 15:44:33 -07:00
celestial-vault 522d00411d remove dynamic state key cline:clineAccountId (#6718) 2025-10-09 15:30:43 -07:00
Toshii a92f9d459d adding config command line arg (#6735)
* adding config command line arg

* import fmt without errors
2025-10-09 14:44:22 -07:00
celestial-vault 2d58c5e9f2 add temp rpc for updating the settings in cli (#6733) 2025-10-09 14:28:16 -07:00
canvrno 835204c7eb Added updateApiConfigurationPartial with FieldMask to allow for partial ApiProvider updates (#6731) 2025-10-09 13:18:36 -07:00
pashpashpash bb4211ff2a added missing cli host stubs (#6716) 2025-10-09 13:05:26 -07:00
Sarah Fortune 261fc7f3d8 Make changes to the remote config schema (#6725) 2025-10-09 14:39:04 +00:00
celestial-vault 554e4d1b94 reorganize protos and add secrets proto message (#6720) 2025-10-08 22:18:52 -07:00
pashpashpash 6476f723d9 markdown streaming support for plan mode respond tool (#6719)
* markdown streaming support for plan mode respond tool

* consistency
2025-10-08 17:11:59 -07:00
celestial-vault beb7ada9b7 add codeowner for storage folder (#6717) 2025-10-08 16:19:46 -07:00
github-actions[bot] 2292cafbb3 v3.32.7 Release Notes (#6616)
* Add JP and Global inference profile options to AWS BedrockAdd a comment on lines R5 to R7Add diff commentMarkdown input:  edit mode selected.WritePreviewAdd a suggestionHeadingBoldItalicQuoteCodeLinkUnordered listNumbered listTask listMentionReferenceSaved repliesAdd FilesPaste, drop, or click to add filesCancelCommentStart a reviewReturn to code
* Adding Improvements to VSCode multi root workspaces
* Added markdown support to focus chain text, allowing the model to display more interesting focus chains

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-08 16:13:34 -07:00
Toshii c9550bf357 now showing historical messages for cline task view (#6711) 2025-10-08 15:09:43 -07:00
pashpashpash 0c63eaac20 cli - markdown streaming ux (#6703)
* wip

* overshooting now

* no more overshooting

* static markdown rendering for non streamed cli stuff

* more aesthetic

* plain text support, and more consistent markdown experience

* moving instance info into renderer
2025-10-08 15:08:28 -07:00
Igor Tceglevskii 8d2ee1dffb do_nothing feature flag (#6712) 2025-10-08 14:35:59 -07:00
Tomás Barreiro 0ea263c1b1 refactor: use different secret keys for each auth provider (#6630)
* refactor: user different secret keys for each auth provider

* Add changeset

* refactor

* refactor: use a constant for the secret key

* refactor: improve fallback handling
2025-10-08 12:06:38 -07:00
celestial-vault 8be46f9cfe Move MCP marketplace catalog from global state to disk cache (#5835)
* Move MCP marketplace catalog from global state to disk cache

* add cleanup function to remove catalog from vs code storage

* type fixes

* move disk related functions to disk file

* add try/catch around file/json operations

* fix weird tab formatting
2025-10-08 11:11:33 -07:00
Sarah Fortune 4469a4fea4 Remove setting Supports Browser Use (#6700) 2025-10-08 18:10:51 +00:00
canvrno feee75b158 Added multiroot docs (#6597)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-08 02:03:04 -07:00
Sarah Fortune 09933e7ad5 Add warning message to remote config schema file (#6701) 2025-10-08 00:23:23 -07:00
Sarah Fortune 5b406eca72 Add zod schema for the remote config settings (#6675)
* Add zod schema for the remote config settings MVP

Add a zod schema for the remote config settings JSON.

This is based on the doc here: https://docs.google.com/document/d/1DizuUtV_8nUKlDbkhj6psxgD0Vmn2DV-hUb92Gv369M/edit?usp=sharing

Add unit tests to check that the validation works correctly.

* Change providers from list + seperate settings, to map of provider + settings
2025-10-07 23:05:26 -07:00
celestial-vault e80e0ebc40 add oneshot command (#6695) 2025-10-07 22:45:28 -07:00
pashpashpash d14d05547d fixed ispartial handling for all cases, and cleaned up output to not … (#6691)
* fixed ispartial handling for all cases, and cleaned up output to not have emojis

* consolidating rendermessage function

* timestamps for checkpoints only

* removing useless comments

* showing terminal commands

* terminal command + browser +mcp

* removing unused timestamp argument
2025-10-07 19:22:30 -07:00
celestial-vault c3e24e5d6b add yolo flag (#6690) 2025-10-07 17:01:05 -07:00
celestial-vault 5572096947 add settings flag and settings parsing (#6682)
* add settings flag and settings parsing

* remove note

* remove auto approval settings version

* update note

* fix typo
2025-10-07 16:18:05 -07:00
Ara a85acf8898 feat(logging): replace HostProvider with node-machine-id for machine identification (#6680)
* feat(logging): replace HostProvider with node-machine-id for machine identification

Replace custom HostProvider.env.getMachineId() implementation with the
node-machine-id npm package for retrieving machine identifiers. This
simplifies the codebase by using a well-maintained library instead of
custom host provider logic.

Changes:
- Add node-machine-id dependency (^1.1.12)
- Remove dotenv dev dependency (no longer needed)
- Update distinctId service to use node-machine-id directly
- Refactor tests to stub node-machine-id instead of HostProvider
- Remove HostProvider mock utilities from tests

This change improves maintainability and reduces custom code while
maintaining the same functionality for generating stable machine IDs.

* Removing dead code
2025-10-07 13:51:42 -07:00
AJ Juaire 1eaeb1812d Add Bedrock global and jp inference profile support. (#6666)
* Add Bedrock global and jp inference profile support.

* Update package-lock.json after merging latest main

Regenerated package-lock.json to reflect the latest dependency changes
from the merged main branch updates.

* Revert "Update package-lock.json after merging latest main"

This reverts commit 2fa79acd38.
2025-10-07 11:49:09 -07:00
canvrno 9f25f8ae42 Auth refactor (#6674)
* CLI auth refactor

* changeset

* One small fix
2025-10-07 11:30:55 -07:00
nihar-oracle 816c7ede4a feat: Adding Oca mode for internal and external (#6599)
* feat: Adding Oca mode for internal and external

feat: Adding Oca mode for internal and external

* fix: Addressing cmments
2025-10-07 09:03:58 -07:00
Andrei Eternal 29139a6e13 remove global --config flag for cli (#6673)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-10-06 22:14:53 -07:00
pashpashpash c1195746d1 implemented GetHostVersionResponse rpc in the cli (#6663)
* implemented GetHostVersionResponse rpc in the cli

* undoing machine id

* removed unused uuid import
2025-10-06 18:57:40 -07:00
Toshii a33a3d9186 removing the duplicate error print value (#6670) 2025-10-06 18:03:41 -07:00
Toshii e25fbc1397 adding checkpoint restore to cli (#6669)
* add checkpoint id to messages

* adding command to allow restoring a checkpoint using ts

* add validation of the type for git restore

* validation logic that checkpoint id is valid
2025-10-06 17:59:40 -07:00
canvrno 2917cd234c Provider scripts (#6668)
* Provider auth scripts

* changeset

* Updated default providers for script
2025-10-06 16:10:07 -07:00
canvrno 63a3896669 Multiroot mentions support (#6627)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-06 14:24:43 -07:00
Daniel Steigman 529bb3a26c refactor: Support Multiple Telemetry providers (#6582)
* feat: Modular telemetry architecture with Jitsu provider support

- Add dual-provider telemetry architecture supporting both Jitsu and PostHog
- Implement JitsuTelemetryProvider with full API compatibility
- Add required telemetry bypass for critical system health events
- Create modular event handler base class for future extensibility
- Add Jitsu configuration with environment variable controls
- Update TelemetryService to support multiple providers with error isolation
- Add .env.example template for development setup
- Maintain backward compatibility with existing PostHog integration
- Enable easy PostHog removal via POSTHOG_TELEMETRY_ENABLED=false
- Install dotenv for local development environment support

Key benefits:
- Dual tracking during transition period
- Error isolation between providers
- Memory efficient static method architecture
- Easy provider enable/disable via environment variables
- Wednesday deployment ready for Jitsu migration

* fix(build): Load environment variables from .env file during development builds

- Add dotenv.config() to esbuild.mjs to load .env variables
- Include all telemetry-related environment variables in build injection:
  - TELEMETRY_SERVICE_API_KEY (PostHog)
  - ERROR_SERVICE_API_KEY (PostHog error tracking)
  - JITSU_WRITE_KEY (Jitsu telemetry)
  - JITSU_HOST (Jitsu host URL)
  - JITSU_ENABLED (Jitsu provider control)
  - POSTHOG_TELEMETRY_ENABLED (PostHog provider control)

This ensures telemetry services work correctly in development builds
by properly injecting API keys and configuration from .env file.

Also updates TelemetryService tests to support multi-provider architecture.

* fix(telemetry): Replace Record<string, unknown> with proper JSON-serializable types

- Add TelemetryPrimitive, TelemetryValue, TelemetryObject, and TelemetryProperties types to ITelemetryProvider
- Update JitsuTelemetryProvider to use TelemetryProperties instead of Record<string, unknown>
- Update PostHogTelemetryProvider to use TelemetryProperties instead of Record<string, unknown>
- Update TelemetryService to use TelemetryProperties for type-safe telemetry data
- Ensures all telemetry properties are JSON-serializable, preventing runtime errors
- Fixes TypeScript compatibility issue between Jitsu's JSONObject type and Record<string, unknown>

* moved and organized the telemetry files and updated the example env file to be more descriptive

* refactor: remove Jitsu telemetry provider

- Remove Jitsu provider implementation and config files
- Remove Jitsu environment variables from .env.example
- Remove Jitsu build configuration from esbuild.mjs
- Update TelemetryProviderFactory to only support PostHog
- Uninstall @jitsu/js dependency
- Add .env to .gitignore to prevent committing local env files

* chore: add changeset for Jitsu removal

* removed jitsu

* fix: update import paths after PostHogClientProvider relocation

* fix: remove race condition in captureToProviders and reorganize PostHog providers

- Changed captureToProviders from async to synchronous method
- Removed unnecessary Promise.allSettled overhead since provider.log() and provider.logRequired() are synchronous
- Changed from .map() to .forEach() for better clarity
- Moved PostHog provider files into posthog/ subdirectory for better organization
- Updated all import paths to reflect new folder structure

* refactor(telemetry): remove unnecessary addProperties method and improve type safety

- Remove addProperties helper method that used 'any' types
- Replace with inline typed spread operations in capture(), captureRequired(), and identifyAccount()
- Fix type errors in captureConversationTurnEvent and captureBrowserError
- All telemetry properties now properly typed as TelemetryProperties
- Ensures OpenTelemetry compatibility through type system enforcement

* refactor: remove dotenv dependency and use launch.json envFile

- Remove dotenv import and config() call from esbuild.mjs
- Add envFile parameter to all launch.json configurations to load .env
- Remove dotenv from package.json devDependencies

Environment variables are now loaded via VSCode's envFile feature for local
development, while CI/production continues to inject via GitHub Actions.
This provides cleaner separation between build-time and runtime environment
handling.

* feat(telemetry): add browser telemetry properties and improve typing

- Add remoteBrowserHost and endpoint fields to browser telemetry events
- Replace generic Record<string, unknown> with TelemetryObject type in EventHandlerBase for better type safety
- Import TelemetryObject type from ITelemetryProvider

These changes enhance browser telemetry tracking capabilities and improve type consistency across the telemetry service.
2025-10-06 12:05:32 -07:00
celestial-vault 541b51c0fb Add watch build script (#6655)
* add dev command for cline-core changes for cli

* add cli watch build command

* remove other script
2025-10-06 11:53:15 -07:00
Toshii 77395a3088 adding send as a top level command (#6661) 2025-10-06 11:47:16 -07:00
Igor Tceglevskii 124fc6f147 add logout reason tracking and improve cleanup handling (#6657)
- Add LogoutReason enum to track different logout scenarios
- Update handleDeauth() calls to include logout reasons
- Move auth storage cleanup from Controller to AuthService for better encapsulation
- Add telemetry events to capture logout reasons for analytics
2025-10-06 08:57:58 -07:00
pashpashpash 097f8e6239 cline cli super alpha (#6644)
* super sketchy big merge with main

* gitignore

* gitignore

* Delete cli/bin/air

* Delete cli/bin directory

* Delete cli/cline-host

* Fix missing package.json in cli

Copy the package JSON into the dist-standalone dir during compilation.
Remove workaround for missing package.json

* Update scripts/build-cli.sh

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Remove reference to watchservice, it has been removed

* Update scripts/build-go-proto.mjs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix timestamp to string conversion

* diff.go ellipsis fix

* COMMON_TYPES

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-03 15:04:00 -07:00
Sarah Fortune a037ba8965 Make the results of the GH test workflow easier to understand & fix windows tests (#6628)
* Dont use continue-on-error in the GH workflow

Using continue-on-error makes the tests appear as passed even when they failed and this is confusing

* Increase timeout for getOpenTabs test

* Dont run any tests if the build step failed

* Update .github/workflows/test.yml

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Fix getOpenTabs on tabs

```
Extension host test runner error 1 test failed.
  1 failing
  1) Hostbridge - Window - getOpenTabs
       should return all tabs including deleted files:
     Error: EBUSY: resource busy or locked, rmdir 'C:\Users\RUNNER~1\AppData\Local\Temp\vscode-test-O06Qnd'
```

The test is failing because the clean can't delete the temp directory it created, just surround it with try/catch.

* Add debug logs to the openTabsTest

* Increase the timeout on the e2e tests

I see this test timing out, so try increasing the timeout
https://github.com/cline/cline/actions/runs/18209633465/job/51847553463?pr=6628

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-10-03 13:49:00 -07:00
Ara f9f96b0e8a Bug Fix: replace featureFlagsService with isMultiRootEnabled utility (#6631)
* refactor: replace featureFlagsService with isMultiRootEnabled utility

Replace direct usage of featureFlagsService.getMultiRootEnabled() with the
isMultiRootEnabled() utility function throughout the codebase. This change:

- Centralizes multi-root feature flag logic in a single utility function
- Removes dependency on featureFlagsService in task and tool modules
- Passes stateManager to isMultiRootEnabled() for consistent state access
- Improves code maintainability by reducing coupling to the feature flags service

The refactoring affects Task class initialization, system prompt generation,
workspace root formatting, and auto-approve functionality.

* cancel button
2025-10-03 11:48:05 -07:00
celestial-vault a5699e883d Make statemanager global singleton (#6619)
* do not initialize duplicate statemanager in migration; use vscode api directly

* make state manager a singleton

* move statemanager init to common.ts
2025-10-02 21:18:57 -07:00
Bee 1cee9f33a7 feat: feature flag for cline auth provider (#6629) 2025-10-03 04:01:12 +02:00
pashpashpash 1b1e66f9d1 cli <--> main sync (#6576)
* adding cli args to cline core for ports and cline directory

* added locking

* data dir is correct

* final touches

* added better sqlite3 dep

* fs

* making help text more accurate

* touch instance at the end

* shutdown impl

* moving SETTINGS_SUBFOLDER const to vscode-context

* not calling process exit in protobus or hostbridge, handling that in cline core with proper graceful shutdown

* hostbridge port default

* package lock

* sigh, biome auto updated and daniels mcp hub change caused issues. locking biome

* fixed package-lock
2025-10-02 16:45:19 -07:00
Nick Baumann 888968d387 Update local models docs: remove emojis, add Qwen3 Coder recommendations, improve guidance (#6624) 2025-10-02 16:28:18 -07:00
canvrno 3fa41068ba Added checkpoints warning for multiroot scenarios (#6615)
* Added checkpoints warning for multiroot scenarios

* changeset

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-02 15:01:11 -07:00
celestial-vault 4c820db231 do not initialize duplicate statemanager in migration; use vscode api directly (#6614) 2025-10-02 14:26:47 -07:00
Sarah Fortune afa3eed7eb Update scripts/runclinecore.sh to include platform specific node module path (#6618)
With the introduction of better sqlite, this script needs to set the correct path for platform specific node modules. The logic is copied from the JB plugin (the vscode extension does not set the node modules path).
2025-10-02 14:21:39 -07:00
Daniel Steigman 9b6a120da4 feat(focus-chain): Render checklist items as markdown (#6452)
* feat(focus-chain): Render checklist items as markdown

This change introduces markdown rendering for both the header and individual items in the focus chain checklist. It leverages the existing MarkdownBlock component and adds a 'compact' mode to ensure proper alignment and spacing.

* feat: Add LightMarkdown component for memory-efficient rendering

- Create ultra-lightweight LightMarkdown component as memory-efficient alternative to MarkdownBlock
- Support bold (**text**), italic (*text*), and headers (# text) with cached regex patterns
- Replace MarkdownBlock with LightMarkdown in ChecklistRenderer and FocusChain components
- Eliminate heavy remark/rehype pipeline, AST parsing, and syntax highlighting for simple text formatting
- Significantly reduce memory usage and GC pressure in focus chain and checklist rendering
- Fix linting errors and ensure proper React element handling

This optimizes memory usage for components that only need basic markdown formatting,
while preserving full MarkdownBlock functionality where advanced features are needed.

* LightMarkdown: super-lightweight emphasis parser (bold/italic only); single-pass O(n) scan with memoization; remove headers; disable underscore emphasis to avoid snake_case false positives
2025-10-02 13:38:02 -07:00
Sarah Fortune 80f84b551e Log env vars in cline-core (#6595) 2025-10-01 16:00:39 -07:00
github-actions[bot] 8456f45a80 v3.32.6 Release Notes (#6579)
* Add experimental support for VSCode multi root workspaces
* Add Claude Sonnet 4.5 to Claude Code provider
* Add Glm 4.6 to Z AI provider

Updated version to 3.32.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-01 15:18:16 -07:00
canvrno e288bb9e4f Adjusted position and wording of multiroot settings (#6590)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-01 11:24:49 -07:00
celestial-vault a369551a9e fix: resolve CSS @import ordering issue for Tailwind CSS v4 compatibility (#6463)
- Move external @import statements before Tailwind imports to prevent PostCSS errors
- Add comprehensive documentation explaining import order requirements
- Fix build failure caused by '@import must precede all other statements' error

The issue occurred because Tailwind CSS v4 expands its imports into thousands of
lines of generated CSS, causing external imports to appear after CSS rules in
the final compiled output, violating CSS specifications.
2025-10-01 11:24:07 -07:00
celestial-vault b0fa1be2df Accept task settings in init task (#6342)
* v3.28.5 Release Notes

* changeset version bump

* Updating CHANGELOG.md format

* Update changelog for patch release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* Add task-specific settings caching to StateManager (#6171)

* Add task-specific settings caching to StateManager

Implement per-task settings storage with automatic loading/clearing:
- Add taskStateCache for isolated task settings
- Load task settings on task creation and reinitialize
- Clear task settings cache when tasks end
- Prioritize task cache over global state in getters

* update error wording for taskSettings read failure

* add missing return statement in promise.all

* fix: persist pending task settings before clearing cache

Changed clearTaskSettings to be async and ensure any pending task state
changes are persisted to storage before clearing the in-memory cache.
This prevents potential data loss when a task ends with unpersisted
settings still in the pending state queue.

- Made clearTaskSettings async and added optional taskId parameter
- Added logic to persist pending task state batch before clearing
- Updated controller to await clearTaskSettings and pass taskId

* add ability to set task setting overrides in newtask rpc

* spread proto object keys that don't need to be transformed and filter undefined values

* use most Settings fields in TaskSettings proto and convert fields that do not directly map to the application typescripts type of Settings

* accept taskSettings in newTask RPC and save them to task state

* remove test taskSettings in useMessageHandlers

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-01 11:00:21 -07:00
Ara 793db91291 Adding support for GLM-4.6 (#6589) 2025-10-01 10:42:40 -07:00
canvrno 9cb0e51ffc Feat: Exclude deleted files from environment_details visible/open tabs context (#6014)
* Change to hide deleted files from the visible files/tabs environment_details

* Moved filtering logic to extension

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-01 10:11:44 -07:00
canvrno d68bf862a8 Provide model with better environment details in multiroot scenarios (#6585)
* Provide model with better env details in multiroot scenarios

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-10-01 01:24:18 -07:00
Sarah Fortune c2f69737aa Improve the git commit message generator (#6583)
* Commit message generator shouldn't create it's own StateManager, just use the one from the webview.
* Use the correct Cline logo
* Move it into the vscode specific directory, it uses too many VSCode APIs to work cross-platform.
2025-09-30 23:56:04 -07:00
Ara 99b8b92b27 Adding Telemetry for multi root workspace (#6580)
* Adding Telemetry for multi root workspace

* Taking out command runner

* Refactoring
2025-09-30 18:42:15 -07:00
Ara 1239fe1b33 Fixing parsing issues for workspace hints (#6559)
* Fixing regex parsing for workspace hints

* Fixing regex parsing for workspace hints

* test

---------

Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-30 17:01:33 -07:00
Tomás Barreiro 062e597b74 feat: Add Claude Sonnet 4.5 to Claude Code (#6573)
* feat: Add Claude Sonnet 4.5 to Claude Code

* add changeset

* Add support for the latest opus and sonnet models

* fix tests
2025-09-30 14:48:44 -07:00
Ara d099be10fd Adding Telemetry for @ mention usage (#6499)
* cjage

* Refactoring
2025-09-30 14:23:51 -07:00
canvrno 3e8268605f Update Cline provider headers (#6575)
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-30 13:50:04 -07:00
Saoud Rizwan 1615bf3f82 fix: set max thinking budgets to avoid overflow when switching models with different budget limits 2025-09-30 13:11:17 -07:00
kvyb 15f713d26a Pass host telemetry requests (#6444)
* feat: add ideId to headers

* Add IDE-id to telemetry and request headers

* feat: send X-IDE-ID/X-IDE-VERSION headers; cache host version in EnvService

* feat: send X-IDE-ID/X-IDE-VERSION/X-CLIENT-VERSION

* Address PR feedback: single RPC call, remove cache, use ExtensionRegistryInfo, remove redundant ide_id

* feat: align headers with backend

* fix: PR feedback; EnvUtils and aligned headers with backend;
2025-09-29 22:52:06 -07:00
kvyb 5babd9e061 fix: keep fuzzy search active in chat input after selecting Add File/… (#6078)
* fix: keep fuzzy search active in chat input after selecting Add File/Folder

* fix: mentions, strip leading '/' and enforce file/folder-only results

* fix: improve readability of filteredDynamic

* fix: improve readability of selectedTypeValue
2025-09-30 07:47:58 +03:00
celestial-vault ba12672600 Remove open in editor button (#6462)
* first pass of removing all related code

# Conflicts:
#	src/hosts/external/ExternalWebviewProvider.ts
#	src/hosts/vscode/VscodeWebviewProvider.ts

* remove more things

* rename all sidebarWebviews to webview

* remove null from getInstance and remove null checks

* remove client id logic and update RPC subscriptions to match this

* add back extension.test.ts without irrelevant webview panel tests

* Refresh CI cache - fix proto compilation

* add comment to try to invalidate CI cache

* add clean script to test.yml for test-platform-integration

* remove clean script didn't work

* finally found the error in the code - linter wasn't highlighting it

* Don't delete unrelated tests in this PR

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2025-09-29 21:15:17 -07:00
Sarah Fortune 163bf77677 Add a way for cline-core to get the version of the client. (#6553)
Add fields to the getHostVersion RPC that return the version of the cline-core client (e.g. the extension or plugin version).
2025-09-29 21:08:30 -07:00
Saoud Rizwan edf5ea00f6 Change task timeline item hover style 2025-09-29 20:18:47 -07:00
github-actions[bot] c3c80ffc4d v3.32.5 Release Notes (#6552)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-29 18:17:17 -07:00
Saoud Rizwan f14ed8506d Use state to manage NewModelBanner presentation 2025-09-29 18:17:17 -07:00
Saoud Rizwan 41202df74e Add prompt to encourage Sonnet 4.5 to use multiple search/replace blocks in a diff edit call rather than as separate requests 2025-09-29 18:17:14 -07:00
Saoud Rizwan ab88599e05 Add ContextWindowSwitcher component to easily switch between 200k and 1m context models 2025-09-29 16:03:23 -07:00
celestial-vault c2dc0e531c make task constructor typed object (#6558) 2025-09-29 15:45:17 -07:00
Juan Pablo Flores 246b0fa999 Add documentation for changes introduced in 3.30 (#6512)
* docs: update what-is-cline to use generic IDE references

Updated documentation to replace VS Code-specific references with generic "IDE" terms, making it applicable to modern IDEs beyond VS Code for broader compatibility.

* docs: expand Cline installation guide with comprehensive setup instructions

- Add prerequisites section with account creation and editor compatibility
- Include detailed installation steps for VS Code/Cursor and JetBrains IDEs
- Add troubleshooting sections for common installation issues
- Expand editor support information and setup guidance
- Improve documentation structure with tabs and accordions for better UX

* docs: remove font weight and reorder getting started pages

- Remove font weight property from fonts configuration
- Reorder getting started pages to place installation before model selection guide

* fixes title font-weight to original values

* docs: improve JetBrains plugin installation link text

Replace generic URL text with descriptive "JetBrains Marketplace" link text for better user experience and accessibility in the Cline installation guide.

* docs: add voice mode feature documentation and cross-references

Add comprehensive documentation for Voice Mode feature including setup instructions, use cases, and technical requirements. Also add cross-reference tip in plan-and-act.mdx to promote voice mode usage during planning discussions.

* docs: rename voice-mode to dictation for clarity

Rename voice-mode.mdx to dictation.mdx and update all references throughout the documentation to use "Dictation" instead of "Voice Mode" for more accurate terminology and better user understanding.

* feat(docs): add YOLO mode documentation

Add comprehensive documentation for YOLO mode feature, covering auto-approval functionality, safety warnings, use cases, and best practices for autonomous operation.

* docs: reorganize navigation structure and add redirect for JetBrains install page

- Remove JetBrains installation page from getting-started section
- Reorder Features section with @ Mentions first, followed by alphabetically sorted individual features
- Move Slash Commands group after individual features and add workflows page
- Add yolo-mode feature to the end
- Add redirect from old JetBrains install path to main installation guide

* docs: improve JetBrains logo visibility and simplify dictation instructions

- Remove Frame wrapper around JetBrains logo for cleaner markup
- Add CSS styling to ensure JetBrains logo visibility in dark mode with background, border, and hover effects
- Simplify dictation instructions by removing redundant recording state description
2025-09-29 15:33:48 -07:00
Nick Baumann 6c099fbe12 docs: update documentation for Claude Sonnet 4.5 release (#6556)
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-29 15:33:29 -07:00
lcs-bdr 00bf05c26c Fix repeated API error 400 in SAP AI Core provider (#6537)
* only add reasoning_details if available

* add changeset

* simplify patch
2025-09-29 15:28:24 -07:00
Walter Korman da99e2bf4b fix: update vercel provider cost note and sign-up url (#6551) 2025-09-29 15:27:31 -07:00
nihar-oracle 963e2c00eb fix: Fixing refresh logic (#6542)
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-29 15:26:37 -07:00
Jose Castelli 9355d61bc1 updating .github codeowners (#6539) 2025-09-29 15:26:01 -07:00
Saoud Rizwan a9e17fee57 Fix thinking slider starting at min rather than 0 2025-09-29 15:22:51 -07:00
Saoud Rizwan 3e8548a341 Improve thinking budget slider UI to take up less space 2025-09-29 14:58:09 -07:00
Saoud Rizwan 76b86ff0c0 v3.32.4 Release Notes 2025-09-29 14:15:02 -07:00
Saoud Rizwan 684438b44c Add Sonnet 4.5 to GCP Vertex 2025-09-29 14:15:02 -07:00
AJ Juaire 3c84388fb2 feat: Add Amazon Bedrock us-west-1 support. (#6550)
docs: https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html
2025-09-29 14:01:33 -07:00
Saoud Rizwan b0f86201d2 Add prompt caching support for OpenRouter's anthropic/claude-4.5-sonnet model 2025-09-29 13:56:35 -07:00
Jose Castelli d1fc59758e Reduce Test Workflow Time by 45% and Enable Qlty Coverage on Main (#6374)
* improving test workflow

* testing pipeline improvement

* testing new run

* adding missing protos

* adding previous cache + restoring dev dep version

* restoring webview package lock

* scripts update

* fixing old flaky test

* fixing old flaky test

* changeset update

* adding test-platform-integration again

* adding quality check for integration platform
2025-09-29 13:50:56 -07:00
Saoud Rizwan 87c9f58902 Add 1m context window support to Sonnet 4.5 2025-09-29 13:49:31 -07:00
Saoud Rizwan cda3eb8236 fix: task timeline showing text and reasoning items 2025-09-29 12:31:41 -07:00
John Costa 3c21d2be1f fix: returning undefined when URL is not valid (#6377)
* fix: returning undefined when URL is not valid

This can happen when the user is typing, and once it was set there was
no way of changing it.

* adding change set
2025-09-29 12:19:23 -07:00
Saoud Rizwan f3adf68775 v3.32.3 Release Notes 2025-09-29 11:50:11 -07:00
Saoud Rizwan 6bd3181133 Add Sonnet 4.5 to Bedrock; add model banner announcing Sonnet 4.5; modify bug report 2025-09-29 11:38:02 -07:00
github-actions[bot] dd3a234a69 v3.32.2 Release Notes (#6511)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-29 10:53:49 -07:00
Saoud Rizwan c496f8a90d Fix OpenRouter model id 2025-09-29 10:47:00 -07:00
Saoud Rizwan 25b1cf91fc Add fixed Sonnet 4.5 support 2025-09-29 10:40:15 -07:00
Saoud Rizwan b54e2043fe Revert "Add Claude Sonnet 4.5 (#6544)"
This reverts commit 98e5ccc547.
2025-09-29 10:26:31 -07:00
Saoud Rizwan 98e5ccc547 Add Claude Sonnet 4.5 (#6544) 2025-09-29 10:10:04 -07:00
Sarah Fortune 813a9589d0 Replace VSCode API with the host bridge. (#6529)
Add a method to the host bridge to open and focus the terminal panel.
2025-09-28 19:12:09 -07:00
Sarah Fortune 64eb66d49a Move getGlobalStorageDir out of the HostProvider into disk.ts (#6530) 2025-09-28 19:11:59 -07:00
Sarah Fortune 8c17d864c8 Replace VSCode API with Host Provider (#6527)
VSCode API doesn't work cross-platform, this should use the host provider instead.
2025-09-28 18:18:55 -07:00
Sarah Fortune 4f931c2d9d Handle quotes and other special chars in the curl request (#6525)
This workflow didn't work if the PR title contained quotes, e.g.
https://github.com/cline/cline/pull/6523 - Don't show VS Code LM provider on non-VSCode platforms
2025-09-28 17:50:46 -07:00
Sarah Fortune 5836db3093 [disk.ts] Replace uses of context.globalStorageUri with HostProvider.get().globalStorageFsPath (#6507)
* Fix ellipsis warning

# Conflicts:
#	src/services/test/TestServer.ts

* [disk.ts] Replace uses of context.globalStorageUri with HostProvider.get().globalStorageFsPath

This is part of removing dependencies on the VSCode API fom the codebase except for in platform specific code in src/hosts/vscode and src/extension.ts.

Remove unused vscode context param.

* Remove constructors that just call super()
2025-09-28 17:39:19 -07:00
Sarah Fortune 18879edf9f Don't include VS Code LM API for non-VSCode platforms (#6523) 2025-09-28 17:38:52 -07:00
celestial-vault 1cc702c8b9 remove getCurrentMode function in favor of state manager (#6418) 2025-09-28 15:34:52 -07:00
Saoud Rizwan c8caa6f9b9 fix: command execution not sending output to webview and incorrectly showing 'Proceed while Running' when finished (#6522) 2025-09-28 15:29:21 -07:00
Saoud Rizwan 01f61b6765 Make first checkpoint async to unblock UI 2025-09-28 12:20:47 -07:00
Saoud Rizwan b8dd6abe61 Add /task deep link handler (#6513)
* Add /task deep link handler

* Add deep link handler for /task
2025-09-28 02:23:09 -07:00
github-actions[bot] fb7f0e36fe v3.32.1 Release Notes (#6488)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-28 00:00:26 -07:00
Saoud Rizwan 403a32b69c Disable TaskFeedbackButtons 2025-09-27 23:18:22 -07:00
Saoud Rizwan ee6daed7bb Change task timeline items border radius 2025-09-27 23:13:30 -07:00
Saoud Rizwan 55ffe9e5dd Update task timeline colors 2025-09-27 23:07:16 -07:00
Saoud Rizwan c2ec5fd17d Update Settings design and 'About' section 2025-09-27 22:59:07 -07:00
Saoud Rizwan 5a84cb1145 Use SlidersHorizontal icon for API Configuration tab in Settings 2025-09-27 22:41:09 -07:00
Saoud Rizwan aec2fd5a7b fix: planActSeparateModelsSetting defaulting to true for new users after reload 2025-09-27 22:33:57 -07:00
Tomás Barreiro 5826cb584e fix: cline accounts using stale id token at refresh response (#6509) 2025-09-27 22:16:25 -07:00
Sarah Fortune 76232639c3 [Tasks directory] Replace uses of context.globalStorageUri with HostProvider.get().globalStorageFsPath (#6420)
* Replace uses of context.globalStorageUri with HostProvider.get().globalStorageFsPath for task directory

This is part of removing dependencies on the VSCode API fom the codebase except for in platform specific code in src/hosts/vscode and src/extension.ts.

Remove unused vscode context param.

* Fix test ModelContextTracker.test.ts

* Fix test FileContextTracker.test.ts
2025-09-27 17:47:27 -07:00
celestial-vault 3173483c0f remove task class enable checkpoints variable and directly use statemanager (#6491) 2025-09-27 16:38:23 -07:00
Sarah Fortune 8caf37600b Fix problem compiling integration tests (#6498)
Fixes the error below. The integraion tests are compiled to CommonJS and cannot import an .mjs directly.

```
> claude-dev@3.32.0 compile-tests
> node ./scripts/build-tests.js

node:child_process:957
    throw err;
    ^

Error: Command failed: tsc -p ./tsconfig.test.json --outDir out
    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at checkExecSyncError (node:child_process:882:11)
    at execSync (node:child_process:954:15)
    at Object.<anonymous> (/Users/sjf/cline/scripts/build-tests.js:56:1)
    at Module._compile (node:internal/modules/cjs/loader:1734:14)
    at Object..js (node:internal/modules/cjs/loader:1899:10)
    at Module.load (node:internal/modules/cjs/loader:1469:32)
    at Function._load (node:internal/modules/cjs/loader:1286:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
  status: 2,
  signal: null,
  output: [
    null,
    "src/core/task/index.ts(3,65): error TS7016: Could not find a declaration file for module '@anthropic-ai/sdk/resources/index.mjs'. '/Users/sjf/cline/node_modules/@anthropic-ai/sdk/resources/index.mjs' implicitly has an 'any' type.\n" +
      "  There are types at '/Users/sjf/cline/node_modules/@anthropic-ai/sdk/resources/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.\n",
    ''
  ],
  pid: 22680,
  stdout: "src/core/task/index.ts(3,65): error TS7016: Could not find a declaration file for module '@anthropic-ai/sdk/resources/index.mjs'. '/Users/sjf/cline/node_modules/@anthropic-ai/sdk/resources/index.mjs' implicitly has an 'any' type.\n" +
    "  There are types at '/Users/sjf/cline/node_modules/@anthropic-ai/sdk/resources/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.\n",
  stderr: ''
}

Node.js v23.11.0
```
2025-09-27 13:07:29 -07:00
Igor Tceglevskii 58b14c69b1 CLINE_ACTIVE usage (#6471) 2025-09-27 10:02:05 -07:00
Saoud Rizwan b831100f20 feat: preserve reasoning traces for cline/openrouter/anthropic providers to maintain conversation integrity (#6495)
* feat: preserve reasoning traces for cline/openrouter/anthropic providers to maintain conversation integrity

* Add reasoning trace preservation for providers

This change introduces a feature to preserve reasoning traces for specific providers, enhancing conversation integrity.

* Update src/core/api/transform/openai-format.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-27 06:17:10 -07:00
Saoud Rizwan 23fa305eac Enable thinking by default for models that support it to reduce text verbosity in chat (#6493)
* Enable thinking by default for models that support it to reduce text verbosity in chat

* Refactor
2025-09-27 05:42:57 -07:00
Saoud Rizwan 0762e6406d fix: sending message during interactive command would show double checkpoints 2025-09-27 00:55:15 -07:00
Sarah Fortune 94da9f6669 Only show the info banner messages about the right sidebar in VSCode (#6492)
Add a `type` field to the PlatConfig with type of the IDE: VSCode, standalone, etc.
Make the info banner conditional on the type.
Quiet the gRPC logs on startup.
2025-09-26 19:37:58 -07:00
Saoud Rizwan fdeef9cece fix: uses homedir instead of hardcoded tilde for MCP path 2025-09-26 17:51:54 -07:00
lcs-bdr dd055b3327 fix: add retry logic to SAP AI Core provider (#6453)
* Use retry behavior for SAP AI Core provider

* add changeset
2025-09-26 12:47:08 -07:00
Igor Tceglevskii e852c6953b force no proxy for hostbridge connection (#6474) 2025-09-26 12:06:02 -07:00
github-actions[bot] aef27eb1c4 v3.32.0 Release Notes (#6487)
* Added the new code-supernova-1-million stealth model, available for free and delivering a 1 million token context window
* Changes to inform Cline about commands that are available on your system

Updated version to 3.32.0 

Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
2025-09-26 10:32:37 -07:00
Ara 863572031f Empty PR to bump changeset (#6485) 2025-09-26 09:45:12 -07:00
pashpashpash 65eee1ac6a add code-supernova-1m (#6458)
* add code-supernova-1m

* Update src/core/api/providers/cline.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixing cache price

* wording

* Update webview-ui/src/components/chat/Announcement.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Fix announcement content

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-09-26 08:19:39 -07:00
Bee 8213b0b910 Update E2E Test for Chat input (#6470)
* Update E2E Test for Chat input

* update

* typo
2025-09-26 10:00:32 +08:00
Bee f5fc3fed6f test: skip API request failure check to prevent Windows timeout (#6468)
Remove API request failure assertions that cause test timeouts on Windows due to longer API request failure times, while preserving other test functionality
2025-09-25 17:51:33 -07:00
celestial-vault 42df03177f feat: add HeroTooltip to conversation history button (#6466)
- Rename OpenDiskTaskHistoryButton to OpenDiskConversationHistoryButton
- Add HeroTooltip for consistent UI experience
- Update protobuf service and backend handler
2025-09-25 17:22:43 -07:00
Bee 648ae1b1fd feat(chat): add scroll to top functionality (#6423)
* feat(chat): add scroll to top functionality

- Add scroll to top button when action buttons are not visible
- Pass virtuosoRef to ActionButtons component for scroll control
- Enhance scroll button logic to handle both up and down directions

* Update aria-label
2025-09-25 17:10:25 -07:00
Saoud Rizwan d3cff6ac47 fix: search tool long regex string causing overflow in chatview 2025-09-24 23:38:25 -07:00
github-actions[bot] 13af435103 v3.31.1 Release Notes (#6451)
* changeset version bump

* Updating CHANGELOG.md format

* Update changelog for version 3.31.1

Added details about installed CLI tools and renamed MCP tab.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-24 23:08:59 -07:00
Saoud Rizwan 3b1477bc24 Rename MCP tab 'Installed' to 'Configure' (#5966)
* Rename MCP tab 'Installed' to 'Configure'

* Fix component name

* Fix errors; update docs

* Create green-wasps-brush.md
2025-09-24 23:05:23 -07:00
Saoud Rizwan 688f93db6d Show ToS update for cline account users 2025-09-24 23:00:41 -07:00
Saoud Rizwan a702270e85 Fix import linter error 2025-09-24 21:57:30 -07:00
Saoud Rizwan 03acada1b9 Fix padding in checkpoints error 2025-09-24 21:56:43 -07:00
adam jones 95cca05f5e Add CLI tools detection to environment details (#5471)
- Auto-detect available CLI tools in system PATH
- Add detected tools to environment context for AI models
- Include comprehensive list of common developer tools (gh, docker, aws, etc.)
- Cross-platform support using 'which' on Unix and 'where' on Windows

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-24 21:49:25 -07:00
Saoud Rizwan 33d77eb095 Copy changes 2025-09-24 21:16:25 -07:00
github-actions[bot] 3e0c39acbb v3.31.0 Release Notes (#6379)
* changeset version bump

* Updating CHANGELOG.md format

* Update package.json

* Update changelog for version 3.31.0

Updated version to 3.31.0 and added new features and improvements.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-24 18:33:47 -07:00
Saoud Rizwan 366d8a5411 Fix failing integration test due to duplicate test id 2025-09-24 18:25:13 -07:00
Saoud Rizwan d22596e5c2 Update announcement banner content (#6448) 2025-09-24 18:06:25 -07:00
Saoud Rizwan 7cc612dbce Fix right sidebar banner and docs (#6446) 2025-09-24 18:02:44 -07:00
Ara f0cab63a43 Fixing icons and positioning for UI for voice mode (#6445)
* Minor UX fixes for voice mode

* Minor UX fixes for voice mode

* Minor UX fixes for voice mode

* Fix alignment of stop icon

---------

Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
2025-09-24 16:20:27 -07:00
Saoud Rizwan 3c1b670b73 fix: cline not knowing plan/act mode if compact mode is enabled (#6443) 2025-09-24 15:31:42 -07:00
Ara 5de05d68ef Restricting voice mode to mac os only (#6442) 2025-09-24 15:15:44 -07:00
Saoud Rizwan 9b6b1c376c Revert focus chain design changes (#6441)
This reverts commit e5e26f45fa.

Revert "Update colors and width of focus chain (#6437)"

This reverts commit b794583b7a.

Revert "Update task header and focus chain UI design (#6415)"

This reverts commit 011b19225e.

Fix

Fix
2025-09-24 14:50:30 -07:00
Saoud Rizwan e5e26f45fa Decrease focus chain height 2025-09-24 13:55:31 -07:00
Saoud Rizwan b794583b7a Update colors and width of focus chain (#6437) 2025-09-24 13:44:54 -07:00
celestial-vault ca96bd8f62 add infobanner (#6294)
* add infobanner

* fix type and update docs url

* restructure test to not include brittle elements; it is not clear why this banner was even added to auth tests

* move update info banner logic into rpc
2025-09-24 13:37:40 -07:00
Bee 0ecdf8d0cc update CompactTaskButton tooltip content and styling (#6424) 2025-09-24 13:10:44 -07:00
Jose Castelli 5be6ba68a3 Testing Platform - Support partial response validation via meta.expected (#6399)
Testing Platform - Support partial response validation via meta.expected
2025-09-24 20:03:32 +02:00
celestial-vault 1bdd1e943f Add docs for opening cline in right sidebar (#6292)
* Add docs for opening cline in right sidebar

* use frame tags

* change to gifs

* docs(customization): refactor sidebar instructions with Steps component

Updated opening-cline-in-sidebar.mdx to replace numbered lists with structured <Steps> components for improved readability. Also updated image sources and added a link for Cursor alignment guidance.

---------

Co-authored-by: Juan Pablo <juan@cline.bot>
2025-09-24 09:22:02 -07:00
Saoud Rizwan c85a4abeb4 Fix bg color of API configuration in settings (#6422) 2025-09-24 02:13:29 -07:00
Saoud Rizwan 011b19225e Update task header and focus chain UI design (#6415)
* Fix chatfield buttons positioning

* Fix task header icons being cut off at bottom

* Fix copy for focus chain

* Fix focus chain text overflowing and being hidden

* Remove transition animation

* Fix token stats

* Tweak task header styles

* Fix focus chain progress bar direction

* Hide checkpoint text unless hovered

* Make copy button smaller and muted

* Use new focus chain design

* Make timeline blocks circles

* Move focus chain down and fix pencil icon positioning
2025-09-24 02:06:06 -07:00
Sarah Fortune a3945dce7f Replace vscode context.globalStoragePath with HostProvider.globalStorageFsPath (#6419) 2025-09-24 01:19:06 -07:00
celestial-vault 8daca03996 add a script to reconstruct taskHistory (#6403)
* add a script to reconstruct taskHistory

* remove format setting unrelated
2025-09-23 23:23:44 -07:00
Bee 777b8576f2 fix: update fontsource import path to resolve 401 errors (#6414)
* fix: update fontsource import path to resolve 401 errors

Replace specific weight imports with node_modules path reference to fix accessibility issues with @fontsource/azeret-mono font files in webview

* update path
2025-09-23 18:47:56 -07:00
Ara 880755ec89 feat: add multi-root workspace support for auto-approve file reads (#6412)
* feat: add multi-root workspace support for auto-approve file reads

Add logic to handle auto-approval of file read operations in multi-root workspace scenarios. When multi-root is enabled and multiple workspaces are present, the system now checks if a file is located in any workspace rather than just the current working directory. This ensures proper auto-approval behavior across all workspace roots while maintaining backward compatibility for single-root workspaces.

* Fixing pulsing border
2025-09-23 17:57:12 -07:00
Bee 1c70089521 initialize compact mode to prevent UI glitching on mount (#6413)
- Set isCompactMode initial state to true instead of false
- Replace CSS variable with Tailwind class for settings title
- Prevents layout shifts and UI glitching during component initialization
2025-09-23 17:05:48 -07:00
Bee fe2a8a9477 dev: disable auto-condense threshold configuration in task header (#6407)
Remove autoCondenseThreshold prop and hardcode useAutoCondense to false in TaskHeader component to temporarily disable the configurable auto-condense threshold from UI

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-23 16:41:57 -07:00
nihar-oracle eb2550ec3d fix(oca): add auth guard, unify axios config, and rotate default IDCS client id (#6410)
- refreshOcaModels:

  - Add explicit auth guard: show a user-facing error if no OCA access token is present and return a typed error via OcaCompatibleModelInfo.
  - Switch axios invocation to use getAxiosSettings() (fetch adapter) instead of proxy agents.
  - Replace getProxyAgents import with getAxiosSettings.

- OcaAuthProvider:

  - Migrate all axios calls (discovery + token POSTs) to use getAxiosSettings().
  - Add explicit error when no id_token is returned from OCA during the auth code exchange to improve diagnostics.

- utils/constants:
  - Rotate DEFAULT_IDCS_CLIENT_ID to a new value.

- utils/utils:

  - Create getAxiosSettings() helper (uses axios fetch adapter) and remove proxy agent–specific helpers.

  - Revise createOcaHeaders to avoid direct vscode + package.json coupling:

    - Use HostProvider.env.getHostVersion for host/IDE details.
    - Use ExtensionRegistryInfo.version for the extension version.
    - Set headers: client=Cline, client-version, client-ide, client-ide-version, opc-request-id.

  - Note: import of HttpsProxyAgent remains but is now unused; consider removing to avoid lint/TS warnings.

Rationale

- Reliability/UX: Users now receive a clear error when attempting to refresh OCA models without being authenticated.
- Portability: Replacing direct vscode and package.json usage in headers with HostProvider + ExtensionRegistryInfo reduces coupling and makes code host-agnostic.
- Network config simplification: Standardize axios setup through a single getAxiosSettings() helper and the fetch adapter.
- Auth robustness: Explicitly surface the absence of id_token to speed up troubleshooting OIDC flows.

Potential behavior changes

- Proxy handling: getProxyAgents() was removed in favor of the axios fetch adapter via getAxiosSettings(). If explicit HTTP(S)_PROXY env-based proxying is required, follow-up work may be needed to reintroduce agent support or configure fetch-compatible proxying.

Files touched

- src/core/controller/models/refreshOcaModels.ts
- src/services/auth/oca/providers/OcaAuthProvider.ts
- src/services/auth/oca/utils/constants.ts
- src/services/auth/oca/utils/utils.ts
2025-09-23 15:36:31 -07:00
Bee 9c3ac14cab feat: add multi-root workspace setting with feature flag support (#6409)
* feat: add multi-root workspace setting with feature flag support

Add user-configurable multi-root workspace setting that works in conjunction with feature flags. Includes proto definition, state management, and UI toggle in settings panel.

- Add multi_root_enabled field to UpdateSettingsRequest proto
- Implement multiRootSetting with user preference and feature flag state
- Add ClineFeatureSetting interface for feature flag + user setting pattern
- Create settings UI toggle with feature flag override indication
- Update state helpers to properly handle boolean conversion

* remove docs

* remove env vars
2025-09-23 15:34:50 -07:00
canvrno 6a8f900d75 REmove VCS requirement from multiroot checkpoints (#6405)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-23 13:09:46 -07:00
Bee 407e472322 fix: poll feature flags for all users (#6404)
* fix: poll feature flags for all users instead of just authenticated users

Move feature flags polling outside the authenticated user check to ensure all users (logged in and anonymous) receive up-to-date feature flags. Reset flags only for authenticated users to maintain proper user-specific configuration.

* add changeset
2025-09-23 12:59:55 -07:00
Saoud Rizwan 580b2e35e2 Update CODEOWNERS to remove dcbartlett (#6408) 2025-09-23 12:54:50 -07:00
Sarah Fortune 30c121509f Add a workflow that will trigger the Jetbrains tests for PRs in the cline repo (#6402)
Changes in the cline repo have the potential to cause breakages in the JetBrains repo. The creator of the PR might not found out until some time later that they have made a change that causes problems for JetBrains.

This workflow will trigger the workflow .github/workflows/test-changes-from-cline-repo.yml in the JetBrains repo, that runs the JetBrains integration tests. When the tests complete, the workflow will leave a comment on the PR with the results of the tests.
2025-09-23 10:13:38 -07:00
Bee b3aee3857c feat: new Task Header UI with configurable auto condense threshold (#6049)
* Update TaskHeader UI

- Create new FocusChainContainer component for todo list management
- Add onSendMessage prop to TaskHeader and TaskSection components
- Refactor TaskHeader to use new FocusChainContainer
- Update tooltip styling and Tailwind configuration
- Improve task progress visualization and interaction handling

* use tailwind

* Remove edit thread btn

* Add interactive auto-compact marker to context window bar

- Add state management for auto-compact marker position (default 75%)
- Make context window bar clickable to reposition marker
- Wrap entire bar in tooltip instead of just marker
- Add click handler to calculate percentage from mouse position
- Fix cost display conditional and remove redundant CSS property

* Prevent event bubbling in task header button clicks

Add preventDefault and stopPropagation to all task header button click handlers to prevent unintended parent element interactions. Also standardize styling by replacing inline styles with Tailwind classes and update text color class for consistency.

* Clean up

* Add CheckpointError component and clean up task header UI

- Add new CheckpointError component for error handling
- Remove commented code from FocusChainContainer
- Add rounded corners to focus chain container
- Refactor formatLargeNumber function with default parameter handling
- Clean up token display formatting in TaskHeader

* Add configurable auto-condense threshold for context window management

- Add autoCondenseThreshold setting to control when context window compaction occurs
- Update ContextManager to accept threshold percentage parameter (0-100%)
- Add ContextWindowDetails component to display context usage in task header
- Extend protobuf schema and state management for new threshold setting
- Default threshold set to 75% when auto-condense is enabled

* v2 style

* Dynamic marker & remove HeroTooltip

* Update styles

* feat: enhance task header UX with expanded progress bar hitbox smart boundary detection timeline block hover dimming effects optimized spacing and standard confirmation dialog styling

* Extract TaskHeader styles to CSS module

Move inline styles from TaskHeader component to external CSS module file for better maintainability and separation of concerns.

* migrate to tailwind

* migrate inline styes to tailwind for FocusChain

* fix(ui): fix useEffect cleanup and add key prop to InfoRow

- Return cleanup function from useEffect instead of nested setTimeout
- Add key prop to InfoRow component to ensure proper re-rendering
- Improves component lifecycle management and prevents memory leaks

* price tag and warning positioning

* clean up & persist expand state

* debounce

* add keyboard navigation for auto condense threshold slider

Add arrow key controls to adjust auto condense threshold with 5% steps (10% with Shift). Include focus management, accessibility attributes, and click-outside handling for improved UX.

* feat: small vertical positioning adjustment

* add changeset

* Update Task Action Button Text

* clean up

* Update storybook

* Apply styling feedback

* clean up

* feat: accordian style metadata for context window bar tooltip

* fix: notch slide fix

* fix: add cleanup for animation frames and timeouts in AutoCondenseMarker

Add proper cleanup functions to useEffect hooks to prevent memory leaks by canceling animation frames and clearing timeouts when component unmounts or dependencies change.

* Fix animation on mount

* remove handleBlur

* fix: change the order of the instructional text

* fix: remove the color from the tooltip percentage value

* clean up

* simplify

* useAutoCondense

* remove highlights

* set maxAllowedSize

* Auto Compact

* remove fork button

* feat: add configurable auto-condense threshold setting

Add auto_condense_threshold parameter to control when context window compaction occurs. The threshold is configurable as a percentage (0-1 range) of the total context window size, allowing users to customize when automatic condensing triggers instead of using a fixed maximum size.

Changes:
- Add autoCondenseThreshold field to protobuf UpdateSettingsRequest
- Update ApiProviderInfo interface to include autoCondenseThreshold
- Modify shouldCompactContextWindow to accept threshold percentage parameter
- Add threshold validation and state management in updateSettings
- Include autoCondenseThreshold in controller state and UI data flow

* autoCondenseThreshold

* fix package

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-09-23 09:21:07 -07:00
Bee 10cbbb2c6b feat: Cline Auth Provider (#6131)
* Add ClineAuthProvider and integrate with AuthService

- Add new ClineAuthProvider class for Cline-specific authentication
- Update AuthService to support both Firebase and Cline auth providers
- Switch default provider from Firebase to Cline
- Add dynamic auth URL fetching for Cline provider
- Update type definitions to support multiple provider types

* Add API auth URL configuration and update Cline auth flow

- Add apiAuthUrl to environment configs for all environments
- Update ClineAuthProvider to use new token exchange API endpoint
- Add shared Cline API utilities and types
- Refactor auth service to handle access tokens with expiration
- Update mock auth service and test fixtures for new auth flow

* add changeset

* wip

* refactor authentication service and improve token handling

- Add null check for auth token in ClineAccountService
- Update authorization header format to use 'workos:' prefix
- Replace hardcoded API endpoints with CLINE_API_ENDPOINT constants
- Refactor ClineAuthInfo interface to use accessToken terminology
- Remove Firebase auth provider dependency
- Simplify auth callback handling and token storage
- Improve error handling for missing authentication tokens

* refactor(auth): standardize workos token prefix handling

Centralize workos: prefix application in AuthService.getAuthToken() method instead of duplicating across multiple API call sites. This ensures consistent authentication token formatting and simplifies maintenance by having a single source of truth for token prefixing.

* Remove unused code

* update mock responses

* Set Firebase Auth Provider as default

* Update src/shared/cline/api.ts

Co-authored-by: Tomás Barreiro <52393857+BarreiroT@users.noreply.github.com>

* remove docs

* refactor(auth): replace type union with IAuthProvider interface

- Replace AvailableAuthProvider type union with IAuthProvider interface for better extensibility
- Add ServiceConfig type for provider configuration
- Remove hardcoded providerName field in favor of provider.name property
- Update method signatures to use IAuthProvider interface
- Improve error messages and code comments for clarity
- Add TODO for mock auth provider implementation

---------

Co-authored-by: Tomás Barreiro <52393857+BarreiroT@users.noreply.github.com>
2025-09-23 08:23:22 -07:00
Bee 08365b3e0b feat: add configurable auto-condense threshold setting (#6391)
* feat: add configurable auto-condense threshold setting

Add auto_condense_threshold parameter to control when context window compaction occurs. The threshold is configurable as a percentage (0-1 range) of the total context window size, allowing users to customize when automatic condensing triggers instead of using a fixed maximum size.

Changes:
- Add autoCondenseThreshold field to protobuf UpdateSettingsRequest
- Update ApiProviderInfo interface to include autoCondenseThreshold
- Modify shouldCompactContextWindow to accept threshold percentage parameter
- Add threshold validation and state management in updateSettings
- Include autoCondenseThreshold in controller state and UI data flow

* updateSettings
2025-09-23 06:48:12 -07:00
canvrno cb4c61b1ca Dependency changes (#6393)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-22 23:36:50 -07:00
canvrno 2d9ff863b7 Update dependencies (#6390)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-22 20:16:33 -07:00
Ara ae9b20a12b Adding Search tool for multi root workspace (#6288)
* Adding multi search

* Adding multi search

* Adding multi search

* Adding multi search

* feat: Cleanup

* feat: Cleanup

* feat: Cleanup

* feat: Cleanup

* Fixing search and workspace path stuff
2025-09-22 19:17:40 -07:00
Ara c16e271c14 Adding voice mode to Cline (#6208)
* Adding voice mode
2025-09-22 18:50:56 -07:00
Bee b940cef0e4 refactor: append stealth models on readOpenRouterModels & refreshOpenRouterModels (#6384)
* refactor: extract stealth models to reusable function

Move hardcoded stealth model addition from inline code to a dedicated `appendStealthModels` function. This improves code organization by centralizing stealth model management and ensures consistent application across both fresh API responses and cached model data.

* refactor(controller): integrate stealth models into OpenRouter handling

- Added import and integrated appendClineStealthModels in readOpenRouterModels
- Improved error handling with try-catch in readOpenRouterModels
- Refactored refreshOpenRouterModels to use controller method and renamed functions
- Renamed STEALTH_MODELS to CLINE_STEALTH_MODELS and made appendClineStealthModels exportable

* await cached models for immediate UI availability

Changed the initialization to synchronously await and post last cached OpenRouter models, improving UI responsiveness by making them available as soon as possible instead of relying on a promise chain.
2025-09-22 18:47:02 -07:00
tjandy98 bc228de20e Update SAP AI Core Provider Anthropic input token calculation (#6363)
* Update anthropic input token usage calculation

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

* changeset

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

---------

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
2025-09-22 18:41:21 -07:00
Ara a9cac3206a feat: Fixing dictation settings (#6385) 2025-09-22 17:38:31 -07:00
Jose Castelli a9bc4c7d67 Testing platform coverage (#6332)
Testing platform coverage
2025-09-22 21:14:54 +02:00
celestial-vault 737dce09d1 Remove duplicate settings references in Task class (#6336)
* read settings from statemanager instead of keeping stale references in Task class and child classes

* removed unused vars
2025-09-22 12:02:17 -07:00
ZeroAurora a10d778bee fix: remove temperature settings in z.ai models (#6311)
To use the default temperature. (#6223 comment)
2025-09-22 12:00:13 -07:00
Jose Castelli 58b0ea9afa Run Testing platform within Test workflow [shadow] (#6273)
Run Testing platform within Test workflow [shadow]
2025-09-22 20:15:22 +02:00
canvrno 90fa3d7336 Dependency updates (#6096)
* Dependency updates

* package-lock

* Updated packages

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-22 10:39:11 -07:00
canvrno d0da22d5a9 Modify checkpoints to accept an array of workspaces (#6320)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-22 10:06:02 -07:00
nihar-oracle f2ce0b46a3 fix: Fixing oca provider utils (#6359) 2025-09-20 22:14:54 -07:00
github-actions[bot] 52ab767e44 v3.30.3 Release Notes (#6352)
* changeset version bump

* Updating CHANGELOG.md format

* Update version from 3.31.0 to 3.30.3

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-19 17:57:08 -07:00
Ara d858fb9360 Empty PR to bump changeset (#6351)
* Empty PR to bump changeset

* feat: Cleanup
2025-09-19 17:49:33 -07:00
nihar-oracle 428cdb670a feat(oca): add OCA provider with model picker and auth integration (#6339)
- Add webview UI components:

  - webview-ui/src/components/settings/providers/OcaProvider.tsx
  - webview-ui/src/components/settings/providers/OcaModelPicker.tsx

- Update settings to surface OCA:
  - webview-ui/src/components/settings/ApiOptions.tsx

- Wire backend for OCA auth and controller:

  - src/services/auth/oca/OcaAuthService.ts
  - src/services/auth/oca/providers/OcaAuthProvider.ts
  - src/core/controller/index.ts
2025-09-19 17:27:45 -07:00
Toshii aab002fe65 adding yolo mode telemetry which is triggered in grpc call updated (#6348) 2025-09-19 16:45:52 -07:00
Saoud Rizwan cc540d8158 Remove comment on cacheWritesPrice in clineCodeSupernovaModelInfo 2025-09-19 15:05:22 -07:00
Saoud Rizwan adc15c79d7 Fix copy 2025-09-19 14:57:54 -07:00
Saoud Rizwan af05d3497a v3.30.2 Release Notes 2025-09-19 14:51:19 -07:00
Saoud Rizwan 23fa1cb481 Fix Announcement banner UI tests 2025-09-19 14:50:33 -07:00
github-actions[bot] 800967d851 v3.30.1 Release Notes (#6343)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-19 14:25:10 -07:00
Saoud Rizwan 91deede3c3 fix: model list not being updated in time for user to use shortcut button to update model to stealth model (#6347)
* fix: model list not being updated in time for user to use shortcut button to update model to stealth model

* Create tame-rabbits-travel.md
2025-09-19 14:21:32 -07:00
pashpashpash b11e6171ff YOLO MODE (#6340)
* add yolo mode setting

* more explicit warning

* changeset
2025-09-19 13:43:50 -07:00
Bee 42666d9ca7 fix: use webview dependencies (#6344) 2025-09-19 13:40:32 -07:00
Bee 07f944b668 fix: update SectionHeader to prevent content overlap (#6337)
Remove sticky positioning and z-index styling from SectionHeader component to fix overlapping content issues during scroll. Also clean up unused imports and update description text styling to use semantic class.
2025-09-19 13:28:20 -07:00
canvrno c6e5b1509c Fix flicker issue when switching modes (#6341)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-19 13:04:29 -07:00
github-actions[bot] 6787dedf47 v3.30.0 Release Notes (#6338)
* changeset version bump

* Updating CHANGELOG.md format

* Update changelog for Oracle Code Assist integration

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-19 12:04:04 -07:00
Saoud Rizwan d07648746a Add code-supernova stealth model (#6327)
* Update announcement banner

* Fix banner buttons

---------

Co-authored-by: pashpashpash <nik@cline.bot>
2025-09-19 11:53:07 -07:00
nihar-oracle 07b49baa2a feat: OCA provider (#5075)
* feat(oca): add Oracle Code Assist provider; auth, models, settings

- Implement OCA API handler (src/core/api/providers/oca.ts)

  - OpenAI-compatible chat.completions with custom fetch injecting OCA headers
  - Optional reasoning (thinking) budget and ephemeral prompt caching
  - LiteLLM session tracking and usage streaming; cost via /spend/calculate
  - Guarded client init; clear error when OCA access token is missing

- Wire provider into core API and controller

  - Register provider (src/core/api/index.ts)
  - Controller flows for OCA account login/logout and auth status subscription
  - refreshOcaModels command and model config plumbing

- Add protobuf surfaces

  - proto/cline/models.proto and proto/cline/ocaAccount.proto
  - Extend proto/cline/state.proto for settings/state

- Persist settings/state and helpers
  - Update StateManager, state-keys, state-helpers, updateSettings

- Misc

  - Add changeset entry
  - Minor .gitignore and commit-message generator tweak

feat: New redirect server

feat(oca): add Oracle Code Assist provider; auth, models, settings

- Implement OCA API handler (src/core/api/providers/oca.ts)

  - OpenAI-compatible chat.completions with custom fetch injecting OCA headers
  - Optional reasoning (thinking) budget and ephemeral prompt caching
  - LiteLLM session tracking and usage streaming; cost via /spend/calculate
  - Guarded client init; clear error when OCA access token is missing

- Wire provider into core API and controller

  - Register provider (src/core/api/index.ts)
  - Controller flows for OCA account login/logout and auth status subscription
  - refreshOcaModels command and model config plumbing

- Add protobuf surfaces

  - proto/cline/models.proto and proto/cline/ocaAccount.proto
  - Extend proto/cline/state.proto for settings/state

- Persist settings/state and helpers
  - Update StateManager, state-keys, state-helpers, updateSettings

- Misc

  - Add changeset entry
  - Minor .gitignore and commit-message generator tweak

feat: New redirect server

update UI and add NPS survey link

papercuts

fix model dropdown height

fix: Fix 1

fix: removing ui

feat(AuthManager): Adding an AuthManager

fix: fixing rebase

* fix: Removing AuthManager, simplifyng auth service initialization
2025-09-19 00:33:24 -07:00
Alex Ker 2668bcdbe0 added baseten link to docs.json (#6312)
* added baseten link to docs.json

* fixed docs formatting

---------

Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
2025-09-18 16:25:55 -07:00
github-actions[bot] e5e293c32b v3.29.2 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update changelog for v3.29.2 release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-18 15:56:16 -07:00
Bee fea8313695 Revert "fix: configure HeroUI setup (#6279)" (#6323)
* Revert "fix: configure HeroUI setup (#6279)"

This reverts commit 5c2d93617f.

* changeset
2025-09-18 15:44:01 -07:00
canvrno 4b450f4488 Pass max_tokens to moonshot provider (#6316)
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-18 14:21:26 -07:00
Sarah Fortune 2687ae149f Set telemetry env vars for JetBrains builds [esbuild] (#6299) 2025-09-18 20:45:05 +00:00
celestial-vault 3b93871b50 use consolidated type parameters for getter functions in state-helpers (#6262)
* use consolidated type parameters for getter functions in state-helpers

* fix types

* fix types
2025-09-18 12:55:43 -07:00
Jose Castelli 767b81b22b Improve standalone startup times (#6272)
Improve standalone startup times
2025-09-18 21:38:46 +02:00
Jose Castelli 5db4970c7d Enhance Testing Framework - Improve non-deterministic scenarios + fix flag (#6244)
Enhance Testing Framework - Improve non-deterministic scenarios + fix flag
2025-09-18 21:27:41 +02:00
Sarah Fortune 4f66126a8c Consolidate duplicated code in BrowserSession and UrlContextFetcher (#6289)
Move duplicated code to utils.ts

Replace context.globalStorageUri with the HostProvider.globalStorageFsPath.
This is part of removing dependencies on the VSCode API fom the codebase except for in platform specific code in src/hosts/vscode and src/extension.ts.
2025-09-18 11:40:44 -07:00
Sarah Fortune 43006ca401 Update runclinecore.sh script (#6300) 2025-09-18 10:12:56 -07:00
github-actions[bot] 1064c631c5 v3.29.1 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update changelog for release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-17 20:15:56 -07:00
canvrno 981fe9cf09 Changeset bump and announcement update (#6290)
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-17 20:01:36 -07:00
Sarah Fortune 90ab59d8f5 Replace context.globalStorageUri with the HostProvider in CheckpointTracker (#6277)
* Replace context.globalStorageUri with the HostProvider in CheckpointTracker

Replace context.globalStorageUri with the HostProvider.globalStorageFsPath.

Remove globalStoragePath param, it doesn't need to be passed around anymore.

Remove unused param taskId from shadowGit

* Remove globalStoragePath param from checkpoint manager.

Now tht the global storage path is available from the HostProvider anywhere, it doesn't need to be passed around.
2025-09-17 17:03:30 -07:00
kvyb f237dda413 fix: test e2e click “Show Code Actions” button then wait for listbox on macOS (#6287)
* fix: test e2e click “Show Code Actions” button then wait for listbox on macOS

* fix: trigger code actions during test with shortcut

* fix: add reasonable timeout to the menu and listbox call in test
2025-09-18 02:30:54 +03:00
Bee f08b0499d5 test: refactor chat e2e tests to support multi-roots workspace types (#6282)
* test: refactor chat e2e tests to support multiple workspace types

- Convert single test functions to parameterized test suite using describe blocks
- Add workspace type iteration for both chat messaging and slash command tests
- Consolidate test structure to run against different workspace configurations
- Maintain existing test logic while improving test coverage and organization
- consolidate chat input tests into single comprehensive test

Merged three separate chat input tests (slash commands, @ mentions, and partial completion) into one comprehensive test to reduce test setup time and improve test efficiency. Simplified test structure while maintaining all original functionality checks.

* update keybindings
2025-09-17 16:00:56 -07:00
Bee 5c2d93617f fix: configure HeroUI setup (#6279)
* fix: configure HeroUI setup

- Simplify Storybook stories pattern to only include TypeScript files
- Update HeroUI to v2.8.4 with dependencies
- Refactor HeroUI configuration with VSCode theme integration
- Streamline Tailwind CSS imports and plugin setup

* darkmode

* Theme

* remove workflow
2025-09-17 14:35:22 -07:00
celestial-vault 99201f9944 split up global state and settings types; split apart methods for fetching state and settings (#6263) 2025-09-17 14:11:56 -07:00
Sarah Fortune 0983a8a4b9 Replace context.globalStorageUri with HostProvider.globalStorageFsPath (#6276) 2025-09-17 21:05:10 +00:00
Jose Castelli 683096aed7 Interactive playwright script (#6222)
Interactive playwright script
2025-09-17 21:16:54 +02:00
github-actions[bot] 7189b224fc v3.29.0 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Updated changelog and announcement banner for release

* Swapped grok button for jetbrains button

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
2025-09-17 12:06:05 -07:00
Sarah Fortune fe3a75309d Don't use workspace resolver for tasks directory. (#6275) 2025-09-17 17:50:12 +00:00
Nick Baumann 7a00be2d55 Update JetBrains installation docs for GA release (#6264) 2025-09-17 10:39:50 -07:00
Ara 4e7af6eb5d Adding Multi Root Workspace Support for a few different tool calls (#6228)
* Adding multi root workspace support for different tools

* fixing spacing

* fixing spacing

* fixing spacing
2025-09-17 10:04:30 -07:00
Sarah Fortune e9c8f67822 Add global storage path to the Host Provider (#6248)
Add a the field `globalStorageFsPath` to replace the VSCode `context.globalStorageUri`
Remove duplicated code for getting the cache directory.
Add a util function to the HostProvider to get sub-directories of the global storage dir, and ensure that the sub-directory is created.
2025-09-17 00:13:12 -07:00
Sarah Fortune bef7d2c75a Clean up cline-core (#6255)
Move all the logic for waiting for the host bridge into `hostbridge-client.ts`
Add some comments
Use try/finally, remove unused param, log the error message when the health check fails.
2025-09-17 00:13:02 -07:00
Jose Castelli dfc660e73c Setup QLTY Initial Coverage Metrics (#6167)
Setup QLTY Initial Coverage Metrics
2025-09-17 08:39:08 +02:00
Bee af0bc4dc6c fix: CreditLimitError should use server returned url when available (#6261)
* fix: CreditLimitError should use server returned url when available

- Add useMemo hook for dashboard URL computation
- Display credit balance, spent, and promotions when available
- Replace inline styles with Tailwind CSS classes
- Simplify TaskServiceClient call by removing unnecessary properties
- Add proper conditional rendering for credit information
- Improve code organization and readability

* changeset added

* props

* Update storybook
2025-09-16 20:30:55 -07:00
Alex Ker f37962bbf2 Updated Baseten models to use dynamic fetching, added docs (#6148)
* Updated Baseten models to use dynamic fetching, added docs

* removed unused function, supportsImages

* added parsePrice into model-utils.ts

* updated toolcalling comment

* updated tools to fetch from API

* fixed conflicts and updated supportTools

* applied npm run format:fix

* added bedrock stuff back in that was breaking test

---------

Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
2025-09-16 19:52:35 -07:00
celestial-vault e82597e069 move apihandler secrets to own type and fix some type errors related to the handlers (#6249) 2025-09-16 18:44:34 -07:00
Bee d1db8f747a docs: add comprehensive E2E testing documentation (#6259)
Add detailed documentation for end-to-end testing with Playwright including:
- Test execution commands and debug mode usage
- Test structure overview with file descriptions
- Writing test guidelines with fixtures and best practices
- Mock API server setup and workspace configuration
- Interactive debugging features and troubleshooting tips

Updates both CONTRIBUTING.md and E2E README to provide complete guidance for contributors working with the test suite.
2025-09-16 17:31:46 -07:00
Bee e8ba3c34fb feat: add Storybook configuration (#6256)
* feat: add Storybook configuration

- Bump package version from 3.28.3 to 3.28.4
- Add comprehensive Storybook setup with React-Vite framework and TypeScript support
- Configure Storybook with custom viewport settings and environment variables
- Add extensive story files for chat components, MCP displays, and browser automation
- Update gitignore files to exclude Storybook build artifacts and logs

* Add docs and changeset

* feat: refactor Storybook decorator to support state overrides and custom styling

- Extract ExtensionStateProviderWithOverrides component to safely use useExtensionState within provider context
- Add optional classNames parameter to createStorybookDecorator for custom styling
- Import cn utility from @heroui/react for className merging
- Fix margin class from m-x-auto to mx-auto

* Add message to mock history

---------

Co-authored-by: Jose R. Perez <trupix@gmail.com>
2025-09-16 17:27:55 -07:00
yuvalman fadcd7e3ad fix: sap provider - set sapAiCoreUseOrchestrationMode in state-helper instead of in sap provider components (#6221)
* fix: sap provider - handle undefined apiConfiguration.sapAiCoreUseOrchestrationMode

* fix: sap provider - handle undefined apiConfiguration.sapAiCoreUseOrchestrationMode

* fix: sap provider - handle undefined apiConfiguration.sapAiCoreUseOrchestrationMode
2025-09-16 14:57:30 -07:00
celestial-vault 81299d26d8 refactor: move favorited model IDs to dedicated state management (#6251)
Removed favorited_model_ids field from API configuration models in proto files and migrated storage handling to global state key management.

Cleans up configuration separation by removing non-API-related data from model definitions. Enables more consistent state handling across the application.
2025-09-16 14:56:14 -07:00
Sarah Fortune 832025c8cc Use the correct version number in cline-core (#6254)
* Use the correct version number in cline-core

cline-core should use the same version number as the extension because they share the same code for the core functionality.
Use the version number from the ExtensionRegistryInfo instead of from the standalone package.json

* Use node:fs instead of fs
2025-09-16 14:15:47 -07:00
celestial-vault f8a7a1cc58 [Cleanup] Remove API Configuration Conversion in updateSettings (#6196)
* Refactor API configuration to use proto enums and structured types

- Replace JSON string fields with proper proto message types
- Convert snake_case field names to camelCase for consistency
- Use ApiProvider enum instead of string for provider fields
- Add structured types for model info and selectors
- Remove deprecated settings conversion module
- Update proto conversions to handle new structured format

* fix types errors caused by changing to generic string
2025-09-16 10:15:32 -07:00
Sarah Fortune 3723288250 Add a field to the HostProvider for extension install dir (#6239)
* Add a field to the HostProvider `extensionFsPath`

Replace vscode.ExtensionContext `extensionUri` with `HostProvider.extensionFsPath`.

This part of removing uses of the VSCode API fom the codebase except for in platform specific code (these are src/hosts/vscode and src/extension.ts).

* Remove extra leading slash from webview URL on JetBrains

* Remove vscode.Uri from the WebviewProvider

Replace `vscode.Uri` with URL strings.
Replace Uri with Url in variable names.
2025-09-16 09:49:32 -07:00
Jose Castelli 0b5e8f5c37 Moving grpc recorder unit test (#6214)
Moving grpc recorder unit test
2025-09-16 12:54:39 +02:00
kvyb a04f6050ee fix standalone: isolate workspaceState per project via WORKSPACE_STORAGE_DIR (#6215)
* fix standalone: isolate workspaceState per project via WORKSPACE_STORAGE_DIR

* fix: keep logs global; default workspace storage dir; no try/catch on mkdir
2025-09-16 10:30:02 +03:00
Sarah Fortune ef7e8c5018 Use ExtensionRegistryInfo to get the extension version (#6237) 2025-09-16 04:06:43 +00:00
celestial-vault 60b17d092b Add task-specific settings caching to StateManager (#6171)
* Add task-specific settings caching to StateManager

Implement per-task settings storage with automatic loading/clearing:
- Add taskStateCache for isolated task settings
- Load task settings on task creation and reinitialize
- Clear task settings cache when tasks end
- Prioritize task cache over global state in getters

* update error wording for taskSettings read failure

* add missing return statement in promise.all

* fix: persist pending task settings before clearing cache

Changed clearTaskSettings to be async and ensure any pending task state
changes are persisted to storage before clearing the in-memory cache.
This prevents potential data loss when a task ends with unpersisted
settings still in the pending state queue.

- Made clearTaskSettings async and added optional taskId parameter
- Added logic to persist pending task state batch before clearing
- Updated controller to await clearTaskSettings and pass taskId
2025-09-15 15:49:10 -07:00
Bee 58808f3e2f fix process.env access for posthog (#6231)
* fix process.env access in build script

- Add CLINE_ENVIRONMENT=production to esbuild define config
- Remove fallback empty strings for API keys in build config
- Simplify optional chaining to direct property access for process.env
- Ensure consistent environment variable handling across config files

* verify CI secrets

* revert temp test
2025-09-15 13:55:34 -07:00
Sarah Fortune 281fd9505a Don't construct the IDE redirect URL in the webview. (#6229)
* Don't construct the redirect URL in the webview.

Add an RPC to the ProtoBus to get the URI to redirect back to the host IDE.
Support for JetBrains will be added in a second PR.

* Remove the uriScheme and extension name from the ExtensionStateContext.

These are being used to construct the IDE redirect URI, but this is not a cross-platform compatible way to do this.

* Update the host bridge to return the whole URL to redirect to the IDE

Return the whole redirect URI instead of just the URI scheme. VSCode needs the whole URI to redirect back to VSCode and open the cline extension.

* Update js doc

* Remove unused propertu uriScheme

All uses of vscode.env.uriScheme have been moved to platform specific code, so add it to linter rules for vscode API.
2025-09-15 12:58:25 -07:00
Ara fe1da0fa6c Normalize paths to fix windows test for workspace paths (#6227)
* Adding prompts

* Adding prompts
2025-09-15 12:17:49 -07:00
Toshii a505a79ec3 yolo mode (#6151)
* add global state var for yolo mode

* setting and updating yolo mode in autoApprover

* use approveAll variable in autoAPprove class

* add logic for automatically handling plan_mode_respond tool calls

* remove follow up question tool in yolo mode

* conditional parameter inclusion for execute_command in yolo mode

* logic for having terminal command continue in background once timer is up for yolo mode

* prompt adjustment for the timeout param

* changing function signature

* full template changes to support context

* merge conflict fix for system_info

* fixing default values

* update where we resolve template to TemplateEngine

* template engine test update

* test changes, adding types

* updating TemplateEngine test scoping

* add missing ide param in test

* clean up variable naming
2025-09-15 11:41:20 -07:00
Yukio Nozawa ac41b0dd33 Fix: Improve screen reader accessibility for MCP servers / Cline rules screens (#5861)
* Add descriptive aria-labels to mcp server screen

* Improve screen reader accessibility for cline rules page and its tabs

* Fix: Have screen readers read the new rule / new workflow file labels consistently (previously it always announced new rule file regardless of the actual file type)

* Add changeset
2025-09-15 11:40:41 -07:00
Yukio Nozawa fd3abdc68b fix: [accessibility] Improve screen reader accessibility for history view / preview (#5860)
* Fix: Add descriptive aria-labels to unlabelled buttons in the history preview screen

* Fix: Add descriptive aria-labels to unlabelled buttons in the history view screen

* Add changeset
2025-09-15 11:34:37 -07:00
Bee fe37ca9f29 Add environment variable injection to esbuild config (#6225)
* Add environment variable injection to esbuild config

Inject TELEMETRY_SERVICE_API_KEY, ERROR_SERVICE_API_KEY, and CLINE_ENVIRONMENT
at build time for production builds.

* add changeset

* update
2025-09-15 11:18:36 -07:00
Ara 7ecf395a9a Adding workspace adaptor and workspace hint for multi root workspace (#6143)
* Adding workspace adapter

* Adding workspace adapter
2025-09-15 10:10:33 -07:00
github-actions[bot] e6c251a5a9 v3.28.4 Release Notes (#6193)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG for version 3.28.4

Consolidate changelog entries for version 3.28.4 and improve clarity.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-14 21:02:09 -07:00
Saoud Rizwan 2fee3c47e7 fix: update secondary text for cancel button (#6212) 2025-09-14 20:44:40 -07:00
Saoud Rizwan b676c5df66 fix: convert action button isProcessing from ref to state to force re-render (#6211)
* fix: convert action button isProcessing from ref to state to force re-render

* Create eleven-swans-sort.md
2025-09-14 19:39:37 -07:00
Saoud Rizwan 9ae7c4f9e6 fix #6172: detectedShell returns non-string on some Windows machines leading to API request hanging (#6210)
* fix: detectedShell returns non-string on some Windows machines leading to indefinite API request hanging

* Fix bug causing API request to hang on Windows
2025-09-14 19:12:00 -07:00
Saoud Rizwan a8ba96ff4a fix: allows truncation for empty conversation, for when automatic truncation is tried after failed request (#6200) 2025-09-14 18:47:26 -07:00
yuvalman 0b551de152 fix: sap provider - support gpt-5 family in orchestration mode (#6195)
* feat: remove model_params in orchestration mode

* feat: remove model_params in orchestration mode
2025-09-14 00:39:07 -07:00
Bee 4985d1d185 fix: display prompt cache in history view (#6181)
* fix: display prompt cache in history view

* clean up

* no changeset
2025-09-13 04:38:55 -07:00
Bee 60ddf80e5c Remove --no-stash flag from lint-staged in pre-commit hook (#6188)
### Problem

The `--no-stash` flag was originally added to work around issues where teammates hadn't installed Biome after our migration from Prettier. When the formatter failed, lint-staged's default stashing behavior would remove staged changes, causing frustration.

However, this workaround now causes a different problem: lint-staged runs formatters on files containing both staged AND unstaged changes. When Biome formats these files, it inadvertently stages unstaged modifications, effectively merging work-in-progress changes into commits.

### Solution

Remove the `--no-stash` flag to restore lint-staged's default behavior:

- Stash unstaged changes before running formatters
- Run formatters only on staged content
- Restore the stash after formatting

This ensures that only intentionally staged changes are included in commits, preventing accidental inclusion of work-in-progress modifications.

### Context

It's been sufficient time since the Prettier → Biome migration that all team members should have the proper tooling installed. The original workaround is no longer needed and is now causing more problems than it solves.
2025-09-13 04:21:18 -07:00
github-actions[bot] eece559f51 v3.28.3 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Updated changelog for release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-12 18:40:32 -07:00
celestial-vault cc7be60fd9 remove unnecessary git commit conversion function (#5913) 2025-09-12 17:35:23 -07:00
celestial-vault c4d576d830 remove rule files conversion and directly create grpc request (#5914) 2025-09-12 17:35:07 -07:00
Bee d462e0b67c fix: Start new task instead of resume completed task (#6179)
* fix: Start new task instead of resume completed task

* no changeset

* Start New Task with Context
2025-09-12 15:47:27 -07:00
Bee a4d8f7cb3d feat: generate commit for staged changes if any (#6177)
* feat: generate commit for staged changes if any

- Replace getWorkingState with getGitDiff function that return diff for staged changes only with unstaged change as fallback
- Add structured PROMPT constant with system and message templates
- Wrap generation logic in try-catch for better error handling
- Move input validation and progress handling into main generate function
- Improve error messages with more descriptive context

* changeset added

* clean up
2025-09-12 15:38:26 -07:00
github-actions[bot] 7868866bed v3.28.2 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Prepare for release v3.28.2

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-12 13:32:47 -07:00
canvrno ac291a6fa8 Changeset for focus chain settings fix (#6173)
* changeset

* Fix for focus chain settings

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-12 13:20:02 -07:00
canvrno b71f0ddbfb Fixed issue with focus chain settings (#6170)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-12 12:21:09 -07:00
Sarah Fortune 8a4c264415 Rename Uri to Url (#6155)
We have switched from using using the VSCode URI to regular URLs, so update the names of the functions to say Url instead of Uri.
2025-09-12 11:57:50 -07:00
github-actions[bot] af548e109a v3.28.1 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Prepare changelog for release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-12 11:08:48 -07:00
Jose Castelli ddd03243f4 Adding initial integration spec files based on e2e playwright tests (#6136)
Adding initial integration spec files based on e2e playwright tests
2025-09-12 19:53:08 +02:00
canvrno 5f19701f33 Removed focus chain feature flag (#6168)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-12 10:41:54 -07:00
Sarah Fortune 0b992131e3 Use the correct IDE name in the API request (#6157)
* Use the correct IDE name in the API request

The IDE name is influences the model's response, so use the correct name instead of using VSCode on all platforms.

* Include the IDE type in the system info

* Move the ide name into the SystemPromptContext

Remove the legacy system prompt test, otherwise it would be need to be updated for these changes, but it is already deprecrated.
2025-09-11 23:41:46 -07:00
Bee 1530cfe034 Register commands and view to use centralized ExtensionRegistryInfo (#6153)
* Register commands and view to use centralized ExtensionRegistryInfo

Replace hardcoded package.json imports and string literals with a centralized
ExtensionRegistryInfo object that provides extension name and command
definitions. This improves maintainability and ensures consistency across
the codebase.

* update view id

* Fix environment variable serialization in vite config

Wrap all process.env values with JSON.stringify to ensure proper
string serialization and prevent undefined values from breaking
the build configuration.
2025-09-11 20:35:16 -07:00
John Costa 6b9dbccfd2 fix: using baseURL to fetch models and get API key (#5732)
* fix: using baseURL to fetch models and get API key

* change set

* fix: keeping /v1 in URL

This is because `URL` constructor, strips the path when giving two
arguments.
2025-09-11 19:52:42 -07:00
Sarah Fortune c3591290d2 When using the AuthHandler redirect to the host IDE after logging in (#6139)
* When using the AuthHandler redirect to the host IDE after logging in.

Add an RPC to the host bridge to the URI scheme for the host IDE.
Add a redirect to the login succeeded page.

* Typo
2025-09-11 17:37:27 -07:00
Bee 1b08f23f87 Add Active Workspaces info to system information and adding feature flag for multi root (#6128)
* Add Active Workspaces info to system information

Update system_info.ts to include active workspaces in the system prompt, providing AI assistants with context about all currently open workspace directories. This enhancement helps the AI understand the full scope of the user's development environment beyond just the current working directory.

* add changeset

* Add Active Workspaces info to system information

Update system_info.ts to include active workspaces in the system prompt, providing AI assistants with context about all currently open workspace directories. This enhancement helps the AI understand the full scope of the user's development environment beyond just the current working directory.

* add changeset

* Update test for single workspace

* IS_TEST

* Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager

* Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager

* Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager

* Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager

* Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager

* Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager

* Refactor feature flags to use centralized service instead of state manager

- Replace direct state manager access with featureFlagsService calls
- Remove feature flag polling from webview initialization
- Move feature flag polling to main initialization flow
- Centralize focus chain feature flag logic in FeatureFlagsService

* Update system prompt snapshots

---------

Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
2025-09-11 16:44:20 -07:00
github-actions[bot] 7734f04e2a v3.28.0 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Changelog and Anncouncements update for release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-11 15:52:16 -07:00
celestial-vault 3ef7d0f5d2 introduce useEffect to update external state change (#6144) 2025-09-11 14:07:58 -07:00
Bee 9463b4ac72 Dev: Supports using secrets as PostHog API keys at build time (#5971)
* dev: PostHog config to use separate API keys for telemetry and error tracking

- Update PostHogErrorProvider to use dedicated errorTrackingApiKey
- Add comprehensive documentation and type definitions
- Support environment variables with fallback to public keys
- Improve code organization with clearer naming conventions

* changeset added

* Update GitHub Workflow

* debug

* revert debug and set process env for browser

* undefined environment variables fallback to public keys

* update workflow

* update provider factories with config validation and no-op logging

- Add PostHog config validation to determine provider type
- Replace "none" type with "no-op" for consistency
- Enhance NoOpProvider implementations with actual logging
- Update factory logic to use validated config checks
- Improve error handling and fallback behavior

* Update .github/workflows/publish.yml

Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com>

* Update workflow

* clean up

* update env vars in vite config

* Fix error handling recursion and update PostHog configuration

- Prevent infinite recursion in ClineError.transform() by checking for existing ClineError instances
- Use errorTrackingApiKey instead of apiKey for PostHog error provider initialization
- Replace Logger calls with console methods in NoOpErrorProvider to avoid circular dependencies
- Update dev environment detection logic to exclude CI check for more reliable configuration

* Remove console.error from unsupported error provider fallback

Remove unnecessary error logging when falling back to NoOpErrorProvider
for unsupported error provider types in ErrorProviderFactory.

* Update PostHog config to handle local and test environments

- Change dev environment detection to include local environment
- Add test environment detection for E2E and unit tests
- Disable PostHog validation in test environments to enable mocking

* add fallback back

* remove hardcoded keys

* Posthog secrets to Nightly workflow

---------

Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com>
2025-09-11 13:34:00 -07:00
Bee b858277da3 Add ESC key listener for task cancellation (#6121)
* - Add ESC key listener for task cancellation
- Refactor action buttons to use typed button actions to clean up unused code
- Replace string-based button handling with ButtonActionType enum
- Add ActionButtonConfig interface for better type safety
- Implement executeButtonAction method for centralized action handling
- Consolidate button click logic into reusable handlers

* clean up

* add changeset
2025-09-11 11:39:46 -07:00
Bee f152301ca9 dev: extension isolation in VS Code launch configs and E2E tests (#6141)
* dev: extension isolation in VS Code launch configs and E2E tests

- Replace specific extension disabling with --disable-extensions flag to avoid conflicts or bugs caused by other extensions
- Add channel configuration support for stable/insiders testing
- Enhance E2E test interface with channel selection capability
- Ensure better isolation during development and testing

* Update e2e test fixtures: configure workspace settings and allow .vscode tracking

- Add workbench.secondarySideBar.defaultVisibility setting to multiroots workspace
- Remove .vscode from gitignore to allow VS Code configuration tracking
2025-09-11 10:38:25 -07:00
Sarah Fortune 0d13ae1fa4 Make the Terminal entry in the @mentions configurable (#6126)
JetBrains doesn't support @terminal mentions, so don't show it in the mentions context menu.
2025-09-11 10:02:08 -07:00
Sarah Fortune 0cefe107b8 Add a configuration for the toggle plan/act mode keyboard shortcut. (#6125)
JetBrains already uses cmd-shift-p, so cmd-shift-a instead. Add a new field to
the platform specific config for the keyboard shortcut.

ref FDN-3
2025-09-11 09:50:31 -07:00
Jose Castelli 43a6e85d7a Add orchestrator script and improve standalone service for local testing (#6100)
Add orchestrator script and improve standalone service for local testing #6100
2025-09-11 11:48:14 +02:00
Sarah Fortune 7a27f09224 refactor: replace platform conditional __is_standalone__ with a platform configuration (#6122) 2025-09-10 22:01:41 -07:00
Sarah Fortune 0936634fe5 Remove uses of the VSCode API (#6124) 2025-09-10 21:46:11 -07:00
celestial-vault 7ec918261c Clean up HistoryView: remove debug logs and unused code (#6133)
- Remove console.info debug statement from deleteTaskWithId
- Rename filteredTasks to tasks for clarity
- Remove unused presentableTasks variable
- Remove commented out empty state UI code
2025-09-10 19:57:19 -07:00
celestial-vault 9ac17c2ec8 cleanup unnecessary functions in StateManager to reduce clutter (#6134) 2025-09-10 18:18:44 -07:00
Bee ee68fac5b8 Update nightly extension container name and vsce package scripts for test (#6132)
* Update nightly extension container name and e2e test setup

- Set activity bar title for nightly builds in package.json
- Remove unnecessary extension development flags from e2e tests as the test is set up to test from the vsix package it builds

* remove "--no-dependencies"

* activitybar title

* add back extensionDevelopmentPath
2025-09-10 17:18:58 -07:00
celestial-vault 3bcb1bacb7 Improve error handling and validation in taskHistory storage operations (#6115)
* Improve error handling and validation in taskHistory storage operations

- Add user-facing error message when StateManager initialization fails
- Replace empty string check with proper JSON parsing error handling in task history reading
- Add validation to ensure task history migration writes data correctly before clearing old state

* add missing return statement

* split up error check cases for write validation
2025-09-10 13:27:36 -07:00
kvyb 6392043f51 fix: leading slash missing in webview from files shown in chat window (#6127) 2025-09-10 23:07:09 +03:00
Derek Noggle 92177ac2ea Fix broken link in docs to Cline tools implementation (#6120) 2025-09-10 08:19:43 -07:00
Daniel Steigman 318f5a7829 added telemetry around unexpected API responses (#6066)
* added telemetry around uexpected API responses

* feat(cline): capture real HTTP request ID (X-Request-ID) in ClineHandler via custom fetch; expose getLastRequestId(); prefer true requestId over generationId in Task telemetry for empty-assistant-message

* Delete PR_BODY_nighttrek_api_error_tracking.md

* refactor(ts): improve type safety for request ID capture and empty-assistant diagnostics

cline.ts: strongly type custom fetch override using Parameters<typeof fetch>/ReturnType<typeof fetch>; safe URL extraction for string|URL|Request; removed any casts.

task/index.ts: encapsulate requestId retrieval via getApiRequestIdSafe(); avoid any; no behavior change. Scope limited to PR 6066-related changes.
2025-09-10 00:57:55 -07:00
CellenLee f98aa0fb50 feat: update kimi-k2-0905-preview and kimi-k2-turbo-preview (#5995)
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-09 23:39:49 -07:00
Bee 0bc9326b62 Add multi-root workspace support to e2e tests (#6106)
* Add multi-root workspace support to e2e diff editor tests

- Extract shared diff editor test logic into reusable function
- Add WorkspaceType interface and workspace fixture configuration
- Create test.code-workspace file for multi-root workspace testing
- Add workspace_2 fixture directory with README
- Update test helpers to support both single and multi-root workspaces
- Add dedicated test case for diff editor in multi-root workspace

* Add verbose logging control and improve workspace parameter naming in e2e tests

- Add CLINE_E2E_TESTS_VERBOSE environment variable to control mock server logging
- Replace console.log with conditional log function in ClineApiServerMock
- Rename 'workspace' parameter to 'workspaceType' for clarity
- Rename 'workspace' function parameter to 'workspacePath' for better semantics

* Add doc string

* rename
2025-09-09 23:17:47 -07:00
Ara 92d7cdf593 Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager (#5978) 2025-09-09 23:09:23 -07:00
Bee 6cc867ccb5 Replace hardcoded extension identifiers with dynamic package.json values (#6114)
* Replace hardcoded extension identifiers with dynamic package.json values

Replace hardcoded "saoudrizwan.claude-dev" and "claude-dev" strings with
dynamically imported package name and publisher from package.json across
extension activation, webview providers, commands, and test services.

* Refactor command registration to use centralized registry

- Add new registry.ts module to centralize command name management
- Replace hardcoded command strings with registry-based command names
- Import getClineCommands function to generate consistent command identifiers
- Improve maintainability by centralizing command name definitions
2025-09-09 22:56:13 -07:00
Saoud Rizwan e4325812d0 Update nightly workflow to use PublishNightly environment 2025-09-09 20:14:48 -07:00
Nick Baumann 8e0a70e38d Docs/zai coding plans (#6113) 2025-09-09 17:45:20 -07:00
Bee 272e162952 Add nightly release automation with GitHub Actions (#6041)
* Add nightly release automation with GitHub Actions

- Add GitHub workflow to publish nightly releases daily at 00:00 UTC
- Add publish:marketplace:nightly npm script
- Create publish-nightly.mjs script to handle version updates and publishing
- Script converts package to "cline-nightly" with timestamp-based versioning
- Publishes to both VS Code Marketplace and OpenVSX Registry

* Update file name

* Remove input tag

* Change nightly build schedule from midnight to 4 AM PST

- Change nightly build schedule from midnight to 4 AM PST
- Add check to skip build if no commits in last 24 hours
- Disable nightly extension in VS Code debug configs to avoid conflicts

* add if: github.repository == 'cline/cline'
2025-09-09 16:50:47 -07:00
Bee 78b47e3ebd dev: Configure auto-fix and import organization on save in VSCode (#6109)
* dev: Configure auto-fix and import organization on save in VSCode

Add editor.codeActionsOnSave settings to automatically fix linting issues,
remove unused imports, and organize imports using Biome when saving files.

* biome specific
2025-09-09 15:47:01 -07:00
Saoud Rizwan 8a97a88fb8 hotfix: remove grok-code-fast-1 promotion deadline (#6111) 2025-09-09 15:13:45 -07:00
Sarah Fortune 1caaf7d6ca Remove unused functions from vscode wrapper (#6108)
Remove unused function get/setState()
2025-09-09 14:38:08 -07:00
Sarah Fortune f1cd1518fb Remove Host Bridge watch service (#6090)
* Remove Host Bridge watch service

Replace the host bridge file watch service with native JS module chokidar.

Remove the watch service and references to it.

* Remove references to watch service from host provider
2025-09-09 12:29:41 -07:00
Jose Castelli 97dadea068 Adding hooks to record getlateststate for testing purposes (#6072)
Adding hooks to record getlateststate for testing purposes #6072
2025-09-09 21:24:22 +02:00
Sarah Fortune 28b5c1de24 Remove references to vscode.env.uriScheme (#6091)
On JetBrains getTelemetrySetting returns UNSUPPORTED. So, we do not need to check specifically for VSCode.
2025-09-09 12:06:07 -07:00
celestial-vault 6cd99c7738 Add comprehensive clean scripts to package.json (#6102)
- Add clean:build to remove build artifacts (dist, dist-standalone, webview-ui/build, src/generated, out/)
- Add clean:deps to remove node_modules directories (root and webview-ui)
- Add clean:all to run both clean:build and clean:deps
- Rename original clean command to clean:build for better organization
2025-09-09 10:56:51 -07:00
Jose Castelli 9b750783c9 Add gRPC recorder request filtering logic to make it more generic and configurable (#6070)
Add gRPC recorder request filtering logic to make it more generic and configurable #6070
2025-09-09 19:01:32 +02:00
Jose Castelli 592e1a6d49 Simple cli to trigger spec file calls against the standalone extension core (#6029)
Simple cli to trigger spec file calls against the standalone extension core #6029
2025-09-09 17:43:12 +02:00
Jose Castelli c30b2158e3 Add optional middleware for recording gRPC calls in grpc handlers (#6024)
Add optional middleware for recording gRPC calls in grpc handlers
2025-09-09 16:49:20 +02:00
Will Hardwick-Smith 26a47722aa Fix: LiteLLM extended thinking mode params for anthropic models (#5939)
* correctly set ext thinking tokens when max output set to default
-1, unset temperature on anthropic models in ext thinking mode

* fix wrong parenthesis location
2025-09-08 23:27:07 -07:00
Bee ce426c0344 Remove extension telemetry config check from PostHogTelemetryProvider (#6093)
Remove the extension telemetry config check from PostHogTelemetryProvider, which was looking at the wrong location which never get sets.
We should rely on setOptIn() for user preference management via UI which gets invoked when webview called the updateTelemetryState method in TelemetryService, which gets called in src/core/controller/ui/initializeWebview.ts
2025-09-08 18:54:30 -07:00
Sarah Fortune 461f02bd25 Remove unused file (#6092) 2025-09-08 18:37:24 -07:00
Sarah Fortune 9fe16941a3 Add telemetry APIs to the list of VSCode APIs that have been migrated. (#6089) 2025-09-08 18:13:35 -07:00
Sarah Fortune b93adc20af Move vscode.env.onDidChangeTelemetryEnabled to the Host Bridge (#6080)
* Add vscode.env.onDidChangeTelemetryEnabled to the Host Bridge

Add a streaming method to the host bridge that returns a message when
the host telemetry setting is changed.

Replace uses of vscode.env.onDidChangeTelemetryEnabled with `subscribeToTelemetrySettings`.

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Remove debug logs

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-09-08 16:00:57 -07:00
Ara 7ccf7a8bb5 Fixing Extra code being hit by telemetry (#6086) 2025-09-08 15:25:28 -07:00
Sarah Fortune 8f9de630b3 Switch to getting the telemetry settings from the Host Bridge (#6079) 2025-09-08 15:01:53 -07:00
Sarah Fortune 87c4965110 Use ripgrep directly for @mentions (#6067)
Don't use the host bridge to search for files.
Remove searchFiles from the workspace.proto
2025-09-08 12:46:23 -07:00
Jose R. Perez 4f35a5975a feat: adding hubspot analytics to docs (#6081)
* feat: adding hubspot analytics to docs

* Update docs/hubspot.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/hubspot.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-08 12:06:38 -07:00
Sarah Fortune 17fd4ceb7f Prevent VSCode API calls from being re-introduced. (#6075)
* Prevent VSCode API calls from being re-introduced.

Add more grit patterns for the VSCode.

* Dont check for telemetry APIs yet
2025-09-08 11:58:36 -07:00
Sarah Fortune a231ee4d5c Use HostBridge to open diff (#6076)
* Use HostBridge to open diff

Use the host bridge to multi file diff. Using the VSCode API directly will not work on JetBrains.

* Use await
2025-09-08 11:20:36 -07:00
Sarah Fortune 531a272a63 Remove uses of VSCode API (#6073)
Remove uses of the VSCode API that was reintroduced in #5667.

The VSCode API is not portable, code using it will not work on JetBrains,
2025-09-08 07:13:10 -07:00
yuvalman 6b9ac49d0a feat: fetch deployment id in design-time instead of runtime (#6052) 2025-09-08 06:56:55 -07:00
Sarah Fortune 6d42a3fe0c Refactoring: Move the host bridge client out of the protobus-service file. (#6062) 2025-09-08 02:10:30 -07:00
Sarah Fortune 5c9c37a075 Remove uses of the VSCode API (#6071)
* Remove use of VSCode API

Remove unused field `disposables`.

* Remove unused field disposables
2025-09-08 01:28:49 -07:00
Sarah Fortune d08c394f68 Use the correct binary path for cline-core (#6065)
Binaries will be the cwd.

When tools fail with an error, log the exception to the console. This makes debugging cline-core easier.

# Conflicts:
#	src/services/ripgrep/index.ts
#	src/standalone/cline-core.ts
2025-09-07 22:14:29 -07:00
Sarah Fortune c0ca9889ff Add platform-agnostic support for ripgrep (#6063)
Add a method to the host provider that returns the location of the ripgrep binary.

Update the places where ripgrep is called.
2025-09-07 21:39:13 -07:00
Sarah Fortune fc19697fad Support node modules that include binaries in cline-core (#6046)
* Fix check for debug build in package-standalone script

* Support node modules that include binaries

Add support to the scripts/package-standalone.js for node modules that use platform-specific binary modules.

By default the script bundles the module for all platforms, this can be disabled with -s for single platform builds.

The module for each platform will be bundled into standalone.zip in platform specific directories:
```
binaries/linux-arm64/node_modules
binaries/darwin-x64/node_modules
binaries/win32-x64/node_modules
binaries/darwin-arm64/node_modules
binaries/linux-x64/node_modules
```

When running cline-core add the correct directory to the NODE_PATH, e.g.
```
$ export NODE_PATH=./node_modules/:./binaries/darwin-arm64/node_modules/
cline:/tmp/1$ node cline-core.js
Loading stubs...
Finished loading stubs
Loading stub impls...
Finished loading stub impls...
Cline environment: production
XS variant configuration warnings: [
  'Component overrides for unused components: TOOL_USE_SECTION, TOOLS_SECTION, MCP_SECTION, TODO_SECTION, FEEDBACK_SECTION',
  'Missing recommended components: TOOL_USE_SECTION'
]
[2025-09-05T19:53:00.853] #bot.cline.server.ts Running standalone cline  0.0.1
[2025-09-05T19:53:00.854] #bot.cline.server.ts Using settings dir: /Users/sjf/.cline/data
Finished loading vscode context...
[2025-09-05T19:53:00.858] #bot.cline.server.ts

Starting cline-core service...

sjfsjf created DBBBBBBBBB:  Database {
  name: '/tmp/db.sql',
  open: true,
  inTransaction: false,
  readonly: false,
  memory: false
}
```

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Support node modules that include binaries

Add support to the scripts/package-standalone.js for node modules that use platform-specific binary modules.

By default the script bundles the module for all platforms, this can be disabled with -s for single platform builds.

The module for each platform will be bundled into standalone.zip in platform specific directories:
```
binaries/linux-arm64/node_modules
binaries/darwin-x64/node_modules
binaries/win32-x64/node_modules
binaries/darwin-arm64/node_modules
binaries/linux-x64/node_modules
```

When running cline-core add the correct directory to the NODE_PATH, e.g.
```
$ export NODE_PATH=./node_modules/:./binaries/darwin-arm64/node_modules/
cline:/tmp/1$ node cline-core.js
Loading stubs...
Finished loading stubs
Loading stub impls...
Finished loading stub impls...
Cline environment: production
XS variant configuration warnings: [
  'Component overrides for unused components: TOOL_USE_SECTION, TOOLS_SECTION, MCP_SECTION, TODO_SECTION, FEEDBACK_SECTION',
  'Missing recommended components: TOOL_USE_SECTION'
]
[2025-09-05T19:53:00.853] #bot.cline.server.ts Running standalone cline  0.0.1
[2025-09-05T19:53:00.854] #bot.cline.server.ts Using settings dir: /Users/sjf/.cline/data
Finished loading vscode context...
[2025-09-05T19:53:00.858] #bot.cline.server.ts

Starting cline-core service...

sjfsjf created DBBBBBBBBB:  Database {
  name: '/tmp/db.sql',
  open: true,
  inTransaction: false,
  readonly: false,
  memory: false
}
```

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Remove test code

* Use the correct target directory for the binaries

The directory structure that the JB host expects is does
not exactly match ${arch}-${os}

* Update package-standalone script

Warn if there is module that needs binaries, but it is not being used.
Reset the binaries dir before packaging.

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-09-07 16:31:06 -07:00
Sarah Fortune f64e8ddbf7 Remove warning about using int64 in proto files (#6061) 2025-09-07 14:42:22 -07:00
Sarah Fortune 70d1dce34f Increase the compression level for standalone.zip (#6056)
This reduces the size of the zip from 18MB to 15MB, it doesn't really change the amount of time it takes to make the zip.
2025-09-06 11:57:54 -07:00
watany 950142fdfb feat(gpt) reasoning effort minimal (#5900)
* feat(OpenAI): Reasoning Effort Minimal

* changeset
2025-09-05 21:32:47 -07:00
Bee 41765fc29a Fix styling for TelemetryBanner and SettingsView (#6031)
* Fix styling for TelemetryBanner and SettingsView

- Replace styled-components with Tailwind classes in TelemetryBanner
- Add performance optimizations to SettingsView with memoization and debouncing
- Update Tailwind config to support new banner color variables
- Improve component structure and reduce bundle size

* use lodash

* memo content map

* Update E2E test
2025-09-05 20:51:35 -07:00
Bee e5f8c048ce Re-render account view on auth change (#6043)
* Add key prop to ClineAccountView

Add key prop to ClineAccountView to force re-render on user change

Add key={clineUser.uid} to ClineAccountView component to ensure proper
component re-mounting when user changes, preventing stale state issues.

* changeset added
2025-09-05 20:38:50 -07:00
Saoud Rizwan 83de7bb2f1 Fix bug where user message for mistake_limit_reached was not being shown in chat view (#5965) 2025-09-05 20:12:02 -07:00
Bee 6c842c145f sets Biome as global default formatter (#6045)
Replace language-specific Biome formatter settings with a single global default formatter configuration for the repo.
2025-09-05 17:25:32 -07:00
Sarah Fortune 09adaca575 Fix check for debug build in package-standalone script (#6044) 2025-09-05 15:41:29 -07:00
Bee 0b1a237290 Unify tool name vars (#6012)
* Use ClineDefaultTool

* Use ClineDefaultTool
2025-09-05 11:18:55 -07:00
canvrno cb1bda9b5c Checkpoints refactor (#4452)
* add grok coder free model to cline provider (#5808)

* add free grok-coder-free model to cline provider

* add changeset

* fix typo

* checkpoints class created

* Added saveCheckpoint to Checkpoint class

* Rebased and updated for new ClineMessages

* Moved things around, started on saveCheckpoint

* implemented handler for checking and initializing the checkpointTracker if not already done

* Moved restoreCheckpoint and handleSucessfullRestore to checkpoints class

* Moved presentMultiDiff, not yet connected

* Migrated doesLatestTaskCompletionHaveNewChanges and compelted migration on presentMultifileDiff

* Better init handling

* moved fileContextTracker to new checkpoints class

* Checkpoints state management

* refactoring and cleanup in saveCheckpoint, init handler

* More saveCheckpoint refactoring

* Added sayTs return to say function for better async clineMessages updates

* Refactor checkpoint system with timestamp tracking and dependency separation

* More refactoring

* Friendship ended with checkpointTracker, checkpointManager is new best friend

* Better error handling

* checkpointTrackerErrorMessage > checkpointManagerErrorMessage

* Addressed possible race condition with message(Ts)

* Better error handling and 15s timeout changes

* Remove checkpoint delegation methods and call checkpoint manager directly

* updating checkpoints protos

* cleanup

* Restored autoApprove entry to task class

* cleanup

* cleanup

* Post-rebase fixes

* Migrated timeout and state changes from PR #5015

* Extract toolExecutor callback functions to private methods for readability

* Updated info/error messages to use HostProvider

* post rebase fixes

* Compare/diff button fix

* Fix lint errors

* Update webview-ui/src/components/chat/task-header/TaskHeader.tsx

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update src/integrations/checkpoints/index.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Fixed bad merge, updated focus change for compatability with new say()

* Fixed error message propagation issue

---------

Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-09-05 00:06:53 -07:00
canvrno 5dfd16359d e2e tests for slash/mentions in chat text area (#6022)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-04 22:46:23 -07:00
arman-sambanova 64a8096f96 sambanova provider: add DeepSeek-V3.1 (#6001) 2025-09-04 22:19:00 -07:00
Saoud Rizwan e5a1d11179 Fix empty taskHistory.json file being read and parsed on startup, leading to crash (#6016) 2025-09-04 22:16:10 -07:00
Wei Chen 5af6e8d5ed Improve the deep-planning prompt by excluding dependency folders on find commands (#5884) 2025-09-04 22:15:50 -07:00
Bee 6ecadfc7a1 fix parameterless tool docs in system prompt (#6018)
- Recognize GPT-5 IDs (including openai/gpt-5) in model family detection and variants
- Add GPT-5 (OpenAI) to integration matrix and unit tests
- Update snapshot test instructions to use npm run test:unit -- --update-snapshots
- Fix PromptBuilder: don’t early-return on missing params; init to [] to keep output consistent
- Tidy test diff formatting (braces, explicit returns)
- Polish load_mcp_documentation tool description
2025-09-04 21:03:59 -07:00
Saoud Rizwan eb3158c83d Fix updating focus chain when attempt_completion is called (#6019) 2025-09-04 20:54:13 -07:00
Saoud Rizwan 625b701a68 Update branch for hotfix adding new Kimi K2 model to Groq and Moonshot providers (#6017)
* Add 200k context window variant for Claude Sonnet 4 to OpenRouter and Cline providers

* v3.26.7 Release Notes

* Fix grok-code-fast-1 info

* v3.27.0 Release Notes

* Add new kimi model to groq and moonshot providers

* v3.27.1 Release Notes
2025-09-04 20:27:06 -07:00
pashpashpash dd59acf0fb Change supportsPromptCache to false (#6013) 2025-09-04 18:38:11 -07:00
pashpashpash 335d0ffa05 adding new kimi model to groq and moonshot providers (#6006)
* adding new kimi model to groq and moonshot providers

* added fireworks provider too

* fixing fireworks test

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-09-04 17:47:58 -07:00
canvrno 3f341d9cf7 Fix: Slash command / mention features remove following word (#5986)
* Fixed issue where slash command feature would remove first word after the command name

* Removed slashCommandsQueryRef

* Add fix for mentions as well

* Updated mentions test

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-09-04 12:01:13 -10:00
celestial-vault 0adb1046e4 fix taskHistory migration (#6004)
* fix taskHistory migration when run across main and the prod version which use the old and the new location

* Update src/core/storage/state-migrations.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update src/core/storage/state-migrations.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update src/core/storage/state-migrations.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update src/core/storage/state-migrations.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Update src/core/storage/state-migrations.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Adding Multi root algo

* Adding Multi root algo

* Simplify the migration function

Simplify the migration function by consolidating conditional logic,
removing redundant logging, and using concurrent operations for
better performance. The logic now handles both empty and populated
destination scenarios more clearly.

* update

---------

Co-authored-by: Ara <arafat.da.khan@gmail.com>
Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
Co-authored-by: abeatrix <beatrix@cline.bot>
2025-09-04 14:45:24 -07:00
Sarah Fortune 324564af72 Don't keep regenerating the telemetry UUID (#6005)
Some environments do not return a value for the vscode machine ID.
For these cases we are generating a UUID. But the UUID was not being stored, so a new one was being created everytime the extension started.

Start storing the generated ID in the global state.

I am changing the name of the key to be more descriptive, because we only want to store the generated ID. If there is an actual machine ID, we should just use that and not store it. The old key name was only ever been read, it was never written, so this will have no affect on existing users.
2025-09-04 12:39:27 -07:00
JicLotus 291287c8e4 chord: Optional gRPC session recording system to improve observability (#5999)
chord: Optional gRPC session recording system to improve observability
2025-09-04 21:26:58 +02:00
Bee d69fb10cfd fix: only focus chat input when in chat view (#5991)
* fix: only focus chat input when in chat view

- Only focus chat input when chat view is visible, not when hidden (in other view)
- Wrap onDone callback in arrow function for consistency
- Replace inline styles with Tailwind classes for button container

* update gap value
2025-09-04 10:39:09 -07:00
celestial-vault 0f6eab2bfe make proto objects not optional by default (#5985) 2025-09-03 19:47:14 -07:00
Saoud Rizwan 016ac1eade Fix diff viewer failing showing incorrect error message (#5988) 2025-09-03 19:17:34 -07:00
Bee 2606ed7abf Remove CI environment check from PostHog config selection (#5987)
Remove process.env.CI check and rely only on IS_DEV flag to determine whether to use development or production PostHog configuration.
This is because process.env.CI is always true during the publish GitHub workflow.
2025-09-03 19:07:32 -07:00
Ara 3ed4d55a36 Add telemetry tracking for terminal hang detection and user intervention (#5955)
* Add telemetry tracking for terminal hang detection and user interventions

- Add terminal hang detection with configurable timeouts for buffer stuck, stream timeout, and completion waiting stages
- Track user interventions when clicking "Process while Running" button
- Add telemetry for terminal output failures with specific failure reasons
- Implement comprehensive monitoring of terminal process lifecycle events
- Add metrics for shell integration usage and terminal operation performance

* Remove Shortcut of Cline from its title

* Remove Shortcut of Cline from its title

* Remove Shortcut of Cline from its title
2025-09-03 16:42:45 -07:00
celestial-vault a3b4ad53dc Add filewatcher to taskHistory (#5910)
* add filewatcher to taskHistory to update across Cline instances

* changeset
2025-09-03 12:08:51 -07:00
celestial-vault bd98955f57 Move updateDefaultTerminalProfile RPC into updateSettings RPC (#5976)
* move browserSettings rpc into updateSettings

* move updateDefaultTerminalProfile rpc into updateSettings rpc
2025-09-03 11:53:56 -07:00
celestial-vault 297cfbb895 move browserSettings rpc into updateSettings (#5959) 2025-09-03 11:40:29 -07:00
canvrno b4c95fbeab Respect user's settings when evaluating feature flag for focus chain (#5969)
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-09-03 08:32:35 -07:00
JicLotus 5e8102e588 chord: Helper script for testing standalone Core API server (#5944)
* chord: Adding a new standalone core api server script for local and integration testing purposes
2025-09-03 08:54:58 +02:00
Saoud Rizwan 60f2c3a22b Update bug report template: correct model name to "Claude Sonnet 4" and change model section validation from required to optional. 2025-09-02 21:48:11 -07:00
Saoud Rizwan 7472b1cb4a Fix github issue default value 2025-09-02 21:45:57 -07:00
Saoud Rizwan 794d8bccd3 Fix github issue template formatting 2025-09-02 21:45:02 -07:00
Saoud Rizwan 0db3cfe34d Enhance bug report template with additional fields for plugin type and Cline version. Update placeholder text for provider/model input. Remove required validation for logs section. 2025-09-02 21:41:52 -07:00
Nick Baumann 5c878b5b84 Jetbrains docs (early access language tweaks) (#5957)
* docs: Update Claude Code documentation to include Pro plans alongside Max plans

* Add JetBrains installation documentation

- Create comprehensive installation guide for JetBrains IDEs
- Include both marketplace and manual installation methods
- Document supported IDEs and key differences from VSCode
- Add alpha status note and terminal integration limitations
- Update docs.json navigation to include new page

* Add images to JetBrains installation documentation

- Add demo GIF showing Cline in action in JetBrains IDE
- Add screenshot of JetBrains marketplace download page
- Add screenshot of Install Plugin from Disk dialog
- Add screenshot of file selection dialog with zip file
- Complete visual walkthrough of installation process

* Update JetBrains demo to high-quality GIF

- Replace jetbrains-demo.gif with jetbrains-demo-hifi.gif
- Improved visual quality for better user experience

* Add JetBrains settings dialog screenshot

- Add screenshot showing the main settings dialog
- Provides visual guidance for accessing IDE settings
- Complete visual walkthrough now includes 5 screenshots

* Add JetBrains logo and finalize documentation

- Add JetBrains logo at top of page with proper styling
- Update content with user revisions (BYOK note, streamlined structure)
- Complete visual installation walkthrough with 5 images
- Ready for PR review

* Update early access messaging

- Change from 'You're getting early access' to 'Cline is in early access'
- More professional and product-focused messaging
- Maintains excitement while being clearer about the product status

* Update installation link for Cline plugin

---------

Co-authored-by: pashpashpash <nik@cline.bot>
2025-09-02 17:13:38 -07:00
Ara e3bc5f0143 Setup Raw Structure for implementing multi-workspace support with WorkspaceRoot (#5849)
* Setup Raw Structure for implementing multi-workspace support with WorkspaceRoot

* Remove Shortcut of Cline from its title
2025-09-02 16:14:55 -07:00
Igor Tceglevskii f2dbab814e root folder path comparison on windows (#5938) 2025-09-02 14:26:05 -07:00
Bee b3abbd886e Update PostHog config to use dev environment in CI (#5954)
Add CI environment check to PostHog configuration logic to ensure
dev environment is used in both CI and local development contexts
2025-09-02 13:37:21 -07:00
Ara 8cdc4a936d Remove Shortcut of Cline from its title (#5952) 2025-09-02 13:14:54 -07:00
Nick Baumann ecc58178dc Jetbrains docs (#5948)
* docs: Update Claude Code documentation to include Pro plans alongside Max plans

* Add JetBrains installation documentation

- Create comprehensive installation guide for JetBrains IDEs
- Include both marketplace and manual installation methods
- Document supported IDEs and key differences from VSCode
- Add alpha status note and terminal integration limitations
- Update docs.json navigation to include new page

* Add images to JetBrains installation documentation

- Add demo GIF showing Cline in action in JetBrains IDE
- Add screenshot of JetBrains marketplace download page
- Add screenshot of Install Plugin from Disk dialog
- Add screenshot of file selection dialog with zip file
- Complete visual walkthrough of installation process

* Update JetBrains demo to high-quality GIF

- Replace jetbrains-demo.gif with jetbrains-demo-hifi.gif
- Improved visual quality for better user experience

* Add JetBrains settings dialog screenshot

- Add screenshot showing the main settings dialog
- Provides visual guidance for accessing IDE settings
- Complete visual walkthrough now includes 5 screenshots

* Add JetBrains logo and finalize documentation

- Add JetBrains logo at top of page with proper styling
- Update content with user revisions (BYOK note, streamlined structure)
- Complete visual installation walkthrough with 5 images
- Ready for PR review
2025-09-02 12:45:31 -07:00
celestial-vault ca3f0f1abd don't delete old location of taskHistory in migration for now (#5931) 2025-09-02 11:21:53 -07:00
celestial-vault 987812a886 add taskHistory size fetch after deleting all tasks to refresh size displayed (#5932) 2025-09-02 11:21:24 -07:00
Sarah Fortune 0e6afd9848 Add the OS name and version to the telemetry metadata (#5946)
Add the OS name and version to the telemetry metadata properties.
Update the test.
2025-09-02 10:52:40 -07:00
Bee 359e0e070d fix: use retry functionality for failed API requests and disable send btn (#5892)
- Add "retry" action type to ButtonActionType
- Update api_req_failed button config to use retry action with disabled sending
- Implement retry handler in useMessageHandlers to send simple approval and clear input state
2025-09-02 10:17:04 -07:00
Sarah Fortune b02ad8377d Add the host IDE metadata to the telemetry events (#5945)
Add properties to the telemetry events for the host environment name and version.

Add a .create() function to the TelemetryService because we can't use async in the constructor. (Getting the host platform version is async).
2025-09-02 09:21:18 -07:00
Sarah Fortune 8fdf5ab8c5 Fix bug in distinctId (#5943)
getMachineId was not returning the correct value and a new distint ID was getting generated every time the extension started.

Add tests and logging for distinctId.ts
2025-09-02 08:37:30 -07:00
Ara aceaeb069b Fixing failing webview test (#5933)
* Fixing failing webview test

* Fixing failing webview test
2025-09-01 16:22:35 -07:00
celestial-vault e39e58b5e2 add no unused imports error (#5911) 2025-09-01 15:44:38 -07:00
Saoud Rizwan 717be3f026 Fix grok-code-fast-1 model information and add promo in Announcement banner (#5926)
* Fix grok-code-fast-1 info

* Add call to action for trying free `grok-code-fast-1` in Announcement banner
2025-09-01 05:41:18 -07:00
Saoud Rizwan 5595d12dc3 fix (templated system prompt): add TASK_PROGRESS_PARAMETER to various tools and update descriptions (#5908)
* Add TASK_PROGRESS_PARAMETER to various tools and update descriptions

- Introduced TASK_PROGRESS_PARAMETER to enhance task tracking across multiple tools.
- Updated tool descriptions for clarity and consistency, including detailed instructions and usage examples.
- Adjusted existing parameters to improve user guidance and ensure proper tool functionality.

* update snapshots

* do not remove new lines within section around divider

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-08-30 22:41:24 -07:00
Saoud Rizwan c230de0a14 Disable buttons immediately after click (#5902) 2025-08-30 11:53:26 -07:00
celestial-vault 2ecb87ac5a Move task history to file storage (#5877)
* Move task history to file storage

* add console logs to migration

* update code comment
2025-08-30 10:45:31 -07:00
Saoud Rizwan 2315fc6769 Fix write_to_file tool diff streaming, discrepencies with original tool execution, attempt_completion command issue, and input not clearing when hitting approve (#5903)
* Fix write_to_file tool diff streaming

* Fix discrepencies with original tool execution logic

* Fix attempt completion command leading to 'ask promise was ignored' error

* Fix input not being cleared when hitting approve button
2025-08-30 06:15:09 -07:00
Ara 6449c36849 Revert "Adding frequency penalty for gemini models (#5893)" (#5898)
This reverts commit 10cfd8ba1e.
2025-08-30 00:35:36 -07:00
Saoud Rizwan 8f93e9cc40 Fix browser session not being persisted between browser tool calls (#5901) 2025-08-30 00:21:32 -07:00
Saoud Rizwan 3a52baac14 Fix ToolExecutor refactor issue where user feedback for tool use is ignored (#5899)
* Fix ToolExecutor refactor issue where user feedback for tool use is ignored

* Deduplicate code

* Fix merge conflicts
2025-08-30 00:18:54 -07:00
Tomás Barreiro 35f08731f6 fix: Improve Gemini Rate Limit handling (#5205)
* Pass all options to the handlers

* Do not pass all options

* Have onRetryAttempt as a common option

* Update the Gemini CLI

* Throw a RetriableError and extract retry delays from the error responses

* Add changeset

* Throw a RetriableError if extracting the delay fails

* Improve parseRetryDelay

* Add fallback
2025-08-29 20:58:04 -07:00
Bee 2c866c9265 Refactor posthog service providers and centralize distinct ID management (#5705)
* Refactor services architecture with provider pattern and factory classes

- Extract telemetry, error handling, and feature flags into separate service modules
- Implement provider pattern with factory classes for better abstraction
- Move PostHog-specific implementations to dedicated provider classes
- Add interfaces for telemetry, error, and feature flags providers
- Update imports across codebase to use new service structure
- Add unit tests for telemetry service

* Refactor service providers and centralize distinct ID management

- Move provider interfaces to dedicated providers/ subdirectories
- Extract distinct ID management to shared logging/distinctId module
- Simplify PostHogClientProvider by removing distinct ID parameter
- Update service factories to use centralized distinct ID
- Reorganize test files to __tests__/ directories
- Remove redundant distinct ID handling across services

* merge main

* clean up

* add grok coder free model to cline provider (#5808)

* add free grok-coder-free model to cline provider

* add changeset

* fix typo

* v3.26.6 Release Notes (#5788)

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.26.6 with user-friendly descriptions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>

* Remove top padding from ActionButtons component (#5806)

Eliminate unnecessary top padding in the chat view.

* removing middle out from params to or / cline providers (#5811)

* Dify.ai integration (#5761)

* add focus chain settings to statemanager initialize function (#5798)

* add custom gpt-5 system prompt (#5757)

* gpt-5 system prompt

* add changeset

* Focus chain telemetry tweaks (#5810)

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* Remove eslint-rules test patterns from Mocha spec configuration (#5812)

Update the "spec" array in .mocharc.json to exclude "eslint-rules/__tests__/**/*.test.ts",
as that directory has been removed.

* Increase horizontal margin in AutoApproveBar component (#5813)

Update the mx-[5px] to mx-[15px] in the div's className to adjust horizontal spacing for improved layout alignment.

* fix: remove hardcoded Ollama host from options (#5816)

* fix: remove hardcoded Ollama host from options

Updates the Ollama handler to remove the hardcoded "http://localhost:11434" as the `ollamaBaseUrl` fallback option for the host to allow the Ollama SDK to handle the default endpoint configured on users' machine.

Reason: Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. However, when we use localhost, the browser would resolve it through DNS, which can result in different IP addresses.

Docs: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network

* add changeset

* deep-planning prompt PowerShell (#5699)

* Windows/Powershell specific deep planning prompt changes

* Prompt adjustments

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* Changes to condenseToolResponse & summarizeTask prompting (#5817)

* Condense & deep planning prompt adjustments

* Removed ps prompting ready for PR

* rebase

* Fixed typo on one word

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* rename CacheService to StateManager (#5681)

* rename CacheService to StateManager

* fix types

* infer state key types from existing interfaces (#5815)

* fix: AutoApproveModal positioning and scrolling behavior (#5819)

* fix: AutoApproveModal positioning and scrolling behavior

- Add dynamic positioning calculation to prevent modal overflow
- Implement proper flex layout with scrollable content container
- Ensure minimum usable height and top margin constraints
- Fix modal positioning when button is near viewport edges

* Add changeset

* clean up

* template-based system prompt (#5731)

* Refactor system prompt architecture with new template-based system

- Move existing system prompt files to legacy directory
- Implement new modular system with PromptBuilder, PromptRegistry, and TemplateEngine
- Add component-based prompt structure with reusable parts (capabilities, rules, tool_use, etc.)
- Create variant-specific templates for generic and next-gen models
- Add comprehensive test suite with snapshots for different model configurations
- Introduce template engine with placeholder support for dynamic prompt generation

* Refactor system prompt architecture with modular tool definitions

- Extract tool specifications into dedicated modules under tools/
- Add ClineToolSet class for managing tool variants by model family
- Restructure prompt components with centralized index exports
- Update prompt builder and registry to support new tool architecture
- Reorganize shared utilities and type definitions
- Update all test snapshots to reflect new prompt structure

* Update snapshots

* reorg

* Update template format

* clean up

* typos

* focus chain section

* fix task progress in attempt_completion

* Implement tool retrieval with fallback options in PromptBuilder

- Added `getToolByNameWithFallback` and `getToolsForVariantWithFallback` methods to `ClineToolSet` for improved tool resolution.
- Updated `getToolsPrompts` in `PromptBuilder` to utilize these new methods, allowing for better handling of tool requests with fallback to generic tools.
- Enhanced sorting and filtering of tools based on context requirements and requested order.

* update fild structure

* clean up

* fix static test string

* Update snapshot names

* Update unit test

* Remove unused placeholders and update docs

* Update README on how to add new tool

* Remove task_progress reference from attempt_completion tool description when focus chain is disabled

* Upgrade posthog-node to v5.8.0 and add exception filtering

- Update posthog-node from v4.8.1 to v5.8.0
- Add EventMessage import for type safety
- Implement posthogEventFilter to only capture exceptions from Cline extension
- Filter exceptions by checking for "cline" in error messages or "saoudrizwan" in stack frames

* Use env var keys

- Add PostHogClientConfig to ErrorProviderFactory with proper validation
- Update PostHogErrorProvider to use dedicated client instead of shared one
- Add API key validation in PostHogFeatureFlagsProvider before client creation
- Enhance error handling with fallback to NoOpErrorProvider instead of throwing
- Standardize configuration passing across telemetry, error, and feature flag services

* Upadte filter

* update filter

* update imports

* use secret

* disable enableExceptionAutocapture

* removes vscode.env.machineId

* initializeDistinctId

* use get trap as workaround

* on exit

---------

Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
Co-authored-by: Yunus Emre AYHAN <ayhanyunusemre@gmail.com>
Co-authored-by: celestial-vault <58194240+celestial-vault@users.noreply.github.com>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-29 18:27:35 -07:00
Ara 10cfd8ba1e Adding frequency penalty for gemini models (#5893)
* Adding frequency penalty for gemini models

* Adding frequency penalty for gemini models

* Adding frequency penalty for gemini models

* Adding frequency penalty for gemini models

* Adding frequency penalty for gemini models
2025-08-29 17:24:38 -07:00
Saoud Rizwan da4d88fd84 hotfix: Add 200k context window variant for Claude Sonnet 4 to OpenRouter and Cline providers (#5894)
* Add 200k context window variant for Claude Sonnet 4 to OpenRouter and Cline providers

* v3.26.7 Release Notes
2025-08-29 16:56:50 -07:00
celestial-vault 889ed95840 fix z index mcp response dropdown (#5882) 2025-08-29 12:48:01 -07:00
Toshii 716e6cd6ab changing prompts for the context management (#5854)
* changing prompts for the context management

* distinction between the tool call options
2025-08-29 12:22:48 -07:00
Bee 45871a962e fix: improve caching and prevent duplicate fetches in AccountView (#5883)
* fix:  improve caching and prevent duplicate fetches in AccountView

- Wrap cacheCurrentData in useCallback with proper dependencies
- Add initialFetchCompleteRef to track mount fetch completion
- Improve organization change handling to prevent race conditions
- Remove biome-ignore comments for exhaustive dependencies
- Replace mb-[5px] with mb-1.5 for consistent Tailwind spacing

* changeset added
2025-08-29 11:18:55 -07:00
Sarah Fortune c6aa47095e Fix int32 overflow in the models proto (#5881)
Cline-core is setting some of these values in the models proto to the javascript Number.MAX_SAFE_VALUE, which won't fit in int32, so these protobuf messages fail to serialize to and can't be transported.

Just change all the int32s in this file to int64 beceause this is the second time this same issue has occured.

Fixes:
```
2025-08-28 16:30:03,824 [   3479]   WARN - bot.cline.services.ProtoBusProxyService - Stream cline.ModelsService.subscribeToOpenRouterModels encountered error
io.grpc.StatusException: INTERNAL: invalid int32: 9007199254740991
        at io.grpc.Status.asException(Status.java:548)
        at io.grpc.kotlin.ClientCalls$rpcImpl$1$1$1.onClose(ClientCalls.kt:300)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:564)
        at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:729)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:710)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Wor
```
2025-08-28 18:44:56 -07:00
Bee 8c1093cfdc add health checks and generic fallback to PromptRegistry (#5879)
* fix: Harden PromptRegistry with health checks and generic fallback

- Perform registry health check after loading (validate GENERIC, log counts/warnings)
- Always try GENERIC when family-specific variant is missing
- Enhance error diagnostics with available variants and registry state
- Ensure GENERIC variant exists; create minimal fallback if loading fails
- Minor test style cleanup and variants index update to support reliability

* simpilfy

* variants

* Fix import

* type safe

* remove lazy loading

* load and set variants

* fix import location
2025-08-28 16:39:56 -07:00
Saoud Rizwan 31161f894b Add search functionality to API provider dropdown (#5801)
* Add search functionality to API provider dropdown

* Create heavy-dolls-cry.md

* Remove unnecessary comments

* Remove unncessary comments

* Fix e2e tests checking API provide functionality

* Add Dify.ai provider

* Fix merge conflict
2025-08-28 13:32:45 -07:00
Sarah Fortune 20e5ae7b23 Don't throw an exception if deleting a directory fails. (#5868)
* Don't throw an exception if deleting a directory fails.

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-28 13:08:33 -07:00
Toshii 22f306e79e default state for useCondense set to false (#5869) 2025-08-28 13:03:01 -07:00
Saoud Rizwan 553b56336c Update copy in README (#5871) 2025-08-28 12:23:38 -07:00
Saoud Rizwan a3fa8cf7b9 Revert "Modify workflow to publish to release to OVSX"
This reverts commit 3d5605f5d7.
2025-08-28 12:08:16 -07:00
Tomás Barreiro 4628eca3dc fix: Support Anthropic Prompt Caching when using LiteLLM (#5833)
* fix: Support Anthropic cache with LiteLLM

* Add changeset

* Fix and expand tests
2025-08-28 19:23:27 +02:00
yuvalman 518e624086 fix: sap provider - show models when resource group field is empty (and use the default value) (#5839)
* fix: sap provider - show models when resource group field is empty

* fix: sap provider - show models when resource group field is empty

* fix: sap provider - show models when resource group field is empty
2025-08-28 10:12:50 -07:00
kvyb fa4fa01ec3 feat: add openClineSidebarPanel RPC and route VS Code focus via hostbridge (#5859) 2025-08-28 19:38:19 +03:00
Toshii f526317796 swapping order of checkpoint and tool result (#5853) 2025-08-27 23:51:53 -07:00
Will Hardwick-Smith 550883df6a bugfix: fixes issue where thinking output wasn't passed through from (#5852)
litellm
2025-08-27 22:25:14 -07:00
Saoud Rizwan 3d5605f5d7 Modify workflow to publish to release to OVSX 2025-08-27 19:38:23 -07:00
Bee 1b48f06898 Update snapshots for system prompt tests (#5848)
* Update snapshots for system prompt tests

- Add detailed README.md explaining integration test workflow, snapshot testing, and troubleshooting
- Unit tests should fail when snapshots are mismatched
- Update all test snapshots across different model configurations (Anthropic Claude, OpenAI GPT)
- Refresh section title comparison data for prompt structure validation
- Improve test documentation with clear examples and failure handling guidance

* make old prompts static

* Fix old vs new comparasion mismatch
2025-08-27 15:46:51 -07:00
Bee b17631900d Remove action buttons from showing for followup and plan_mode_respond (#5846)
* Remove action buttons from showing for followup and plan_mode_respond

Set primaryText, secondaryText, and primaryAction to undefined for followup and plan_mode_respond button configurations to disable default approve/reject behavior.

* add changeset
2025-08-27 14:53:57 -07:00
canvrno 3d8d83568d Remove .sql from checkpoint exclusions (#5847)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-27 14:17:39 -07:00
Szymon Stasik 3d95adb0f3 Fix: Corrected token counting in Claude Code provider to prevent doub… (#5793)
* add grok coder free model to cline provider (#5808)

* add free grok-coder-free model to cline provider

* add changeset

* fix typo

* v3.26.6 Release Notes (#5788)

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.26.6 with user-friendly descriptions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>

* Focus chain telemetry tweaks (#5810)

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* Fix: Corrected token counting in Claude Code provider to prevent double-counting of cache tokens.

* Apply nullish coalescing operator suggestion in ClaudeCodeHandler

* Add unit tests for ClaudeCodeHandler token counting

* Apply PR review feedback: trim comments, fix imports, add documentation

* revert from upstream/main

---------

Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-27 23:01:14 +02:00
Ara 971ac0fdeb Refactor Tool Executor (#5667)
* Refactor Tool Executor

* Adding diff fix

* Fixing ordering of diff stuff
2025-08-27 13:05:35 -07:00
celestial-vault 2888af54f3 Refactor/consolidate state keys (#5831)
* add grok coder free model to cline provider (#5808)

* add free grok-coder-free model to cline provider

* add changeset

* fix typo

* v3.26.6 Release Notes (#5788)

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.26.6 with user-friendly descriptions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>

* Remove top padding from ActionButtons component (#5806)

Eliminate unnecessary top padding in the chat view.

* removing middle out from params to or / cline providers (#5811)

* Dify.ai integration (#5761)

* add focus chain settings to statemanager initialize function (#5798)

* add custom gpt-5 system prompt (#5757)

* gpt-5 system prompt

* add changeset

* Focus chain telemetry tweaks (#5810)

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* Remove eslint-rules test patterns from Mocha spec configuration (#5812)

Update the "spec" array in .mocharc.json to exclude "eslint-rules/__tests__/**/*.test.ts",
as that directory has been removed.

* Increase horizontal margin in AutoApproveBar component (#5813)

Update the mx-[5px] to mx-[15px] in the div's className to adjust horizontal spacing for improved layout alignment.

* fix: remove hardcoded Ollama host from options (#5816)

* fix: remove hardcoded Ollama host from options

Updates the Ollama handler to remove the hardcoded "http://localhost:11434" as the `ollamaBaseUrl` fallback option for the host to allow the Ollama SDK to handle the default endpoint configured on users' machine.

Reason: Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. However, when we use localhost, the browser would resolve it through DNS, which can result in different IP addresses.

Docs: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network

* add changeset

* deep-planning prompt PowerShell (#5699)

* Windows/Powershell specific deep planning prompt changes

* Prompt adjustments

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* Changes to condenseToolResponse & summarizeTask prompting (#5817)

* Condense & deep planning prompt adjustments

* Removed ps prompting ready for PR

* rebase

* Fixed typo on one word

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>

* rename CacheService to StateManager (#5681)

* rename CacheService to StateManager

* fix types

* infer state key types from existing interfaces (#5815)

* fix: AutoApproveModal positioning and scrolling behavior (#5819)

* fix: AutoApproveModal positioning and scrolling behavior

- Add dynamic positioning calculation to prevent modal overflow
- Implement proper flex layout with scrollable content container
- Ensure minimum usable height and top margin constraints
- Fix modal positioning when button is near viewport edges

* Add changeset

* clean up

* template-based system prompt (#5731)

* Refactor system prompt architecture with new template-based system

- Move existing system prompt files to legacy directory
- Implement new modular system with PromptBuilder, PromptRegistry, and TemplateEngine
- Add component-based prompt structure with reusable parts (capabilities, rules, tool_use, etc.)
- Create variant-specific templates for generic and next-gen models
- Add comprehensive test suite with snapshots for different model configurations
- Introduce template engine with placeholder support for dynamic prompt generation

* Refactor system prompt architecture with modular tool definitions

- Extract tool specifications into dedicated modules under tools/
- Add ClineToolSet class for managing tool variants by model family
- Restructure prompt components with centralized index exports
- Update prompt builder and registry to support new tool architecture
- Reorganize shared utilities and type definitions
- Update all test snapshots to reflect new prompt structure

* Update snapshots

* reorg

* Update template format

* clean up

* typos

* focus chain section

* fix task progress in attempt_completion

* Implement tool retrieval with fallback options in PromptBuilder

- Added `getToolByNameWithFallback` and `getToolsForVariantWithFallback` methods to `ClineToolSet` for improved tool resolution.
- Updated `getToolsPrompts` in `PromptBuilder` to utilize these new methods, allowing for better handling of tool requests with fallback to generic tools.
- Enhanced sorting and filtering of tools based on context requirements and requested order.

* update fild structure

* clean up

* fix static test string

* Update snapshot names

* Update unit test

* Remove unused placeholders and update docs

* Update README on how to add new tool

* Remove task_progress reference from attempt_completion tool description when focus chain is disabled

* consolidate field declarations for globalstate, workspacestate, and secret keys

* remove old cacheservice file

* read_file tool call change for all models (#5830)

* feat: refactor UseCustomPrompt into reusable component, add to Ollama (#5818)

* feat: refactor UseCustomPrompt into reusable component, add to Ollama

Refactor custom prompt checkbox functionality from LMStudioProvider and OllamaProvider into a shared UseCustomPrompt component to reduce code duplication and improve maintainability.

* Add changeset

* replace key with providerId

* clean up

* Rename UseCustomPrompt to UseCustomPromptCheckbox and update imports

Rename UseCustomPrompt.tsx to UseCustomPromptCheckbox.tsx for better clarity
and update import paths in LMStudioProvider and OllamaProvider components.

* use StateManager in auxilary access of cline state instead of using vscode api directly

* fix default formatter that was erroneously changed

* feat: sap provider - support orchestration mode (#5541)

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap ai core - add orchestration

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - support orchestration modee

* feat: sap provider - support orchestration modee

* feat: sap provider - support orchestration modee

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: support doorway mapping semantic model [CCSTAHEL-2197]

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* Update docs/provider-config/sap-aicore.mdx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* feat: sap provider - support orchestration model

* feat: support doorway mapping semantic model [CCSTAHEL-2197]

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* fix converse api image data to base64 string.

Signed-off-by: Lize Cai <lize.cai@sap.com>

---------

Signed-off-by: Lize Cai <lize.cai@sap.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Lize Cai <lize.cai@sap.com>

* add in new sap field from main merge in the right place

---------

Signed-off-by: Lize Cai <lize.cai@sap.com>
Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
Co-authored-by: Yunus Emre AYHAN <ayhanyunusemre@gmail.com>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
Co-authored-by: yuvalman <yuval.manor@sap.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Lize Cai <lize.cai@sap.com>
2025-08-26 18:58:18 -07:00
yuvalman 190d4a2c52 feat: sap provider - support orchestration mode (#5541)
* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap ai core - add orchestration

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - support orchestration modee

* feat: sap provider - support orchestration modee

* feat: sap provider - support orchestration modee

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: support doorway mapping semantic model [CCSTAHEL-2197]

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* Update docs/provider-config/sap-aicore.mdx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* feat: sap provider - support orchestration model

* feat: support doorway mapping semantic model [CCSTAHEL-2197]

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* feat: sap provider - support orchestration model

* fix converse api image data to base64 string.

Signed-off-by: Lize Cai <lize.cai@sap.com>

---------

Signed-off-by: Lize Cai <lize.cai@sap.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Lize Cai <lize.cai@sap.com>
2025-08-26 15:24:18 -07:00
Bee 4d5ab59923 feat: refactor UseCustomPrompt into reusable component, add to Ollama (#5818)
* feat: refactor UseCustomPrompt into reusable component, add to Ollama

Refactor custom prompt checkbox functionality from LMStudioProvider and OllamaProvider into a shared UseCustomPrompt component to reduce code duplication and improve maintainability.

* Add changeset

* replace key with providerId

* clean up

* Rename UseCustomPrompt to UseCustomPromptCheckbox and update imports

Rename UseCustomPrompt.tsx to UseCustomPromptCheckbox.tsx for better clarity
and update import paths in LMStudioProvider and OllamaProvider components.
2025-08-26 15:24:18 -07:00
Toshii f0ad29accb read_file tool call change for all models (#5830) 2025-08-26 15:24:18 -07:00
Bee 0ba45084a0 template-based system prompt (#5731)
* Refactor system prompt architecture with new template-based system

- Move existing system prompt files to legacy directory
- Implement new modular system with PromptBuilder, PromptRegistry, and TemplateEngine
- Add component-based prompt structure with reusable parts (capabilities, rules, tool_use, etc.)
- Create variant-specific templates for generic and next-gen models
- Add comprehensive test suite with snapshots for different model configurations
- Introduce template engine with placeholder support for dynamic prompt generation

* Refactor system prompt architecture with modular tool definitions

- Extract tool specifications into dedicated modules under tools/
- Add ClineToolSet class for managing tool variants by model family
- Restructure prompt components with centralized index exports
- Update prompt builder and registry to support new tool architecture
- Reorganize shared utilities and type definitions
- Update all test snapshots to reflect new prompt structure

* Update snapshots

* reorg

* Update template format

* clean up

* typos

* focus chain section

* fix task progress in attempt_completion

* Implement tool retrieval with fallback options in PromptBuilder

- Added `getToolByNameWithFallback` and `getToolsForVariantWithFallback` methods to `ClineToolSet` for improved tool resolution.
- Updated `getToolsPrompts` in `PromptBuilder` to utilize these new methods, allowing for better handling of tool requests with fallback to generic tools.
- Enhanced sorting and filtering of tools based on context requirements and requested order.

* update fild structure

* clean up

* fix static test string

* Update snapshot names

* Update unit test

* Remove unused placeholders and update docs

* Update README on how to add new tool

* Remove task_progress reference from attempt_completion tool description when focus chain is disabled
2025-08-26 15:24:18 -07:00
Bee 213591a169 fix: AutoApproveModal positioning and scrolling behavior (#5819)
* fix: AutoApproveModal positioning and scrolling behavior

- Add dynamic positioning calculation to prevent modal overflow
- Implement proper flex layout with scrollable content container
- Ensure minimum usable height and top margin constraints
- Fix modal positioning when button is near viewport edges

* Add changeset

* clean up
2025-08-26 15:24:18 -07:00
celestial-vault 70fd35df6d infer state key types from existing interfaces (#5815) 2025-08-26 15:24:17 -07:00
celestial-vault bd526cb2d2 rename CacheService to StateManager (#5681)
* rename CacheService to StateManager

* fix types
2025-08-26 15:24:17 -07:00
canvrno 2fbebec7ae Changes to condenseToolResponse & summarizeTask prompting (#5817)
* Condense & deep planning prompt adjustments

* Removed ps prompting ready for PR

* rebase

* Fixed typo on one word

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-26 15:24:17 -07:00
canvrno ca1e008714 deep-planning prompt PowerShell (#5699)
* Windows/Powershell specific deep planning prompt changes

* Prompt adjustments

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-26 15:24:17 -07:00
Bee 1ab3de8911 fix: remove hardcoded Ollama host from options (#5816)
* fix: remove hardcoded Ollama host from options

Updates the Ollama handler to remove the hardcoded "http://localhost:11434" as the `ollamaBaseUrl` fallback option for the host to allow the Ollama SDK to handle the default endpoint configured on users' machine.

Reason: Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. However, when we use localhost, the browser would resolve it through DNS, which can result in different IP addresses.

Docs: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network

* add changeset
2025-08-26 15:24:17 -07:00
Bee 47f75225e8 Increase horizontal margin in AutoApproveBar component (#5813)
Update the mx-[5px] to mx-[15px] in the div's className to adjust horizontal spacing for improved layout alignment.
2025-08-26 15:24:17 -07:00
Bee 15f6577cb9 Remove eslint-rules test patterns from Mocha spec configuration (#5812)
Update the "spec" array in .mocharc.json to exclude "eslint-rules/__tests__/**/*.test.ts",
as that directory has been removed.
2025-08-26 15:24:17 -07:00
canvrno 7c5d56a5c1 Focus chain telemetry tweaks (#5810)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-26 15:24:17 -07:00
pashpashpash cdc24890ee add custom gpt-5 system prompt (#5757)
* gpt-5 system prompt

* add changeset
2025-08-26 15:24:17 -07:00
celestial-vault ef5465b667 add focus chain settings to statemanager initialize function (#5798) 2025-08-26 15:24:17 -07:00
Yunus Emre AYHAN d4ba4fd98a Dify.ai integration (#5761) 2025-08-26 15:24:17 -07:00
Toshii 074e5d7002 removing middle out from params to or / cline providers (#5811) 2025-08-26 15:24:17 -07:00
Bee 18e164fe81 Remove top padding from ActionButtons component (#5806)
Eliminate unnecessary top padding in the chat view.
2025-08-26 15:24:17 -07:00
github-actions[bot] 82be7c4ed5 v3.26.6 Release Notes (#5788)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.26.6 with user-friendly descriptions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-26 15:24:17 -07:00
Saoud Rizwan 702dd75291 add grok coder free model to cline provider (#5808)
* add free grok-coder-free model to cline provider

* add changeset

* fix typo
2025-08-26 15:24:08 -07:00
celestial-vault ce89547f32 Use VS Code CSS variables for markdown/codeblock styling (#5783)
* use css variables for highlight styling and remove theme subscription along with vscode theme to highlight pipeline logic

* changeset

* Remove monaco-vscode-textmate-theme-converter

* Remove unnecessary markdown css

* Remove package-lock.json from version control

* re-add package-lock

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-25 10:15:29 -07:00
Saoud Rizwan 275be69932 fix: 'disable checkpoints' button font size does not match surrounding text (#5787)
* fix: 'disable checkpoints' button font size does not match surrounding text

* Remove non-existant font-inherit
2025-08-25 09:36:00 -07:00
Tomás Barreiro 8eba96582a fix: provider options (#5204)
* Pass all options to the handlers

* Add changeset

* Do not pass all options

* Have onRetryAttempt as a common option

* Do not duplicate the onRetryAttempt definition
2025-08-25 18:00:26 +02:00
evinelias e73364d497 Feature/Qwen Code CLI API Support with OAuth (#5766)
* feat: Integrate Qwen Code API with OAuth authentication

- Add Qwen Code API provider with OAuth2 authentication flow
- Implement QwenCodeProvider component for settings UI
- Add qwenCodeOauthPath to CacheService state management
- Update protobuf models with QWEN_CODE provider type
- Fix protobuf enum values (VSCODE_LM changed from 15 to 33)
- Add comprehensive API configuration conversion support
- Update build scripts to use system protoc for Windows compatibility
- Optimize VSIX packaging by excluding reference codebase
- Follow camelCase convention: qwen_code_oauth_path  qwenCodeOauthPath

* docs: Add Qwen Code API integration documentation

- Document OAuth2 authentication flow and features
- Highlight enterprise-grade security capabilities
- Include setup instructions for credential management
- Emphasize automatic token refresh and caching features

* cleanup: Clean up build configuration for production release

- Revert protoc path to use grpc-tools instead of exposing system path
- Restore vscode:prepublish script for proper VS Code marketplace publication
- Remove reference codebase exclusion from .vscodeignore for cleaner packaging

* refactor: Remove Windows platform check from build-proto script

- Remove unnecessary isWindows variable and platform-specific logic
- Simplify TS_PROTO_PLUGIN to use standard require.resolve approach
- Improve cross-platform compatibility and code clarity

* restore: Restore Windows platform check in build-proto script

- Add back isWindows platform detection variable
- Restore Windows-specific TS_PROTO_PLUGIN logic using .cmd file
- Maintain cross-platform compatibility for Windows builds

* Update ApiOptions.tsx

* Remove Qwen Code API integration section

* Revert README

* Fix protos order

* Revert change

* Remove validation for qwen code

---------

Co-authored-by: Ara <arafat.da.khan@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-24 20:25:20 -07:00
pashpashpash 56b8c4a847 add gpt-5 to recommended list (#5789) 2025-08-23 22:58:52 -07:00
Toshii cd066c4912 remove middle out for gpt5 (#5786)
* remove middle out for gpt5

* refactor: using standard family identifier functions

* fix: making sure to lowercase all model ids

* changeset

---------

Co-authored-by: pashpashpash <nik@nugbase.com>
2025-08-23 20:47:56 -07:00
github-actions[bot] 59a0d055de v3.26.5 Release Notes (#5785)
* changeset version bump

* Updating CHANGELOG.md format

* Revise changelog for version 3.26.5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-23 17:06:49 -07:00
Saoud Rizwan b0ea2e48a7 Fix OVSX publish command (#5784)
* Fix OVSX publish command

* Fix OVSX publish command
2025-08-23 17:03:44 -07:00
github-actions[bot] 9e86ba580b v3.26.4 Release Notes (#5769)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

* Update version from 3.27.0 to 3.26.4

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-23 16:43:53 -07:00
Walter Korman 99eccaafd4 fix (provider/vercel-ai-gateway): load model list once on settings view display (#5776) 2025-08-23 15:54:13 -07:00
Saoud Rizwan cc0f695555 Allow packaging secrets in VSCE publish command (#5782)
* Allow packaging secrets in VSCE publish command

* Create shaggy-beans-yell.md

* Revert "fix publish yml action (#5770)"

This reverts commit 357f98c707.
2025-08-23 15:53:27 -07:00
Saoud Rizwan 96a461668c Revert "Scenario Test Workflow (#5711)" (#5781)
This reverts commit b45168f6a3.
2025-08-23 15:49:37 -07:00
pashpashpash 357f98c707 fix publish yml action (#5770) 2025-08-23 00:53:25 -07:00
Ara 6d4bea48d3 ReOrder Model List (#5767) 2025-08-22 23:38:30 -07:00
Dennise Bartlett 06cd873a46 Allow packaging secrets in VSCE command 2025-08-22 23:18:16 -07:00
pashpashpash 34e52757ff Revert "Build package per commit (#4570)" (#5768)
This reverts commit fe8ab85e1a.
2025-08-22 22:52:14 -07:00
Mark Percival 43d1bd858c chore: remove disabled 'codespell' workflow (#5662) 2025-08-22 20:55:58 -07:00
Mark Percival 90f07e824e chore: Remove 'old_docs' documentation (#5661) 2025-08-22 20:48:49 -07:00
yuvalman 8cc823ce05 feat: sap provider - support reasoning effort for open ai models (#5691)
* feat: sap provider - support reasoning effort for open ai models

* feat: sap provider - support reasoning effort for open ai models

* feat: sap provider - support reasoning effort for open ai models

* feat: sap provider - support reasoning effort for open ai models

* feat: sap provider - support reasoning effort for open ai models
2025-08-22 20:43:38 -07:00
dylan eeef3f89bd feat: add new models from Nebius AI Studio with correct pricing (#5729) 2025-08-22 20:26:52 -07:00
Lize Cai b1ab8967ec fix: Claude 4 image processing in SAP AI Core provider (#5735)
* fix converse api image data to base64 string.

Signed-off-by: Lize Cai <lize.cai@sap.com>

* add test cases

Signed-off-by: Lize Cai <lize.cai@sap.com>

---------

Signed-off-by: Lize Cai <lize.cai@sap.com>
2025-08-22 20:18:32 -07:00
Ann-Holmes 5a81f8f6d3 feat(deepseek): Update DeepSeek models context window from 64K to 128K (#5751)
- Updated contextWindow for deepseek-chat and deepseek-reasoner models from 64_000 to 128_000
- Modified context-window-utils.ts to handle DeepSeek models with 128K context window instead of 64K
- This change aligns with DeepSeek's official API documentation and improves model performance
2025-08-22 20:16:01 -07:00
github-actions[bot] 55b1b4c125 v3.26.3 Release Notes (#5759)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.26.3 release

- Add user-friendly descriptions for compact system prompt feature
- Add proper version formatting with brackets
- Improve clarity of LM Studio and token usage tracking features

* package lock

* changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-22 17:22:16 -07:00
Tomás Barreiro fe8ab85e1a Build package per commit (#4570)
* Build the extension on every commit push

* Publish using the vsix path

* Fix tag resolution

* Remove `while ;`

* Remove test trigger

* use while true;

* Update package.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Use high capacity runner

* add if check to only run in the Cline repo

* Conditionally select a runner

---------

Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 17:07:52 -07:00
Bee a50200aba1 feat: Support compact system prompt for LM studio models and token usage tracking (#5720)
* Add compact system prompt for local models

- Introduce compact system prompt for local models (lm studio, ollama)
- Add ApiProviderInfo { modelId, providerId } to API
- Persist promptType in global state and propagate to webview
  (updateSettings, state keys/helpers, ExtensionMessage, UI context)
- Wire provider info through task pipeline to buildSystemPrompt

* isLocalModelFamily

* Add custom prompt support and LM Studio API improvements

* Enable token usage tracking in LM Studio stream responses

This change adds the stream_options parameter with include_usage: true to LM Studio API requests, allowing the system to receive token usage information along with streaming responses. This enables better tracking of token consumption for LM Studio model interactions.

* update compact system prompt

* feat: Support compact system prompt for LM studio models and token usage tracking

* clean up

* Update UI helper text
2025-08-22 11:32:19 -07:00
github-actions[bot] 7640ae11ec v3.26.2 Release Notes (#5736)
* changeset version bump

* Updating CHANGELOG.md format

* changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-21 16:26:04 -07:00
pashpashpash 08d94c450f removing max tokens from sonic model (#5742) 2025-08-21 16:01:24 -07:00
Nick Baumann d7a93cd618 docs: Vercel AI Gateway provider page (#5743) 2025-08-21 16:01:13 -07:00
Joyce Er 49475ad417 fix: small typo in focus chain settings page (#5744) 2025-08-21 15:58:22 -07:00
Saoud Rizwan e6c18ea793 Fix openrouter/cline gpt-5 contextWindow by setting to 272k since it's inaccurately reported as 400k (#5738) 2025-08-21 14:48:31 -07:00
Toshii 881593beea extract error code from the error message (#5741) 2025-08-21 12:28:24 -07:00
Bee 96198c82f9 fix: improve OpenRouter model info parsing (#5737)
* fix: improve OpenRouter model info parsing

Refactor OpenRouter model fetching to include `OpenRouterRawModelInfo` and `OpenRouterSupportedParams` types for better clarity and type safety. This allows for more accurate parsing of model capabilities, including support for "thinking" (reasoning) configurations.

The thinking config is now only set if the model explicitly supports the `include_reasoning` parameter. Additionally, the budget slider in the UI is now displayed for OpenRouter models that support thinking, not just specific Claude models. This provides a more dynamic and accurate representation of model features.

* add changelog

* Set thinking budget for stream
2025-08-21 11:55:55 -07:00
Brian b45168f6a3 Scenario Test Workflow (#5711)
* add scenario workflow and associated files

* add github PR validation

* add permissions restrictions

* add matrix_prep permissions

---------

Co-authored-by: Brian Pierce <brian@cline.bot>
2025-08-21 10:14:58 -07:00
Toshii 24f10eeee5 added telemetry for condense toggle in menu (#5718) 2025-08-20 21:35:07 -07:00
yuvalman d594368f05 fix: add support to *.go files in deep-planning prompt (#5640)
* fix: add support to *.go files in deep-planning feature

* fix: add support to *.go files in deep-planning feature

* adding go to the todos section

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-08-20 17:27:15 -07:00
pashpashpash 7177dd00ea add /cli to gitignore while in prerelease (#5717) 2025-08-20 17:17:53 -07:00
github-actions[bot] 8f0352ee01 v3.26.1 Release Notes (#5702)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for version 3.26.1 patch release

* announcement

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-20 16:44:55 -07:00
Nick Baumann 2ebd92ee94 docs: Add 5 new provider guides and update model selection guide (#5716)
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-20 16:24:15 -07:00
Daniel Steigman 8806beda20 Change default strict plan mode setting to enabled (#5714)
* Change default strict plan mode setting to enabled

- Updated default from false to true in state-helpers.ts (primary backend default)
- Updated fallback default in controller/index.ts (Task initialization)
- Updated frontend default in ExtensionStateContext.tsx for consistency
- Fixed linting issue with forEach callback return value
- New users will now have strict plan mode enabled by default
- Prevents file edits in Plan Mode, enforcing cleaner separation of planning vs execution

* added changeset

---------

Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-20 16:23:36 -07:00
Toshii 58ce23663d next gen context management method switch (#5715)
* truncate first user message

* base swapping

* linting

* menu

* apply biome fixes and add back in removed comments

* undo biome invalid changes

* updating feature section comment

* button to enable auto compact just for next gen models
2025-08-20 16:02:20 -07:00
Josh 6dc44b9c7e Add vercel ai gateway provider (#5355)
* Add vercel ai gateway provider

* Formatting

* grab correct context window field

* changelog

* Post-rebase fixes

* fix formatting

* Update model picker, add reasoning tokens to output

* Fix Vercel AI Gateway model info persistence

* use cache service rather than getallextensionstate

* Reorder vercel gateway option

* Show image support info

* Fix providerUtils.ts

* Fix broken model id and merge conflict issue

* fix pricing display for free users

* revert ts ignore

* revert to cost field, add note for free users 0 cost

* udpate gateway docs

* Delete docs/package-lock.json

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-20 15:13:05 -07:00
ershang-fireworks 7e7280d7c5 Fix fireworks provider (#5435)
* fix

* fix default model id

* fix tests

* Add changeset for fireworks provider fix

* add docs for fireworks provider

* add empty line to doc

* format

* fix model selector

* remove unnecessary

* fix test
2025-08-20 14:43:32 -07:00
Toshii 4b8927c055 adding task_progress param to the summarize task tool call (#5693)
* adding task_progress param to the summarize task tool call

* remove log statement

* prompt change
2025-08-20 13:02:43 -07:00
yuvalman aea979ff4e feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline (#5315)
* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline

* feat: sap provider - show deployed models from the ai core service instance alongside sap provider's supported models in cline
2025-08-20 22:01:15 +03:00
celestial-vault 714bcf92cf move clineignore filewatcher to chokidar (#5676) 2025-08-20 10:59:25 -07:00
Sarah Fortune a630b8c1a1 Fix issue where cline-core locks up when diff editor is closed. (#5615) 2025-08-20 10:54:16 -07:00
Bee a9836fb9fc Preserve clineMessages when currentTaskItem unchanged (#5700)
Keep previous clineMessages if the incoming state targets the same currentTaskItem and has no messages, preventing message loss on state sync/refresh while still accepting new messages when present.
2025-08-20 10:37:41 -07:00
benank 19f055e333 Add support for prompt caching on Groq (#5697) 2025-08-20 10:04:54 -07:00
kvyb 1997ee3e80 refactor to hostbridge: route @mentions search via WorkspaceService.searchWorkspaceItems (#5655) 2025-08-20 07:30:30 -07:00
Daniel Steigman 89ec9c4277 feat(telemetry): Add MCP tool usage tracking (#5698)
* feat(telemetry): Add MCP tool usage tracking

This commit introduces telemetry for MCP tool calls to monitor usage, success rates, and errors.

- Adds a new telemetry event 'task.mcp_tool_called'.
- Captures the server name, tool name, and status (started, success, error).
- Integrates telemetry calls into the McpHub to track tool execution lifecycle.

* chore: Add changeset for MCP telemetry

* refactor(telemetry): Clean up MCP tool usage tracking

This commit refactors the MCP tool usage tracking to be cleaner and more efficient.

- Removes null checks for 'ulid' in the 'callTool' method.
- Passes argument keys to the telemetry service for better monitoring without compromising user privacy.
2025-08-20 00:05:59 -07:00
Daniel Steigman e125540595 feat(telemetry): Add rules and workflow usage tracking (#5701)
* feat(telemetry): Add rules and workflow usage tracking

This commit implements telemetry tracking for Cline rules and workflow interactions to understand user engagement patterns:

- Add captureSlashCommandUsed() method to track slash command and workflow activations
- Add captureClineRuleToggled() method to track rule toggle events
- Update parseSlashCommands() to require ULID parameter and track command usage
- Add telemetry calls to toggleClineRule() with proper path sanitization
- Distinguish between builtin commands and workflow types
- Include task ULID context for tracking rule changes within tasks
- Sanitize file paths to include only filenames for privacy protection

* chore: Add changeset for rules and workflow telemetry

* Update src/core/controller/file/toggleClineRule.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixed import lol

* added more consistent event name to match the events type

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-19 23:49:20 -07:00
kvyb 9f3628ae19 refactor hostbridge: add openSettings RPC and vscode hostbridge; (#5651)
* refactor hostbridge: add openSettings RPC and vscode hostbridge; use in telemetry

* clarify query in OpenSettingsRequest
2025-08-20 08:42:16 +03:00
Sarah Fortune de133c27a0 Fix ProtoBus int32 too large error (#5696)
The context window is now being set to `Number.MAX_SAFE_INTEGER` to represent infinity. https://github.com/cline/cline/blob/01c4ead15548c906cc690ef030ee447720ccb5b0/src/shared/api.ts#L219-L220
However, this is larger than the max value of int32 and cannot be serialized over the ProtoBus. Update the max token and context window sizes to be int64.

```2025-08-14 18:28:36,492 [   4334]   WARN - bot.cline.services.ProtoBusProxyService - Stream cline.ModelsService.subscribeToOpenRouterModels encountered error
io.grpc.StatusException: INTERNAL: invalid int32: 9007199254740991
        at io.grpc.Status.asException(Status.java:548)
        at io.grpc.kotlin.ClientCalls$rpcImpl$1$1$1.onClose(ClientCalls.kt:300)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:564)
        at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:729)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:710)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1583)
```
2025-08-19 20:42:29 -07:00
Sarah Fortune 7a43024b61 When packaging cline-core, include map files for debug builds (#5682)
When the env var IS_DEBUG_BUILD is set, include .map files in the package.
2025-08-19 20:23:33 -07:00
Sarah Fortune 982f323162 Add an RPC to the host bridge to reveal a directory in the IDE file explorer (#5692)
When the user clicks on a directory file mention, it should open that directory in the explorer panel in the IDE. Add an RPC for this to the host bridge.

I had to change the logic to check if the mention is a directory or not because the current check was not working properly anymore. So, just file.stat to check if its a directory instead of checking if the path ends in /.
2025-08-19 20:23:09 -07:00
github-actions[bot] 67ef89a4cb v3.26.0 Release Notes (#5665)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and announcement for version 3.26.0

- Add user-friendly descriptions for Z AI provider, Cline Sonic Alpha model, LM Studio improvements, and Ollama fixes
- Include attribution for external contributor @jues
- Update announcement component with new 3.26 features
- Move previous 3.25 features to Previous Updates section

* announcement

* announcement

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-19 20:11:07 -07:00
pashpashpash c24ba53400 Add cline/sonic stealth model (#5669)
* microwave alpha stealth model

* microwave alpha stealth model

* swapped name to sonic

* pricing set to zero

* added case for sonic model to set temperature settings

* bumping max tokens to 16k for sonic

* sonic model does not have image support

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-08-19 19:33:26 -07:00
Sarah Fortune 01c4ead155 Add an RPC to the host bridge to return information about the active editor (#5690)
Add an RPC that returns details about the currently active editor. Right now it just returns the file path.

Update the place where this is used.

Remove commented out code that references `vscode.window.activeTextEditor`.
2025-08-19 14:52:20 -07:00
Sarah Fortune 6f4a4e1ccd Remove unused source files (#5642)
* Remove unused files

I used knip to find unused code- these files are not referenced anywhere in the codebase.

Dead code is a maintence burden, I am removing this unused code.

* Add knip config file

Add knip file with entry points for the extension, cline-core and the ProtoBus and HostBridge services.

Exclude test files, etc.
Exclude the `src/shared` directory because knip can't analyze the webview-ui react app properly.

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Formatting

* Get the extension version from the ExtensionContext

The extension packageJson is available from the ExtensionContext, don't need to do `vscode.extensions.getExtension`.

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-19 14:39:48 -07:00
Sarah Fortune dc03b3bf1f Add an RPC to the host bridge to show the problems in the IDE (#5689)
Add an RPC that makes the problems panel visible and focuses it.
2025-08-19 13:57:09 -07:00
Sarah Fortune cf52db8f49 Get the extension URI from the ExtensionContext instead of vscode.extensions.getExtension("saoudrizwan.claude-dev") (#5688) 2025-08-19 13:52:41 -07:00
Sarah Fortune 26ce4a31b6 Get the extension version from ExtensionContext (#5686)
The extension packageJSON etc is already available in the ExtensionContext, don't need to do `vscode.extensions.getExtension`
2025-08-19 13:23:15 -07:00
Bee 06e0973c04 Apply biome rules: noUnusedVariables, noUnusedFunctionParameters, noUnusedImports (#5545)
* Enable biome rules: noUnusedVariables, noUnusedFunctionParameters, noUnusedImports

* Apply new rules with format

* remove unused currentReplaceContent

* update nextTerminalId

* fix all format issues

* update biome config

* add back applyContextOptimizations and killAllChromeBrowsers
2025-08-19 11:57:50 -07:00
Toshii 54faddb3ff truncate first user message (#5668) 2025-08-19 09:51:16 -07:00
celestial-vault d6935623f9 fix: enable auto-formatting in postprotos script to prevent build failures (#5675)
- Added --write flag to biome format command in postprotos script
- This automatically fixes formatting issues instead of just reporting them
- Prevents build failures due to quote style and other formatting inconsistencies
2025-08-19 13:31:04 +03:00
celestial-vault 803574e7f3 move api folder to core (#5539)
* move api folder to core

* fix incorrect import path mock in test setup

* fix import in zai.ts

* fix additional import errors
2025-08-19 12:54:11 +03:00
Ara f676f2be78 Fix: Prevent lint-staged from reverting staged changes on error (#5673)
* fix and refactor diff and write to file stuff

* fix: precommit

* fix: precommit
2025-08-19 02:12:44 -07:00
celestial-vault c88a852344 refactor: migrate MCP settings watcher to chokidar (#5499)
* refactor: migrate MCP settings watcher to chokidar

* remove console log
2025-08-19 11:27:22 +03:00
Bee 5709f34479 Support LM Studio local models from v0 api endpoint (#5591)
* Support LM Studio local models with max tokens set

Add configurable max tokens parameter for LM Studio provider across proto definitions, API handlers, storage, and UI components. Improved error handling for model fetching to use v0 api.

* changeset added

* clean up

* update

* Use loaded context length for LM Studio model configuration

- Add loaded_context_length field to LMStudioApiModel interface
- Prioritize loaded_context_length over max_context_length in UI
- Update context window display to show actual loaded context
- Refactor model selection logic and endpoint memoization
- Auto-update max tokens when loaded context differs from config

* Add DropdownContainer
2025-08-18 17:22:37 -07:00
Bee a7eb7defc9 fix: request_id extraction in ClineError handling (#5617)
* fix: request_id extraction in ClineError handling

Add back the removed fallback chain to extract request_id from multiple possible locations
in error objects, checking error.request_id and error.response.request_id
before falling back to the existing header extraction method.

* fix: override initial error struct with real request_id instead of overriding request_id with undefined

---------

Co-authored-by: Auroter <seangherardi@gmail.com>
2025-08-18 14:51:58 -07:00
jues a45278bb61 Add support for Z AI GLM-4.5 and GLM-4.5 air (#5316)
* Add support for Z AI GLM-4.5 and GLM-4.5 air

* Add changeset for Z AI provider

* add entrypoints for Z AI provider, add cacheReadsPrice and cacheWritesPrice

* fix old naming convention

* fix value in proto

* fix proto conversion and secret persistence

* Fix GitHub Actions errors: Add zaiApiKey and zaiApiLine to state-helpers.ts and remove unused state.ts

- Added missing zaiApiKey to readStateFromDisk, resetGlobalState functions and apiConfiguration object
- Added missing zaiApiLine to readStateFromDisk and apiConfiguration object
- Removed unused state.ts file that was causing ESLint errors with direct VS Code API calls
- All type definitions for zaiApiKey and zaiApiLine were already present in state-keys.ts
- This resolves the TypeScript errors in GitHub Actions for CacheService.ts

---------

Co-authored-by: wangshan <shan.wang@aminer.cn>
Co-authored-by: Ara <arafat.da.khan@gmail.com>
2025-08-18 14:51:06 -07:00
Bee 5d75a311f4 dev: migrate to Biome for linting/formatting (#5423)
* Migrate to Biome for linting/formatting and simplify hooks

- Add biome.jsonc and @biomejs CLI; configure VS Code to use Biome for format/fix and imports
- Replace verbose Husky pre-commit with lint-staged runner
- Remove ESLint setup and custom rule package (no-direct-vscode-api) and its tests
- Update package.json/package-lock and webview-ui package to reflect tooling change
- Add VS Code host typings and grit definitions under src/hosts

Rationale: unify lint/format tooling, speed up pre-commit checks, and reduce maintenance overhead from custom ESLint rules.

* remove eslint dependencies

* preserve eslint rules

* clean up

* update files list

* add docs

* fix build

* clean up

* update VSCode API usage detection in Grit rule

This commit updates the Grit rule for detecting VSCode API usage:
- Narrow down the list of monitored VSCode API methods
- Add more specific diagnostic messages for direct API usage
- Introduce a new check for `workspaceFolders` property
- Exclude `src/extension.ts` from the Grit rule in Biome configuration

The changes aim to improve code abstraction and provide clearer guidance for replacing direct VSCode API calls.

* adds new cacheService rule

* add back pre-commit

* Remove ESLint custom rule and update linting references

Remove custom ESLint rule for VSCode state API enforcement along with its tests, remove ESLint extension recommendation, and update documentation to use generic "linter" terminology instead of ESLint-specific references.

* update vscode.d.ts for IntelliSense

* remove format on save

* clean up default values

* update to 2.1.4

* buf lint

* format
2025-08-18 13:34:09 -07:00
canvrno 0054b21d67 Changed focus chain feature flag behavior (#5656)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-18 12:05:13 -07:00
pashpashpash ea4433d705 no more nectarines (#5650)
* no more nectarines

* no more nectarines
2025-08-17 20:48:10 -07:00
Sarah Fortune 4aaca09389 Move logic for manipulating tabs into the host bridge (#5631)
* Switch the DiffViewProvider to use the util `openFile`

This part of the work to migrate the vscode API calls `vscode.window.tabGroups.close`,
`vscode.window.tabGroups.all` and `vscode.window.activeTextEditor` to the host bridge.

`openFile` contains logic that uses these APIs to avoid re-avoiding tabs in the IDE. The end goal
is to move all this logic into `vscode/hostbridge/showTextDocument.ts`.

I am going to switch all the places that use `showTextDocument` over to use `openFile`.

Once everywhere that was using `showTextDocument` has been switched, and is verified to
work the same as before I will move the tab logic in `vscode/hostbridge/showTextDocument.ts`.

* Update src/integrations/editor/DiffViewProvider.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Switch export-markdown to use the util `openFile`.

* Apply suggestion from @ellipsis-dev[bot]

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Move tab logic into vscode/showTextDocument

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-17 11:52:26 +01:00
Sarah Fortune feb92c45ce Add comments to window.proto (#5628)
Add descriptions for the RPCs in the window service.

Remove unused metadata field from requests messages.
2025-08-17 11:43:10 +01:00
Sarah Fortune e7c4757271 Update the script get-vscode-usages. (#5630) 2025-08-17 09:50:52 +01:00
Sarah Fortune a462a7aded Remove unused code from the commit-message-generator (#5634) 2025-08-17 09:49:55 +01:00
Sarah Fortune 2e729441ed Move use of vscode.version to the host bridge (#5635) 2025-08-17 09:49:26 +01:00
github-actions[bot] c1d7faee1a v3.25.3 Release Notes (#5604)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-16 16:39:16 -07:00
Saoud Rizwan 38d6af3a8d Use standard context truncation change (#5633) 2025-08-16 16:33:07 -07:00
Saoud Rizwan 612b8352ff fix: 'Enable Checkpoints' and 'Disable MCP Marketplace' settings getting reset to default on reload (#5632) 2025-08-16 16:24:50 -07:00
Toshii d4f26fe1de user message overwrite (#5614) 2025-08-16 14:05:11 -07:00
Sarah Fortune e242825dff Remove misleading log message (#5626) 2025-08-16 18:14:11 +01:00
Toshii 8fbccff853 prompt generation (#5612)
Co-authored-by: celestial-vault <58194240+celestial-vault@users.noreply.github.com>
2025-08-15 17:43:04 -07:00
canvrno 2615ea88b6 Adjust position of focus chain edit button (#5609)
* Adjust position of focus chain edit button

* Update webview-ui/src/components/chat/task-header/TaskHeader.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-15 15:42:17 -07:00
pashpashpash 61c2943715 minor adjustment to task timeline style (#5607)
* minor adjustment to task timeline style

* minor adjustment to task timeline style
2025-08-15 14:47:57 -07:00
Toshii b176772cd5 auto-condense telemetry (#5584)
* telemetry

* task state preference
2025-08-15 10:41:15 -07:00
canvrno e6b00527ed Improved git branch analysis workflow (#5602)
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-08-15 10:33:03 -07:00
canvrno 2635f5f575 Focus Chain regex moved to /shared (#5592)
Co-authored-by: Kevin Bond <kevin@Mac.hsd1.ca.comcast.net>
2025-08-15 10:14:34 -07:00
Sarah Fortune 44f370f295 Add test host bridge server and refactor proto utilities (#5600)
- Extract getPackageDefinition() from loadProtoDescriptorSet() in proto-utils
- Add int64 encoding option to handle numbers properly
- Create test-hostbridge-server.ts with mock gRPC service implementations
- Add -h flag to runclinecore.sh to start test server
- Include testing.md documentation for cline rules
2025-08-15 18:07:45 +01:00
Matthias Oßwald 8c49ce56f6 fix: Prevent non-error logs from being misclassified as errors (#5531)
This re-applies the change from #2900 which got reverted by accident during
a refactoring in #3970.
2025-08-15 10:04:13 -07:00
Sarah Fortune 08543e051e Remove unused params from the AuthService (#5596) 2025-08-15 14:31:32 +01:00
github-actions[bot] f4828d3344 3.25.2 Release Notes (#5589)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-14 23:45:17 -07:00
Saoud Rizwan 385e952935 fix: OpenRouter showing cline credits error after 402 response (#5590)
* fix: OpenRouter showing cline credits error after 402 response

* Create silly-scissors-repair.md
2025-08-14 23:05:16 -07:00
Saoud Rizwan 9a2aaf0881 fix: attempt_completion showing twice in chat due to partial logic not being handled correctly (#5588)
* fix: attempt_completion showing twice in chat due to partial logic not being handled correctly

* Create orange-beds-itch.md
2025-08-14 22:35:19 -07:00
github-actions[bot] 5d65260611 v3.25.1 Release Notes (#5587)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-14 22:16:58 -07:00
Saoud Rizwan 7098c1a32a fix: attempt_completion command showing twice in chat view when updating progress checklist (#5583)
* fix: attempt_completion command showing twice in chat view when updating progress checklist

* Create heavy-walls-own.md
2025-08-14 22:13:04 -07:00
Saoud Rizwan d46e672990 feat(AnthropicProvider): Add Claude Sonnet 4 variant switching functionality (#5585) 2025-08-14 22:11:31 -07:00
Saoud Rizwan 7b2dddd4a5 fix: CacheService not populating with all the expected state (#5586)
* fix: CacheService not populating with all the expected state

* Create modern-impalas-hug.md
2025-08-14 22:10:21 -07:00
watany a6e657e0d1 feat(bedrock): Adding GPT-OSS (#5412)
* feat(bedrock): adding GPT-OSS

* changeset

* update usage return + add reasoning & text for token output estimate

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-08-14 20:18:49 -07:00
github-actions[bot] 612a67ee89 v3.25.0 Release Notes (#5547)
* changeset version bump

* Updating CHANGELOG.md format

* rebased

* changelog

* package-lock.json

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-14 19:17:11 -07:00
Saoud Rizwan 383826f7f7 fix: bug where ask question tool would show 'Start new task' button (#5581) 2025-08-14 18:33:35 -07:00
Sarah Fortune b44d3c8793 Add fix, explain, and improve commands to the ProtoBus (#5574)
* Add fix, explain, and improve commands to Cline

- Rename AddToClineRequest to CommandContext for reusability
- Implement fixWithCline, explainWithCline, and improveWithCline commands
- Extract common command utilities to commandUtils.ts
- Move file mention logic to mentions module
- Update command registration and handlers in extension.ts

* Update src/core/controller/commands/addToCline.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/extension.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-15 02:21:40 +01:00
Saoud Rizwan fbc517c9e5 Add support for 200k context for claude sonnet 4 using openrouter/cline (#5569)
* Add support for 200k context for claude sonnet 4 using openrouter/cline

* Update announcement

* Create beige-singers-jog.md
2025-08-14 18:19:06 -07:00
Saoud Rizwan 3175e19bd7 Fix partial plan_mode_respond cline ask being interrupted by task_progress say (#5578) 2025-08-14 18:18:17 -07:00
Igor Tceglevskii 8e80c18c52 Fix the New Task button in Navbar (#5577) 2025-08-14 18:07:28 -07:00
Toshii b5be6f57d5 requesty (#5579)
* adding option to have custom requesty base url

fix

changeset

* finish state changes

* cleanup

---------

Co-authored-by: John Costa <john@requesty.ai>
2025-08-14 17:44:58 -07:00
canvrno 28737ac62a Enable focus chain by default (#5575)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-14 17:35:34 -07:00
kvyb 61112aaa03 Hostbridge telemetry and startup (#5561)
* feat: Use hostbridge machine ID for posthog distinctId across hosts; VS Code only settings link in warning,, generic warning on other hosts.

* fix: block cline-core until hostbridge health is SERVING; exit on failure; initialize telemetry PostHog with hostbridge machineId;

* fix: posthog prefer host-provided UUID when running via HostBridge; fall back to VS Code's machineId, then a random UUID

* fix: add logging to waitForHostBridgeReady

* fix: log error in initialize
2025-08-15 02:36:19 +03:00
Igor Tceglevskii 922cfed632 Fix the case if the app state and the user state are inconsistent (#5549) 2025-08-14 14:26:29 -07:00
Sarah Fortune 6d7cca7d38 Allow external hosts to trigger the 'Add to Cline' action (#5548)
* Allow hosts to trigger the 'Add to Cline' action

Other platforms need a way to trigger the context menu actions and commands that are available currently in Vscode.

Add a service to the ProtoBus for this called `CommandService`, currently it just has the 'Add to Cline' action.

IDEs that are running cline with cline-core can trigger these actions and commands over gRPC.

Move the code for handling the 'Add to Cline' out of extension.ts into
`src/controller/commands/addToCline.ts`. This same handler will be used for the RPC.

Switch the handler over to use the proto Diagnostics types as it is host-agnostic.

* Fix getDiagnostics.test.ts on windows.

Use `toPosix()` on the fspath.

* Update src/extension.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-14 22:16:52 +01:00
Sarah Fortune d81fb542a9 Update logging (#5563)
Update logs for cline-core.
Save the logs from the script `runclinecore.sh` to the ~/.cline directory
2025-08-14 14:39:37 +01:00
pashpashpash a16fc09a68 bedrock docs cleanup (#5551)
* bedrock docs cleanup

* auto compact  docs

* drag and drops docs outdated
2025-08-13 20:22:21 -07:00
Ara 2ec21eda34 Adding a retry button for cases when the streaming response breaks with no text or error (#5505) 2025-08-13 16:53:27 -07:00
canvrno 88000d4f39 Feat: Focus Chain & Deep Planning (#5409)
* Focus Chain feature & Deep Planning workflow

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Casing & variable  naming cleanup

* Alligned default focus chain internval values, corrected typos

* Rebase, moving focus chain settings state to cache

* Fix issue with duplicated ask responses, also renamed function

* renamed slash command

* updated docs and added focus-chain to docs sidebar

* Minor docs changes

* adding deep-planning slash command

* nit: linking

* Updated telemetry service to use ulid

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-13 16:17:45 -07:00
Sarah Fortune 6318eb5948 Add utils for working with Diagnostics (#5543)
These utils will be to build the 'Add to Cline' context menu action for external hosts. The context menu action only deals with diagnostics for a single file, so the current utils need to be adapted.

Export util functions for converting vscode diagnostics to Host Bridge diagnostics.

Export a util for converting diagnostics for a single file from `diagnostics/index.ts`.
2025-08-14 00:16:16 +01:00
Bee 0fd1c0a3aa Configure Playwright to retain videos on failure and simplify teardown (#5542)
* Close page to stop e2e test on teardown

* Configure Playwright to retain videos on failure and simplify teardown

- Enable video recording that only saves on test failures
- Remove complex cleanup logic from global teardown
- Streamline server shutdown to not block teardown process

* change build.js to build.mjs which fixes ES module load error

* speed up

---------

Co-authored-by: Brian Pierce <brian@cline.bot>
2025-08-13 14:31:49 -07:00
Toshii e0478493a2 auto compact - context management (#5520)
* base

* working state reduction & summarization flow wo duplicate calls

* stop injecting into user message

* focus on latest message

* edge case for cancelled stream post summarization tool call

* fix merge
2025-08-13 13:59:00 -07:00
github-actions[bot] 9355d3eea4 v3.24.0 Release Notes (#5472)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-13 13:09:15 -07:00
Saoud Rizwan f485d0cc8f Display context window in model info (#5546) 2025-08-13 13:04:58 -07:00
Saoud Rizwan 79bda976cb Add 1m context window model variant for claude sonnet 4 (#5526)
* Add 1m context window model variant for claude sonnet 4

* Fix cost calculation for 1m tier

* Add new 1m context window announcement

* Create beige-bobcats-watch.md

* Add bedrock support for 1m context
2025-08-13 12:53:23 -07:00
celestial-vault 94acfec39f refactor: migrate FileContextTracker to chokidar (#5501)
Co-authored-by: Igor Tceglevskii <igor@cline.bot>
2025-08-13 12:40:19 -07:00
Richard Meyer 0f67508fa3 Enable browser arguments (#4871)
* feat: add arguments option to browser settings

* feat: add custom browser arguments setting for Chrome launch flags

* remove hardcoded headless argument

* re-run npm run format:fix

* minmal targeted code change vs refactor

* fix: allow browser arguments to persist

* refac: match syntax browser persistence sytanx for customArgs to match chromeExecutablePath

* fix: update browser session to append custom arguments and remove undefined check

* small update to UI description
2025-08-13 12:16:49 -07:00
CellenLee e31bc6147f feat: add kimi-k2-turbo-preview model (#5510) 2025-08-13 11:28:13 -07:00
Peter Dave Hello 8d69e63d72 Add OpenAI GPT-5 Chat(gpt-5-chat-latest) (#5494)
GPT-5 Chat points to the GPT-5 snapshot currently used in ChatGPT. Just
like the dynamic model chatgpt-4o-latest for GPT-4o series.

Reference:
- https://platform.openai.com/docs/models/gpt-5-chat-latest
2025-08-13 11:24:33 -07:00
Igor Tceglevskii 49a678b835 Use HostProvider for creating the OpenRouter auth URL (#5522) 2025-08-13 09:27:06 -07:00
Sarah Fortune 67610b1f87 Refactoring: Move the FileDiagnostics from the host package into common. (#5537)
I am going to reuse the FileDiagnostics in the ProtoBus, so move them into a
common location.

Update the imports.
2025-08-13 09:19:36 -07:00
Sarah Fortune 45f837e1e9 Fix the PATH not being set in the standalone terminal (#5536)
`cline-core` cannot depend on its environment being set up properly
by its parent process. Run the terminal commands in a login shell so
that the PATH etc. will be setup correctly.
2025-08-13 08:34:51 -07:00
Sarah Fortune d0793e51c4 Refactoring: Move vscode specific code out of the WebviewProvider (#5534) 2025-08-13 11:48:53 +01:00
Sarah Fortune 00740de01d In the log timestamp use current timezone instead of UTC (#5535)
The ISO date format logs in UTC with the timezone information, this is unneccessary,
just log the time in the current timezone.
2025-08-13 11:08:15 +01:00
celestial-vault 1ffa4085a6 Remove experimental Sonnet 4 code (#5527)
* remove sonnet 4 experimental tool definitions and prompting

* remove instances of parseV3 in evals
2025-08-12 22:32:30 -07:00
Bee 4db5581cfc disable buttons for plan_mode_respond (#5528) 2025-08-12 22:18:14 -07:00
pashpashpash 675cd1779b using ulid instead of taskid (#5524)
* using ulid instead of taskid

* protos

* Update src/services/browser/BrowserSession.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-12 21:19:28 -07:00
pashpashpash af0f0b3d7c make cline better at git (#5525)
* make cline better at git

* typo
2025-08-12 19:09:48 -07:00
Saoud Rizwan 45767b87fd Fix usage endpoint call using oauth token instead of saved refresh token (#5483)
* Fix usage endpoint call using oauth token instead of saved refresh token

* Create odd-ladybugs-punch.md

* Update src/api/providers/cline.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-12 19:08:23 -07:00
Sarah Fortune 8f4c6038dd Change the host bridge RPC closeDiff to close*All*Diffs (#5521)
* Change the host bridge RPC closeDiff to closeAllDiffs

In the vscode diff view provider when the diff is closed, it
closes _all_ open diff views.

I thought in the HostBridge, we would just only be closing the
current diff, but we do need to close all the open diff view
because there can be checkpoint diffs open as well.

* Update proto/host/diff.proto

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/integrations/editor/DiffViewProvider.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-13 01:16:42 +01:00
Peter Dave Hello 9dc021a881 Remove deprecated GPT-4.5 Preview (#5493) 2025-08-12 15:59:46 -07:00
Max Höhl 3e2bdf8b12 Set CLINE_ACTIVE environment variable for new terminals (#5367)
Resolves #5366
2025-08-12 15:44:51 -07:00
Sarah Fortune d4a99a4060 Task Refactor: Move logic for showing multi-file diffs out of Task (#5517)
* Move the logic for showing the multi-file diffs out of the Task class which >2000 lines long.

Split the logic up into functions, add tests.

Use try/finally to ensure that `sendRelinquishControlEvent` is always sent when the function returns.

* Fix warning about use of !!

* Fix tests

Remove asserts on console logs because they are not able to be stubbed properly.
Move test file to correct directory.

* Formatting
2025-08-12 23:27:53 +01:00
Auroter f4bbb45b07 fix: request_id was being incorrectly extracted from the API response… (#5504)
* fix: request_id was being incorrectly extracted from the API response -- it can always be found in the response header under X-Request-ID

* fix: leave error alone, no need to re-create it

* Update src/services/error/ClineError.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
2025-08-12 12:12:35 -07:00
Bee 088deebd63 Add VSCode theme colors to Tailwind config (#5516)
* Add VSCode theme colors to Tailwind config

- Add comprehensive VSCode theme color palette to Tailwind config
- Replace hardcoded VSCode CSS variables with Tailwind utility classes for HomeHeader
- Update button and text styling to use new theme-aware classes

* format
2025-08-12 10:42:45 -07:00
celestial-vault dcc744dd87 move browser settings menu to tailwind (#5507) 2025-08-12 10:20:31 -07:00
Bee 9ad8525bd0 Guard ActionButtons when no task (#5508)
Guard ActionButtons when no task; fix scroll deps/empty state

- Return null from ActionButtons if no task to avoid rendering controls without context
- Add missing setExpandedRows dependency and remove unnecessary deps to prevent stale closures and re-renders
- Hide “scroll to bottom” button when there are no messages
- Clean up unused index-tracking logic in scrollToMessage
2025-08-12 09:50:15 -07:00
Sarah Fortune 8bf6268952 Add multi-file diff to the host bridge. (#5515)
Add an RPC to the Host Bridge to open a diff for multiple files, this is
used when comparing check points or to display the changes cline has made
when it is finished editing.

Switch the file mentions unit test to an integration test because
now it is pulling vscode dependencies and they cannot be mocked
in the unit tests.
2025-08-12 09:24:16 -07:00
requesty-JohnCosta27 2081bb8dc6 fix requesty's api key url (#5498) 2025-08-11 21:56:14 -07:00
Bee ac22b63796 refactor: centralize action buttons state (#5462)
* Refactor action buttons: centralize state, remove useButtonState

- Replace useButtonState hook with centralized ButtonConfig logic in ActionButtons, mapping task/ask/tool states to button enablement and labels
- Update ActionButtons API to accept task, messages, mode; compute streaming/enablement internally; remove isStreaming prop
- Always render ActionButtons from ChatView; adjust props accordingly
- Update useIsStreaming call to pass task instead of enableButtons/primaryText
- Clean up useMessageHandlers to reset UI state consistently (input, quotes, files, images, autoscroll)
- Remove deprecated hook and align types

Why: unify and simplify button behavior across task lifecycle, reduce duplicated state/props, and make streaming/approval flows more predictable.

* clean up

* Refactor input clearing and streaming detection logic

This commit:
- Separates input clearing logic into a separate useEffect in ActionButtons
- Removes StreamingIndicator component and its useIsStreaming hook

* Revert newly added button states

Remove switch_to_act_mode button config and associated plan mode conditionals in getButtonConfig function, will do any UI change in follow-up

* simplify further

* Add test suite for button configuration logic

This commit introduces a new test file for the `buttonConfig` module, covering various scenarios such as:
- Default button configurations
- Streaming and partial message handling
- Error recovery states
- Tool approval states
- Command execution states
- Specific ask state configurations
- API request state testing

The tests ensure robust button configuration selection based on different message types and states.

* update button styles
2025-08-11 19:14:53 -07:00
Ara 44eb2cc65e Fixing context exceeded error (#5479)
* Detect OpenAI context window errors and auto-retry

- Add checkIsOpenAIContextWindowError to identify OpenAI context length issues (context_length_exceeded, 400 + context-length patterns)
- Integrate into Task: detect OpenAiHandler/OpenAiNativeHandler and handle first-chunk failures as context window overflows
- On detection, aggressively truncate history ("quarter"), persist changes, show truncation notice, wait 1s, then retry once
- Align behavior with Anthropic/OpenRouter handling to reduce failures from oversized prompts

* Fixing OpenAI context exceeded errors

* Fixing OpenAI context exceeded errors

* Fixing OpenAI context exceeded errors

* use OpenAI sdk error types

* Making errors for this generic and adding cerebras

* Making errors for this generic and adding cerebras

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-08-11 17:56:48 -07:00
Saoud Rizwan 2cf1d8628b Set gpt5 max tokens to 8_192 to fix context window exceeded error (#5478)
* Set gpt5 max tokens to 8_192 to fix context window exceeded error

* Create healthy-crabs-sip.md
2025-08-11 15:50:32 -07:00
celestial-vault 669e018b85 Move rest of state to cache (#5404)
* move rest of state to cacheService

* finish moving state to cache

* remove console logs

* fix types

* don't type cast

* add eslint rule banning use of direct storage apis

* fix types

* move vscode state eslint rule to separate rule since it's error and the others aren't

* fix eslint rules parsing
2025-08-11 14:46:39 -07:00
Sarah Fortune 2aa5156905 Update ExternalDiffViewProvider to return diagnostics before/after diff (#5500)
The diff view is supposed to return any new errors or warnings after the
file is edited. The ExternalDiffViewProvider was just returning *all*
the errors.

When the DiffViewProvider is being reset, reset *all* the properties.

Add unit tests for diagnostics functionality

Refactoring:
- Move diagnostics into the parent DiffViewProvider, remove duplicate implementations in VscodeDiffViewProvider and ExternalDiffViewProvider
- Move duplicated code for converting FileDiagnostics to string to `diagnosticsToProblemsString`.
- Use a single implementation of `getDiagnostics` and `diagnosticsToProblemsString` using the HostBridge protos.
2025-08-11 19:54:41 +01:00
celestial-vault 51b619e0d5 remove workspace tracker (#5346)
* remove workspace tracker

* remove console log

* fix search when clicking folder option

* create enum for searchType

* use hostbridge for active files

* use util function for relative path

* Fix into interests error where false security warning is being triggered
2025-08-11 09:51:47 -07:00
Sarah Fortune 85fb76a996 Call teardown() when cline-core is stopped. (#5496) 2025-08-11 17:29:27 +01:00
Dennise Bartlett d73a7cfd06 Fix package-lock version and update CODEOWNERS (#5490) 2025-08-11 01:43:08 -07:00
Ara 489dfbc932 Fixing Read of Workspace root by index.ts (#5482)
* Fixing Read of Workspace root by index.ts

* Fixing Read of Workspace root by index.ts
2025-08-09 20:50:50 -07:00
Bee 314c416788 remove PostHog exception autocapture (#5481)
Remove enableExceptionAutocapture option from PostHog client configuration.
2025-08-09 16:49:07 -07:00
Igor Tceglevskii 3b19c2ec95 Click from a file name in chat to editor (#5422) 2025-08-09 15:48:12 -07:00
Sarah Fortune e04cbea504 Add an endpoint to the HostBridge for integration testing (#5476)
Add an RPC to the HostBridge that returns the contents of the
webview, for use in integration tests.
2025-08-09 23:14:29 +01:00
Toshii affac119f5 stop double counting tokens (#5426)
* updated

* cleanup
2025-08-09 13:05:36 -07:00
Sarah Fortune 3847a2545c Test is still flaking, increase the timeout (#5473) 2025-08-09 16:25:02 +01:00
Sarah Fortune 15593bac2a Use the active webview in ProtoBus getWebviewHtml. (#5444) 2025-08-09 16:24:46 +01:00
Sarah Fortune 84267efb9e Don't use activate() in cline-core (#5448)
* Don't use activate() in cline-core

Have separate code paths to set up the extension and cline-core.

This means the cline-core is not running all the vscode setup and is
only using one `Controller` (the one from the WebviewProvider).

Move the shared logic into common.ts.

* Comments and logging
2025-08-09 14:49:23 +01:00
github-actions[bot] 985ce56809 v3.23.0 Release Notes (#5466)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-09 02:16:07 -07:00
xiongxiong cad28c4c0c fix: calibrate input token when using anthropic models of sap ai core provider (#5469) 2025-08-09 02:13:01 -07:00
Saoud Rizwan 4a22f7dbd2 Fix plan/act hover color and act mode color (#5470)
* Fix plan/act hover color and act mode color

* Revert plan color change
2025-08-09 02:10:49 -07:00
Saoud Rizwan a430226caa Revert unnecessary terminal command issue workarounds (#5463)
* Revert terminal process logic to pre-capture where we didn't use grace periods or fast command workarounds

* Create empty-pears-fail.md
2025-08-09 02:09:40 -07:00
Bee 5885a3cc1d improve mode switch background color (#5467)
* fix: mode switch styling

Replace the use of `--vscode-toolbar-hoverBackground` which is a `-hoverBackground` that tends to be transperant or opacity change on some themes. Replace it with `-background` which uses solid color instead. See https://code.visualstudio.com/api/references/theme-color

- Update Plan/Act mode switch colors var for better visibility across themes
- Remove hover effects from switch options
- Add background classes to active switch options

* changeset added
2025-08-09 00:30:07 -07:00
Oliver Schirmer 759ef873ae Feat: Prompt Caching in SAP AI Core (#5399)
* add: caching support for bedrock (claude)

* refactor: gemini message handling to adhere closer to original implementation (and make implicit caching clear)

* remove: unused bedrock conversion functions

* fix: payload for converse stream (older claude models)
remove: caching support flag for older claude models

* add: changeset

* Update package-lock.json
2025-08-09 00:12:26 -07:00
Saoud Rizwan 782e4ff6e0 Fix credit error tests (#5465)
* Fix credit error tests

* Create odd-tables-pump.md
2025-08-08 21:17:33 -07:00
github-actions[bot] 4bb00241bf v3.22.0 Release Notes (#5424)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-08 20:47:54 -07:00
Saoud Rizwan c325faf8db Fix bug where running out of credits on cline accounts would show '402 empty body' response instead of 'buy credits' component (#5464)
* fix: show credits purchase component when user runs out of credits and we receive 402 status from server

* revert unnecessary change

* Create many-adults-end.md
2025-08-08 20:43:43 -07:00
Igor Tceglevskii 20f8f9c9cf Request for requesting a current PR number for pr_review workflow (#5406) 2025-08-08 13:14:50 -07:00
Yechao LI 5be163f49d Fix safari does not support isComposing of input event (#4118)
* fix: safari does not support isComposing of input event

* formatting

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-08-08 12:28:46 -07:00
Kevin Taylor 7843ab937a Add cerebras rate limit handling (#5408)
* Update cerebras.ts

* Create friendly-geckos-accept.md
2025-08-08 12:28:34 -07:00
tjandy98 5ed4319d21 Add support for GPT-5 models to SAP AI Core Provider (#5428)
* add gpt-5 models

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

* add changeset

* remove max_tokens & temperature

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

---------

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
2025-08-08 10:16:45 -07:00
Igor Tceglevskii a8971b807a Possibility to install binaries to a separate folder (#5446) 2025-08-08 15:24:05 +01:00
Sarah Fortune 51c4e0aceb Don't instantiate the AuthService at the top level of the module. (#5443)
I am working separating the initialization for the extension and cline-core
and this is causing a circular dependency.
2025-08-08 06:51:43 -07:00
Sarah Fortune 1cf62941cd Fix webview on IntelliJ (#5439)
The ExternalWebviewProvider has to return /something/ for `getWebview()` or
the rest of the code thinks that is not set up and it won't generate the HTML
for IntelliJ.

The Vscode webview panel, `resolveWebview()` and other Vscode specific parts are
planned to be moved out of the WebviewProvider and into VscodeWebviewProvider,
but that depends other changes to how the webview is initialized in extension.ts
to need to happen first.

Move the WebviewProvider out of index.ts and into a file name `WebviewProvider`,
this follows best practises.
2025-08-08 13:50:28 +01:00
Sarah Fortune cc2472f500 Sssh McpHub (#5434) 2025-08-08 11:58:14 +01:00
Ara 677e544c51 Fix Gpt 5 context window (#5414)
* Fix Gpt 5 context window

* Fix Gpt 5 context window
2025-08-08 01:04:12 -07:00
akfoster d3c8fbbf1d chore: remove unused parseAssistantmessageV1 (#5425)
* chore: remove unused parseAssistantmessageV1

* chore: add PR number to comments

* fix: include full path to PR
2025-08-07 22:21:17 -07:00
Sam 1b06633253 fix: LiteLLM provider cost calculations (#4990)
* fix: LiteLLM provider cost calculations

* fix: LiteLLM provider cost calculations

* Update src/api/providers/litellm.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-07 22:06:04 -07:00
Bee 4ab8559fce feat: support sending context to active editor panels (#5239)
* feat: add client-specific targeting for addToInput events

- Add client-specific targeting for addToInput events
- Update subscribeToAddToInput to accept client ID parameter
- Replace global event broadcasting with targeted client messaging
- Remove automatic sidebar focus when adding code to chat
- Use last active webview instance for context menu actions
- Maintain backward compatibility with subscription management

* add changeset

* remove debug profiler

* e2e test

* add type

* Add e2e test

* update teardown
2025-08-07 19:32:40 -07:00
github-actions[bot] 259368e0a3 v3.21.0 Release Notes (#5392)
* changeset version bump

* Updating CHANGELOG.md format

* release notes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-07 10:03:39 -07:00
pashpashpash 9b7839efcd Pashpashpash/gpt 5 release (#5413)
* preparing for gpt5 release

* Update generic system prompt with needs_more_exploration param for plan mode

* changeset

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-07 09:47:04 -07:00
Ara 47a2ae83de Switch to ULID from UUID for tasks telemetry (#5407)
* Switch to ULID from UUID for tasks

* Switch to ULID from UUID for tasks

* Switch to ULID from UUID for tasks
2025-08-06 19:51:19 -07:00
Sarah Fortune 1b5590e26c Refactoring: move postMessageToWebview into vscode specific code (#5396) 2025-08-07 02:49:12 +01:00
Toshii 9e493341d2 Add ollama key for cloud endpoint (#5400)
* base

Co-authored-by: EndoTheDev <endothedev@gmail.com>

* toggle showing key box

* typing

---------

Co-authored-by: EndoTheDev <endothedev@gmail.com>
2025-08-06 14:41:48 -07:00
kvyb 1d4cd3187b Hostbridge diff diagnostics (#5368)
* feat: migrate diff edit diagnostics to hostbridge; Migrate diagnostics functionality from direct VS Code API calls to the hostbridge layer to enable multi-host support (VS Code + IntelliJ).

* remove test logging

* refactor: migrate diagnostics to workspace service and host separation
2025-08-06 18:16:17 +03:00
Ara 32f0f9618c Adding UUID to task creation for tracking the metrics of a Task in telemetry (#5379) 2025-08-06 00:14:32 -07:00
Ara 3001f883c2 Add walkthrough button and enable quick wins for new users (#5047)
* Add walkthrough button and enable quick wins for new users

- Add openWalkthrough RPC method to ui.proto
- Enable quick wins display for users with <3 tasks in history
- Add "Take a Tour" button in HomeHeader when quick wins are shown
- Update WelcomeSection to pass shouldShowQuickWins prop to HomeHeader

* Adding Gpt-oss through groq

* Adding Gpt-oss through groq

* Support prompt caching and thinking for Opus 4.1

* Support prompt caching and thinking for Opus 4.1

* Support prompt caching and thinking for Opus 4.1
2025-08-06 00:13:31 -07:00
github-actions[bot] a64e60b8f6 v3.20.13 Release Notes (#5391)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-06 00:12:50 -07:00
Saoud Rizwan 3a0e6a471b Add prompt caching for Opus 4.1 (#5389)
* Add prompt caching for Opus 4.1

* Create forty-poets-doubt.md
2025-08-06 00:10:50 -07:00
github-actions[bot] c10f4e0a66 v3.20.12 Release Notes (#5387)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.20.12

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-05 22:25:33 -07:00
Ara 3e11271cf8 Fix support for prompt caching and thinking for Opus 4.1 (#5386)
* Support prompt caching and thinking for Opus 4.1

* Support prompt caching and thinking for Opus 4.1
2025-08-05 22:12:14 -07:00
Jim Tang 29ae2c286d Update index.ts while tree possible as a null. (#5285) 2025-08-05 20:03:22 -07:00
github-actions[bot] 82aee44a9a v3.20.11 Release Notes (#5377) 2025-08-05 16:07:23 -07:00
omercelik 031604ddf6 feat: Added Claude Opus 4.1 to Bedrock (#5381)
* feat: Added Claude Opus 4.1 to Bedrock

* Create ninety-owls-develop.md
2025-08-05 15:03:15 -07:00
Bee f2101e375f fix: update Playwright config and teardown error handling (#5383)
- Remove teardown dependency on e2e tests to fix execution order
- Move server cleanup before file operations in teardown
- Add proper error handling and logging for cleanup operations
2025-08-05 14:22:19 -07:00
Tomás Barreiro 8a65f0c68b feat: Add Opus 4.1 to claude-code (#5382)
* Add opus-4-1 to claude-code

* Add changeset
2025-08-05 13:42:40 -07:00
Bee 32b8fa44cb refactor: Integrate Posthog into Feature Flags & Telemetry & Error Services (#5275)
* refactor: posthog services: feature flags + error + telemtry

- Convert PostHogClientProvider to singleton with lifecycle management
- Update ErrorServices to use PostHogClientProvider
- Update Telementry Service
- Update and enable Feature Flags service

* replace logger

* fix imports - part 1

* update distinct ID

* update

* update

* clean up

* revert autoformat

* fix merge conflicts

* clean up autoformat

* revert autoformatter

* clean up logs
2025-08-05 13:00:44 -07:00
Sarah Fortune 0d067f7470 Add getCallbackUri to the HostProvider (#5361) 2025-08-05 12:06:08 -07:00
Kevin Taylor de6166392c Update Cerebras gpt-oss-120b (#5376)
* Add Cerebras gpt-oss-120b

* Change completion tokens
2025-08-05 12:00:02 -07:00
Kevin Taylor 5f21a9162a Add Cerebras gpt-oss-120b (#5375)
* Add Cerebras gpt-oss-120b

* Update src/shared/api.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-05 11:27:11 -07:00
github-actions[bot] 4de991f1b0 v3.20.10 Release Notes (#5374) 2025-08-05 11:22:52 -07:00
pashpashpash 6e5d4a3f9e openai model in hugging face correct maxtokens (#5371)
* openai model in hugging face correct maxtokens

* maxtokens

* maxtokens 131k i guess?

* maxtokens swap

* changeset

* Adding Gpt-oss through groq

---------

Co-authored-by: arafatkatze <arafat.da.khan@gmail.com>
2025-08-05 11:08:53 -07:00
github-actions[bot] 95af95badf v3.20.9 Release Notes (#5354)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for version 3.20.9 patch release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-05 10:12:09 -07:00
Ara 61dcbd390c Adding Anthropic opus 4.1 (#5369)
* Adding Anthropic opus 4.1

* Adding Anthropic opus 4.1
2025-08-05 09:59:15 -07:00
pashpashpash 6255ac0a51 added provider flag to diff edit cli (#5334)
* added provider flag to diff edit cli

* dashboard ux

* more dashboard improvmeents

* native handler instead of just openai
2025-08-05 09:21:12 -07:00
Sarah Fortune 616800fcb9 Refactoring: move vscode specific property out of the WebviewProvider into the VscodeViewProvider (#5364) 2025-08-05 06:48:12 +01:00
Sarah Fortune df3826a59f In the webview grpc client, JSON encode/decode the messages when not running in Vscode (#5362) 2025-08-04 22:39:32 -07:00
Sarah Fortune 873917810d Remove left code from ProtoBus migration (#5363)
There is one place in the McpHub that sends messages mcp notification messages directly to the webview (not using the ProtoBus).

There is nowhere in the webview that is listening for this message, so this code is not doing anything.
2025-08-04 22:39:20 -07:00
Alex Ker e3c966f4e9 Baseten provider (#5238)
* kimi working

* fixed description rendering

* nit

* changeset

* revert openai version in package.json

* revert package-lock.json

* added space back in

* maintained previous protofield map order

* fixed import error due to location change from main

* updated Mode import for BasetenModelPicker

* revert readme since baseten is openai compatible

* refactored extensionStateContext

* added didOutputUsage flag

* fixed frontend loading

* no support for images on llama

* shifted VSCode Option order

* deleted typo

---------

Co-authored-by: Alex Ker <alexker@mac.mynetworksettings.com>
Co-authored-by: Alex Ker <alexker@Alexs-MacBook-Pro.local>
2025-08-04 20:07:59 -07:00
Sarah Fortune 7eeb43ab41 Simplify the GrpcHandler and add tests (#5356)
* Simplify the GrpcHandler

* Use two functions handleUnaryRequest and handleStreamingRequest, instead of creating a GrpcHandler object and calling class methods on it.
* Remove redundant try/catch and empty finally blocks. Each of the two handler functions has it's own try/catch.
* Each of the two functions is responsible for posting the result to the webview- Instead of unary and streaming responses being handled at different levels.
* Use the GrpcRequest and GrpcCancel types.

* Update comment
2025-08-04 19:15:29 -07:00
Bee 7620f177ac fix: clear streamingFailedMessage when user manually retries (#5222)
* fix: clear streamingFailedMessage when user manually retries

- Clear streamingFailedMessage when user manually retries
- Convert imports to type-only where appropriate
- Reorder imports for better organization
- Add explicit type annotations for better type safety
- Move node:timers/promises import to top

* add changeset

* merge main and reset fail flag

* revert autoformat
2025-08-04 17:04:42 -07:00
Bee 67bab94911 Revert "Add getCallUri to the HostProvider (#5322)" (#5359)
This reverts commit b8227c19c3.
2025-08-04 16:30:04 -07:00
Bee eb91bfd738 Update ChatView footer background to use sidebar theme (#5357)
Change footer background from editor to sidebar background color
and remove border styling.
2025-08-04 16:06:02 -07:00
Sarah Fortune b8227c19c3 Add getCallUri to the HostProvider (#5322)
**Centralize callback URI management** through the HostProvider instead of having it in multiple places in the codebase.

**Simplify error handling** by making the callback URI required rather than optional

The changes are related to **authentication callback URI handling** in the Cline extension. Here's what's being modified:

  - Simplified callback URI retrieval
- Changed return type from `Promise<string | undefined>` to `Promise<string>`
- Now throws an error if AuthHandler is not enabled instead of returning undefined

- Added a new `getCallbackUri` property that returns a `Promise<string>`
- This allows the host provider to supply callback URIs for authentication

  - Implemented callback URI provider

  - Updated to use HostProvider for callback URI

  - Updated to match new signature
2025-08-05 00:03:07 +01:00
Sarah Fortune 8fee09f09e Add logging to the webview ProtoBus client if it recieves a badly formed message (#5353) 2025-08-04 22:34:08 +01:00
Bee 1c026c26d2 fix: chatbox position styling (#5352)
* fix: chatbox position styling

* add changeset
2025-08-04 14:18:53 -07:00
Sarah Fortune 5bc4e5a4a0 Add comments for HostBridge RPC showSaveDialog (#5351) 2025-08-04 21:15:45 +01:00
Ara 2cfce5734e Change Vscode LM token counts to use approx counting method (#5280) 2025-08-04 12:41:34 -07:00
Bee e2045bf5c3 fix: flaky check for editor search bar (#5347)
* fix: flaky check for editor search bar

* remove disabling notification
2025-08-04 12:37:33 -07:00
Sarah Fortune 0d933e804f Support mentions for filenames with spaces (#5309)
* feat: support file mentions with spaces using quoted syntax

This change allows users to reference files with spaces in their names, which was previously impossible due to the space-delimited mention syntax.
File names with spaces can be @ mentioned by quoting the file name, e.g. @"/path with spaces/file.txt".

- Update mention regex in `src/shared/context-mentions.ts` to accept quoted file paths
  - Add support for quoted file paths that can contain spaces.
  - Allow multiple trailing punctuation chars; previously only a single limited punctuation characters were allowed.
  - Maintain support for unquoted paths, URLs, git hashes, and special keywords

- Update `src/core/mentions/index.ts` to handle quoted file names in mention parsing
  - Process quoted file paths by removing quotes when accessing the file system
  - Preserve existing functionality for all other mention types

- Update `webview-ui/src/utils/context-mentions.ts` to auto-quote file names with spaces
  - `insertMention()` and `insertMentionDirectly()` now wrap file paths containing spaces in quotes
  - Non-file mentions (URLs, keywords) remain unquoted

- Add comprehensive unit tests:
  - New test file `src/core/mentions/__tests__/index.test.ts` covering all mention types
  - New test file `webview-ui/src/utils/__tests__/context-mentions.test.ts` for webview mention insertion
  - Expanded `src/shared/__tests__/context-mentions.test.ts` to cover quoted paths and edge cases

* Use const instead of var
2025-08-04 19:42:44 +01:00
Sarah Fortune 16f73532f4 Remove things that were left over from the ProtoBus migration. (#5321) 2025-08-04 18:04:54 +01:00
Sarah Fortune 88bea8eeb4 Update saveOpenDocumentIfDirty to return if the doc was saved or not (#5343) 2025-08-04 18:04:36 +01:00
Sarah Fortune 1a570e98ba Update the GitHub test action to produce more readable output (#5333) 2025-08-04 18:04:21 +01:00
Toshii d86b7dd036 Add optional way to enforce no file edits in plan mode (#5299)
* base implementation

* base messaging implementation & ui

* update state
2025-08-04 09:55:59 -07:00
Sarah Fortune 0178c3fa90 Fix flakey test getOpenTabs and re-enable unit tests (#5332)
- Replace fixed 100ms timeout with pWaitFor polling mechanism
- Set 2-second timeout with 50ms polling interval
- Test now waits exactly as long as needed for tabs to be created
2025-08-03 20:51:05 -07:00
github-actions[bot] a107f45c6a v3.20.8 Release Notes (#5330)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-03 17:17:54 -07:00
Saoud Rizwan 3dd2ed9161 Add comment about testing fix (#5329)
* Add comment about testing fix

* Create cool-cherries-brush.md
2025-08-03 17:15:04 -07:00
Saoud Rizwan 9a6603fdfb Disable unit tests in publish pipeline (#5327) 2025-08-03 17:09:59 -07:00
Sarah Fortune 6d5c3e6aa4 Switch remaining uses of vscode.window.show*Message to the HostBridge (#5324)
* Move remaining uses of vscode.window.show*Message to the HostBridge

Switch over the remaining uses.

Turn on the linter check to prevent these APIs being reintroduced later.

Exclude test files from the linter check.

* Update unit test
2025-08-04 01:03:43 +01:00
Sarah Fortune 24b9e821bb refactor: update navbar styling and remove shadow (#5323)
- Replace database icon with MCP server icon (codicon-server)
- Remove shadow-sm class for a flatter appearance
- Maintain consistent button styling with VSCodeButton components
- Add tooltips using HeroTooltip
2025-08-04 00:59:04 +01:00
github-actions[bot] 9960a3c57c v3.20.7 Release Notes (#5328)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-03 16:57:50 -07:00
Sarah Fortune 88947592f0 Fix errors in tests (#5294)
* Fix errors in tests:

```
[TerminalProcess] Terminal ID: Cline
Error capturing terminal output: Error: Failed to read from clipboard: HostProvider not setup. Call HostProvider.initialize() first.
  at readTextFromClipboard (/Users/sjf/cline/out/src/utils/env.js:39:15)
  at getLatestTerminalOutput (/Users/sjf/cline/out/src/integrations/terminal/get-latest-output.js:35:69)
  at TerminalProcess.emitCurrentTerminalContents (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:26:92)
  at TerminalProcess.runWithoutShellIntegration (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:366:20)
  at async TerminalProcess.run (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:47:13)
      ✔ should execute a command that lists files
[TerminalProcess] Starting command: "sleep 0.5 && echo 'Done sleeping'"
[TerminalProcess] Shell integration available: false
[TerminalProcess] Terminal ID: Cline
Error capturing terminal output: Error: Failed to read from clipboard: HostProvider not setup. Call HostProvider.initialize() first.
  at readTextFromClipboard (/Users/sjf/cline/out/src/utils/env.js:39:15)
  at getLatestTerminalOutput (/Users/sjf/cline/out/src/integrations/terminal/get-latest-output.js:35:69)
  at TerminalProcess.emitCurrentTerminalContents (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:26:92)
  at TerminalProcess.runWithoutShellIntegration (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:366:20)
  at async TerminalProcess.run (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:47:13)
  at async Context.<anonymous> (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.test.js:119:13)
FakeTimers: clearTimeout was invoked to clear a native timer instead of one created by this library.
To automatically clean-up native timers, use `shouldClearNativeTimers`.
      ✔ should handle a longer running command (3007ms)
[TerminalProcess] Starting command: "echo 'Line 1' 'Line 2'"
[TerminalProcess] Shell integration available: false
[TerminalProcess] Terminal ID: Cline
Error capturing terminal output: Error: Failed to read from clipboard: HostProvider not setup. Call HostProvider.initialize() first.
  at readTextFromClipboard (/Users/sjf/cline/out/src/utils/env.js:39:15)
  at getLatestTerminalOutput (/Users/sjf/cline/out/src/integrations/terminal/get-latest-output.js:35:69)
  at TerminalProcess.emitCurrentTerminalContents (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:26:92)
  at TerminalProcess.runWithoutShellIntegration (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:366:20)
  at async TerminalProcess.run (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:47:13)
      ✔ should execute a command with arguments
[TerminalProcess] Starting command: "echo "Line 1" && echo 'Line 2'"
[TerminalProcess] Shell integration available: false
[TerminalProcess] Terminal ID: Cline
Error capturing terminal output: Error: Failed to read from clipboard: HostProvider not setup. Call HostProvider.initialize() first.
  at readTextFromClipboard (/Users/sjf/cline/out/src/utils/env.js:39:15)
  at getLatestTerminalOutput (/Users/sjf/cline/out/src/integrations/terminal/get-latest-output.js:35:69)
  at TerminalProcess.emitCurrentTerminalContents (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:26:92)
  at TerminalProcess.runWithoutShellIntegration (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:366:20)
  at async TerminalProcess.run (/Users/sjf/cline/out/src/integrations/terminal/TerminalProcess.js:47:13)
      ✔ should execute a command with quotes
  ```

* Create brown-papayas-protect.md

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-03 16:55:21 -07:00
yuvalman ef4d11df19 fix: circular dependency that affect the github workflow Tests / test (pull_request) (#5317)
* fix: circular dependency that affect test env

* fix: circular dependency that affect test env
2025-08-04 00:38:41 +01:00
github-actions[bot] 23dec509bc v3.20.6 Release Notes (#5326)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-08-03 16:24:15 -07:00
celestial-vault 07ab6b19b8 check auth after initialize cacheservice (#5325)
* initialize cachService in controller constructor; remove authService as a class level variable on Controller

* changeset
2025-08-03 16:19:40 -07:00
Bee 0ddef94d1f feat: use auth callback handling with custom AuthHandler (#5223)
* feat: use auth callback handling with custom AuthHandler

- Add AuthHandler class to manage OAuth flow with local HTTP server
- Move callback logic from extension.ts to SharingUriHandler, making that shared between the original and new authentication ways
- Enabling Custom HTTP for "core only" environments
- Async starting and stopping HTTP server
2025-08-02 15:10:16 -07:00
Bee b9ae83b1cd fix: standalone navbar style with chat layout refactor (#5308)
* fix: standalone navbar style with chat layout refactor

* Update webview-ui/src/components/chat/chat-view/components/layout/MessagesArea.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-02 14:17:38 -07:00
Sarah Fortune e4eaf34827 test: Fix and re-enable unit tests (#5298)
* test: Fix and re-enable unit tests

Re-enable unit tests in CI workflow that were previously disabled

The cline-api test requires VSCode SDK which cannot be easily mocked in unit tests,
so it has been moved to integration tests where the full VSCode environment is available.

The @google/genai module is ES6-only which causes issues when running integration tests
compiled to CommonJS. A mock implementation has been added and the module resolution
is intercepted in test-setup.js to use the mock instead.

The bedrock unit tests for getModelId() functionality are removed as they were failing
and fixing them is out of scope for this PR.

- Move cline-api.test.ts from exports to test directory as it depends on VSCode SDK
- Add gemini-mock.test.ts to mock @google/genai ES6 module for CommonJS compatibility
- Add module interception in test-setup.js to redirect @google/genai to mock
- Remove failing bedrock unit tests introduced in PR #4209 (out of scope)

* Update src/api/providers/__tests__/bedrock.test.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Formatting

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-02 01:47:27 +01:00
github-actions[bot] 6d3ed43c74 v3.20.5 Release Notes (#5297)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.20.5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-08-01 16:50:04 -07:00
celestial-vault cbb67b48f2 fix secrets persistence (#5296) 2025-08-01 16:41:14 -07:00
Sarah Fortune a5f6a97be8 Fix eslint unit tests (#5295) 2025-08-01 23:16:18 +01:00
github-actions[bot] f309b062e7 v3.20.4 Release Notes
v3.20.4 Release Notes
2025-08-01 13:20:27 -07:00
canvrno 768df130ab Fix for delete task popup (#5260)
Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
2025-08-01 13:05:21 -07:00
Toshii 9980cb0938 fix grok browser_user (#5278) 2025-08-01 10:14:19 -07:00
Ara aca4f842fa Update Cerebras models (#5282)
* Update Cerebras models

* Add changeset

* Modify completion token limits

* Split qwen3 coder into free/paid

* Change -paid to base model name

* Update Cerebras models

* Update Cerebras models

* Update Cerebras models

* Update api.ts

* Update Cerebras models

---------

Co-authored-by: Kevin Taylor <kevin.taylor@cerebras.net>
2025-08-01 01:11:53 -07:00
Bee 3fc91e2afe fix: E2E test stability by reordering sidebar and notification setup (#5279)
* fix: E2E test stability by reordering sidebar and notification setup

- Extract editor menu locator to variable for better readability
- Move sidebar opening to page fixture to ensure it's available earlier
- Wait for chat input visibility before disabling notifications
- Prevents race conditions in test initialization

* fix
2025-07-31 18:03:14 -07:00
celestial-vault 5f4700ce95 Move apiconfiguration to cache layer (#5210)
* remove chatSettings object

* use cache for apiCongfiguration state

* add state persistence debounced, batch state updates, make setters synchronous

* fix types after merge conflicts

* fix global state reset

* remove clearCache; make dispose function private; remove vscode api dependency; call reInitialize in reset functions instead of dispose/initialize
2025-07-31 16:58:47 -07:00
Jim Tang dbaf5e3ee3 Update system.ts for formating the code. (#5270) 2025-07-31 16:19:01 -07:00
Toshii 576176c24f add grok4 to advanced list (#5276) 2025-07-31 14:54:45 -07:00
Akshay Raj Gollahalli c8abcbfdf9 Do not ignore pkg folder (#4483) (#4505) 2025-07-31 12:11:31 -07:00
celestial-vault 8e984f2d98 clean up getStateToPostToWebview in preparation for migration to StateManager service (#5266) 2025-07-31 11:47:06 -07:00
github-actions[bot] 81564faa4e v3.20.3 Release Notes (#5185)
* changeset version bump

* Updating CHANGELOG.md format

* releaseee

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-30 21:49:57 -07:00
pashpashpash f8b5f1fd72 adding redirectUrl to credits purchasing experience (#5158) 2025-07-30 17:43:04 -07:00
celestial-vault 2eb57384ab remove useEffect (#5261) 2025-07-30 17:11:01 -07:00
Sarah Fortune c80bae504a Add a flag to build the webview without minification, compact, etc. (#5262)
When the webview is built wuth build:test:
* don't compact the compiled code
* don't minify
* use inline source maps (the embedded JCEF browser can't load source maps from .map files).
2025-07-30 19:53:36 -04:00
Sarah Fortune 80f955be9e Add vscode.workspace.findFiles to no-direct-vscode-api eslint rule. (#5263)
Add `vscode.workspace.findFiles` to the list of the Vscode API calls that should not be re-introduced to the extension unintentionally.
2025-07-30 19:49:15 -04:00
wangyijing130 7435ffcd2f fix: use Uri.from to generate valid diff URI (#4882)
* fix: use Uri.from to generate valid diff URI

* fix the conflicts for VscodeDiffViewProvider.ts has been moved

---------

Co-authored-by: wangyj20 <wangyj20@asiainfo.com>
2025-07-30 10:42:19 -07:00
Bee a05d438612 refactor: setup e2e tests to use shared mock server (#5245)
* refactor: e2e test setup to use Playwright projects with global server

- Replace globalSetup/globalTeardown with Playwright projects configuration
- Rename setup.ts to global.setup.ts and teardown.ts to global.teardown.ts
- Convert ClineApiServerMock to use shared global server instance
- Add proper dependency management between setup, tests, and cleanup phases
- Improve server connection tracking and cleanup handling

* Rename Playwright test project names to match

* IS_DEV

* update helpers
2025-07-30 00:16:08 -07:00
Daniel Steigman b4b7512d9f Improve Cline accounts support telemetry (#5242)
* fixed linter rule and added identified telemtry stuff

* Updated the error handling

* fixed error handling
2025-07-29 17:23:50 -07:00
Toshii e08c65618e read_file can read images (png, jpg, jpeg, webp) (#4411)
* base

* throw

* chat ui

Co-authored-by: Ding Fei <fding@feysh.com>

* chat row logic for image file reads

* dim check change

---------

Co-authored-by: Ding Fei <fding@feysh.com>
2025-07-29 15:41:31 -07:00
Bee d653f1cc27 test: update Playwright test timeouts (#5241)
- Rename isGitHubAction to isCI for broader CI detection
- Adjust timeout logic to use CI or Windows conditions
- Reduce expect timeout from 40s/20s to 5s/2s for faster feedback
- Decrease streaming chunk delay from 50ms to 20ms in server mock
2025-07-29 15:27:46 -07:00
Bee c3a97c3eda e2e test: add mock service for cline API & new test for diff editor (#5196)
* Add mock api service and E2E test infrastructure

- Create AuthServiceMock for testing with mock user data and API responses
- Add AuthProvider interface to standardize authentication providers
- Implement E2E test fixtures with mock server and workspace setup
- Add comprehensive E2E tests for authentication and core functionality
- Export DEFAULT_CLINE_APP_URL config and make getEnvironmentConfig more flexible
- Update AuthService to use mock implementation during E2E tests

* format

* import

* refactor mock server

* rename data

* wait for text

* wait for edit

* increase timeout for windows

* clean up

* rename test and add orgs
2025-07-29 12:39:49 -07:00
celestial-vault 0e56272d65 remove chatSettings object (#5178)
* remove chatSettings object

* fix types after merge conflicts
2025-07-29 12:31:52 -07:00
Kevin Taylor fdc2e2655a Add Cerebras model Qwen 3 235b instruct (#5236) 2025-07-29 11:55:48 -07:00
Wintertee 6050413b8b fix: remove duplicate tool registration for claude4-experimental (#4748) 2025-07-29 10:48:41 -07:00
Bee c54f0da737 feat: adds navigation bar component and restructure app layout (#5220) 2025-07-29 13:05:01 -04:00
Sarah Fortune 6cbfb2b8b0 Remove duplication define property in esbuild.json (#5234) 2025-07-29 08:54:12 -07:00
Sarah Fortune 22788f0f12 Move the OutputChannel to the HostProvider (#5189)
* Move the OutputChannel to the HostProvider

Replace `OutputChannel.appendLine` with `HostProvider.logToChannel`.

Remove places where the cline OutputChannel was being passed around. Now it is stored in the HostProvider, so we don't need to do this.

# Conflicts:
#	src/hosts/vscode/VscodeWebviewProvider.ts

* Dont log the timestamp in logger.ts, the cline-core logger already outputs the timestamp

* Fix imports
2025-07-28 22:56:43 -07:00
DongDong Ling 708b785a97 Add Huawei Cloud MaaS Provider (#5071)
* Add Huawei Cloud MaaS Provider

* Fix case error

* Add missing modelid

* add huawei specific modelId and modelInfo

* add huawei specific model id and model info in state.proto

* more huawei maas specific change
2025-07-28 21:47:21 -07:00
Jose R. Perez 099bc44d42 docs: fix Global Rules directory location for Linux/WSL systems (#5219) 2025-07-28 23:54:03 -04:00
Toshii b9f4678dba add try-catch handling (#5227) 2025-07-28 20:21:51 -07:00
Bee f7d17384f6 refactor & fix: improve account view with better states management (#5182)
* refactor & fix: improve account view with better states management

The previous AccountView implementation suffered from several critical state management issues:

- Incorrect info on display: The active account is not ready when component is mounted because the fetching only start on mount but doesn't get reset correctly
- Excessive re-renders: All data was fetched on component mount, causing cascading state updates
- Race conditions: Multiple concurrent API calls and state dependencies created unpredictable behavior, e.g. 403 rate limits errors
- Monolithic state management: All account data, organizations, and auth state was managed in a single massive component
- Poor user experience: Users saw empty states and loading flickers when switching between organizations
- Tight coupling: User and org info logic was deeply embedded within the account view that cause Effect dependency loops

Solution: Centralized Authentication Context

- Extracted auth logic into dedicated ClineAuthContext with organizations state management
- Eliminated prop drilling by providing clineUser, organizations, and activeOrganization at the context level
- Reduced component re-renders by managing auth state separately from UI state
- Performed authentication guard at higher level and only displays user account to authenticated user. The component will get dismounted when user is not autheticated.
- Move handleSignIn and handleSignout into individual functions instead as they are regular functions with no state dependency

* 60secs

* Optimize state updates in AccountView to prevent unnecessary re-renders

Remove conditional checks before setState calls and use functional updates
with deep equality comparison to avoid redundant state changes and
dependency array bloat in useCallback hooks.

* add docs

* fix format

* fix error test

* setuser on logout
2025-07-28 15:46:23 -07:00
Sarah Fortune bb5a64afb3 Quiet spammy MCP debug logs (#5224) 2025-07-28 15:44:38 -07:00
Sarah Fortune 61224734f8 Change timeout, token budget and line limit fields in the ProtoBus from int64 to int32. (#5221) 2025-07-28 17:40:15 -04:00
Bee a28b995ab1 Fix styled-components prop warnings (#5181)
* Fix styled-components prop warnings

- Fix styled-components shouldForwardProp warnings by filtering non-DOM props
- Clean up unused imports in ChatTextArea and other components

* use mjs

* later

* remove unused imports
2025-07-28 11:19:32 -07:00
Bee a91878efc6 Fix: webview panel state change steals focus (#5193)
* Fix: webview panel state change steals focus

Fix webview visibility detection to check both visible and active states before taking focus. If a panel is visible but not active (focused), it should not steals editor focus.

Also removes unused import & add type imports

* add changeset
2025-07-28 10:59:00 -07:00
Jonathan Barazany 65c21e7b7d Bug fix: VSCode LM API token counting for Claude models (#5051)
* Improve token counting for Claude models in VSCode LM provider

- Reorder imports for better organization
- Add extractTextFromMessage helper method
- Add isClaudeModel detection method
- Use 4:1 character-to-token ratio for Claude models instead of VSCode's inaccurate counting
- Fallback to existing VSCode LM token counting for non-Claude models

* Update version to 3.18.3-r1 and refactor token calculation in VsCodeLmHandler

* 3.19.5-r1

* Add smart jobs impress changeset for VSCode LM API token counting fix

---------

Co-authored-by: Jonathan Barazany <jbarazany@microsoft.com>
2025-07-28 02:09:40 -07:00
Sarah Fortune 56e388c90f Add a check to the proto scripts to warn about using int64 types. (#5174)
* Add a check to the proto scripts to warn about using int64 types.

Javascript cannot represent the full range of int64. So, when the protos are deserialized from JSON int64's are converted to strings. The typescript code is expecting a number and not a string, and this causes errors.

This was noticed before now because in the vscode protobus and hostbridge, the proto messages are not serialized and deserialized, they are just passed around as JS objects.

However, in IntelliJ the protos are serialized when they are sent through the ProtoBus. When the response messages contains and int64, it is deserialized to a string instead of a number for safety. This is causes parts of Cline to fail in IntelliJ, e.g. the task history view won't load because `Task.getTotalTasksSize()` returns a string when it is expecting a number.

* Make checkProtos shorter

* Update scripts/build-proto.mjs

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update scripts/build-proto.mjs

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update scripts/build-proto.mjs

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix bad merge

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-27 22:02:12 -04:00
pashpashpash 586d804a01 Revert "Spruce up HistoryPreview (#4101)" (#5207)
This reverts commit cdfffb8464.
2025-07-27 16:48:49 -07:00
Saoud Rizwan 85fbbcbe3f Revise contributing guidelines and fix PR template link to feature requests board (#5195)
* Revise contributing guidelines and fix PR template link to feature requests board

* Fix wording
2025-07-26 12:43:59 -07:00
ZhangZhiheng 25c5310383 Fix url no trim (#4641)
* fix: trim input value for URL fields in BaseUrlField and DebouncedTextField components (#4051)

* chore: add changeset
2025-07-26 12:23:09 -07:00
Saoud Rizwan 19ef843d4f Revert "feat: update Gemini models - remove deprecated and add 2.5 Flash-Lite…" (#5194)
This reverts commit f6273e0661.
2025-07-26 11:53:06 -07:00
dependabot[bot] 2b3dd14271 Bump the npm_and_yarn group with 3 updates (#4186)
Bumps the npm_and_yarn group with 3 updates: [brace-expansion](https://github.com/juliangruber/brace-expansion), [tar-fs](https://github.com/mafintosh/tar-fs) and [undici](https://github.com/nodejs/undici).


Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

Updates `tar-fs` from 3.0.8 to 3.0.9
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9)

Updates `undici` from 6.21.1 to 6.21.3
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.1...v6.21.3)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar-fs
  dependency-version: 3.0.9
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: undici
  dependency-version: 6.21.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-26 08:03:48 -07:00
Karan Vaidya 721e7ae305 Add Composio to adding-mcp-servers-from-github.mdx (#4624)
* Add Composio to adding-mcp-servers-from-github.mdx

* Update adding-mcp-servers-from-github.mdx
2025-07-26 07:52:27 -07:00
Eugene Demkin f6273e0661 feat: update Gemini models - remove deprecated and add 2.5 Flash-Lite (#4681)
- Remove deprecated experimental models:
  - gemini-1.5-flash-8b-exp-0827
  - gemini-1.5-flash-exp-0827
  - gemini-1.5-pro-exp-0827
- Add gemini-2.5-flash-lite-preview-06-17 with latest pricing
2025-07-26 07:45:29 -07:00
CellenLee 68d0af2afc feat: moonshot provider ui polish (#5034) 2025-07-26 07:21:50 -07:00
Saoud Rizwan 4286f301d2 Remove feature_contribution issue type (#5184) 2025-07-26 06:18:41 -07:00
dependabot[bot] 28536084bf Bump form-data in /webview-ui in the npm_and_yarn group (#5095)
---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-26 06:07:58 -07:00
Utkarsh dfbac3eefd Support for Deepseek R1 0528 (#3903) (#5183) 2025-07-26 05:45:31 -07:00
Saoud Rizwan 04f0710a03 Update bug report template to make system information and logs fields optional (#5159) 2025-07-26 01:58:48 -07:00
kvyb 195e15db32 Move vscode.commands.executeCommand("vscode.open") to Hostbridge (#5173)
* feat: add openFile host bridge for vscode.open command

* fix: simplify openFile hostbridge to follow gRPC best practices:
- Remove success boolean field from OpenFileResponse proto
- Use gRPC exceptions for error handling instead of success/failure booleans
- Simplify hostbridge implementation to just move existing vscode.open code

* fix: remove create wrapper from openFile call

* fix proto merge conflict
2025-07-26 04:19:03 -04:00
Sarah Fortune 19cb70de55 Use npm moduleopen to open URLs in the external browser (instead of the host bridge) (#5013)
* Use npm `open` to open URLs in the external browser

# Conflicts:
#	src/utils/env.ts

# Conflicts:
#	src/utils/env.ts

* Change log statement

* Use the simple-open-url module to open URLs in the system browser.

Log failures of ProtoBus RPCs

* Remove vscode hostbridge handler for openExternal

* Rm unused imports

* Switch back to `open` module.

Update esbuild.js to ES6 and move to esbuild.mjs

* Update src/utils/env.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* remove IS_DEV from e2e setup build

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-26 04:06:53 -04:00
github-actions[bot] e2a2ecde44 v3.20.2 Release Notes (#5155)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-26 00:00:19 -07:00
Saoud Rizwan 1a466c0a44 Fix cursor state after restoring files to be disabled after checked out (#5179)
* Fix cursor state after restoring files to be disabled after checked out

* Create silver-llamas-pretend.md
2025-07-25 23:51:34 -07:00
Sarah Fortune 31cbf489c4 Fix launch configuration for the cline-core (#5170) 2025-07-26 02:38:38 -04:00
Saoud Rizwan c667d34f27 Fix issue where checkpointing blocked UI (#5177)
* Fix issue where checkpointing blocked UI

* Create wet-fishes-study.md
2025-07-25 23:24:39 -07:00
Sarah Fortune a1bf1f95a3 refactor(proto): Align proto directory structure with package names to follow best practices (#5171)
* Reorganized proto directory structure to match package naming convention

Moved cline package protos from the proto directory to proto/cline/ directory
Host package protos remain in proto/host/ directory

Updated all import statements across codebase to reflect new proto paths

Removed proto linter exception for package/directory mismatch rule

Fix Vscode proto indexing errors by setting the proto path in the Vscode settings.

* Update imports to use new package

Update imports from @shared/proto/<thing> to @share/proto/cline/<thing>
2025-07-26 00:58:16 -04:00
Bee 5da75af616 Fix Qwen API options inconsistency (#5162)
* Fix Qwen API option inconsistency

Refactor Qwen API region handling with enum and improved type safety

Changes:

- Replace string literals with QwenApiRegions enum for better type safety
- Add default region initialization in QwenHandler constructor
- Extract useChinaApi() method for cleaner conditional logic
- Update UI dropdown to use enum values with proper memoization
- Improve code maintainability and reduce magic strings

* changeset added

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix type with conversion

* Refactor Qwen model defaults to use first model dynamically

Move type definitions and enums after model objects and set default
models by selecting the first key from each model object instead of
hardcoding specific model IDs.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-25 11:15:01 -07:00
Sarah Fortune 38babe12f7 Replace vscode show message API calls with the host bridge (#5161) 2025-07-25 11:48:16 -04:00
Sarah Fortune 66fb8835a4 Add an RPC to the host bridge to scroll the diff viewer. (#5151) 2025-07-24 23:09:33 -04:00
Bee 214e157360 Fix organization state reset when switching between accounts (#5154)
* Fix organization state reset when switching between accounts

Move user authentication check into getUserOrganizations callback to properly reset state when switching between personal and organization accounts. This prevents stale organization data from persisting across account switches.

* add changeset

* Add error handling and refactor credit display components

Fix issues with balance display out of sync on org change or when API calls received 405 (rate limited) error

- Add error handling for failed API calls in getUserCredits and getOrganizationCredits
- Extract animated credit display logic into reusable StyledCreditDisplay component
- Simplify AccountView by removing inline credit animation code
- Improve organization state management and loading behavior

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* format

* reset on mount

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-24 19:59:42 -07:00
Igor Tceglevskii 7a9dce4f86 Moved open and visible tab retrieval to a separate hostbridge module (#5150) 2025-07-24 17:46:31 -07:00
Tomás Barreiro af7e3a4d20 Change the CLAUDE_CODE_MAX_OUTPUT_TOKENS (#5142)
* Change the CLAUDE_CODE_MAX_OUTPUT_TOKENS

* Add changeset

* Add comment and variable to explain the changes
2025-07-24 09:24:30 -07:00
schardosin 3abdc9ad0f Fixed issue affecting first-time credential entry for SAP AI Core (#5132)
* removed the reduced mask, which was making the client secret to fail in the first save

* added changeset
2025-07-23 22:19:47 -07:00
Ara 28b15d8b9b Adding gitbash terminal support and docs for solving windows terminal issues (#5110)
* Adding gitbash terminal support and docs for solving windows terminal issues

* Update docs/troubleshooting/terminal-integration-guide.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-23 14:07:02 -07:00
github-actions[bot] bc6b3e54be v3.20.1 Release Notes (#5128)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-23 11:46:55 -07:00
canvrno 9fad0aa4ae Fix file deletion bug (#5125)
* Fix for files being deleted when switching modes or closing tasks

* changeset

* Added check to see if we are waiting for API response

* More targetted fix

* Create hot-onions-promise.md

* Delete .changeset/hot-onions-promise.md

---------

Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-23 11:44:24 -07:00
Ara 23fea0e16b Stop auto focus of Cline window on Every update (#5117) 2025-07-23 04:03:28 -07:00
Bee e8aaa61494 Improve auth state management for account view (#5107)
- Fix AccountView state management when user is not authenticated or is authenticated after the webview is loaded
- Add proper loading state reset and conditional data fetching
2025-07-22 20:00:14 -07:00
github-actions[bot] d93080304c v3.20.0 Release Notes (#5096)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and version for 3.20.0 release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-22 19:52:16 -07:00
Ara 1ce5f72bc1 Updating the new release announcement note (#5101)
* Updating the new release announcement note

* Adding gitbash terminal support and docs for solving windows terminal issues
2025-07-22 19:37:44 -07:00
Saoud Rizwan fb676add2e Fix hugging face model description (#5105) 2025-07-22 19:06:51 -07:00
Ara 31cda0ce5e Adding support for new models Qwen 3 models on Qwen provider (#5106) 2025-07-22 19:00:49 -07:00
Ara e173dad69c Updating the ordering to move cerebras provider upwards in the list of providers (#5102) 2025-07-22 16:22:52 -07:00
Toshii 92f32522c5 devtral medium (#5100) 2025-07-22 16:07:00 -07:00
Bee 7817d5f261 Host bridge migration: showInputBox (#4747)
* Update showInputBox

* Simplify

* Remove undefined handler for ShowInputBoxResponse
2025-07-22 13:13:03 -07:00
Bee db6d288efa Display credit balance for all accounts (#4992)
* Display credit balance for all accounts

The credit balance display was previously only shown for personal accounts. This change removes the check for `activeOrganization === null` and displays the credit balance and "Add Credits" button for all account types, including organization accounts. A divider is added above the balance section for visual separation once the backend change is deployed.

* changeset

* Improve refresh logic

Refactors the `AccountView` component to properly display and manage credits for both user and organization accounts. It introduces the `getOrganizationCredits` API call to fetch organization-specific credits and updates the UI accordingly. The refresh logic has also been improved to ensure data consistency and prevent unnecessary API calls.

Key changes:

- Implemented `getOrganizationCredits` to fetch credits for the active organization.
- Modified the credit display to show organization credits when an organization is active.
- Updated the refresh logic to use `useCallback` and `debounce` for better performance and to prevent race conditions.
- Added a periodic refresh to update account data every 30 seconds.
- Improved error handling and loading state management.
- Removed the interval ref and replaced it with a simpler useEffect for periodic refresh.
- Added last fetch time to the UI.

* clean up

* deepEqual

* org management

* prevent race condition
2025-07-22 12:03:37 -07:00
github-actions[bot] 87ff00d87e v3.19.8 Release Notes (#5022)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for v3.19.8 release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-22 11:35:39 -07:00
Sarah Fortune e602efc7a6 Dont export the protobus handlers from the grpc-client protobus-services.ts (#5091) 2025-07-22 01:30:01 -07:00
kvyb e6462af336 automate announcement display for major.minor releases (#5081)
* automate announcement display for major.minor releases

* fix: simplify onDidShowAnnouncement
2025-07-21 23:35:27 -07:00
Sarah Fortune d2521a8abb Remove compiled files that were committed by mistake (#5082)
* Remove compiled files that were committed by mistake

* Don't JSON encode the grpc message request.

The original grpc-client-base.ts encoded the request message using
```
function encodeRequest(request: any): any {
  if (request === null || request === undefined) {
    return {}
  } else if (typeof request.toJSON === "function") {
    return request.toJSON()
  } else if (typeof request === "object") {
    return { ...request }
  } else {
    return { value: request }
  }
```
But the request object don't have a .toJSON method, so it was not actually converting them
to JSON properly.

Don't JSON encode request to keeo the same behaviour as before.

* Update gitignore
2025-07-21 23:22:25 -07:00
celestial-vault ad2923cd74 migrate save textDocument (#5088) 2025-07-21 23:12:31 -07:00
Sarah Fortune 1ecb24544f fix: Generate type-safe code for the Vscode Protobus service (#5077)
* fix: Generate type-safe code for the Vscode Protobus service

This commit establishes a fully type-safe ProtoBus system by fixing the streaming
response handler type definitions and completing the protobuf-driven architecture.

Key improvements:

• **Complete type safety**: ProtoBus is now completely type-safe with compile-time
  validation of all gRPC service definitions, request/response types, and handler
  signatures

• **Simplified message creation**: No longer need to manually call `Message.create({...})`
  - the generated code handles message instantiation automatically

• **Automated proto parsing**: Eliminated manual parsing of proto files - the build
  system now automatically generates TypeScript definitions from protobuf schemas

• **Proto files as source of truth**: Service names, method names, and message types
  are now definitively controlled by the proto files, ensuring consistency across
  the entire codebase

• **Handler type checking**: ProtoBus handlers are fully type-checked including:
  - Request and response type validation
  - Handler method name verification against proto definitions
  - Streaming vs unary handler signature enforcement

This establishes a robust, type-safe foundation for all gRPC communication between
the extension host and webview components.

* Remove commented out code in script

* Just call handlers directly
2025-07-21 18:40:28 -07:00
celestial-vault 58465d2e32 migrate showSaveDialog hostBridge (#5080)
* migrate showSaveDialog hostBridge

* rework proto type

* update proto type names
2025-07-21 18:20:52 -07:00
Toshii 35c0ced254 launch buttons (#5078) 2025-07-21 16:13:17 -07:00
Ara 63f3b40ef1 Change available Cerebras models + modify context window (#5076)
* Change context length for Cerebras Qwen 3 32b to 64k

* changeset

* changeset

* Create changeset

* Add Cerebras Qwen 3 235B a22b

* Change available Cerebras models

llama-3.3-70b
qwen-3-32b
qwen-3-235b-a22b

* Add changeset

---------

Co-authored-by: Kevin Taylor <kevin.taylor@cerebras.net>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-21 14:03:45 -07:00
Bee 827d002ea6 Fix CLINE_ENVIRONMENT configuration not being passed to webview (#5029)
* Fix CLINE_ENVIRONMENT configuration not being passed to webview

## Problem

The CLINE_ENVIRONMENT configuration set in launch.json was not being properly passed to the webview, causing the webview to break when trying to access environment-specific configurations.

This resulted in:

Webview using incorrect API URLs (always defaulting to production)
Broken authentication flows in development/staging environments
Inconsistent behavior between the main extension and webview components

## Root Cause

The issue occurred because:

Duplicate Configuration Logic: The webview had its own separate config.ts file that was trying to read process.env.CLINE_ENVIRONMENT directly
Environment Variable Propagation: While Vite was configured to pass CLINE_ENVIRONMENT to the build process, the webview's runtime code couldn't access this environment variable properly
Configuration Mismatch: The main extension and webview were using different configuration sources, leading to inconsistent environment settings

* fix credit uri

* replace apiBaseUrl with appBaseUrl

* local option

* fallback changed to app

* change to app url

* merge fixes

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-07-21 13:58:04 -07:00
celestial-vault c040db6d71 Fix options to buildApiHandler (#5064)
* add missing taskId to buildApiHandler

* remove console log
2025-07-21 13:56:32 -07:00
Sarah Fortune 8d5985c8fd refactor(hosts): Simplify the host provider interface for callers (#5057)
* refactor(hosts): Simplify the host provider interface for callers

- Streamline API to reduce complexity for consuming code
- Update all references across core, controller, and integration modules
- Consolidate provider patterns for easier usage
- Rename host-providers.ts to host-provider.ts

# Conflicts:
#	src/core/controller/index.ts
#	src/extension.ts
#	src/integrations/git/commit-message-generator.ts

* Add comment

* In the tests, reset the HostProvider to prevent it complaining that it is being reinitialized

* Update comment

* Fix imports
2025-07-21 12:20:50 -07:00
Bee c970b8030e Refactor: Git commit message generation as a module (#5031)
* Refactor: Git commit message generation as a module

Implement Git commit message generation as a module

Refactors the Git commit message generation functionality into a separate module for better organization and maintainability.

The changes include:

- Moving the commit message generation logic from `src/core/controller/index.ts` to a new module `src/integrations/git/commit-message-generator.ts`.
- Adding a command to abort commit message generation.
- Updating the `cline.generateGitCommitMessage` command to use the new module.
- Adding a context key to disable the generate commit message button when a commit is generating.

This refactoring improves the codebase by:

- Separating concerns: The commit message generation logic is now isolated in its own module, making it easier to understand and maintain.
- Improving testability: The new module can be tested independently of the controller.
- Promoting code reuse: The commit message generation logic can be reused in other parts of the application if needed.

* clean up

* changeset added
2025-07-21 10:43:14 -07:00
Sarah Fortune e7ce38bd85 Generate typed clients for the ProtoBus API (#5063) 2025-07-21 10:09:02 -07:00
Sarah Fortune 600a6e33ed Move duplicated code for loading the protobuf descriptor set into a shared util file. (#5059)
* Move duplicated code for laoding the protobuf descriptor set into a shared util file.

* Formatting

* Update comment
2025-07-20 17:57:22 -07:00
Sarah Fortune caf0d8aee2 Add better error handling the DiffViewProvider.saveDocument() (#5041) 2025-07-19 23:58:46 -07:00
celestial-vault ee33e84c48 Speed up E2E tests (#5045)
* cache vscode and playwright downloads

* remove extra logs

* change cache path to check for vscode

* empty commit

* use optimized e2e script
2025-07-19 21:57:36 -07:00
Sarah Fortune 280138b259 Improve HostBridge error handling and logging robustness (#5037) 2025-07-19 20:54:42 -07:00
Sarah Fortune 924f235c31 Change the script scripts/runclinecore.sh to only install and run cline-core (#5049)
-and not build the zip file.
2025-07-19 17:03:06 -07:00
Tomás Barreiro 06d5bc56bc Use --system-prompt-file to pass the system prompt to Claude Code (#5024)
* Pass the system prompt through a file when using Claude Code

* Support older versions and return better errors

* Add tests

* Add changeset

* Remove outdated docs

* Use a unique file name and clean the file

* Address comments
2025-07-19 12:41:21 -07:00
canvrno b1d82e163c Robust Checkpoints timeout, error handling (#5015)
* Diable checkpoints on tasks where the init timed out, fix settings link

* early warning message

* Added checkpointTrackerErrorMessage to HistoryItem

* Updated some comments related to checkpoints timeouts

* changeset, timer cleanup

* timer cleanup
2025-07-19 12:14:41 -07:00
celestial-vault 9f73cde5e9 fix stale state in model picker searchTerm (#5044) 2025-07-19 11:48:18 -07:00
Ara be2d416359 Updating Mintlify version (#5030)
* Updating Mintlify version

* clean up and ignore docs workspace for lint (#5032)

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
2025-07-18 19:29:28 -07:00
celestial-vault 42ffc30324 Separate plan act model settings (#4827)
* add provider handler options types and only pass those fields when building

* use separate fields for plan and act mode for ephemeral model settings

* post merge issues fixed: bedrock and cline api build handlers; current mode reading in controller/index.ts; adding a couple fields to welcomeView migration

* add in moonshotApiKey to settings-conversion after main merge

* fix type errors

* fix frontend types

* fix code after merge conflicts; switch groq provider to plan/act paradigm

* consolidate to Mode type

* remove promise resolve

* move huggingface provider into the new schema

* add new providers to migration function

* use normalizeApiConfiguration for settings menu provider value to avoid undefined state error
2025-07-18 14:14:31 -07:00
Sarah Fortune b0c67e9f83 Fix clean up part of the build-proto script (#5027) 2025-07-18 13:30:04 -07:00
Sarah Fortune fd366208a1 Fix the structure for the hosts package (#5020)
* Fix the structure for the hosts package.

Right now we support two host platforms: vscode using the internal host bridge service (inside the same process), and other platforms using the external host bridge (using gRPC over local sockets).

The structure of the two packages should mirror each other

```
hosts/
  vscode/
    VscodeDiffViewProvider
    VscodeWebViewProvider
    etc ...
  external/
    ExternalDiffViewProvider
    ExternalWebViewProvider
    etc ...
```

* Fix imports

* Fix imports

* Fix imports
2025-07-18 13:22:23 -07:00
Sarah Fortune 6c7bc58215 Move remaining platform specific code out of the diff view provider. (#5009)
* .

* Move the DecorationController into the hosts/vscode package.
2025-07-18 13:16:19 -07:00
Sarah Fortune f69a378ff4 Add eslint checks for more vscode API calls (#5023)
* Add eslint check for more vscode API calls

Add eslint checks to prevent vscode API calls from being reintroduced after they were switched to the host bridge.

The ones that are not enabled are not completely migrated, so they are not turned on because it would cause too many warnings, and make developers used to ignoring them.

* Update eslint-rules/no-direct-vscode-api.js

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update warning message text

* Move the check for if the file is being included in the linter check or not into its own function

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-18 13:08:13 -07:00
Sarah Fortune 309e3bd85c Fix import in McpHub (#5021) 2025-07-18 11:59:07 -07:00
Daniel Campos Olivares eb6eb371e4 fix: Add documentation to nav menu (#5014) 2025-07-18 11:25:40 -07:00
Mohan Raj Rajamanickam 419e3e4677 fix: mcp servers are not started when disabled (#4501)
* fix: disabled servers should not be started

* refactor to dedupe

* add changeset

* Update moody-crabs-relate.md

* minor comment tweaks

* use unknown instead of any
2025-07-18 10:35:19 -07:00
Sarah Fortune e95eecd65f Just shut up already (#5011)
Don't display a notification when the MCP servers have updated.
2025-07-17 23:32:10 -07:00
Sarah Fortune e83e71cc6d Remove class that is unused, and other class that is totally commented out. (#5010) 2025-07-17 23:00:29 -07:00
Sarah Fortune a9e526e99b Move save() and getDocument() to the platform specific diff classes (#5008)
* Move logic to save the diff document and get the diff content to the platform specific diff view providers.

Add getDocumentText to the diff service.

The ExternalDiffViewProvider should be using its activeDiffEditorId (not the activeDiffEditor, which is the vscode Editor object)

* Check activeDiffEditorId

* Update src/integrations/editor/DiffViewProvider.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Use await with this.saveDocument()

* Remove test file

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-17 18:06:54 -10:00
Sarah Fortune 72f16a8c30 Don't need to use Message.create({...}) with the host bridge (#4999)
* Use await when calling async function showMessage.

Use await when calling `windowClient.showMessage`, otherwise the caller doesn't wait for the request to complete and any exceptions are lost.

For the host bridge RPCs, you don't need to do `ShowMessageRequest.create({...})`, you can just pass the request directly like: `{...}. The Message.create() was needed for the ProtoBus because of the way it was implemented, it couldn't be type-checked by the compiled. It's not needed elsewhere.

* Dont use await, because it blocks until the message is dismissed

* Dont need `?.selectedOption`, the response cannot be null

* Dont use await
2025-07-17 20:15:42 -07:00
Toshii 1a3ec9f024 move environment setting to launch & publish (#5002)
* move env setting to launch & publish

* change env name

* Update webview-ui/vite.config.ts

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>

* update env location

---------

Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
2025-07-17 18:49:36 -07:00
Sarah Fortune b3fa3ad0d3 Add new RPCs to the host bridge diff service (#4997)
* Add truncate document to the hostbridge diff service.

# Conflicts:
#	src/standalone/ExternalDiffviewProvider.ts

* Fix typo

* Add host bridge rpcs for the diff service

* Add saveDocument and closeDiff to the host bridge.

* Formatting

* Use the host bridge in ExternalDiffviewProvider

* Make comments less verbose
2025-07-17 18:36:43 -07:00
github-actions[bot] 45241fcccf v3.19.7 Release Notes (#4983)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.19.7

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-17 18:19:36 -07:00
pashpashpash 2a3f0e9418 Adding huggingface provider (#4952)
Co-authored-by: arafatkatze <arafat.da.khan@gmail.com>
2025-07-17 18:00:28 -07:00
Toshii 4334764903 remove warning (#5003) 2025-07-17 17:53:25 -07:00
Bee b3a10243b8 Unify error handling and display logic (#4984)
* Unify error handling and display

Several improvements to error handling and reporting within the Cline extension, focusing on providing more informative error messages to the user and improving telemetry data.

- **Error Handling:**
  - Introduces a `ClineError` class to encapsulate Cline-specific errors, providing structured data about the error (status code, request ID, etc.).
  - The `ErrorService` now creates and logs `ClineError` instances, improving error reporting to Sentry and telemetry.
  - Removes redundant error formatting logic from `src/core/task/utils.ts`, relying on the `ClineError` class for consistent error representation.
  - The Cline API handler now throws the raw error, allowing the `ClineError` class to handle the error formatting.

- **UI Improvements:**
  - Introduces new UI components (`ErrorRow`, `ErrorBlockTitle`) to display error messages in a more user-friendly format within the chat interface.
  - Displays credit limit errors with detailed information and a link to purchase credits.
  - Improves the display of rate limit errors and authentication errors.
  - Adds specific handling for PowerShell-related errors, providing a link to a troubleshooting guide.

- **Telemetry:**
  - Captures provider API errors using `ClineError` data, providing more detailed information about the error in telemetry reports.

- **Other Changes:**
  - Fixes an import path in `src/services/posthog/PostHogClientProvider.ts`.
  - Adds tests for the new UI components.
  - Adds `error` field to `ClineMessage` to transport `ClineError` instances to the webview.

These changes aim to provide a better user experience by displaying more informative error messages and improving the overall reliability of the Cline extension.

* include provider id

* includes model and provider id

* fix test

* return gracefully for empty response
2025-07-17 16:21:18 -07:00
Bee 8e95c136a6 Handle auth state changes in all extension windows (#4987)
* Handle auth state changes in all extension windows

Addresses an issue where authentication state changes (login/logout) were not being properly propagated across all extension windows.

The `onDidChange` event handler for `clineAccountId` secret now checks if the secret was added/updated (login) or removed (logout).

- If the secret exists, `restoreRefreshTokenAndRetrieveAuthInfo` is called to restore auth info (login from another window).
- If the secret is removed, `handleDeauth` is called to handle logout for all windows.

This ensures that all extension windows are kept in sync with the current authentication state.

* changeset
2025-07-17 15:40:30 -07:00
Daniel Campos Olivares 0b66faa1dd chore: Introduce SAP AI Core documentation (#4961)
* feat: Introduce SAP AI Core documentation

* fix: Markdown lint

Signed-off-by: Daniel Campos Olivares <dacamposol@gmail.com>

* fix: Typo

Signed-off-by: Daniel Campos Olivares <dacamposol@gmail.com>

---------

Signed-off-by: Daniel Campos Olivares <dacamposol@gmail.com>
2025-07-17 14:10:30 -07:00
Sarah Fortune 3d2dc1c5c4 Move platform specific code out of the DiffViewProvider and into the VscodeDiffViewProvider (#4980)
* Add a way to reset state for the platform specific diff view providers.

Add the abstract method `resetDiffView()` to the DiffViewProvider.

On Vscode it reset the active diff editor and decorations.

On External diff view providers, it reset the diff editor ID.

* Add a way to truncate the document to the platform specific diff view providers.

This is used when the last update is recieved to remove any content from the bottom of the document.

* Move `closeDiffView` to the platform specific diff view classes.

* Update comment

* Use await for async function

* Move setting the cursor position into replaceText
2025-07-17 12:35:48 -07:00
Andrei Eternal 028412579b Standalone Terminal Manager & remove other vscode-impls (now covered by host bridge) (#4993)
* Revert "experimental vscode impls & build-proto cleanup (#4493)"

This reverts commit f00c5f4ecc.

* leave terminal impls

* terminal manager switch for standalone

* Export standaloneTerminalManager to global

* clean up standalone terminal switch

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-07-17 12:11:45 -07:00
Sarah Fortune f04788c2ec Move the logic to scroll the diff editor window into the platform specific classes (#4977)
* Move the logic to scroll the diff editor window into the platform specific classes.

Move the current logic into the VscodeDiffViewProvider.

The ExternalDiffViewProvider will use the host bridge to scroll the editor tab. But for now it doesn't do anything.

* Add comment

* Remove log messages
2025-07-17 11:26:40 -07:00
Toshii 5fba39f886 move to simple config for setting env details of backend (#4978)
* backend env

* frontend env config

* rename config

* preview update

* separate mcp link

* mcp url updated

* config change to local

* webview config to local
2025-07-16 22:53:08 -07:00
Toshii 9a4e3655b3 remove import (#4981) 2025-07-16 19:40:43 -07:00
Tomás Barreiro b18ad77539 Improve Claude Code errors and create Docs (#4968)
* Create docs

* Improve the Claude Code error messages

* Replace with remote image
2025-07-16 18:22:01 -07:00
github-actions[bot] c50fce8101 v3.19.6 Release Notes (#4976)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.19.6

* more modifications

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-16 17:21:22 -07:00
Sarah Fortune 47f84d7c2c Improve generated code that registers the vscode host bridge handlers. (#4972) 2025-07-16 17:14:37 -07:00
Ara 17c57162cd Refactoring terminal process logic and edge cases for simplicity (#4673)
* Refactor terminal output capture for better reliability

- Extract emitCurrentTerminalContents() as a private method for reusability
- Improve handling of commands with no/delayed output by capturing actual terminal contents instead of generic messages
- Add multiple fallback attempts (100ms, 1s, 3s) for terminals without shell integration
- Enhance timeout comments to clarify the 3-second delay purpose
- Add .tool-versions file (likely for version management)

* Refactor TerminalProcess run method into smaller functions

Split the monolithic run() method into focused helper methods for better
maintainability and readability. Extracted initialization, shell integration
execution, stream processing, and cleanup logic into separate private methods.
This improves code organization without changing functionality.

* Fixing the handling of echo commands and changing the wording of the terminal capture line

* fix: Embracing the ffmpeg for opus support
2025-07-16 16:33:01 -07:00
Toshii 0f1f3d84f7 add auto refresh to accounts page (#4901)
* add auto refresh to accounts page

* update

* 10 sec
2025-07-16 16:14:18 -07:00
Saoud Rizwan 0c5832b7a2 Fix kimi k2 provider sorting (#4975)
* Fix kimi2 provider sorting

* Create smart-flies-eat.md
2025-07-16 16:11:12 -07:00
celestial-vault 11c4c58ed3 update the current task's consecutiveAutoApprovedRequestsCount on max request change (#4955) 2025-07-16 16:07:01 -07:00
pashpashpash 27bf78ddbd swapping latest diff algo as default (#4412)
* swapping latest diff algo as default

* updating

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-16 15:59:48 -07:00
pashpashpash c3161567d3 removing unneeded docs section (#4974) 2025-07-16 15:50:08 -07:00
pashpashpash 516d7bccc9 adding documentation workflow (#4598)
* adding documentation workflow

* Update .clinerules/workflows/writing-documentation.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* good example

* good example

* language

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

* Update writing-documentation.md

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-16 15:37:24 -07:00
pashpashpash e91c8208a3 fix streamlit dashboard to be compatible with both old and new versions of streamlit (#4922) 2025-07-16 15:28:02 -07:00
Sarah Fortune 0fb40527c8 Add a script to run the standalone service. (#4966)
* Add a script to run the standalone service.

Remove spammy log statements.

* Add comment

* Fix some vscode stubs

* Update scripts/runstandalone.sh

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update scripts/runstandalone.sh

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update scripts/runstandalone.sh

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Remove old script

* Add comment

* Add comment

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-16 15:12:52 -07:00
Sarah Fortune 8a2e90084d Change the port numbers for the ProtoBus service and HostBridge. (#4969)
Don't use the default gRPC port number because it's more likely to already be in use.
2025-07-16 11:28:07 -07:00
Sarah Fortune 4c3384988c open-file calls vscode.workspace.openTextDocument but doesn't use the result. (#4960) 2025-07-16 03:01:25 -07:00
Daniel Steigman 8539bdce24 Upgraded telemetry to capture each message turn separately (#4954)
* refactor: Ugraded telemetry to capture each message turn seperatly

* go back to the correct posthog key oops
2025-07-15 22:49:35 -07:00
Bee cd7f3ef6a7 Disable recording webview click events (#4709)
* Disable recording webview click events

Introduces a temporary measure to disable the recording of webview click events in PostHog. This is achieved by adding a `temporaryDisabled` flag that, when true, prevents the initialization of PostHog and stops the identification of users.

This change is intended to be temporary and should be reverted in a future commit by removing the `temporaryDisabled` flag.

* Use separate PostHog config for development environment

This commit introduces a separate PostHog project for the development environment. This allows us to track events in the development environment without polluting the production data.

The `posthogConfig` now uses `posthogDevEnvConfig` when `process.env.isDev` is true, and `posthogProdConfig` otherwise.

* process.env.IS_DEV

* Update src/shared/services/config/posthog-config.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* fix format

---------

Co-authored-by: Beatrix Woo <beatrix@cline.bot>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-15 22:46:58 -07:00
github-actions[bot] 80fbcda03b v3.19.5 Release Notes (#4941)
-   Add Groq as a new API provider with support for all Groq models including Kimi-K2
-   Add user role display in organization UI for Cline account users
-   Fix message dialogs not showing option buttons properly
-   Fix authentication issues when using multiple VSCode windows
2025-07-15 21:49:06 -07:00
pashpashpash cef79e06db not showing request id when insufficient balance (#4953)
* not showing request id when insufficient balance

* whoops

* betterrr
2025-07-15 21:38:11 -07:00
Ara 5dddbef65c Adding Groq provider (#4943) 2025-07-15 19:47:56 -07:00
Bee b6f6358d4a Set up E2E tests with Playwright (#4721)
* Add Playwright E2E tests

Adding end-to-end (E2E) testing capabilities using Playwright. It also updates the `@vscode/test-electron` dependency.

The changes include:

- Adding Playwright as a dev dependency.
- Adding `e2e` and `e2e:build` scripts to `package.json` for running E2E tests.
- Adding `@playwright/test` to the list of dependencies.
- Updating `@vscode/test-electron` from `2.4.1` to `2.5.2`.
- Adding `test-results` to `.gitignore` to exclude test result files.

* wip: github workflow

Adding a new GitHub Actions workflow for running end-to-end (E2E) tests using Playwright. The workflow is triggered on push to the main branch, pull requests, and manual workflow dispatch.

The workflow defines a matrix strategy to run tests on different runners (Ubuntu and Windows) and shards. It also uploads Playwright recordings as artifacts if the tests fail.

* add @vscode/vsce as dev dep

* update workflow

* apply feedback

* fix test workflows

* add command palette helper

This commit improves the reliability and efficiency of the end-to-end tests by:

- Adding a delay to the "Let's go!" button click in the auth test to ensure the action is properly registered.
- Adding an expectation to ensure the "Get Started for Free" button is no longer visible after API key submission.
- Caching the "Use your own API key" button to avoid redundant lookups.
- Introducing a `runCommandPalette` helper function to streamline command execution within the VS Code environment.
- Disabling notifications before running the tests to prevent interference.

* state change

* set TEMP_PROFILE

* v3.18.7 Release Notes

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.7

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>

* Remove optimistic loading from organization dropdown (#4746)

* update build script to javascript

* fix match

* Add mode switching to chat test

* expected

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
2025-07-16 07:29:58 +05:30
Bee e607d02ab2 Fix: pass items to showMessage in VS Code host bridge (#4949) 2025-07-15 18:14:30 -07:00
Nick Baumann b5e2916bd6 docs: Update Claude Code documentation to include Pro plans alongside Max plans (#4948) 2025-07-15 17:00:45 -07:00
Sarah Fortune 371db77007 Move the vscode specific classes into the hosts/vscode package. (#4947)
* Move the vscode specific classes into the `hosts/vscode` package.

Move the vscode specific classes VscodeDiffViewProvider and VscodeWebviewProvider in the `hosts/vscode` package.

I am doing this so that the vscode-specific code is contained in one package instead of being mixed with the code that is meant to be platform-agnostic.

This also makes it easier for us to see which parts of the codebase are still using the vscode APIs and need to be migrated, and for the linter rules
that check that vscode API calls are not reintroduced after they are migrated to the host bridge.

* Use absolute imports instead of relative
2025-07-15 16:46:58 -07:00
Sarah Fortune 80f2e9f6ea Fix bad merge (#4946) 2025-07-15 16:26:12 -07:00
celestial-vault b46d396de2 add webview type checking to check-types (#4944) 2025-07-15 16:20:07 -07:00
Sarah Fortune 8683980c90 Move the vscode hostbridge handlers into their own package (#4945)
* Move the generated files for the host bridge into the 'src/generated' directory

Move the generated index.ts and methods.ts files for the host bridge into the 'src/generated' directory

I'm doing this because when all the generated files are one in location its a) easier to see from the import statement that the code is generated, b) it's easier to change the package(s) of the generated files, and c) easier to reset/clean the build state.

* Update import path

* Move the hostbridge handlers in the a hostbridge packge.

Move the hostbridge handlers out of the top level of the vscode package into their own subpackage.
I have to move all the vscode specific code into the `hosts/vscode` package, and I want the hostbridge handlers to be grouped together, not mixed in with things like the VscodeDiffViewProvider, VscodeWebviewProvider etc.
2025-07-15 16:12:48 -07:00
Bee b916e495e6 Remove credit validation from request (#4903)
Removes the credit validation check from the `createMessage` function in `src/api/providers/cline.ts`. The `validateRequest` function, which checks if the user has sufficient credits, has also been removed from `src/services/account/ClineAccountService.ts`.

The credit validation is no longer performed before sending a message to the Cline API.

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-15 16:08:08 -07:00
Sarah Fortune d45077c4c5 Move the generated files for the host bridge into the 'src/generated' (#4942)
* Move the generated files for the host bridge into the 'src/generated' directory

Move the generated index.ts and methods.ts files for the host bridge into the 'src/generated' directory

I'm doing this because when all the generated files are one in location its a) easier to see from the import statement that the code is generated, b) it's easier to change the package(s) of the generated files, and c) easier to reset/clean the build state.

* Update import path
2025-07-15 16:00:02 -07:00
Bee 6ced4472d3 Capture provider API errors (#4936)
* Capture provider API errors

Introduces a new telemetry event to capture errors returned by API providers. This will allow us to better monitor the reliability and performance of different providers and identify potential issues.

The following changes were made:

- Added a `captureProviderApiError` method to the `TelemetryService` to record provider API errors.
- Added a new `PROVIDER_API_ERROR` event to the `TelemetryService.EVENTS.TASK` enum.
- Modified the `Task` class to capture and report provider API errors, including the error message, status code, and request ID.
- Added `extractErrorDetails` to extract the status code, message, and request ID from an error object.
- Updated `formatErrorWithStatusCode` to use `extractErrorDetails`.

* clean up

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-15 15:37:25 -07:00
Bee dcb39a77f2 Display user role in organization (#4937)
* Display user role in organization

Adds a new feature to the Account View that displays the user's role within the currently selected organization.

- Added a `getMainRole` function to determine the user's primary role (Owner, Admin, or Member) based on the roles array.
- Display a VSCodeTag component showing the user's role next to the organization dropdown.
- Updated the organization dropdown to use className instead of style for width.

* changeset

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-15 15:36:47 -07:00
Sarah Fortune 3301577934 Add diff.replaceText to the host bridge. (#4879)
Update the diff service to use a unique id to track open diff editor in external platforms.
Store the diff Id in the ExternalDiffViewEditor when the diff is opened. It will serve the same purpose as the activeDiffEditor property on vscode, it can be used to manipulate the diff editor tab.
Add the implementation of replaceText in the ExternalDiffViewEditor.
2025-07-15 14:50:23 -07:00
Bee a36c11eb97 Remove state parameter from auth callback (#4845)
* Remove state parameter from auth callback

Removes the state parameter that contains auth nonce and the associated logic.

The state parameter which contains the auth nonce in the auth callback doesn't work with multi-windows as each window contains its own nonce. As the provider parameter is sufficient to identify the auth provider we could remove the auth nonce to avoid complications.

* remove authNonce

* changeset

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-16 01:20:51 +05:30
Sarah Fortune 7d1f199883 Move the generated file hosts/vscode/host-grpc-service-config.ts in the src/generated directory. (#4938)
Rename some of the methods in the build-protos script to be more readable.
2025-07-15 12:39:21 -07:00
Sarah Fortune 6a1e0e518b Move the build-proto script into the scripts directory (#4935)
* Move the build-protos script into the scripts directory.

* Reorder imports
2025-07-15 12:04:04 -07:00
pashpashpash 004b313d20 Update diff edit evals README.md (#4920)
* Update README.md

* Update README.md
2025-07-16 00:17:14 +05:30
Saoud Rizwan bf37bfa7a3 Add vision capability to moonshot v1 (#4926) 2025-07-15 04:15:39 -07:00
github-actions[bot] e6dbde70a9 v3.19.4 Release Notes (#4925)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-15 03:57:26 -07:00
Saoud Rizwan cb9a339442 Add ability to choose chinese endpoint for Moonshot provider (#4924)
* Add ability to choose chinese endpoint for Moonshot provider

* Create fluffy-planes-prove.md
2025-07-15 03:33:17 -07:00
github-actions[bot] 47b5df14d7 v3.19.3 Release Notes (#4917)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-15 01:32:06 -07:00
Saoud Rizwan 4ecbecb1e2 Add Moonshot AI provider (#4913)
* Add Moonshot AI provider

* Create little-pens-switch.md
2025-07-15 01:16:45 -07:00
github-actions[bot] fadaf00835 v3.19.2 Release Notes (#4910)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-14 22:19:20 -07:00
Bee 575cfd48cc Includes request ID in error returned by Cline API (#4909)
* Includes request ID in error returned by Cline API

Adding the request ID to error messages to aid in debugging for users.

* Use constant for auth error message; revert change from previous PR

* Fix webview auth status if null/undefined user is passed in auth status message

* Create nasty-parents-play.md

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-14 22:16:50 -07:00
Saoud Rizwan a0787e3d36 Release Version v3.19.1 (#4908) 2025-07-14 21:51:24 -07:00
Nidelson Gimenez c9b922009f docs: improve documentation (#4863)
* docs: fix typo

* improved clarity in the local development instructions

* Update CONTRIBUTING.md

* Create wise-hairs-grow.md

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-14 21:42:06 -07:00
github-actions[bot] 2d6ff38e69 v3.18.15 Release Notes (#4890)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-14 21:01:12 -07:00
Saoud Rizwan 3069e27413 Add groq to kimi providers (#4906)
* Add groq to kimi providers

* Create fair-glasses-lick.md
2025-07-14 20:54:34 -07:00
Saoud Rizwan 57c8b8120d Revert "pass linter errors with read_file (#4159)" (#4905)
This reverts commit 5e2b199377.
2025-07-14 20:18:19 -07:00
Saoud Rizwan 5243f0b9b1 Set default kimi provider to together (#4904) 2025-07-14 19:49:45 -07:00
celestial-vault c014060275 remove unused ExtensionStateContext setters (#4865) 2025-07-14 18:35:54 -07:00
celestial-vault d790ce86a0 Add markdown parsing to MCP responses (#4862)
* refactor out useEffect logic

* add markdown parsing to mcp response

* add display mode to global state; simplify state flow

* fix imports after merge conflicts
2025-07-14 18:17:14 -07:00
celestial-vault 5e2b199377 pass linter errors with read_file (#4159)
* pass linter errors with read_file

* changeset

* add code back after merge with main
2025-07-14 16:49:37 -07:00
celestial-vault 9234d0cdc4 [McpResponseDisplay] Refactor out useEffect logic to helper function (#4852)
* refactor out useEffect logic

* refactor: memoize renderSegment with useCallback
2025-07-14 15:29:50 -07:00
Sarah Fortune db1db8c95d Change the name of the cline core script from standalone.js to cline-core.js (#4894)
Update the name of the script so that you can tell from the process name what it is,
standalone.js is too vague to be able to associate it with cline.
2025-07-14 15:22:11 -07:00
Sarah Fortune f53af72643 Update the vscode usages script to separate out vscode.commands.executeCommand calls. (#4891)
vscode.commands.executeCommand runs other vscode commands, so we need the know which commands are being run.
2025-07-14 15:21:27 -07:00
Massimiliano Angelino 260e0d5f8e feat: adding Bedrock Api Keys support (#4728) 2025-07-15 00:19:58 +05:30
celestial-vault 5b68ee5523 Add kimi-k2 as trending model (#4889)
* add kimi k2 as trending model

* changeset

* adjust wording
2025-07-14 11:21:26 -07:00
Ara 3e5abd5e72 Removing reasoning UX for Grok 4 models and correct pricing (#4849)
* Removing reasoning UX for Grok 4 models and correct pricing

* More resiliency
2025-07-13 17:36:41 -07:00
Sarah Fortune 1ba5873454 DiffViewProvider refactoring for the host bridge (#4877)
* DiffViewProvider refactoring.

Move the platform specific logic for updating the diff out of DiffViewProvider and into VscodeDiffViewProvider.replaceText().
Add a stub handler for replaceText in the ExternalDiffviewProvider.

* Add comment to replaceText()

* Update src/integrations/editor/DiffViewProvider.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-13 16:28:09 -07:00
Sarah Fortune 1bdaf8ef6f Implement openDiffEditor in the ExternalDiffViewProvider (#4875)
Use the host bridge to open the diff view.
2025-07-13 14:43:33 -07:00
pashpashpash 7f6038c74e better balance display (#4867) 2025-07-12 20:36:19 -07:00
Sarah Fortune 2fd9635b97 Add a vscode specific DiffViewProvider, and one for external platforms. (#4866)
* Add a vscode specific DiffViewProvider, and one for external platforms.

Make the DiffViewProvider class abstract, with two implementations the VscodeDiffViewProvider and the ExternalDiffViewProvider.
Move the vscode specific code to open the diff view into VscodeDiffViewProvider.openDiffEditor. The ExternalDiffViewProvider will use the host bridge to open the diff view.
Add a way to get the correct DiffViewProvider for the platform to the host provider.

Right now, there is only platform specific logic for `open`, the other functions like `scroll` and `replaceText` will be added in a follow up PR. The end-state will look like [this](https://github.com/cline/cline/compare/main...sjf-gg), but it's easier to test and review each part separately.

* In the VscodeDiffViewProvider, use the previous way of getting the open diff editor, before it was switched to the host bridge.

Using the host bridge doesn't help here, because we really need a reference to the actual vscode text editor document, which the host bridge can't return. So, it was doing openDocument, and then immediately using the vscode SDK to get the editor reference. When, really the diff editor was already open, and we only need the editor reference.
2025-07-12 12:45:57 -07:00
Sarah Fortune 568b834338 Add DiffService to the host bridge. (#4841)
* Add DiffService to the host bridge.

Add a new diff service with a method to open the diff view for a file.
On vscode, we will not use the hostbridge for opening the diff editor, so the vscode handler just throws an error.

* Update diff.proto

* Fix proto import
2025-07-12 12:43:55 -07:00
github-actions[bot] 381e9b9d1f v3.18.14 Release Notes (#4857)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-12 02:47:50 -07:00
Saoud Rizwan d86861629d Fix re-sign in flow (#4856)
* Fix re-sign in flow

* Fix AuthState user representation to webview to fix issue where invalid auth was still showing as logged in

* Fix comments

* Create stale-peas-give.md
2025-07-12 02:45:18 -07:00
github-actions[bot] 7fb10ba053 v3.18.13 Release Notes (#4846)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-12 02:03:43 -07:00
Saoud Rizwan b7ca95ed57 Replace firebase user object session logic with google endpoint to get id token and custom jwt validation (#4853)
* Replace firebase user object session logic with google endpoint to get id token and custom jwt validation

* Add comments

* Update src/services/account/ClineAccountService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Create green-drinks-rest.md

* Remove signOut

* Ensure that refresh token is passed properly in params

* Name function better and add comment; fix org switch logic

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-12 02:00:52 -07:00
Saoud Rizwan 6bd8726dd6 Saoudrizwan/show resignin button (#4855)
* Show sign in button when cline account shows auth error

* Add comment
2025-07-12 01:00:42 -07:00
Saoud Rizwan 347d4f48da Remove cancelReason when retrying request to show the proper animation in ChatRow (#4854) 2025-07-12 00:59:44 -07:00
canvrno baa5aaa0a7 git branch analysis workflow (#4717) 2025-07-11 17:46:46 -07:00
Bee 16f066dcbf Host bridge migration: showErrorMessage, showInformationMessage, showWarningMessage (#4745)
* host bridge migration: showErrorMessage & showInformationMessage & showWarningMessage

Introduces the `showMessage` host API to the VS Code extension, allowing the host to display informational, warning, and error messages to the user.

The changes include:

- A new `ShowMessageRequest` and `SelectedResponse` message definition in `proto/host/window.proto` to define the request and response structure for showing messages.
- A new file `src/hosts/vscode/window/showMessage.ts` that implements the `showErrorMessage`, `showInformationMessage`, and `showWarningMessage` functions. These functions use the VS Code API to display messages based on the `ShowMessageRequest`.
- Replace all current call sites with the new implementations

* define the request structure

This commit introduces the `showErrorMessage`, `showInformationMessage`, and `showWarningMessage` host APIs to the VS Code extension. These APIs allow the host to display informational, warning, and error messages to the user.

The changes include:

- Added `ShowErrorMessageRequest`, `ShowInformationMessageRequest`, and `ShowWarningMessageRequest` message definitions in `proto/host/window.proto` to define the request structure for showing messages.
- Added new files `src/hosts/vscode/window/showErrorMessage.ts`, `src/hosts/vscode/window/showInformationMessage.ts`, and `src/hosts/vscode/window/showWarningMessage.ts` that implement the corresponding functions. These functions use the VS Code API to display messages based on the provided message and options.

* Simplify showMessage functions and use options array

The `showErrorMessage`, `showInformationMessage`, and `showWarningMessage` functions in `src/hosts/vscode/window/` have been refactored for simplification.

- The functions now directly destructure the `modal`, `detail`, and `items` properties from the input object.
- The VS Code API calls now directly pass the `modal` and `detail` options, and use the spread operator to pass the `items.options` array as additional arguments. This removes the need for conditional logic to construct the options object.

* wip: apply feedback

* Update src/integrations/git/commit-message-generator.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* merge conflict

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-11 17:29:01 -07:00
celestial-vault 59f42c7a81 [AccountView] - Default balance to dashes (#4844)
* default balance to dashes

* changeset

* add balance formatter
2025-07-12 05:55:47 +05:30
celestial-vault 3a86938a56 pass extension version in headers (#4843) 2025-07-11 16:16:23 -07:00
Sarah Fortune 042bf359a9 DiffViewProvider refactoring for the host bridge (#4836)
* DiffViewProvider refactoring

Move the vscode specific code to setup and open the diff view editor into `openDiffEditor`.

* Change openDiffEditor to return void instead of returning a vscode specific editor type
2025-07-11 14:18:26 -07:00
Bee 17200740a8 Trigger auth status update on secret storage change (#4837)
* Trigger auth status update on secret storage change

The auth status should be updated when the clineAccountId secret changes. This commit adds a listener to the secrets.onDidChange event and calls sendAuthStatusUpdate when the clineAccountId secret changes. This ensures that the auth status is always up-to-date.

* restore

* afgain

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-11 12:53:24 -07:00
Sarah Fortune c38f443ec4 DiffViewProvider clean-up (#4835)
* In the DiffViewProvider, store the absolutePath instead of the cwd.

Remove unused var `scrollListener`.

* Remove cwd param

* Don't call getCwd in a loop
2025-07-11 10:49:13 -07:00
github-actions[bot] 13f1f0d44b v3.18.12 Release Notes (#4819)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.12

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-10 19:50:20 -07:00
pashpashpash 30a169e0c3 supporting buy_credits_url response from backend (#4823) 2025-07-10 19:33:25 -07:00
Ara 77ab7f8ef9 Fix the flaky Cline provider switching toggle (#4791)
* Fix Flaky Cline provider toggle

* More resiliency
2025-07-10 19:32:19 -07:00
akfoster 6d5ea98026 fix: insufficient credits display (#4821)
* fix: insufficient credits display

* add changeset

* Update src/api/providers/cline.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-10 19:21:59 -07:00
Sarah Fortune 1879798b68 Remove unused vars from the DiffViewProvider (#4818)
Remove `lastFirstVisibleLine`, this value is set, but never read.
Remove `shouldAutoScroll`, this is always true.
2025-07-10 16:10:13 -07:00
Bee 3ed47fba17 Request validation and remove credit balance for cline team (#4817)
* Fix: Ensure Cline client is initialized with the latest auth token

The Cline client was not being re-initialized with the latest authentication token after the user signs in. This resulted in the client using an outdated or non-existent token, leading to authentication errors when making API requests.

This commit ensures that the Cline client is initialized with the most recent authentication token by setting the `apiKey` property of the `OpenAI` client instance to the current auth token retrieved from `AuthService` before every request. This guarantees that the client always uses the valid and up-to-date token for authentication.

* changeset

* move this._authService.getAuthToken() to ensureClient

* Request validation and remove credit balance for cline team

Add request validation for Cline API requests and fix the user interface for displaying credit-related information in UI.

The changes include:

- **Credit Balance Validation:** Implemented `validateRequest` method in `ClineAccountService` to check user's credit balance before making API requests.  Requests from active organizations are skipped. An error is thrown if the balance is insufficient.
- **Error Handling:** Improved error handling in `ClineHandler` to provide more informative error messages to the user.
- **UI Enhancements:**
    - Updated `CreditLimitError` component to display the current balance that matches the account view balance format (4 decimal places).
    - Modified `ChatRow` to parse error messages and display the `CreditLimitError` component when applicable.
    - Updated `AccountView` to only display credit balance for user accounts, not organization accounts.
    - Removed unused props from `CreditLimitError` component. Context: https://cline-space.slack.com/archives/C08KYBFL9DJ/p1752182278852399?thread_ts=1752164726.247429&cid=C08KYBFL9DJ
- **Dependencies:** Updated dependencies in `webview-ui` to include `tailwindcss` and configured `tailwind.config.js` to support VSCode theme variables.

* changeset

* Update src/api/providers/cline.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 15:58:13 -07:00
Sarah Fortune 439e99d8d1 Fix script that packages the standalone zip. (#4816)
The vscode packager VCE has different logic that the npm module `ignore`, so it was not including the same files as VCE.

Just copy how VCE uses the .vscodeignore file in the packaging script.

Fix the ignore for demo.gif, it was still getting included because it was only matching demo.gif at the top level.
Also ignore .github and .husky.
2025-07-10 15:57:22 -07:00
github-actions[bot] 8de99c90a6 v3.18.11 Release Notes (#4814) 2025-07-10 13:49:09 -07:00
Bee 5b475fe88c Fix: Ensure Cline client is initialized with the latest auth token (#4813)
* Fix: Ensure Cline client is initialized with the latest auth token

The Cline client was not being re-initialized with the latest authentication token after the user signs in. This resulted in the client using an outdated or non-existent token, leading to authentication errors when making API requests.

This commit ensures that the Cline client is initialized with the most recent authentication token by setting the `apiKey` property of the `OpenAI` client instance to the current auth token retrieved from `AuthService` before every request. This guarantees that the client always uses the valid and up-to-date token for authentication.

* changeset

* move this._authService.getAuthToken() to ensureClient

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-10 13:13:30 -07:00
Bee 190d3bd2dc Fix: Improve auth flow and state validation (#4786)
Improves the authentication flow and state validation process.  We no longer reset the auth nounce after each sign in as AuthService is a singleton and there is no risk of nonce collision between different users as only one user can be signed in at a time.

Changes:
    - The `authNonce` is now generated once during `AuthService` instantiation and stored as a read-only property. This ensures that the nonce remains consistent throughout the authentication process.
    - The `resetAuthNonce` method has been removed, as the nonce is no longer meant to be reset.
    - The `createAuthRequest` method now uses the URL object for more graceful query construction.
- **Controller:**
    - The `validateAuthState` method has been simplified to directly compare the provided state with the stored `authNonce`.
- **Extension:**
    - The extension now prompts the user for confirmation if the state parameter in the auth callback does not match the stored `authNonce`. This allows sign-ins initiated from outside the extension (e.g., Cline web) to be handled correctly.

Issue: The issue is that the authNonce is being reset in the validateAuthState method in the Controller, but the extension.ts is directly accessing authService.authNonce without going through the validation method. This creates a race condition where:

User initiates auth, nonce is generated
Auth callback comes back with the state
If there are multiple auth attempts or the callback is processed multiple times, the nonce might be reset before the validation in extension.ts happens
User gets "Invalid auth state" error

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-10 21:53:36 +05:30
github-actions[bot] d0069eb7cb Changeset version bump (#4785)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.9 with improved descriptions

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for version 3.18.10

* ahugosaia'ohs'gasgh

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-10 00:05:06 -07:00
pashpashpash 268bbec7f1 recommend grok 4 (#4798)
* recommend grok 4

* changeset
2025-07-09 23:42:04 -07:00
pashpashpash 192cd2602e Pashpashpash/grok 4 (#4793)
* grok 4

* numbers
2025-07-09 23:36:06 -07:00
Andrei Eternal c724edd118 Replace use of vscode.fs.writeFile with node equivalent (#4790)
* Replace use of vscode.fs.writeFile with node equivalent

* format fix

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-07-09 18:11:47 -07:00
celestial-vault 0eaf350d87 Provider handler param types (#4729)
* add provider handler options types and only pass those fields when building

* field was removed in merge, remove it
2025-07-09 16:33:27 -07:00
Ara 398bc87a64 Adding Thinking Token Config to Gemini 2.5 pro model and adding gemini 2.5 flash preview (#4668)
* Adding Thinking Token Config to Gemini 2.5 pro model

* Adding Thinking Token Config to Gemini 2.5 pro model

* Adding console logs

* Adding console logs

* Adding console logs
2025-07-10 03:42:07 +05:30
github-actions[bot] 0ec447c992 v3.18.9 Release Notes (#4783)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.9 with improved descriptions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-09 14:44:25 -07:00
pashpashpash ba41131b36 Pashpashpash/enabling streaming cline (#4784)
* grok 4

* fixing streaming in cline provider

* removing grok promo from cline provider

* changeset

* oopsie

* oopsie
2025-07-09 14:33:55 -07:00
Bee 0042230acd Handle authentication errors for Cline provider (#4781)
* Fix: Cline authentication errors

This commit improves error handling for Cline authentication. It adds checks for the presence of a Cline account authentication token before making API requests. If the token is missing, it throws an "Unauthorized" error, prompting the user to sign in. Additionally, it catches `ERR_BAD_REQUEST` or 401 errors from the Cline API and throws the same "Unauthorized" error, providing a more user-friendly experience when authentication fails.

* add changeset

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-10 02:15:27 +05:30
ncrypted | Oliver 9ff705ffc0 Remove: Pricing for SAP AI Core Provider (#4778)
* remove: pricing for sapaicore

* add: model description hint regarding capacity unit pricing
2025-07-09 10:38:16 -07:00
Dennise Bartlett dea016408c Update Changelog and Versions (#4751) 2025-07-08 20:13:37 -07:00
Frostbourne bf82444aec grok 3 cache pricing (#4750) 2025-07-08 19:59:17 -07:00
github-actions[bot] 988b65f1ad v3.18.7 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.7

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-08 18:41:16 -07:00
Dennise Bartlett d838bcdc34 Fix account buttons (#4742)
* Update links for account buttons

* add dashboard url

* setup links for future changes

---------

Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
2025-07-08 17:56:38 -07:00
pashpashpash ff1e3297a8 ending grok promo in UI (#4740)
* ending grok promo in UI

* changeset
2025-07-08 17:30:06 -07:00
github-actions[bot] 2428389620 v3.18.6 Release Notes
v3.18.6 Release Notes
2025-07-08 16:16:52 -07:00
Dennise Bartlett 6f8627bb5f Organization Accounts added to Extension. Refactor Auth components for Accounts
* Working organization and personal inference, account switching, and usage/credit reporting.

* Organization dropdown tweaks (#4710)

* organization dropdown tweaks

* reverted AuthService

* Update Firebase Provider and Auth Service to support re-hydration of the user credentials

* Add Github Auth Flow

* Fix merge conflicts

* Fix some dumb typing

* recreate dropdown value when initialized (#4716)

* added changeset

* Update urls to production and handle some PR concerns

* Get user credits when signing in (#4736)

* get user balance when signing in instead of when there is no active org

* swapped order of getUserCredits, made calls async

* async changes continued, moved setIsLoading to finally

---------

Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
2025-07-08 15:59:08 -07:00
Bee 1e81d98abf Fix fresh install mode launch config (#4732)
* Fix fresh install mode launch config

Updates the launch configuration in `.vscode/launch.json` to include a temporary profile and user data directory. This fixes the issue where the launch config does not start in fresh install mode for extension development. This change prevents  interference from existing settings and extensions. The `--user-data-dir=/tmp/cline/user` argument specifies a temporary directory for user data, while `--profile-temp` ensures a clean profile is used for each launch. Also, `--sync=off` is added to disable settings sync.

* update name

* tmp dir

* Implement in-memory storage for temporary profiles

Adds in-memory storage for global state, workspace state, and secrets when running in a temporary profile. This is determined by the `TEMP_PROFILE` environment variable being set to "true". When active, the `updateGlobalState`, `getGlobalState`, `updateGlobalStateBatch`, `updateSecretsBatch`, `storeSecret`, `getSecret`, `updateWorkspaceState`, and `getWorkspaceState` functions will use `Map` objects to store and retrieve data instead of VS Code's `globalState`, `secrets`, and `workspaceState` APIs. This ensures that no data is persisted to disk when using a temporary profile, providing a clean environment for testing and development.

* Refactor tmp user directory for dev launch config

This commit refactors the temporary user directory used in the development launch configuration.

- Updates `.vscode/launch.json` to use `${workspaceFolder}/dist/tmp/user` for the `--user-data-dir` argument, ensuring the temporary profile is located within the workspace.
- Adds `TEMP_PROFILE: "true"` to the environment variables in `.vscode/launch.json` to enable in-memory storage for temporary profiles.
- Renames the `clean-sandbox` task in `.vscode/tasks.json` to `clean-tmp-user` and modifies its command to remove and recreate the `${workspaceFolder}/dist/tmp/user` directory. This ensures a clean environment for each launch.

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2025-07-08 15:05:11 -07:00
Sarah Fortune 267170920a Update the packaging script for the standalone app to include the same files as the extension in the zip (#4708)
* Package the same files for the standalone app and the extension

When packaging the standalone app use the same .vscodeignore that the vscode packager uses to decide which files to include.
Exclude extra files from the vscode extension that aren't needed: dist-standalone, old_docs and eslint-rules.

* Ignore the whole directory, not just the contents.

* Don't package .DS_Store files

* Update comment
2025-07-08 11:16:49 -07:00
Sarah Fortune 386c78c114 Update the no-vscode-postmessage eslint rule to check for any of the vscode SDK calls that have been replaced (#4715)
* Update the no-vscode-postmessage eslint rule to check for all the vscode SDK calls that have been replaced.

Expand the rule to check for all of the vscode SDK calls that have been
switched to the host bridge or replaced with native functions.

* Remove redundant messages
2025-07-08 10:50:10 -07:00
Sarah Fortune 265a56391a Replace vscode.workspace.fs.stat with fs.stat (#4714)
Use the util function that already exists isDirectory from utils/fs.ts
Use the same function in getRelativePaths
2025-07-08 10:49:56 -07:00
canvrno ff4bab22fb host bridge migration - openExternal (#4502) 2025-07-08 10:47:12 -07:00
tjandy98 bc468707a6 Add header for SAP AI Core Tracking (#4696)
* Add support for Gemini 2.5 Pro and Flash models

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

* Create calm-ads-glow.md

* Update request header

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

Add ai-client-type header for tracking

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

Create little-lions-joke.md

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

update changeset

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

update

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

---------

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
2025-07-07 21:09:41 -07:00
Sarah Fortune 0a6a565d41 Replace vscode.workspace.asRelativePath with the host bridge. (#4712)
* Replace vscode.workspace.asRelativePath with the host bridge.

Add a util function asRelativePath to path.ts that does the same thing as the vcode API (returns the path relative to the workspace directory).
In the getRelativePaths protobus handler, don't allow @mentions for files outside the workspace, they do not work in cline, so just prevent them from being added at all.
If the fs.stat fails for a file, don't @mention it either, if stat() fails it means the file doesn't exist or is unreadable.

* Update src/core/controller/file/getRelativePaths.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/core/controller/file/getRelativePaths.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-07 19:40:14 -07:00
github-actions[bot] d30e4d0194 v3.18.5 Release Notes (#4704)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-07 19:12:41 -07:00
Ara d453eed582 feat: Globally persist plan/act mode across sessions and ensure proper workspace level persistance of chatsettings(for language) (#4646)
* feat: Persist plan/act mode across sessions

- Add mode persistence to global state storage
- Load saved mode on controller initialization
- Update state keys to include 'mode' as a valid global state key
- Ensures user's selected mode (plan/act) is maintained between VS Code sessions

* Split chat settings storage between global and workspace state
- Move mode setting to global state for cross-workspace persistence
- Store other chat settings in workspace state for project-specific configuration
- Update state retrieval logic to merge global mode with workspace settings
- Add chatSettings to LocalStateKey type definitions

* Code Cleanup

* Code Cleanup

* Get the chatsettings back to global

* Get the chatsettings back to global

* Get the chatsettings back to global

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-07 18:23:41 -07:00
Ara 7e32314c0b Optimize provider switching performance with batched storage operations (#4676)
* Optimize provider switching performance with batched storage operations

* Optimize provider switching performance with batched storage operations
2025-07-07 18:20:55 -07:00
Ara cce8f09ae5 Fixing bug on accepting tool response (#4675) 2025-07-07 18:19:50 -07:00
Bee 0262e13ac4 Capture token usage for conversation turns in telementry (#4703)
Adds capture of token usage data for conversation turns in the telemetry service. This includes tokensIn, tokensOut, cacheWriteTokens, cacheReadTokens, and totalCost.

The changes involve:

- Modifying the `captureConversationTurnEvent` method in `TelemetryService.ts` to accept and include token usage data in the captured event properties.
- Updating the `Task` class in `src/core/task/index.ts` to pass token usage information when capturing conversation turn events. This ensures that token usage is tracked for both regular and cached responses.
- Refactor capture event to use object destructuring for easier readability

Co-authored-by: Beatrix Woo <beatrix@cline.bot>
2025-07-08 04:54:06 +05:30
celestial-vault 6d2cf55fc5 migrate download MCP response to proto (#4682) 2025-07-07 14:58:49 -07:00
Sarah Fortune 3577c2efa9 Remove uri service from the host bridge. (#4660)
It is being replaced with the npm module vscode-uri.
2025-07-07 14:27:19 -07:00
Sarah Fortune f97ef745d9 Replace vscode.workspace.getWorkspaceFolder() with the host bridge (#4659)
* Replace vscode.workspace.getWorkspaceFolder() with the host bridge

Use the hostbridge getWorkspacePaths() and use the result to
check for the workspaceFolder of the current file open in the IDE.

* Organize imports

* Update isLocatedInWorkspace() to check all the workspace directories, not just the first.

Add utility function to check if a path is inside a directory instead of duplicating the logic.

* Remove stubs for workspaceFolders that are not needed anymore.
2025-07-07 14:23:26 -07:00
schardosin 4e27e06670 SAP AI Core small bug fix and reorder models (#4686)
* small fix to avoid exception and removed log of returned data

* reorganized sapaicore models to be grouped in logical groups

* updated changese with changes in SAP AI Core

* removed additional received data log sections
2025-07-07 15:44:27 -05:00
github-actions[bot] ef02d6b0b2 Changeset version bump (#4685)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update package.json

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-07 13:26:11 -07:00
celestial-vault 7ab6189595 mark welcomeViewCompleted as true after auth redirect (#4699)
* mark welcomeViewCompleted as true after auth redirect

* Create real-ravens-nail.md

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-07-07 13:14:48 -07:00
celestial-vault 4beaa2a086 sync local search state after timeout (#4698) 2025-07-07 11:16:08 -07:00
Ara 5f90018ab5 Revert "remove blur (#4664)" (#4677) 2025-07-06 12:05:30 -06:00
celestial-vault 9e761cd1f0 lazily initialize provider sdks with error catching (#4661) 2025-07-06 11:41:16 -05:00
吴天一 e84f2ff962 remove blur (#4664) 2025-07-06 00:13:23 -05:00
tjandy98 1842254c57 Add support for Gemini 2.5 Pro and Flash models to SAP AI Core Provider (#4655)
* Add support for Gemini 2.5 Pro and Flash models

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

* Create calm-ads-glow.md

---------

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
2025-07-05 12:10:00 -05:00
pashpashpash 4a2dad4552 showOpenDialogue host bridge migration (#4651)
* showOpenDialogue host bridge migration

* addressing comments

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-03 22:55:19 -07:00
Sarah Fortune 3248c37358 Replace uses of vscode workspaceFolders with host bridge (#4649)
* Instead of getting the cwd from the workspaceFolders use the host bridge util getCwd()

Replace uses in integrations/claude-code/run.ts

* Organize imports
2025-07-03 15:53:53 -07:00
Sarah Fortune 172b46f1b0 Remove unused files *.bak (#4648)
* Remove unused file Checkpoint-test-utils.ts.bak

* Remove all .bak files from src/integrations
2025-07-03 15:36:21 -07:00
Sarah Fortune 9578d7cde1 Instead of getting the cwd from the workspaceFolders use the host bridge util getCwd() (#4647)
Remove top-level property cwd task, await can't be used at the top level.
Make cwd a class property, and pass the cwd into the constructor of task (await can't be used in the constructor either).
2025-07-03 15:36:08 -07:00
Sarah Fortune 2979d47e01 Replace cwd from the workspaceFolders with the host bridge. (#4645)
Don't export cwd from task/index.ts. This top-level property cwd will be removed in a following PR because await cannot be used at the top-level.
Use the hostbridge util getCwd() in createRuleFile.ts and refreshRules.ts instead of import the cwd from `task`.
Add a util function to get the desktop directory instead of constructing it multiple places, update uses with the new function getDesktopDir()
Replace function getCwd in FileContextTracker.ts with just getCwd from paths.ts.
2025-07-03 15:08:52 -07:00
github-actions[bot] 4569300f00 v3.18.3 Release Notes (#4644)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.18.3

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-03 15:06:57 -07:00
Toshii 36e3f4cdd3 add log + run options (#4630)
* log + options

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-03 14:54:10 -07:00
Tomás Barreiro bc5225ce52 Improve Claude Code handling (#4619)
* Prevent filling the chat with error messages

* Improve env variables and remove the magic number

* Add changeset

* refactor

* Update run.ts

---------

Co-authored-by: Ara <arafat.da.khan@gmail.com>
2025-07-03 14:41:59 -07:00
Kevin Taylor 50dc89b551 Strip thinking tokens from Cerebras reasoning model inputs (#4635)
* Strip thinking tokens from Cerebras reasoning model inputs

Filter out thinking tokens in message history

* changeset

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-03 14:40:58 -07:00
celestial-vault d576b68cca Move plan/act model settings to global storage (#4636)
* move model settings to global storage

* cleanup

* only run migration if globalState key is undefined
2025-07-03 16:24:14 -05:00
github-actions[bot] 6c2c0780ee v3.18.2 Release Notes (#4581) 2025-07-02 22:15:45 -07:00
pashpashpash 021a014012 setting claude 4 as best model (#4637)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-02 21:45:30 -07:00
Ara ef1a68b5e3 Adding a troubleshooting guide for terminal problems (#4592) 2025-07-02 19:08:42 -07:00
Tomás Barreiro 72029fe205 feat: Introduce Thinking Budget customization for Claude Code (#4618) 2025-07-03 06:37:32 +05:30
celestial-vault 2af151e736 [SettingsView] [ApiConfig Section] save on change (#4554)
* refactor out apiconfig section

* add general settings section

* duplicate import

* move terminal, browser, and feature settings

* move files to sections folder

* refactor out debug section

* pull out about section

* implement save on change and remove confirmation modals for api config section

* add doc strings to new hook functions

* add debounced text field for smooth typing

* use context value directly for apiProvider dropdown value; remove unecessary memo; remove keys from ApiOptions

* add welcomeViewCompleted state boolean to control welcome view showing

* refactor other sections to save-on-change; remove form diff calculation logic

* cleanup

* remove memo

* make welcomeViewCompleted context value initial value false
2025-07-02 19:39:49 -05:00
canvrno 64963c4e9c confirmation popup when deleting tasks (#4627) 2025-07-01 22:41:58 -07:00
Toshii 52571ccee8 base (#4600) 2025-07-01 17:08:28 -07:00
Saoud Rizwan 87322feeb7 Fall back to getting current terminal content when shell integration API fails to return output (#4605)
* Revert to when terminal process worked more reliably

* Get last terminal output if no output is retrieved

* Fix getting terminal output for when shell integration unavailable

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert removing previous changes

* Update TerminalProcess to emit current terminal contents instead of a silent command completion message

* Revert when first chunk fails message

* Revert error title

* Fixing tests with fake timers

---------

Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-01 16:57:36 -07:00
kevinneung 27f8372c5b add cline.walkthrough to command handler (#4621)
added cline.walkthrough to command handler, since it would throw an error otherwise
2025-07-02 05:20:02 +05:30
Sarah Fortune b3d3e9861f Use the host bridge to get the cwd in autoApprove.ts (#4601)
Update the ToolExecutor to use await because the approval is now async.
2025-07-01 16:01:33 -07:00
pashpashpash 01178909ee adding unique remote git urls to context on first message env variables (#4622)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-01 15:15:10 -07:00
Sarah Fortune c982216113 Cleanup: Remove unused property and param postMessage from ClineAccountService (#4620)
* Remove unused property and param postMessage

* Remove unused property and param postMessage

Remove unused import.
2025-07-01 14:44:41 -07:00
Sarah Fortune da6f705df2 Remove unused file get-python-env.ts (#4604) 2025-07-01 14:06:14 -07:00
Ara c7548a7f52 Fixing Bugs in ChatView with Primary/Secondary Buttons and related issues (#4553)
* Splitting chat view into multiple modular files

* Adding Comments and removing redundancies

* Fixing Bugs in ChatView with Primary/Secondary Buttons and related issues

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-07-01 12:58:18 -07:00
Tomás Barreiro e5f78a0456 Do not read auth variables from the user env when using Claude Code (#4591) 2025-07-01 12:09:58 +05:30
Sarah Fortune 4b5b090b29 Remove unused param cwd (#4602) 2025-06-30 20:28:40 -07:00
Sarah Fortune 559eba5dd1 Cleanup: Remove unused params from the ToolExecutor constructor. (#4588)
Organize imports.
2025-06-30 18:55:19 -07:00
Andrei Eternal c013b4f329 [PROTOBUS] showTextDocument host bridge (#4586)
* showTextDocument host bridge

* format fix

* sjf review cleanups

* prefer paths over URI based on chats with sjf

* also document_uri -> document_path

* remove unused metadata import

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-06-30 18:39:09 -07:00
Jorge García Rey dcf91b081e [LiteLLM] Group multiple requests into a single session using litellm_session_id parameter (#4457)
* feat: add litellm_session_id as part of chat completion request

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* chore: add changeset

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

---------

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
2025-06-30 17:55:22 -07:00
pashpashpash 9ab0cc7648 deleting mermaid prompts (#4596)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-30 17:52:25 -07:00
pashpashpash add572cc12 fixing closing telemetry banner (#4597)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-30 17:37:28 -07:00
pashpashpash 307b92862b deprecating latex support (#4595)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-30 17:06:58 -07:00
Toshii 020ae3006e adding distance metric safety check to the block-apply, for eval (#4477)
* diff apply add

Co-authored-by: chi.cat <git@chi.cat>

* fname

* integrate

* optionally save locally

* other cli

* name

* default

* return replacements with match type

* baseline -1

* baseline for evals

* work

* more info

---------

Co-authored-by: chi.cat <git@chi.cat>
2025-06-30 16:11:31 -07:00
Sarah Fortune c6d91be721 Replace vscode workspaceFolders with getCwd which uses the host bridge. (#4593) 2025-06-30 16:07:48 -07:00
Sarah Fortune 4d2fec787e Replace uses of workspaceFolders from the vscode SDK with the host bridge (#4589)
* Switch openMention to use getCwd instead of using the vscode SDK directly.

* Use getCwd in services/test/TestServer.ts instead of using the vscode SDK.

Don't get the cwd from the controller extension context global state,
use the workspace folder as the rest of the codebase is doing.

Replace GitHelper.getWorkspacePath with utils.getCwd()

* Use host bridge getWorkspacePaths in services/test/TestMode.ts

-instead of using the vscode SDK.
Remove unsed param `context`

* Remove unused file CheckpointTracker-old.ts

* Use hostbridge getCwd in CheckpointUtils.ts and message-state.ts
2025-06-30 14:54:36 -07:00
Sarah Fortune c8b05cdf9c Remove unused property postMessageToWebview from Task (#4587)
Cleanup imports.
2025-06-30 14:03:41 -07:00
Ara 9e69576fb0 Splitting chat view into multiple modular files (#4569)
* Splitting chat view into multiple modular files

* Adding Comments and removing redundancies

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-30 13:55:25 -07:00
Toshii e6760ed6cc race (#4583) 2025-06-30 11:33:00 -07:00
celestial-vault 27a531c86a [SettingsView.tsx] Extract About Section (#4537)
* refactor out apiconfig section

* add general settings section

* duplicate import

* move terminal, browser, and feature settings

* move files to sections folder

* refactor out debug section

* pull out about section
2025-06-30 10:47:18 -07:00
Lize Cai 09c773bd5f Add Claude 4 model to SAP AI Core Provider (#4418)
* add claude 4 support to sap aicore

Signed-off-by: Lize Cai <lize.cai@sap.com>

* add changelog

Signed-off-by: Lize Cai <lize.cai@sap.com>

* update model-utils to capture other naming for claude 4.

Signed-off-by: Lize Cai <lize.cai@sap.com>

* add claude 4 opus as well

Signed-off-by: Lize Cai <lize.cai@sap.com>

---------

Signed-off-by: Lize Cai <lize.cai@sap.com>
2025-06-30 10:24:45 -07:00
github-actions[bot] 037a781a6d v3.18.1 Release Notes
-   Add support for Claude 4 Sonnet in SAP AI Core provider (Thanks @GTxx!)
-   Fix ENAMETOOLONG error when using Claude Code provider with long conversation histories (Thanks @BarreiroT!)
-   Remove Gemini CLI provider because Google asked us to
-   Fix bug with "Delete All Tasks" functionality
2025-06-28 18:38:32 -07:00
Ara 968b46a179 Revert "Adding Gemini CLI Provider with Oauth support (#4472)" (#4556)
* Revert "Adding Gemini CLI Provider with Oauth support (#4472)"

This reverts commit 890148407a.

* revert

* revert

* revert

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-28 18:20:32 -07:00
Toshii 5a777f28b6 fix browser row in chat view to prevent constant rerendering (#4542)
* base

* browser 2
2025-06-28 10:12:51 -07:00
Toshii fe9e5bff74 base (#4539) 2025-06-28 00:27:13 -07:00
celestial-vault e65605535a [SettingsView.tsx] Extract Debug Section (#4536)
* refactor out apiconfig section

* add general settings section

* duplicate import

* move terminal, browser, and feature settings

* move files to sections folder

* refactor out debug section
2025-06-27 16:04:28 -07:00
celestial-vault 3d100d835a [SettingsView.tsx] Extract Browser, Terminal, and Feature Sections (#4533)
* refactor out apiconfig section

* add general settings section

* duplicate import

* move terminal, browser, and feature settings

* move files to sections folder
2025-06-27 15:44:31 -07:00
celestial-vault b9d3814355 [SettingsView.tsx] Extract GeneralSettings Section (#4529)
* refactor out apiconfig section

* add general settings section

* duplicate import

* add missing type
2025-06-27 15:14:12 -07:00
xiongxiong 12fbc48629 feat. support anthropic--claude-4-sonnet in SAP AI Core provider (#4448) 2025-06-27 14:44:54 -07:00
Sarah Fortune d2f1e0cde0 Replace vscode.workspace.workspaceFolders with host bridge getWorkspacePaths (#4443)
* Use the host bridge in utils/path.ts

Update utils/path.ts to use the host bridge to get the workspace folders, instead of the vscode SDK.
Update callers to use await as the functions are now async.

* Replace vscode workspaceFolders in WorkspaceTracker

Make the cwd an instance property because await cannot be used at the top level.

* Use the host bridge getWorkspacePaths in FileContextTracker

Replace the vscode SDK getWorkspaceFolders with the util function getCwd (this is already switched to the host bridge).

* Fix test failure

Update the rootDir for the tests to be "." instead of "src". The changes to path.ts pull in new dependencies from the extension, which indirectly include files from the webview-ui.

```
Run npm run pretest

> claude-dev@3.18.0 pretest
> npm run compile-tests && npm run compile && npm run compile-standalone && npm run lint

> claude-dev@3.18.0 compile-tests
> node ./scripts/build-tests.js

node:child_process:957
    throw err;
    ^

Error: Command failed: tsc -p ./tsconfig.test.json --outDir out
    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at checkExecSyncError (node:child_process:882:11)
    at execSync (node:child_process:954:15)
    at Object.<anonymous> (/home/runner/work/cline/cline/scripts/build-tests.js:55:1)
    at Module._compile (node:internal/modules/cjs/loader:1730:14)
    at Object..js (node:internal/modules/cjs/loader:1895:10)
    at Module.load (node:internal/modules/cjs/loader:1465:32)
    at Function._load (node:internal/modules/cjs/loader:1282:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
  status: 2,
  signal: null,
  output: [
    null,
    "src/services/test/TestServer.ts(8,35): error TS6059: File '/home/runner/work/cline/cline/webview-ui/src/services/grpc-client.ts' is not under 'rootDir' '/home/runner/work/cline/cline/src'. 'rootDir' is expected to contain all source files.\n" +
      "webview-ui/src/services/grpc-client-base.ts(1,24): error TS6059: File '/home/runner/work/cline/cline/webview-ui/src/utils/vscode.ts' is not under 'rootDir' '/home/runner/work/cline/cline/src'. 'rootDir' is expected to contain all source files.\n" +
      "webview-ui/src/services/grpc-client.ts(4,34): error TS6059: File '/home/runner/work/cline/cline/webview-ui/src/services/grpc-client-base.ts' is not under 'rootDir' '/home/runner/work/cline/cline/src'. 'rootDir' is expected to contain all source files.\n",
    ''
  ],
  pid: 2496,
  stdout: "src/services/test/TestServer.ts(8,35): error TS6059: File '/home/runner/work/cline/cline/webview-ui/src/services/grpc-client.ts' is not under 'rootDir' '/home/runner/work/cline/cline/src'. 'rootDir' is expected to contain all source files.\n" +
    "webview-ui/src/services/grpc-client-base.ts(1,24): error TS6059: File '/home/runner/work/cline/cline/webview-ui/src/utils/vscode.ts' is not under 'rootDir' '/home/runner/work/cline/cline/src'. 'rootDir' is expected to contain all source files.\n" +
    "webview-ui/src/services/grpc-client.ts(4,34): error TS6059: File '/home/runner/work/cline/cline/webview-ui/src/services/grpc-client-base.ts' is not under 'rootDir' '/home/runner/work/cline/cline/src'. 'rootDir' is expected to contain all source files.\n",
  stderr: ''
}
```

* Build the protos before compiling the tests.

The tests depend on generated files now, so compile the extension before the tests so that the protos are built.

* Set up the host providers in the integration test FileContextTracker.test.ts

* Reduce the amount of logging in grpc-service.ts

Just log the service registration, instead of every rpc.

* In the `clean` build target, also remove the compiled test code.

* Correct the alias mapping for the compiled test files.
2025-06-27 11:51:02 -07:00
celestial-vault efe2388e4a refactor out apiconfig section (#4528) 2025-06-27 10:57:54 -07:00
celestial-vault 247552fcb5 remove unused function (#4518) 2025-06-27 09:35:02 -07:00
Toshii 656e3276c6 lite llm provider ui (#4517)
* base 2

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* base 3

* base

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-26 22:51:12 -07:00
Toshii 0e29f05e28 refactor nebius and remove unused logic (#4515)
* base 2

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* base 3

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-26 22:39:56 -07:00
celestial-vault 985cb51c39 refactor lmstudio (#4514)
* refactor lmstudio

* merge conflict deleted stuff
2025-06-26 22:34:14 -07:00
celestial-vault abccde0e2a refactor out vscode lm (#4513) 2025-06-26 21:55:37 -07:00
celestial-vault ca984609ca refactor out cline (#4512) 2025-06-26 21:41:35 -07:00
celestial-vault 6690d392cd refactor out bedrock (#4510) 2025-06-26 21:29:27 -07:00
Toshii 40244f09fe base (#4511) 2025-06-26 21:23:43 -07:00
Toshii 9563a71c8a base (#4509) 2025-06-26 21:14:00 -07:00
celestial-vault c13e749eed refactor out sap ai core settings (#4508) 2025-06-26 21:05:29 -07:00
Toshii 8c3fd8ba55 refactor cerebras provider menu ui (#4507)
* xai

* base
2025-06-26 20:53:58 -07:00
celestial-vault 8bfa7daa28 refactor ollama settings to different component (#4506) 2025-06-26 20:45:30 -07:00
Toshii 7cd4be7a68 xai (#4504) 2025-06-26 20:34:34 -07:00
Toshii ab9f1a0785 refactor request and fireworks provider ui (#4499)
* requesty

* fireworks
2025-06-26 20:11:15 -07:00
canvrno 68b84f3df4 Fix for delete all bug, refactored deleteAll logic (#4497) 2025-06-26 17:53:44 -07:00
kevinneung 16da0f1e06 Fix telemetry source code link path (#4476)
Update the source code link in telemetry documentation to point to the correct file location: src/services/posthog/telemetry/TelemetryService.ts
2025-06-26 16:54:28 -07:00
Daniel Steigman e898bd8825 Updated best model to be gemini (#4500) 2025-06-26 16:47:34 -07:00
canvrno b7b0e96cc7 Add env host bridge service, migrate clipboard read/write calls (#4496)
* host bridge migration - clipboard

* changeset

* removed dev logging

* switched to empty return on clipboard write

* Moved new hostServiceNameMap entry to new proto configs
2025-06-26 16:18:29 -07:00
Andrei Eternal f00c5f4ecc experimental vscode impls & build-proto cleanup (#4493)
* experimental vscode impls

* weird errors

* add workspace host config

* format

---------

Co-authored-by: Andrei Eternal <eternal@cline.bot>
2025-06-26 16:07:21 -07:00
Tomás Barreiro 2709ccefcd fix: ENAMETOOLONG on Claude Code - write to stdin instead of including the messages in the prompt (#4494)
* Write to stdin instead of including the messages in the prompt

* Add changeset
2025-06-27 04:13:58 +05:30
Toshii c8f0324536 remove gemini free text for 2.5 models (#4492)
* gemini text

* remove
2025-06-26 15:43:24 -07:00
Toshii 937cebc7de refactor vertex and doubao provider ui (#4474)
* doubao

* vertex

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* ui

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-26 15:01:31 -07:00
canvrno d4d5a49e67 Refactor autoApprove out of task class (#4233)
* Refactor auto approve out of task class

* Rebase fixes

* cleanup

* reorg
2025-06-26 10:40:37 -07:00
SmileFisher 01d3afe0c5 Consider adding a pronunciation guide, since many Chinese developers tend to pronounce it as "C line". (#3635)
* Update README.md

add pronunciation

* Update README.md

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-25 18:57:45 -07:00
github-actions[bot] 7bdab5613b v3.18.0 Release Notes
-   Optimized Cline to work with the Claude 4 family of models, resulting in improved performance, reliability, and new capabilities
-   Added a new Gemini CLI provider that allows you to use your local Gemini CLI authentication to access Gemini models for free (Thanks @google-gemini!)
-   Optimized Cline to work with the Gemini 2.5 family of models
-   Updated the default and recommended model to Claude 4 Sonnet for the best performance
-   Fix race condition in Plan/Act mode switching
-   Improve robustness of search and replace parsing
2025-06-25 17:39:46 -07:00
Ara d79722bec0 Fix: Solving race condition in the Plan/Act mode switching functionality (#4421)
* type fix

* markdown fix

* markdown fix

* Fix settings on switch

* Fix settings on switch

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 16:58:48 -07:00
Saoud Rizwan 06af720d85 Show placeholder while first response loads (#4475) 2025-06-25 16:55:55 -07:00
Ara b80ef25a33 fix: Solving Context window counting issues in gemini model family in openrouter and cline provider (#4314)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 16:54:30 -07:00
Ara 1996543eb0 Raise errors properly when OpenRouter stream cuts midway (#4398)
* Raise error on openrouter stream termination midway

* Raise error on openrouter stream termination midway

* type fix

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 16:42:12 -07:00
Ara d9dfd57da5 Settings fix (#4405)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 16:41:25 -07:00
Ara 890148407a Adding Gemini CLI Provider with Oauth support (#4472)
* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* Adding Gemini CLI direct oauth

* language

* themes instead of hardcorded colors

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 16:40:31 -07:00
pashpashpash 8d6a948478 Updating default and recommended model to claude4 sonnet (#4470)
* updating default recommended models to claude4

* changeset

* more copy

* language

* fix link

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 15:54:47 -07:00
pashpashpash 98e7fac400 updating diff evals with new algorithm + some nice dashboard updates (#4473)
* updating diff evals with new algorithm + some nice dashboard updates

* Update evals/diff-edits/dashboard/app.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-25 15:47:34 -07:00
canvrno 090bddbcea Fix: Accept trailing ">" on search and replace blocks (#4427)
* Modified regex to account for trailing > characters in search and replace blocks

* added check back to other regex's

* Re-ordered regex consts for readability
2025-06-25 14:43:26 -07:00
pashpashpash 5b41cf7af4 Gemini 2.5 using Claude4 system prompt (#4468)
* gemini 2.5 using claude4 prompt now

* changeset

* more lenient claude4 family check

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 14:39:49 -07:00
pashpashpash a2f86bde9b claude 4 prompt improvements (#4467)
* claude 4 prompt improvements

* optimizing claude4 system prompt

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 14:37:42 -07:00
celestial-vault 176f591ba3 organize migrations into separate file (#4461)
* organize migrations into separate file

* forgot to add extension.ts
2025-06-25 14:01:16 -07:00
pashpashpash 6f5ff1b407 accurate pricing displayed when BYOK is used for openrouter and cline providers (#4466)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-25 13:40:26 -07:00
Toshii ae076e2506 refactor gemini provider ui and open ai (#4464)
* base open ai

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* gemini

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-25 13:40:09 -07:00
Sarah Fortune 046d674b85 Add activeTabs stub (#4463) 2025-06-25 13:19:29 -07:00
Sarah Fortune e41e80aaf5 Add workspace service to the host bridge. (#4438)
* Add workspace service to the host bridge.

Add a service for workspaces to the host bridge.
The service has one rpc getWorkspacePaths that will replace vscode.workspace.workspaceFolders

* Add the vscode host implementation of getWorkspaceFolders

* Update src/hosts/vscode/workspace/getWorkspacePaths.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-25 08:53:56 -10:00
pashpashpash 14ed98ae87 Revert "simplify is (#4404)" (#4446)
This reverts commit 1dd164f482.
2025-06-25 10:37:30 -07:00
Toshii f8667f8a9d base (#4441) 2025-06-24 21:08:50 -07:00
Toshii 077561fb71 refactor Anthropic, AskSage provider ui (#4428)
* anthropic provider

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* base

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-24 21:07:28 -07:00
Toshii 97fd1daec6 base (#4440) 2025-06-24 21:06:09 -07:00
Toshii 5c6e1d2ce9 fix thinking budget slider ui for gemini (#4435)
* fix

* remove some models
2025-06-24 21:05:29 -07:00
pashpashpash ec4d515d28 claude code docs (#4437)
* claude code docs

* Update docs/provider-config/claude-code.mdx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-24 17:14:48 -07:00
celestial-vault 59efda3e22 fix link by calling grpc (#4422) 2025-06-24 16:07:19 -07:00
canvrno 936923d334 [PROTOBUS] Move telemetrySetting to protobus (#3711)
* telemtrySetting protobus migration

* merge conflcit fix

* Updated telemetrySettingRequest to use create

* rebase/merge fixes
2025-06-24 16:05:07 -07:00
celestial-vault 0a57ec3b7d remove remaining postMessage calls (#4432) 2025-06-24 15:52:36 -07:00
canvrno 670f3a1d62 [PROTOBUS] Move clearAllTaskHistory to protobus (#3674)
* clearAllTaskHistory protobus migration

* changset

* Fixed protobuf object literal usage

* cleanup

* remove old methods + return zero when user tries to delete favorites but none exist

* Removed deleteTaskWithId from controller and removed legacy claude_messages.json code
2025-06-24 14:30:59 -07:00
github-actions[bot] 8104f18f5a Changeset version bump (#4344)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for version 3.17.16

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-24 12:38:22 -07:00
canvrno 4de7790fa1 pretty (#4307) 2025-06-24 11:43:05 -07:00
celestial-vault adfb5a2b6e add eslint rule banning postMessage in webview (#4414) 2025-06-24 07:54:23 -10:00
pashpashpash d55a23448d fixing case in dashboard where no valid results (#4408)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-23 21:04:53 -07:00
celestial-vault 1dd164f482 simplify is (#4404)
streaming boolean to just use lastMessage.partial
2025-06-23 18:29:13 -07:00
pashpashpash 50b43c0559 Diff Evals - Replay feature (#4407)
* wip

* ok replays

* replays cooking

* docs

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-23 18:25:26 -07:00
Sarah Fortune 943c52f0b3 Update scripts/get-vscode-usages.sh (#4402) 2025-06-23 16:19:14 -07:00
Tomás Barreiro b84084936b fix: Handle long Claude code messages (#4287)
* Handle partial messages

* Parse chunks separately

* Add changeset

* refactor

* disallow tools

* Handle incomplete chunks

* Do not log costs when using a subscription, improve error handling and refactor rl usage

* Improve output handling. Prefer returning partial data to nothing.

* Set the total cost to 0 instead of leaving it undefined

* Fix the model infos and stop supporting images

* Reduce timeout to 10 minutes

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-24 03:09:21 +05:30
Sarah Fortune 014910deb9 Add clean script to package.json (#4326)
Add a script to remove build artifacts.
2025-06-23 14:24:08 -07:00
celestial-vault a30cefa595 Move mode to controller (#4343)
* you know what im talking about

* store mode in controller and target sendStateUpdate by controller ID
2025-06-23 14:23:20 -07:00
Daniel Steigman 620f402f36 Added protobuf development rule file (#4401)
* added protobuf development rule file

* new UI based example
2025-06-23 14:10:57 -07:00
Sarah Fortune 22ff68565b Add content security policy for external webview provider. (#4337)
Replace placeholder with correct csp source.
2025-06-23 11:51:05 -07:00
Sarah Fortune 3e1565da59 In the reflection output the standalone service should only show the Protobus services (#4339)
* The standalone service should only show the Protobus services in the reflection output.

The proto descriptor set is including all the proto services, allowlist the services in the cline and health packages.

* Remove debug code

* Fix variable name
2025-06-23 11:35:09 -07:00
Ara f8a284c6fe Fixing the contributor flow for Cline to force users to make issues first (#4324)
* Fixing the contributor flow for Cline to force users to make issues first

* Fixing the contributor flow for Cline to force users to make issues first

* Fixing the contributor flow for Cline to force users to make issues first

* Fixing the contributor flow for Cline to force users to make issues first

* Update feature_contribution.yml

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-22 08:11:01 -07:00
Anthony Gentile 39718cc521 #3775 remove deps clsx tailwind merge (#4147)
* v3.17.12 Release Notes

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.17.12

* changelog language

* changelog language

* attribution

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>

* #3720 first pass remove clsx / tailwind-merge and replace with template literals

* package-lock.json changes

* update changeset for 3720, remove clsx & tailwind-merge deps and replace with template literals

* #3775 Handle empty or null className

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-21 13:39:15 -07:00
Jorge García Rey e945a45102 feat: Add taskIdas metadata to use from LiteLLM (#3696)
* feat: add cline_task_id metatada to use in LiteLLM

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* refactor: remove comment

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* docs: add changeset

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* refactor: apply suggestions type

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* fix: format

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

---------

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
2025-06-21 11:17:31 -07:00
celestial-vault e2f9c38902 Migrate fetchUserCreditsData protobus (#3801)
* migrate fetchUserCreditsData

* changeset

* remove parseInt

* linter error

* change proto fields to snake case

* syntax error

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-21 11:06:09 -07:00
Toshii 447a6ba4d5 update stale workflow (#4340) 2025-06-20 21:01:00 -07:00
Toshii 3f914f5092 refactor open ai compatible and sambanova providers (#4338)
* open ai compatible

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* Sambanova

* order

* reusable components

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-20 20:29:20 -07:00
celestial-vault b26997abc0 Migrate authStateChanged protobus (#3835)
* migrate authStateChanges

* changeset

* fix types and linter errors:

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-20 19:46:23 -07:00
Andrew Hood 560c79b885 Add new regions to available Bedrock options (#4056)
* Update ApiOptions.tsx

Added eu-south-1 (Milan) and eu-south-2 (Spain) to selection menu

* Update ApiOptions.tsx

Fixed names of eu-south-1 and eu-south-2 in settings menu
2025-06-20 18:24:30 -07:00
celestial-vault 77cc05c843 Create tool executor class (#4323)
* move apiConversationHistory to MessageStateHandler

* move clineMessages state to MessageStateManager class

* remove unused imports

* reorganize task class state variables and refactor out utility functions in recursivelyMakeClineRequests

* move task ephemeral state to state class

* extract tool logic into tool executor class

* integrate ToolExecutor into task class
2025-06-20 14:53:28 -07:00
Sarah Fortune 7db8c6ae4c Support external webview (#4336)
* Add ui.getWebviewHtml to the protobus

This will return the HTML content for external clients.

* Add getUri to ExternalWebviewProvider

Change getUri to return URIs for files in an appropriate format for the external web view.
Use URI from npm module in ExternalWebviewProvider.
Use a default value for the cline dir, ~/.cline
Turn off gRPC debugging

* Include node modules used as assets in the standalone package.

* Throw an error if trying to recreate webview panel in standalone app.
2025-06-20 13:44:22 -07:00
github-actions[bot] 6400901821 v3.17.15 Release Notes
v3.17.15 Release Notes
2025-06-20 12:38:29 -07:00
Toshii 07c354314a deepseek and together refactor (#4325)
Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-20 11:51:38 -07:00
pashpashpash 430074d0c2 diff evals (#4154)
* cleaning up a bit

* cleaning up some more

* readme

* added max limit

* making it portable

* ignore

* committing plans for now

* strealit hooked up, multi model runs, better db torage

* docs

* VALID attempts

* logging

* more stability

* strategy

* cleaning deps

* docs

* streamlit dashboard work

* dashboard showing bad cases

* better parallelization pt1

* global worker pool for even better more robust parallelization

* bumping up default max parallel requests from 20 -> 80

* better devx

* better docs

* docs

* better devx

* better docs

* better presentation

* dark mode

* removed unused import

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-20 11:41:16 -07:00
Toshii 0eec3b928b suggestion (#4305) 2025-06-20 11:40:31 -07:00
Toshii cb525ee588 gemini ga (#4304) 2025-06-20 11:40:13 -07:00
Yukio Nozawa 1b700805b6 Fix: Add role and aria-checked attributes to plan / act mode switch so that screen readers can tell its state ( Resolves #4244 ) (#4263)
* Fix: Screen readers now report plan / act mode switch state

* Create changeset
2025-06-20 11:39:56 -07:00
rikaaa0928 584c0da4ad fix: preferred language setting (#4282) 2025-06-20 11:39:17 -07:00
Ramy Ben Aroya c54cf38974 fix: omit undefined MCP server name when command is missing (#3840)
* fix: omit undefined MCP server name when command is missing

* apply to all prompts

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-06-20 11:38:57 -07:00
Ryan Nauman f79d1b9c02 chore: add run instructions to CONTRIBUTING.md (#3779) 2025-06-20 11:38:22 -07:00
celestial-vault 0876b3f335 Fix tab menu buttons affecting other tabs (#4329) 2025-06-19 22:06:22 -07:00
Charles Xu e46980e40f Fix Timeline tooltips for followup messages and consolidated color retrieval code. (#4164)
* fix: timeline message description

* refactor: merge the timeline's color method to eliminate code duplication.

* add changeset
2025-06-19 15:38:56 -07:00
Sarah Fortune 7cb3bd9f85 Create a vscode specific webview provider, and an a generic webview provider class for the standalone service. (#4320)
* Create a vscode specific webview provider, and an a generic webview provider class.

Move all the vscode specific parts in the VscodeWebviewProvider.
Create a ExternalWeviewProvider for the standalone service.
Update extension.ts to use the generic webview provider class.

* Add doc comments

* Add .create() to VscodeWebviewProvider
2025-06-19 15:26:50 -07:00
canvrno b74fdfe527 remove package.json from webview package.json (#4309) 2025-06-19 13:26:29 -07:00
Tomás Barreiro 288f1bf7f8 fix: Clear the input only after creating a message (#4288)
* Return if the message was sent when toggling plan act mode to properly clear the input

* Add changeset

* Use a common value instead of a unique response
2025-06-19 14:01:22 -06:00
Sarah Fortune 8aa6935cbb Refactoring: Move webprovider getUri into the WebViewProvider class. (#4306)
This refactor is part of the prep for making WebViewProvider host agnostic.
2025-06-19 12:19:32 -07:00
Toshii dd0aa2619b beginning of refactoring the providers ui to be more modular (#4222)
* base

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* base or

* base 2

* import

* mistral base

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* nits

* ModelInfoView replication

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* readme + helpers

Co-authored-by: StvLz <lizarazo.steven@gmail.com>

* nit

---------

Co-authored-by: StvLz <lizarazo.steven@gmail.com>
2025-06-19 12:04:45 -07:00
Sarah Fortune a4390f7dd8 Add a host-provider that will provide access to all host specific things (#4318)
* Add a host-provider that will provide access to all host specific things.

Right now it only has the host bridge clients, I will add a host specific web view provider in a second PR.
Check if the host provider has been set up properly when accessing the host bridge clients.

* Fix imports.

Don't generate hosts/vscode/client/host-grpc-client.ts, the code to generate this file is larger than the file; there will never be a large number of services in the host bridge.

* Fix imports
2025-06-19 12:00:11 -07:00
celestial-vault 8e131bbcc1 Migrate requestyModels protobus (#4083)
* migrate apiConfiguration

* migrate requestyModels protobus and clean up old messages

* fix models.proto types

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-19 11:09:45 -07:00
Sarah Fortune d92de54645 Update get-vscode-usages script to exclude types, only count methods (#4299) 2025-06-18 16:33:34 -07:00
Sarah Fortune febe795af4 Use the generated client impls for the external host bridge. (#4298)
* .

* Remove unused imports
2025-06-18 15:38:46 -07:00
celestial-vault bb6d02df83 Migrate didBecomeVisible protobus (#3996)
* migrate chatButtonClicked

* changeset

* send targeted event to the controller

* prettier

* migrate didBecomeVisible

* changeset

* fix proto linter issue

* add back event listener

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-18 14:46:41 -07:00
Sarah Fortune 72471f5677 In build-protos, create the directories while writing the files. (#4296)
* In build-protos, create the directories while writing the files.

* Update proto/build-proto.js

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update proto/build-proto.js

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update proto/build-proto.js

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* .

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-18 14:44:06 -07:00
Sarah Fortune 3550486d4b Move StreamingHandlers type into a common location (#4293)
This type is used by all host bridge clients, move it out of the vscode directory.
2025-06-18 13:51:00 -07:00
Sarah Fortune 30344befe9 Add a script to generate type safe clients for the host bridge (#4269)
* Generate client interfaces and impls. Use the interfaces for the vscode and external clients

* Use interfaces
2025-06-18 12:39:52 -07:00
celestial-vault bf5e2785c3 Reorganize task state and refactor out small functions (#4267)
* move apiConversationHistory to MessageStateHandler

* move clineMessages state to MessageStateManager class

* remove unused imports

* reorganize task class state variables and refactor out utility functions in recursivelyMakeClineRequests

* move task ephemeral state to state class (#4273)
2025-06-18 12:36:01 -07:00
wangyijing130 a4a7caff01 Fix the error when submitting remote service form (#3579)
* Fix the error when submitting remote service form

Fix the exception caused by data structure errors when submitting remote service forms.

* fix for Prettier

* typing

---------

Co-authored-by: wangyj20 <wangyj20@asiainfo.com>
Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-18 11:31:59 -07:00
Ara d2cdf7ce18 Fixing the context window jump issue for gemini family of models (#4266) 2025-06-18 19:37:04 +02:00
celestial-vault befc5adf70 Migrate cline messages to message state handler (#4237)
* move apiConversationHistory to MessageStateHandler

* move clineMessages state to MessageStateManager class

* remove unused imports

* remove redundant line
2025-06-18 10:34:20 -07:00
Yukio Nozawa b62f61fbc6 Fix: Make some of the buttons on the task header accessible to screen readers (#4246)
* Fix: The button which closes the currently displayed task is is now accessible with screen readers

* Fix: The button which deletes the currently displayed task is now accessible with screen readers

* Create changeset
2025-06-18 09:31:28 +02:00
Toshii 6dd0bbdd79 env (#4260) 2025-06-18 08:45:05 +02:00
Sam b92a280f51 fix: respect selected litellm model IDs for plan & act (#4193) 2025-06-18 08:44:04 +02:00
watany cecf7304e1 fix(bedrock): remove custom Model encode (#4209)
* fix(bedrock): without any encoding

* fallback for custom model

* changeset

* Update src/api/providers/bedrock.ts

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-18 08:43:17 +02:00
Tomás Barreiro c5eccfe5d6 fix: Prevent reading env variables from the users environment (#4243)
* Do not destructure env variables

* Add changeset

* Do not set IS_DEV to true in tests

* Do not define values if it is not a production build

* Add eslint rule to prevent destructuring process.env
2025-06-18 08:42:24 +02:00
மனோஜ்குமார் பழனிச்சாமி 1fc796020d remove the MCP notification pop up (#4251)
* remove the MCP notification pop up

* Update src/services/mcp/McpHub.ts

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-18 08:41:45 +02:00
Sarah Fortune c39a74048a Fix windows build (#4270) 2025-06-17 17:25:29 -07:00
github-actions[bot] c294b86524 v3.17.14 Release Notes
v3.17.14 Release Notes
2025-06-17 16:53:43 -07:00
pashpashpash 8d133d9031 supporting legacy search and replace blocks too (#4264)
* supporting legacy search and replace blocks too

* changeset

* Handle legacy search/replace chars for first/last partial lines

* error recovery + fixing

* throwing error if malformed search block - previously this would cause entire file to be deleted

* Update cyan-books-cry.md

* fixing broken test

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-06-18 01:14:28 +02:00
Ramesh 1adf19a873 update star alignment (#3935) 2025-06-17 16:07:48 -07:00
canvrno 60d9bd46c5 Fix: Race condition leading to task restoration, checkpoints issues (#4226)
* Fixed race condition where clineAsk was undefined, leading to task restoration and other downstream issues

* changeset
2025-06-18 01:25:58 +05:30
Tomás Barreiro 689afc62eb feat: Integrate Claude Code (#4111)
* Integrate Claude Code

* Add changeset

* handle exits gracefully, select models and update the path

* limit the claude-code models and update message

* expose the claudeCodePath in the apiConfiguration and proto

* remove log

* Update proto settings and properly map the provider
2025-06-18 00:51:07 +05:30
Tomás Barreiro d8e29263df fix: Clear the input when the user changes mode within a task (#4242)
* Clear the input when the user changes mode within a task

* Add changeset

* rename prop
2025-06-17 17:44:52 +02:00
canvrno 189b91ca36 Fix: clineMessages not storing all checkpoints commitHashes (#4225)
* Fixed issue where checkpoint commitHash was not being saved to every clineMessage in state, added handling in case checkpointTracker was not initialized (resumed tasks)

* changeset

* prettier
2025-06-17 11:35:56 +05:30
Ara 7172eb194d Fixing terminal Blocked issue (#4217)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-17 06:02:21 +05:30
Sarah Fortune 97838fe349 Generate promise-based TS clients with nice-grpc. (#4259)
Add a manager class to hold all the instances of the clients. They need to be reused, unlike the vscode clients which are just static method calls.

Move the generated file src/standalone/server-setup.ts into src/generated/ directory.

Add the host bridge address env var to the vscode launch.json

In build-proto.js: path.join will normalize slashes in file paths, so use path.join(x, "a/b/c") instead of path.join(x, "a", "b", "c").
2025-06-16 15:15:35 -07:00
canvrno e8e8eac820 Feat: Reduce diff edit errors when restoring tasks w/o checkpoints (#4232)
* Added file context warnings to reduce diff edit errors when resuming a task after it has been restored

* changeset

* Prompt tweak
2025-06-16 12:48:02 -07:00
canvrno 54a7fed77b Exclune clinerules from checkpoints (#4236) 2025-06-16 11:57:41 -07:00
Sarah Fortune ddbe3f47bd Add fixes for the grpc handler and client for the host bridge service (#4221)
* Fix error handling for unary handler in the host bridge grpc handler for vscode.

The unary request handler was return a struct like {message: ..., error: ..., requestId: ...}
But the caller was only looking at the message field, not the error.
Simplify the unary handler and just return the response message or throw if there was an error. The caller already has the request id, it doesn't need it to be returned from handler.

* Update comments

* Return early from cancelRequest if request wasn't cancelled to reduce indent level/complexity.

* Fix bug in cancelRequest in the host bridge grpc handler where cancel message is never sent to the client.

When a request is cancelled it is removed from the registery. The cancel handler was cancelling the request, and then trying to retrieve it again to get the stream handler, but it was already removed from the active request, so the cancel message was never sent to the client.

Fix this by retrieving the stream handler first, and then cancelling the request.
2025-06-15 22:22:10 -07:00
Toshii a9dfc5d0b6 fix sap provider (#4240)
* fix

* proto nit
2025-06-15 13:49:47 -07:00
canvrno 31de5053f3 Fix: Checkmark control menu improvements (#4218)
* Better debounce on checkmark control menu

* Fix issue where Restore Files button was disabled after first use
2025-06-15 11:48:04 -07:00
celestial-vault 5a66cb7819 catch error more broadly (#4235) 2025-06-15 10:15:32 -07:00
Dennise Bartlett 5d4594e82e Update developer reset to allow for resetting workspace settings. (#4229)
* Update developer reset to allow for resetting workspace settings.

* Add Changeset

* Add Metadata field to ResetStateRequest
2025-06-14 23:14:51 -07:00
schardosin c3326973c7 SAP AI Core as a Provider (#3980)
* added changes over a the latest from upstream

* cleanup some comments

* fixed message mispelling and variable naming convention

* added changeset for addition of SAP AI Core provider

* fixed mispelled expires_at

* added sapAiCoreClientId to hasKey

* retrigger tests

* removed bedrock-format.ts, added smal function for message formatting in sapaicore, removed models lazy loading, simplifying the code

* reverted src/core/webview/index.ts to upstream version, once all the tailored implementation for sapaicore were removed

* removed duplicated and not used interfaces

* removed the deployments logic from ApiOptions.tsx, now it loads the list of models available only

* removed references for deployments once it is not in use anymore

* removed unused sapConfig from WebviewMessage and ExtensionMessage

* moved previous state variable according to the request'

* removed supportsComputerUse from sapaicore sonnet

* added grpc fields and updated conversion methods for sap ai core
2025-06-14 17:37:34 -07:00
Ara b0de6390f4 Fix MCP Schema support (#4166)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-14 14:27:46 +05:30
Toshii a6c33afb11 add terminal setting to allow users to constrain terminal output (#4150)
* base

* grpc

* grpc

* base 3

* settings stuff

* changeset

* nit

* format

* smol
2025-06-13 17:28:31 -07:00
Derek Gaston ec26a912bc Increase the number of retries for Bedrock. Refs #213 (#4114)
* Increase the number of retries for Bedrock. Refs #213

* bump

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-06-13 13:55:24 -07:00
watany 6a11c78288 chore(bedrock): remove @anthropic-ai/bedrock-sdk (#4162)
* remove @anthropic-ai/bedrock-sdk

* changeset
2025-06-13 11:53:58 -07:00
Vladimir d27b199cea Mcp rich display setting (#4029)
* + Adding a global setting for mcp rich display in features settings, storing it in global storage, and using it as the starting value for each new session to still allow local toggle of mcp rich display on the tab, but let users keep the base stored default

* + adding changest

* + fxing linting post conflict merge

* fix

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-06-13 11:51:52 -07:00
Sarah Fortune 7ba4c9e15e Add a linter for proto files (#4179)
* Add a protobuf linter

Enforce the standard lint rules: snake case field names, snake case file names, pascal case service names etc.

Add exceptions for the lint rules we are already not following.

Fix linter failures, this only changes the proto file The generated TS types are the same, so the ts files don't need to be updated.

* Formatting
2025-06-13 08:28:05 -10:00
Toshii 802e72f1bf new feature github template + readme (#4211)
* constributing

* nit

* nit
2025-06-13 11:02:00 -07:00
Alberto Valiña Lema 10a223f27d Terminal profile setting (#4079)
* feat: Added a configurable default terminal profile setting

* chore: format

* refactor: migrate terminal profiles to gRPC and remove legacy message handling

- rename AvailableTerminalProfilesResponse to TerminalProfiles in proto
- remove duplicate TerminalProfile type from terminal_types.ts
- update all imports to use TerminalProfile from proto/state
- remove legacy availableTerminalProfiles message handling from ExtensionStateContext
- clean up ExtensionMessage type by removing unused availableTerminalProfiles
- translate Spanish comment to English in TerminalSettingsSection
- update server-side getAvailableTerminalProfiles to use new proto type

* chore: lint

* fix: merge main

* fix: resolve errors

* chore: notify terminal profile settings

* chore: merge main

* feat: improve default terminal profile changes

* fix: update changes on save
2025-06-13 20:51:24 +05:30
Sarah Fortune 0fade12e8e Format files before commit (#4155)
Instead of doing a prettier check in the pre-commit, just format the staged changes.
Use the package lint-stage to handle only formatting staged changes.
2025-06-12 13:28:39 -07:00
Sarah Fortune a4bf34f73b Generate grpc-js services and clients (#4199)
* Generate clientImpls and services for grpc-js.

Generate grpc-js services and clients (as opposed to the generic service definition)
The grpc-js clients are needed to connet to external gRPC services, ie the host bridge.
Switch the standalone gRPC service to use the grpc-js service defintions, these have the correct serialize/deserialize methods and fix the camel/snake case issue.

* Formatting
2025-06-12 12:49:36 -07:00
celestial-vault 227c7195f6 move saveClineMessagesAndUpdateHistory out to a separate state utilities file (#4190) 2025-06-12 11:34:20 -07:00
celestial-vault 5e55a7a095 return files if targeted directory is hidden (#4176) 2025-06-12 11:33:44 -07:00
Hanzen Shou 741b1edf73 Refactor copy buttons (#3456)
* refactor: moved copy logic to CopyButtonComponents.tsx

* refactor: simplified copy button components

* clean: format & cleanup code

* clean: removed comments

* fix: fixed aria labels

* clean: removed old comments

* clean: reduced deltas

* clean: deleted comment in ChatRow.tsx

* updates

* changeset

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-12 10:50:59 -07:00
github-actions[bot] 8b4e8ce37f v3.17.13 Release Notes
v3.17.13 Release Notes
2025-06-11 22:20:14 -07:00
Toshii 95ad8d879b change text (#4185)
* change text

* changeset
2025-06-11 20:15:27 -07:00
Ara 2a0d60f642 Adding Thinking UX for Gemini (#4137) 2025-06-11 19:44:18 -07:00
Sarah Fortune 9f605a1f6c Add a verbose flag to build-protos.js (#4171)
Reduce the amount of logging unless the flag is set.
2025-06-11 12:58:24 -10:00
Sarah Fortune 5272788f8c During cleanup remove generated files that have been moved to a different location. (#4152) 2025-06-11 12:05:55 -10:00
celestial-vault a9238b425b Update PR Template (#4175)
* update pr template

* change wording
2025-06-12 02:07:03 +05:30
Ara 79edbf9a92 Remove redundant MCP notifications (#4170)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-12 01:59:24 +05:30
celestial-vault 542ec2bd4a migrate and remove custom instructions (#4158) 2025-06-11 12:46:10 -07:00
celestial-vault 9733ef791e migrate apiConfiguration protobus (#4072)
* migrate apiConfiguration

* fix type issue

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-11 12:32:24 -07:00
celestial-vault f16c70e200 extract isClaude4ModelFamily helper (#4121) 2025-06-11 12:31:38 -07:00
Ara ddca8411a6 Supporting Notifications MCP with Cline (#4129)
* Adding real time client

* Adding real time client

* Adding real time client

* first commit

* Adding thinking Slider for Gemini models

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-11 14:20:54 +05:30
Toshii 099f0ec401 fix the settings for terminal timeout (#4153)
* base

* changeset
2025-06-11 01:24:42 -07:00
watany e35428a7b9 refactor(bedrock): remove the as any and use proper type (#4127)
* v3.17.12 Release Notes

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.17.12

* changelog language

* changelog language

* attribution

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>

* fix typing

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-10 23:49:45 -07:00
celestial-vault 59a68c8d7a migrate focusChatInput protobus (#3986)
* migrate focusChatInput

* move subscription in with the others

* changed grpc method; fixed a bug where keybinding doesn't show chatview if in another tab

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-10 18:28:01 -07:00
Toshii 336eb46547 replay evals (#4140) 2025-06-10 17:11:06 -07:00
celestial-vault cdfffb8464 Spruce up HistoryPreview (#4101)
* spruce it up

* fix start positioning and spacing

* change vertical spacing
2025-06-10 17:04:54 -07:00
Sarah Fortune 494ce333ce Initial work for adding host bridge client for external hosts (#4144)
* Add a host bridge client that uses the appropriate underlying client (vscode or external grpc service)

Add placeholders for the external clients.

Move the hosts directory under src, add an alias in tsconfig.json for @hosts

* Update package.json
2025-06-10 13:56:04 -07:00
pashpashpash 0ae2dc3134 Sorting mcp marketplace by newest by default (#4141)
* sorting mcp marketplace by newest by default

* sorting mcp marketplace by newest by default

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-10 13:12:10 -07:00
Ara 1e06cf0667 Update pricing for O3 family models (#4143) 2025-06-10 12:59:56 -07:00
Saoud Rizwan 980bddb455 Add prompt caching indicator to grok 3 (#4139)
* Add prompt caching indicator to grok 3

* Create seven-insects-shop.md
2025-06-10 11:46:39 -07:00
celestial-vault 78be287e67 migrate plan/act state to workspace storage (#4130) 2025-06-10 22:05:35 +05:30
Dennise Bartlett 02f016c1fd Update Publish workflow to use Tag (#4132) 2025-06-09 23:03:51 -07:00
Sarah Fortune e9c7377004 Update build scripts to include extension files in the standalone zip. (#4122)
Update the standalone vscontext with the extension directory.
2025-06-09 21:40:47 -07:00
github-actions[bot] 28bc4327b4 v3.17.12 Release Notes
v3.17.12 Release Notes
2025-06-09 21:40:13 -07:00
watany 889ffcade9 fix(bedrock): remove Anthropic-Bedrock SDK (#3800)
* fix(bedrock): remove Anthropic-Bedrock SDK

* changeset

* update

* revert

* Update src/api/providers/bedrock.ts

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>

* fix

* revert

* fix testing

* fix additionalModelResponseFields.thinkingResponse

* fixed!

* remove log

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-09 16:13:51 -07:00
Toshii 335086ef36 diff edit evals (#4112)
* base

* multi parallel

* function registry

* nit

* basic prompt

* support data 1

* types

* types

* input format

* path name

* use helpers

* logs

* claude4 prompt

* handling

* evals history

* verbose

* prints

* var

* cli base

* cli inputs

* sqlite

* v3 diff apply

* thinking tokens

* more metrics

* nit

* new structure

* print
2025-06-09 16:01:27 -07:00
canvrno 983d14bdcd Revert #4097 until we have a better solution (#4123) 2025-06-09 16:00:08 -07:00
Saoud Rizwan aaa03a37a4 Add free grok model (#4115)
* Add free grok model

* Create khaki-cheetahs-tickle.md

* Only change pricing for cline not openrouter provider

* Fixes

* cost to 0 for x-ai provider

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-09 15:01:50 -07:00
Sarah Fortune c7e8c7da3e Fix failing GitHub action on Windows (#4107)
* Use cache builtin to actions/setup-node@4

* Update test.yml

npm ci --verbose

* Update test.yml

* Install local packages on windows

* formatting
2025-06-09 13:40:49 -07:00
canvrno 0d769b436d Removed some logging (#4104) 2025-06-08 15:13:34 -07:00
celestial-vault 361b0cfa2b migrate mcpServers (#4010)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-07 15:15:59 -07:00
Saoud Rizwan a9527573f1 Fix bug where replace_in_file would not be able to handle for out-of-order SEARCH/REPLACE blocks + when Claude 4 doesn't use finishing ++++REPLACE marker (#4100)
* Refactor constructNewFileContent and add tests for out-of-order replacements

- Renamed function `constructNewFileContent` to `cnfc` for clarity.
- Updated the versioning logic to default to "v1" in `constructNewFileContent`.
- Enhanced the implementation to handle out-of-order search/replace blocks.
- Added comprehensive test cases to validate the new functionality, including scenarios with overlapping content and deletions.

* Create quick-rocks-guess.md

* Add flexibility for search/replace markers matching

* Refactor tests for edge cases in diff handling

* Handle case where model doesnt include ending replace marker

* Fix search/replace counter
2025-06-07 12:52:15 -07:00
celestial-vault 9702d1a67d migrate relinquishControl (#4098) 2025-06-06 19:45:01 -07:00
celestial-vault 922c795699 Migrate fetchLatestServersFromHub protobus (#3621)
* migrate fetchLatestServerFromHub

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-06 19:31:38 -07:00
canvrno fd8547344a [PROTOBUS] Move toggleWorkflow to protobus (#3649)
* Remove unused messages

* toggleWorkflow protobus migration

* Changes to work with other rules

* Updates

* oneSmallChange

* removed return
2025-06-06 19:24:24 -07:00
celestial-vault 150af1607e Migrate workspaceUpdated protobus (#4014)
* migrate workspaceUpdated

* fix linter warning about empty proto object creation

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-06 19:05:16 -07:00
Andrei Eternal 4d7ced7e15 [Protobus] migrate executeQuickWin (#4088)
* protobuf executeQuickWin

* whitespaces

---------

Co-authored-by: Andrei Eternal <eternal@cline.bot>
2025-06-06 18:46:31 -07:00
canvrno d7e1fff011 Task init promise error in task truncation (#4097) 2025-06-06 17:28:36 -07:00
Evan 8ca96dfd9f remove proto gen files (#4045)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-06 13:34:53 -07:00
canvrno 8c559d6916 one small fix (#4086) 2025-06-06 12:59:26 -07:00
canvrno 2158165fc4 [PROTOBUS] updateSettings & didUpdateSettings (#4073)
* updateSettings proto mvp

* changeset
2025-06-06 12:43:03 -07:00
canvrno 78792c240f Spring cleaning (#3723)
* Spring cleaning

* changeset

* Fixed incorrect return on ScrollToSettings proto

* cleanup
2025-06-06 11:50:59 -07:00
Sarah Fortune 0abd13e1f2 Better environments for the vibes (#4077)
* Get root of the cline storage directory from an env var.

Set the cline directory env var when running the standalone app from the vscode launcher.
Add missing vscode SDK stub.

* Stop spamming the logs.
2025-06-06 10:15:29 -07:00
Beatrix 7e37cec1ab Fix hardcoded context menu index for File option selection (#4065)
* Fix hardcoded context menu index for File option selection

The ChatTextArea component was using a hardcoded index 3 to select the "File" option by default in the context menu, but this was incorrect - the File option is actually at index 5 in the menu options array. This caused the wrong option (Git) to be selected by default when pressing Escape or when no query is provided.

Additionally, the hardcoded approach was fragile and would break if the context menu order changed in the future.

Key changes:

- Added `DEFAULT_CONTEXT_MENU_OPTIONS` array in context-mentions.ts to define the canonical menu order
- Added helper function `getDefaultContextMenuOptionIndex()` dynamically finds the correct index for any option type
- Updated ChatTextArea to use `DEFAULT_CONTEXT_MENU_OPTION` constant instead of hardcoded 3
- Updated `getContextMenuOptions()` to use the new centralized array

* changeset
2025-06-06 00:44:24 -07:00
canvrno b0926b1647 Fixed telemetry popup bug (#4070) 2025-06-05 22:06:24 -07:00
Alberto Valiña Lema 582a3b190d Collapsible Panel for MCP Responses (#3528)
* feat: the response of the mcps is represented by a collapsible

* feat: the response of the mcps is represented by a collapsible

* fix: message for error parsing response

* fix: format

* feat: added cline.mcp.defaultPanelState settings

* chore: merge

* feat: improve global state

* chore: re-trigger  workflow

* chore: lint fix

* revert: unnecessary changes

* Update webview-ui/src/components/mcp/chat-display/McpResponseDisplay.tsx

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>

* chore: change MCP Response Display Mode to a button

* fix: improve ui mcp response panel

* refactor: change name and type for property mcpDefaultPanelState to mcpResponsesCollapsed

* chore: rename props

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-05 17:14:43 -07:00
Evan 8c8a398f90 Migrate webviewDidLaunch protobus (#4063)
* migrate openRouterModels

* remove conversion functions and unused imports

* migrate webviewDidLaunch

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-05 13:47:53 -10:00
Evan 742a72b4ec migrate openRouterModels protobus (#4058)
* migrate openRouterModels

* remove conversion functions and unused imports

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-05 15:47:11 -07:00
Sarah Fortune 84a00b05e0 Add better stubs for the workspace. (#4061)
The extension doesn't like it when the workspace/workspace config is undefined.
Fix the warning about the name in package.json.
Change some logging in the gRPC server.
2025-06-05 15:19:09 -07:00
Evan e21fa3fff9 migrate theme message protobus (#4012)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-05 13:12:19 -07:00
Beatrix 5b3647fdff Add active files to file context menu (#4048)
* Add active files to file context menu

Add support to include active files (open tabs) within the WorkspaceTracker. This enables the tracker to send the webview with a file list that has active files listed at the top.

The changes include:

- Listening for tab group changes using `vscode.window.tabGroups.onDidChangeTabs` to trigger workspace updates.
- Introducing an `activeFiles` getter that retrieves the file paths of all currently open text editor tabs.
- Modifying the `workspaceDidUpdate` function to include both `activeFiles` and `filePaths` when posting the `workspaceUpdated` message to the webview.

* use set

* add changeset
2025-06-06 00:49:17 +05:30
github-actions[bot] 14b6e71416 v3.17.11 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and version for 3.17.11 patch release - Add Gemini 2.5 Pro Preview 06-05

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@nugbase.com>
2025-06-05 11:51:40 -07:00
Ara 4869aba90f Adding Gemini 2.5 pro preview 06-05 (#4053) 2025-06-05 11:37:06 -07:00
Evan c68e427d13 migrate mcpMarketplaceCatalog (#4023)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-04 23:17:13 -07:00
Evan 0dca4dedbd migrate partialMessage (#4033)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-04 23:02:37 -07:00
Evan c6e7b5249e Migrate settingsButtonClicked protobus (#3976)
* migrate settingsButtonClicked

* changeset

* add provider type filtering

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-04 20:49:07 -07:00
github-actions[bot] 9dcb82f22e v3.17.10 Release Notes
v3.17.10 Release Notes
2025-06-04 19:05:11 -07:00
Toshii fa8491b3aa remove log (#4040) 2025-06-04 18:53:12 -07:00
pashpashpash b811db823b Option to disable aggressive terminal reuse for users affected by the task lockout bug. (#4041)
* terminal setting for reusing terminal commands

* language

* changeset

* changeset language

* comment clarity

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-04 18:52:53 -07:00
Sarah Fortune 4f7dc6fb36 Add a postMessage handler for standalone cline app (#4038)
* Add a postMessage handler for standalone cline app.

If there is no vscode api defined, try to use the standalone post
Message handler.

* Imports

* Update logs
2025-06-04 17:44:38 -07:00
Sarah Fortune b7096a77db Add type checking for protobus RPC handlers. (#4020)
* Add type checking for protobus RPC handlers.

Add type parameters to the wrapper function when generating the server-setup file.
So that the parameters of the RPC handler will be type checked against types defined in the service.
The generated code looks like this:
```
    server.addService(proto.cline.CheckpointsService.service, {
         checkpointDiff: wrapper<cline.Int64Request,cline.Empty>(checkpointDiff, controller),
         checkpointRestore: wrapper<cline.CheckpointRestoreRequest,cline.Empty>(checkpointRestore, controller),
    });
```

Add an index.ts file to the proto directory so all the proto types can be imported without having to know which proto message is defined in which file (the proto descriptor set doesn't have this information).

* Generate index.ts with protoc instead of doing it ourselves.

Turn on the option 'dontExportCommonSymbols' in protoc, so that each generated proto file is not trying to export the same utility functions.

Generate all the protos with the same protoc command.

* cleanup
2025-06-04 17:42:19 -07:00
Andrei Eternal cbcd17764b Protobus Host Bridge (#3747)
* WIP host bridge

* Run formatter

* remove tmp impl & rename host grpc client

* gitignore more files

* better layout

* host handler to make other hosts easier to add

* remove adapter pattern

* get host responses correctly

* fix streaming mode for host bridge

* first wip subscription host bridge demo for watching mcp server config

* format, comment

* add cancellation for host grpc stream

* remove unneeded functions from host-grpc-handler

* add a method for canceling request rather than using the registry

* another todo

* use StringRequest for uri.proto

* debounce new file watcher

* remove test setup

* remove some todos and logs

* remove registry use todo

* Revert "remove registry use todo"

This reverts commit 84078d3469.

* fix capitalization of uri.proto

* a better pattern for a callback based bridge without using the requestRegistry directly

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
Co-authored-by: Andrei Eternal <eternal@cline.bot>
2025-06-04 15:41:30 -07:00
Ara 47899ac52d Adding Cline Walkthrough (#3746)
* Show gemini 2.5 flash prompt cache

* Show gemini 2.5 flash prompt cache

* Show gemini 2.5 flash prompt cache

* Show gemini 2.5 flash prompt cache

* Fix Diff edit prompt

* Fix Diff edit prompt

* Fix Diff edit prompt

* Fix Diff edit prompt

* Fix Diff edit prompt

* Fix Diff edit prompt

* New files

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-04 13:45:52 -07:00
Evan 586eb3cd9e migrate accountButtonClicked (#4008)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-04 11:40:52 -07:00
Steven White 584535393f New AskSage Models (#3780)
* chore: new AskSage models

* chore: add changeset
2025-06-04 11:21:18 -07:00
Jonny Chen 01a9ab0cf6 feat: add all qwen3 models support and add thinking mode options (#3692)
* feat: add all qwen3 models support and add thinking mode options

* fix: qwen model reasoning logic configuration, set the qwen model maxBudget value

* fix: correct the maxTokens in qwen3 model

* vertex model

---------

Co-authored-by: xuanqi <xuanqi.cc@alibaba-inc.com>
Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-06-04 09:08:48 -07:00
Sarah Fortune 51a538373f Make the protobuf object literal lint check an error instead of a warning. (#4019)
Fix remaining occurences of protobuf literals.
2025-06-03 23:58:52 -07:00
canvrno a6ce75d17c Telemetry fix (#4009) 2025-06-03 18:44:52 -07:00
Evan 0a3d0e3569 Migrate chatbuttonclicked protobus (#3854)
* migrate chatButtonClicked

* changeset

* send targeted event to the controller

* prettier

* add test mock

* continue to fix tests

* fix test mocks once and for all

* fix test mocks once and for all

* try again please lord

* try again

* temporarily disable tests

* revert other test 'fixes'

* one more

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-03 14:47:08 -07:00
Sarah Fortune fccac277d2 feat(lint): Add custom ESLint rule for checking that protobuf messages are created using .create() in more contexts (#3929)
* feat(lint): Add custom ESLint rules for protobuf type checking

Add two custom ESLint rules to enforce proper usage patterns when creating protobuf objects.

Using .create() to build protobufs ensures that the protobuf is type checked when it is created. Protobufs created using
object literals are not type checked,  which can lead to subtle bugs and type mismatches. The linter rules detect when protobufs are created without using .create() or .fromPartial().

- no-protobuf-object-literals: Enforces the use of `.create()` or `.fromPartial()` methods instead of object literals when creating protobuf types.

```
/Users/sjf/cline/src/shared/proto-conversions/state/chat-settings-conversion.ts
   9:9  warning  Use ChatSettings.create() or ChatSettings.fromPartial() instead of object literal for protobuf type
Found: return {
             mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT,
             preferredLanguage: chatSettings.preferredLanguage,
             openAiReasoningEffort: chatSettings.openAIReasoningEffort,
     }
  Suggestion: ChatSettings.create({
             mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT,
             preferredLanguage: chatSettings.preferredLanguage,
             openAiReasoningEffort: chatSettings.openAIReasoningEffort,
     })
```

- no-grpc-client-object-literals: Enforces proper protobuf creation for gRPC service client parameters. This needs a separate rule
because the type signatures of the ServiceClients methods are too generic to be detected by the previous rule.

```
/Users/sjf/cline/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx
   41:62  warning  Use the appropriate protobuf .create() or .fromPartial() method instead of object literal for gRPC client parameters.
Found: McpServiceClient.addRemoteMcpServer({
                             serverName: serverName.trim(),
                             serverUrl: serverUrl.trim(),
                     })
```

These rules help maintain code quality by enforcing consistent patterns for working with protocol buffers throughout the codebase, reducing potential runtime errors from improper message construction.

* Update test

* Add custom eslint rules to new webview-ui config

* formatting

* stuff

* undo protobuf fixes

* update rule

* update rule

* protobuf fixes

* rename unused params

* formatting
2025-06-03 14:21:54 -07:00
Paul Gear 00901e01b7 Change Ollama model selector to filterable dropdown (#3999)
* use dropdown for Ollama model list when possible

Code changes by Qwen3 30B A3B, based on OpenRouterModelPicker

* Document libasound2 and libnss3 test dependencies, sort list

* add test for OllamaModelPicker

Code by Claude Sonnet 3.7

* Add changeset
2025-06-03 13:52:50 -07:00
Sarah Fortune 4a3f5c4f69 Add globalState to the standalone vscode extension context replacement. (#3987)
* Add globalState to the standalone vscode extension context replacement.

Add a generic key-value store that can be used by different storages, and move this into vscode-context-utils file.
Move the stubs/mocks into a separate stubs file, (they have type checking turned off).
Keep the implementations in vscode-context and turn on typechecking for this file.

* Add type parameter for the values in the JsonKeyValueStore

* Optimize imports

* Add implementations for the vscode ExtensionContext in the standalone app (#4000)

* Formatting

* add package-lock.json
2025-06-03 12:06:13 -07:00
Michael 9f85105186 Add retry logic to API handlers with @withRetry decorator (#3596) 2025-06-03 10:19:14 -07:00
Isabel Zimmerman a9e846211b remove hanging bullet point (#3989) 2025-06-03 01:04:12 -07:00
Ara 8cbf25c026 Adding support for Streamable MCP server (#3970)
* Fixing OpenAI compatible to support cache token display

* Removing redundant logging and write to file

* Removing redundant logging and write to file

* Splitting constants

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-03 00:29:45 -07:00
francis e5857cbfec Docs: Update docs.json and formatting (#3991)
* docs: add xAI Grok and Mistral AI provider configs

* docs: add Anthropic Claude model configuration guide

- Add comprehensive documentation for configuring Anthropic Claude models with Cline
- Include API key setup, supported models list, and configuration steps
- Cover advanced features like prompt caching and rate limits
- Update navigation to include new Anthropic page in custom model configs section

* docs: add DeepSeek, Ollama, OpenAI, OpenAI Compatible pages and update Plan & Act

* docs: add Extended Thinking section to Anthropic configuration guide

* docs: update vscode language model api page

* docs: update vscode language model api docs

* Add model documentation pages and update navigation structure

- Add new documentation pages for model overviews (Claude, Gemini, OpenAI, XAI)
- Add general models overview page
- Update docs.json to include new model documentation in navigation
- Update OpenAI-compatible model documentation

* Remove Notes column from model documentation tables for consistency

* Fix table formatting in Gemini models documentation

* added 5 new model configurations and updated existing ones

* Update AWS Bedrock documentation with minimal IAM permissions

* modified:   docs/get-to-know-the-models/claude-models.mdx

* Renamed 'custom model configuration' to 'provider configuation' to avoid providers being confused with models

* Fix dollar sign rendering in model documentation

- Escape dollar signs in pricing tables to prevent MDX parsing issues
- Fixes disappearing dollar signs in gemini-models.mdx and other model docs
- Dollar signs now display correctly as literal currency symbols

* Add feature descriptions to OpenAI and XAI model docs

- Added 'Diverse Performance for Different Tasks Across Model Tiers' section to OpenAI models
- Added 'Real-time Information Access' section to XAI models
- Maintains consistency with existing Claude and Gemini documentation format
- Highlights valuable features for agentic AI coding workflows

* removing these files due to name change in header. they're in the new docs/provider configs folder

* added 2 new issues per model page + formatting

* Update model documentation files

* Fix: Correct paths in docs.json for provider configs

* docs: update docs.json and apply formatting

* docs: fix broken links, add OpenRouter & Requesty pages

* docs: remove 'get to know the models' section and files

* Update docs/provider-config/openai-compatible.mdx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: kevinneung <94151024+kevinneung@users.noreply.github.com>
Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-02 20:50:49 -07:00
github-actions[bot] 064dac48f8 v3.17.9 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and version for patch release 3.17.9

- Change version from 3.18.0 to 3.17.9 (patch release)
- Update CHANGELOG.md with user-friendly descriptions
- Add proper attribution for external contributors
- Focus on user-facing changes and bug fixes
- Remove internal/dev-only changes from changelog

* added claude 4 stuff

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: pashpashpash <nik@nugbase.com>
2025-06-02 19:45:45 -07:00
pashpashpash 82d0ac2088 Cozy Claude 4 (#3995)
* making claude4 feel better

* system prompt whoops

* small system prompt change

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-02 19:28:35 -07:00
David Nanyan 3a1cee2faf Add stale workflow (#3672) 2025-06-02 19:02:11 -07:00
canvrno 8171b887ad Fix for checkpoints (#3993) 2025-06-02 18:25:44 -07:00
pashpashpash 203f805548 Claude 4 - experimental flag - defaults to classic function calling with some minor changes to system prompt (#3994)
* adding modularized flag for new claude4 experimental tools, default OFF

* diff.ts

* responses.ts

* system.ts

* tests and prompt

* forgot some chars

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-02 18:22:38 -07:00
Nigel Packer c91ec4c97d Remove hard-coded temperature from LM Studio API requests and add support for easoning_content in LM Studio API responses. (#3971) 2025-06-02 18:18:13 -07:00
Evan d85c8ceeb2 migrate historyButtonClicked to protobus (#3977)
* migrate historyButtonClicked

* add webview provider type filtering

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-02 15:23:19 -07:00
Evan b38994f1e8 Migrate mcpButtonClicked protobus (#3975)
* migrate mcpButtonClicked

* changeset

* only send event to matching webview type

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-02 12:38:30 -07:00
Ara d846c2cce9 Removing redundant logging and write to file (#3981)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-02 08:58:13 +05:30
Adel Khial 6e50778db7 Add DeepSeek-R1-0528 to Nebius AI Studio API (#3973)
* Add DeepSeek-R1-0528 to Nebius AI Studio model list

* Add changeset

* Fix max tokens
2025-06-01 16:17:10 -07:00
Evan 3a325a6445 Open the hood (#3949)
* add open disk conversation history button

* changeset

* change icon due to lack of artistic freedom

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-01 14:51:07 -07:00
Evan f73172aeae update bedrock sdk (#3978)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-01 14:18:07 -07:00
Evan 97c25cb35e Pass id to webview on creation (#3867)
* pass type of webview to webview

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-06-01 14:06:48 -07:00
suntp 0fb82c1975 fix:The POST requests of MCP's SSE server support setting headers. (#2969)
* fix:The POST requests of MCP's SSE server support setting headers.(#2652)

* fix:The POST requests of MCP's SSE server support setting headers.(#2652)

---------

Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
2025-06-01 13:25:31 -07:00
pashpashpash 36c3f93884 added modelId to tool call events (#3968) 2025-06-01 13:24:12 -07:00
pashpashpash 3fb0360e01 fixing ripgrep overload - tool should not return more than 0.25mb max… (#3967)
* fixing ripgrep overload - tool should not return more than 0.25mb max, but it can easily return more than 9mb in some cases

* changeset
2025-06-01 13:24:00 -07:00
Ara 084c0a73a3 Apply new edit tool to diff (#3944)
* add ls file tool description, parsing, and return formatting

* add json tool definition and remove extra '.'

* changeset

* use separate function for new format

* using json

* add grep tool new format

* add editTool definition

* Map MultiEdit tool to StreamingJsonReplacer with logs

* Adding support for non streamed json

* Adding logging

* moving multiedit tool into tool defs

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: pashpashpash <nik@nugbase.com>
2025-06-01 13:23:52 -07:00
Tomás Barreiro 092bd17921 feat: Add delay information when retrying requests (#3817)
* Add delay information when retrying requests

* Display delays

* refactor and add countdown
2025-06-01 12:23:47 -07:00
Ara 079d05c2cc Fixing OpenAI compatible to support cache token display (#3957)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-06-01 05:55:31 +05:30
Ara acc795ed69 Fix pricing and token counting for Xai Provider for the new Grok 3 family of models (#3956) 2025-05-31 11:49:29 -07:00
Elon Gliksberg 1aaa30ecce Closing MCP processes when app terminates. (#3876) 2025-05-31 01:44:03 -07:00
Sarah Fortune f7e5398ac8 Fix warnings for protobuf object literals (#3948)
Create protobuf objects with .create()
2025-05-31 01:35:29 -07:00
Gustavo A. Rodríguez Suárez 89f35b0800 Fix undefined type during chunk streaming (#1464)
* Fix undefined type when parsing response chunk in stream

* Fix undefined type when parsing response chunk in stream

* remove Cline.ts changes

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-05-31 00:02:28 -07:00
Sarah Fortune d7f30fdf73 Make the no-grpc-client-object-literals linter rule an error for the webview-ui (#3947)
* Fix linter warnings in the webview (part 2)

Replace protobus calls using object literals to use Message.create({...})

Fix incorrect property name detected after this change in webview-ui/src/components/settings/SettingsView.tsx

Optimised imports in vscode.

* formatting

* feat(lint): Add custom ESLint rules for protobuf type checking

Add two custom ESLint rules to enforce proper usage patterns when creating protobuf objects.

Using .create() to build protobufs ensures that the protobuf is type checked when it is created. Protobufs created using
object literals are not type checked,  which can lead to subtle bugs and type mismatches. The linter rules detect when protobufs are created without using .create() or .fromPartial().

- no-protobuf-object-literals: Enforces the use of `.create()` or `.fromPartial()` methods instead of object literals when creating protobuf types.

```
/Users/sjf/cline/src/shared/proto-conversions/state/chat-settings-conversion.ts
   9:9  warning  Use ChatSettings.create() or ChatSettings.fromPartial() instead of object literal for protobuf type
Found: return {
             mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT,
             preferredLanguage: chatSettings.preferredLanguage,
             openAiReasoningEffort: chatSettings.openAIReasoningEffort,
     }
  Suggestion: ChatSettings.create({
             mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT,
             preferredLanguage: chatSettings.preferredLanguage,
             openAiReasoningEffort: chatSettings.openAIReasoningEffort,
     })
```

- no-grpc-client-object-literals: Enforces proper protobuf creation for gRPC service client parameters. This needs a separate rule
because the type signatures of the ServiceClients methods are too generic to be detected by the previous rule.

```
/Users/sjf/cline/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx
   41:62  warning  Use the appropriate protobuf .create() or .fromPartial() method instead of object literal for gRPC client parameters.
Found: McpServiceClient.addRemoteMcpServer({
                             serverName: serverName.trim(),
                             serverUrl: serverUrl.trim(),
                     })
```

These rules help maintain code quality by enforcing consistent patterns for working with protocol buffers throughout the codebase, reducing potential runtime errors from improper message construction.

* Update test

* Add custom eslint rules to new webview-ui config

* Only include webview grpc ServiceClient check

* Fix lint errors

* formatting

* Update package.json

* Make the no-grpc-client-object-literals linter rule an error for the webview-ui

Fix the last occurrence of this issue.

* formatting
2025-05-30 20:31:14 -07:00
Sarah Fortune 0c6a4f9452 feat(lint): Add custom ESLint rules for protobuf type checking for protobus ServiceClients (#3946)
* Fix linter warnings in the webview (part 2)

Replace protobus calls using object literals to use Message.create({...})

Fix incorrect property name detected after this change in webview-ui/src/components/settings/SettingsView.tsx

Optimised imports in vscode.

* formatting

* feat(lint): Add custom ESLint rules for protobuf type checking

Add two custom ESLint rules to enforce proper usage patterns when creating protobuf objects.

Using .create() to build protobufs ensures that the protobuf is type checked when it is created. Protobufs created using
object literals are not type checked,  which can lead to subtle bugs and type mismatches. The linter rules detect when protobufs are created without using .create() or .fromPartial().

- no-protobuf-object-literals: Enforces the use of `.create()` or `.fromPartial()` methods instead of object literals when creating protobuf types.

```
/Users/sjf/cline/src/shared/proto-conversions/state/chat-settings-conversion.ts
   9:9  warning  Use ChatSettings.create() or ChatSettings.fromPartial() instead of object literal for protobuf type
Found: return {
             mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT,
             preferredLanguage: chatSettings.preferredLanguage,
             openAiReasoningEffort: chatSettings.openAIReasoningEffort,
     }
  Suggestion: ChatSettings.create({
             mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT,
             preferredLanguage: chatSettings.preferredLanguage,
             openAiReasoningEffort: chatSettings.openAIReasoningEffort,
     })
```

- no-grpc-client-object-literals: Enforces proper protobuf creation for gRPC service client parameters. This needs a separate rule
because the type signatures of the ServiceClients methods are too generic to be detected by the previous rule.

```
/Users/sjf/cline/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx
   41:62  warning  Use the appropriate protobuf .create() or .fromPartial() method instead of object literal for gRPC client parameters.
Found: McpServiceClient.addRemoteMcpServer({
                             serverName: serverName.trim(),
                             serverUrl: serverUrl.trim(),
                     })
```

These rules help maintain code quality by enforcing consistent patterns for working with protocol buffers throughout the codebase, reducing potential runtime errors from improper message construction.

* Update test

* Add custom eslint rules to new webview-ui config

* Only include webview grpc ServiceClient check

* Fix lint errors

* formatting

* Update package-lock.json

* Update package.json
2025-05-30 20:19:04 -07:00
Toshii c1e38e649c file selection proto input type change (#3945)
* request type

* changeset
2025-05-30 20:09:41 -07:00
Sarah Fortune b8a65a446a Fix linter warnings in the webview (part 2) (#3943)
* Fix linter warnings in the webview (part 2)

Replace protobus calls using object literals to use Message.create({...})

Fix incorrect property name detected after this change in webview-ui/src/components/settings/SettingsView.tsx

Optimised imports in vscode.

* Fix typo

* formatting
2025-05-30 19:37:27 -07:00
Daniel Steigman 6626124bef fix(bedrock): resolve AWS credential caching issue with Identity Manager (#3936)
* fix(bedrock): resolve AWS credential caching issue with Identity Manager

- Add ignoreCache option for profile-based authentication to detect external credential file changes
- Implement smart caching for manual credentials with 5-minute TTL to maintain performance
- Add configuration hash-based cache invalidation for manual credential changes
- Add invalidateCredentialCache() method for error recovery scenarios

Fixes issue where AWS Identity Manager credential updates were not detected,
requiring extension restart. Profile-based authentication now always reads
fresh credentials while manual credentials maintain performance through caching.

Resolves credential refresh issues reported by users using AWS Identity Manager
with role-based authentication workflows.

* Potential fix for code scanning alert no. 66: Use of a broken or weak cryptographic algorithm

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* merge conflict

* updated to fixe the original medrock issue

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-30 19:11:20 -07:00
Sarah Fortune 80f67c3c89 Fix linter warning for Protobus ServiceClient calls using object literals. (#3942)
Fix linter warnings in the first half of the webview.
2025-05-30 18:53:01 -07:00
Sarah Fortune 01afe5ec53 Use the same version of eslint for the webview as for the cline package. (#3940)
The webview and the cline package were using different version of eslint,
which makes it difficult to use custom rules because the webview version wants the rules as
ES modules, but the cline version wants commonJS modules.

Switch the webview to use the same version as the cline package.

Switch the webview eslint JS config to the json config file.
2025-05-30 18:43:34 -07:00
Evan 83928ccecc Add edit tool definition (#3939)
* add ls file tool description, parsing, and return formatting

* add json tool definition and remove extra '.'

* changeset

* use separate function for new format

* using json

* add grep tool new format

* add editTool definition

* removed changeset

* removed changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-30 16:10:33 -07:00
Sarah Fortune 38a1179e62 Rename SecretStore.storeSecret to SecretStore.store (#3897)
Apparently ChatGPT can't follow the SDK docs.
2025-05-30 15:45:17 -07:00
Sarah Fortune e0f9eeaa79 Use the webview-ui linter during npm run lint (#3938)
The webview-ui has an existing eslint config, but it was not being run as part of `npm run lint` command. Start running the webview specific linter (the top level linter doesn't run on tsx files, and webview linter has react specific checks).
Fix lint errors in slash-commands file.
2025-05-30 15:21:34 -07:00
Andrei Eternal f10a82916f Warn about rosetta on osx in build-protos (#3400)
* warn about rosetta on osx in build-protos

* make one console log better

* format

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: Andrei Eternal <eternal@cline.bot>
2025-05-30 15:05:07 -07:00
Tomás Barreiro da12437251 fix: update the model list when the client requests a refresh (#3882)
* update the model list when the client refreshes

* Refactor and use the grpc response instead of a webview message
2025-05-30 14:28:58 -07:00
Donovan Sydow fb3012f778 add llama4 models, and mis/codestral models to vertex api (#3474)
* add llama4 models, and mis/codestral models to vertex api

* update mistral context window sizes

* changeset

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-05-30 14:23:54 -07:00
pashpashpash 8336831d8f read tool + write tool + webfetch tool + question tool + usemcp tool + list code definition names tool + access MCP resource tool + load mcp documentation tool + attempt completion tool + browser tool + new task tool (#3925) 2025-05-30 13:16:37 -07:00
KevinTurnbull ec064426b3 Minimal change to respect Ollama Context Window Size (#3880)
* Respect the CtxNum setting for Ollama Models

Currently since the context window size isn't respected for Ollama models - the LLM does a naive truncation which removes important details. This leads to the model entering endless loops or making unsupported edits when operating as an agent.

* small change

* changeset

---------

Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>
2025-05-30 01:45:47 -07:00
canvrno 8f72bf11f7 optionsResponse protobus migration/removal (#3860) 2025-05-29 22:47:22 -07:00
pashpashpash 915cf76f85 Pashpashpash/bash tool (#3894)
* bashTool

* prettier

* alignment

* bashtool cont

* bash tool cont

* modularizing prompt a bit

* bash tool working

* bash tool now getting cwd

* bashTool

* forgot .name

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-29 20:09:07 -07:00
Toshii f1fef24f25 support xlsx and csv (#3922) 2025-05-29 18:41:21 -07:00
Peter Dave Hello ceb0900bf6 Update xaiModels and xaiDefaultModelId in src/shared/api.ts (#3814) 2025-05-29 18:29:30 -07:00
Toshii cc9fc9bd1f update chat box ui (#3868)
* chat area

* changeset

* arrow

* nit

* tailwind
2025-05-29 13:23:59 -07:00
Ara dcf59bc29f Fix Title for Cline on Windows (#3917)
* Fix Title for Cline on Windows

* Fix Title for Cline on Windows

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-30 01:04:54 +05:30
Caleb Eom 5c3e7a38d4 Scroll to message onclick from task timeline (#3890)
* Scroll to message onclick from task timeline

* version

* fixing ellipsis-dev's suggestion on potential infinite loop
2025-05-29 00:49:08 -07:00
github-actions[bot] d6ccbcdf22 v3.17.8 Release Notes
v3.17.8 Release Notes
2025-05-28 23:01:23 -07:00
pashpashpash e4e03fa0dd reverting timeout if no first chunk (#3899)
* reverting timeout if no first chunk

* Create fresh-days-end.md

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-05-28 21:04:48 -07:00
pashpashpash 10892670be exact antml (#3891)
* exact antml

* only one invoke

* linter warnings

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-28 19:12:26 -07:00
Evan 3c7a42c35d Add grep tool new format (#3893)
* add ls file tool description, parsing, and return formatting

* add json tool definition and remove extra '.'

* changeset

* use separate function for new format

* using json

* add grep tool new format

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-28 18:32:18 -07:00
Evan abfaf6ca7a LS is moar (#3883)
* add ls file tool description, parsing, and return formatting

* add json tool definition and remove extra '.'

* changeset

* use separate function for new format

* using json

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-28 16:15:38 -07:00
pashpashpash f699f1fd80 exact antml (#3887)
* exact antml

* moved system prompt after tool defs

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-28 16:07:17 -07:00
Sarah Fortune a6fbdcb5c1 Add secrets to the vscode extension context. (#3881)
* Add secrets to the vscode extension context.

Add a secrets store backed by a file.
Compile the standalone distribtion during `npm run pretest`

* Fix type

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Remove logging

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-28 15:02:21 -07:00
Sarah Fortune a4200869c9 Add java_package to state.proto (#3886) 2025-05-28 15:01:21 -07:00
canvrno 9f59b6010e browserConnectionResult removal (#3885) 2025-05-28 14:48:07 -07:00
canvrno 29d3175e0b Add ReadTool & WriteTool alternate tools (#3873)
* Added ReadTool and WriteTool alternate tool calls

* claude4 system prompt - add read & write alt tools
2025-05-28 14:08:46 -07:00
pashpashpash 600174322e created framework for idiomatic tool calling in claude 4 models (#3872)
* created framework for idiomatic tool calling in claude 4 models

* aligning

* Update src/core/tools/bashTool.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Fix Diff edit prompt

* commented out for now

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-27 23:39:33 -07:00
pashpashpash 9818d976dd Canvrno/modular system prompt (#3863)
* System prompt refactor

* Commented out model switching for now

* Claude4 system prompt switching

* cleanup

* added system.ts to prettier ignore

* workflow tips

---------

Co-authored-by: canvrno <kevin@cline.bot>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-27 22:42:58 -07:00
Andrei Eternal 3938e23cde [PROTOBUS] subscription for addToInput (#3781)
* Protobus subscription for addToInput

* formatfix

* prettier

* dont re-add selectedImages

---------

Co-authored-by: Andrei Eternal <eternal@cline.bot>
2025-05-27 21:43:14 -07:00
github-actions[bot] 86bb0c6ded Changeset version bump (#3864)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md for version 3.17.7

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-27 20:15:08 -07:00
Ara 36f57ce6c0 Fix Claude 4 family diff edit prompt (#3866)
* Fix Claude 4 diff edits prompt

* Show gemini 2.5 flash prompt cache

* Update src/core/prompts/system.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-27 20:02:11 -07:00
canvrno ed0181a114 showChatView protobus (#3862) 2025-05-27 18:19:51 -07:00
github-actions[bot] 439c62935d v3.17.6 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for version 3.17.6

* attribution

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-27 17:33:54 -07:00
Sean Gallen 9bc24ecd96 Minor fixes in the Documentation for broken links and typos. (#3820)
* fix bash commands

* fix links in the Context Management

* fix for internal links in Our Favorite Tech Stack
2025-05-27 17:17:34 -07:00
francis 2150e4882e feat: add vscode language model api config docs (#3836) 2025-05-27 17:15:04 -07:00
Toshii ee347bfe9d allow uploading more file types (#3824)
* Changeset version bump (#3740)

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md and package.json for version 3.17.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>

* process files

* grpc

* select files

* update messaging

* chat view support

* thumbnails base

* ui component

* more files

* pre file parsing

* keep old file

* base 3

* file passing update

* ui fixes

* task base

* header ui

* grpc

* changeset

* nit

* remove binary check

* small

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-27 17:13:15 -07:00
kevinneung 08d86990e2 Improve documentation for "For New Coders" page (#3785)
* Improve documentation for new coders

- Reorganized steps for better flow and clarity
- Added missing hyperlinks for better navigation
- Underlined hyperlinks for improved accessibility and visual consistency

* Update docs/getting-started/for-new-coders.mdx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-27 16:52:27 -07:00
Ara f74a8ba82e Show Gemini 2.5 Pro prompt cache (#3859)
* Show gemini 2.5 flash prompt cache

* Show gemini 2.5 flash prompt cache

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-28 04:42:41 +05:30
Evan ad51b7a4e1 reset recommended model (#3857)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-27 16:10:06 -07:00
Ara 94516092b1 Support Diff Editing for Claude 4 family of Models (#3816)
* feat: add JSON-based diff format for Claude 4 model family

- Bump version to 3.17.5
- Add @streamparser/json dependency for streaming JSON parsing
- Implement new JSON diff format in replace_in_file tool for Claude 4 models
- Add diff-json.ts module for handling JSON-based file replacements
- Update system prompts to use JSON format when Claude 4 model detected
- Enhance DiffViewProvider to support new JSON diff format

* Adding diffs

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-27 15:10:48 -07:00
Ara adf25681cc Add a beautiful experience for new users of Cline (#3719)
* Adding AGI Blog

* feat: disable quick wins feature in chat interface

Removes quick wins display by setting shouldShowQuickWins to false, cleans up related code in ChatView and simplifies component rendering logic. Also includes code cleanup in QuickWinCard component by removing redundant comments.

* Initial edit commands

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-27 14:34:43 -07:00
canvrno e2f73bce61 [PROTOBUS] remove invoke message, replace usage (#3609)
* invoke protobus migration

Updated Cline API invoke usage for GRPC

cleanup

* cleanup

* Updated ClineAPI

* cleanup

* Added ClineAPI tests

* removed invoke

* One line cleanup
2025-05-27 13:59:52 -07:00
Evan fec8626291 Migrate authCallback protobus (#3846)
* migrate authCallback

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-27 08:57:05 -07:00
Kevin Taylor 6fa819a170 Added Cerebras as a Provider (#3810)
* Added Cerebras as a Provider

* prettier fix

* prettier

---------

Co-authored-by: sam <sam@MacBook-Air-3.local>
2025-05-26 20:06:15 -07:00
Andrei Eternal 2ca3e9ac82 [PROTOBUS] Re-enable streaming state, fix the memory leak probably (#3754)
* Revert "fix: Address memory leak by bypassing subscribeToState gRPC stream for state updates (#3597)"

This reverts commit 8ab35a5b06.

* memory leak console boys

* cleanup

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: Andrei Eternal <eternal@cline.bot>
2025-05-26 18:17:09 -07:00
Luis Felipe Salazar Ucros 9d801a1a68 Sambanova models update list and docs link (#3419)
* update models list

* update docs link with utm

* remove tracking link
2025-05-26 15:50:59 -07:00
Trevor Hudson 7bfc00b80e add missing fuction (#3834) 2025-05-26 15:36:02 -07:00
canvrno a346f05e9c [PROTOBUS] Move requestTotalTasksSize to protobus (#3608)
* requestTotalTasksSize protobus migration

* Fix EmpyRequest value error

* removed hook

* Removed task size refresh actions from backend
2025-05-26 14:18:53 -07:00
Trevor Hudson 35929b6869 Use identify to enhance distinct user segmentation (#3765)
include backup id in front end

variables clarity
2025-05-26 12:12:24 -07:00
canvrno ffeee7e48d [PROTOBUS] Move openInBrowser to protobus (#3691)
* openInBrowser_protobus_migration
2025-05-26 11:20:37 -07:00
Evan 10239f0616 Migrate showAccountViewClicked protobus (#3787)
* Stop tracking auto-generated files, respect .gitignore

* migrate showAccountViewClicked

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-23 18:21:19 -07:00
Evan 9f1b01b561 Migrate openExtensionSettings protobus (#3786)
* Stop tracking auto-generated files, respect .gitignore

* migrate openExtensionSettings

* changeset

* remove comment

* Stop tracking auto-generated files, respect .gitignore

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-23 18:20:55 -07:00
Ara 7f641072d4 Adds telemetry to record the usage of keyboard and lightbulb icon shortcuts in Cline (#3695)
* Fix: Temporary revert protobus changes for Toggle plan and act mode

* Adding telemetry

* Adding telemetry

* Adding telemetry

* Adding telemetry

* Adding telemetry

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-24 05:02:12 +05:30
Evan cf0af8a3f0 Migrate openMcpSettings protobus (#3778)
* migrate openMcpSettings

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-23 14:46:53 -07:00
github-actions[bot] b9551c960a v3.17.5 Release Notes (#3777)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-05-23 09:50:58 -07:00
Saoud Rizwan f2ffe26aaf fix: add instruction to use valid SEARCH/REPLACE markers when diff edit fails (#3776)
* fix: add instruction to use valid SEARCH/REPLACE markers when diff edit fails

* Create proud-trains-give.md
2025-05-23 09:46:04 -07:00
github-actions[bot] fbe57b2f10 Changeset version bump (#3763)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-05-22 20:11:20 -07:00
Evan 7f3eb926ee Thinking budget slider rendering (#3762)
* render thinking budget slider

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 20:08:42 -07:00
Saoud Rizwan 2d390b56f6 v3.17.3 Release Notes (#3761)
* changeset version bump

* Updating CHANGELOG.md format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2025-05-22 19:44:16 -07:00
Saoud Rizwan 67f4caf2fe Revert package version to 3.17.2 in package.json (#3760)
* Revert package version to 3.17.2 in package.json

* Create red-pears-do.md
2025-05-22 19:34:12 -07:00
Saoud Rizwan 9b248ad6c2 Update package version (#3758)
* Update package version

* Create sour-lies-hear.md
2025-05-22 19:29:54 -07:00
Saoud Rizwan 45974ac925 fix: replace_in_file tool consistently failing with Claude 4 Sonnet due to a few specific quirks (#3757) 2025-05-22 19:26:07 -07:00
Sarah Fortune 2cedcc5a58 Add vscode CSS properties to the script get-vscode-usages.sh (#3752)
The script will report which vscode CSS vars are being used in the webview, as well the uses of the vscode SDK.
2025-05-22 16:18:08 -07:00
limitx0 14a0c60550 Fix the Syntax in zh-tw/README.md to Improve Text Rendering (#3724)
* Update zh-tw/README.md

Correct the Markdown syntax to properly display bold text.

* Update zh-tw/README.md

Insert line breaks for each item listed under ### 新增上下文.
2025-05-22 15:53:15 -07:00
github-actions[bot] cdf368c21c v3.17.2 Release Notes
v3.17.2 Release Notes
2025-05-22 15:43:07 -07:00
Toshii f3ae1340cf global workflows (#3709)
* backend global workflows

* base

* nit

* protos

* base 2

* ui

* Delete proto file

* changeset
2025-05-22 15:34:51 -07:00
David Nanyan 624fb8c8a1 [ISSUE-3707] Fix issue with process env (#3741)
* [ISSUE-3707] Fix issue with process env

* Add tests
2025-05-22 15:33:05 -07:00
Evan dbb5ac265d Claude 4 rest of updates (#3749)
* add protos files (#3736)

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>

* change package script

* rest of updates for vertex / bedrock

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 15:20:54 -07:00
pashpashpash 1fd137b684 z-index-fix on settings page (#3748)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-22 15:20:54 -07:00
github-actions[bot] a718cc950e v3.17.1 Release Notes
v3.17.1 Release Notes
2025-05-22 15:20:26 -07:00
Evan cea93d9e98 Update package script (#3738)
* add protos files (#3736)

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>

* change package script

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 12:56:27 -07:00
Evan 346c1f7eff Opus 4 max tokens (#3735)
* anthropic opus max tokens increased

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 12:47:23 -07:00
Evan 32f200e837 Prompt caching Claude 4 Openrouter/Cline (#3722)
* add prompt caching and suggested models

* wording

* change wording again

* remove opus recommended

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 12:44:33 -07:00
Evan 07a2daa827 Put protos back in gitignore (#3739)
* put protos back in gitignore

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-23 00:33:21 +05:30
github-actions[bot] a22fc10a72 v3.17.0 Release Notes
v3.17.0 Release Notes
2025-05-22 11:02:17 -07:00
Evan 0c306121aa Migrate didShowAnnouncement protobus (#3699)
* migrate didShowAnnouncement

* changeset

* remove comment

* make variable public

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 10:36:31 -07:00
pashpashpash 97139f713b settings cancel (#3734)
* settings cancel

* settings cancel

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-22 10:04:19 -07:00
Tomás Barreiro 77a877c6d3 fix: Replace the togglePlanActMode call with protobuf (#3730)
* Add togglePlanActMode to the WebviewMessage type

* replace the service call with a protobus client call
2025-05-22 09:56:43 -07:00
Evan 627590ff2a anthropic support (#3733)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 09:56:32 -07:00
Evan 6835870dee Model 4 UI prep (#3721)
* ui copy changes sonnet 4

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-22 20:40:03 +04:00
Daniel Trugman a48c37ee82 Fix requesty list models and usage (#3630)
* Fix requesty list models

* Fix requesty usage
2025-05-22 08:25:02 -07:00
canvrno 579b1f1968 [PROTOBUS] Move togglePlanActMode to protobus (fixed) (#3686)
* togglePlanActMode protobus migration

* metadata on request

* cleanup

* snake case in protos

* merge conflcits + removed metadata for consistency
2025-05-22 02:11:12 -07:00
Adil Riazudeen 331da0f802 fix: revert ServerConfigSchema to union. (#3716)
This type was changed from a union to a discriminated union based on
transportType. It seems like this is an internal implementation detail
that end users shouldn't really care about. This change reverts that
type back to a union.

Co-authored-by: Adil Riazudeen <adiriazu@amazon.com>
2025-05-22 01:25:32 -07:00
canvrno 782ed7ff21 [PROTOBUS] Move autoApprovalSettings to protobus (#3423)
* autoApprovalSettings protobus migration

* fixed merge conflict mistake
2025-05-21 23:56:38 -07:00
pashpashpash c511b91a09 New settings page, inspired by Yellow Bat and Roo <3 (#3720)
* new settings view tabs

* making sure things scroll

* tidying up

* changeset

* py

* bringing back mcp settings button

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 23:46:24 -07:00
Ara efb6ae1529 Changing Title wording for cline extension (#3712)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-22 10:37:16 +04:00
Toshii 58f80d4d16 NO MORE PROTO (#3715)
* delete ui proto

* changeset
2025-05-21 20:24:50 -07:00
Ara c3b556ddce Remove Advanced settings banner from MCP (#3713)
* Remove MCP Settings banner

* Remove Advnaced Settings banner

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 19:38:16 -07:00
wangyijing130 f16120fbfc fix the display from filename if type is windows (#3554)
Co-authored-by: wangyj20 <wangyj20@asiainfo.com>
2025-05-21 19:13:01 -07:00
pashpashpash 02002860ca when the assistant says to act mode we render a custom highlight with hotkey suggestion (#3708)
* when the assistant says to act mode we render a custom highlight with hotkey suggestion

* changeset

* console

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 18:11:17 -07:00
Akim Tsvigun b97e57fd4e Integration with Nebius AI Studio (#2789)
* Integration with Nebius AI Studio added

* changeset added

* tests fixed

* Nebius naming changed

* bugs fixed

* styling fixed

* minor bug fixed

* Remove obsolete ClineProvider.ts file that was causing build errors

* redundant 'Model' section removed for Nebius

* feat: add Nebius AI Studio to the list of inference providers (#2789)

- replace `nebiusModelId` to `apiModelId`
- add our latest models
- fix `getModel` method
- fix spaces and the link to Nebius AI Studio api keys
- delete extra code
- add a couple of tests

---------

Co-authored-by: Akim Tsvigun <aktsvigun@nebius.com>
Co-authored-by: Albert Abdulmanov <albertworks@nebius.com>
2025-05-22 05:10:44 +05:30
Andrei Eternal cd927ae279 gitignore protobuf generated files & git rm (#3661) 2025-05-21 14:39:46 -07:00
github-actions[bot] e2da226c10 v3.16.3 Release Notes
v3.16.3 Release Notes
2025-05-21 13:26:45 -07:00
Ara eae28f1cee Fixing Typescript type errors in MCP hub (#3700)
* Fixing Typescript type errors in MCP hub

* Fixing Typescript type errors in MCP hub

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 13:11:35 -07:00
pashpashpash 47eacdc545 Pashpashpash/rules links (#3701)
* adding docs links to rules modal

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 13:11:28 -07:00
Tomás Barreiro b669dfbc7e feat: Add devstrall-small-2505 to the Mistral model list (#3697)
* Add devstrall-small-2505 to the Mistral model list

* update context information and set as default
2025-05-22 01:23:35 +05:30
Tomás Barreiro 9f192768bc fix: handle mistral sdk api errors (#3698) 2025-05-22 01:20:39 +05:30
Alejandro Peral Taboada 8356e058c1 feat: support streameable http transport (#3413)
* feat: support Stremeable Http transport

* feat: add http to rpc method
2025-05-21 10:17:26 -07:00
pashpashpash 0870c65fa5 moar docs (#3689)
* title

* crosslinking and commands

* better

* fixing

* fixing inaccuracies

* language

* images

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 00:59:25 -07:00
Evan 36c0192bd2 Migrate refreshClineRules protobus (#3690)
* migrate refreshClineRules

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 22:58:34 -07:00
pashpashpash 65a63952e3 adding release workflow (#3646) 2025-05-20 21:18:41 -07:00
Evan c6dbbdb43d Migrate openSettings protobus (#3684)
* use navigation directly for openSettings

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 21:09:38 -07:00
github-actions[bot] 1a66f64679 v3.16.2 Release Notes
v3.16.2 Release Notes
2025-05-20 18:59:01 -07:00
pashpashpash debcbd537f Docs (#3682)
* pr-review workflow

* docs

* at mentions

* titles

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-20 18:40:44 -07:00
Ara 6938809051 Fix: edge case of changing language in settings (#3681)
* Fix: edge case of changing language in settings

* Fix: Temporary revert protobus changes for Toggle plan and act mode

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-20 18:39:36 -07:00
Ara b737911cdc Fix: Temporary revert in protobus changes in toggle plan and act mode (#3683)
* Fix: Temporary revert protobus changes for Toggle plan and act mode

* Fix: Temporary revert protobus changes for Toggle plan and act mode

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-20 18:14:50 -07:00
Evan 1de02e9ab2 Migrate silentlyRefreshMcpMarketplace protobus (#3628)
* migrate silentlyRefreshMcpMarketplace

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 17:47:06 -07:00
canvrno 08d4240e70 [PROTOBUS] Move openMention to protobus (#3607)
* openMention protobus migration

* Cleanup and comments

* rebase
2025-05-20 17:40:16 -07:00
omercelik fe13ce8d6f feat: added gemini flash 05-20 (#3680)
* feat: added gemini flash 05-20

* feat: added gemini flash 2.5 05-20 to gemini models also

* Create funny-adults-tease.md
2025-05-20 17:24:00 -07:00
Evan 7fe7605a85 Migrate updateTerminalConnectionTimeout protobus (#3669)
* migrate setActiveQuote

* changeset

* migrate updateTerminalConnectionTimeout

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 17:10:33 -07:00
Evan f0e352489f Migrate toggleWindsurfRule protobus (#3677)
* migrate toggleWindsurfRules

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 16:55:53 -07:00
Sarah Fortune aff78bda7c Fix build-protos script on windows (#3670) 2025-05-20 16:30:15 -07:00
Evan c7c1d37379 Migrate setActiveQuote message to protobus (#3668)
* migrate setActiveQuote

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 16:29:16 -07:00
canvrno e6da7c7282 [PROTOBUS] Move browserRelaunchResult to protobus (#3675)
* browserRelaunchResult protobus migration

* one small change

* cleanup

* Removed status bool, used common message
2025-05-20 16:21:24 -07:00
Evan 78c3c5eff2 Migrate toggle tool auto approve protobus (#3614)
* migrate toggleToolAutoApprove

* changset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 15:25:46 -07:00
Ara 6b243ee826 Remind VS code users of clines existence(Open Cline on AutoUpdate+KeyboardShortcuts+Lightbulb icons) (#3640)
* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

* Focus cline when on update

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-21 03:53:14 +05:30
Evan 14a056ed3e Migrate toggleCursorRule protobus (#3676)
* migrate toggleCursorRule

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 14:45:48 -07:00
canvrno 086879d149 [PROTOBUS] Move scrollToSetting to protobus (#3648)
* scrollToSetting protobus migration

* one small change
2025-05-20 13:10:47 -07:00
Evan 7a24c10188 Migrate toggleClineRule protobus (#3638)
* migrate toggleClineRule

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 12:31:45 -07:00
Evan 6cf5fdadb9 remove markdown (#3667)
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 09:47:44 -07:00
Evan ee9ddef7c5 Centralize navigation message handling (#3650)
* centralize navigation message handling in the extension state context

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 09:29:04 -07:00
pashpashpash 699d312dbb docs improvements (#3659)
* docs improvements

* new rule slash command no screenshot

* docs

* language

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-20 01:30:14 -07:00
canvrno c3caec253f [PROTOBUS] Move togglePlanActMode to protobus (#3647)
* togglePlanActMode protobus migration

* metadata on request

* Mode enum, removed metadata in request
2025-05-19 21:54:56 -07:00
Evan c47503affe Migrate accountLogoutClicked protobus (#3652)
* migrate accountLogoutClicked

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-20 10:11:23 +05:30
Evan 5efbf77f7c Migrate delete mcp server protobus (#3612)
* migrate deleteMcpServer

* changeset

* changed to stringrequest

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-19 20:17:58 -07:00
Tomás Barreiro 1700c0e4f8 Run tests against Windows and Ubuntu (#3246)
* add a matrix strategy for testing

* Handle EOL on Windows

* use bash as shell on every os and run the test-ci script

* fix tsconfig path resolution using the __dirnname

* print test results regardless of status

* Limit artifact upload to Linux

* update the test-cli

* Add windows-specific dependencies as optional dependencies

lightningcss-win32-x64-msvc
rollup-win32-x64-msvc

* Do not collect coverage on Windows

* Use UTF-8 on the Python Scripts

* force the ubuntu-latest name to be `test`
2025-05-19 13:32:35 -07:00
Tomás Barreiro c535a5ec73 Fail the workflow on webview test errors (#3275)
* do not exit with status code 0 if tests fail

* fix broken tests

* use a data-testid to find the button

* Fix API options test
2025-05-19 23:22:49 +05:30
canvrno 644280bbb4 copyToClipboard protobus migration (#3615) 2025-05-19 10:37:34 -07:00
Evan 43357c1100 Migrate restartMcpServer protobus (#3606)
* migrate restartMcpServer

* changeset

* remove markdown file

* use stringRequest

* fix type

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-18 17:13:18 -07:00
canvrno eb19731843 taskCompletionViewChanges protobus migration (#3588) 2025-05-18 13:30:33 -07:00
github-actions[bot] 95750f8c9c v3.16.1 Release Notes
v3.16.1 Release Notes
2025-05-17 17:43:34 -07:00
Ara 12820a4042 Improve Gemini Retry Handling UI and UX (#3589)
* Feat: Display API auto-retry status in chat UI

This commit enhances user experience by providing real-time feedback
on automatic API request retries directly within the chat interface.
When an API request encounters a retriable error (e.g., 429), the UI
will now indicate that a retry is in progress, showing the current
attempt, maximum attempts, and delay until the next attempt.

Key changes:
- Modified the `withRetry` decorator in `src/api/retry.ts` to accept
  an `onRetryAttempt` callback. This callback is invoked before each
  retry, passing details like attempt number, max retries, delay, and
  the error that triggered the retry.
- `Task` (`src/core/task/index.ts`) now provides this callback to API
  handlers. It updates the `api_req_started` message in `clineMessages`
  with `retryStatus` information and posts the updated state to the
  webview. It also clears retry status if retries are exhausted.
- The `ChatRow.tsx` component in the webview UI has been updated to
  display this retry status (e.g., "Retrying (attempt X of Y, next in Zs)...").
  If retries are exhausted, the standard error display is shown.
- Data structures in `src/shared/` (ExtensionMessage, api, proto/file)
  were updated to include `retryStatus` and the `onRetryAttempt` callback.
- Added test code to `GeminiHandler` (`src/api/providers/gemini.ts`) to
  simulate 429 errors, allowing for easier testing and verification of
  the retry feedback mechanism.

* Remove TaskTimeLine altogether

* Remove TaskTimeLine altogether

* Update src/core/task/index.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-17 17:28:25 -07:00
Frostbourne 8e3adb42d6 Auto approve toggle switch (#3592)
* Add Enable AA button, rename toggle all, rm icons from bar

* Fix auto-approve bar not working and centralize feature

* move tooltip

* changeset
2025-05-17 17:26:59 -07:00
Ara 8ab35a5b06 fix: Address memory leak by bypassing subscribeToState gRPC stream for state updates (#3597)
* fix: Address memory leak by bypassing subscribeToState gRPC stream for state updates

* Remove TaskTimeLine altogether

* Remove TaskTimeLine altogether

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-17 17:12:35 -07:00
Sarah Fortune ba64d9fafb Don't use symlinks in the standalone distribution zip. (#3582)
Don't install vscode with file:./vscode because it creates a
symlink which is not portable for the distribution.
2025-05-17 14:52:19 -07:00
canvrno 2ba2b5b264 fetchOpenGraphData protobus migration (#3549) 2025-05-17 14:52:02 -07:00
canvrno 0dad8e178a [PROTOBUS] Move resetState to protobus (#3573)
* resetState protobus migration

* changeset
2025-05-17 14:51:27 -07:00
canvrno 1470563142 taskFeedback protobus migration (#3590) 2025-05-17 14:49:55 -07:00
github-actions[bot] 0ca16961ee v3.16.0 Release Notes
v3.16.0 Release Notes
2025-05-16 16:54:28 -07:00
canvrno 8d8452e668 [PROTOBUS] Move askResponse to protobus (#3539)
* askResponse protobus migration

* Standalone script updated
2025-05-16 12:29:33 -07:00
Matthew Rogers 6c18d5154f fix: permit use of global endpoint for vertex ai (#3469) 2025-05-17 00:07:12 +05:30
Evan aabe4ae1e1 Check if new user (#3586)
* add detection for new users for intro component

* fix lint issue

* changeset

* remove redundant fragment

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-16 23:43:08 +05:30
Toshii 5147e28aaf workflows (#3540)
* remove workflows subdirectory from cline local toggles

* set workflow toggles

* pre-updating the rules deletion logic

* delete file logic

* integration with task

* words

* pre-updating storage structure of workflows

* workflow menu items, no regex

* slash menu scrolling

* menu buttons

* placeholder

* match command base

* regex

* nit

* slash menu click outside

* changeset

* fixing linter warning

* better UI/UX

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-15 22:20:20 -07:00
Dimosthenis Kaponis c6e8b04b86 feat: Enhance HistoryPreview component with collapsible/expandable ta… (#3534)
* feat: Enhance HistoryPreview component with collapsible/expandable task history view

* fix: Update font size for empty state/'No recent tasks' message in HistoryPreview component
2025-05-15 21:38:53 -07:00
Tomás Barreiro c0b3c69a8f Consider the previous message as last if the last is a checkpoint (#3571) 2025-05-15 20:55:38 -07:00
Evan 080ed7c1c6 Add Extension Recommendation (#3530)
* add tailwind css intelliSense rec

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-15 20:53:14 -07:00
canvrno 570ece3284 selectImages protobus migration (#3575) 2025-05-15 18:58:58 -07:00
Frostbourne 8f6f6464a0 Inject react-devtools (#3569) 2025-05-15 15:43:06 -07:00
Sarah Fortune 8c565b5a7c Run the cline extension as a standalone process outside of vscode. (#3535)
* Add standalone cline server.

Add directory standalone/ with the scripts to generate
a cline instance that runs a gRPC service for the proto bus.

* Rm unused dependencies

* Build standalone extension

Build stubs for the whole vscode SDK.

Import extension.js instead of putting everything in one file.

Move all the files the extension needs at runtime in files/
  Use local packages for vscode and stub-utils instead of module alias.
  Move vscode-impls into the vscode module.
  Create separate package.json for the standalone extension in files/.

* Handlers for gRPC requests

Add code to the bottom of extension.js to export the gRPC handlers.
Add a wrapper to the handlers to catch and log extensions, otherwise the whole server process fails.
Fix use of open module.

* Standalone gRPC server

Export handers from the extension.
Add reflection and healthcheck to the server.
Add vscode launch file for standalone server.

* Fix formatting

* Better error handling in the server template.

Exit if the server could not bind to the port.
Use internal error code if exception is thrown.

* Formatting

* Stop using google-protobuf npm module to generate JS for protos

The code generated by google-protobuf cannot serialize protos from plain objects. It needs the protos to be class instances created with ProtoExample.create().
But, the protos created in the extension are just POJOs.
Use protoLoader instead which is fine with plain objects.
Protoloader is also the method used in the grpc JS documentation: https://grpc.io/docs/languages/node/basics/#loading-service-descriptors-from-proto-files

* Rm proto that was removed in cline/cline

* Rm old protos when building standalone extension.

* Log gRPC requests

* feat(standalone): implement TypeScript gRPC-based standalone extension

The major improvement is that the gRPC implementation is now written in TypeScript instead of JavaScript, and the standalone extension is compiled together with the original extension rather than using the compiled JS output. This provides full type safety throughout the codebase and prevents issues with the TypeScript compiler renaming handlers during compilation, making the system more robust and maintainable.

- Add new standalone implementation files in src/standalone/ directory using TypeScript
- Implement gRPC server setup in extension-standalone.ts with full type safety
- Generate server setup code with service registrations
- Update build script to support the new standalone architecture
- Reorganize runtime files from standalone/files/ to standalone/runtime-files/
- Replace template-based server generation with gRPC service registration

* Fix issues when doing clean build

Use correct build dir in esbuild.js
Remove undefined type.

* Add handler for gRPC methods with streaming response.

Add a handler-wrapper for rpc's with streaming responses.

Fix issue where grpc-js won't deserialize protos in camelcase. It is the default
for generated code for protos to use camelcase (keepCase: false), but I cannot find
where is being set for the proto serializations to keep the case. For now, just convert the
properties of the proto messages to snake case. This is not a good
solution, but trying to fix this is time sink.

* Formatting

* Add streaming response support to the script that generates setup-server.ts

Add types for the handlers.

* Formatting

* Fix case conversion for gRPC requset protos as well.

Convert snake case to camelcase for incoming request protos.

* formatting

* Improve build process / building for standalone extension

Add separate configs for the extension and the standalone in the esbuild config.
Modules that use __dirname to load files at runtime are marked as external in the build config.
Rename vscode-impls to vscode-context.
Remove unecessary files from the standalone runtime.

* Rename extension-standalone.js to standalone.js

* Move generate-server-setup script to protos dir.

Add the script the npm target `protos`, so it is run when the protos are regenerated.

* formatting

* Add a post build step for the npm run target `protos` to format the generated files.

* Move generate-server-setup to scripts directory

* Add a JS script to package the standalone build, replacing the shell script.

Add a post build step for the standalone target that:
    * copies the vscode module files into the output directory.
    * checks that native modules are not included in the output
    * creates a zip of the build.

* Rm files that were included from merge by mistake

* Move scripts from standalone in scripts directory

Remove unused package.json files from standalone/

* Update scripts and launch.json to use correct paths

* During build install external modules in the dist directory.

Add package.json for the distribution.
Set the node path for the vscode launch config.
Make the prettier silent during `npm run protos`

* Fix ellipsis suggestions
2025-05-15 12:04:46 -07:00
Ara cd1ff2ad25 Refactor reasoning effort option and checkpoint handling (#3454)
• Replace "o3MiniReasoningEffort" with "reasoningEffort" in API providers
• Remove deprecated configuration properties from package.json
• Guard checkpoint tracker initialization and saving using the enableCheckpoints flag

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-15 22:24:16 +05:30
github-actions[bot] d2979631d8 v3.15.5 Release Notes
v3.15.5 Release Notes
2025-05-14 21:20:15 -07:00
Frostbourne 4dfc1358c5 Migrate Task Timeline tooltip to HeroUI (#3547)
* Task Timeline tooltip heroui migration

* decrease closeDelay, and changeset
2025-05-14 21:01:20 -07:00
Tomás Barreiro 6a96c183a3 Handle Gemini Rate Limits (#3532) 2025-05-14 20:23:13 -07:00
pashpashpash 9df023b9d0 reverting closing diff edit view because it didnt help gray screen issues (#3546)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-14 20:06:07 -07:00
pashpashpash 19e4387b86 Optimizing memory management for task timeline via virtuoso (#3545)
* optimizing memory management for task timeline via virtuoso

* removing logs

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-14 19:54:24 -07:00
Saoud Rizwan ab01a518d1 Allow blank issues (#3543) 2025-05-14 19:29:27 -07:00
Evan a66724e312 Refactor auto approve menu to modal (#3537)
* refactor auto approval menu to modal

* changeset

* move constants to shared location; change chevron dynamically; remove useless notes

* address comments

* improve spacing

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
2025-05-14 19:08:53 -07:00
github-actions[bot] cc56486814 v3.15.4 Release Notes
v3.15.4 Release Notes
2025-05-14 16:32:14 -07:00
Dennis Bartlett 277b20a1b2 Add gemini model back to vertex provider (#3538) 2025-05-14 16:27:08 -07:00
Ara 55d12d7556 feat: Add performance telemetry for Gemini API streams (#3523) 2025-05-14 11:01:44 -07:00
canvrno a527acc56c Feat: Workspace filter in Task History View (#3476)
* Filter tasks to current workspace

* Switched custom radio button to tailwind
2025-05-14 10:50:09 -07:00
Sarah Fortune dc1d7f51cb Create proto descriptor set in build-protos.js script. (#3524)
* Create proto descriptor set in build-protos.js script.

Create the descriptor set that will be used by the standalone cline service.
Add the standalone dist directory to the gitignore.
Only call protoc once when generating typescript files, instead of for each file separately.

* Fix undefined var in error message

* Inline the exec options
2025-05-13 17:28:06 -07:00
github-actions[bot] 4ff7e06044 Changeset version bump (#3490)
* changeset version bump

* Updating CHANGELOG.md format

* ready for hotfix release

* language

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-13 16:27:35 -07:00
Dennis Bartlett 2968c8d99c Fix API Options Types in Tests (#3522) 2025-05-13 16:14:21 -07:00
pashpashpash c617d2550e fixing parsing v2 thanks to @cte (#3520)
* fixing parsing v2 thanks to @cte

* fixing parsing v2 thanks to @cte

* cleaner PR

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-13 15:58:29 -07:00
pashpashpash 7937530c74 Remove free gemini models (#3494)
* removing free gemini provider

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-13 15:57:19 -07:00
Frostbourne 3657e903f5 Auto-approve menu stylistic fixes (#3504)
* marginal improvements

* undo forbidding enable all favorite

* changeset
2025-05-13 15:42:10 -07:00
kevinneung 0fcab4d989 Fix/chrome remote debugging user data dir (#3492)
* fix: Add required --user-data-dir flag when launching Chrome with remote debugging port

When Chrome is launched with the --remote-debugging-port flag, it requires a non-default user data directory to be specified using the --user-data-dir flag. Without this flag, Chrome shows the error 'DevTools remote debugging requires a non-default data directory' and the debug port is not opened.

This fix adds the --user-data-dir flag when launching Chrome with the remote debugging port, which resolves the 'Chrome was launched but debug port is not responding' error.

* Add changeset for Chrome remote debugging fix

* fix: Add required --user-data-dir flag when launching Chrome with remote debugging port

* Update src/services/browser/BrowserSession.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Revert "Update src/services/browser/BrowserSession.ts"

This reverts commit 5dbd82aea2.

* import os, quote path arg

* apparently quotes are bad

* probably dont need the whole warning and relaunch flow now

* rename button labels to launch browser

---------

Co-authored-by: Andrei Eternal <garoth@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-05-14 00:59:31 +05:30
Trevor Hudson afb64c896e add boostrap (#3502)
* add boostrap

* make sure machine ID is there
2025-05-13 11:47:27 -07:00
canvrno 65f1b05420 FIX: Detect directory change when reusing active terminals (#3503)
* Added confirmation of a sucessful cd prior to executing commands in active terminals

* typo fix, fine tuning

* cleanup
2025-05-13 01:27:27 -07:00
Andrei Eternal 8f37543800 add arm rollup to optional deps so cline can build on my arm linux (#3498)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-05-12 20:18:45 -07:00
canvrno abbe40ee9c [PROTOBUS] Move downloadMcp to protobus (#3487)
* downloadMcp protobus migration

* added setIsDownloading(false) to error handling
2025-05-12 20:17:47 -07:00
canvrno 5c082762c4 toggleFavoriteModel protobus migration (#3488) 2025-05-12 20:17:38 -07:00
Frostbourne 4a230ad878 Add Fireworks API Provider (#3496)
* initial

* finishing touches

* Update webview-ui/src/utils/validate.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update webview-ui/src/components/settings/ApiOptions.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* requested changes

* fix url

* fix vars

* Update webview-ui/src/components/chat/ChatTextArea.tsx

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>

* Update fireworks API link

* Improve margins

---------

Co-authored-by: Matt Apperson <me@mattapperson.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-05-12 19:59:28 -07:00
pashpashpash 94c432f3f3 Activation Events (#3491)
* adding activation events so cline is activated when vs code is open

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-12 17:01:16 -07:00
Toshii d88c07c932 PROTO refactor condense tool (#3489)
* proto for condense

* changeset

* condense text
2025-05-12 16:41:13 -07:00
github-actions[bot] 5ee5577010 Changeset version bump (#3453)
* changeset version bump

* Updating CHANGELOG.md format

* changelog + version

* changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-12 15:53:53 -07:00
ksmkzs 01877c1629 fix: prevent IME composition Enter from auto‑sending edited message (#3477) 2025-05-12 15:37:57 -07:00
Toshii f8a7b563aa PROTO refactor reportbug (#3485)
* protos report bug

* changeset
2025-05-12 15:35:31 -07:00
Trevor Hudson 915555f80f Trevhud/auto approve (#3486)
* ship with good defaults

* show items that are checked

* add close button at bottom

* changeset
2025-05-12 15:19:06 -07:00
Ara 26eafd96dd fix: Resolve all different copy paste issues once and for all (#3443)
* Enhance copy functionality in ChatView to handle selections within code blocks. If the selection is inside a <pre><code> block, copy plain text; otherwise, convert HTML to Markdown before copying. This improves user experience when copying code snippets.

* Make jumps better please

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-12 15:14:30 -07:00
Trevor Hudson e504b9d414 Trevhud/telem defaults (#3449)
* fresh install mode

* add nocapture

* add ui host

* changeset
2025-05-12 13:58:25 -07:00
Toshii 312777ddc5 Remove explicit caching for gemini in OR / Cline provider (#3470)
* remove explicit cache

* changeset
2025-05-12 13:04:19 -07:00
Evan c79acf5ffe Disable breaking out of diff auto scroll (#3473)
* disable breaking out of auto scroll

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-12 12:37:05 -07:00
Shravan Vadeghar 7d5d347cdd feat: Add optimized V2 parser for assistant messages (#3425)
This commit introduces `parseAssistantMessageV2`, a new function designed to parse assistant message strings containing text and XML-like tool usage tags (`<tool_name>...</tool_name>`, `<param_name>...</param_name>`).

Motivation:
The original parser (`V1`) used a character-by-character accumulator, which could lead to performance overhead due to repeated string concatenations and checks (`endsWith`). V2 aims to improve parsing efficiency.

Implementation Details (V2 vs V1):
- V2 iterates through the string using an index and checks for tags using `startsWith` with calculated offsets, avoiding the V1 accumulator.
- It tracks start indices for text, tools, and parameters, performing `slice` operations only when a block is completed or the string ends.
- Known tool and parameter opening tags are precomputed into Maps for potentially faster lookups.
- Special handling for nested tags within `write_to_file`/`new_rule` content parameters is preserved using `indexOf`/`lastIndexOf`.

Other Changes:
- The original parser implementation has been renamed to `parseAssistantMessageV1`.
2025-05-12 12:21:44 -07:00
pashpashpash 95cc15a142 Releasing memory after every diff edit - greyscreen fix? (#3459) 2025-05-12 11:17:13 -07:00
Sarah Fortune f7d464a51d Add request param to accountLoginClicked. (#3471)
All the handlers need to have the same signature f(controller, request),
otherwise the typechecker will be unhappy when setting up the gRPC server.
2025-05-12 18:52:58 +01:00
Hiroki Nakashima a6c4c0c0ea feat: Add detailed configuration options for LiteLLM provider (#2056)
* add configuration to litellm

* update defualt model name

* fix typo

* add changeset

* update default model

* remove model cost setting

* add temperature setting

* remove redandant comment

* use const

* handle model change

* fix unsaved bug
2025-05-12 23:10:44 +05:30
Ara 976a8fa85e Migrate Browsertools settings to the webview from Vscode settings (#3444)
* Removing redundant settings

* Add chromeExecutablePath to BrowserSettings and UpdateBrowserSettingsRequest

- Introduced optional chromeExecutablePath field in BrowserSettings and UpdateBrowserSettingsRequest.
- Updated updateBrowserSettings function to merge new settings with existing ones, preserving previous values.
- Enhanced BrowserSession to check for the chromeExecutablePath in global state.
- Modified BrowserSettingsSection to include a UI input for specifying the Chrome executable path.

* Removing browser stuff

* Removing browser stuff

* Removing browser stuff

* Removing browser stuff

* Add cute animation

* Add cute animation

* Add cute animation

* Add cute animation

* Add cute animation

* Add cute animation

* Add cute animation

* adding stuff

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-12 23:06:37 +05:30
canvrno 33413e91c6 refreshRequestyModels protobus migration (#3422) 2025-05-11 22:42:14 -07:00
Sarah Fortune 801c59e75e Use correct type for return value of accountLoginClicked. (#3447)
Return type should be cline.String not String from JS global namespace.
Use await when calling async function vscode.env.openExternal.
2025-05-11 22:39:36 -07:00
Trevor Hudson df9c8e2e80 Trevhud/vite auto (#3448)
* move enable all

* add tooltip

* changeset

* fix spacing and move notifications to other section
2025-05-11 16:47:59 -07:00
canvrno 4d480ea3fe Add telemetry enable/disable controls by category to TelemetryService (#3450) 2025-05-11 14:53:33 -07:00
github-actions[bot] 7e26d1117a Changeset version bump (#3440)
* changeset version bump

* Updating CHANGELOG.md format

* package lock

* changelog

* brackets

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-10 19:39:04 -05:00
pashpashpash b04810c480 increased error timeout from 500 -> 5000 for windows users (#3439)
* increased error timeout from 500 -> 5000

* conditionally setting to 5000 if windows

* Create rude-bats-brush.md

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-05-10 17:23:14 -07:00
github-actions[bot] 5255da936f v3.15.0 Release Notes
v3.15.0 Release Notes
2025-05-09 17:18:17 -07:00
Evan 248871d770 Simple home header (#3424)
* simplified home header

* changeset

* add variable color logo for different themes

* random slash

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-09 17:26:07 -05:00
nutstore-dev c634bf6368 fix: make sure clineIgnoreController initialized before task start (#3410)
Co-authored-by: weiwenhan <weiwenhan@cn.nutstore.net>
2025-05-09 13:21:02 -07:00
Ara f5dbfaf234 fix: Restore native copy functionality in chat input text area (#3416)
* fix: Restore native copy functionality in chat input text area

* fix: Restore native copy functionality in chat input text area
2025-05-09 10:32:06 -07:00
Trevor Hudson aa4d97f05d Trevhud/auto approve menu (#3405)
* improved auto-approve

* roll back chevron

* changeset

* add pills

* back to checkboxes

* turn on parent when subAction is turned on

* use vscode colors

* Update webview-ui/src/components/chat/auto-approve-menu/AutoApproveMenu.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update webview-ui/src/components/chat/auto-approve-menu/AutoApproveMenu.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* improve responsiveness

* remove opacity animation

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-09 22:47:14 +05:30
Toshii c20a513b70 prompt wording (#3409)
* base

* changeset
2025-05-09 01:19:02 -07:00
Toshii 738c03ff3e slash command report bug (#3387)
* slash command report bug

* nits

* nits

* sigh, portible way to open urls with proper escaping because vs code api is broken

* only asking for non-algorithmically derived info

* Update webview-ui/src/components/chat/ChatView.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* gather user system info

* Revert "gather user system info"

This reverts commit fb16c72224.

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-09 01:10:44 -07:00
canvrno e8a68c49ce [PROTOBUS] Move refreshOpenAiModels to protobus (#3403)
* refreshOpenAiModels protobus migration

* changeset

* Debounce OpenAi model list refresh when users are typing

* debounce cleanup
2025-05-08 23:33:12 -07:00
pashpashpash 961400fdca Fixing task lockout after shell integration stream bug leading to terminal hang (#3404)
* shell timeout bug throw error

* changeset

* explanation in comments

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-08 17:23:00 -10:00
canvrno 8827b167ca [PROTOBUS] Move refreshOpenRouterModels to protobus (#3401)
* refreshOpenRouterModels protobus migration

* changeset

* cleanup

* Ellipsis inspired changes

* one small change
2025-05-08 20:14:49 -07:00
Andrei Eternal e1389a62c7 run prettier correctly on generated protos (#3399)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-05-08 13:21:54 -10:00
canvrno 7b416ccc70 Feat: Task Favorites ️ (#3392)
* Task Favorites

* Task management docs
2025-05-08 15:49:05 -07:00
Alex 29f3cfa894 Update index.css (#3367) 2025-05-09 03:18:53 +05:30
Ara 978f34e30b Supporting implicit Caching in Gemini (#3394)
* Refactor GeminiHandler to remove caching logic and update pricing structure

* Removed the enhanced caching system and related logic from GeminiHandler.
* Updated the pricing structure for cache reads in both geminiModels and vertexModels.
* Simplified the message creation process by eliminating unnecessary cache checks and operations.

* Fixing Gemini and vertex cache pricing

* Fixing Gemini and vertex cache pricing

* Update src/api/providers/gemini.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-09 03:17:41 +05:30
canvrno 445e25221a [PROTOBUS] Move requestVsCodeLmModels to protobus (#3344)
* Task Favorites

* getOllamaModels protobus migration

* VsCodeLmModels protobus migration

* cleanup
2025-05-08 10:50:23 -10:00
Ara 489a05117c Increasing file sizes for files that can be read by cline (#3396)
* Increasing file sizes for files that can be read by cline

* Update src/integrations/misc/extract-text.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Increasing file sizes for files that can be read by cline

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-08 12:55:40 -07:00
WinterYukky e572ee44f9 fix(bedrock): application inference profile is not work (#3388)
* fix(bedrock): application inference profile is not work

* chore: add change set

* chore: change the encoding condition to whether it contains a slash
2025-05-09 00:26:05 +05:30
pashpashpash f4e14bfe3b removing sparkle from command name (#3395)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-09 00:16:40 +05:30
watany bddc1b5e96 fix(bedrock); update bedrock api (#3157)
* fix nova

* haiku

* changeset

* changeset

* clean up duplicate changeset

* commented caching write
2025-05-08 10:52:08 -07:00
pashpashpash cb0de8f17e tracking models in diff edit failures (#3297)
* tracking models in diff edit failures

* prettier

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-08 12:33:29 -05:00
Evan e1a0b244de Conditionally initialize posthog webview (#3381)
* conditionally initialize posthog client webview

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-08 12:08:40 -05:00
Dennis Bartlett a9d5411bf0 Revert "Update deployer team name (#3377)" 2025-05-08 06:57:18 -05:00
Dennis Bartlett 16af9125ec Update variable name (#3384) 2025-05-08 06:51:55 -05:00
Ara 2792e7698f Raise Errors when users try to upload images larger than 7500x7500 pixels (#3336)
* Adding iamge dimension check

* Adding iamge dimension check

* Adding iamge dimension check

* Adding iamge dimension check

* Adding iamge dimension check

* Adding iamge dimension check
2025-05-07 23:48:04 -07:00
Wesley Smith d02e5a89e5 fix excessive markdown format character escaping (#3355)
* fix excessive markdown format character escaping

* add changeset

* made it a little more robust

---------

Co-authored-by: Wesley Smith <wes@neofactory.ai>
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-07 22:31:31 -07:00
Dennis Bartlett 20f19917d3 Add org to team affiliation check (#3380) 2025-05-08 00:01:42 -05:00
Evan 7e5cd52864 Always allow textarea typing (#3356)
* enable text area while cline is doing stuff

* changeset

* add sendingDisabled to dependency array

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-07 22:01:07 -07:00
pashpashpash 4622ad767b Copy buttons (#3373)
* copy button in task header

* changeset

* added copy buttons to assistant messages that show up on hover

* added aria

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-07 21:59:42 -07:00
Dennis Bartlett 96048d5ac5 Update deployer team name (#3377)
* Update deployer team name

* Create clever-balloons-wave.md
2025-05-07 23:37:33 -05:00
Ara facec93082 Adding Mistral 3 medium model (#3366)
* Fixing Gemini and vertex cache pricing

* Fixing Gemini and vertex cache pricing
2025-05-08 05:46:09 +05:30
Saoud Rizwan c040be9eb1 Disables autocaptures when initializing feature flags 2025-05-07 15:55:33 -05:00
Evan 8d3cf53289 Docs: image links (#3350)
* add cdn image links

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-07 13:41:42 -05:00
Trevor Hudson 83c4a82e6d Diable auto track (#3364)
* disable autocatpure

* changeset
2025-05-07 11:32:33 -07:00
Toshii 6ad11badf3 Systematic selection of gemini models w/ caching (#3343)
* no more updating gemini models

* changeset
2025-05-07 10:07:45 -07:00
Tomás Barreiro 39c7da301c fix path tests on windows (#3276) 2025-05-07 22:22:58 +05:30
DrobConsulting 5275f2eabc Updated OpenAiHandler to support Azure GCC region (#3235)
- Added a check for azureApiVersion to determine if the endpoint is an Azure endpoint.
    - Included conditions to check for 'azure.com' and 'azure.us' in the openAiBaseUrl.
    - Ensured that the openAiModelId does not include 'deepseek' when determining the Azure endpoint.
2025-05-07 01:06:12 -07:00
Caleb Eom 7cf68ff279 Improve time display and filter out resume_task in Task Timeline (#3333)
* Improve time display and filter out resume_task in Task Timeline

* changeset

* polishing it up a little

* a little bigger

* more tooltips + task header

* further refinement

* spacing

* moving delete button up one row conditionally

* removed log

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-07 02:02:41 -05:00
Evan b8af02ebaa Stop doomscrolling (#3354)
* disable auto scroll on user scroll up

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-07 01:29:57 -05:00
Ara 904df9f361 Enhance DiffViewProvider to preserve focus when opening text documents (#3346) 2025-05-06 22:52:44 -05:00
canvrno ca3cf185cf [PROTOBUS] Move showTaskWithID to protobus (#3283)
* showTaskWithID protobus migration

* replaced ShowTaskWithIdRequest with generic stringRequest

* prettier
2025-05-06 19:21:37 -07:00
canvrno a02bf11c81 getLmStudioModels protobus migration (#3341) 2025-05-06 19:21:17 -07:00
canvrno 5f4b8078dc reenable tests in workflow (#3347) 2025-05-06 19:16:11 -07:00
monotykamary 1f573955ff feat: add gemini-2.5-pro-preview-05-06 model (#3332)
* feat: add gemini-2.5-pro-preview-05-06 model

* chore: remove gemini-2.5-pro-preview-03-25
2025-05-06 16:36:40 -07:00
zapp88 dbba0ef776 Ability to generate commit message with cline. (#3318)
* Add handling of git message

*  Add commit message generation feature

- Implemented commit message generation functionality in controller
- Added new command to generate commit messages from git diff
- Added error handling for commit message generation
- Updated API handler to support commit message generation
- Added new icon for commit message command
- Updated keybindings for commit message generation
- Added command to command palette for easier access
- Improved error handling and logging
- Added support for generating commit messages from staged changes
- Updated documentation and comments

* Handle user dismissing the dialog (selectedAction is undefined)

* Apply code review suggestions

No default keybinding
The task is not cancelable
Unused import removed
Cleaner message
2025-05-06 16:26:35 -07:00
Evan d14345f605 Feature Flags Node (#3312)
* add featureFlagProvider service

* changeset

* import telemetryService

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-06 16:26:00 -07:00
user202729 2059e84701 Add audio type to McpToolCallResponse (#3289) 2025-05-06 16:25:37 -07:00
José Luis Di Biase f4a9d5f4f3 Bump ollama from 0.5.13 to 0.5.15: To support proxy/Basic auth (#3335) 2025-05-06 16:22:25 -07:00
Toshii 6303a77e8a Update Cline provider trending model (#3345)
* change recommended model

* changeset
2025-05-06 15:03:01 -07:00
Toshii 2963aa5e93 fetch cache details from OR/Cline provider generation endpoint (#3340)
* fetch cache details from generation endpoint

* changeset
2025-05-06 14:25:45 -07:00
Andrei Eternal cfc133acd3 PROTOBUS: Streaming, State, Service Auto-Config (#3253)
* round 1

* round 2 - searchFiles integration attempt

* undo streaming search experiments

* Start state.proto and related migrations

* state subscription

* get the main state flow using it

* correct stream ending early, debug statements

* clean up build-proto service config

* autogenerate index.tses

* auto-generate grpc-client service exports

* rename web-content -> web to make codegen work

* cleaned up streaming flow & cancels

* v3.14.0 Release Notes

v3.14.0 Release Notes

* prettier

* uhh prettier ?

* rename GrpcRequestRegistry file

* auto-generate directory for new services in the config

* generate template proto if it doesn't exist and provide instructions

* format fix

* add models service back to new system

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-06 13:42:36 -07:00
Evan 311cb3ac0a Rest of docs (#3339)
* add enterprise section to new docs

* changeset

* migrate mcp docs

* changeset

* migrate more info section

* changeset

* reorder entries

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.attlocal.net>
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
2025-05-06 15:14:53 -05:00
canvrno 06fc419a15 searchFiles protobus migration (#3261) 2025-05-06 11:40:38 -07:00
Evan 10f7b8ca9e Migrate custom model configs section new docs (#3304)
* migrate custom model config section

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-06 11:16:54 -07:00
Evan bc9eaeeff7 Migrate running models locally section new docs (#3305)
* migrate run models locally section

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-06 11:16:34 -07:00
canvrno 94fc619196 [PROTOBUS] Move exportTaskWithId to protobus (#3285)
* exportTaskWithId protobus migration

* rebase fixes
2025-05-06 11:06:37 -07:00
canvrno 7084e74372 getOllamaModels protobus migration (#3317) 2025-05-06 11:06:01 -07:00
Toshii dd35bce141 Breakpoint just in first user message for gemini for OR and cline provider (#3319)
* breakpoint just in system prompt

* changeset

* user message included
2025-05-06 08:50:22 -07:00
Caleb Eom f1ed93add8 Task timeline (#3264)
* v3.14.0 Release Notes

v3.14.0 Release Notes

* Task Timeline

* Task Timeline

* Formatting Plan Mode Respond

* changeset

* Update webview-ui/src/components/chat/TaskTimeline.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Default scroll to right. Change read file colour

* Fixing Colour coding, and adding hover state in tool tip

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-06 15:47:19 +05:30
David Nanyan a43da8d66b Allow users to create issue via CLI with prefilled system and os info (#3250)
* Change bug report template

* it should be text area

* [TRIVIAL] Add npm script for issue creation

* Adjust script & add changeset

* Use cline repo

* remove comment

* open should work on any platform
2025-05-06 13:13:20 +05:30
Trevor Hudson 062bb5bb64 Trevhud/telemetry optimization (#3263)
* add collection method

* collect messages

* changeset

* remove commented out parts

* remove check to send events anytime a new task is created while on an existing task

* Update src/core/controller/task/clearTask.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/services/telemetry/TelemetryService.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Lower border radius

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Ara <arafat.da.khan@gmail.com>
2025-05-06 10:52:20 +05:30
Peter Dave Hello b667224c13 Extend ReasoningEffort to non-o3-mini reasoning models for all providers (#3036)
It's somehow locked to o3-mini for some providers, and the description,
should be updated for all OpenAI o series reasoning models.
2025-05-06 10:25:10 +05:30
Evan ffbafab5e2 Migrate prompting folder new docs (#3254)
* migrate prompting section

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-05 21:07:30 -07:00
Peter Dave Hello 3e9c83b99d Add the o4-mini model in the isOminiModel (#3035) 2025-05-05 20:58:58 -07:00
canvrno 9eea9d04b5 getRelativePaths protobus migration (#3259) 2025-05-05 20:47:06 -07:00
canvrno c83957660a [PROTOBUS] Move ruleFile conversions to /file/ (#3262)
* v3.14.0 Release Notes

* v3.14.0 Release Notes

* move rule file conversions

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-05 19:05:02 -07:00
canvrno cb7234f967 [PROTOBUS] Move deleteTasksWithIds to protobus (#3282)
* deleteTasksWithIDs protobus migration

* Moved deleteTasksWithIds to dedicated message type

* Created common StringArrayRequest

* Delete webview-ui/.vite-port
2025-05-05 19:03:27 -07:00
Frostbourne a953f6e768 Add confirmation dialog to Delete All History (#3316)
* delete all confirmation dialog

* changeset

* Use showWarningMessage instead

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-05 14:55:18 -07:00
Evan 8516aabb88 Migrate getting started new docs (#3252)
* migrate getting-started to new docs

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-05-05 16:15:32 -05:00
Ara e963d2c194 Introducing Quote a Message in Chat (#3223)
* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Adding double click support

* Cleanup

* Working better

* Working better

* Working better

* add markdown

* add markdown

* add markdown

* add markdown

* add markdown

* Lower border radius

* Lower border radius

* Delete webview-ui/.vite-port

---------

Co-authored-by: Frostbourne <frostbournesb@protonmail.com>
2025-05-06 02:44:19 +05:30
Derek Lopes 3b0dbd304a bugfix: AWS credentials overridden by AWS_PROFILE env variable in shell init scripts (#2888) 2025-05-05 16:03:09 -05:00
Toshii 274349f944 add ui component for external rules files (#3291)
* base

* svg

* delete refresh

* changeset
2025-05-05 09:49:35 -05:00
Frostbourne 6d24e22bf6 Make previous updates a dropdown (#3265)
* Add Dropdown for previous updates

* changeset
2025-05-04 17:25:16 -07:00
Frostbourne 8fae4e64d5 Allow for multiple dev server instances (#3288)
* Allow multiple dev servers at once

* logs

* fix portFilePath

* improve log

* default port fallback

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-04 17:24:37 -07:00
Toshii fc5adcf8eb add open ai cache pricing & check to ui (#3268)
* base

* changeset

* Update src/core/controller/index.ts

Co-authored-by: Ara <arafat.da.khan@gmail.com>

---------

Co-authored-by: Ara <arafat.da.khan@gmail.com>
2025-05-04 12:16:46 -07:00
Toshii 9eaf023bac Update gemini caching for open router and cline provider (#3260)
* gemini caching

* changeset
2025-05-02 23:37:59 -07:00
github-actions[bot] cf9ce1d103 v3.14.0 Release Notes
v3.14.0 Release Notes
2025-05-02 20:53:15 -07:00
Ding Fei 675b5e1bed feat: support batch history deletion (#2918)
* feat: support batch history deletion

Single history item deletion is too small and "Delete All History" is
too large on granuality.

For long term Cline users and Cline devs/testers it would be convenient
to batch deletion these history items.

On `HistoryView` page, this commit add:

1. `CheckBox` for every history item
2. `Select All` & `Deselect All` buttons (work with search filter)
3. `Delete Selected` button for batch deletion (only appears when
   item(s) is/are selected)

History task's `onclick` is pointed to `showTaskWithId` for quick
showing this task.

* fix failed ellipsis checking

* HistoryView: remove unused import

* fix: style improvement

1. Selection buttons moved up to align with 'Done' button
2. Delete All History button hidden when any items are selected
3. Checkboxes moved below and align with message text

* restore unnecessary changes

* Improve styles and Delete selected button

* changeset

---------

Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
2025-05-02 16:01:15 -07:00
Evan 2fe24055c0 Migrate tools section new docs (#3255)
* migrate cline tools section

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
2025-05-02 15:42:14 -07:00
Toshii e4d26bef97 enable cursorrules and windsurfrules (#3245)
* base

* task call

* base 2

* changeset

* wrap recursive dir
2025-05-02 13:45:08 -07:00
Evan 1c7d33a495 Add remote config webview. (#3243)
* added posthog remote config

* changeset

* add feature flags constant

* move init outside function to keep from potentially re-running

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
2025-05-02 10:36:22 -05:00
Frostbourne eb6e4818d3 feat: LaTeX formatting (#3242)
* initial

* initial

* restored package-lock.json

* restored comment

* One line

* prettier

* do not throw on error

* escape backslashes in system notification

* better prompt

* reduce prompt size

* prettier

---------

Co-authored-by: canvrno <kevin@cline.bot>
2025-05-02 19:46:59 +05:30
pashpashpash 61d2f42955 gemini prompt caching (#3181)
* wip

* updated api tiered pricing schema for vertex and gemini to support tiered cache prices

* vertex too

* changeset

* pushing claude implementation

* addressing aras comments

* cleaning up caches

* linter complaining

* enabling total price for gemini provider

* Fixing Gemini Caching mechanism

* Update src/api/providers/vertex.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: arafatkatze <arafat.da.khan@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-02 00:50:48 -07:00
pashpashpash c78fe237e2 Terminal race condition addressed with awaits (#3240)
* terminal race condition addressed with awaits

* changeset

* added logger line

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-02 07:03:06 +05:30
pashpashpash 0ffb7dd56b changeset (#3241)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-02 07:02:22 +05:30
canvrno e9ce38472f [PROTOBUS] Move commitSearch to protobus (#3229)
* commitSearch protobus migration

* rename

* one small change to comments

* moved GitCommmit proto mapping to proto-conversions
2025-05-01 18:18:39 -07:00
canvrno 5802b6847e [PROTOBUS] Move createRuleFile to protobus 🚌💨 (#3122)
* createRuleFile protobus migration

* deleteRuleFile protobus

* mend

* mend

* mend

* Generic response for delete request

* refactored deleteRuleFile for consolidation

* rename ruleFileResult to ruleFile

* rebase and cleanup

* createRuleFile protobus migration

* ellipsis changes

* consolidated ruleFile protos

* prep for merge on to 3124

* removed ruleFileOperations
2025-05-01 17:25:29 -07:00
Dennis Bartlett 4a768702aa Fix Changeset (#3239) 2025-05-01 16:50:15 -07:00
canvrno 4565e067af [PROTOBUS] file checkIsImageUrl (#3109)
* checkIsImageURL protobus migration

* changeset

* rebase and move to web-content

* cleanup

* metadata

* rename return message

* removed old import, metadata
2025-05-01 16:11:58 -07:00
canvrno 4650ffa86b [PROTOBUS] Move deleteRuleFile to protobus 🚌💨 (#3124)
* createRuleFile protobus migration

* deleteRuleFile protobus

* mend

* mend

* mend

* ellipsis changes

* Generic response for delete request

* refactored deleteRuleFile for consolidation

* rename ruleFileResult to ruleFile
2025-05-01 16:06:54 -07:00
Evan f6d50ead3f Setup docs (#3230)
* rename old docs folder

* set up mintlify docs base

* add back script

---------

Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com>
2025-05-01 16:04:07 -07:00
David Nanyan 70cc437d71 [ISSUE-3145] Fix Windows path issue: Correct handling of import.meta.url to avoid leading slash in pathname (#3237)
* [ISSUE-3145] Fix Windows path issue: Correct handling of import.meta.url to avoid leading slash in pathname

* Add changeset file
2025-05-01 14:42:35 -07:00
watany bdfda6f908 feat(bedrock): Introduce Amazon Nova Premier (#3225)
* feat(bedrock): Introduce Amazon Nova Premier

* changeset
2025-05-01 14:39:32 -07:00
David Nanyan c5de50fdd2 [3093] Fix Handle @withRetry() SyntaxError when running extension locally issue (#3190) 2025-05-02 02:14:13 +05:30
Toshii 77c9863b50 Create .clinerules directory when adding new cline rule in ui and .clinerules is currently a file (#3217)
* create clinerules dir

* change default

* changeset

* md
2025-05-01 10:27:37 -07:00
nomaven 03d44105cc Adding copy button to code blocks (#3011)
* feat: add copy button to code blocks

* Adding ability to copy Code blocks

* feat: add OpenRouter base URL and balance display component

---------

Co-authored-by: ShlomoCode <78599753+ShlomoCode@users.noreply.github.com>
2025-05-01 00:51:28 -07:00
clicube 79b76fd783 feat: Support AWS Bedrock Application Inference Profiles for Cost Tracking (#2078)
* feat: Add support for custom model ID in AWS Bedrock provider

* preserve settings when switching Act-Plan modes

* Use base model ID for ApiHandler behavior determination when using a custom model on AWS Bedrock.
2025-05-01 12:17:28 +05:30
Evan 19cc8bc9f8 Add terminal connection timeout (#3218)
* add terminal connection timeout

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
2025-04-30 22:40:58 -05:00
Dennis Bartlett 08c04a3c67 Disable Codespell (#3224) 2025-04-30 19:21:09 -07:00
canvrno 41ae7326c0 Fix: Git mentions w/ no commits in workspace repo (#3179)
* fix for git mentions with no commits in repo
2025-04-30 19:15:35 -07:00
Trevor Hudson b0961f4538 Trevhud/remove linear (#3174)
* remove linear pull request action

* changeset
2025-04-30 18:51:16 -07:00
Tomás Barreiro 26242f6378 Fix tests: compile esmodules to cjs and bundle them (#3030)
* Run pretest in CI to build all tests

* Alias paths when running tests

* Bundle ES modules with esbuild

* alias packages
2025-04-30 17:51:32 -07:00
Tomás Barreiro 13228ed46f Fail the test workflow on test failures (#3197)
* Run pretest in CI to build all tests

* Alias paths when running tests

* Bundle ES modules with esbuild

* alias packages

* Preserve the test scripts exit code and display the output

* Remove outdated test
2025-04-30 17:51:03 -07:00
Tomás Barreiro d162a4b420 Alias paths on integration tests (#3196)
* Run pretest in CI to build all tests

* Alias paths when running tests
2025-04-30 17:49:40 -07:00
dependabot[bot] 1704684af8 Bump vite from 6.2.6 to 6.3.4 in /webview-ui in the npm_and_yarn group (#3214)
Bumps the npm_and_yarn group in /webview-ui with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.6 to 6.3.4
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.4
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-30 17:25:43 -07:00
pashpashpash c63d9a13a5 Fix text to say "drop" instead of "drag" (#3221)
* drag -> drop

* text fix

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-30 17:18:48 -07:00
Frostbourne 65243adb24 [ENG-514] Introduce UI library (#3222)
* update tailwind

* install heroui

* Introduce HeroUIProvider and reorganize providers

* changeset

* use tailwind config

* use custom theme

* changeset

* Delete .changeset/large-boxes-behave.md
2025-04-30 17:18:18 -07:00
Tomás Barreiro e35f7b4e21 Run pretest in CI to build all tests (#2930) 2025-04-30 17:17:29 -07:00
Frostbourne 82449dabd6 Revert "actually stop tasks (#3061)" (#3220)
This reverts commit 29458d7675.
2025-04-30 15:53:36 -07:00
nomaven 74ec823017 Enhances visual feedback during drag-and-drop with dashed outline and transition effects. (#3184)
* Add drag-and-drop functionality to ChatTextArea component

- Introduced state management for drag feedback with `isDraggingOver`.
- Implemented drag event handlers: `handleDragEnter`, `handleDragLeave`, and updated `onDragOver`.
- Enhanced visual feedback during drag-and-drop with dashed outline and transition effects.
- Reset drag state on drop event.

* New Ast salvage

* shift to drag

* shift to drag

* shift to drag

* shift to drag

* shift to drag

* shift to drag

* quote

* quote

* 500ms -> 100ms

* updated language and 250ms delay sweetspot

* better transitions

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-30 14:50:43 -07:00
Toshii 91e222fe37 Add checkpoints between all messages (#3213)
* checkpoints after messages

* changeset
2025-04-30 13:45:12 -07:00
Toshii 14230e7221 newrule (#3180)
* base

* words

* changeset
2025-04-29 15:40:51 -07:00
David Nanyan 4b697d8695 PROTOBUS: addRemoteServer message (#3147)
* PROTOBUS addRemoteServer

* Remove redundant types

* Properly handle any error when adding remote mcp server

* Refactor after code review

* remove redundant import
2025-04-29 11:33:43 -07:00
nomaven deeda6e273 Lowering the Gemini Caching TTL time to 15 minutes (#3116)
* Lowering the Gemini Cahcing TTL time to 15 minutes

* Lowering the Gemini Cahcing TTL time to 15 minutes
2025-04-29 23:55:35 +05:30
Trevor Hudson 7e7844529f add to launch json (#3173) 2025-04-29 11:09:41 -07:00
Toshii 4196c14c9c add openrouter / cline provider caching metrics to ui (#3176)
* cache reads

* changeset
2025-04-28 23:26:28 -07:00
Evan 5294e78dde Remove showMcpView message (#3171)
* refactor to not pass message for showMcpView

* changeset
2025-04-28 21:27:11 -07:00
pashpashpash d97424fcab Expanding task header by default (#3170)
* task expanded

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-28 21:26:12 -07:00
Dennis Bartlett 2b3c0bb633 Add warn setting to codespell workflow (#3175) 2025-04-28 18:46:47 -07:00
Tomás Barreiro b8e2fd669d fix unit test set-up and CI workflow (#3154)
* Fix unit test set-up

* run tests on CI

* update failing tests

* Update node

Update the coverage job node version
2025-04-28 16:30:40 -07:00
Evan df7f9fcba4 It depends... (#3126)
* add protos to more dependsOn, also make it so that the scripts are always displayed and the window does not automatically close

* changeset

* add back build script
2025-04-27 21:47:49 -07:00
nomaven db0b022b6e ENG-318 feat: Show openrouter balance next to provider (#3003)
* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component
2025-04-27 16:27:28 -07:00
Wesley Smith 459adf0450 Markdown copy (#3060)
* add markdown copy

* add changeset

* fmt

---------

Co-authored-by: Wesley Smith <wes@neofactory.ai>
2025-04-27 15:24:08 -07:00
WingsDrafterwork df37f29746 Support for custom timeout (#3029)
* Support for custom timeout

* Make custom timeout visible only for ollama

* Remove parameters from other providers, only kept for ollama

* Update webview-ui/src/components/settings/ApiOptions.tsx

Co-authored-by: nomaven <arafat.da.khan@gmail.com>

---------

Co-authored-by: nomaven <arafat.da.khan@gmail.com>
2025-04-27 15:17:04 -07:00
Sarah Fortune 60c210b017 Add java options to protobufs (#3141)
Set the java class path.
2025-04-27 09:25:37 -10:00
Tomás Barreiro d4bd755e60 Set the default output cost (#3079) 2025-04-26 23:03:04 -07:00
Toshii aed152b530 narrative narrative narrative (#3121)
* notice

* changeset
2025-04-25 19:42:24 -07:00
canvrno 5a8e9d8fa8 [PROTOBUS] file openImage (#3106)
* openFile protobus

* openImage protobus

* Delete .changeset/nine-numbers-boil.md
2025-04-25 19:21:07 -07:00
Sarah Fortune 7610cecde6 [PROTOBUS] Move accountLoginClicked to protobus (#3115)
* Move accountLoginClick to protobus

* Remove ununsed import

* Add account service to handleRequest in grpc handler.

* Add documentation

* github pr un-stick empty commit

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-25 12:45:28 -10:00
github-actions[bot] bb26b3b64d v3.13.3 Release Notes
v3.13.3 Release Notes
2025-04-25 13:43:23 -07:00
Dennis Bartlett aabdeba0f3 Feat/change reset state colors (#3112)
* Update Reset Button color to Red

* Add Changeset
2025-04-24 23:38:32 -07:00
Dennis Bartlett fd68a81a26 Alias smol to compact (#3111) 2025-04-24 22:02:36 -07:00
Toshii 0e07b92be2 Caching (#3110)
* add

* changeset

* Fix spelling error

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-24 21:38:07 -07:00
Andrei Eternal 4addffe94c [PROTOBUS] browser getDetectedChromePath (#3001)
* protobus impl for getDetectedChromePath

* [PROTOBUS] browserSettings (#3007)

* protobus for browserSettings

* Update index.ts

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-24 21:36:55 -07:00
Evan 0836e4d45a add npm protos to tests.json for dev build (#3107) 2025-04-24 17:07:31 -07:00
0x23d11 4a57e5a075 fix(settings): rename AWS Bedrock to Amazon Bedrock (#3094) 2025-04-24 16:17:05 -07:00
Wesley Smith 29458d7675 actually stop tasks (#3061)
Co-authored-by: Wesley Smith <wes@neofactory.ai>
2025-04-24 13:00:32 -10:00
pashpashpash 90b0d6a73b evals formatting (#3105)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-24 15:26:12 -07:00
pashpashpash 547051bfa8 enabling download count on marketplace (#3104)
* enabling download count on marketplace

* changeset

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-24 15:25:40 -07:00
Trevor Hudson 93595af09f Trevhud/eng 592 add title tags to buttons in the bottom left corner (#3080)
* add title tags

* add tooltips, change Cline Rules name, introduce contrast to auto approve + dismiss when click outside

* change to prompts and add hook for click outside to close

* use useClickAway, delete unused component, rename back to cline rules

---------

Co-authored-by: celestial-vault <58194240+celestial-vault@users.noreply.github.com>
2025-04-24 15:24:49 -07:00
Toshii 3828c0d1bc smol (#3086)
* base

* button callback

* prompt

* smol

* full truncate

* base 2

* changeset

* dup new task resp

* Update src/core/prompts/commands.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* comments

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-24 15:00:44 -07:00
Evan a2263de7cb Protobus: updateMcpTimeout message (#3085)
* updateMcpTimeout protobus conversion

* changeset
2025-04-24 14:57:00 -07:00
Andrei Eternal e53fa8307d run protos, uh, more -- to prevent WAT maybe (#3091)
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-24 11:01:21 -10:00
Dennis Bartlett b8cfb87121 Update CHANGELOG.md (#3100) 2025-04-24 12:54:00 -07:00
Dennis Bartlett 76a64ef77d Fix Protobuf WAT 2025-04-24 01:38:40 -07:00
github-actions[bot] 29bdb6c981 v3.13.2 Release Notes
v3.13.2 Release Notes
2025-04-24 00:46:46 -07:00
canvrno 9bbc0da821 [PROTOBUS] file openFile (#3052)
* openFile protobus

* merge conflicts

* fix whitespace

* Fix whitespace... Again

---------

Co-authored-by: Andrei Eternal <garoth@gmail.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-23 21:40:46 -10:00
canvrno d2080c1f93 [PROTOBUS] task cancelTask (#3005)
* cancelTask protobuf

* changeset

* corrected changeset

* fixing bad push

* more fixes

* one small change

* ONE more change

* missing await

---------

Co-authored-by: Andrei Eternal <garoth@gmail.com>
2025-04-24 00:20:03 -07:00
canvrno 044dd686a0 Fix for terminal outputs missing commas and non-alphanumeric outputs (#3066) 2025-04-23 19:55:27 -10:00
canvrno ea4f571463 [PROTOBUS] checkpoints checkpointRestore (#3046)
* restoreTask protobus

* changeset

* changeset correction

* type safety change

* Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification (#2347)

* Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification

* update package-lock.json

* update

* update

* fix

* fix

* fix

* ENG 526/Fix: Versioned Auto Approve settings (#3014)

* added verisoning for autoApprove settings

* removed lines from source branch

* rebase

* changeset

* one small change

* activating extension with evals.env (#3041)

Co-authored-by: Cline Evaluation <cline@example.com>

* ripping out test build flag (#3043)

Co-authored-by: Cline Evaluation <cline@example.com>

* cleaning up evals.env logic in extension.ts (#3045)

Co-authored-by: Cline Evaluation <cline@example.com>

* ENG-516 Slash commands (#3044)

* scroll

* menu

* changeset

* nit

* What's yer path? (#3047)

* update extension imports to use aliasing

* changeset

* ENG-484 Enhance fixWithCline command execution by focusing chat input  (#3028)

* Enhance fixWithCline command execution by focusing chat input and adding a delay before processing the fixWithCline command.

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* new_task prompt (#3049)

* prompt

* changeset

* words

* prettier

* Added metadata

---------

Co-authored-by: yt3trees <57471763+yt3trees@users.noreply.github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
Co-authored-by: Evan <58194240+celestial-vault@users.noreply.github.com>
Co-authored-by: nomaven <arafat.da.khan@gmail.com>
2025-04-23 19:48:06 -10:00
Sarah Fortune 8cddbcfd99 Install protoc with npm, don't ask the user to install it manually (#3082)
* Use grpc-tools module to install protoc

Add dependencies for npm modules that provide the protoc binary and the ts plugin.
Don't include protos in sub-directories to prevent including node_modules.

* Move proto generator dependencies into top level package.json

* Keep package.json

Otherwise node cannot tell build-proto.js is a module.
2025-04-23 19:39:27 -10:00
Xiaoli 4e0cb64e77 fix: fix mermaid render problem on github caused by space in subgraph name (#2985)
Co-authored-by: Frostbourne <frostbournesb@protonmail.com>
2025-04-23 00:19:05 -07:00
Evan 4aa3764beb Fix: Protoc script version check (#3071)
* update to split by parts

* remove comment
2025-04-22 15:30:40 -10:00
nomaven a525d6dd5e Adding Caching to gemini provider (#3072) 2025-04-23 06:39:49 +05:30
Trevor Hudson 59dd3236e4 add github action for creating linear tickets for unconnected PRs (#3021)
* add github action for creating linear tickets for unconnected PRs

* changset

* only load fetch if not present

* omit fetch

* add error handling

* fix gql query

* only run for opened PRs

* break out into actions

* fix folders

* checkout first

* remove the actions

* add sync

* remove sync
2025-04-22 18:08:47 -07:00
nomaven 5439426ff6 ENG-524 Remove supportsComputerUse restriction and support browser use through any model that supports images (#3048)
* Enhance fixWithCline command execution by focusing chat input and adding a delay before processing the fixWithCline command.

* feat: add OpenRouter base URL and balance display component

* refactor: remove supportsComputerUse from modelInfo and related components, replacing with supportsImages where applicable

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component
2025-04-23 04:21:18 +04:00
monotykamary fffcc80477 feat: update gemini sdk and add thinking budget support (#2964)
* feat: update gemini sdk and add thinking budget support

* chore: remove redundant comments

* refactor(thinking-budget): abstract calculation for budget slider

* chore: remove some more redundant comments
2025-04-22 16:50:59 -07:00
Evan dfcb3d5d9b PROTOBUS: toggleMcpServer (#3063)
* wip

* migrate toggleMcpServer

* changeset

* support optional types and enum type
2025-04-22 16:29:13 -07:00
Andrei Eternal 4af5150823 Add @Garoth as a code owner (#3070) 2025-04-22 13:13:01 -10:00
Y.Yamamoto ddbdfbc96d docs: Fix mermaid syntax error (#3053) 2025-04-22 14:53:33 -07:00
Suvarchal Kumar Cheedela a405df5dc0 Fix #2941 ollama timeout (#3024)
* Fix: Increase Ollama provider timeout from 30s to 120s

* Add changeset for Ollama provider timeout fix
2025-04-22 23:59:22 +05:30
Toshii 04d1f1d4e7 new_task prompt (#3049)
* prompt

* changeset

* words
2025-04-21 18:26:02 -07:00
nomaven 0572933c32 ENG-484 Enhance fixWithCline command execution by focusing chat input (#3028)
* Enhance fixWithCline command execution by focusing chat input and adding a delay before processing the fixWithCline command.

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component
2025-04-22 06:41:10 +05:30
Evan 99bbe17df9 What's yer path? (#3047)
* update extension imports to use aliasing

* changeset
2025-04-21 16:49:44 -07:00
Toshii b3b7b9da5f ENG-516 Slash commands (#3044)
* scroll

* menu

* changeset

* nit
2025-04-21 16:41:34 -07:00
pashpashpash b0df763ae7 cleaning up evals.env logic in extension.ts (#3045)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-21 15:38:46 -07:00
pashpashpash 280374f30d ripping out test build flag (#3043)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-21 15:11:37 -07:00
pashpashpash 9d9e54360b activating extension with evals.env (#3041)
Co-authored-by: Cline Evaluation <cline@example.com>
2025-04-21 15:06:13 -07:00
canvrno 552146d8b5 ENG 526/Fix: Versioned Auto Approve settings (#3014)
* added verisoning for autoApprove settings

* removed lines from source branch

* rebase

* changeset

* one small change
2025-04-21 12:29:59 -07:00
yt3trees 552054a026 Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification (#2347)
* Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification

* update package-lock.json

* update

* update

* fix

* fix

* fix
2025-04-21 12:05:48 -07:00
Daniel Steigman cff8a237cd ENG-464 Fix Settings state issue with API provider reseting other settings. (#3004)
* added a a difference between react state saves and core state saves so that the provider settings dont reset other set settings

* added changeset

* Update .changeset/thirty-bugs-admire.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* changed button text to say Save

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-21 11:04:05 -07:00
pashpashpash e70264a56c Running Commands Old-School + Living on the Edge with the Latest VSIX (#2999)
* using ndoe shell instead of vs code terminal for commands + always using latest vsix

* 30s max time for commands in test mode

* removed overwhelming logs

* better 30s termination
2025-04-21 11:00:35 -07:00
Evan 06196cf53d Don't call me by my name (#2982)
* add path aliases to the extension side

* changeset
2025-04-21 10:59:43 -07:00
canvrno 1761c0e9e8 protoc version check (#2981) 2025-04-21 10:59:18 -07:00
Evan fbb13f102c Fix new rule button click (#3010)
* fix add new rule file button click

* changeset
2025-04-21 09:44:44 -07:00
treeleaves30760 4850df722b Add the o1 model in the isReasoningModelFamily to avoid 'temperature' parameter passed to azure (#2963) 2025-04-20 12:41:19 -07:00
watany 6e71b3f7cc feat: Add !include .file directive support for .clineignore (#1777)
* feat: Add `!include .file` directive support for `.clineignore`

* changeset

* add warning

* fix

* revert

* reduce diff

* reduce diff
2025-04-19 23:00:00 -07:00
Andrei Edell a198f71986 [PROTOBUS] gRPC-ized discoverBrowser (#2976)
* gRPC-ized discoverBrowser

* clean up a string

* remove useless comments

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-19 16:08:11 -10:00
canvrno 0d38381573 checkpointDiff --> protobuf (#2980)
* Checkpoints diff protobuf

* Requested changes to checkpointDiff protobuf
2025-04-19 14:21:10 -10:00
Saoud Rizwan ba6dcb5bc9 Prepare for release 2025-04-19 01:56:00 -07:00
Saoud Rizwan ecb8633534 fix: task cancellation during thinking stream would result in 'Cline aborted stream' error (#2986)
* Fix task cancellation handling to prevent errors during reasoning message streaming

* Create happy-lies-dress.md
2025-04-19 01:52:05 -07:00
github-actions[bot] 07d2057486 v3.13.0 Release Notes
v3.13.0 Release Notes
2025-04-19 00:47:49 -07:00
Toshii 3b0326e4dd comma (#2983)
* comma

* changeset
2025-04-18 19:36:15 -07:00
Toshii 32c70e59f4 slash new_task (#2959)
* base

* format

* test base

* new model

* menu base

* highlights

* nits

* menu wrap

* consider cursor

* cursor position

* color

* spacing

* highlighting boxes

* styles

* formatting new call

* rm

* changeset

* css styles

* format
2025-04-18 16:43:58 -07:00
canvrno e52dd22b65 fix flicker on external files icon (#2977) 2025-04-18 16:42:42 -07:00
canvrno 1022057316 removed symlink handling from isLocatedInWorkspace (#2974) 2025-04-18 16:40:22 -07:00
Evan 487081f128 MOAR RULES (#2973)
* add create new rule row to modal

* changeset

* fix missing boolean check

* fix merge issues causing duplicates

* remove commented out code

* update placeholder

* tighten validation
2025-04-18 16:39:57 -07:00
Khalil Yao 9a39cbd475 Doc/cn readme update (#2759)
* doc: update zn-cn readme.

* doc: update zh-tw readme.

* doc: update zn-cn readme.

* doc: update zh-tw readme.
2025-04-18 16:38:27 -07:00
Andrei Edell 570646fda3 MCP Image: Support image type messages / base64 text (#2962)
* feat: MCP ImageContent support

* feat: MCP ImageContent support

* feat: MCP ImageContent support changeset

* Update src/core/prompts/responses.ts

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>

* Update src/core/Cline.ts

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>

* feat: MCP ImageContent support run format:fix

* Remove mcpToolResult

* Fix: Display original data:image URLs in rich display mode to maintain transparency

---------

Co-authored-by: rikaaa0928 <wangzhidong1@xiaomi.com>
Co-authored-by: rikaaa0928 <8528731+rikaaa0928@users.noreply.github.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-18 16:33:40 -07:00
owengo e8b21690ab Add baseUrl configuration for gemini api requests (#2843)
* Add baseUrl configuration for gemini api requests

* Add changeset

---------

Co-authored-by: Olivier Schiavo <olivier.schiavo@wengo.com>
2025-04-18 16:29:41 -07:00
起司猫 3ef81cdf38 fix: Refactor the function constructNewFileContent using a state switching mechanism, and fix the issue of inaccurate SEARCH-REPLACE delimiters generated by some large models through lookahead processing (#2334)
* Fix the chat context menu removing UTF8 characters causing pure UTF8 character filenames not to display in the menu

* fix: Refactor the function constructNewFileContent using a state switching mechanism, and fix the issue of inaccurate SEARCH-REPLACE delimiters generated by some large models through lookahead processing

* Merge diff.ts with diff2.ts; Mark the original constructNewFileContent as @deprecated.

* Add detailed comments to explain test cases for nested markers
2025-04-18 16:26:27 -07:00
suntp b5f4460db3 fix: Non-error logs from the MCP server are also output as error logs, causing abnormal server display. (#2900)
* fix: Non-error logs from the MCP server are also output as error logs, causing abnormal server display.(#2589)

* Modified to make 'error' case-insensitive.(#2589)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* fix: use Prettier code style

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-18 14:52:56 -07:00
yt3trees 9a5a0e15b1 Add support for Azure's DeepSeek model. (#1808)
* Fixed to be able to use DeepSeek model in Azure.

* fix

* fix .changeset

* fix src\api\providers\deepseek.ts

* fix src\api\providers\openai.ts

* Fixed to be able to use DeepSeek model in Azure.

* fix

* fix .changeset

* fix src\api\providers\deepseek.ts

* fix src\api\providers\openai.ts

* fix package-lock.json

* Revert "fix package-lock.json"

This reverts commit dc52e97057.

* fix

* fix
2025-04-18 14:17:31 -07:00
Mark Bradshaw 6abf0be8d1 Allow setting extra headers for openai compatible api (#1136)
* Allow setting extra headers for openai compatible api

* Fix to the extra headers form

* Properly store header state

* fix prettier

* Cleanup styles

---------

Co-authored-by: mbradshaw <mbradshaw@indeed.com>
Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
2025-04-17 18:31:45 -07:00
Evan c8b234ab06 Add delete rule button (#2958)
* add a delete button to the cline rules modal

* changeset
2025-04-17 17:26:27 -07:00
canvrno 022fdf47c0 ENG-501/Detection of command termination using Ctrl+C (#2960)
* Detect Ctrl C input when users terminal a long running terminal command

* Remove terminal-output-truncation.md documentation file
2025-04-17 17:23:29 -07:00
canvrno fb3105f7bf ENG-470/Chunking for large terminal outputs (#2935)
* initial terminal output chunking

* changeset

* Update src/core/task/index.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* cleanup

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-17 16:22:27 -07:00
Saoud Rizwan bc87fdb4b3 fix: BrowserSessionRow to include 'reasoning' message type handling (#2953) 2025-04-17 12:58:10 -10:00
Trevor Hudson c021b6464b Trevor/eng 416 add editing ability to older user messages in chat (#2954)
* User message editing

* restore and send

* dont redo if the message is the same

* select by default

* resolve conflicts

* handle workspace restore

* add title to buttons

* don't allow restoring files if there is no workspace

* fix

* fix messaging

* fix text

* fix type
2025-04-17 15:38:30 -07:00
Evan 180ebdad74 Add edit cline rule button (#2956)
* add button to open rule file

* changeset
2025-04-17 13:33:11 -07:00
Andrei Edell 2a80fedf7d proto migration for testBrowserConnection.ts (#2922)
* proto migration for testBrowserConnection.ts

* format fix

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-17 09:31:48 -10:00
Evan 450583c81d à la mode (#2912)
* add fetching global cline rules files

* add toggle functionality to clinerules

* add toggles modal

* changeset

* change codicon

* fix bad merged files

* fix duplicate globalClineRulesToggles declaration in state.ts from merge

* refresh cline rules on modal open
2025-04-16 19:58:19 -07:00
Yaroslav Halchenko 45b1666325 Add codespell support (config, workflow to detect/not fix) and make it fix some typos (#2939)
* Add github action to codespell main on push and PRs

* Add rudimentary codespell config

* run codespell throughout fixing typos automagically (but ignoring overall fail due to ambigous ones)

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w || :",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Do interactive fixing of some ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 4",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Fix Formatting

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-16 19:53:16 -07:00
Matt Rubens 6c5b99d304 Safer check for xAI reasoning content (#2936) 2025-04-16 18:45:07 -07:00
Ara 02120810ce Adding o3 and o4-mini models (#2932)
* Revert "Add OpenAI o3 & 4o-mini (#2927)"

This reverts commit 89cbbe95e3.

* Adding O3 and O4-mini Models

* Adding O3 and O4-mini Models

* Adding O3 and O4-mini Models
2025-04-16 17:27:12 -07:00
Frostbourne 612744394a [ENG-417] Add command to focus chat input (#2910)
* Make command to focus on chat input

* Allow cmd to focus from anywhere

* changeset

* fix unit test

* Jump to chat input from anywhere

* fix focusChatInput call after opening ext
2025-04-16 16:00:10 -07:00
Trevor Hudson 01a48736eb Add ability to send context with an options selection (#2379)
* - add ability to send context with an options selection
- add sourcemaps for debugging in the webview

* remove colon if there is no message

* resolve conflicts

* remove sourcemap
2025-04-16 15:40:30 -07:00
Evan 4add38032e Add Accurate Title (#2934)
* Add openrouter ranking

* changeset
2025-04-16 12:55:17 -07:00
Evan 73078d63ce Pirate Mode Activated (#2890)
* add fetching global cline rules files

* add toggle functionality to clinerules

* selectively filter out OS generated files from read directory

* remove .file filtering

* remove duplicate imports

* pass path to global rules directory in system prompt

* empty commit to trigger tests
2025-04-16 12:44:04 -07:00
Peter Dave Hello 89cbbe95e3 Add OpenAI o3 & 4o-mini (#2927)
Reference:
- https://platform.openai.com/docs/models/o3
- https://platform.openai.com/docs/models/o4-mini
2025-04-16 11:16:55 -07:00
Andrei Edell 4d696f377c PROTOBUS: gRPC over vscode message passing (#2830)
* initial protobuf setup & rough domains

* delete old protos for now

* phase 1

* initial working demo

* simplify call a bit more

* remomve some comments

* use common.proto

* remove redundant browser-service layer, clean up naming

* delete mcp proto for now

* better client layout & easier service imports

* a reflection-based way to create grpc services automatically

* better code layout for grpc implementations

* switch to auto-generating the method registration via bash

* hook protobufs into package.json scripts

* make service implementations more generic

* warn user that they must install protoc deps

* delete old message passing for getBrowserConnectionInfo

* format fix

* format fix

* rewrite build-protos in node & update package.json

* don't protoc during package

* change how imports work based on feedback

* package lock seems necessary now

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-04-15 17:37:02 -07:00
Yusuke Mizushima dd84bdaa9e Fix/vertex token count (#2893)
* feat: add token usage metadata handling in VertexHandler

* feat: add cost calculation for API usage in VertexHandler

* fix: correct vertexai token count calculation
2025-04-15 17:22:46 -07:00
github-actions[bot] 4d8bdf2945 v3.12.3 Release Notes
v3.12.3 Release Notes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-14 19:45:33 -07:00
pashpashpash ff3c840021 CLI for orchastrating automated evals (#2874)
* cli for evals

* preloading with multiple language extensions

* preloading with multiple language extensions

* moving to my repo

* test server
2025-04-14 19:29:49 -07:00
monotykamary 3cd2b18800 fix(api): update cacheReadsPrice for OpenAI GPT-4.1 models (#2887)
Set correct cacheReadsPrice (cached input price) for gpt-4.1, gpt-4.1 mini, and gpt-4.1 nano based on official OpenAI pricing. No changes to cacheWritesPrice as per current OpenAI documentation. This ensures prompt caching costs are accurately reflected for these models in cost calculations.
2025-04-14 18:34:39 -07:00
Toshii 0b19ba6023 NEW model update (#2892)
* new

* changeset
2025-04-14 17:57:03 -07:00
Evan 75143a718a add fetching global cline rules files (#2864)
* add fetching global cline rules files

* remove bad import from main merge

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-14 16:20:19 -07:00
canvrno 7276f50d9e ENG-319/Add indicators when tools operate outside of workspace (#2836)
* rebased/mergefix

* one small remaining rebase fix

* more fixes

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-14 12:17:03 -07:00
*caco 2964388585 feat: add copy code button to mermaid diagrams(#2129) (#2758)
* feat: add copy code button to mermaid diagrams(#2129)

- Added copy button to MermaidBlock component
- Improved loading message text
- Ensure image buffer type safety with explicit Uint8Array conversion

* Apply suggestions from code review

Enhance accessibility by adding an aria-label description to the "Copy Code" button .

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update webview-ui/src/components/common/MermaidBlock.tsx

Add try/catch or handle promise rejection to provide feedback on copy failures.

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>

* lint code after use CR suggestions

* fix: add async/await for clipboard operation handling - Fixes #2129

---------

Co-authored-by: qiaozhuoyue <qiaozhuoyue@bytedance.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-14 12:58:09 -06:00
yusheng chen 6fcd43597e refactor: type improvements of multi files that doesn't modify functionality (#2878) 2025-04-14 12:57:18 -06:00
yusheng chen 9de6af51fd feat: add src/api/transform/vscode-lm-format.test.ts (#2600) 2025-04-14 12:56:35 -06:00
canvrno ab59bd9b50 initial (#2795)
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-14 11:42:04 -07:00
yusheng chen a0252e70d9 convert inline style to tailwind css of file SettingsView.tsx (#2684)
* convert inline style to tailwind css of file `SettingsView.tsx`

* style: fix `SettingsView.tsx` styling

https://github.com/cline/cline/pull/2684#issuecomment-2784520485
2025-04-14 11:35:05 -07:00
github-actions[bot] faa471b6e2 v3.12.2 Release Notes
v3.12.2 Release Notes
2025-04-14 10:59:17 -07:00
Dennis Bartlett 80dd10d815 Revert "chore: prompt cache up to the third-to-last message in the conversati…" (#2883)
This reverts commit 359f77c2e3.
2025-04-14 10:54:48 -07:00
Saoud Rizwan 109f0ec1a4 Add gpt-4.1 (#2880)
* Add gpt-4.1

* Create eighty-carpets-attack.md
2025-04-14 10:52:43 -07:00
yusheng chen e2cd3d706c refactor: extract interface LanguageModelChatSelector to file api/providers/types.ts (#2879) 2025-04-14 10:13:20 -07:00
atsushi-ishibashi 359f77c2e3 chore: prompt cache up to the third-to-last message in the conversation history for claude (#2847)
* chore: cache up to the third-to-last message in the conversation history

* chore: run format

* chore: create changeset

* chore: typo
2025-04-14 09:40:18 -07:00
Saoud Rizwan 2caf1dc26b Prepare for release 2025-04-12 23:30:20 -07:00
yusheng chen ca2b4168d5 refactor: type improvement of file Announcement.spec.tsx (#2853) 2025-04-12 23:21:43 -07:00
yusheng chen 0dabb06cb2 refactor: type improvement of file MarkdownBlock.tsx (#2854) 2025-04-12 23:21:21 -07:00
yusheng chen dace684afa refactor & perf of file HistoryView.tsx (#2855) 2025-04-12 23:20:59 -07:00
yusheng chen 86aadd1bb7 refactor: type improvement of file shell.test.ts (#2856) 2025-04-12 23:20:14 -07:00
yusheng chen 0c41159579 refactor: type improvement of file McpHub.ts (#2852) 2025-04-12 23:19:48 -07:00
yusheng chen 70cdd9d716 refactor: type improvement of file utils/hooks.ts (#2857) 2025-04-12 23:19:08 -07:00
yusheng chen 6589659c9d refactor: type improvement of file core/controller/index.ts (#2851) 2025-04-12 21:46:42 -07:00
yusheng chen 9224a33d01 refactor: type improvement of file BrowserSession.ts (#2850) 2025-04-12 21:45:49 -07:00
Saoud Rizwan ceaed842e0 Update Announcement 2025-04-12 21:40:39 -07:00
Saoud Rizwan 8d5d834a1f Remove legacy checkpoint overlay 2025-04-12 21:36:59 -07:00
Saoud Rizwan 5cdbf4ea38 fix: resolve conflicts 2025-04-12 21:32:17 -07:00
Saoud Rizwan 4004e9efed Revert "ENG-377 Changing Checkpoint UI to take less real space on the chat interface (#2752)"
This reverts commit 2ef4e56bca.
2025-04-12 21:29:17 -07:00
Saoud Rizwan 8fb419f273 Revert "Use line indicators for checkpoint markers (#2785)"
This reverts commit 386d5e41e7.
2025-04-12 21:25:44 -07:00
Saoud Rizwan e855e82d5e Update README 2025-04-12 20:48:40 -07:00
Saoud Rizwan 12139bf448 fix: resolve conflicts 2025-04-12 20:45:20 -07:00
Saoud Rizwan 1bca8a9d12 Use improved context manager 2025-04-12 20:41:59 -07:00
Saoud Rizwan ca5cdd13de Add mcp docs tool 2025-04-12 20:41:55 -07:00
Saoud Rizwan b3b074d90a fix: browser tool showing loading spinner when task is cancelled 2025-04-12 00:47:58 -07:00
Saoud Rizwan bf10cd4efb Modify prompt response to diff edit error 2025-04-12 00:34:57 -07:00
Saoud Rizwan 0bc355d141 Show favorited models at top always 2025-04-12 00:03:59 -07:00
Saoud Rizwan f9094c0fb6 Prepare for release 2025-04-11 23:40:35 -07:00
Saoud Rizwan 8497c435f4 Fix auto-approve menu showing no selected options 2025-04-11 23:37:38 -07:00
Saoud Rizwan 906dac25c6 Fix xAI provider name 2025-04-11 23:06:31 -07:00
Saoud Rizwan bdeec6a510 Refactor ServersToggleModal to improve layout 2025-04-11 23:02:45 -07:00
Saoud Rizwan 15d01434bb Update labels in AutoApproveMenu for clarity on file access permissions 2025-04-11 22:42:29 -07:00
Saoud Rizwan 45c041b781 Fix auto approve item types 2025-04-11 22:35:21 -07:00
Saoud Rizwan 40bf6241f9 Fix checkpoints bugs (#2841)
* Fix browser tool actions not being grouped because of checkpoints

* Fix bug where hovering mouse over checkpoint and not moving would make popover disappear

* Fix duplicate checkpoints bug

* Create slow-hornets-flash.md
2025-04-11 22:16:46 -07:00
Saoud Rizwan a26494e5cc Improve diff editing animation and prompts for large files (#2839)
* Remove streaming animation between chunks of edits

* Add quick scrolling animation between chunks of changes

* Modify prompts to handle large files

* Modify prompt to handle multi-edits to same file

* Add diff edit indicator

* Create dirty-guests-shout.md
2025-04-11 21:54:17 -07:00
yusheng chen 941414e87f chore: remove unused import of file BrowserSettingsMenu.tsx (#2680) 2025-04-11 20:10:27 -07:00
Saoud Rizwan 1af57b7c62 Remove options from plan mode tool + improve plan mode prompt (#2728)
* Remove options parameter from plan mode tool

* Improve task continuation prompt
2025-04-11 20:09:07 -07:00
yusheng chen b057710083 refactor: add try catch to file context-error-handling.ts (#2803) 2025-04-11 20:07:10 -07:00
yusheng chen 0096521966 refactor & perf of file ServerRow.tsx (#2805) 2025-04-11 20:05:42 -07:00
canvrno 1f50188c41 ENG-449/Checkpoint UI hover debounce (#2806)
* initial

* added debounce for checkmark expanded ui

* corrected bookmark size

* removed unnecesary cleanup

* fixed removed code

* removed cleanup for real this time

* refactored to reduce complexity, added cleanup
2025-04-11 20:03:24 -07:00
yusheng chen d00103419f refactor: type improvement of file LinkPreview.tsx (#2807) 2025-04-11 20:00:27 -07:00
yusheng chen 1c9bbba749 refactor: type improvement of file ChatTextArea.tsx (#2808)
* refactor: type improvement of file `ChatTextArea.tsx`

* refactor: type improvement of interface `GitCommit`

doc: add changeset
2025-04-11 19:59:54 -07:00
yusheng chen b54db8b82d refactor: type improvement of file controller/index.ts (#2810) 2025-04-11 19:59:18 -07:00
yusheng chen 7c7e86d055 chore: remove unused file TabNavbar.tsx (#2812) 2025-04-11 19:58:45 -07:00
yusheng chen 458583a476 refactor & perf of file ThinkingBudgetSlider.tsx (#2816) 2025-04-11 19:58:34 -07:00
dependabot[bot] f76ec25559 Bump vite from 6.2.5 to 6.2.6 in /webview-ui in the npm_and_yarn group (#2821)
Bumps the npm_and_yarn group in /webview-ui with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.5 to 6.2.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 19:57:59 -07:00
Evan 90e9c49654 Factor out get cline rules function (#2827)
* factor out cline rules functionality

* changeset

* Update fs.ts

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-11 19:57:39 -07:00
Ara 0ea8506bf9 Eng-451 Fixing bugs in the provider name when we switch models halfway between a chat (#2833)
* Refactor Task class to use global state for API provider ID in telemetry events because this.apiProvider is readonly and shows the old value on model switch

* Updating README

* Updating README

* Updating README

* Updating README

* Updating README

* Updating README
2025-04-11 19:53:26 -07:00
Evan 1c22ee5896 Grok3 reasoning effort (#2837)
* stream reasoning tokens

* changeset

* toggle xai grok 3 mini reasoning

* changeset

* Add reasoning effort checkbox and fix plan mode toggling

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-11 19:52:04 -07:00
pashpashpash 30857e969e full automation (#2817) 2025-04-11 13:41:40 -07:00
Evan 0d07b421df Stream Grok 3 Mini reasoning tokens (#2829)
* stream reasoning tokens

* changeset

* Update .changeset/sixty-jokes-hope.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-11 13:04:09 -07:00
pashpashpash ff9484e141 test server waits to respond until task completed (#2815)
* test server waits to respond until task completed

* removed taskCompleted
2025-04-11 01:57:08 -07:00
canvrno ccc8e471e3 ENG-320/Auto-approve controls to restrict Cline actions outside of workspace (#2779)
* initial- buttons

* more buttons

* incremental

* increment

* Renamed old auto approve name

* comments

* started read options

* paused here

* cleanup

* de-duplication and renames

* renames

* restored unrelated test file

* labels and semantics

* fixed labels issue

* cleanup/dedup

* minor semantics

* cleanup

* changeset

* one line

* ellipsis-dev changes

* reverting settings names

* made new settings optional

* Update webview-ui/src/components/chat/AutoApproveMenu.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* testserver fix

* testserver.ts fix / prettier

* testserver.ts fix / prettier

* Delete src/services/test/TestServer.ts

* restored testserver.ts

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-11 01:30:12 -07:00
pashpashpash 9859136e80 increased max tasks 100-10000 in test mode (#2814) 2025-04-11 01:15:10 -07:00
Saoud Rizwan 7969ba2d68 Remove WeakRef usage (#2811)
* Remove controllerRef

* Remove webviewProviderRef

* Remove controllerRef

* Fix test

* Create odd-jeans-wash.md

* Fix test
2025-04-11 00:28:56 -07:00
yusheng chen 16c0992672 refactor: remove unnecessary type assertion as any (#2802) 2025-04-10 23:53:32 -07:00
Suvarchal Kumar Cheedela 3b8be75c7f Enhance ollama provider (#2708)
* Enhance Ollama provider with retry mechanism, timeout handling, and improved error handling

* Make Ollama tests optional when Ollama is not running

* Update src/api/providers/__tests__/ollama.test.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-10 23:50:05 -07:00
Daniel Trugman a00f24e182 Requesty: Add model info (#2190)
Adding model information to Requesty provider.

- Add a new model picker component for Requesty.
- Enable controlling thinking budget via a slider

IMPORTANT:
Model information is fetched ONLY(!) when the user chooses "requesty"
as their provider to avoid any boot latency.
2025-04-10 23:49:47 -07:00
Xudong Guo 238654e6a2 feat: Add more models support for doubao (#2736)
* feat: Add more models siport for doubao

* fix: package-lock.json  should not be submitted
2025-04-10 23:49:26 -07:00
pashpashpash 643319f106 setting auto approve settings on test server start (#2800) 2025-04-10 19:03:29 -07:00
pashpashpash 0645eccd2a Message catching added to test server (#2797)
* added message catching to test server

* added message catching to test server

* fixing logger initialization

* fixed race condition

* adding logging

* removed redundant if condition
2025-04-10 18:52:52 -07:00
Evan 3a6f0c2fd0 move context files to context folders (#2798) 2025-04-10 17:50:04 -07:00
canvrno 17314cb88d ENG-317 / Feat: Add model "favorites" toggle for Cline & OpenRouter providers (#2722)
* initial

* Still facing issue with OR/Cline provider switching

* Working with provider switches

* cleanup

* cleanup

* changset

* Update .changeset/twelve-rocks-drum.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* test (in progress)

* added telemetry

* removed test

* cleanup

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-10 17:20:16 -07:00
Evan 6f9cf8a028 Make .clinerules folder (#2781)
* switch clinerules to directory

* changeset
2025-04-10 17:01:56 -07:00
Evan 47aecdfc75 MCPToggleModal - Add button to open config (#2743)
* make ServerRow not optionally not expandable

* changeset

* factor out servers toggle list

* changeset

* add servers modal

* changest

* Reduce padding in modal

* separate fetch useEffect for more efficient rendering

* add button to open installed servers config

* changeset

* add mcptab type

* change codicon

* modify button display

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-10 16:25:08 -07:00
pashpashpash fb037a05c1 better mcp marketplace installation prompt (#2793) 2025-04-10 16:06:42 -07:00
Saoud Rizwan d9cedc41b7 Add announcement about redesigned checkpoints 2025-04-10 09:24:48 -07:00
Saoud Rizwan f978ecce52 Prepare for release 2025-04-10 02:13:04 -07:00
Saoud Rizwan 4c28760557 fix: update ErrorService to use isEnabled() consistently 2025-04-10 02:07:00 -07:00
Dennis Bartlett ba79a51dd7 Error Service Respects Telemetry (#2780)
* Refactor Service to be able to be disabled based on telemetry settings

* Add telemetryService enabled check

* Create wet-avocados-kiss.md

* Update src/services/error/ErrorService.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/services/error/ErrorService.ts

* Update src/services/error/ErrorService.ts

* Update src/services/error/ErrorService.ts

* Update src/services/error/ErrorService.ts

* Update src/services/error/ErrorService.ts

* Apply suggestions from code review

* Add comment about opt in

* Fixes

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-10 02:04:54 -07:00
Saoud Rizwan 4e5cc92065 Fixes issue where deleting tasks wasn't clearing the task metadata or context history files; let model recording fail gracefully (#2778)
* Fixes issue where deleting tasks wasn't clearing the task metadata or context history files; let model recording fail gracefully

* Create clean-boats-film.md

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-10 02:04:10 -07:00
Saoud Rizwan b42c0f2571 Use legacy context manager (#2786)
* Use legacy context manager

* Revert changes post new context management
2025-04-10 01:51:50 -07:00
Saoud Rizwan 386d5e41e7 Use line indicators for checkpoint markers (#2785)
* Use line indicators for checkpoint markers

* revert comment removal

* Create unlucky-dragons-fly.md
2025-04-10 01:07:42 -07:00
Dennis Bartlett 2823e6c845 Update list of models and set new defualt for xAI (#2777) 2025-04-09 17:32:35 -07:00
Dennis Bartlett cef9af16a4 Remove stream options from XAIHandler and add new Grok-3 model variants to API configuration (#2776)
Co-authored-by: arafatkatze <arafat.da.khan@gmail.com>
2025-04-09 17:20:06 -07:00
Dennis Bartlett 49d3bcfedc Update sentry in extension to add traceability and version (#2775)
* Add Sentry package

* Setup Logger to use Error Service

* Enhance traceability and message information
2025-04-09 16:51:58 -07:00
pashpashpash d36a44ec38 Cline Task Server (#2773)
* added cline task server

* moving test server into separate file

* removed redundant test server in extension
2025-04-09 16:24:47 -07:00
Dennis Bartlett cbcf89d634 Add sentry to extension (#2766)
* Add Sentry package

* Setup Logger to use Error Service

* Update src/services/error/ErrorService.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-09 16:01:10 -07:00
pashpashpash 6a10e30436 linebreak (#2765) 2025-04-09 15:33:42 -07:00
pashpashpash 2c0afbc3be added IS_TEST build flag (#2770)
* added IS_TEST build flag

* removed cross-env
2025-04-09 15:32:08 -07:00
Ara 2ef4e56bca ENG-377 Changing Checkpoint UI to take less real space on the chat interface (#2752)
* Enhance chat component interactivity by adding row index and hover state management. Updated BrowserSessionRow, ChatRow, and CheckmarkControl to support row-specific hover effects and state tracking, improving user experience during interactions.

* Adding hovered row index

* Adding hovered row index

* Adding hovered row index
2025-04-09 13:53:10 -07:00
Toshii e26d001585 ENG-422 (#2768)
* task restore user message block structure

* changeset

* check str
2025-04-09 13:19:58 -07:00
Trevor Hudson 6fc2cb128e Trevor/eng 253 system for users to report errors to GitHub (#2756)
* add metadata for model and apiProvider so it's available to Cline

* fix test

* check for existing array in case of old task

* only write if the metadata changes
2025-04-09 12:12:32 -07:00
Saoud Rizwan 8cc64f5e7e Revert "split user text during task resumption (#2699)"
This reverts commit fdd04bc942.
2025-04-09 02:48:05 -07:00
Saoud Rizwan a4412e8014 Update new task tool component styles 2025-04-09 02:44:26 -07:00
Saoud Rizwan 36f7abb8ec Prepare for release 2025-04-09 02:30:20 -07:00
Saoud Rizwan 080a79bd7d Remove mcp docs tool 2025-04-09 02:19:28 -07:00
pashpashpash 0208fdf555 fixed test (#2755) 2025-04-08 19:51:09 -07:00
Dennis Bartlett 226f20f28f Add new types to PR template (#2750)
* Update scripts so that test runs all tests by default

* Update PR Template to include new types
2025-04-08 19:20:02 -07:00
Dennis Bartlett fdc76c8802 Update scripts so that test runs all tests by default (#2749) 2025-04-08 19:19:12 -07:00
Saoud Rizwan 7099a00674 Add info about smarter context management (#2754)
* Add info about smarter context management

* Create nice-toys-help.md
2025-04-08 19:18:13 -07:00
monotykamary b470229a97 feat: add tiered pricing for gemini-2.5-pro (#2741)
* feat: add tiered pricing for gemini-2.5-pro

* fix: ensure price tiers are sorted before lookup

* refactor: remove old prices

* refactor(settings): improve model tier pricing display clarity

- Clarify token limit display using full numbers instead of 'k'.
- Specify price unit as '/million tokens' for better understanding.
2025-04-08 19:06:25 -07:00
pashpashpash e37f6e3b88 Context in context (#2745)
* context in context

* keeping comments

* minimal context window line

* nit
2025-04-08 17:55:27 -07:00
pashpashpash 4c72bd96ab New Horizons (#2747)
* new task tool added

* small fix

* fixed numbering

* system prompt
2025-04-08 17:20:30 -07:00
Evan be120e85be Keybinding to quick-add context to Cline chat (#2748)
* add cmd + quote keybinding to add to cline chat

* changeset

* auto focus and start cursor on new line for easy UX

* changeset

* Remove extra new line character

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-08 16:45:34 -07:00
Toshii fdd04bc942 split user text during task resumption (#2699)
* task restore user message block structure

* changeset
2025-04-08 16:13:07 -07:00
Shlomo b7c03af9ac fix: can't open as image diagrams with non-Latin1 characters (#2402) 2025-04-08 16:12:21 -07:00
github-actions[bot] 1961583eb6 v3.10.0 Release Notes and Banner
v3.10.0 Release Notes and Banner
2025-04-08 16:05:52 -07:00
Evan 35dd137c36 ApiOptions TS Errors (#2746)
* unblock apioptions spec errors

* changeset
2025-04-08 13:49:04 -07:00
Toshii 867a69777a context management (#2731)
* base context manager

* responses

* changeset

* Disable unit tests until runner is updated (#2733)

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-08 10:11:29 -07:00
Dennis Bartlett b67afb84a7 Update runner name 2025-04-07 22:54:07 -07:00
Dennis Bartlett abca4cc76a Add dispatch trigger and restrictions to changeset converter. (#2735)
* Add dispatch trigger and restrictions to changeset converter.

* Update .github/workflows/changeset-converter.yml

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update action to specific version

* Fix format, Update package-lock version

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-07 22:42:16 -07:00
Evan 73c64d9ab5 Add Toggle MCP Servers Modal (#2723)
* make ServerRow not optionally not expandable

* changeset

* factor out servers toggle list

* changeset

* add servers modal

* changest

* Reduce padding in modal

* separate fetch useEffect for more efficient rendering

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-07 22:22:20 -07:00
Suvarchal Kumar Cheedela 989eeb2a87 Fix failing webview UI tests for version 3.2 (#2707)
* Fix failing webview UI tests for Announcement component

* Remove unnecessary comments

* Fix Format

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-07 22:20:36 -07:00
Evan d5524e747a Fix MCP auto approve toggle [2/2] (#2729)
* fix state out of sync

* changeset

* remove event.isTrusted check

* changeset
2025-04-07 22:19:19 -07:00
canvrno 521258239a ENG-315/Add execute all commands toggle nested under "safe commands" (#2677)
* initial

* Menu

* small clarity change

* cleanup

* Tests

* Update .changeset/ninety-pots-rescue.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/test/TerminalCommandApprovalSettings.test.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* indentation

* smooth transition

* cleanup

* Consolidated enabledActionsList for display, fixed unchecking issue

* Updated shouldAutoApproveTool to better manage sub-options for future auto approve changes

* removed test

* cleanup

* comments and extra bool check

* cleanup

* change to compare ids isntead of label strings

* test in progress

* test in progress

* no tests for now

* type safety change

* cleanup

* rename

* comments

* Copy

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-07 22:17:34 -07:00
Evan dd25195b4d Fix MCP Auto-Approve - State out of Sync [1/2] (#2727)
* fix state out of sync

* changeset
2025-04-07 22:13:55 -07:00
Saoud Rizwan 0b95ad3bae Add load_mcp_documentation tool (#2703)
* Add load_mcp_documentation tool

* Create fluffy-toys-punch.md
2025-04-07 22:10:16 -07:00
Andrei Edell 95120bb050 Remote browser control using devtools protocol (#2423)
* manual port

* successfully open remote chrome

* clean up auto-detect vs specified path

* move the browser settings into regular settings

* changeset & prettier

* correct chrome path description, remove some old comments, and rename headless mode to local mode

* rename incorrect headless mode to 'local mode'

* Sub-PR of hugelung/remote_browser: clicking browser widget's gear opens basic settings & scrolls down with a highlight (#2439)

* first version of scrolling to browser settings

* really nice generic scroll to settings & highlight

* formatting & changeset

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>

* added feature to detect and display chrome path as placeholder in browser settings (#2442)

Co-authored-by: Andrei Edell <garoth@gmail.com>

* Features to relaunch browser in debug, test connection (#2440)

* Features to Relaunch browser in debug, test connection

* Update src/services/browser/BrowserSession.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update webview-ui/src/components/browser/BrowserSettingsMenu.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Andrei Edell <garoth@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* fix a merge conflict resolution error

* fix linter issue

* clarify settings descriptions

* Remove sketchy network scanning code

* respect viewport size in remote host

* headless browser fix (#2451)

* Disable notifications in browser

* start of info panel popover (#2453)

* start of info panel popover

* remove duplicated message & prettier fix

* Revert "remove duplicated message & prettier fix"

This reverts commit dcefef35aa.

* info styling, close browser tab, hide headless info

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>

* remove headless checkbox

* settings layout rework & more auto

* new chrome flags experiments

* make headless choice automatic & phrasing & visual cleanups

* auto-recheck chrome connection every second

- while we are looking at settings
- while we have remote debugging enabled

* continuous remote connection testing & ux cleanup

* remove advanced settings from package.json

* format fixes

* dont display connection type after dc to smooth over ui of reloading tasks

* seems we need package-lock now for ci

* Revert "remove advanced settings from package.json"

This reverts commit 5defe4a8ca.

* relaunch correctly with default session

* prevent about:blank opening on relaunch

* Resolve merge conflicts with refactor

* add browser tool telemetry

* try launching chrome using node spawn_child to detach it

* browser settings update

* do async dispose for browsersession

* remove duplicated message implementation

* Remove remote browser settings from configuration, and enhance browser settings UI with an advanced settings button.

* Remove updateBrowserSettings

* Fix text with chrome path

* fix arafat's pr note about multiple timers

* fix saoud's note about require use

* Remote browser logging (#2682)

* logging

* reduce logging levels

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>

* Make browser status popup adapt to viewport width

* remove requires for exec/spawn

* remove unneeded comments

* error telemetry

* remove headless mode / settings everywhere

* migrate values list to simple endpoint string

* fix log spam and clean up a comment

* Fixes; copy

* Remove local state since we're already using extension state

* Remove unnecessary remoteBrowserHost and remoteBrowserEnabled states

* Fix status wrapping

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: canvrno <kevin@cline.bot>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-07 21:57:45 -07:00
gislinyuxin dbe5f74884 Fix: Updating locales\zh-cn\README.md (#2720) 2025-04-07 19:44:40 -07:00
Dennis Bartlett 938f04b28d Disable unit tests until runner is updated (#2733) 2025-04-07 18:58:55 -07:00
Sam 801946f5ea feat: allow enabling prompt caching for LiteLLM + Claude (#2627)
* feat: allow enabling prompt caching for LiteLLM + Claude
2025-04-07 16:45:37 -07:00
eljapi 13b69415fa feat: drag and drop files and folders into chat (#2676)
* Feature: Drag and Drop

* leading slash

Insert multiple files sequencially

Folder drop

Older mention mechanism restore

Multiple files droped

Webview not neccesary

comments removed

More comments

things

restored code

removed comment

* handleTextDrop

* StopPrograpation not need it

* Multiple folders drag and drop

* changesets

* Comments removed

* More comments removed

* Consolidate drag-and-drop message types

* Context menu fileSearchResult error

* package lock version

* inputValue and comments on removeMention restored
2025-04-07 13:41:58 -07:00
Tomochika Hara 9298be6d0e docs: Fix a broken link in Cline Tools Guide (#2716)
* docs: Fix the broken link

* Update cline-tools-guide.md

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-07 12:35:52 -07:00
github-actions[bot] 807a4b36df v3.9.2 Release Notes
v3.9.2 Release Notes
2025-04-05 17:45:56 -07:00
Dennis Bartlett b4eaf48f44 Fix Changesets (#2696) 2025-04-05 17:19:24 -07:00
Dennis Bartlett 69b499e7fe Fix Changesets... 2025-04-05 17:09:06 -07:00
pashpashpash a981ec7566 better ux around cline provider model selection (#2694)
* better ux around cline provider model selection

* changeset

* small styling + naming

* Modify recommended models

* Fixes

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-05 16:54:15 -07:00
canvrno d8cdd98de1 fix:merge conflict fix (#2688)
* merge conflict fix

* changeset
2025-04-05 16:08:56 -07:00
canvrno 67cff02892 Feat: Faster file mentions searching, candidate scoring, sorting (#2599)
* Rebase

* prettier, logging

* removed opened file

* rebase

* fix

* Streaming

* Sorting

* Removed streaming

* One more file

* cleanup

* fix

* cleanup

* more filtering, prevented results flashing

* Better sorting/scoring, cleanup

* prettier

* more efficient sort

* prettier

* optimize and document

* cleanup

* one small cleanup

* changeset

* added package-lock.json to resolve git test runner error

* removed leftover logging

* tests

* tests

* moved tests to non running statae

* formatting

* setTimeout added for ContextMenu to prevent immediate invocation

* Removed unnecesary timeout

* Added 500ms delay to Searching... status indicator

* Fix package lock

* added updated tests

* More

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-05 00:28:46 -05:00
canvrno 24a34bdc65 eng-332/Diff editing context management (#2648)
* initial

json interface added

Added tracking, watching, prompting

Documentation & plan update

Task resumption handling

Documentation and plan update

notes

refactor

incremental

tweaks

Addnl cleanup and refactor

refactor, cleanup

removed task reload file watching for now

removed internal documentation

* changeset

* Removed task resume logic, deemed unnecesary

* Update src/core/context-tracking/FileContextTracker.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/core/context-tracking/FileContextTracker.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/core/context-tracking/FileContextTracker.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update src/core/context-tracking/FileContextTracker.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* One small change

* tests

* prettier

* logging cleanup

* logging cleanup

* Moved markFileAsEditedByCline to before file save to prevent false positives, removed duplciate filewatcher initialization

* one more filewatcher de-dup

* Removed incorrect recentlyModifiedFiles.add placement

* udpated tests

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-05 00:27:32 -05:00
monotykamary 5425220e8e fix: update output pricing for Gemini Flash models (#2685) 2025-04-05 00:25:33 -05:00
canvrno 075d82fb90 ENG-296 - Add telemetry for followup questions (#2661)
* initial

* added quantity

* task.options_ignored

* cleanup

* cleanup

* changeset

* Much neater

* cleanup
2025-04-05 00:23:01 -05:00
yusheng chen 59dca4f55c convert inline style to tailwind css of file WelcomeView.tsx (#2686) 2025-04-05 00:20:39 -05:00
Evan 8ad21f2cea Factor out servers list (#2683)
* make ServerRow not optionally not expandable

* changeset

* factor out servers toggle list

* changeset
2025-04-04 19:41:37 -07:00
Evan 7c5a082b9a MCP - Add server row isExpandable [1/2] (#2679)
* make ServerRow not optionally not expandable

* changeset
2025-04-04 18:12:44 -07:00
Kefei Tu 2193847739 feat(#1456): Add support for ByteDance Doubao (#2660)
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-04 17:54:31 -07:00
camaro cc2f8e7a1a Fix/duplicate bom (#2651)
* fix: Prevent duplicate BOM in incoming content for DiffViewProvider

* fix: Prevent duplicate BOM in changeset
2025-04-04 17:53:31 -07:00
Everett Bolton 192a346840 Update link in README.md (#2672)
Update "getting started" link to point to the right page.
2025-04-04 17:15:53 -07:00
dependabot[bot] 0066cd8553 Bump vite from 6.2.4 to 6.2.5 in /webview-ui in the npm_and_yarn group (#2669)
Bumps the npm_and_yarn group in /webview-ui with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.4 to 6.2.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-04 17:14:03 -07:00
Evan 7d4889837b Webview - Update import to use path aliases (#2675)
* update imports to aliases

* changeset
2025-04-04 17:09:34 -07:00
Evan 8404e74ea1 Reorganize Webview MCP Directory Structure (#2658)
* reorganize directory structure

* rename back files to make diff more readable

* rename back because it didn't help

* rename index files to their component names

* fix addLocalServerForm imports
2025-04-04 12:48:31 -07:00
Evan 9d5772c42c Webview - Add Import Path Aliasing (#2673)
* add import path aliasing

* changeset

* shared directory path aliasing
2025-04-04 12:28:40 -07:00
github-actions[bot] c7dad1ad13 v3.9.1 Release Notes
v3.9.1 Release Notes
2025-04-04 11:24:33 -07:00
Ara 894fa3562e Adding Gemini 2.5 pro preview (#2671)
* Adding Gemini 2.5 pro preview

* Adding Gemini 2.5 pro preview
2025-04-04 23:29:09 +05:30
Evan ff762d36dd move formatSize to format file (#2662) 2025-04-04 09:17:01 -07:00
github-actions[bot] 6e40ec16f3 v3.8.7 Release Notes
v3.8.7 Release Notes
2025-04-03 22:17:07 -07:00
Evan 74307ae886 Saoudrizwan/add local (#2637)
* Add local mcp servers tab

* Remove form

* docs links

* changeset

* punctuation

* Fix max width

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-03 21:44:31 -07:00
yusheng chen 6f20321231 refactor & perf: declare constant object for inline style of file BrowserSessionRow (#2645) 2025-04-03 21:42:44 -07:00
yusheng chen adf4c92f6e refactor & perf: declare constant object for inline style of file Announcement (#2650) 2025-04-03 21:11:40 -07:00
Mark Percival 21e95ab67e Chore: Add baseline unit tests (#2417)
* Fix: Better Windows path support

* Move to 'chai' for test running

* Fix: Let's start with what we know

* Chore: Add 'root' level file path test, remove less useful tests

* Chore: Add 'root' level file path test, remove less useful tests

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-03 20:57:07 -07:00
Saoud Rizwan cac0309579 Fix deepseek/openai pricing and token counting (#2646)
* Fix deepseek/openai pricing and token counting

* Create ten-zebras-tie.md
2025-04-02 22:41:09 -07:00
watany 8310a3dc23 chore(bedrock): Prompt cache is GA (#2631) 2025-04-02 02:24:11 -07:00
Frostbourne 349a7c26ff Add provider/model to bug report template (#2626) 2025-04-01 22:26:13 -07:00
Jorge García Rey f21bcb22a6 feat: Add extended thinking for LiteLLM provider (#2615)
* feat: add extended thinking slider to LiteLLM provider

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* feat: add changeset

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

* fix: format

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>

---------

Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
2025-04-01 19:07:30 -07:00
canvrno d490029bd3 Permissions issue when initializing checkpoints (#2354)
* initial

* More error handling and git option

* Cleanup and tweaks

* one small change

* Update src/integrations/checkpoints/CheckpointUtils.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-01 18:35:04 -07:00
github-actions[bot] a936a7dd79 v3.8.6 Release Notes
* changeset version bump

* Updating CHANGELOG.md format

* Update Changelog
Prepare for Release

* Update Changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-04-01 18:07:37 -07:00
Saoud Rizwan f19143e35c Fix bug where menu would open in sidebar and open tab (#2618)
* Fix bug where menu would open in sidebar and open tab

* Create nasty-spies-check.md
2025-04-01 16:05:01 -07:00
kimkiyong ed16aff1ac chore: Add Mentions Feature Guide and update related documentation (#2571)
* docs: Add Mentions Feature Guide and update related documentation

* docs: Add Mentions Feature Guide and update related documentation
2025-04-01 14:54:22 -07:00
Evan 6324982592 Add Remote Server Tab (#2612)
* Add remote server form

* changeset

* naming
2025-04-01 14:52:24 -07:00
yusheng chen 70ab22098e chore: move @types/dompurify to devDependencies (#2602) 2025-04-01 14:42:19 -07:00
pashpashpash b999fe14af Updating clinerules + cline architecture diagram (#2598)
* updated clinerules

* Update extension-architecture.mmd
2025-04-01 14:40:39 -07:00
Saoud Rizwan e05cd8c8a9 Fix firebase session being inconsistent in popout tabs (#2608)
* Fix firebase session being inconsistent in popout tabs

* Create rude-vans-cry.md
2025-04-01 11:46:22 -07:00
Saoud Rizwan e2458b283f Fix bug where menu buttons wouldn't open view in sidebar (#2607) 2025-04-01 10:38:52 -07:00
akfoster 80d53e700f Add coverage tests to github workflow for PRs to main (#2500)
* add coverage to github workflows

* add changeset

* continue to run on errors

* address comments from ellipsis-dev

* add unit tests, confirm passing

* remove pyproject.toml approach to deps instalL

* use github_output env var

* add verbose mode for debugging

* verbose was not being captured

* std out, not print

* remove 1000 line dump...

* print every line separately to prevent clipping

* build extension before testing

* clean up debugging prints

* break coverage.py into smaller files

* break coverage.py into smaller files

* Relative module names not supported

* rename coverage to coverage_check to avoid naming collision

* rename coverage to coverage_check to avoid naming collision

* debugging missing coverage files

* output error on coverage report

* handling ellipsis-dev comments

* see if we need vscode test deps

* experimenting to try to get it running

* use absolute paths

* put everything in root directory

* address more comments from ellipsis-dev

* import run_command in extraction.py

* fix verbose flag

* use parent parser

* ensure safe command test will allow our commands

* make sure we install before coverage

* update tests to ensure run

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-03-31 19:48:01 -07:00
github-actions[bot] 16f5d3cd2e MORE 3.8.5 Release Notes
MORE 3.8.5 Release Notes
2025-03-31 19:31:14 -07:00
Evan 301c524458 Wiring up remote server creation (#2595)
* handle webview message for creating remote server

* changeset
2025-03-31 19:14:22 -07:00
Saoud Rizwan 94ccde51c0 Escape html content for gemini when running commands (#2594)
* Escape html content for gemini when running commands

* Create wise-dolphins-itch.md
2025-03-31 18:33:38 -07:00
canvrno 4875a54dcd Fix: Add support for existing bad commitHash values (#2545)
* Add support for bad commitHash values

* Update src/integrations/checkpoints/CheckpointTracker.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* More hash cleaning

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-03-31 14:29:54 -07:00
Evan d8af586b31 Add Remote Server Function (#2585)
* addRemoteServer function

* changeset

* add note

* remove unused import
2025-03-31 14:02:35 -07:00
dependabot[bot] 83e86ddb9f Bump vite from 6.2.3 to 6.2.4 in /webview-ui in the npm_and_yarn group (#2580)
Bumps the npm_and_yarn group in /webview-ui with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.3 to 6.2.4
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 13:52:12 -07:00
Ara 5fd07256f0 Fixing the UX bug for Requestly Provider's model selection (#2583)
* Fix the bug in requesty provider to show the right selected model in the UX.

* Adding changeset for requestly UX bug fix
2025-03-31 13:47:58 -07:00
github-actions[bot] 1b1d880bf8 3.8.5 Release Notes
3.8.5 Release Notes
2025-03-31 13:33:45 -07:00
canvrno 272cae33cf Hide INFO level MCP Server stderr log messages (#2468)
* initial

* changeset

* prettier

* console > info logging change

* Update src/services/mcp/McpHub.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-03-31 13:04:42 -07:00
Saoud Rizwan c721b34652 chore: remove global constants file 2025-03-30 21:55:55 -07:00
Saoud Rizwan 0eb2762ed2 refactor: move GlobalFileNames to disk module for better organization 2025-03-30 21:55:01 -07:00
Saoud Rizwan b34056ed87 chore: break out disk operations and prompts from Task (#2572)
* Add disk.ts and move out ensureTaskDirectoryExists

* refactor: move disk operations out of Task

* Move prompts out of Task

* Remove legacy tool_use conversion
2025-03-30 21:48:03 -07:00
yusheng chen 5f92b138e8 chore: move @types packages from dependencies to devDependencies (#2547) 2025-03-30 20:20:24 -07:00
yusheng chen 494ffac404 refactor: change unnecessary let to const (#2548)
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-30 20:19:39 -07:00
pashpashpash 6e5afda275 Task feedback (#2546)
* task feedback telemetry

* only showing first time

* Update webview-ui/src/components/chat/ChatRow.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* package lock

* lint

* no need to pass messageTs

* using type from webviewmessage

* Fix merge conflicts

* Fix whitespace issue

* Update TaskFeedbackButtons to use VSCodeButton for feedback options

- Replaced custom FeedbackButton component with VSCodeButton for improved consistency with VSCode UI.
- Removed unnecessary animation state and feedback text, simplifying the component structure.
- Added IconWrapper for better styling of feedback icons.
- Adjusted layout and spacing in ButtonsContainer for a cleaner appearance.

* Move feedback icons placement

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-30 20:16:18 -07:00
yusheng chen 04e4f25865 feat: add string.test.ts (#2557)
* feat: add `string.test.ts`

refactor: type improvement of variable `match` in file `src/api/transform/o1-format.ts`

* feat: add more test with function `removeInvalidChars`
2025-03-30 18:55:53 -07:00
Saoud Rizwan 8cd50e7a31 Fix options prompt (#2566) 2025-03-30 18:53:28 -07:00
Saoud Rizwan dd4ac0167c Add instruction to not include option to toggle to Act mode (#2565) 2025-03-30 18:50:29 -07:00
Saoud Rizwan 55f7ce9b20 refactor: Pull WebviewProvider and Controller out of ClineProvider, rename Cline to Task (#2564)
* refactor: Replace ClineProvider with Controller for improved architecture

- Replaced instances of ClineProvider with Controller in extension.ts and related files to enhance code organization and maintainability.
- Introduced a new Controller class to manage interactions previously handled by ClineProvider, streamlining the extension's functionality.
- Updated command registrations and message handling to utilize the new Controller structure, ensuring consistent behavior across the extension.
- Removed the ClineProvider class and its associated methods, consolidating functionality within the Controller class.
- Added new state management and task handling capabilities within the Controller to support the updated architecture.

* clean up

* refactor: Update Task class to use Controller reference

- Replaced all instances of ClineProvider with Controller in the Task class to align with the recent architectural changes.
- Updated references for context management, task history, and message handling to utilize the new Controller structure.
- Ensured consistent behavior across the Task class by adapting to the Controller's methods and properties.

* refactor: Simplify WebviewProvider listeners structure

* Fixes

* Make controller a dependency of webview

* refactor: Improve message listener in WebviewProvider

- Updated the setWebviewMessageListener method to use an arrow function for the message handler, preserving the 'this' context of the controller.
- Added detailed comments explaining the importance of maintaining the correct 'this' context when passing methods as callbacks in JavaScript/TypeScript.

* Add doc

* Add to chat for visible webview

* Fixes
2025-03-30 18:48:34 -07:00
pashpashpash a80022795e adding task id to request headers (#2555)
* adding task id to request headers

* changeset
2025-03-30 05:57:26 -07:00
Adam Jones 669286bb8e fix: Update Google Gemini API key link (#2539)
* fix: Update Google Gemini API key link

Google updated where you can sign up for API keys. This is the new link that will take people closer to where they can generate an API key.

* Add changeset
2025-03-29 19:14:57 -07:00
Evan e1f60ce8af Disable Toggle (#2542)
* support toggle disabled for remote servers

* changeset

* remove unused type

* remove capabilities update calls from toggles; increase timeout
2025-03-29 19:14:02 -07:00
canvrno f948e2bc7b Fixed issue with checkpoint commit hashes (#2543) 2025-03-29 18:51:20 -07:00
Dennis Bartlett 329c269a8c Update Changeset Workflow (#2531)
* Update Changeset Workflow

* Remove RELEASE related content
2025-03-29 15:34:02 -07:00
Saoud Rizwan a9617a1acb Remove docs link (#2530) 2025-03-28 22:54:00 -07:00
Saoud Rizwan 0a691cffbc Remove max width on account view (#2528) 2025-03-28 17:10:08 -07:00
pashpashpash aec21bb299 Capturing telemetry events for write to file failures (#2527)
* added telemetry to track diff edit failures

* changeset
2025-03-28 16:54:43 -07:00
dependabot[bot] 931279c845 Bump tar-fs from 3.0.6 to 3.0.8 in the npm_and_yarn group (#2525)
Bumps the npm_and_yarn group with 1 update: [tar-fs](https://github.com/mafintosh/tar-fs).


Updates `tar-fs` from 3.0.6 to 3.0.8
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.6...v3.0.8)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-28 15:54:29 -07:00
Arri Rucker 841f3da57f feat: update gemini pro 2.0 exp to 2.5 exp in Vertex AI (#2526)
* feat: update gemini pro 2.0 exp to 2.5 exp in vertexai

* added changeset
2025-03-28 15:54:13 -07:00
Benny Yen 96538309db feat(extension): add access to history, mcp, and new task buttons in pop-out view (#2511)
* feat(extension): add access to history, mcp, and new task buttons in popped-out view

- Added new commands to the editor/title section in package.json to ensure buttons are available in the popped-out view.
- Updated command registrations in src/extension.ts to use ClineProvider.getVisibleInstance() for better instance management.

* chore: run changeset
2025-03-28 15:13:31 -07:00
Trevor Hudson 1efd84a6d6 Trevhud/eng 279 (#2505)
* Move restart/delete server and all toggle all

* changeset

* move buttons back to the bottom and show icons even when expanded

* Only display auto-approve all if auto-approve mcp is enabled

* Move auto-approve setting to bottom

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-28 15:04:13 -07:00
Evan 130922fe99 SSE Transport (#2520)
* refactor types and functions

* fix timeout validation type error

* changeset

* connect to SSE MCP servers

* remove old changeset

* changeset
2025-03-28 14:49:15 -07:00
Shixian Sheng 85d0e6b0b5 Update mcp-server-from-github.md (#2522) 2025-03-28 13:31:17 -07:00
pashpashpash dff2d59172 Updated feedback to model when diff edit fails (#2518)
* updated feedback to model when diff edit fails

* changeset

* bias

* typo

* language
2025-03-28 11:43:21 -07:00
Saoud Rizwan 9cb6cf52fc Fix typo 2025-03-28 01:36:45 -07:00
Saoud Rizwan 766e7da0f4 Fix plan mode prompt (#2506) 2025-03-28 01:26:07 -07:00
Saoud Rizwan a3dac16a36 Prepare for release 2025-03-28 00:49:45 -07:00
Saoud Rizwan 185cbe15f4 Remove shutdown call for conversationObservabilityService in ClineProvider 2025-03-28 00:45:33 -07:00
Saoud Rizwan d02ea77ce0 Remove ConversationObservabilityService 2025-03-27 22:34:34 -07:00
pashpashpash af17d6239d re-enabling conversation observability (#2448)
* re-enabling conversation observability

* renamed telemetry - observability

* removing global vs code check + console info instead of logs
2025-03-27 17:40:12 -07:00
akfoster 06739a82e6 Add Coverage Actions to package.json (#2499)
* Add Coverage Reporting

* automate tests via github workflow

* ensure documents are cleaned up at the end of the workflow

* add changeset

* backout github workflow changes

* update changeset to reflect split

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-03-27 17:25:29 -07:00
Saoud Rizwan c6c49ec8ce Rename plan_mode_response to plan_mode_respond (#2498)
* Rename plan_mode_response to plan_mode_respond

* Create good-carrots-tie.md
2025-03-27 16:36:04 -07:00
Evan 8c4b642859 McpHub.ts - Better Zod Types and Function Refactor (#2497)
* refactor types and functions

* fix timeout validation type error

* changeset
2025-03-27 16:11:44 -07:00
mikelmao 0204396b37 Added Sambanova deepseek-v3-0324 (#2495)
* Added Sambanova Deepseek-V3-0324

* Added changeset
2025-03-27 14:06:42 -07:00
Duncan Ogilvie e9b6659a4b Add cost calculation support for LiteLLM provider (#2403)
* Add cost calculation support for LiteLLM provider

* Calculate input/output cost up front once
2025-03-26 19:23:23 -07:00
Saoud Rizwan 7a1e757a2c Prepare for release (#2447) 2025-03-25 20:55:31 -07:00
Felipe Albuquerque ffd80d94df Patch/openai comp max tokens (#2411)
* take into account max_tokens for OpenAI Compatible provider

* change set

* considering default -1 value

* checking maxTokens is set and greater than 0

---------

Co-authored-by: Felipe Albuquerque <felipe.albuquerque@dell.com>
2025-03-25 19:07:26 -07:00
dependabot[bot] 54bb50f195 Bump vite from 6.2.1 to 6.2.3 in /webview-ui in the npm_and_yarn group (#2429)
Bumps the npm_and_yarn group in /webview-ui with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.1 to 6.2.3
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 18:33:31 -07:00
Evan 58a1eae73f SSE Schema and Types (#2441)
* Types and schemas for SSE connections

* changeset
2025-03-25 18:30:29 -07:00
holchan a295ac2456 feat: add gemini 2.5 pro to Google AI Studio avaliable Models (#2435)
* feat: add gemini 2.5 pro to Google AI Studio avaliable Models

* Create cuddly-countries-tap.md

---------

Co-authored-by: Daniel Steigman <35793213+NightTrek@users.noreply.github.com>
2025-03-25 15:59:14 -07:00
Roman Rozhdestvenskiy 1adebe7e13 feat: add isOpenAIR1FormatEnabled option for DeepSeek compatibility (#2408) 2025-03-25 15:30:28 -07:00
Evan df48b976f6 Filter Models ModelSelect (#2437)
* filter out free models

* changeset
2025-03-25 14:57:41 -07:00
1566 changed files with 253325 additions and 41062 deletions
-7
View File
@@ -1,7 +0,0 @@
---
"claude-dev": minor
---
Add Bedrock prompt caching support (optional).
This feature protected under checkbox because it is not yet rolled out to everyone, and if you will try to send cache headers, and its not enabled for you, you will get error.
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
feat(bedrock): adding Amazon Nova
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
Improve file handling for NextJS folder naming conventions and increase file listing limits. Fix glob pattern interpretation issues with parentheses in folder names
@@ -2,4 +2,4 @@
"claude-dev": patch
---
DangerButton.tsx to Tailwind
Added Nous Research provider
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Prevents adding multiple tool results by adding existence check
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
Handle input too large Anthropic
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
Fix "See more" not showing up for tasks after task un-fold
@@ -2,4 +2,4 @@
"claude-dev": patch
---
Can test on WebIDE
Add AGENTS.md support
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Fix XML entity escaping in model content processor
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Added change to hide the context window usage message from env details when using next gen models and before the usage has reached an elevated state
@@ -0,0 +1,6 @@
---
"claude-dev": patch
---
Docs: Add missing proto generation step in CONTRIBUTING.md and new `npm run dev` script for easier terminal workflow (fixes #7335)
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Created model-family breakouts for deep-planning prompting, and laid groundwork for similar changes for other slash commands.
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Use HTTP proxies in more places
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
Fix gpt-4.5-preview's supportsPromptCache value to true
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": minor
---
Added a script to create test tasks in dev mode
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
updated move context management out of cline
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
fix: restore commit msg generation functionality to command palette
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Nous Hermes 4 model family system prompt
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": minor
---
Added support for SambaNova QwQ-32B model
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": minor
---
Add OpenAI "dynamic" model chatgpt-4o-latest
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Fix OpenAI Compatiblr provider to ensure temperature parameter is explicitly converted to number
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Adjusted prompting around focus chain, particularly for next-get/native tool calling models.
-5
View File
@@ -1,5 +0,0 @@
---
"claude-dev": patch
---
feat(bedrock): adding two regions
+291 -44
View File
@@ -8,16 +8,18 @@ Cline is a VSCode extension that provides AI assistance through a combination of
```mermaid
graph TB
subgraph VSCode Extension Host
subgraph Core Extension
subgraph VSCodeExtensionHost[VSCode Extension Host]
subgraph CoreExtension[Core Extension]
ExtensionEntry[Extension Entry<br/>src/extension.ts]
ClineProvider[ClineProvider<br/>src/core/webview/ClineProvider.ts]
ClineClass[Cline Class<br/>src/core/Cline.ts]
WebviewProvider[WebviewProvider<br/>src/core/webview/index.ts]
Controller[Controller<br/>src/core/controller/index.ts]
Task[Task<br/>src/core/task/index.ts]
GlobalState[VSCode Global State]
SecretsStorage[VSCode Secrets Storage]
McpHub[McpHub<br/>src/services/mcp/McpHub.ts]
end
subgraph Webview UI
subgraph WebviewUI[Webview UI]
WebviewApp[React App<br/>webview-ui/src/App.tsx]
ExtStateContext[ExtensionStateContext<br/>webview-ui/src/context/ExtensionStateContext.tsx]
ReactComponents[React Components]
@@ -27,45 +29,101 @@ graph TB
TaskStorage[Task Storage<br/>Per-Task Files & History]
CheckpointSystem[Git-based Checkpoints]
end
subgraph apiProviders[API Providers]
AnthropicAPI[Anthropic]
OpenRouterAPI[OpenRouter]
BedrockAPI[AWS Bedrock]
OtherAPIs[Other Providers]
end
subgraph MCPServers[MCP Servers]
ExternalMcpServers[External MCP Servers]
end
end
%% Core Extension Data Flow
ExtensionEntry --> ClineProvider
ClineProvider --> ClineClass
ClineClass --> GlobalState
ClineClass --> SecretsStorage
ClineClass --> TaskStorage
ClineClass --> CheckpointSystem
ExtensionEntry --> WebviewProvider
WebviewProvider --> Controller
Controller --> Task
Controller --> McpHub
Task --> GlobalState
Task --> SecretsStorage
Task --> TaskStorage
Task --> CheckpointSystem
Task --> |API Requests| apiProviders
McpHub --> |Connects to| ExternalMcpServers
Task --> |Uses| McpHub
%% Webview Data Flow
WebviewApp --> ExtStateContext
ExtStateContext --> ReactComponents
%% Bidirectional Communication
ClineProvider <-->|postMessage| ExtStateContext
WebviewProvider <-->|postMessage| ExtStateContext
style GlobalState fill:#f9f,stroke:#333,stroke-width:2px
style SecretsStorage fill:#f9f,stroke:#333,stroke-width:2px
style ExtStateContext fill:#bbf,stroke:#333,stroke-width:2px
style ClineProvider fill:#bfb,stroke:#333,stroke-width:2px
style WebviewProvider fill:#bfb,stroke:#333,stroke-width:2px
style McpHub fill:#bfb,stroke:#333,stroke-width:2px
style apiProviders fill:#fdb,stroke:#333,stroke-width:2px
```
## Definitions
- core extension: Anything inside the src folder starting with the Cline.ts file
- core extension state: Managed by the ClineProvider class in src/core/webview/ClineProvider.ts, which serves as the single source of truth for the extension's state. It manages multiple types of persistent storage (global state, workspace state, and secrets), handles state distribution to both the core extension and webview components, and coordinates state across multiple extension instances. This includes managing API configurations, task history, settings, and MCP configurations.
- webview: Anything inside the webview-ui. All the react or view's seen by the user and user interaction compone
- webview state: Managed by ExtensionStateContext in webview-ui/src/context/ExtensionStateContext.tsx, which provides React components with access to the extension's state through a context provider pattern. It maintains local state for UI components, handles real-time updates through message events, manages partial message updates, and provides methods for state modifications. The context includes extension version, messages, task history, theme, API configurations, MCP servers, marketplace catalog, and workspace file paths. It synchronizes with the core extension through VSCode's message passing system and provides type-safe access to state through a custom hook (useExtensionState).
- **Core Extension**: Anything inside the src folder, organized into modular components
- **Core Extension State**: Managed by the Controller class in src/core/controller/index.ts, which serves as the single source of truth for the extension's state. It manages multiple types of persistent storage (global state, workspace state, and secrets), handles state distribution to both the core extension and webview components, and coordinates state across multiple extension instances. This includes managing API configurations, task history, settings, and MCP configurations.
- **Webview**: Anything inside the webview-ui. All the react or view's seen by the user and user interaction components
- **Webview State**: Managed by ExtensionStateContext in webview-ui/src/context/ExtensionStateContext.tsx, which provides React components with access to the extension's state through a context provider pattern. It maintains local state for UI components, handles real-time updates through message events, manages partial message updates, and provides methods for state modifications. The context includes extension version, messages, task history, theme, API configurations, MCP servers, marketplace catalog, and workspace file paths. It synchronizes with the core extension through VSCode's message passing system and provides type-safe access to state through a custom hook (useExtensionState).
### Core Extension Architecture
The core extension follows a clear hierarchical structure:
1. **WebviewProvider** (src/core/webview/index.ts): Manages the webview lifecycle and communication
2. **Controller** (src/core/controller/index.ts): Handles webview messages and task management
3. **Task** (src/core/task/index.ts): Executes API requests and tool operations
This architecture provides clear separation of concerns:
- WebviewProvider focuses on VSCode webview integration
- Controller manages state and coordinates tasks
- Task handles the execution of AI requests and tool operations
### WebviewProvider Implementation
The WebviewProvider class in `src/core/webview/index.ts` is responsible for:
- Managing multiple active instances through a static set (`activeInstances`)
- Handling webview lifecycle events (creation, visibility changes, disposal)
- Implementing HTML content generation with proper CSP headers
- Supporting Hot Module Replacement (HMR) for development
- Setting up message listeners between the webview and extension
The WebviewProvider maintains a reference to the Controller and delegates message handling to it. It also handles the creation of both sidebar and tab panel webviews, allowing Cline to be used in different contexts within VSCode.
### Core Extension State
The `ClineProvider` class manages multiple types of persistent storage:
The `Controller` class manages multiple types of persistent storage:
- **Global State:** Stored across all VSCode instances. Used for settings and data that should persist globally.
- **Workspace State:** Specific to the current workspace. Used for task-specific data and settings.
- **Secrets:** Secure storage for sensitive information like API keys.
The `ClineProvider` handles the distribution of state to both the core extension and webview components. It also coordinates state across multiple extension instances, ensuring consistency.
The `Controller` handles the distribution of state to both the core extension and webview components. It also coordinates state across multiple extension instances, ensuring consistency.
State synchronization between instances is handled through:
- File-based storage for task history and conversation data
- VSCode's global state API for settings and configuration
- Secrets storage for sensitive information
- Event listeners for file changes and configuration updates
The Controller implements methods for:
- Saving and loading task state
- Managing API configurations
- Handling user authentication
- Coordinating MCP server connections
- Managing task history and checkpoints
### Webview State
@@ -82,16 +140,66 @@ The `ExtensionStateContext` in `webview-ui/src/context/ExtensionStateContext.tsx
It synchronizes with the core extension through VSCode's message passing system and provides type-safe access to the state via a custom hook (`useExtensionState`).
## Core Extension (Cline.ts)
The ExtensionStateContext handles:
- Real-time updates through message events
- Partial message updates for streaming content
- State modifications through setter methods
- Type-safe access to state through a custom hook
The Cline class is the heart of the extension, managing task execution, state persistence, and tool coordination. Each task runs in its own instance of the Cline class, ensuring isolation and proper state management.
## API Provider System
Cline supports multiple AI providers through a modular API provider system. Each provider is implemented as a separate module in the `src/api/providers/` directory and follows a common interface.
### API Provider Architecture
The API system consists of:
1. **API Handlers**: Provider-specific implementations in `src/api/providers/`
2. **API Transformers**: Stream transformation utilities in `src/api/transform/`
3. **API Configuration**: User settings for API keys and endpoints
4. **API Factory**: Builder function to create the appropriate handler
Key providers include:
- **Anthropic**: Direct integration with Claude models
- **OpenRouter**: Meta-provider supporting multiple model providers
- **AWS Bedrock**: Integration with Amazon's AI services
- **Gemini**: Google's AI models
- **Cerebras**: High-performance inference with Llama, Qwen, and DeepSeek models
- **Ollama**: Local model hosting
- **LM Studio**: Local model hosting
- **VSCode LM**: VSCode's built-in language models
### API Configuration Management
API configurations are stored securely:
- API keys are stored in VSCode's secrets storage
- Model selections and non-sensitive settings are stored in global state
- The Controller manages switching between providers and updating configurations
The system supports:
- Secure storage of API keys
- Model selection and configuration
- Automatic retry and error handling
- Token usage tracking and cost calculation
- Context window management
### Plan/Act Mode API Configuration
Cline supports separate model configurations for Plan and Act modes:
- Different models can be used for planning vs. execution
- The system preserves model selections when switching modes
- The Controller handles the transition between modes and updates the API configuration accordingly
## Task Execution System
The Task class is responsible for executing AI requests and tool operations. Each task runs in its own instance of the Task class, ensuring isolation and proper state management.
### Task Execution Loop
The core task execution loop follows this pattern:
```typescript
class Cline {
class Task {
async initiateTaskLoop(userContent: UserContent, isNewTask: boolean) {
while (!this.abort) {
// 1. Make API request and stream response
@@ -102,7 +210,7 @@ class Cline {
switch (chunk.type) {
case "text":
// Parse into content blocks
this.assistantMessageContent = parseAssistantMessage(chunk.text)
this.assistantMessageContent = parseAssistantMessageV2(chunk.text)
// Present blocks to user
await this.presentAssistantMessage()
break
@@ -126,7 +234,7 @@ class Cline {
The streaming system handles real-time updates and partial content:
```typescript
class Cline {
class Task {
async presentAssistantMessage() {
// Handle streaming locks to prevent race conditions
if (this.presentAssistantMessageLocked) {
@@ -161,7 +269,7 @@ class Cline {
Tools follow a strict execution pattern:
```typescript
class Cline {
class Task {
async executeToolWithApproval(block: ToolBlock) {
// 1. Check auto-approval settings
if (this.shouldAutoApproveTool(block.name)) {
@@ -193,7 +301,7 @@ class Cline {
The system includes robust error handling:
```typescript
class Cline {
class Task {
async handleError(action: string, error: Error) {
// 1. Check if task was abandoned
if (this.abandoned) return
@@ -216,23 +324,23 @@ class Cline {
### API Request & Token Management
The Cline class handles API requests with built-in retry, streaming, and token management:
The Task class handles API requests with built-in retry, streaming, and token management:
```typescript
class Cline {
class Task {
async *attemptApiRequest(previousApiReqIndex: number): ApiStream {
// 1. Wait for MCP servers to connect
await pWaitFor(() => this.providerRef.deref()?.mcpHub?.isConnecting !== true)
await pWaitFor(() => this.controllerRef.deref()?.mcpHub?.isConnecting !== true)
// 2. Manage context window
const previousRequest = this.clineMessages[previousApiReqIndex]
if (previousRequest?.text) {
const { tokensIn, tokensOut } = JSON.parse(previousRequest.text)
const { tokensIn, tokensOut } = JSON.parse(previousRequest.text || "{}")
const totalTokens = (tokensIn || 0) + (tokensOut || 0)
// Truncate conversation if approaching context limit
if (totalTokens >= maxAllowedSize) {
this.conversationHistoryDeletedRange = getNextTruncationRange(
this.conversationHistoryDeletedRange = this.contextManager.getNextTruncationRange(
this.apiConversationHistory,
this.conversationHistoryDeletedRange,
totalTokens / 2 > maxAllowedSize ? "quarter" : "half"
@@ -299,16 +407,32 @@ Key features:
- Cost calculation
- Cache hit monitoring
### Context Management System
The Context Management System handles conversation history truncation to prevent context window overflow errors. Implemented in the `ContextManager` class, it ensures long-running conversations remain within model context limits while preserving critical context.
Key features:
1. **Model-Aware Sizing**: Dynamically adjusts based on different model context windows (64K for DeepSeek, 128K for most models, 200K for Claude).
2. **Proactive Truncation**: Monitors token usage and preemptively truncates conversations when approaching limits, maintaining buffers of 27K-40K tokens depending on the model.
3. **Intelligent Preservation**: Always preserves the original task message and maintains the user-assistant conversation structure when truncating.
4. **Adaptive Strategies**: Uses different truncation strategies based on context pressure - removing half of the conversation for moderate pressure or three-quarters for severe pressure.
5. **Error Recovery**: Includes specialized detection for context window errors from different providers with automatic retry and more aggressive truncation when needed.
### Task State & Resumption
The Cline class provides robust task state management and resumption capabilities:
The Task class provides robust task state management and resumption capabilities:
```typescript
class Cline {
class Task {
async resumeTaskFromHistory() {
// 1. Load saved state
this.clineMessages = await this.getSavedClineMessages()
this.apiConversationHistory = await this.getSavedApiConversationHistory()
this.clineMessages = await getSavedClineMessages(this.getContext(), this.taskId)
this.apiConversationHistory = await getSavedApiConversationHistory(this.getContext(), this.taskId)
// 2. Handle interrupted tool executions
const lastMessage = this.apiConversationHistory[this.apiConversationHistory.length - 1]
@@ -338,14 +462,14 @@ class Cline {
private async saveTaskState() {
// Save conversation history
await this.saveApiConversationHistory()
await this.saveClineMessages()
await saveApiConversationHistory(this.getContext(), this.taskId, this.apiConversationHistory)
await saveClineMessages(this.getContext(), this.taskId, this.clineMessages)
// Create checkpoint
const commitHash = await this.checkpointTracker?.commit()
// Update task history
await this.providerRef.deref()?.updateTaskHistory({
await this.controllerRef.deref()?.updateTaskHistory({
id: this.taskId,
ts: lastMessage.ts,
task: taskMessage.text,
@@ -381,11 +505,54 @@ Key aspects of task state management:
- Resources are cleaned up properly
- User is notified of state changes
## Plan/Act Mode System
Cline implements a dual-mode system that separates planning from execution:
### Mode Architecture
The Plan/Act mode system consists of:
1. **Mode State**: Stored in `chatSettings.mode` in the Controller's state
2. **Mode Switching**: Handled by `togglePlanActModeWithChatSettings` in the Controller
3. **Mode-specific Models**: Optional configuration to use different models for each mode
4. **Mode-specific Prompting**: Different system prompts for planning vs. execution
### Mode Switching Process
When switching between modes:
1. The current model configuration is saved to mode-specific state
2. The previous mode's model configuration is restored
3. The Task instance is updated with the new mode
4. The webview is notified of the mode change
5. Telemetry events are captured for analytics
### Plan Mode
Plan mode is designed for:
- Information gathering and context building
- Asking clarifying questions
- Creating detailed execution plans
- Discussing approaches with the user
In Plan mode, the AI uses the `plan_mode_respond` tool to engage in conversational planning without executing actions.
### Act Mode
Act mode is designed for:
- Executing the planned actions
- Using tools to modify files, run commands, etc.
- Implementing the solution
- Providing results and completion feedback
In Act mode, the AI has access to all tools except `plan_mode_respond` and focuses on implementation rather than discussion.
## Data Flow & State Management
### Core Extension Role
The core extension (ClineProvider) acts as the single source of truth for all persistent state. It:
The Controller acts as the single source of truth for all persistent state. It:
- Manages VSCode global state and secrets storage
- Coordinates state updates between components
- Ensures state consistency across webview reloads
@@ -394,10 +561,10 @@ The core extension (ClineProvider) acts as the single source of truth for all pe
### Terminal Management
The Cline class manages terminal instances and command execution:
The Task class manages terminal instances and command execution:
```typescript
class Cline {
class Task {
async executeCommandTool(command: string): Promise<[boolean, ToolResponse]> {
// 1. Get or create terminal
const terminalInfo = await this.terminalManager.getOrCreateTerminal(cwd)
@@ -453,10 +620,10 @@ Key features:
### Browser Session Management
The Cline class handles browser automation through Puppeteer:
The Task class handles browser automation through Puppeteer:
```typescript
class Cline {
class Task {
async executeBrowserAction(action: BrowserAction): Promise<BrowserActionResult> {
switch (action) {
case "launch":
@@ -493,13 +660,93 @@ Key aspects:
- Screenshot capture
- Error recovery
## MCP (Model Context Protocol) Integration
### MCP Architecture
The MCP system consists of:
1. **McpHub Class**: Central manager in `src/services/mcp/McpHub.ts`
2. **MCP Connections**: Manages connections to external MCP servers
3. **MCP Settings**: Configuration stored in a JSON file
4. **MCP Marketplace**: Online catalog of available MCP servers
5. **MCP Tools & Resources**: Capabilities exposed by connected servers
The McpHub class:
- Manages the lifecycle of MCP server connections
- Handles server configuration through a settings file
- Provides methods for calling tools and accessing resources
- Implements auto-approval settings for MCP tools
- Monitors server health and handles reconnection
### MCP Server Types
Cline supports two types of MCP server connections:
- **Stdio**: Command-line based servers that communicate via standard I/O
- **SSE**: HTTP-based servers that communicate via Server-Sent Events
### MCP Server Management
The McpHub class provides methods for:
- Discovering and connecting to MCP servers
- Monitoring server health and status
- Restarting servers when needed
- Managing server configurations
- Setting timeouts and auto-approval rules
### MCP Tool Integration
MCP tools are integrated into the Task execution system:
- Tools are discovered and registered at connection time
- The Task class can call MCP tools through the McpHub
- Tool results are streamed back to the AI
- Auto-approval settings can be configured per tool
### MCP Marketplace
The MCP Marketplace provides:
- A catalog of available MCP servers
- One-click installation
- README previews
- Server status monitoring
The Controller class manages MCP servers through the McpHub service:
```typescript
class Controller {
mcpHub?: McpHub
constructor(context: vscode.ExtensionContext, webviewProvider: WebviewProvider) {
this.mcpHub = new McpHub(this)
}
async downloadMcp(mcpId: string) {
// Fetch server details from marketplace
const response = await axios.post<McpDownloadResponse>(
"https://api.cline.bot/v1/mcp/download",
{ mcpId },
{
headers: { "Content-Type": "application/json" },
timeout: 10000,
}
)
// Create task with context from README
const task = `Set up the MCP server from ${mcpDetails.githubUrl}...`
// Initialize task and show chat view
await this.initClineWithTask(task)
}
}
```
## Conclusion
This guide provides a comprehensive overview of the Cline extension architecture, with special focus on state management, data persistence, and code organization. Following these patterns ensures robust feature implementation with proper state handling across the extension's components.
Remember:
- Always persist important state in the extension
- The core extension exists in the src/ folder
- The core extension follows a WebviewProvider -> Controller -> Task flow
- Use proper typing for all state and messages
- Handle errors and edge cases
- Test state persistence across webview reloads
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "PostToolUse running inside local cline/.clinerules/hooks/ directory"
input=$(cat)
echo $input | jq .
for i in {1..5}; do
sleep 1
echo "$i"
done
cat <<EOF
{
"cancel": false,
"contextModification": "PostToolUse response from the local cline/.clinerules/hooks/ directory.",
"errorMessage": "PostToolUse hook custom errorMessage"
}
EOF
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "PreToolUse running inside local cline/.clinerules/hooks/ directory"
input=$(cat)
echo $input | jq .
for i in {1..5}; do
sleep 1
echo "$i"
done
cat <<EOF
{
"cancel": false,
"contextModification": "PreToolUse response from the local cline/.clinerules/hooks/ directory.",
"errorMessage": "PreToolUse hook custom errorMessage"
}
EOF
+423
View File
@@ -0,0 +1,423 @@
# Cline Hooks Documentation
## Overview
Cline hooks allow you to execute custom scripts at specific points in the agentic workflow. Hooks can be placed in either:
- **Global hooks directory**: `~/Documents/Cline/Hooks/` (applies to all workspaces)
- **Workspace hooks directory**: `.clinerules/hooks/` (applies to the workspace the repo is part of)
Hooks run automatically when enabled.
## Enabling Hooks
1. Open Cline settings in VSCode
2. Navigate to the Feature Settings section
3. Check the "Enable Hooks" checkbox
4. Hooks must be executable files (on Unix/Linux/macOS use `chmod +x hookname`)
## Available Hooks
### TaskStart Hook
- **When**: Runs when a NEW task is started (not when resuming)
- **Purpose**: Initialize task context, validate task requirements, set up environment
- **Global Location**: `~/Documents/Cline/Hooks/TaskStart`
- **Workspace Location**: `.clinerules/hooks/TaskStart`
### TaskResume Hook
- **When**: Runs when an EXISTING task is resumed (after user clicks resume button)
- **Purpose**: Validate resumed task state, restore context, check for changes since last run
- **Global Location**: `~/Documents/Cline/Hooks/TaskResume`
- **Workspace Location**: `.clinerules/hooks/TaskResume`
### TaskCancel Hook
- **When**: Runs when a task is cancelled or a hook is aborted by the user (only if there's actual active work or work was started)
- **Purpose**: Clean up resources, log cancellation, save state
- **Global Location**: `~/Documents/Cline/Hooks/TaskCancel`
- **Workspace Location**: `.clinerules/hooks/TaskCancel`
- **Note**: This hook is NOT cancellable
### TaskComplete Hook (coming soon!)
- **When**: Runs when a task is marked as complete
- **Purpose**: Log completion status, perform final cleanup, generate reports
- **Global Location**: `~/Documents/Cline/Hooks/TaskComplete`
- **Workspace Location**: `.clinerules/hooks/TaskComplete`
### UserPromptSubmit Hook
- **When**: Runs when the user submits a prompt/message (initial task, resume, or feedback)
- **Purpose**: Validate user input, preprocess prompts, add context to user messages
- **Global Location**: `~/Documents/Cline/Hooks/UserPromptSubmit`
- **Workspace Location**: `.clinerules/hooks/UserPromptSubmit`
### PreToolUse Hook
- **When**: Runs BEFORE a tool is executed
- **Purpose**: Validate parameters, block execution, or add context
- **Global Location**: `~/Documents/Cline/Hooks/PreToolUse`
- **Workspace Location**: `.clinerules/hooks/PreToolUse`
### PostToolUse Hook
- **When**: Runs AFTER a tool completes
- **Purpose**: Observe results, track patterns, or add context
- **Global Location**: `~/Documents/Cline/Hooks/PostToolUse`
- **Workspace Location**: `.clinerules/hooks/PostToolUse`
### PreCompact Hook (coming soon!)
- **When**: Runs BEFORE the conversation context is compacted/truncated
- **Purpose**: Observe compaction events, log context management, track token usage
- **Global Location**: `~/Documents/Cline/Hooks/PreCompact`
- **Workspace Location**: `.clinerules/hooks/PreCompact`
## Cross-Platform Hook Format
Cline uses a git-style approach for hooks that works consistently across all platforms:
### Hook Files (All Platforms)
- **No file extensions**: Hooks are named exactly `PreToolUse` or `PostToolUse` (no `.bat`, `.cmd`, `.sh` etc.)
- **Shebang required**: First line must be a shebang (e.g., `#!/usr/bin/env bash` or `#!/usr/bin/env node`)
- **Executable on Unix**: On Unix/Linux/macOS, hooks must be executable: `chmod +x PreToolUse`
- **Windows**: Not currently supported.
### How It Works
Like git hooks, Cline executes hook files through a shell that interprets the shebang line:
- On Unix/Linux/macOS: Native shell execution with shebang support
This means:
- ✅ Same hook script works on all platforms
- ✅ Write once, run anywhere
- ✅ Use any scripting language (bash, node, python, etc.)
### Creating Hooks
**On Unix/Linux/macOS:**
```bash
# Create hook file
nano ~/Documents/Cline/Hooks/PreToolUse
# Make executable
chmod +x ~/Documents/Cline/Hooks/PreToolUse
```
## Context Injection Timing
**IMPORTANT**: Context injected by hooks affects **FUTURE AI decisions**, not the current tool execution.
### Why This Matters
When a hook runs:
1. The AI has already decided what tool to use and with what parameters
2. The hook cannot modify those parameters
3. Context from the hook is added to the conversation
4. The AI sees this context in the **NEXT API request** and can adjust future decisions
### PreToolUse Hook Flow
```
1. AI decides: "I'll use write_to_file with these parameters"
2. PreToolUse hook runs → can block or add context
3. If allowed, tool executes with original parameters
4. Context is added to conversation
5. Next API request includes this context
6. AI adjusts future decisions based on context
```
### PostToolUse Hook Flow
```
1. Tool completes execution
2. PostToolUse hook runs → observes results
3. Hook adds context about the outcome
4. Context is added to conversation
5. Next API request includes this context
6. AI can learn from the results
```
## Hook Input/Output
### Input (via stdin as JSON)
All hooks receive:
```json
{
"clineVersion": "string",
"hookName": "TaskStart" | "TaskResume" | "TaskCancel" | "TaskComplete" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PreCompact",
"timestamp": "string",
"taskId": "string",
"workspaceRoots": ["string"],
"userId": "string",
"taskStart": { // Only for TaskStart
"taskMetadata": {
"taskId": "string",
"ulid": "string",
"initialTask": "string"
}
},
"taskResume": { // Only for TaskResume
"taskMetadata": {
"taskId": "string",
"ulid": "string"
},
"previousState": {
"lastMessageTs": "string",
"messageCount": "string",
"conversationHistoryDeleted": "string"
}
},
"taskCancel": { // Only for TaskCancel
"taskMetadata": {
"taskId": "string",
"ulid": "string",
"completionStatus": "string"
}
},
"taskComplete": { // Only for TaskComplete
"taskMetadata": {
"taskId": "string",
"ulid": "string"
}
},
"userPromptSubmit": { // Only for UserPromptSubmit
"prompt": "string",
"attachments": ["string"]
},
"preToolUse": { // Only for PreToolUse
"toolName": "string",
"parameters": {}
},
"postToolUse": { // Only for PostToolUse
"toolName": "string",
"parameters": {},
"result": "string",
"success": boolean,
"executionTimeMs": number
},
"preCompact": { // Only for PreCompact
"contextSize": number,
"messagesToCompact": number,
"compactionStrategy": "string"
}
}
```
### Output (via stdout as JSON)
All hooks must return:
```json
{
"cancel": boolean, // Required: false to continue, true to block execution
"contextModification": "string", // Optional: Context for future AI decisions
"errorMessage": "string" // Optional: Error details if blocking
}
```
**Note**: The `cancel` field works as follows:
- `false` (or omitted): Allow execution to continue
- `true`: Block execution and show error message to user
## Hook Execution Limits
- **Timeout**: Hooks must complete within 30 seconds (configurable via `HOOK_EXECUTION_TIMEOUT_MS`)
- **Context Size**: Context modifications are limited to 50KB (configurable via `MAX_CONTEXT_MODIFICATION_SIZE`)
- **Error Handling**: Expected errors (file not found, permission denied, not a directory) are handled silently; unexpected file system errors are propagated
## Common Use Cases
### 1. Validation - Block Invalid Operations
```bash
#!/usr/bin/env bash
input=$(cat)
tool_name=$(echo "$input" | jq -r '.preToolUse.toolName')
path=$(echo "$input" | jq -r '.preToolUse.parameters.path // ""')
if [[ "$tool_name" == "write_to_file" && "$path" == *.js ]]; then
cat <<EOF
{
"cancel": true,
"errorMessage": "Cannot create .js files in TypeScript project",
"contextModification": "Use .ts/.tsx extensions only"
}
EOF
exit 0
fi
echo '{"cancel": false}'
```
### 2. Context Building - Learn from Operations
```bash
#!/usr/bin/env bash
input=$(cat)
tool_name=$(echo "$input" | jq -r '.postToolUse.toolName')
success=$(echo "$input" | jq -r '.postToolUse.success')
path=$(echo "$input" | jq -r '.postToolUse.parameters.path // ""')
if [[ "$tool_name" == "write_to_file" && "$success" == "true" ]]; then
cat <<EOF
{
"cancel": false,
"contextModification": "Created '$path'. Maintain consistency with this file's patterns in future operations."
}
EOF
else
echo '{"cancel": false}'
fi
```
### 3. Performance Monitoring
```bash
#!/usr/bin/env bash
input=$(cat)
execution_time=$(echo "$input" | jq -r '.postToolUse.executionTimeMs')
tool_name=$(echo "$input" | jq -r '.postToolUse.toolName')
if [[ "$execution_time" -gt 5000 ]]; then
cat <<EOF
{
"cancel": false,
"contextModification": "Tool '$tool_name' took ${execution_time}ms. Consider optimizing future similar operations."
}
EOF
else
echo '{"cancel": false}'
fi
```
### 4. Logging and Telemetry
```bash
#!/usr/bin/env bash
input=$(cat)
# Log to file
echo "$input" >> ~/.cline/hook-logs/tool-usage.jsonl
# Allow execution
echo '{"cancel": false}'
```
## Global vs Workspace Hooks
Cline supports two levels of hooks:
### Global Hooks
- **Location**: `~/Documents/Cline/Hooks/` (macOS/Linux)
- **Scope**: Apply to ALL workspaces and projects
- **Use Case**: Organization-wide policies, personal preferences, universal validations
- **Priority**: Order not guaranteed when combined with workspace hooks
### Workspace Hooks
- **Location**: `.clinerules/hooks/` in each workspace root
- **Scope**: Apply only to the specific workspace
- **Use Case**: Project-specific rules, team conventions, repository requirements
- **Priority**: Order not guaranteed when combined with global hooks
### Hook Execution
When multiple hooks exist (global and/or workspace):
- All hooks for a given step are executed **concurrently** using `Promise.all`
- **Execution order is not guaranteed** - hooks run in parallel
- If ALL hooks allow execution (`cancel: false`), the tool proceeds
- If ANY hook blocks (`cancel: true`), execution is blocked
**Result Combination:**
- `cancel`: If ANY hook returns `true`, execution is blocked
- `contextModification`: All context strings are concatenated with double newlines (`\n\n`)
- `errorMessage`: All error messages are concatenated with single newlines (`\n`)
### Setting Up Global Hooks
1. The global hooks directory is automatically created at:
- macOS/Linux: `~/Documents/Cline/Hooks/`
2. Add your hook script:
```bash
# Unix/Linux/macOS
nano ~/Documents/Cline/Hooks/PreToolUse
chmod +x ~/Documents/Cline/Hooks/PreToolUse
```
3. Enable hooks in Cline settings
### Example: Global + Workspace Hooks
**Global Hook** (applies to all projects):
```bash
#!/usr/bin/env bash
# ~/Documents/Cline/Hooks/PreToolUse
# Universal rule: Never delete package.json
input=$(cat)
tool_name=$(echo "$input" | jq -r '.preToolUse.toolName')
path=$(echo "$input" | jq -r '.preToolUse.parameters.path // ""')
if [[ "$tool_name" == "write_to_file" && "$path" == *"package.json"* ]]; then
echo '{"cancel": true, "errorMessage": "Global policy: Cannot modify package.json"}'
exit 0
fi
echo '{"cancel": false}'
```
**Workspace Hook** (applies to specific project):
```bash
#!/usr/bin/env bash
# .clinerules/hooks/PreToolUse
# Project rule: Only TypeScript files
input=$(cat)
tool_name=$(echo "$input" | jq -r '.preToolUse.toolName')
path=$(echo "$input" | jq -r '.preToolUse.parameters.path // ""')
if [[ "$tool_name" == "write_to_file" && "$path" == *.js ]]; then
echo '{"cancel": true, "errorMessage": "Project rule: Use .ts files only"}'
exit 0
fi
echo '{"cancel": false}'
```
**All hooks must allow execution for the tool to proceed.** Hooks may execute concurrently.
## Multi-Root Workspaces
If you have multiple workspace roots, you can place hooks in each root's `.clinerules/hooks/` directory. All hooks (global and workspace) may execute concurrently. Their results will be combined:
- **cancel**: If ANY hook returns `true`, execution is blocked
- **contextModification**: All context modifications are concatenated
- **errorMessage**: All error messages are concatenated
**Note:** No execution order is guaranteed between hooks from different directories.
## Troubleshooting
### Hook Not Running
- Ensure the "Enable Hooks" setting is checked
- Verify the hook file is executable (`chmod +x hookname`)
- Check the hook file has no syntax errors
- Look for errors in VSCode's Output panel (Cline channel)
### Hook Timing Out
- Reduce complexity of the hook script
- Avoid expensive operations (network calls, heavy computations)
- Consider moving complex logic to a background process
### Context Not Affecting Behavior
- Remember: context affects FUTURE decisions, not the current tool
- Ensure context modifications are clear and actionable
- Check that context isn't being truncated (50KB limit)
## Security Considerations
- Hooks run with the same permissions as VSCode
- Be cautious with hooks from untrusted sources
- Review hook scripts before enabling them
- Consider using `.gitignore` to avoid committing sensitive hook logic
- Hooks can access all workspace files and environment variables
## Best Practices
1. **Keep hooks fast** - Aim for <100ms execution time
2. **Make context actionable** - Be specific about what the AI should do
3. **Use structured prefixes** - Help the AI categorize context
4. **Handle errors gracefully** - Always return valid JSON
5. **Log for debugging** - Keep logs of hook executions for troubleshooting
6. **Test incrementally** - Start with simple hooks and add complexity
7. **Document your hooks** - Add comments explaining the purpose and logic
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "TaskCancel running inside local cline/.clinerules/hooks/ directory"
input=$(cat)
echo $input | jq .
for i in {1..5}; do
sleep 1
echo "$i"
done
cat <<EOF
{
"cancel": false,
"contextModification": "TaskCancel response from the local cline/.clinerules/hooks/ directory.",
"errorMessage": "TaskCancel hook custom errorMessage"
}
EOF
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "TaskResume running inside local cline/.clinerules/hooks/ directory"
input=$(cat)
echo $input | jq .
for i in {1..5}; do
sleep 1
echo "$i"
done
cat <<EOF
{
"cancel": false,
"contextModification": "TaskResume response from the local cline/.clinerules/hooks/ directory.",
"errorMessage": "TaskResume hook custom errorMessage"
}
EOF
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "TaskStart running inside local cline/.clinerules/hooks/ directory"
input=$(cat)
echo $input | jq .
for i in {1..5}; do
sleep 1
echo "$i"
done
cat <<EOF
{
"cancel": false,
"contextModification": "TaskStart response from the local cline/.clinerules/hooks/ directory.",
"errorMessage": "TaskStart hook custom errorMessage"
}
EOF
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "UserPromptSubmit running inside local cline/.clinerules/hooks/ directory"
input=$(cat)
echo $input | jq .
for i in {1..5}; do
sleep 1
echo "$i"
done
cat <<EOF
{
"cancel": false,
"contextModification": "UserPromptSubmit response from the local cline/.clinerules/hooks/ directory.",
"errorMessage": "UserPromptSubmit hook custom errorMessage"
}
EOF
+89
View File
@@ -0,0 +1,89 @@
# Cline Protobuf Development Guide
This guide outlines how to add new gRPC endpoints for communication between the webview (frontend) and the extension host (backend).
## Overview
Cline uses [Protobuf](https://protobuf.dev/) to define a strongly-typed API, ensuring efficient and type-safe communication. All definitions are in the `/proto` directory. The compiler and plugins are included as project dependencies, so no manual installation is needed.
## Key Concepts & Best Practices
- **File Structure**: Each feature domain should have its own `.proto` file (e.g., `account.proto`, `task.proto`).
- **Message Design**:
- For simple, single-value data, use the shared types in `proto/common.proto` (e.g., `StringRequest`, `Empty`, `Int64Request`). This promotes consistency.
- For complex data structures, define custom messages within the feature's `.proto` file (see `task.proto` for examples like `NewTaskRequest`).
- **Naming Conventions**:
- Services: `PascalCaseService` (e.g., `AccountService`).
- RPCs: `camelCase` (e.g., `accountEmailIdentified`).
- Messages: `PascalCase` (e.g., `StringRequest`).
- **Streaming**: For server-to-client streaming, use the `stream` keyword on the response type. See `subscribeToAuthCallback` in `account.proto` for an example.
---
## 4-Step Development Workflow
Heres how to add a new RPC, using `scrollToSettings` as an example.
### 1. Define the RPC in a `.proto` File
Add your service method to the appropriate file in the `proto/` directory.
**File: `proto/ui.proto`**
```proto
service UiService {
// ... other RPCs
// Scrolls to a specific settings section in the settings view
rpc scrollToSettings(StringRequest) returns (KeyValuePair);
}
```
Here, we use the common `StringRequest` and `KeyValuePair` types.
### 2. Compile Definitions
After editing a `.proto` file, regenerate the TypeScript code. From the project root, run:
```bash
npm run protos
```
This command compiles all `.proto` files and outputs the generated code to `src/generated/` and `src/shared/`. Do not edit these generated files manually.
### 3. Implement the Backend Handler
Create the RPC implementation in the backend. Handlers are located in `src/core/controller/[service-name]/`.
**File: `src/core/controller/ui/scrollToSettings.ts`**
```typescript
import { Controller } from ".."
import { StringRequest, KeyValuePair } from "../../../shared/proto/common"
/**
* Executes a scroll to settings action
* @param controller The controller instance
* @param request The request containing the ID of the settings section to scroll to
* @returns KeyValuePair with action and value fields for the UI to process
*/
export async function scrollToSettings(controller: Controller, request: StringRequest): Promise<KeyValuePair> {
return KeyValuePair.create({
key: "scrollToSettings",
value: request.value || "",
})
}
```
### 4. Call the RPC from the Webview
Call the new RPC from a React component in `webview-ui/`. The generated client makes this simple.
**File: `webview-ui/src/components/browser/BrowserSettingsMenu.tsx`** (Example)
```tsx
import { UiServiceClient } from "../../../services/grpc"
import { StringRequest } from "../../../../shared/proto/common"
// ... inside a React component
const handleMenuClick = async () => {
try {
await UiServiceClient.scrollToSettings(StringRequest.create({ value: "browser" }))
} catch (error) {
console.error("Error scrolling to browser settings:", error)
}
}
```
+549
View File
@@ -0,0 +1,549 @@
The goal of this workflow is to take a changeset for a release of Cline, an autonomous coding agent extension that plugs right into your IDE, and write the updated announcement component, and the updated changelog.
For reference, here are some examples of how we converted previous changesets to announcement components / changelogs.
- 3.14
<changeset>
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
claude-dev@3.14.0
Minor Changes
77c9863: create clinerules folder if its currently a file and creating new rule
0ffb7dd: disabling shift hint for now & improving tooltip behavior
79b76fd: Add support for custom model ID in AWS Bedrock provider, enabling use of Application Inference Profile.
eb6e481: Full support for LaTeX rendering
df37f29: Add support for custom API request timeout. Previously, timeouts were hardcoded to 30 seconds for providers like Ollama or 15 seconds for OpenRouter and Cline. Now users can set a custom timeout value in milliseconds through the settings interface.
e4d26be: allow cursorrules and windsurfrules
c5de50f: Fix Handle @withRetry() SyntaxError when running extension locally issue
61d2f42: enabled pricing calculation for gemini and vertex + more robust caching & cache tracking for gemini & vertex
aed152b: add truncation notice when truncating manually
2fe2405: Migrate Cline Tools Section to new docs
19cc8bc: Add a timeout setting for the terminal connection, allowing users to adjust this if they are having timeout issues
03d4410: Added copy button to code blocks.
c78fe23: addressed race condition in terminal command usage
91e222f: add checkpoints after more messages
14230e7: add newrule slash command
1c7d33a: Add remote config with posthog allowing for disabling new features until they're reading, making for a better developer experience.
4196c14: add cache ui for open router and cline provider
d97424f: showing expanded task by default
5294e78: Refactor to not pass a message for showing the MCP View from the servers modal
70cc437: Fix Windows path issue: Correct handling of import.meta.url to avoid leading slash in pathname
4b697d8: Migrate the addRemoteServer to protobus
Patch Changes
c63d9a1: updated drag and drop text to say "drop" instead of "drag"
459adf0: Add markdown copy to chat
74ec823: Minor UX improvement to drag and drop ux
b0961f4: Remove linear pull request action
e9ce384: searchCommits protobus migration
5802b68: createRuleFile protobus migration
df7f9fc: Add dependsOn to more blocks in the tasks.json
41ae732: Fix for git commit mentions in repos with no git commits
7e78445: Adding args to allow Cursor to open workspaces (for checkpoint testing/development)
bdfda6f: feat(bedrock): Introduce Amazon Nova Premier
65243ad: Introduce UI library for future UI development
4565e06: checkIsImageURL migrated to protobus
5a8e9d8: protobus migration for openImage
deeda6e: Lowering Gemini cache TTL time
db0b022: Adding UI to show openrouter balance next to provider
4650ffa: deleteRuleFile protobus migration
d4bd755: fix cost calculation
</changeset>
<changelog>
## [3.14.0]
- Add UI to show openrouter balance next to provider
- Add support for custom model ID in AWS Bedrock provider, enabling use of Application Inference Profile (Thanks @clicube!)
- Add more robust caching & cache tracking for gemini & vertex providers
- Add support for LaTeX rendering
- Add support for custom API request timeout. Timeouts were 15-30s, but can now be configured via settings for OpenRouter/Cline & Ollama (Thanks @WingsDrafterwork!)
- Add truncation notice when truncating manually
- Add a timeout setting for the terminal connection, allowing users to set a time to wait for terminal startup
- Add copy button to code blocks
- Add copy button to markdown blocks (Thanks @weshoke!)
- Add checkpoints to more messages
- Add slash command to create a new rules file (/newrule)
- Add cache ui for open router and cline provider
- Add Amazon Nova Premier model to Bedrock (Thanks @watany!)
- Add support for cursorrules and windsurfrules
- Add support for batch history deletion (Thanks @danix800!)
- Improve Drag & Drop experience
- Create clinerules folder creating new rule if it's needed
- Enable pricing calculation for gemini and vertex providers
- Refactor message handling to not show the MCP View of the server modal
- Migrate the addRemoteServer to protobus (Thanks @DaveFres!)
- Update task header to be expanded by default
- Update Gemini cache TTL time to 15 minutes
- Fix race condition in terminal command usage
- Fix to correctly handle `import.meta.url`, avoiding leading slash in pathname for Windows (Thanks @DaveFres!)
- Fix @withRetry() decoration syntax error when running extension locally (Thanks @DaveFres!)
- Fix for git commit mentions in repos with no git commits
- Fix cost calculation (Thanks @BarreiroT!)
</changelog>
<announcement-component>
const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
return (
<div style={containerStyle}>
<VSCodeButton appearance="icon" onClick={hideAnnouncement} style={closeIconStyle}>
<span className="codicon codicon-close"></span>
</VSCodeButton>
<h3 style={h3TitleStyle}>
🎉{" "}New in v{minorVersion}
</h3>
<ul style={ulStyle}>
<li>
<b>Gemini prompt caching:</b> Gemini and Vertex providers now support prompt caching and price tracking for
Gemini models.
</li>
<li>
<b>Copy Buttons:</b> Buttons were added to Markdown and Code blocks that allow you to copy their contents
easily.
</li>
<li>
<b>/newrule command:</b> New slash command to have cline write your .clinerules for you based on your
workflow.
</li>
<li>
<b>Drag and drop improvements:</b> Don't forget to hold shift while dragging files!
</li>
<li>Added more checkpoints across the task, allowing you to restore from more than just file changes.</li>
<li>Added support for rendering LaTeX in message responses. (Try asking Cline to show the quadratic formula)</li>
</ul>
<Accordion isCompact className="pl-0">
<AccordionItem
key="1"
aria-label="Previous Updates"
title="Previous Updates:"
classNames={{
trigger: "bg-transparent border-0 pl-0 pb-0 w-fit",
title: "font-bold text-(--vscode-foreground)",
indicator:
"text-(--vscode-foreground) mb-0.5 -rotate-180 data-[open=true]:-rotate-90 rtl:rotate-0 rtl:data-[open=true]:-rotate-90",
}}>
<ul style={ulStyle}>
<li>
<b>Global Cline Rules:</b> store multiple rules files in Documents/Cline/Rules to share between
projects.
</li>
<li>
<b>Cline Rules Popup:</b> New button in the chat area to view workspace and global cline rules files
to plug and play specific rules for the task
</li>
<li>
<b>Slash Commands:</b> Type <code>/</code> in chat to see the list of quick actions, like starting a
new task (more coming soon!)
</li>
<li>
<b>Edit Messages:</b> You can now edit a message you sent previously by clicking on it. Optionally
restore your project when the message was sent!
</li>
</ul>
</AccordionItem>
</Accordion>
{/*
// Leave this here for an example of how to structure the announcement
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li>
OpenRouter now supports prompt caching! They also have much higher rate limits than other providers,
so I recommend trying them out.
<br />
{!apiConfiguration?.openRouterApiKey && (
<VSCodeButtonLink
href={getOpenRouterAuthUrl(vscodeUriScheme)}
style={{
transform: "scale(0.85)",
transformOrigin: "left center",
margin: "4px -30px 2px 0",
}}>
Get OpenRouter API Key
</VSCodeButtonLink>
)}
{apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && (
<VSCodeButton
onClick={() => {
vscode.postMessage({
type: "apiConfiguration",
apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" },
})
}}
style={{
transform: "scale(0.85)",
transformOrigin: "left center",
margin: "4px -30px 2px 0",
}}>
Switch to OpenRouter
</VSCodeButton>
)}
</li>
<li>
<b>Edit Cline's changes before accepting!</b> When he creates or edits a file, you can modify his
changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in
the center to undo "<code>{"// rest of code here"}</code>" shenanigans)
</li>
<li>
New <code>search_files</code> tool that lets Cline perform regex searches in your project, letting
him refactor code, address TODOs and FIXMEs, remove dead code, and more!
</li>
<li>
When Cline runs commands, you can now type directly in the terminal (+ support for Python
environments)
</li>
</ul>*/}
<div style={hrStyle} />
<p style={linkContainerStyle}>
Join us on{" "}
<VSCodeLink style={linkStyle} href="https://x.com/cline">
X,
</VSCodeLink>{" "}
<VSCodeLink style={linkStyle} href="https://discord.gg/cline">
discord,
</VSCodeLink>{" "}
or{" "}
<VSCodeLink style={linkStyle} href="https://www.reddit.com/r/cline/">
r/cline
</VSCodeLink>
for more updates!
</p>
</div>
)
}
</announcement-component>
- 3.13
<changeset>
Minor Changes
2964388: Added copy button to MermaidBlock component
75143a7: Add the ability to fetch from global cline rules files
Patch Changes
a0252e7: convert inline style to tailwind css of file SettingsView.tsx
ab59bd9: Add stream options back to xai provider
7276f50: Icons to indicate an action is occuring outside of the users workspace
0b19ba6: update to NEW model
</changeset>
<changelog>
## [3.13.0]
- Add Cline rules popover under the chat field, allowing you to easily add, enable & disable workspace level or global rule files
- Add new slash command menu letting you type “/“ to do quick actions like creating new tasks
- Add ability to edit past messages, with options to restore your workspace back to that point
- Allow sending a message when selecting an option provided by the question or plan tool
- Add command to jump to Cline's chat input
- Add support for OpenAI o3 & 4o-mini (Thanks @PeterDaveHello and @arafatkatze!)
- Add baseURL option for Google Gemini provider (Thanks @owengo and @olivierhub!)
- Add support for Azure's DeepSeek model. (Thanks @yt3trees!)
- Add ability for models that support it to receive image responses from MCP servers (Thanks @rikaaa0928!)
- Improve search and replace diff editing by making it more flexible with models that fail to follow structured output instructions. (Thanks @chi-cat!)
- Add detection of Ctrl+C termination in terminal, improving output reading issues
- Fix issue where some commands with large output would cause UI to freeze
- Fix token usage tracking issues with vertex provider (Thanks @mzsima!)
- Fix issue with xAI reasoning content not being parsed (Thanks @mrubens!)
</changelog>
<announcement-component>
const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
return (
<div style={containerStyle}>
<VSCodeButton appearance="icon" onClick={hideAnnouncement} style={closeIconStyle}>
<span className="codicon codicon-close"></span>
</VSCodeButton>
<h3 style={h3TitleStyle}>
🎉{" "}New in v{minorVersion}
</h3>
<ul style={ulStyle}>
<li>
<b>Global Cline Rules:</b> store multiple rules files in Documents/Cline/Rules to share between projects.
</li>
<li>
<b>Cline Rules Popup:</b> New button in the chat area to view workspace and global cline rules files to plug
and play specific rules for the task
</li>
<li>
<b>Slash Commands:</b> Type <code>/</code> in chat to see the list of quick actions, like starting a new task
(more coming soon!)
</li>
<li>
<b>Edit Messages:</b> You can now edit a message you sent previously by clicking on it. Optionally restore
your project when the message was sent!
</li>
</ul>
<h4 style={{ margin: "5px 0 5px" }}>Previous Updates:</h4>
<ul style={ulStyle}>
<li>
<b>Model Favorites:</b> You can now mark your favorite models when using Cline & OpenRouter providers for
quick access!
</li>
<li>
<b>Faster Diff Editing:</b> Improved animation performance for large files, plus a new indicator in chat
showing the number of edits Cline makes.
</li>
<li>
<b>New Auto-Approve Options:</b> Turn off Cline's ability to read and edit files outside your workspace.
</li>
</ul>
{/*
// Leave this here for an example of how to structure the announcement
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li>
OpenRouter now supports prompt caching! They also have much higher rate limits than other providers,
so I recommend trying them out.
<br />
{!apiConfiguration?.openRouterApiKey && (
<VSCodeButtonLink
href={getOpenRouterAuthUrl(vscodeUriScheme)}
style={{
transform: "scale(0.85)",
transformOrigin: "left center",
margin: "4px -30px 2px 0",
}}>
Get OpenRouter API Key
</VSCodeButtonLink>
)}
{apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && (
<VSCodeButton
onClick={() => {
vscode.postMessage({
type: "apiConfiguration",
apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" },
})
}}
style={{
transform: "scale(0.85)",
transformOrigin: "left center",
margin: "4px -30px 2px 0",
}}>
Switch to OpenRouter
</VSCodeButton>
)}
</li>
<li>
<b>Edit Cline's changes before accepting!</b> When he creates or edits a file, you can modify his
changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in
the center to undo "<code>{"// rest of code here"}</code>" shenanigans)
</li>
<li>
New <code>search_files</code> tool that lets Cline perform regex searches in your project, letting
him refactor code, address TODOs and FIXMEs, remove dead code, and more!
</li>
<li>
When Cline runs commands, you can now type directly in the terminal (+ support for Python
environments)
</li>
</ul>*/}
<div style={hrStyle} />
<p style={linkContainerStyle}>
Join us on{" "}
<VSCodeLink style={linkStyle} href="https://x.com/cline">
X,
</VSCodeLink>{" "}
<VSCodeLink style={linkStyle} href="https://discord.gg/cline">
discord,
</VSCodeLink>{" "}
or{" "}
<VSCodeLink style={linkStyle} href="https://www.reddit.com/r/cline/">
r/cline
</VSCodeLink>
for more updates!
</p>
</div>
)
}
</announcement-component>
We have a changeset PR that automatically generated as new unreleased PRs are merged into main, the PR is always called "Changeset version bump" and the author is github-actions.
The Changeset PR description looks something like this:
<changeset-pr-description>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
# Releases
## claude-dev@3.16.0
### Minor Changes
- c6e8b04: Recent task list is now collapsible, allowing users to hide their recent tasks (e.g. when sharing their screen).
- aabe4ae: Add detection for new users to display special components
- 6c18d51: adds global endpoint for vertex ai users
- 080ed7c: Add Tailwind CSS IntelliSense to the the recommended extensions list
- 5147e28: new workflow feature
### Patch Changes
- c0b3c69: fix eternal loading states when the last message is a checkpoint
- 570ece3: selectImages protos migration
- 8d8452e: askResponse protobus migration
- cd1ff2a: Finishing the migration of Vscode Advanced settings to Settings Webview
</changeset-pr-description>
The changeset pr is ALWAYS on the following branch: `changeset-release/main`.
I have the `gh` command line tool set up and authenticated, so you have everything you need.
The first step is to get the full diff from the changeset PR to look at the changes that were automatically made to the `CHANGELOG.md` file. By default it will automatically add a new section to the changelog.md file with the new version. The problem with the automatically generated section is that it just takes the text that the developers threw into their changeset files for each corresponding PR, and they can be pretty vague and bad. Additionally there's some stuff that is totally irrelevant for the end user, like minor refactoring changes. So I manually typically go in and update this section to be a proper changelog that will show up in our patchnotes. You can look at how the rest of the file is done because those are all good examples of us updating this to use good language for the end user. We usually put new features up top (and the most exciting flagship features at the very top), and then bug fixes/improvements at the bottom. Having some basic organization to the ordering of the bullet points by content is nice. But use common sense.
To handle this process effectively, do the following:
For each of the automatically generated bullet points in the Changelog.md, you should
1. Take the commit hash at the start of the bullet point, and use the `gh` command line tool find the PR that it was associated with.
2. Use the `gh` command to get the PR title/description/discussion to understand the context surrounding the PR.
3. Use the `gh` command line tool to get the full PR diff to fully understand the changes made in the code.
4. Synthesize that knowledge to determine (a) whether or not this change is relevant to end users and (b) what the text & ordering of the line should be.
5. Update the `CHANGELOG.md` accordingly
Do this for every single item in the list from the autogenerated bullet points. We want to be diligent and have a full understanding of every feature so we can make the best changelog ever!
Here are some principles for good changelogs from keepchangelog.com, a handy guide:
<keepachangelog-pinciples-for-good-changelogs>
### Guiding Principles
- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- The latest version comes first.
### Bullet points in the changelog should follow these principles:
- Types of changes
- Added for new features.
- Changed for changes in existing functionality.
- Deprecated for soon-to-be removed features.
- Removed for now removed features.
- Fixed for any bug fixes.
- Security in case of vulnerabilities.
</keepachangelog-pinciples-for-good-changelogs>
Lastly, when developers make a PR, they typically make a changeset. And they have 3 options when making the changeset:
1. Patch
2. Minor
3. Major
Sometimes they label something as minor when really it should just be a patch. Or vice versa. Because of this, the automatic version bump may be incorrect. So when starting out this workflow, you should use the <ask_followup_question> tool to confirm with me whether or not this should be a patch bump (show the old version number and what the proposed new version number would be) or a minor bump. Part of the release process is making sure the version in package.json that is automatically changed actually corresponds with what we decided the bump should actually be based on the features. ALL these modifications happen in the `changeset-release/main` branch btw.
<important_note>
Before doing any of this, make sure you check out the `changeset-release/main` and pull the most recent up to date changes. Then perform all this work in that branch.
New announcement banners should ONLY be made for minor version bumps or higher. That's another reason why double checking if the changelog warrants the bump is important.
Also, SUPER important: For any external contributors that aren't part of the cline github organization, we always want to add a (Thanks @username!) at the end of the changelog to attribute them properly. We're an open source project and it's ethical to do this.
</important_note>
Once the changelog looks good, and the version number looks good, we gotta double check that the version number in the changelog has the brackets around it. And as a final step, double check the package.json version number matches the latest number in the changelog. And as the ultimate final step we run `npm run install:all` to make sure the package version number permiates through the lock file.
<detailed_sequence_of_steps>
# Cline Release Process - Detailed Sequence of Steps
## Before Starting
1. First, examine the changeset PR without checking it out:
```bash
gh pr view changeset-release/main
```
2. View the PR diff to see the auto-generated CHANGELOG.md changes:
```bash
gh pr diff changeset-release/main > changeset-diff.txt
cat changeset-diff.txt | grep -A 50 "CHANGELOG.md"
```
## Initial Setup
3. Once you're ready to start, checkout and update the changeset release branch:
```bash
git checkout changeset-release/main
git pull origin changeset-release/main
```
## Analyzing Each Change
4. For each commit hash in the auto-generated changelog entries:
a. Find the PR number associated with a commit hash:
```bash
gh pr list --search "<commit-hash>" --state merged
```
b. Get PR details for better context:
```bash
gh pr view <PR-number>
```
c. Check if the contributor is external to determine if attribution is needed:
```bash
# Extract username from PR
USERNAME=$(gh pr view <PR-number> --json author --jq .author.login)
# Check if user is a member of the Cline organization
# this command is a bit finnicky, but it 100% works.
# if you see a `Error executing command: The command ran successfully, but we couldn't capture its output. Please proceed accordingly.` error, just retry it until you actually get the output
# don't make any assumptions, just retry the command to actually get the output and determine if they're external or not.
# no output means they are an external contributor, otherwise if there is output they are an internal contributor (part of our github org)
gh api "orgs/cline/members" --jq "map(.login)" | grep -i "pashpashpash"
```
d. View the full PR diff to understand code changes:
```bash
gh pr diff <PR-number> > pr-diff-<PR-number>.txt
cat pr-diff-<PR-number>.txt
```
## Updating the Changelog
5. Based on PR analysis, update the CHANGELOG.md with user-friendly descriptions:
- Use the `<replace_in_file>` tool to edit the CHANGELOG.md file
- Group by feature type (Added, Changed, Fixed)
- Put most exciting features at the top
- Move bug fixes and small improvements to the bottom
- Use clear, end-user focused language
- For external contributors, add attribution at the end of the relevant entry: `(Thanks @username!)`
## Version Number Verification
6. Confirm the version bump is appropriate:
- Check package.json to verify the auto-generated version number:
```bash
cat package.json | grep "\"version\""
```
- If the feature set doesn't warrant a minor bump, use the `<replace_in_file>` tool to modify package.json
7. Ensure the version in CHANGELOG.md has brackets around it:
```
## [3.16.0]
```
## Creating the Announcement (for minor/major versions only)
8. If this is a minor version bump, create/update the announcement component:
- Use the `<replace_in_file>` tool to edit the src/views/components/announcement.tsx file
- Update the highlights based on key features
- Move previous version highlights to the "Previous Updates" section
- Use the previous announcement components as reference for structure
## Finalizing the Release
9. Update dependencies with the new version number:
```bash
npm run install:all
```
10. Commit your changes:
```bash
git add CHANGELOG.md package.json package-lock.json src/views/components/announcement.tsx
git commit -m "Update CHANGELOG.md and announcement for version 3.16.0"
```
11. Push your changes to the changeset branch:
```bash
git push origin changeset-release/main
```
12. Check that your changes pushed successfully:
```bash
git status
```
</detailed_sequence_of_steps>
@@ -0,0 +1,61 @@
# Git Diff Analysis Workflow
## Objective
Analyze the current branch's changes against main to provide informed insights and context for development decisions.
## Step 1: Gather Git Information
<important>Do not return any text or conversation other than what is necessary to run these commands</important>
**Run the following command to get the latest changes (bash):**
```bash
B=$(for c in main master origin/main origin/master; do git rev-parse --verify -q "$c" >/dev/null && echo "$c" && break; done); B=${B:-HEAD}; r(){ git branch --show-current; printf "=== STATUS ===\n"; git status --porcelain | cat; printf "=== COMMIT MESSAGES ===\n"; git log "$B"..HEAD --oneline | cat; printf "=== CHANGED FILES ===\n"; git diff "$B" --name-only | cat; printf "=== FULL DIFF ===\n"; git diff "$B" | cat; }; L=$(r | wc -l); if [ "$L" -gt 500 ]; then r > cline-git-analysis.temp && echo "::OUTPUT_FILE=cline-git-analysis.temp"; else r; fi
```
```powershell
$B=$null;foreach($c in 'main','master','origin/main','origin/master'){git rev-parse --verify -q $c *> $null;if($LASTEXITCODE -eq 0){$B=$c;break}};if(-not $B){$B='HEAD'};function r([string]$b){git rev-parse --abbrev-ref HEAD; '=== STATUS ==='; git status --porcelain | cat; '=== COMMIT MESSAGES ==='; git log "$b"..HEAD --oneline | cat; '=== CHANGED FILES ==='; git diff "$b" --name-only | cat; '=== FULL DIFF ==='; git diff "$b" | cat};$out=r $B|Out-String;$lines=($out -split "`r?`n").Count;if($lines -gt 500){$out|Set-Content -NoNewline cline-git-analysis.temp; '::OUTPUT_FILE=cline-git-analysis.temp'}else{$out}
```
## Step 2: Silent, Structured Analysis Phase
- Analyze all git output without providing commentary or narration
- Read the full diff to understand the scope and nature of changes
- Identify patterns, architectural modifications, or potential impacts
- Use `read_file` to examine any related files providing additional context on the changes you have observed
## Step 3: Context Gathering
- Analyze related code without providing commentary or narration
- Read relevant related source files if needed for complete understanding
- Check dependencies, imports, or cross-references spanning the changes
- Understand the broader codebase context around modifications
- This additional context gathering should include related backend code, as well as related ui/frontend code
- You will typically need to analyze at least several files, potentially many, in order to fully complete this step
- You should not continue reading additional context if you have exhausted more than 60% of your available context window
- If you have exhausted less than 40% of your context window, you should continue reviewing additional context
## Step 4: Ready for User Interaction
**Only after completing the full analysis:**
- Engage with the user based on comprehensive understanding
- Provide insights about specific modifications and their impacts
- If you are certain they exist, note potential breaking changes or compatibility issues
- Answer questions with informed context from the complete change set and context gathering
- If the user has not provided a question, or the question is insufficient to provide a quality response, ask brief (one sentence) clarifying questions.
- Only offer recommendations if they are applicable to the user's request and relevant to the changes that you have observed
## Key Rules
- **No prose or conversation during git research phase**
- **No prose or conversation during context gathering phase**
- **Complete all analysis before any user interaction**
- **Use gathered information for all subsequent questions and insights**
- **Focus on understanding the complete picture before discussing**
## Optional: Additional Analysis Commands
For deeper investigation when needed:
```shell
# Detailed commit history with author info
git log main..HEAD --format="%h %s (%an)" | cat
# Change statistics
git diff main --stat | cat
# Specific file type changes
git diff main --name-only | grep -E '\.(ts|js|tsx|jsx|py|md)$' | cat
+354
View File
@@ -0,0 +1,354 @@
You have access to the `gh` terminal command. I already authenticated it for you. Please review it to use the PR that I asked you to review. You're already in the `cline` repo.
<detailed_sequence_of_steps>
# GitHub PR Review Process - Detailed Sequence of Steps
## 1. Gather PR Information
1. Get the PR title, description, and comments:
```bash
gh pr view <PR-number> --json title,body,comments
```
2. Get the full diff of the PR:
```bash
gh pr diff <PR-number>
```
## 2. Understand the Context
1. Identify which files were modified in the PR:
```bash
gh pr view <PR-number> --json files
```
2. Examine the original files in the main branch to understand the context:
```xml
<read_file>
<path>path/to/file</path>
</read_file>
```
3. For specific sections of a file, you can use search_files:
```xml
<search_files>
<path>path/to/directory</path>
<regex>search term</regex>
<file_pattern>*.ts</file_pattern>
</search_files>
```
## 3. Analyze the Changes
1. For each modified file, understand:
- What was changed
- Why it was changed (based on PR description)
- How it affects the codebase
- Potential side effects
2. Look for:
- Code quality issues
- Potential bugs
- Performance implications
- Security concerns
- Test coverage
## 4. Ask for User Confirmation
1. Before making a decision, ask the user if you should approve the PR, providing your assessment and justification:
```xml
<ask_followup_question>
<question>Based on my review of PR #<PR-number>, I recommend [approving/requesting changes]. Here's my justification:
[Detailed justification with key points about the PR quality, implementation, and any concerns]
Would you like me to proceed with this recommendation?</question>
<options>["Yes, approve the PR", "Yes, request changes", "No, I'd like to discuss further"]</options>
</ask_followup_question>
```
## 5. Ask if User Wants a Comment Drafted
1. After the user decides on approval/rejection, ask if they would like a comment drafted:
```xml
<ask_followup_question>
<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
</ask_followup_question>
```
2. If the user wants a comment drafted, provide a well-structured comment they can copy:
```
Thank you for this PR! Here's my assessment:
[Detailed assessment with key points about the PR quality, implementation, and any suggestions]
[Include specific feedback on code quality, functionality, and testing]
```
## 6. Make a Decision
1. Approve the PR if it meets quality standards:
```bash
# For single-line comments:
gh pr review <PR-number> --approve --body "Your approval message"
# For multi-line comments with proper whitespace formatting:
cat << EOF | gh pr review <PR-number> --approve --body-file -
Thanks @username for this PR! The implementation looks good.
I particularly like how you've handled X and Y.
Great work!
EOF
```
2. Request changes if improvements are needed:
```bash
# For single-line comments:
gh pr review <PR-number> --request-changes --body "Your feedback message"
# For multi-line comments with proper whitespace formatting:
cat << EOF | gh pr review <PR-number> --request-changes --body-file -
Thanks @username for this PR!
The implementation looks promising, but there are a few things to address:
1. Issue one
2. Issue two
Please make these changes and we can merge this.
EOF
```
Note: The `cat << EOF | ... --body-file -` approach preserves all whitespace and formatting without requiring temporary files. The `-` parameter tells the command to read from standard input.
</detailed_sequence_of_steps>
<example_review_process>
# Example PR Review Process
Let's walk through a real example of reviewing PR #3627 which fixes the thinking mode calculation for Claude 3.7 models.
## Step 1: Gather PR Information
```bash
# Get PR details
gh pr view 3627 --json title,body,comments
# Get the full diff
gh pr diff 3627
```
## Step 2: Understand the Context
```xml
# Examine the original files to understand what's being changed
<read_file>
<path>src/shared/api.ts</path>
</read_file>
# Look at the ThinkingBudgetSlider component implementation
<read_file>
<path>webview-ui/src/components/settings/ThinkingBudgetSlider.tsx</path>
</read_file>
# Check how thinking mode is currently handled in API providers
<search_files>
<path>src/api/providers</path>
<regex>reasoningOn</regex>
<file_pattern>*.ts</file_pattern>
</search_files>
```
## Step 3: Analyze the Changes
From the PR information and code examination, we can see that:
1. The PR fixes an issue with the thinking mode budget calculation for Claude 3.7 models
2. Currently, the thinking budget is incorrectly calculated as 80% of maxTokens (8192), resulting in 6553 tokens
3. Claude 3.7 actually supports a much larger thinking budget (up to 64000 tokens)
4. The PR adds a `thinkingConfig` property with `maxBudget: 64000` to model definitions
5. It updates API handlers to use this value when reasoning mode is enabled
6. It enhances the slider component to calculate max values based on model-specific percentages
7. Comprehensive tests were added to verify the calculations
## Step 4: Ask for User Confirmation
```xml
<ask_followup_question>
<question>Based on my review of PR #3627, I recommend approving this PR. Here's my justification:
1. The PR correctly fixes the thinking mode budget calculation for Claude 3.7 models
2. It properly implements the thinkingConfig.maxBudget property (64000) for Claude 3.7 models
3. It applies the appropriate percentage (50%) for the slider calculation
4. The changes are well-tested with comprehensive unit tests
5. The implementation is clean and follows the project's coding standards
6. The PR includes helpful screenshots demonstrating the fix
Would you like me to proceed with approving this PR?</question>
<options>["Yes, approve the PR", "No, I'd like to discuss further", "Let me review it myself first"]</options>
</ask_followup_question>
```
## Step 5: Ask if User Wants a Comment Drafted
```xml
<ask_followup_question>
<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
</ask_followup_question>
```
## Step 6: Make a Decision
```bash
# Option 1: Simple one-line comment
gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models."
# Option 2: Multi-line comment with proper whitespace formatting
cat << EOF | gh pr review 3627 --approve --body-file -
This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models.
I particularly like:
1. The proper implementation of thinkingConfig.maxBudget property (64000)
2. The appropriate percentage (50%) for the slider calculation
3. The comprehensive unit tests
4. The clean implementation that follows project coding standards
Great work!
EOF
```
</example_review_process>
<common_gh_commands>
# Common GitHub CLI Commands for PR Review
## Basic PR Commands
```bash
# Get current PR number
gh pr view --json number -q .number
# List open PRs
gh pr list
# View a specific PR
gh pr view <PR-number>
# View PR with specific fields
gh pr view <PR-number> --json title,body,comments,files,commits
# Check PR status
gh pr status
```
## Diff and File Commands
```bash
# Get the full diff of a PR
gh pr diff <PR-number>
# List files changed in a PR
gh pr view <PR-number> --json files
# Check out a PR locally
gh pr checkout <PR-number>
```
## Review Commands
```bash
# Approve a PR (single-line comment)
gh pr review <PR-number> --approve --body "Your approval message"
# Approve a PR (multi-line comment with proper whitespace)
cat << EOF | gh pr review <PR-number> --approve --body-file -
Your multi-line
approval message with
proper whitespace formatting
EOF
# Request changes on a PR (single-line comment)
gh pr review <PR-number> --request-changes --body "Your feedback message"
# Request changes on a PR (multi-line comment with proper whitespace)
cat << EOF | gh pr review <PR-number> --request-changes --body-file -
Your multi-line
change request with
proper whitespace formatting
EOF
# Add a comment review (without approval/rejection)
gh pr review <PR-number> --comment --body "Your comment message"
# Add a comment review with proper whitespace
cat << EOF | gh pr review <PR-number> --comment --body-file -
Your multi-line
comment with
proper whitespace formatting
EOF
```
## Additional Commands
```bash
# View PR checks status
gh pr checks <PR-number>
# View PR commits
gh pr view <PR-number> --json commits
# Merge a PR (if you have permission)
gh pr merge <PR-number> --merge
```
</common_gh_commands>
<general_guidelines_for_commenting>
When reviewing a PR, please talk normally and like a friendly reviwer. You should keep it short, and start out by thanking the author of the pr and @ mentioning them.
Whether or not you approve the PR, you should then give a quick summary of the changes without being too verbose or definitive, staying humble like that this is your understanding of the changes. Kind of how I'm talking to you right now.
If you have any suggestions, or things that need to be changed, request changes instead of approving the PR.
Leaving inline comments in code is good, but only do so if you have something specific to say about the code. And make sure you leave those comments first, and then request changes in the PR with a short comment explaining the overall theme of what you're asking them to change.
</general_guidelines_for_commenting>
<example_comments_that_i_have_written_before>
<brief_approve_comment>
Looks good, though we should make this generic for all providers & models at some point
</brief_approve_comment>
<brief_approve_comment>
Will this work for models that may not match across OR/Gemini? Like the thinking models?
</brief_approve_comment>
<approve_comment>
This looks great! I like how you've handled the global endpoint support - adding it to the ModelInfo interface makes total sense since it's just another capability flag, similar to how we handle other model features.
The filtered model list approach is clean and will be easier to maintain than hardcoding which models work with global endpoints. And bumping the genai library was obviously needed for this to work.
Thanks for adding the docs about the limitations too - good for users to know they can't use context caches with global endpoints but might get fewer 429 errors.
</approve_comment>
<requesst_changes_comment>
This is awesome. Thanks @scottsus.
My main concern though - does this work for all the possible VS Code themes? We struggled with this initially which is why it's not super styled currently. Please test and share screenshots with the different themes to make sure before we can merge
</request_changes_comment>
<request_changes_comment>
Hey, the PR looks good overall but I'm concerned about removing those timeouts. Those were probably there for a reason - VSCode's UI can be finicky with timing.
Could you add back the timeouts after focusing the sidebar? Something like:
```typescript
await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus")
await setTimeoutPromise(100) // Give UI time to update
visibleWebview = WebviewProvider.getSidebarInstance()
```
</request_changes_comment>
<request_changes_comment>
Heya @alejandropta thanks for working on this!
A few notes:
1 - Adding additional info to the environment variables is fairly problematic because env variables get appended to **every single message**. I don't think this is justifiable for a somewhat niche use case.
2 - Adding this option to settings to include that could be an option, but we want our options to be simple and straightforward for new users
3 - We're working on revisualizing the way our settings page is displayed/organized, and this could potentially be reconciled once that is in and our settings page is more clearly delineated.
So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us.
</request_changes_comment>
<request_changes_comment>
Also, don't forget to add a changeset since this fixes a user-facing bug.
The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts.
</request_changes_comment>
</example_comments_that_i_have_written_before>
@@ -0,0 +1,392 @@
# General writing guide
# How I want you to write
I'm gonna write something technical.
It's often less about the nitty-gritty details of the tech stuff and more about learning something new or getting a solution handed to me on a silver platter.
Look, when I read, I want something out of it. So when I write, I gotta remember that my readers want something too. This whole piece? It's about cluing in anyone who writes for me, or wants me to write for them, on how I see this whole writing product thing.
I'm gonna lay out a checklist of stuff I'd like to have. It'll make the whole writing gig a bit smoother, you know?
## Crafting Compelling Titles
I often come across titles like "How to do X with Y,Z technology." These don't excite me because X or Y are usually unfamiliar unless they're already well-known. Its rarely the dream to use X unless X is the dream.
My dream isnt to use instructor, its to do something valueble with the data it extracts
An effective title should:
- Evoke an emotional response
- Highlight someone's goal
- Offer a dream or aspiration
- Challenge or comment on a belief
- Address someone's problems
I believe it's more impactful to write about specific problems. If this approach works, you can replicate it across various scenarios rather than staying too general.
- Time management for everyone can be a 15$ ebook
- Time management for executives is a 2000$ workshop
Aim for titles that answer questions you think everyone is asking, or address thoughts people have but can't quite articulate.
Instead of "How I do something" or "How to do something," frame it from the reader's perspective with "How you can do something." This makes the title more engaging. Just make sure the difference is advisory if the content is subjective. “How I made a million dollars” might be more reasonable than “How to make a million dollars” since you are the subject and the goal might be to share your story in hopes of helping others.
This approach ultimately trains the reader to have a stronger emotional connection to your content.
- "How I do X"
- "How You Can do X"
Between these two titles, it's obvious which one resonates more emotionally.
You can take it further by adding specific conditions. For instance, you could target a particular audience or set a timeframe:
- How to set up Braintrust
- How to set up Braintrust in 5 minutes
## NO adjectiives
I want you to almost always avoid adjectives and try to use evidence instead. Instead of saying "production ready," you can write something like "scaling this to 100 servers or 1 million documents per second." Numbers like that will tell you exactly what the specificity of your product is. If you have to use adjectives rather than evidence, you are probably making something up.
There's no reason to say something like "blazingly fast" unless those things are already known phrases.
Instead, say "200 times faster" or "30% faster." A 30% improvement in recommendation system speed is insane.
There's a 200 times performance improvement because we went from one programming language to another. It's just something that's a little bit more expected and understandable.
Another test that I really like using recently is tracking whether or not the statements you make can be:
- Visualized
- Proven false
- Said only by you
If you can nail all three, the claim you make will be more likely to resonate with an audience because only you can say it.
Earlier this year, I had an example where I embedded all of Wikipedia in 17 minutes with 20 bucks, and it got half a million views. All we posted was a video of me kicking off the job, and then you can see all the log lines go through. You see the number of containers go from 1 out of 50 to 50 out of 50.
It was easy to visualize and could have been proven false by being unreproducible. Lastly, Modal is the only company that could do that in such an effortless way, which made it unique.
## Keep It Digestible
- Aim for 5-minute reads
- Write at a Grade 10 reading level
- Break up long paragraphs
- Use headers and bullet points
## Make It Scannable
- Bold key points
- Use subheadings every 3-4 paragraphs
- Include plenty of white space
- Add relevant examples
This structure works whether you're writing a tweet thread or a full blog post. The key is making complex ideas accessible.
# Guide to Writing Cline Documentation
## Some general principles for explaining features
If you're talking about a feature, it's helpful to start with a human-readable explanations that cover what the feature is in simple terms. Skip jargon and explain it like you're talking to someone who's never seen it before. This sets the foundation for everything that follows.
Combine location and usage into one flowing section. Tell users exactly where to find the feature and how to use it, but weave the instructions into natural prose with a good balance of bullet points, numbered lists, code examples (if applicable), mintlify components, and headers/subheaders. Users shouldn't have to jump between separate "where is it" and "how do I use it" sections.
Show the feature in action with real examples like actual files, workflows, or code. Users need to see concrete implementations, not just abstract descriptions. This is where understanding turns into practical knowledge.
When talking about a feature, include an inspiration section that sparks imagination. This section pushes people from understanding to action by showing them what becomes possible when they use this feature creatively. It's what separates good documentation from great documentation.
## Writing Principles That Actually Work
### Write for Action, Not Just Understanding
Documentation should motivate users to try things. Instead of just explaining how something works, focus on what users can accomplish with it. The inspiration section is crucial - it's what transforms passive readers into active users.
### Create a Natural Story Flow
It should feel like a conversation that naturally progresses from "what is this?" to "how do I use it?" to "here's a real example" to "imagine what you could do with this."
### Show Real Examples, Not Toy Demos
Provide actual workflow files, real code snippets, and concrete implementations that users can copy and adapt. Abstract examples don't help anyone - users want to see exactly what they'll be working with.
### Keep It Scannable But Not Fragmented
Write in prose that flows naturally when read completely, but structure it so users can quickly find specific information when they're troubleshooting. Avoid dense walls of text, but also avoid over-formatting with excessive bullet points and bold headers. There should be a nice visual heirarchy of balance between all elements, so you can quickly scan the page and find what you're looking for.
## Language and Tone Guidelines
Write clearly without dumbing things down. Use simple language when possible, but don't avoid technical terms that users need to know. Explain concepts in terms of what users can achieve rather than how the software works internally.
Make your writing conversational and encouraging. Phrases like "you can also try" or "when that works" feel more natural than rigid instructional language. Help users feel confident about trying new things.
Keep content concise and purposeful. Every sentence should either help users understand something or help them do something. If it doesn't serve one of those purposes, cut it.
Build in context and reasoning. Users want to understand why they're doing something, not just what to do. This builds confidence and helps them troubleshoot when things don't work exactly as expected.
## Practical Implementation
Structure each feature page consistently with the four-section approach, but let the content flow naturally within that structure. Use visual assets like videos and screenshots to complement the written content - they often communicate more effectively than paragraphs of description.
Link generously to related resources, examples, and deeper documentation. Users should never feel stuck or wonder where to go next. Maintain a repository of real examples that users can reference and adapt to their own needs.
The goal is documentation that feels more like helpful guidance from an experienced colleague than a technical manual. Users should finish reading feeling excited about what they can accomplish, not just informed about what the feature does.
## Balance Structure with Flexibility
While they discuss having consistent documentation structure, there's also mention of making content feel less rigid and more natural. The writing should follow guidelines while still feeling conversational and engaging.
## Bad examples
I personally hate this pattern of bullet point **Bold Text** colon and then more text:
<bad_example_of_writing>
#### macOS
1. **Switch to bash**: Go to Cline Settings → Terminal → Default Terminal Profile → Select "bash"
2. **Disable Oh-My-Zsh temporarily**: If using zsh, try `mv ~/.zshrc ~/.zshrc.backup` and restart VSCode
3. **Set environment**: Add to your shell config: `export TERM=xterm-256color`
#### Windows
1. **Use PowerShell 7**: Install from Microsoft Store, then select it in Cline settings
2. **Disable Windows ConPTY**: VSCode Settings → Terminal Integrated: Windows Enable Conpty → Uncheck
3. **Try Command Prompt**: Sometimes simpler is better - switch to cmd.exe
#### Linux
1. **Use bash**: Most reliable option - select in Cline settings
2. **Check permissions**: Ensure VSCode has terminal access permissions
3. **Disable custom prompts**: Comment out prompt customizations in `.bashrc`
</bad_example_of_writing>
We should instead strive to write beautiful docs that read well. We can use bullet points and numbered lists but it should read naturally and be delightful to look at hierachally when scanning through the doc. There should be a good balance between blocks of text, code snippets, paragraphs, numbered lists, and bullet points. When scanning the documentation visually, you should feel like you're adminiring a tasteful art piece.
<good_example_of_writing>
#### macOS
The most common fix is switching to bash. Navigate to Cline Settings → Terminal → Default Terminal Profile and select "bash" from the dropdown.
If you're still having issues, Oh-My-Zsh might be interfering with terminal integration. Try temporarily disabling it:
- Run `mv ~/.zshrc ~/.zshrc.backup`
- Restart VSCode
You can also add `export TERM=xterm-256color` to your shell configuration file to improve compatibility.
#### Windows
PowerShell 7 provides the most reliable experience. Install it from the Microsoft Store, then select it in your Cline settings.
Still seeing problems? Try these solutions:
- Disable Windows ConPTY: VSCode Settings → Terminal Integrated: Windows Enable Conpty → uncheck
- Switch to Command Prompt (cmd.exe) - sometimes simpler shells work better
#### Linux
Bash is your most dependable option. Select it in Cline settings if you haven't already.
Check these common issues:
- Ensure VSCode has terminal access permissions
- Temporarily comment out custom prompt configurations in your `.bashrc`
</good_example_of_writing>
This is much more natural to read. Writing this way creates a conversational flow, and bullet points are used idiomatically.
# Using Mintlify Components Idiomatically
Mintlify's custom components can transform basic documentation into engaging, scannable content that users actually want to read. Here's how to use them effectively.
## Visual Content with Frames
Videos and images should be wrapped in `<Frame>` components rather than using raw HTML or markdown. This creates consistent styling and proper responsive behavior.
For videos, embed them directly rather than linking externally. Users are much more likely to watch a 30-second demonstration than click through to another platform:
```jsx
<Frame>
<iframe
style={{ width: "100%", aspectRatio: "16/9" }}
src="https://www.youtube.com/embed/your-video-id"
title="Feature demonstration"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowFullScreen
/>
</Frame>
```
Screenshots work similarly - the frame provides visual polish and consistency:
```jsx
<Frame>
<img src="/path/to/screenshot.png" alt="Descriptive alt text" />
</Frame>
```
## Cards for Navigation and Overview
Cards excel at creating scannable overviews that link to detailed documentation. They're perfect for feature listings, getting started guides, or any section where users need to choose their path.
Use the two-column layout for related features:
```jsx
<Columns cols={2}>
<Card title="Feature Name" icon="relevant-icon" href="/link/to/docs">
Brief description that explains what this feature does and why someone would use it.
</Card>
<Card title="Related Feature" icon="another-icon" href="/another/link">
Another concise explanation that helps users understand the value proposition.
</Card>
</Columns>
```
The key is writing card descriptions that are informative enough to help users decide whether to click through, but concise enough to scan quickly. Each card should answer "what does this do?" and "why would I need this?"
## Tips and Notes for Context
Use `<Tip>` components for helpful information that enhances the main content without cluttering it:
```jsx
<Tip>
Pro tip: You can combine multiple @ mentions in a single message to give Cline
comprehensive context about your issue.
</Tip>
```
`<Note>` components work well for important caveats or technical limitations:
```jsx
<Note>
Due to VS Code limitations, some features require specific settings to work properly.
</Note>
```
`<Info>` is also cool:
<Info>
**Quick Fix**: If you're experiencing terminal issues, try switching to a simpler shell like `bash` in the Cline settings.
This resolves 90% of terminal integration problems.
</Info>
**Never** fall into that awful **Bold Text** - description pattern that we specifically identified as bad writing. The content should flow naturally as connected thoughts rather than feeling like a templated AI response with forced formatting.
## When to Use Bullet Points and Numbered Lists Strategically
Bullet points serve functional purposes - use them for:
**Sequential actions or troubleshooting steps** where users need to follow a specific order:
1. Install the extension
2. Restart VSCode
3. Check the settings panel
**Lists of related options** where users need to choose one approach:
- Try PowerShell 7 for the most reliable experience
- Switch to Command Prompt if you're still having issues
- Use WSL Bash for Linux compatibility
**Quick reference items** that users might need to scan quickly when problem-solving.
**Improving Visual Hierarchy** when there's a wall of text - that's a good time to introduce bullet points or numbered lists.
Each bulleted item or numbered list should be a discrete action or piece of information that benefits from being visually separated. This is a key weapon you can employ when going for that artwork experience I mentioned earlier.
<good_example_of_bullet_points>
## Finding and Configuring Terminal Settings
You can access Cline's terminal settings by clicking the settings icon in the Cline sidebar, then navigating to the Terminal section. These settings control how Cline interacts with your system's terminal.
- The **Default Terminal Profile** setting determines which shell Cline uses for executing commands. If you're experiencing issues, this is usually the first thing to change. I personally keep this set to `bash` on all my systems because it's the most reliable option, even though I use `zsh` for my regular terminal work.
- **Shell Integration Timeout** controls how long Cline waits for the terminal to become ready. The default is 4 seconds, but if you have a heavy shell configuration (lots of plugins, slow startup scripts), you might need to increase this to 10 or even 15 seconds. I've found that WSL environments and SSH connections often need longer timeouts.
- The **Enable Aggressive Terminal Reuse** setting determines whether Cline tries to reuse existing terminals even when they're not in the correct directory. When this causes problems (commands running in the wrong directory, virtual environment issues), disabling it creates more terminal instances but ensures each command runs in a clean state.
- **Terminal Output Line Limit** sets how many lines of output Cline will read from commands. The default of 500 lines works for most cases, but you might need to adjust it. For verbose build outputs, increase it. For commands with progress bars that spam thousands of lines, decrease it to around 100 to avoid consuming too many tokens.
</good_example_of_bullet_points>
## Write Like a Human, Not an AI
Keep it short and direct. If you can say something in fewer words, do it. Long explanations often confuse more than they help.
Use normal sentence lengths. Mix short and long sentences naturally, like you would when talking to someone. Avoid those meandering compound sentences that go on forever.
Cut the corporate speak. Instead of "utilize," say "use." Instead of "in order to," just say "to." Write like you're explaining something to a colleague, not drafting a press release.
Don't over-explain obvious things. If users are reading documentation, they probably understand basic concepts. Respect their intelligence.
## Never use em dashes or emojis
That's pretty much it. Never use them. Only AI writes with em dashes or emojis.
# Anthropomorphizing Cline
When referring to Cline, always call him a "him" not an "it".
Bad example:
- When Cline cant execute commands or read their output, you lose access to one of its most powerful capabilities.
Good Example:
- When Cline cant execute commands or read their output, you lose access to one of his most powerful capabilities.
# Using "I" when sharing your workflow
Adding a personal touch goes a long way. There are great examples in the docs currently where I use "I" to share how I personally use cline, from dev to dev. It's a great technique.
# Crosslinking relevant documentation pages
Make sure you crosslink when you're done writing the docs. If there are relevant docs, just link to them.
# Brevity is the soul of wit
Don't ramble if you don't need to. Use bullet points and numbered lists. Keep things easy to read.
<bad_example>
When Cline can't execute commands or read their output, you lose access to one of his most powerful capabilities. Terminal integration problems are frustrating, but they're usually fixable with a few simple changes.
## The Most Common Problem: Shell Integration Issues
If you're seeing "Shell integration unavailable" or Cline isn't getting command output, the issue is almost always your shell configuration. Complex shell setups with custom prompts, plugins, and fancy configurations can interfere with VSCode's terminal integration.
**Switch to bash first.** This fixes the problem 90% of the time. Navigate to Cline Settings → Terminal → Default Terminal Profile and select "bash" from the dropdown. Restart VSCode after making this change.
Still having issues? Try increasing the shell integration timeout. Go to Cline Settings → Terminal → Shell Integration Timeout and change it from 4 seconds to 10 seconds. Heavy shell configurations need more time to initialize properly.
If commands are running in the wrong directories or you're seeing weird behavior, disable aggressive terminal reuse. In Cline Settings → Terminal, uncheck "Enable aggressive terminal reuse." This creates more terminal instances but ensures each command runs in a clean environment.
</bad_exaxmple>
The first part is total filler, useless to any serious developer. You can tell it's written by a non technical person that doesn't value clean, straightforward information.
<good_example>
## Shell Integration Issues
If you're seeing "Shell integration unavailable" or Cline can't read command output, your shell configuration is interfering with VSCode's terminal integration.
**Switch to bash first.** Go to Cline Settings → Terminal → Default Terminal Profile and select "bash." This fixes 90% of problems.
Still broken? Try these:
- Increase shell integration timeout to 10 seconds in Cline Settings → Terminal
- Disable "aggressive terminal reuse" if commands run in wrong directories
- Restart VSCode after making changes
</good_example>
The good version cuts straight to the problem and solution. No hand-holding, no emotional language about frustration, just the facts: what's wrong, how to fix it, what to try next. Respects that developers want information, not sympathy.RetryClaude can make mistakes. Please double-check responses.
ALWAYS consider your audience. And your audience is devs who don't want their time wasted. Give them the info. I cannot stress this enough. Use bullet points and numbered lists. Prose is good, but every word should actually mean something to the dev reading it.
# Lastly, before you start writing docs
1. Internalize these guidelines. I mean it.
2. Read `docs/docs.json` and get an understanding of the structure of the docs. This will come in handly at the end when you're doing a final pass so you can cross link to docs where relevant.
3. Read some good examples that I personally wrote and am proud of:
- docs/features/slash-commands/workflows.mdx
- docs/features/slash-commands/new-task.mdx
- docs/features/at-mentions/overview.mdx
- docs/features/drag-and-drop.mdx
4. If the user specifies any other instructions make sure you follow them.
+116
View File
@@ -0,0 +1,116 @@
# Cline Development Environment Variables
# Copy this file to .env and fill in your actual values
# Values should be obtained from 1Password shared vault for development
# ============================================================================
# DEVELOPMENT FLAGS
# Recomend not changing these unless you know what you're doing they are set by the launch.json normally
# ============================================================================
# IS_DEV=true
# CLINE_ENVIRONMENT=local
# ============================================================================
# POSTHOG TELEMETRY (Existing)
# ============================================================================
# Get these values from 1Password shared vault
TELEMETRY_SERVICE_API_KEY=your-posthog-telemetry-api-key
ERROR_SERVICE_API_KEY=your-posthog-error-tracking-api-key
# ============================================================================
# TELEMETRY PROVIDER CONTROL
# ============================================================================
# Control which telemetry providers are active
POSTHOG_TELEMETRY_ENABLED=true # Enable PostHog telemetry (default: true)
# Set to false to disable Telemetry completely
# ============================================================================
# OPENTELEMETRY (Optional - for advanced telemetry)
# ============================================================================
# OpenTelemetry provides flexible telemetry collection with multiple export options
# Can run alongside PostHog or independently
# Primary focus: Logs (events), with optional metrics support
# Enable OpenTelemetry (set to 1 to enable)
# OTEL_TELEMETRY_ENABLED=1
# Exporters: "console" for local debugging, "otlp" for remote collector
# Logs are the primary signal (recommended)
# OTEL_LOGS_EXPORTER=console
# OTEL_METRICS_EXPORTER=otlp
# OTLP Protocol: "grpc", "http/json", or "http/protobuf"
# OTEL_EXPORTER_OTLP_PROTOCOL=grpc
# OTLP Endpoint (without /v1/logs or /v1/metrics path - auto-appended)
# For gRPC: use "localhost:4317" (no http:// prefix)
# For HTTP: use "http://localhost:4318"
# OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
# OTLP Headers (for authentication, e.g., bearer tokens)
# OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer your-token-here
# Use insecure gRPC connections (for local testing only, NOT for production)
# OTEL_EXPORTER_OTLP_INSECURE=true
# Metric export interval in milliseconds (default: 60000)
# OTEL_METRIC_EXPORT_INTERVAL=10000
# Batch configuration for logs (optional)
# OTEL_LOG_BATCH_SIZE=512 # Max logs per batch (default: 512)
# OTEL_LOG_BATCH_TIMEOUT=5000 # Max wait time in ms (default: 5000)
# OTEL_LOG_MAX_QUEUE_SIZE=2048 # Max queue size (default: 2048)
# Enable detailed export diagnostics (for debugging)
# TEL_DEBUG_DIAGNOSTICS=true
# Advanced: Separate endpoints for metrics and logs (optional)
# OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf
# OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://metrics.example.com:4318
# OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=grpc
# OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=logs.example.com:4317
# Example configurations:
#
# Console debugging (logs only):
# OTEL_TELEMETRY_ENABLED=1
# OTEL_LOGS_EXPORTER=console
# TEL_DEBUG_DIAGNOSTICS=true
#
# OTLP with gRPC (insecure, for local testing):
# OTEL_TELEMETRY_ENABLED=1
# OTEL_LOGS_EXPORTER=otlp
# OTEL_EXPORTER_OTLP_PROTOCOL=grpc
# OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
# OTEL_EXPORTER_OTLP_INSECURE=true
# OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer your-token
#
# OTLP with HTTP/JSON (production):
# OTEL_TELEMETRY_ENABLED=1
# OTEL_LOGS_EXPORTER=otlp
# OTEL_EXPORTER_OTLP_PROTOCOL=http/json
# OTEL_EXPORTER_OTLP_ENDPOINT=https://otel.example.com
# OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer your-token
# ============================================================================
# OPTIONAL DEVELOPMENT SETTINGS
# ============================================================================
# Uncomment and modify as needed for development
# Multi-root workspace debugging
# MULTI_ROOT_TRACE=true
# gRPC recorder for testing
# GRPC_RECORDER_ENABLED=true
# GRPC_RECORDER_FILE_NAME=test-recording
# Test mode
# E2E_TEST=true
# IS_TEST=true
# ============================================================================
# USAGE INSTRUCTIONS
# ============================================================================
# 1. Copy this file: cp .env.example .env
# 2. Get PostHog keys from 1Password shared vault
# 3. Update the values in .env
# 4. The .env file is gitignored for security
-25
View File
@@ -1,25 +0,0 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "import",
"format": ["camelCase", "PascalCase"]
}
],
"@typescript-eslint/semi": "off",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"react-hooks/exhaustive-deps": "off"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
+2
View File
@@ -1,2 +1,4 @@
demo.gif filter=lfs diff=lfs merge=lfs -text
assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
* text=auto eol=lf
+4 -1
View File
@@ -1 +1,4 @@
* @saoudrizwan @ocasta181 @NightTrek @pashpashpash @dcbartlett @saito-sv
/docs/
/.github/ @saoudrizwan @garoth @sjf
/README.md @saoudrizwan @nickbaumann98
/src/core/storage/ @celestial-vault
+67 -51
View File
@@ -1,54 +1,70 @@
name: 🐛 Bug Report
description: File a bug report
labels: ["bug"]
labels: ['bug']
body:
- type: markdown
attributes:
value: |
**Important:** All bug reports must be reproducible using Claude 3.5 Sonnet. Cline uses complex prompts so less capable models may not work as expected.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: How do you trigger this bug? Please walk us through it step by step.
value: |
1.
2.
3.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant API REQUEST output
description: Please copy and paste any relevant output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: input
id: operating-system
attributes:
label: Operating System
description: What operating system are you using?
placeholder: "e.g., Windows 11, macOS Sonoma, Ubuntu 22.04"
validations:
required: true
- type: input
id: cline-version
attributes:
label: Cline Version
description: What version of Cline are you using? (You can find this at the bottom of the Settings view)
placeholder: "e.g., 1.2.3"
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here, such as screenshots or related issues.
- type: markdown
attributes:
value: |
**Important:** All bug reports must be reproducible using Claude Sonnet 4.5. Cline uses complex prompts so less capable models may not work as expected.
- type: dropdown
id: plugin-type
attributes:
label: Plugin Type
description: Which plugin are you reporting a bug for?
options:
- VSCode Extension
- JetBrains Plugin
- CLI
default: 0
validations:
required: true
- type: input
id: cline-version
attributes:
label: Cline Version
description: What version of Cline are you using? (You can find this at the bottom of the Settings view)
placeholder: 'e.g., 1.2.3'
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: How do you trigger this bug? Please walk us through it step by step.
value: |
1.
2.
3.
validations:
required: false
- type: input
id: provider-model
attributes:
label: Provider/Model
description: What provider and model were you using when the issue occurred?
placeholder: 'e.g., cline:anthropic/claude-sonnet-4.5, gemini:gemini-2.5-pro-exp-03-25'
validations:
required: false
- type: textarea
id: system-info
attributes:
label: System Information
description: What operating system and hardware are you using?
placeholder: |
Operating System: Windows 11, macOS Sonoma, Ubuntu 22.04, etc.
Hardware: CPU, GPU, RAM specifications if relevant
e.g.,
OS: Windows 11
CPU: Intel Core i7-11700K
GPU: NVIDIA GeForce RTX 3070
RAM: 32GB DDR4
validations:
required: false
-3
View File
@@ -6,6 +6,3 @@ contact_links:
- name: 👋 Cline Discord
url: https://discord.gg/cline
about: Join our Discord community for discussions and support
- name: ❓ Other Questions?
url: https://x.com/sdrzn
about: Contact the developer on X @sdrzn for other inquiries
+50 -3
View File
@@ -1,10 +1,46 @@
<!--
Thank you for contributing to Cline!
⚠️ Important: Before submitting this PR, please ensure you have:
- For feature requests: Created a discussion in our Feature Requests discussions board https://github.com/cline/cline/discussions/categories/feature-requests and received approval from core maintainers before implementation
- For all changes: Link the associated issue/discussion in the "Related Issue" section below
Limited exceptions:
Small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality may be submitted directly without prior discussion.
Why this requirement?
We deeply appreciate all community contributions - they are essential to Cline's success! To ensure the best use of everyone's time and maintain project direction, we use our Feature Requests discussions board to gauge community interest and validate feature ideas before implementation begins. This helps us focus development efforts on features that will benefit the most users.
-->
### Related Issue
<!-- Replace XXXX with the issue number that this PR addresses -->
**Issue:** #XXXX
### Description
<!-- Describe your changes in detail. What problem does this PR solve? -->
<!--
Help reviewers understand your changes by making this PR readable and well-organized:
- What problem does this PR solve?
- Why were these changes introduced and what purpose do they serve?
- For larger changes, provide context about your approach and reasoning
Small PRs may need minimal description, but larger changes benefit from explaining where you're coming from. Much of this context can be in the linked issue above, so feel free to reference it rather than repeating everything here.
-->
### Test Procedure
<!-- How did you test this? Are you confident that it will not introduce bugs? If so, why? -->
<!--
Please walk us through your testing approach and thought process. This helps reviewers understand that you've thoroughly considered the impact of your changes:
- How did you test this change?
- What could potentially break and how did you verify it doesn't?
- What existing functionality might be affected and how did you check it still works?
- Why are you confident this is ready for merge?
We're not looking for exhaustive documentation - just evidence that you've thought through the implications of your changes and tested accordingly.
-->
### Type of Change
@@ -13,7 +49,10 @@
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] ♻️ Refactor Changes
- [ ] 💅 Cosmetic Changes
- [ ] 📚 Documentation update
- [ ] 🏃 Workflow Changes
### Pre-flight Checklist
@@ -26,7 +65,15 @@
### Screenshots
<!-- For UI changes, add screenshots here -->
<!--
Help reviewers quickly understand your changes:
- **UI Changes**: Please include screenshots showing before/after states
- **Complex Workflows**: Consider uploading a screen recording (video) if your changes involve multiple steps or state transitions
- **Backend Changes**: Not required, but feel free to include terminal output or other evidence that demonstrates functionality
This helps reviewers see what you've built without having to pull down and test your branch first.
-->
### Additional Notes
@@ -0,0 +1,19 @@
"""
Coverage utility package for GitHub Actions workflows.
This package handles extracting coverage percentages, comparing them, and generating PR comments.
"""
# Import external dependencies
import requests
# Import main function for CLI usage
from .__main__ import main
# Import functions from extraction module
from .extraction import extract_coverage, compare_coverage, run_coverage, set_verbose
# Import functions from github_api module
from .github_api import generate_comment, post_comment, set_github_output
# Import functions from workflow module
from .workflow import process_coverage_workflow
+154
View File
@@ -0,0 +1,154 @@
"""
Main module.
This module provides the CLI interface for the coverage utility script.
"""
import sys
import argparse
from .extraction import extract_coverage, compare_coverage, run_coverage, set_verbose
from .github_api import generate_comment, post_comment, set_github_output
from .workflow import process_coverage_workflow
from .util import log
def setup_verbose_mode(args):
"""
Set up verbose mode based on command line arguments.
Args:
args: Parsed command line arguments
"""
if getattr(args, 'verbose', False):
set_verbose(True)
log("Verbose mode enabled")
def main():
# Create parent parser with common arguments
parent_parser = argparse.ArgumentParser(add_help=False)
parent_parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose output')
# Create main parser that inherits common arguments
parser = argparse.ArgumentParser(description='Coverage utility script for GitHub Actions workflows', parents=[parent_parser])
subparsers = parser.add_subparsers(dest='command', help='Command to run')
# extract-coverage command - used directly in workflow
extract_parser = subparsers.add_parser('extract-coverage', help='Extract coverage percentage from a file', parents=[parent_parser])
extract_parser.add_argument('file_path', help='Path to the coverage report file')
extract_parser.add_argument('--type', choices=['extension', 'webview'], default='extension',
help='Type of coverage report')
extract_parser.add_argument('--github-output', action='store_true', help='Output in GitHub Actions format')
# compare-coverage command - used by process-workflow
compare_parser = subparsers.add_parser('compare-coverage', help='Compare coverage percentages', parents=[parent_parser])
compare_parser.add_argument('base_cov', help='Base branch coverage percentage')
compare_parser.add_argument('pr_cov', help='PR branch coverage percentage')
compare_parser.add_argument('--output-prefix', default='', help='Prefix for GitHub Actions output variables')
compare_parser.add_argument('--github-output', action='store_true', help='Output in GitHub Actions format')
# generate-comment command - used by process-workflow
comment_parser = subparsers.add_parser('generate-comment', help='Generate PR comment with coverage comparison', parents=[parent_parser])
comment_parser.add_argument('base_ext_cov', help='Base branch extension coverage')
comment_parser.add_argument('pr_ext_cov', help='PR branch extension coverage')
comment_parser.add_argument('ext_decreased', help='Whether extension coverage decreased (true/false)')
comment_parser.add_argument('ext_diff', help='Extension coverage difference')
comment_parser.add_argument('base_web_cov', help='Base branch webview coverage')
comment_parser.add_argument('pr_web_cov', help='PR branch webview coverage')
comment_parser.add_argument('web_decreased', help='Whether webview coverage decreased (true/false)')
comment_parser.add_argument('web_diff', help='Webview coverage difference')
# post-comment command - used by process-workflow
post_parser = subparsers.add_parser('post-comment', help='Post a comment to a GitHub PR', parents=[parent_parser])
post_parser.add_argument('comment_path', help='Path to the file containing the comment text')
post_parser.add_argument('pr_number', help='PR number')
post_parser.add_argument('repo', help='Repository in the format "owner/repo"')
post_parser.add_argument('--token', help='GitHub token')
# run-coverage command - used by process-workflow
run_parser = subparsers.add_parser('run-coverage', help='Run a coverage command and extract the coverage percentage', parents=[parent_parser])
run_parser.add_argument('coverage_cmd', help='Command to run')
run_parser.add_argument('output_file', help='File to save the output to')
run_parser.add_argument('--type', choices=['extension', 'webview'], default='extension',
help='Type of coverage report')
run_parser.add_argument('--github-output', action='store_true', help='Output in GitHub Actions format')
# process-workflow command - used directly in workflow
workflow_parser = subparsers.add_parser('process-workflow', help='Process the entire coverage workflow', parents=[parent_parser])
workflow_parser.add_argument('--base-branch', required=True, help='Base branch name')
workflow_parser.add_argument('--pr-number', help='PR number')
workflow_parser.add_argument('--repo', help='Repository in the format "owner/repo"')
workflow_parser.add_argument('--token', help='GitHub token')
# set-github-output command - used by process-workflow
output_parser = subparsers.add_parser('set-github-output', help='Set GitHub Actions output variable', parents=[parent_parser])
output_parser.add_argument('name', help='Output variable name')
output_parser.add_argument('value', help='Output variable value')
args = parser.parse_args()
# Set up verbose mode
setup_verbose_mode(args)
if args.command == 'extract-coverage':
log(f"Extracting coverage from file: {args.file_path} (type: {args.type})")
coverage_pct = extract_coverage(args.file_path, args.type)
if args.github_output:
set_github_output(f"{args.type}_coverage", coverage_pct)
else:
log(f"Coverage: {coverage_pct}%")
elif args.command == 'compare-coverage':
log(f"Comparing coverage: base={args.base_cov}%, PR={args.pr_cov}%")
decreased, diff = compare_coverage(args.base_cov, args.pr_cov)
if args.github_output:
prefix = args.output_prefix
set_github_output(f"{prefix}decreased", str(decreased).lower())
set_github_output(f"{prefix}diff", diff)
log(f"Coverage difference: {diff}%")
log(f"Coverage decreased: {decreased}")
else:
log(f"decreased={str(decreased).lower()}")
log(f"diff={diff}")
elif args.command == 'generate-comment':
log("Generating coverage comparison comment")
comment = generate_comment(
args.base_ext_cov, args.pr_ext_cov, args.ext_decreased, args.ext_diff,
args.base_web_cov, args.pr_web_cov, args.web_decreased, args.web_diff
)
# Output the comment to stdout
log(comment)
elif args.command == 'post-comment':
log(f"Posting comment from {args.comment_path} to PR #{args.pr_number} in {args.repo}")
post_comment(args.comment_path, args.pr_number, args.repo, args.token)
elif args.command == 'run-coverage':
log(f"Running coverage command: {args.coverage_cmd}")
log(f"Output file: {args.output_file}")
log(f"Coverage type: {args.type}")
coverage_pct = run_coverage(args.coverage_cmd, args.output_file, args.type)
if args.github_output:
set_github_output(f"{args.type}_coverage", coverage_pct)
else:
log(f"Coverage: {coverage_pct}%")
elif args.command == 'process-workflow':
log("Processing coverage workflow")
log(f"Base branch: {args.base_branch}")
if args.pr_number:
log(f"PR number: {args.pr_number}")
if args.repo:
log(f"Repository: {args.repo}")
process_coverage_workflow(args)
elif args.command == 'set-github-output':
log(f"Setting GitHub output: {args.name}={args.value}")
set_github_output(args.name, args.value)
else:
log("No command specified")
parser.print_help()
sys.exit(1)
if __name__ == "__main__":
main()
@@ -0,0 +1,265 @@
"""
Coverage extraction module.
This module handles extracting coverage percentages from coverage report files.
"""
import os
import re
import sys
import shlex
import subprocess
import traceback
from .util import log, file_exists, get_file_size, list_directory, is_safe_command, run_command
# Global verbose flag
verbose = False
def set_verbose(value):
"""Set the global verbose flag."""
global verbose
verbose = value
def print_debug_output(content, coverage_type):
"""
Print debug information about the coverage output.
Args:
content: The content of the coverage file
coverage_type: Type of coverage report (extension or webview)
"""
if not verbose:
return
# Extract and print only the coverage summary section
if coverage_type == "extension":
# Look for the coverage summary section
summary_match = re.search(r'=============================== Coverage summary ===============================\n(.*?)\n=+', content, re.DOTALL)
if summary_match:
sys.stdout.write("\n##[group]EXTENSION COVERAGE SUMMARY\n")
sys.stdout.write("=============================== Coverage summary ===============================\n")
sys.stdout.write(summary_match.group(1) + "\n")
sys.stdout.write("================================================================================\n")
sys.stdout.write("##[endgroup]\n")
sys.stdout.flush()
else:
sys.stdout.write("\n##[warning]No coverage summary found in extension coverage file\n")
sys.stdout.flush()
else: # webview
# Look for the coverage table - specifically the "All files" row
table_match = re.search(r'% Coverage report from v8.*?-+\|.*?\n.*?\n(All files.*?)(?:\n[^\n]*\|)', content, re.DOTALL)
if table_match:
sys.stdout.write("\n##[group]WEBVIEW COVERAGE SUMMARY\n")
sys.stdout.write("% Coverage report from v8\n")
sys.stdout.write("-------------------|---------|----------|---------|---------|-------------------\n")
sys.stdout.write("File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n")
sys.stdout.write("-------------------|---------|----------|---------|---------|-------------------\n")
sys.stdout.write(table_match.group(1) + "\n")
sys.stdout.write("-------------------|---------|----------|---------|---------|-------------------\n")
sys.stdout.write("##[endgroup]\n")
sys.stdout.flush()
else:
sys.stdout.write("\n##[warning]No coverage table found in webview coverage file\n")
sys.stdout.flush()
def extract_coverage(file_path, coverage_type="extension"):
"""
Extract coverage percentage from a coverage report file.
Args:
file_path: Path to the coverage report file
coverage_type: Type of coverage report (extension or webview)
Returns:
Coverage percentage as a float
"""
# Always print file path for debugging
log(f"Checking coverage file: {file_path}")
# Check if file exists and get its size
if not file_exists(file_path):
sys.stdout.write(f"\n##[error]File {file_path} does not exist\n")
sys.stdout.flush()
log(f"Error: File {file_path} does not exist")
# Check if the directory exists
dir_path = os.path.dirname(file_path)
if not os.path.exists(dir_path):
sys.stdout.write(f"\n##[error]Directory {dir_path} does not exist\n")
sys.stdout.flush()
log(f"Error: Directory {dir_path} does not exist")
else:
# List directory contents for debugging
log(f"Directory {dir_path} exists, listing contents:")
try:
dir_contents = list_directory(dir_path)
for name, size in dir_contents:
log(f" {name} - {size}")
sys.stdout.write(f" {name} - {size}\n")
sys.stdout.flush()
except Exception as e:
log(f"Error listing directory: {e}")
return 0.0
file_size = get_file_size(file_path)
log(f"File size: {file_size} bytes")
sys.stdout.write(f"\n##[info]Coverage file {file_path} exists, size: {file_size} bytes\n")
sys.stdout.flush()
if file_size == 0:
sys.stdout.write(f"\n##[warning]File {file_path} is empty\n")
sys.stdout.flush()
log(f"Warning: File {file_path} is empty")
return 0.0
# List directory contents for debugging
dir_path = os.path.dirname(file_path)
log(f"Directory contents of {dir_path}:")
try:
dir_contents = list_directory(dir_path)
for name, size in dir_contents:
log(f" {name} - {size}")
except Exception as e:
log(f"Error listing directory: {e}")
with open(file_path, 'r') as f:
content = f.read()
# Print debug information if verbose
print_debug_output(content, coverage_type)
# Extract coverage percentage based on coverage type
if coverage_type == "extension":
# Extract the percentage from the "Lines" row in the coverage summary
# Pattern: Lines : xx.xx% ( xxxxxxx/xxxxxxx )
lines_match = re.search(r'Lines\s*:\s*(\d+\.\d+)%', content)
if lines_match:
coverage_pct = float(lines_match.group(1))
if verbose:
sys.stdout.write(f"Pattern matched (Lines percentage): {coverage_pct}\n")
sys.stdout.flush()
return coverage_pct
else:
# No coverage data found, log full content for debugging
log("No coverage data found. Full file content:")
log("=== Full file content ===")
log(content)
log("=== End file content ===")
else: # webview
# Extract the percentage from the "% Lines" column in the "All files" row
# Pattern: All files | xx.xx | xx.xx | xx.xx | xx.xx |
all_files_match = re.search(r'All files\s+\|\s+\d+\.\d+\s+\|\s+\d+\.\d+\s+\|\s+\d+\.\d+\s+\|\s+(\d+\.\d+)', content)
if all_files_match:
coverage_pct = float(all_files_match.group(1))
if verbose:
sys.stdout.write(f"Pattern matched (All files % Lines): {coverage_pct}\n")
sys.stdout.flush()
return coverage_pct
else:
# No coverage data found, log full content for debugging
log("No coverage data found. Full file content:")
log("=== Full file content ===")
log(content)
log("=== End file content ===")
# If no match found, return 0.0
return 0.0
def compare_coverage(base_cov, pr_cov):
"""
Compare coverage percentages between base and PR branches.
Args:
base_cov: Base branch coverage percentage
pr_cov: PR branch coverage percentage
Returns:
Tuple of (decreased, diff)
"""
try:
base_cov = float(base_cov)
pr_cov = float(pr_cov)
except ValueError:
sys.stdout.write(f"Error: Invalid coverage values - base: {base_cov}, PR: {pr_cov}\n")
sys.stdout.flush()
return False, 0
diff = pr_cov - base_cov
decreased = diff < 0
return decreased, abs(diff)
def run_coverage(command, output_file, coverage_type="extension"):
"""
Run a coverage command and extract the coverage percentage.
Args:
command: Command to run
output_file: File to save the output to
coverage_type: Type of coverage report (extension or webview)
Returns:
Coverage percentage as a float
Raises:
SystemExit: If the output file is not created or is empty
"""
try:
# Run the command and capture output
if not is_safe_command(command):
error_msg = f"ERROR: Unsafe command detected: {command}"
log(error_msg)
sys.stdout.write(f"\n##[error]{error_msg}\n")
sys.stdout.flush()
sys.exit(1)
# Run command using safe execution from util
returncode, stdout, stderr = run_command(command)
# Log command result
log(f"Command exit code: {returncode}")
log(f"Command stdout length: {len(stdout)} bytes")
log(f"Command stderr length: {len(stderr)} bytes")
# Save output to file
log(f"Saving command output to {output_file}")
with open(output_file, 'w') as f:
f.write(stdout)
if stderr:
f.write("\n\n=== STDERR ===\n")
f.write(stderr)
# Verify file was created and has content
if not file_exists(output_file):
error_msg = f"ERROR: Output file {output_file} was not created"
log(error_msg)
sys.stdout.write(f"\n##[error]{error_msg}\n")
sys.stdout.flush()
sys.exit(1) # Exit with error code to fail the workflow
file_size = get_file_size(output_file)
if file_size == 0:
error_msg = f"ERROR: Output file {output_file} is empty"
log(error_msg)
sys.stdout.write(f"\n##[error]{error_msg}\n")
sys.stdout.flush()
sys.exit(1) # Exit with error code to fail the workflow
log(f"Output file size: {file_size} bytes")
# Extract coverage percentage
coverage_pct = extract_coverage(output_file, coverage_type)
log(f"{coverage_type.capitalize()} coverage: {coverage_pct}%")
return coverage_pct
except Exception as e:
error_msg = f"Error running coverage command: {e}"
log(error_msg)
sys.stdout.write(f"\n##[error]{error_msg}\n")
sys.stdout.flush()
# Print stack trace for debugging
log(traceback.format_exc())
sys.exit(1) # Exit with error code to fail the workflow
@@ -0,0 +1,177 @@
"""
GitHub API module.
This module handles interactions with the GitHub API for posting comments to PRs.
"""
import os
import requests
from .util import log, file_exists
def generate_comment(base_ext_cov, pr_ext_cov, ext_decreased, ext_diff,
base_web_cov, pr_web_cov, web_decreased, web_diff):
"""
Generate a PR comment with coverage comparison.
Args:
base_ext_cov: Base branch extension coverage
pr_ext_cov: PR branch extension coverage
ext_decreased: Whether extension coverage decreased
ext_diff: Extension coverage difference
base_web_cov: Base branch webview coverage
pr_web_cov: PR branch webview coverage
web_decreased: Whether webview coverage decreased
web_diff: Webview coverage difference
Returns:
Comment text
"""
from datetime import datetime
# Convert string inputs to appropriate types
try:
base_ext_cov = float(base_ext_cov)
pr_ext_cov = float(pr_ext_cov)
# Handle ext_decreased as either string or boolean
if isinstance(ext_decreased, str):
ext_decreased = ext_decreased.lower() == 'true'
else:
ext_decreased = bool(ext_decreased)
ext_diff = float(ext_diff)
base_web_cov = float(base_web_cov)
pr_web_cov = float(pr_web_cov)
# Handle web_decreased as either string or boolean
if isinstance(web_decreased, str):
web_decreased = web_decreased.lower() == 'true'
else:
web_decreased = bool(web_decreased)
web_diff = float(web_diff)
except ValueError as e:
log(f"Error converting input values: {e}")
return ""
# Add a unique identifier to find this comment later
comment = '<!-- COVERAGE_REPORT -->\n'
comment += '## Coverage Report\n\n'
# Extension coverage
comment += '### Extension Coverage\n\n'
comment += f'Base branch: {base_ext_cov:.0f}%\n\n'
comment += f'PR branch: {pr_ext_cov:.0f}%\n\n'
if ext_decreased:
comment += f'⚠️ **Warning: Coverage decreased by {ext_diff:.2f}%**\n\n'
comment += 'Consider adding tests to cover your changes.\n\n'
else:
comment += '✅ Coverage increased or remained the same\n\n'
# Webview coverage
comment += '### Webview Coverage\n\n'
comment += f'Base branch: {base_web_cov:.0f}%\n\n'
comment += f'PR branch: {pr_web_cov:.0f}%\n\n'
if web_decreased:
comment += f'⚠️ **Warning: Coverage decreased by {web_diff:.2f}%**\n\n'
comment += 'Consider adding tests to cover your changes.\n\n'
else:
comment += '✅ Coverage increased or remained the same\n\n'
# Overall assessment
comment += '### Overall Assessment\n\n'
if ext_decreased or web_decreased:
comment += '⚠️ **Test coverage has decreased in this PR**\n\n'
comment += 'Please consider adding tests to maintain or improve coverage.\n\n'
else:
comment += '✅ **Test coverage has been maintained or improved**\n\n'
# Add timestamp
comment += f'\n\n<sub>Last updated: {datetime.now().isoformat()}</sub>'
return comment
def post_comment(comment_path, pr_number, repo, token=None):
"""
Post a comment to a GitHub PR.
Args:
comment_path: Path to the file containing the comment text
pr_number: PR number
repo: Repository in the format "owner/repo"
token: GitHub token
"""
if not file_exists(comment_path):
log(f"Error: Comment file {comment_path} does not exist")
return
with open(comment_path, 'r') as f:
comment_body = f.read()
if not token:
token = os.environ.get('GITHUB_TOKEN')
if not token:
log("Error: GitHub token not provided")
return
# Find existing comment
headers = {
'Authorization': f'token {token}',
'Accept': 'application/vnd.github.v3+json'
}
# Get all comments
comments_url = f'https://api.github.com/repos/{repo}/issues/{pr_number}/comments'
log(f"Getting comments from: {comments_url}")
response = requests.get(comments_url, headers=headers)
if response.status_code != 200:
log(f"Error getting comments: {response.status_code} - {response.text}")
return
comments = response.json()
log(f"Found {len(comments)} existing comments")
# Find comment with our identifier
comment_id = None
for comment in comments:
if '<!-- COVERAGE_REPORT -->' in comment['body']:
comment_id = comment['id']
log(f"Found existing coverage report comment with ID: {comment_id}")
break
if comment_id:
# Update existing comment
update_url = f'https://api.github.com/repos/{repo}/issues/comments/{comment_id}'
log(f"Updating existing comment at: {update_url}")
response = requests.patch(update_url, headers=headers, json={'body': comment_body})
if response.status_code == 200:
log(f"Successfully updated existing comment: {comment_id}")
else:
log(f"Error updating comment: {response.status_code} - {response.text}")
else:
# Create new comment
log(f"Creating new comment at: {comments_url}")
response = requests.post(comments_url, headers=headers, json={'body': comment_body})
if response.status_code == 201:
log("Successfully created new comment")
else:
log(f"Error creating comment: {response.status_code} - {response.text}")
def set_github_output(name, value):
"""
Set GitHub Actions output variable.
Args:
name: Output variable name
value: Output variable value
"""
# Write to the GitHub output file if available
if 'GITHUB_OUTPUT' in os.environ:
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f"{name}={value}\n")
else:
# Fallback to the deprecated method for backward compatibility
log(f"::set-output name={name}::{value}")
# Also print for human readability
log(f"{name}: {value}")
+245
View File
@@ -0,0 +1,245 @@
"""
Utility module.
This module provides utility functions used across the coverage check scripts.
"""
import os
import sys
import re
import shlex
import subprocess
import traceback
from typing import List, Tuple, Dict, Any, Optional, Union
# List of allowed commands and their arguments
ALLOWED_COMMANDS = {
'xvfb-run': ['-a'],
'npm': ['run', 'test:coverage', 'ci', 'install', '--no-save', '@vitest/coverage-v8', 'check-types', 'lint', 'format', 'compile'],
'cd': ['webview-ui'],
'python': ['-m', 'coverage_check'],
'git': ['fetch', 'checkout', 'origin'],
}
def is_safe_command(command: Union[str, List[str]]) -> bool:
"""
Check if a command is safe to execute.
Args:
command: Command to check (string or list)
Returns:
True if command is safe, False otherwise
"""
# Convert string command to list
if isinstance(command, str):
try:
cmd_parts = shlex.split(command)
except ValueError:
return False
else:
cmd_parts = command
if not cmd_parts:
return False
# Get base command
base_cmd = os.path.basename(cmd_parts[0])
# Check if command is in allowed list
if base_cmd not in ALLOWED_COMMANDS:
return False
# For each argument, check for suspicious patterns
for arg in cmd_parts[1:]:
# Check for shell metacharacters
if re.search(r'[;&|`$]', arg):
return False
# Check for path traversal
if '..' in arg and not (base_cmd == 'npm' and arg.startswith('@')):
return False
return True
def log(message: str) -> None:
"""
Write a message to stdout and flush.
Args:
message: The message to write
"""
sys.stdout.write(f"{message}\n")
sys.stdout.flush()
def file_exists(file_path: str) -> bool:
"""
Check if a file exists.
Args:
file_path: Path to the file
Returns:
True if the file exists, False otherwise
"""
return os.path.exists(file_path) and os.path.isfile(file_path)
def get_file_size(file_path: str) -> int:
"""
Get the size of a file in bytes.
Args:
file_path: Path to the file
Returns:
Size of the file in bytes, or 0 if the file doesn't exist
"""
if file_exists(file_path):
return os.path.getsize(file_path)
return 0
def list_directory(dir_path: str) -> List[Tuple[str, Union[int, str]]]:
"""
List the contents of a directory.
Args:
dir_path: Path to the directory
Returns:
List of (name, size) tuples for each file/directory in the directory
"""
if not os.path.exists(dir_path) or not os.path.isdir(dir_path):
return []
contents = []
for item in os.listdir(dir_path):
item_path = os.path.join(dir_path, item)
if os.path.isfile(item_path):
contents.append((item, os.path.getsize(item_path)))
else:
contents.append((item, "DIR"))
return contents
def read_file_content(file_path: str, default: str = "") -> str:
"""
Read file content with error handling.
Args:
file_path: Path to the file
default: Default value to return if file cannot be read
Returns:
File content or default value
"""
if not file_exists(file_path):
log(f"File does not exist: {file_path}")
return default
try:
with open(file_path, 'r') as f:
return f.read()
except Exception as e:
log(f"Error reading file {file_path}: {e}")
return default
def write_file_content(file_path: str, content: str) -> bool:
"""
Write content to file with error handling.
Args:
file_path: Path to the file
content: Content to write
Returns:
True if successful, False otherwise
"""
try:
# Create directory if it doesn't exist
os.makedirs(os.path.dirname(file_path), exist_ok=True)
with open(file_path, 'w') as f:
f.write(content)
return True
except Exception as e:
log(f"Error writing to file {file_path}: {e}")
return False
def run_command(command: Union[str, List[str]], capture_output: bool = True) -> Tuple[int, str, str]:
"""
Run a command and return the result.
Args:
command: Command to run (string or list)
capture_output: Whether to capture stdout/stderr
Returns:
Tuple of (returncode, stdout, stderr)
"""
if not is_safe_command(command):
error_msg = f"Unsafe command detected: {command}"
log(error_msg)
return 1, "", error_msg
log(f"Running command: {command}")
try:
# Convert string command to list
if isinstance(command, str):
cmd_list = shlex.split(command)
else:
cmd_list = command
result = subprocess.run(
cmd_list,
shell=False, # Never use shell=True for security
capture_output=capture_output,
text=True
)
log(f"Command exit code: {result.returncode}")
return result.returncode, result.stdout, result.stderr
except Exception as e:
log(f"Error running command: {e}")
log(traceback.format_exc())
return 1, "", str(e)
def find_pattern(content: str, pattern: str, group: int = 0,
default: Optional[str] = None) -> Optional[str]:
"""
Find a pattern in content and return the specified group.
Args:
content: Text content to search
pattern: Regex pattern to search for
group: Group number to return (default: 0 for entire match)
default: Default value to return if pattern not found
Returns:
Matched text or default value
"""
match = re.search(pattern, content, re.DOTALL)
if match:
return match.group(group)
return default
def get_env_var(name: str, default: Optional[str] = None) -> Optional[str]:
"""
Get environment variable with default value.
Args:
name: Environment variable name
default: Default value if not set
Returns:
Environment variable value or default
"""
return os.environ.get(name, default)
def format_exception(e: Exception) -> str:
"""
Format an exception with traceback for logging.
Args:
e: Exception to format
Returns:
Formatted exception string
"""
return f"{type(e).__name__}: {str(e)}\n{traceback.format_exc()}"
+432
View File
@@ -0,0 +1,432 @@
"""
Workflow module.
This module handles the main workflow logic for running coverage tests and processing results.
"""
import os
import re
import sys
import subprocess
import traceback
from .extraction import run_coverage, compare_coverage, extract_coverage
from .github_api import generate_comment, post_comment, set_github_output
from .util import log, file_exists, get_file_size, list_directory, run_command
def is_valid_branch_name(branch_name: str) -> bool:
"""
Validate a git branch name.
Args:
branch_name: Branch name to validate
Returns:
True if valid, False otherwise
"""
# Check for common branch name patterns
if not re.match(r'^[a-zA-Z0-9_\-./]+$', branch_name):
return False
# Check for path traversal
if '..' in branch_name:
return False
# Check for shell metacharacters
if re.search(r'[;&|`$]', branch_name):
return False
return True
def checkout_branch(branch_name: str) -> None:
"""
Checkout a branch for testing.
Args:
branch_name: Branch name to checkout
Raises:
RuntimeError: If branch checkout fails
ValueError: If branch name is invalid
"""
if not is_valid_branch_name(branch_name):
raise ValueError(f"Invalid branch name: {branch_name}")
log(f"=== Checking out branch: {branch_name} ===")
# Fetch the branch
returncode, stdout, stderr = run_command(['git', 'fetch', 'origin', branch_name])
if returncode != 0:
log(f"ERROR: Failed to fetch branch {branch_name}")
log(f"Error details: {stderr}")
raise RuntimeError(f"Git fetch failed: {stderr}")
# Checkout the branch
returncode, stdout, stderr = run_command(['git', 'checkout', branch_name])
if returncode != 0:
log(f"ERROR: Failed to checkout branch {branch_name}")
log(f"Error details: {stderr}")
raise RuntimeError(f"Git checkout failed: {stderr}")
log(f"Successfully checked out branch: {branch_name}")
def extract_extension_coverage_from_file(file_path):
"""Extract extension coverage from file when run_coverage returns 0."""
if not file_exists(file_path):
log(f"File {file_path} does not exist, cannot extract extension coverage")
return 0.0
file_size = get_file_size(file_path)
if file_size == 0:
log(f"File {file_path} is empty, cannot extract extension coverage")
return 0.0
log(f"Extension coverage is 0.0, trying to read from file directly: {file_path} (size: {file_size} bytes)")
with open(file_path, 'r') as f:
content = f.read()
# Extract the percentage from the "Lines" row in the coverage summary
# Pattern: Lines : xx.xx% ( xxxxxxx/xxxxxxx )
lines_match = re.search(r'Lines\s*:\s*(\d+\.\d+)%', content)
if lines_match:
coverage = float(lines_match.group(1))
log(f"Found extension coverage in file: {coverage}%")
return coverage
return 0.0
def extract_webview_coverage_from_file(file_path):
"""Extract webview coverage from file when run_coverage returns 0."""
if not file_exists(file_path):
log(f"File {file_path} does not exist, cannot extract webview coverage")
return 0.0
file_size = get_file_size(file_path)
if file_size == 0:
log(f"File {file_path} is empty, cannot extract webview coverage")
return 0.0
log(f"Webview coverage is 0.0, trying to read from file directly: {file_path} (size: {file_size} bytes)")
with open(file_path, 'r') as f:
content = f.read()
# Extract the percentage from the "% Lines" column in the "All files" row
# Pattern: All files | xx.xx | xx.xx | xx.xx | xx.xx |
all_files_match = re.search(r'All files\s+\|\s+\d+\.\d+\s+\|\s+\d+\.\d+\s+\|\s+\d+\.\d+\s+\|\s+(\d+\.\d+)', content)
if all_files_match:
coverage = float(all_files_match.group(1))
log(f"Found webview coverage in file: {coverage}%")
return coverage
return 0.0
def run_extension_coverage(branch_name=None):
"""Run extension coverage tests and extract results."""
prefix = 'base_' if branch_name else ''
file_path = f"{prefix}extension_coverage.txt"
# Run coverage tests
ext_cov = run_coverage(
["xvfb-run", "-a", "npm", "run", "test:coverage"],
file_path,
"extension"
)
# If coverage is 0.0, try to extract from file directly
if ext_cov == 0.0:
ext_cov = extract_extension_coverage_from_file(file_path)
return ext_cov
def run_webview_coverage(branch_name=None):
"""Run webview coverage tests and extract results."""
prefix = 'base_' if branch_name else ''
file_path = f"{prefix}webview_coverage.txt"
# Save current directory
original_dir = os.getcwd()
try:
# Change to webview-ui directory
os.chdir('webview-ui')
# Install coverage dependency
returncode, stdout, stderr = run_command(["npm", "install", "--no-save", "@vitest/coverage-v8"])
if returncode != 0:
log(f"Failed to install coverage dependency: {stderr}")
return 0.0
# Run coverage tests from webview-ui directory
web_cov = run_coverage(
["npm", "run", "test:coverage"],
os.path.join('..', file_path),
"webview"
)
finally:
# Always change back to original directory
os.chdir(original_dir)
# If coverage is 0.0, try to extract from file directly
if web_cov == 0.0:
web_cov = extract_webview_coverage_from_file(file_path)
return web_cov
def run_branch_coverage(branch_name=None):
"""
Run coverage tests for a branch.
Args:
branch_name: Name of the branch to checkout before running tests (optional)
Returns:
Tuple of (extension_coverage, webview_coverage)
"""
# Checkout branch if specified
if branch_name:
checkout_branch(branch_name)
# Run coverage tests
log(f"=== Running coverage tests{' for ' + branch_name if branch_name else ''} ===")
# Run extension and webview coverage
ext_cov = run_extension_coverage(branch_name)
web_cov = run_webview_coverage(branch_name)
return ext_cov, web_cov
def find_potential_coverage_files():
"""Find potential coverage files in the current directory and webview-ui."""
log("Searching for potential coverage files...")
# Find files in current directory
current_dir_files = list_directory('.')
for name, size in current_dir_files:
if 'coverage' in name.lower() and size != "DIR":
log(f"Found potential coverage file: {name} (size: {size} bytes)")
# Find files in webview-ui directory
if os.path.exists('webview-ui') and os.path.isdir('webview-ui'):
webview_files = list_directory('webview-ui')
for name, size in webview_files:
if 'coverage' in name.lower() and size != "DIR":
log(f"Found potential webview coverage file: webview-ui/{name} (size: {size} bytes)")
else:
log("webview-ui directory not found")
def generate_warnings(base_ext_cov, pr_ext_cov, ext_decreased, ext_diff,
base_web_cov, pr_web_cov, web_decreased, web_diff):
"""Generate warnings for coverage decreases."""
if not (ext_decreased or web_decreased):
return []
warnings = [
"Test coverage has decreased in this PR",
f"Extension coverage: {base_ext_cov}% -> {pr_ext_cov}% (Diff: {ext_diff}%)",
f"Webview coverage: {base_web_cov}% -> {pr_web_cov}% (Diff: {web_diff}%)"
]
# Additional warning for significant decrease (more than 1%)
if ext_decreased and ext_diff > 1.0:
warnings.append(f"Extension coverage decreased by more than 1% ({ext_diff}%). Consider adding tests to cover your changes.")
if web_decreased and web_diff > 1.0:
warnings.append(f"Webview coverage decreased by more than 1% ({web_diff}%). Consider adding tests to cover your changes.")
return warnings
def output_warnings(warnings):
"""Output warnings to GitHub step summary and console."""
if not warnings:
return
# Get the GitHub step summary file path from environment variable
github_step_summary = os.environ.get('GITHUB_STEP_SUMMARY')
# Write to GitHub step summary if available
if github_step_summary:
with open(github_step_summary, 'a') as f:
f.write("## Coverage Warnings\n\n")
for warning in warnings:
f.write(f"⚠️ {warning}\n\n")
# Also output to console with ::warning:: syntax for backward compatibility
for warning in warnings:
log(f"::warning::{warning}")
def output_github_results(pr_ext_cov, pr_web_cov, base_ext_cov, base_web_cov,
ext_decreased, ext_diff, web_decreased, web_diff):
"""Output results for GitHub Actions."""
set_github_output("pr_extension_coverage", pr_ext_cov)
set_github_output("pr_webview_coverage", pr_web_cov)
set_github_output("base_extension_coverage", base_ext_cov)
set_github_output("base_webview_coverage", base_web_cov)
set_github_output("extension_decreased", str(ext_decreased).lower())
set_github_output("extension_diff", ext_diff)
set_github_output("webview_decreased", str(web_decreased).lower())
set_github_output("webview_diff", web_diff)
def extract_pr_coverage_from_artifacts():
"""
Extract PR branch coverage from artifact files.
Returns:
Tuple of (extension_coverage, webview_coverage)
Raises:
SystemExit: If the coverage files don't exist
"""
log("=== Extracting PR branch coverage from artifacts ===")
# Check if the coverage files exist
ext_file_path = "extension_coverage.txt"
web_file_path = "webview-ui/webview_coverage.txt"
# Extract extension coverage
log(f"Extracting extension coverage from {ext_file_path}")
if not file_exists(ext_file_path):
error_msg = f"ERROR: PR extension coverage file {ext_file_path} not found"
log(error_msg)
# List directory contents for debugging
log("Current directory contents:")
try:
dir_contents = list_directory('.')
for name, size in dir_contents:
log(f" {name} - {size}\n")
except Exception as e:
log(f"Error listing directory: {e}")
sys.exit(1) # Exit with error code to fail the workflow
ext_cov = extract_extension_coverage_from_file(ext_file_path)
log(f"PR extension coverage from artifact: {ext_cov}%")
# Extract webview coverage
log(f"Extracting webview coverage from {web_file_path}")
if not file_exists(web_file_path):
error_msg = f"ERROR: PR webview coverage file {web_file_path} not found"
log(error_msg)
# Check if the webview-ui directory exists
if not os.path.exists('webview-ui'):
log("ERROR: webview-ui directory not found")
else:
# List webview-ui directory contents for debugging
log("webview-ui directory contents:")
try:
dir_contents = list_directory('webview-ui')
for name, size in dir_contents:
log(f" {name} - {size}")
except Exception as e:
log(f"Error listing directory: {e}")
sys.exit(1) # Exit with error code to fail the workflow
web_cov = extract_webview_coverage_from_file(web_file_path)
log(f"PR webview coverage from artifact: {web_cov}%")
return ext_cov, web_cov
def process_coverage_workflow(args):
"""
Process the entire coverage workflow.
Args:
args: Command line arguments
"""
# Initialize all variables at the start
pr_ext_cov = 0.0
pr_web_cov = 0.0
base_ext_cov = 0.0
base_web_cov = 0.0
ext_decreased = False
ext_diff = 0.0
web_decreased = False
web_diff = 0.0
try:
# Validate branch name
if not is_valid_branch_name(args.base_branch):
raise ValueError(f"Invalid base branch name: {args.base_branch}")
# Check if we're running in GitHub Actions
is_github_actions = 'GITHUB_ACTIONS' in os.environ
if is_github_actions:
log("Running in GitHub Actions environment")
# Extract PR branch coverage from artifacts (from test job)
pr_ext_cov, pr_web_cov = extract_pr_coverage_from_artifacts()
# Verify PR coverage values
if pr_ext_cov == 0.0:
log("WARNING: PR extension coverage is 0.0, this may indicate an issue with the coverage report")
find_potential_coverage_files()
if pr_web_cov == 0.0:
log("WARNING: PR webview coverage is 0.0, this may indicate an issue with the coverage report")
find_potential_coverage_files()
# Run base branch coverage
log(f"=== Running base branch coverage for {args.base_branch} ===")
base_ext_cov, base_web_cov = run_branch_coverage(args.base_branch)
# Verify base coverage values
if base_ext_cov == 0.0:
log("WARNING: Base extension coverage is 0.0, this may indicate an issue with the coverage report")
if base_web_cov == 0.0:
log("WARNING: Base webview coverage is 0.0, this may indicate an issue with the coverage report")
# Compare coverage
log("=== Comparing extension coverage ===")
ext_decreased, ext_diff = compare_coverage(base_ext_cov, pr_ext_cov)
log("=== Comparing webview coverage ===")
web_decreased, web_diff = compare_coverage(base_web_cov, pr_web_cov)
# Print summary of coverage values
log("\n=== Coverage Summary ===")
log(f"PR extension coverage: {pr_ext_cov}%")
log(f"Base extension coverage: {base_ext_cov}%")
log(f"Extension coverage change: {'+' if not ext_decreased else '-'}{ext_diff}%")
log(f"PR webview coverage: {pr_web_cov}%")
log(f"Base webview coverage: {base_web_cov}%")
log(f"Webview coverage change: {'+' if not web_decreased else '-'}{web_diff}%")
# Generate and output warnings
warnings = generate_warnings(
base_ext_cov, pr_ext_cov, ext_decreased, ext_diff,
base_web_cov, pr_web_cov, web_decreased, web_diff
)
output_warnings(warnings)
# Generate comment
log("=== Generating comment ===")
comment = generate_comment(
base_ext_cov, pr_ext_cov, str(ext_decreased).lower(), ext_diff,
base_web_cov, pr_web_cov, str(web_decreased).lower(), web_diff
)
# Save comment to file
with open("coverage_comment.md", "w") as f:
f.write(comment)
# Post comment if PR number is provided
if args.pr_number:
log(f"=== Posting comment to PR #{args.pr_number} ===")
post_comment("coverage_comment.md", args.pr_number, args.repo, args.token)
# Output results for GitHub Actions
output_github_results(
pr_ext_cov, pr_web_cov, base_ext_cov, base_web_cov,
ext_decreased, ext_diff, web_decreased, web_diff
)
except Exception as e:
log(f"ERROR in process_coverage_workflow: {e}")
traceback.print_exc()
# Try to output results even if there was an error
try:
output_github_results(
pr_ext_cov, pr_web_cov, base_ext_cov, base_web_cov,
ext_decreased, ext_diff, web_decreased, web_diff
)
except Exception as e2:
log(f"ERROR outputting GitHub results: {e2}")
@@ -22,7 +22,6 @@ Environment Variables:
#!/usr/bin/env python3
import os
import sys
CHANGELOG_PATH = os.environ.get("CHANGELOG_PATH", "CHANGELOG.md")
VERSION = os.environ['VERSION']
@@ -32,72 +31,49 @@ NEW_CONTENT = os.environ.get("NEW_CONTENT", "")
def overwrite_changelog_section(changelog_text: str, new_content: str):
# Find the section for the specified version
version_pattern = f"## {VERSION}\n"
bracketed_version_pattern = f"## [{VERSION}]\n"
unformmatted_prev_version_pattern = f"## {PREV_VERSION}\n"
prev_version_pattern = f"## [{PREV_VERSION}]\n"
print(f"latest version: {VERSION}")
print(f"prev_version: {PREV_VERSION}")
# Try both unbracketed and bracketed version patterns
version_index = changelog_text.find(version_pattern)
if version_index == -1:
version_index = changelog_text.find(bracketed_version_pattern)
if version_index == -1:
# If version not found, add it at the top (after the first line)
first_newline = changelog_text.find('\n')
if first_newline == -1:
# If no newline found, just prepend
return f"## [{VERSION}]\n\n{changelog_text}"
return f"{changelog_text[:first_newline + 1]}## [{VERSION}]\n\n{changelog_text[first_newline + 1:]}"
else:
# Using bracketed version
version_pattern = bracketed_version_pattern
notes_start_index = version_index + len(version_pattern)
notes_end_index = changelog_text.find(prev_version_pattern, notes_start_index) if PREV_VERSION and prev_version_pattern in changelog_text else len(changelog_text)
notes_start_index = changelog_text.find(version_pattern) + len(version_pattern)
notes_end_index = changelog_text.find(prev_version_pattern, notes_start_index) if PREV_VERSION and (prev_version_pattern in changelog_text or unformmatted_prev_version_pattern in changelog_text) else len(changelog_text)
if new_content:
return changelog_text[:notes_start_index] + f"{new_content}\n" + changelog_text[notes_end_index:]
else:
changeset_lines = changelog_text[notes_start_index:notes_end_index].split("\n")
# Ensure we have at least 2 lines before removing them
if len(changeset_lines) < 2:
print("Warning: Changeset content has fewer than 2 lines")
parsed_lines = "\n".join(changeset_lines)
else:
# Remove the first two lines from the regular changeset format, ex: \n### Patch Changes
parsed_lines = "\n".join(changeset_lines[2:])
filtered_lines = []
for line in changeset_lines:
# If the previous line is a changeset format
if len(filtered_lines) > 1 and filtered_lines[-1].startswith("### "):
# Remove the last two lines from the filted_lines
filtered_lines.pop()
filtered_lines.pop()
else:
filtered_lines.append(line.strip())
# Prepend a new line to the first line of filtered_lines
if filtered_lines:
filtered_lines[0] = "\n" + filtered_lines[0]
# Print filted_lines wiht a "\n" at the end of each line
for line in filtered_lines:
print(line.strip())
parsed_lines = "\n".join(line for line in filtered_lines)
updated_changelog = changelog_text[:notes_start_index] + parsed_lines + changelog_text[notes_end_index:]
# Ensure version number is bracketed
updated_changelog = updated_changelog.replace(f"## {VERSION}", f"## [{VERSION}]")
return updated_changelog
try:
print(f"Reading changelog from: {CHANGELOG_PATH}")
with open(CHANGELOG_PATH, 'r') as f:
changelog_content = f.read()
with open(CHANGELOG_PATH, 'r') as f:
changelog_content = f.read()
print(f"Changelog content length: {len(changelog_content)} characters")
print("First 200 characters of changelog:")
print(changelog_content[:200])
print("----------------------------------------------------------------------------------")
new_changelog = overwrite_changelog_section(changelog_content, NEW_CONTENT)
# print("----------------------------------------------------------------------------------")
# print(new_changelog)
# print("----------------------------------------------------------------------------------")
# Write back to CHANGELOG.md
with open(CHANGELOG_PATH, 'w') as f:
f.write(new_changelog)
new_changelog = overwrite_changelog_section(changelog_content, NEW_CONTENT)
print("New changelog content:")
print("----------------------------------------------------------------------------------")
print(new_changelog)
print("----------------------------------------------------------------------------------")
print(f"Writing updated changelog back to: {CHANGELOG_PATH}")
with open(CHANGELOG_PATH, 'w') as f:
f.write(new_changelog)
print(f"{CHANGELOG_PATH} updated successfully!")
except FileNotFoundError:
print(f"Error: Changelog file not found at {CHANGELOG_PATH}")
sys.exit(1)
except Exception as e:
print(f"Error updating changelog: {str(e)}")
print(f"Current working directory: {os.getcwd()}")
sys.exit(1)
print(f"{CHANGELOG_PATH} updated successfully!")
@@ -0,0 +1,282 @@
#!/usr/bin/env python3
"""
Tests for coverage_check script.
"""
import os
import sys
import unittest
import subprocess
import tempfile
from unittest.mock import patch, MagicMock, call, mock_open
# Add parent directory to path so we can import coverage modules
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from coverage_check import extract_coverage, compare_coverage, set_verbose, generate_comment, post_comment, set_github_output
from coverage_check.util import log, file_exists, get_file_size, list_directory
class TestCoverage(unittest.TestCase):
# Class variables to store coverage files
temp_dir = None
extension_coverage_file = None
webview_coverage_file = None
@classmethod
def setUpClass(cls):
"""Set up test environment once for all tests."""
# Create temporary directory for test files
cls.temp_dir = tempfile.TemporaryDirectory()
cls.extension_coverage_file = os.path.join(cls.temp_dir.name, 'extension_coverage.txt')
cls.webview_coverage_file = os.path.join(cls.temp_dir.name, 'webview_coverage.txt')
# Run actual tests to generate coverage reports
cls.generate_coverage_reports()
# Verify files exist and are not empty
assert os.path.exists(cls.extension_coverage_file), \
f"Extension coverage file {cls.extension_coverage_file} does not exist"
assert os.path.getsize(cls.extension_coverage_file) > 0, \
f"Extension coverage file {cls.extension_coverage_file} is empty"
assert os.path.exists(cls.webview_coverage_file), \
f"Webview coverage file {cls.webview_coverage_file} does not exist"
assert os.path.getsize(cls.webview_coverage_file) > 0, \
f"Webview coverage file {cls.webview_coverage_file} is empty"
@classmethod
def tearDownClass(cls):
"""Clean up test environment after all tests."""
if cls.temp_dir:
cls.temp_dir.cleanup()
@classmethod
def generate_coverage_reports(cls):
"""Generate real coverage reports by running tests."""
log("Generating coverage reports (this may take a while)...")
# Run extension tests with coverage
try:
# Get absolute paths
root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..'))
webview_dir = os.path.join(root_dir, 'webview-ui')
# Use xvfb-run on Linux
if sys.platform.startswith('linux'):
cmd = f"cd {root_dir} && xvfb-run -a npm run test:coverage > {cls.extension_coverage_file} 2>&1"
else:
cmd = f"cd {root_dir} && npm run test:coverage > {cls.extension_coverage_file} 2>&1"
log("Running extension tests...")
log(f"Command: {cmd}")
result = subprocess.run(cmd, shell=True, check=False, capture_output=True, text=True)
log(f"Extension tests exit code: {result.returncode}")
# Run webview tests with coverage
log("Running webview tests...")
cmd = f"cd {webview_dir} && npm run test:coverage > {cls.webview_coverage_file} 2>&1"
log(f"Command: {cmd}")
result = subprocess.run(cmd, shell=True, check=False, capture_output=True, text=True)
log(f"Webview tests exit code: {result.returncode}")
# Verify files were created
if file_exists(cls.extension_coverage_file):
ext_size = get_file_size(cls.extension_coverage_file)
log(f"Extension coverage file created: {cls.extension_coverage_file} (size: {ext_size} bytes)")
else:
log(f"WARNING: Extension coverage file was not created: {cls.extension_coverage_file}")
if file_exists(cls.webview_coverage_file):
web_size = get_file_size(cls.webview_coverage_file)
log(f"Webview coverage file created: {cls.webview_coverage_file} (size: {web_size} bytes)")
else:
log(f"WARNING: Webview coverage file was not created: {cls.webview_coverage_file}")
log("Coverage reports generation completed.")
except Exception as e:
log(f"Error generating coverage reports: {e}")
import traceback
log(traceback.format_exc())
# Create empty files if tests fail
log("Creating fallback coverage files...")
with open(cls.extension_coverage_file, 'w') as f:
f.write("No coverage data available")
with open(cls.webview_coverage_file, 'w') as f:
f.write("No coverage data available")
def test_extract_coverage(self):
"""Test extract_coverage function with both extension and webview coverage."""
# Check if verbose mode is enabled
if '-v' in sys.argv or '--verbose' in sys.argv:
set_verbose(True)
# Verify files exist before testing
self.assertTrue(file_exists(self.extension_coverage_file),
f"Extension coverage file does not exist: {self.extension_coverage_file}")
self.assertTrue(file_exists(self.webview_coverage_file),
f"Webview coverage file does not exist: {self.webview_coverage_file}")
# Log file sizes
ext_size = get_file_size(self.extension_coverage_file)
web_size = get_file_size(self.webview_coverage_file)
log(f"Extension coverage file size: {ext_size} bytes")
log(f"Webview coverage file size: {web_size} bytes")
# Test extension coverage
log("Testing extension coverage extraction...")
ext_coverage_pct = extract_coverage(self.extension_coverage_file, 'extension')
# Check that coverage percentage is a float
self.assertIsInstance(ext_coverage_pct, float)
# Check that coverage percentage is between 0 and 100
self.assertGreaterEqual(ext_coverage_pct, 0)
self.assertLessEqual(ext_coverage_pct, 100)
# Log coverage percentage for debugging
log(f"Extension coverage: {ext_coverage_pct}%")
# Test webview coverage
log("Testing webview coverage extraction...")
web_coverage_pct = extract_coverage(self.webview_coverage_file, 'webview')
# Convert to float if it's an integer
if isinstance(web_coverage_pct, int):
web_coverage_pct = float(web_coverage_pct)
# Check that coverage percentage is a float
self.assertIsInstance(web_coverage_pct, float)
# Check that coverage percentage is between 0 and 100
self.assertGreaterEqual(web_coverage_pct, 0)
self.assertLessEqual(web_coverage_pct, 100)
# Log coverage percentage for debugging
log(f"Webview coverage: {web_coverage_pct}%")
def test_compare_coverage(self):
"""Test compare_coverage function."""
# Test with coverage increase
decreased, diff = compare_coverage(80, 90)
self.assertFalse(decreased)
self.assertEqual(diff, 10)
# Test with coverage decrease
decreased, diff = compare_coverage(90, 80)
self.assertTrue(decreased)
self.assertEqual(diff, 10)
# Test with no change
decreased, diff = compare_coverage(80, 80)
self.assertFalse(decreased)
self.assertEqual(diff, 0)
def test_generate_comment(self):
"""Test generate_comment function."""
comment = generate_comment(
80, 90, 'false', 10,
70, 75, 'false', 5
)
# Check that comment contains expected sections
self.assertIn('Coverage Report', comment)
self.assertIn('Extension Coverage', comment)
self.assertIn('Webview Coverage', comment)
self.assertIn('Overall Assessment', comment)
# Check that comment contains coverage percentages
self.assertIn('Base branch: 80%', comment)
self.assertIn('PR branch: 90%', comment)
self.assertIn('Base branch: 70%', comment)
self.assertIn('PR branch: 75%', comment)
# Check that comment contains correct assessment
self.assertIn('Coverage increased or remained the same', comment)
self.assertIn('Test coverage has been maintained or improved', comment)
@patch('coverage_check.requests.get')
@patch('coverage_check.requests.post')
@patch('coverage_check.requests.patch')
def test_post_comment_new(self, mock_patch, mock_post, mock_get):
"""Test post_comment function when creating a new comment."""
# Create a temporary comment file
comment_file = os.path.join(self.temp_dir.name, 'comment.md')
with open(comment_file, 'w') as f:
f.write('<!-- COVERAGE_REPORT -->\nTest comment')
# Mock the API responses
mock_get.return_value = MagicMock(status_code=200, json=lambda: [])
mock_post.return_value = MagicMock(status_code=201)
# Test post_comment function
post_comment(comment_file, '123', 'owner/repo', 'token')
# Check that the correct API calls were made
mock_get.assert_called_once()
mock_post.assert_called_once()
mock_patch.assert_not_called()
@patch('coverage_check.requests.get')
@patch('coverage_check.requests.post')
@patch('coverage_check.requests.patch')
def test_post_comment_update(self, mock_patch, mock_post, mock_get):
"""Test post_comment function when updating an existing comment."""
# Create a temporary comment file
comment_file = os.path.join(self.temp_dir.name, 'comment.md')
with open(comment_file, 'w') as f:
f.write('<!-- COVERAGE_REPORT -->\nTest comment')
# Mock the API responses
mock_get.return_value = MagicMock(
status_code=200,
json=lambda: [{'id': 456, 'body': '<!-- COVERAGE_REPORT -->\nOld comment'}]
)
mock_patch.return_value = MagicMock(status_code=200)
# Test post_comment function
post_comment(comment_file, '123', 'owner/repo', 'token')
# Check that the correct API calls were made
mock_get.assert_called_once()
mock_patch.assert_called_once()
mock_post.assert_not_called()
def test_set_github_output(self):
"""Test set_github_output function."""
# Capture stdout
with patch('sys.stdout', new=MagicMock()) as mock_stdout:
# Mock environment without GITHUB_OUTPUT
with patch.dict('os.environ', {}, clear=True):
set_github_output('test_name', 'test_value')
# Check that the correct output was printed to stdout
mock_stdout.assert_has_calls([
# GitHub Actions output format (deprecated method)
call.write('::set-output name=test_name::test_value\n'),
call.flush(),
# Human readable format
call.write('test_name: test_value\n'),
call.flush()
], any_order=False)
# Reset mock for next test
mock_stdout.reset_mock()
# Test with GITHUB_OUTPUT environment variable
with patch.dict('os.environ', {'GITHUB_OUTPUT': '/tmp/github_output'}), \
patch('builtins.open', mock_open()) as mock_file:
set_github_output('test_name', 'test_value')
# Check that file was written to
mock_file.assert_called_once_with('/tmp/github_output', 'a')
mock_file().write.assert_called_once_with('test_name=test_value\n')
# Check that human readable output was printed
mock_stdout.assert_has_calls([
call.write('test_name: test_value\n'),
call.flush()
], any_order=False)
if __name__ == '__main__':
unittest.main()
+113
View File
@@ -0,0 +1,113 @@
name: Changeset Converter
run-name: Changeset Conversion
on:
workflow_dispatch:
pull_request:
types: [closed]
env:
REPO_PATH: ${{ github.repository }}
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
NODE_VERSION: 20.18.1
jobs:
# Job 1: Create version bump PR when changesets are merged to main
changeset-pr-version-bump:
if: |
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main' &&
github.actor != 'github-actions'
)
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check user for team affiliation
id: team_check
if: github.event_name == 'workflow_dispatch'
uses: morfien101/actions-authorized-user@4a3cfbf0bcb3cafe4a71710a278920c5d94bb38b
with:
username: ${{ github.actor }}
org: ${{ github.repository_owner }}
team: "deployer"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Check if user is authorized
if: github.event_name == 'workflow_dispatch'
run: |
if [ "${{ steps.team_check.outputs.authorized }}" != "true" ]; then
echo "User is not authorized to run this workflow."
exit 1
fi
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.GIT_REF }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- name: Install Dependencies
run: npm install changeset
# Check if there are any new changesets to process
- name: Check for changesets
id: check-changesets
run: |
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
echo "Changesets diff with previous version: $NEW_CHANGESETS"
echo "new_changesets=$NEW_CHANGESETS" >> $GITHUB_OUTPUT
# Create version bump PR using changesets/action if there are new changesets
- name: Create Changeset Pull Request
if: steps.check-changesets.outputs.new_changesets != '0'
uses: changesets/action@v1
with:
commit: "changeset version bump"
title: "Changeset version bump"
version: npm run version-packages # This performs the changeset version bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Get current and previous versions to edit changelog entry
- name: Get version
id: get_version
run: |
VERSION=$(git show HEAD:package.json | jq -r '.version')
echo "version=$VERSION" >> $GITHUB_OUTPUT
PREV_VERSION=$(git show origin/main:package.json | jq -r '.version')
echo "prev_version=$PREV_VERSION" >> $GITHUB_OUTPUT
echo "version=$VERSION"
echo "prev_version=$PREV_VERSION"
# Update CHANGELOG.md with proper format
- name: Update Changelog Format
env:
VERSION: ${{ steps.get_version.outputs.version }}
PREV_VERSION: ${{ steps.get_version.outputs.prev_version }}
run: python .github/scripts/overwrite_changeset_changelog.py
# Commit and push changelog updates
- name: Push Changelog updates to Pull Request
run: |
git config user.name "github-actions"
git config user.email github-actions@github.com
echo "Running git add and commit..."
git add CHANGELOG.md
git commit -m "Updating CHANGELOG.md format"
git status
echo "--------------------------------------------------------------------------------"
echo "Pushing to remote..."
echo "--------------------------------------------------------------------------------"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
git push origin $CURRENT_BRANCH
-117
View File
@@ -1,117 +0,0 @@
name: Check Changeset
run-name: Check for Changeset in PR
permissions:
contents: read
pull-requests: write
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened, ready_for_review]
jobs:
check-changeset:
# Skip draft PRs and dependabot PRs
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Check for changeset
id: check-changeset
run: |
# Debug info
echo "Current directory: $(pwd)"
echo "PR Base Ref: ${{ github.event.pull_request.base.ref }}"
echo "PR Head Ref: ${{ github.event.pull_request.head.ref }}"
echo "PR Head SHA: ${{ github.event.pull_request.head.sha }}"
echo "Git status:"
git status
# Get list of changed files
git fetch origin ${{ github.event.pull_request.base.ref }}
CHANGED_FILES=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }} HEAD)
echo "Changed files:"
echo "$CHANGED_FILES"
# Check if any of the changed files are in docs/ or .github/
echo "Checking if changes are docs-only..."
DOCS_ONLY=true
while IFS= read -r file; do
if [[ ! "$file" =~ ^(docs/|.github/) ]]; then
echo "Found non-docs change: $file"
DOCS_ONLY=false
break
fi
done <<< "$CHANGED_FILES"
# If changes are docs-only, skip changeset check
if [ "$DOCS_ONLY" = true ]; then
echo "All changes are in docs/ or .github/, skipping changeset check"
exit 0
else
echo "Changes include non-docs files, checking for changeset..."
fi
# Check if any changeset files are in the changed files
echo "Checking for changeset files in changed files..."
CHANGESET_IN_PR=false
while IFS= read -r file; do
if [[ "$file" =~ ^\.changeset/.*\.md$ && "$file" != ".changeset/README.md" && "$file" != ".changeset/config.json" ]]; then
echo "Found changeset file in PR: $file"
CHANGESET_IN_PR=true
break
fi
done <<< "$CHANGED_FILES"
if [ "$CHANGESET_IN_PR" = false ]; then
echo "No changeset files found in changed files. Changed files in .changeset/:"
echo "$CHANGED_FILES" | grep "^\.changeset/" || true
echo "::error::No changeset file found in PR changes. Please run 'npm run changeset' to create one."
exit 1
fi
- name: Comment on PR
if: failure()
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
script: |
const message = `This PR requires a changeset since it includes user-facing changes. Please:
1. Run \`npm run changeset\` locally
2. Choose the appropriate version bump:
- \`major\` for breaking changes (1.0.0 → 2.0.0)
- \`minor\` for new features (1.0.0 → 1.1.0)
- \`patch\` for bug fixes (1.0.0 → 1.0.1)
3. Write a clear description of your changes
4. Commit the generated changeset file
Note: Documentation-only changes do not require a changeset.`;
// Get existing comments
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
// Check if we already commented
const botComment = comments.data.find(comment =>
comment.user.login === 'github-actions[bot]' &&
comment.body.includes('This PR requires a changeset')
);
if (!botComment) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: message
});
}
+108
View File
@@ -0,0 +1,108 @@
name: E2E Tests
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
echo 'matrix=[{"runner":"ubuntu"},{"runner":"windows"},{"runner":"macos"}]' >> $GITHUB_OUTPUT
e2e:
needs: matrix_prep
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
runs-on: ${{ matrix.runner }}-latest
timeout-minutes: 20
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22
# Cache root dependencies - only reuse if package-lock.json exactly matches
- name: Cache root dependencies
uses: actions/cache@v4
id: root-cache
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
# Cache webview-ui dependencies - only reuse if package-lock.json exactly matches
- name: Cache webview-ui dependencies
uses: actions/cache@v4
id: webview-cache
with:
path: webview-ui/node_modules
key: ${{ runner.os }}-npm-webview-${{ hashFiles('webview-ui/package-lock.json') }}
# Cache VS Code installation
- name: Cache VS Code
uses: actions/cache@v4
id: vscode-cache
with:
path: .vscode-test
key: vscode-${{ runner.os }}-stable-${{ hashFiles('.vscode-test.mjs', 'package.json') }}
restore-keys: |
vscode-${{ runner.os }}-stable-
# Cache Playwright browsers
- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
~/Library/Caches/ms-playwright
~/AppData/Local/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
playwright-browsers-${{ runner.os }}-
- name: Install root dependencies
if: steps.root-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Install webview-ui dependencies
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci
- name: Install xvfb on Linux
if: matrix.runner == 'ubuntu'
run: sudo apt-get update && sudo apt-get install -y xvfb
# Run optimized E2E tests (eliminates redundant builds)
- name: Run E2E tests - Linux
if: matrix.runner == 'ubuntu'
run: xvfb-run -a npm run test:e2e:optimal
- name: Run E2E tests - Non-Linux
if: matrix.runner != 'ubuntu'
run: npm run test:e2e:optimal
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-recordings-${{ matrix.runner }}
path: |
test-results/playwright/
@@ -0,0 +1,53 @@
name: Auto-label Issues
on:
issues:
types: [opened, edited]
jobs:
label:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v7
with:
script: |
const body = context.payload.issue.body || '';
const labels = context.payload.issue.labels.map(l => l.name);
// Check if JetBrains Plugin is selected
if (body.match(/###\s*Plugin Type\s*\n+JetBrains Plugin/i)) {
if (!labels.includes('JetBrains')) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['JetBrains']
});
}
}
// Check if VSCode Extension is selected
if (body.match(/###\s*Plugin Type\s*\n+VSCode Extension/i)) {
if (!labels.includes('VS Code')) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['VS Code']
});
}
}
// Check if CLI is selected
if (body.match(/###\s*Plugin Type\s*\n+CLI/i)) {
if (!labels.includes('CLI')) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['CLI']
});
}
}
+82
View File
@@ -0,0 +1,82 @@
name: "Publish Nightly Release"
on:
schedule:
- cron: '0 12 * * *' # 4 AM PST (UTC-8) = 12 UTC
workflow_dispatch:
permissions:
contents: write
packages: write
checks: write
pull-requests: write
jobs:
test:
uses: ./.github/workflows/test.yml
publish:
needs: test
name: Publish Cline (Nightly) Extension
if: github.repository == 'cline/cline'
runs-on: ubuntu-latest
environment: PublishNightly
steps:
- uses: actions/checkout@v4
- name: Check for recent commits
run: |
if [ $(git rev-list --count HEAD --since="24 hours ago") -eq 0 ]; then
echo "No commits in last 24 hours, exiting"
exit 0
fi
echo "Found recent commits, proceeding with build"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
# Cache root dependencies - only reuse if package-lock.json exactly matches
- name: Cache root dependencies
uses: actions/cache@v4
id: root-cache
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
# Cache webview-ui dependencies - only reuse if package-lock.json exactly matches
- name: Cache webview-ui dependencies
uses: actions/cache@v4
id: webview-cache
with:
path: webview-ui/node_modules
key: ${{ runner.os }}-npm-webview-${{ hashFiles('webview-ui/package-lock.json') }}
- name: Install root dependencies
if: steps.root-cache.outputs.cache-hit != 'true'
run: npm ci --include=optional
- name: Install webview-ui dependencies
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci --include=optional
- name: Install Publishing Tools
run: npm install -g @vscode/vsce ovsx
- name: Publish Extension as Pre-release
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
TELEMETRY_SERVICE_API_KEY: ${{ secrets.TELEMETRY_SERVICE_API_KEY }}
ERROR_SERVICE_API_KEY: ${{ secrets.ERROR_SERVICE_API_KEY }}
CLINE_ENVIRONMENT: production
# OpenTelemetry production defaults (can be overridden at runtime)
OTEL_TELEMETRY_ENABLED: ${{ secrets.OTEL_TELEMETRY_ENABLED }}
OTEL_LOGS_EXPORTER: console,otlp
OTEL_METRICS_EXPORTER: console,otlp
OTEL_EXPORTER_OTLP_PROTOCOL: ${{ secrets.OTEL_EXPORTER_OTLP_PROTOCOL }}
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}
run: npm run publish:marketplace:nightly
+35 -13
View File
@@ -11,6 +11,10 @@ on:
options:
- pre-release
- release
tag:
description: "Enter existing tag to publish (e.g., v3.1.2)"
required: true
type: string
permissions:
contents: write
@@ -30,11 +34,13 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.15.1
node-version: "lts/*"
# Cache root dependencies - only reuse if package-lock.json exactly matches
- name: Cache root dependencies
@@ -54,14 +60,14 @@ jobs:
- name: Install root dependencies
if: steps.root-cache.outputs.cache-hit != 'true'
run: npm ci
run: npm ci --include=optional
- name: Install webview-ui dependencies
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci
run: cd webview-ui && npm ci --include=optional
- name: Install Publishing Tools
run: npm install -g vsce ovsx
run: npm install -g @vscode/vsce ovsx
- name: Get Version
id: get_version
@@ -69,22 +75,38 @@ jobs:
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create Git Tag
id: create_tag
- name: Validate Tag
id: validate_tag
run: |
VERSION=v${{ steps.get_version.outputs.version }}
echo "tag=$VERSION" >> $GITHUB_OUTPUT
echo "Tagging with $VERSION"
git tag "$VERSION"
git push origin "$VERSION"
TAG="${{ github.event.inputs.tag }}"
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "Using existing tag: $TAG"
# Verify the tag exists
if ! git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Error: Tag '$TAG' does not exist in the repository"
exit 1
fi
echo "Tag '$TAG' validated successfully"
- name: Package and Publish Extension
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
CLINE_ENVIRONMENT: production
TELEMETRY_SERVICE_API_KEY: ${{ secrets.TELEMETRY_SERVICE_API_KEY }}
ERROR_SERVICE_API_KEY: ${{ secrets.ERROR_SERVICE_API_KEY }}
# OpenTelemetry production defaults (can be overridden at runtime)
OTEL_TELEMETRY_ENABLED: ${{ secrets.OTEL_TELEMETRY_ENABLED }}
OTEL_LOGS_EXPORTER: console,otlp
OTEL_METRICS_EXPORTER: console,otlp
OTEL_EXPORTER_OTLP_PROTOCOL: ${{ secrets.OTEL_EXPORTER_OTLP_PROTOCOL }}
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}
run: |
# Required to generate the .vsix
vsce package --out "cline-${{ steps.get_version.outputs.version }}.vsix"
vsce package --allow-package-secrets sendgrid --out "cline-${{ steps.get_version.outputs.version }}.vsix"
if [ "${{ github.event.inputs.release-type }}" = "pre-release" ]; then
npm run publish:marketplace:prerelease
@@ -106,7 +128,7 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.create_tag.outputs.tag }}
tag_name: ${{ steps.validate_tag.outputs.tag }}
files: "*.vsix"
# body: ${{ steps.changelog.outputs.content }}
generate_release_notes: true
+25
View File
@@ -0,0 +1,25 @@
# This workflow will only label and/or close 30 issues at a time in order to avoid exceeding a rate limit.
# More info: https://docs.github.com/en/actions/use-cases-and-examples/project-management/closing-inactive-issues
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 60
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 60 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
exempt-issue-labels: "pinned,security"
repo-token: ${{ secrets.GITHUB_TOKEN }}
+32
View File
@@ -0,0 +1,32 @@
name: Test Stale Issues Workflow
on:
workflow_dispatch:
inputs:
days-before-stale:
description: "Days before an issue becomes stale"
required: true
default: "1"
days-before-close:
description: "Days before a stale issue is closed"
required: true
default: "1"
jobs:
test-stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@28ca103
with:
days-before-issue-stale: ${{ github.event.inputs.days-before-stale }}
days-before-issue-close: ${{ github.event.inputs.days-before-close }}
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for ${{ github.event.inputs.days-before-stale }} days with no activity."
close-issue-message: "This issue was closed because it has been inactive for ${{ github.event.inputs.days-before-close }} days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
exempt-issue-labels: "pinned,security"
repo-token: ${{ secrets.GITHUB_TOKEN }}
debug-only: true
+221 -12
View File
@@ -1,6 +1,9 @@
name: Tests
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
@@ -14,8 +17,9 @@ permissions:
pull-requests: write # Needed to add comments/annotations to PRs
jobs:
test:
quality-checks:
runs-on: ubuntu-latest
name: Quality Checks
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -23,9 +27,8 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.15.1
node-version: 22
# Cache root dependencies - only reuse if package-lock.json exactly matches
- name: Cache root dependencies
uses: actions/cache@v4
id: root-cache
@@ -33,7 +36,6 @@ jobs:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
# Cache webview-ui dependencies - only reuse if package-lock.json exactly matches
- name: Cache webview-ui dependencies
uses: actions/cache@v4
id: webview-cache
@@ -49,14 +51,221 @@ jobs:
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci
- name: Type Check
run: npm run check-types
- name: Run Quality Checks (Parallel)
run: npm run ci:check-all
- name: ESLint Check
run: npm run lint
test:
needs: quality-checks
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os == 'ubuntu-latest' && 'test' || format('test ({0})', matrix.os) }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prettier / Format Check
run: npm run format
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22
- name: Extension Tests
run: xvfb-run -a npm run test
- name: Cache root dependencies
uses: actions/cache@v4
id: root-cache
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- name: Cache webview-ui dependencies
uses: actions/cache@v4
id: webview-cache
with:
path: webview-ui/node_modules
key: ${{ runner.os }}-npm-webview-${{ hashFiles('webview-ui/package-lock.json') }}
- name: Install root dependencies
if: steps.root-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Install webview-ui dependencies
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci
- name: Set up NPM on Windows
if: runner.os == 'Windows'
run: |
npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"
# Build the extension and tests (without redundant checks)
- name: Build Tests and Extension
id: build_step
run: npm run ci:build
- name: Unit Tests with coverage - Linux
id: unit_tests_linux
if: ${{ !cancelled() && steps.build_step.outcome == 'success' && runner.os == 'Linux' }}
run: |
npx nyc --nycrc-path .nycrc.unit.json --reporter=lcov npm run test:unit
- name: Unit Tests - Non-Linux
id: unit_tests_non_linux
if: ${{ !cancelled() && steps.build_step.outcome == 'success' && runner.os != 'Linux' }}
run: |
npm run test:unit
- name: Extension Integration Tests - Linux
id: integration_tests_linux
if: ${{ !cancelled() && steps.build_step.outcome == 'success' && runner.os == 'Linux' }}
run: xvfb-run -a npm run test:coverage
- name: Extension Integration Tests - Non-Linux
id: integration_tests_non_linux
if: ${{ !cancelled() && steps.build_step.outcome == 'success' && runner.os != 'Linux' }}
run: npm run test:integration
- name: Webview Tests with Coverage
id: webview_tests
if: ${{ !cancelled() && steps.build_step.outcome == 'success' }}
run: |
cd webview-ui
npm run test:coverage
- name: Save Coverage Reports
uses: actions/upload-artifact@v4
# Only upload artifacts on Linux - We only need coverage from one OS
if: runner.os == 'Linux'
with:
name: pr-coverage-reports
path: |
coverage-unit/lcov.info
webview-ui/coverage/lcov.info
test-platform-integration:
needs: quality-checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache root dependencies
uses: actions/cache@v4
id: root-cache
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- name: Cache webview-ui dependencies
uses: actions/cache@v4
id: webview-cache
with:
path: webview-ui/node_modules
key: ${{ runner.os }}-npm-webview-${{ hashFiles('webview-ui/package-lock.json') }}
# Cache testing-platform dependencies
- name: Cache testing-platform dependencies
uses: actions/cache@v4
id: testing-platform-cache
with:
path: testing-platform/node_modules
key: ${{ runner.os }}-npm-testing-platform-${{ hashFiles('testing-platform/package-lock.json') }}
- name: Install root dependencies
if: steps.root-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Install webview-ui dependencies
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache-dependency-path: cli/go.sum
- name: Build CLI binaries
run: npm run compile-cli-all-platforms
- name: Download ripgrep binaries
run: npm run download-ripgrep
- name: Compile NPM package
run: npm run compile-standalone-npm
- name: Install testing platform dependencies
if: steps.testing-platform-cache.outputs.cache-hit != 'true'
run: cd testing-platform && npm ci
- name: Running testing platform integration spec tests
continue-on-error: true
timeout-minutes: 7
# Temporarily wrapping the test command to always return a neutral exit code.
# This prevents the job from showing as failed and avoids distracting developers
# until the integration tests are ready to be enforced.
run: |
npm run test:tp-orchestrator -- tests/specs/ --count=1 --coverage || true
- name: Save Coverage Reports
uses: actions/upload-artifact@v4
with:
name: test-platform-integration-core-coverage
path: coverage/**/lcov.info
qlty:
needs: [test, test-platform-integration]
runs-on: ubuntu-latest
# Run on PRs to main, pushes to main, and manual dispatches
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download unit tests coverage reports
uses: actions/download-artifact@v4
with:
name: pr-coverage-reports
path: .
- name: Upload core unit tests coverage to Qlty
uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
# we can merge multiple files if necessary
files: |
coverage-unit/lcov.info
tag: unit:core
- name: Upload webview-ui unit tests coverage to Qlty
uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
# we can merge multiple files if necessary
files: |
webview-ui/coverage/lcov.info
tag: unit:webview-ui
add-prefix: webview-ui/
- name: Download test platform integration core coverage artifact
uses: actions/download-artifact@v4
continue-on-error: true
id: download-integration-coverage
with:
name: test-platform-integration-core-coverage
path: integration-core-coverage-reports
- name: Upload core integration tests coverage to Qlty
if: steps.download-integration-coverage.outcome == 'success'
uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: integration-core-coverage-reports/**/lcov.info
tag: integration:core
@@ -0,0 +1,53 @@
name: Trigger Jetbrains Plugin <-> Cline Tests
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: jetbrains-trigger-${{ github.event.number }}
cancel-in-progress: true
jobs:
trigger-integration-test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: 1998650
private-key: ${{ secrets.CLINE_JETBRAINS_WORKFLOW_KEY }}
owner: cline
repositories: intellij-plugin
- name: Trigger IntelliJ Plugin Integration Test
run: |
curl -X POST \
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
-H "Accept: application/vnd.github.v3+json" \
-H "User-Agent: cline-pr-trigger" \
-H "Content-Type: application/json" \
https://api.github.com/repos/cline/intellij-plugin/dispatches \
-d @- <<EOF
{
"event_type": "cline-pr-check",
"client_payload": {
"pr_number": "${{ github.event.number }}",
"branch_name": "${{ github.head_ref }}",
"action": "${{ github.event.action }}",
"sha": "${{ github.event.pull_request.head.sha }}",
"pr_title": ${{ toJSON(github.event.pull_request.title) }},
"pr_url": "${{ github.event.pull_request.html_url }}"
}
}
EOF
- name: Log trigger details
run: |
echo "Triggered IntelliJ Plugin integration test for:"
echo " PR #${{ github.event.number }}: ${{ github.event.pull_request.title }}"
echo " Branch: ${{ github.head_ref }}"
echo " Action: ${{ github.event.action }}"
echo " SHA: ${{ github.event.pull_request.head.sha }}"
+26 -1
View File
@@ -1,12 +1,37 @@
out
dist
dist-standalone
node_modules
tmp
.vscode-test/
*.vsix
.DS_Store
.idea
pnpm-lock.yaml
.clineignore
.clineignore
.venv
.actrc
webview-ui/src/**/*.js
webview-ui/src/**/*.js.map
# Ignore coverage directories and files
coverage
coverage-unit
.nyc_output
# But don't ignore the coverage scripts in .github/scripts/
!.github/scripts/coverage/
*evals.env
.env
## Generated files ##
src/generated/
src/shared/proto/
webview-ui/src/services/grpc-client.ts
# E2E Tests
test-results
Executable → Regular
+1 -17
View File
@@ -1,17 +1 @@
echo "Running pre-commit checks..."
# Run ESLint
echo "Running ESLint..."
npm run lint || {
echo "❌ ESLint check failed. Please fix the errors and try committing again."
exit 1
}
# Run Prettier
echo "Running Prettier..."
npm run format || {
echo "❌ Prettier check failed. Run 'npm run format:fix' to automatically fix formatting issues."
exit 1
}
echo "✅ All checks passed!"
lint-staged
+15
View File
@@ -0,0 +1,15 @@
{
"extension": [
"ts"
],
"spec": [
"src/**/__tests__/*.ts"
],
"require": [
"ts-node/register",
"source-map-support/register",
"./src/test/requires.ts"
],
"recursive": true,
"exit": true
}
+48
View File
@@ -0,0 +1,48 @@
{
"all": true,
"check-coverage": false,
"reporter": [
"text",
"lcov"
],
"include": [
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts",
"**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs}",
"**/__tests__/**",
"**/test/**",
"**/tests/**",
"**/.nyc_output/**",
"**/.vscode-test/**",
"**/tests-results/**",
"src/test/**",
"src/generated/**",
"**/node_modules/**",
"**/dist/**",
"**/out/**",
"**/build/**",
"**/coverage/**",
"**/coverage-unit/**",
"**/proto/**",
"**/*.{config,setup}.{js,ts,mjs,cjs}",
"**/vite-env.d.ts",
"**/*.{css,scss,sass,less,styl}",
"**/*.{svg,png,jpg,jpeg,gif,ico}",
"**/*.{json,yaml,yml}"
],
"extension": [
".ts",
".js"
],
"cache": true,
"sourceMap": true,
"instrument": true,
"report-dir": "./coverage-unit"
}
-5
View File
@@ -1,5 +0,0 @@
dist/
node_modules
webview-ui/build/
*.md
package-lock.json
-7
View File
@@ -1,7 +0,0 @@
{
"tabWidth": 4,
"useTabs": true,
"printWidth": 130,
"semi": false,
"bracketSameLine": true
}
+5 -1
View File
@@ -2,10 +2,14 @@ import { defineConfig } from "@vscode/test-cli"
import path from "path"
export default defineConfig({
files: "{out/**/*.test.js,src/**/*.test.js}",
files: "{out/**/*.test.js,src/**/*.test.js,!src/test/e2e/**/*.test.js,!out/src/test/e2e/**/*.test.js}",
mocha: {
ui: "bdd",
timeout: 20000, // Maximum time (in ms) that a test can run before failing
/** Set up alias path resolution during tests
* @See {@link file://./test-setup.js}
*/
require: ["./test-setup.js"],
},
workspaceFolder: "test-workspace",
version: "stable",
+6 -1
View File
@@ -1,5 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "connor4312.esbuild-problem-matchers", "ms-vscode.extension-test-runner"]
"recommendations": [
"connor4312.esbuild-problem-matchers",
"ms-vscode.extension-test-runner",
"bradlc.vscode-tailwindcss",
"biomejs.biome"
]
}
+153 -4
View File
@@ -6,16 +6,165 @@
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"name": "Run Extension (production)",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--disable-workspace-trust",
"--disable-extensions", // Avoid conflicts with installed extensions
"${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"envFile": "${workspaceFolder}/.env",
"env": {
"IS_DEV": "true",
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}"
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}",
"CLINE_ENVIRONMENT": "production"
}
},
{
"name": "Run Extension (staging)",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--disable-workspace-trust",
"--disable-extensions", // Avoid conflicts with installed extensions
"${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"envFile": "${workspaceFolder}/.env",
"env": {
"IS_DEV": "true",
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}",
"CLINE_ENVIRONMENT": "staging"
}
},
{
"name": "Run Extension (local)",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--disable-workspace-trust",
"--disable-extensions", // Avoid conflicts with installed extensions
"${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"envFile": "${workspaceFolder}/.env",
"env": {
"IS_DEV": "true",
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}",
"CLINE_ENVIRONMENT": "local"
}
},
{
"name": "Run Extension (Fresh Install Mode)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--user-data-dir=${workspaceFolder}/dist/tmp/user",
"--profile-temp",
"--sync=off",
"--disable-extensions", // Avoid conflicts with installed extensions
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "clean-tmp-user",
"internalConsoleOptions": "openOnSessionStart",
"postDebugTask": "stop",
"envFile": "${workspaceFolder}/.env",
"env": {
"IS_DEV": "true",
"TEMP_PROFILE": "true",
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}",
"CLINE_ENVIRONMENT": "production"
}
},
{
"type": "node",
"request": "launch",
"name": "Debug Test Standalone Core Api Server (test:sca-server)",
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
"cwd": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/dist/**/*.js",
"${workspaceFolder}/dist-standalone/**/*.js"
],
"preLaunchTask": "compile-standalone",
"runtimeExecutable": "npx",
"runtimeArgs": [
"tsx"
],
"program": "scripts/test-standalone-core-api-server.ts",
"envFile": "${workspaceFolder}/.env",
"env": {
"PROTOBUS_PORT": "26040",
"HOSTBRIDGE_PORT": "26041",
"WORKSPACE_DIR": "${workspaceFolder}",
"E2E_TEST": "true",
"CLINE_ENVIRONMENT": "local"
},
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Debug Current Test File",
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npx",
"runtimeArgs": [
"mocha"
],
"args": [
"--require",
"ts-node/register",
"--require",
"source-map-support/register",
"--require",
"./src/test/requires.ts",
"--exit",
"${file}"
],
"envFile": "${workspaceFolder}/.env",
"env": {
"TS_NODE_PROJECT": "./tsconfig.unit-test.json",
"NODE_ENV": "test",
"IS_DEV": "true",
"CLINE_ENVIRONMENT": "local"
},
"console": "integratedTerminal",
"internalConsoleOptions": "openOnSessionStart"
}
]
}
+20 -2
View File
@@ -6,8 +6,26 @@
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
"dist": true, // set this to false to include "dist" folder in search results,
"node_modules": true,
"dist-standalone": true
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "double",
// Protobuf settings
"protoc": {
"options": [
"--proto_path=proto"
]
},
// Enable Lint and format using Biome
"biome.enabled": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.removeUnused.biome": "always",
"source.removeUnusedImports": "always",
"source.organizeImports.biome": "always"
}
}
+165 -14
View File
@@ -4,16 +4,61 @@
"version": "2.0.0",
"tasks": [
{
"label": "watch",
"dependsOn": ["npm: build:webview", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild"],
"label": "compile-standalone",
"type": "npm",
"script": "compile-standalone",
"group": "build",
"problemMatcher": [],
"presentation": {
"reveal": "never"
"reveal": "always"
}
},
{
"label": "npm: protos",
"type": "npm",
"script": "protos",
"problemMatcher": [],
"isBackground": false,
"presentation": {
"reveal": "always"
},
"options": {
"env": {
"IS_DEV": "true"
}
}
},
{
"label": "watch",
"dependsOn": [
"npm: protos",
"npm: build:webview",
"npm: dev:webview",
"npm: watch:tsc",
"npm: watch:esbuild"
],
"presentation": {
"reveal": "always"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "watch:test",
"dependsOn": [
"npm: protos",
"npm: build:webview:test",
"npm: dev:webview",
"npm: watch:tsc",
"npm: watch:esbuild:test"
],
"presentation": {
"reveal": "always"
},
"group": "build"
},
{
"type": "npm",
"script": "build:webview",
@@ -21,10 +66,12 @@
"problemMatcher": [],
"isBackground": true,
"label": "npm: build:webview",
"dependsOn": [
"npm: protos"
],
"presentation": {
"group": "watch",
"reveal": "never",
"close": true
"reveal": "always"
},
"options": {
"env": {
@@ -32,6 +79,27 @@
}
}
},
{
"type": "npm",
"script": "build:webview:test",
"group": "build",
"problemMatcher": [],
"isBackground": true,
"label": "npm: build:webview:test",
"dependsOn": [
"npm: protos"
],
"presentation": {
"group": "watch",
"reveal": "always"
},
"options": {
"env": {
"IS_DEV": "true",
"IS_TEST": "true"
}
}
},
{
"type": "npm",
"script": "dev:webview",
@@ -55,10 +123,12 @@
],
"isBackground": true,
"label": "npm: dev:webview",
"dependsOn": [
"npm: protos"
],
"presentation": {
"group": "watch",
"reveal": "never",
"close": true
"reveal": "always"
},
"options": {
"env": {
@@ -70,13 +140,77 @@
"type": "npm",
"script": "watch:esbuild",
"group": "build",
"problemMatcher": "$esbuild-watch",
"problemMatcher": {
"pattern": [
{
"regexp": "^✘ \\[ERROR\\] (.*)$",
"message": 1
},
{
"regexp": "^\\s+(.*):(\\d+):(\\d+):$",
"file": 1,
"line": 2,
"column": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "^\\[watch\\] build started$",
"endsPattern": "^\\[watch\\] build finished$"
}
},
"isBackground": true,
"label": "npm: watch:esbuild",
"dependsOn": [
"npm: protos"
],
"presentation": {
"group": "watch",
"reveal": "never",
"close": true
"reveal": "always"
},
"options": {
"env": {
"IS_DEV": "true"
}
}
},
{
"type": "npm",
"script": "watch:esbuild:test",
"group": "build",
"problemMatcher": {
"pattern": [
{
"regexp": "^✘ \\[ERROR\\] (.*)$",
"message": 1
},
{
"regexp": "^\\s+(.*):(\\d+):(\\d+):$",
"file": 1,
"line": 2,
"column": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "^\\[watch\\] build started$",
"endsPattern": "^\\[watch\\] build finished$"
}
},
"isBackground": true,
"label": "npm: watch:esbuild:test",
"dependsOn": [
"npm: protos"
],
"presentation": {
"group": "watch",
"reveal": "always"
},
"options": {
"env": {
"IS_DEV": "true",
"IS_TEST": "true"
}
}
},
{
@@ -86,10 +220,12 @@
"problemMatcher": "$tsc-watch",
"isBackground": true,
"label": "npm: watch:tsc",
"dependsOn": [
"npm: protos"
],
"presentation": {
"group": "watch",
"reveal": "never",
"close": true
"reveal": "always"
}
},
{
@@ -97,21 +233,36 @@
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"dependsOn": [
"npm: protos"
],
"presentation": {
"reveal": "never",
"reveal": "always",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"dependsOn": [
"npm: protos",
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
},
{
"label": "stop",
"command": "echo ${input:terminate}",
"type": "shell"
},
{
"label": "clean-tmp-user",
"type": "shell",
"dependsOn": [
"watch"
],
"command": "rm -rf ${workspaceFolder}/dist/tmp/user && mkdir -p ${workspaceFolder}/dist/tmp/user"
}
],
"inputs": [
+37 -5
View File
@@ -1,24 +1,44 @@
# Default
.vscode/**
.vscode-test/**
out/**
node_modules/**
out/
dist-standalone/
node_modules/
src/**
standalone/**
.gitignore
.yarnrc
esbuild.js
vsc-extension-quickstart.md
**/tsconfig.json
tsconfig*.json
**/.eslintrc.json
**/*.map
**/*.ts
**/.vscode-test.*
eslint-rules/**
.github/**
.husky/**
.env
# Custom
demo.gif
**/demo.gif
.nvmrc
.gitattributes
.prettierignore
.husky/
.github/
eslint-rules/
old_docs/
evals/
.changie.yaml
.codespellrc
.mocharc.json
buf.yaml
.changeset/
.clinerules/
# Include specific file needed for Background Exec mode
!standalone/runtime-files/vscode/enhanced-terminal.js
# Ignore all webview-ui files except the build directory (https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/frameworks/hello-world-react-cra/.vscodeignore)
webview-ui/src/**
@@ -32,6 +52,7 @@ webview-ui/node_modules/**
# Ignore docs
docs/**
old_docs/**
# Fix issue where codicons don't get packaged (https://github.com/microsoft/vscode-extension-samples/issues/692)
!node_modules/@vscode/codicons/dist/codicon.css
@@ -41,4 +62,15 @@ docs/**
!src/integrations/theme/default-themes/**
# Include icons
!assets/icons/**
!assets/icons/**
# Ignore E2E build files
e2e-build.mjs
e2e.vsix
test-results/
# Ignore Storybook files
**/*.stories.tsx
*storybook.log
storybook-static
**/StorybookDecorator.tsx
+1165 -209
View File
File diff suppressed because it is too large Load Diff
+120 -14
View File
@@ -10,16 +10,77 @@ Bug reports help make Cline better for everyone! Before creating a new issue, pl
🔐 <b>Important:</b> If you discover a security vulnerability, please use the <a href="https://github.com/cline/cline/security/advisories/new">Github security tool to report it privately</a>.
</blockquote>
## Before Contributing
All contributions must begin with a GitHub Issue, unless the change is for small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality.
**For features and contributions**:
- First check the [Feature Requests discussions board](https://github.com/cline/cline/discussions/categories/feature-requests) for similar ideas
- If your idea is new, create a new feature request
- Wait for approval from core maintainers before starting implementation
- Once approved, feel free to begin working on a PR with the help of our community!
**PRs without approved issues may be closed.**
## Deciding What to Work On
Looking for a good first contribution? Check out issues labeled ["good first issue"](https://github.com/cline/cline/labels/good%20first%20issue) or ["help wanted"](https://github.com/cline/cline/labels/help%20wanted). These are specifically curated for new contributors and areas where we'd love some help!
We also welcome contributions to our [documentation](https://github.com/cline/cline/tree/main/docs)! Whether it's fixing typos, improving existing guides, or creating new educational content - we'd love to build a community-driven repository of resources that helps everyone get the most out of Cline. You can start by diving into `/docs` and looking for areas that need improvement.
If you're planning to work on a bigger feature, please create a [feature request](https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) first so we can discuss whether it aligns with Cline's vision.
## Development Setup
### Local Development Instructions
1. Clone the repository _(Requires [git-lfs](https://git-lfs.com/))_:
```bash
git clone https://github.com/cline/cline.git
```
2. Open the project in VSCode:
```bash
code cline
```
3. Install the necessary dependencies for the extension and webview-gui:
```bash
npm run install:all
```
4. Generate Protocol Buffer files (required before first build):
```bash
npm run protos
```
5. Launch by pressing `F5` (or `Run`->`Start Debugging`) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.)
### Creating a Pull Request
1. Before creating a PR, generate a changeset entry:
```bash
npm run changeset
```
This will prompt you for:
- Type of change (major, minor, patch)
- `major` → breaking changes (1.0.0 → 2.0.0)
- `minor` → new features (1.0.0 → 1.1.0)
- `patch` → bug fixes (1.0.0 → 1.0.1)
- Description of your changes
2. Commit your changes and the generated `.changeset` file
3. Push your branch and create a PR on GitHub. Our CI will:
- Run tests and checks
- Changesetbot will create a comment showing the version impact
- When merged to main, changesetbot will create a Version Packages PR
- When the Version Packages PR is merged, a new release will be published
4. Testing
- Run `npm run test` to run tests locally.
- Before submitting PR, run `npm run format:fix` to format your code
### Extension
1. **VS Code Extensions**
- When opening the project, VS Code will prompt you to install recommended extensions
@@ -28,24 +89,29 @@ If you're planning to work on a bigger feature, please create a [feature request
2. **Local Development**
- Run `npm run install:all` to install dependencies
- Run `npm run protos` to generate Protocol Buffer files (required before first build)
- Run `npm run test` to run tests locally
- Run → Start Debugging or `>Debug: Select and Start Debugging` and wait for a new VS Code instance to open
- **Terminal Workflow**: Use `npm run dev` (generates protos + runs watch mode) or `npm run watch` (if protos already generated)
- Before submitting PR, run `npm run format:fix` to format your code
3. **Linux-specific Setup**
VS Code extension tests on Linux require the following system libraries:
- `libatk1.0-0`
- `dbus`
- `libasound2`
- `libatk-bridge2.0-0`
- `libxkbfile1`
- `libatk1.0-0`
- `libdrm2`
- `libgbm1`
- `libgtk-3-0`
- `libnss3`
- `libx11-xcb1`
- `libxcomposite1`
- `libxdamage1`
- `libxfixes3`
- `libxkbfile1`
- `libxrandr2`
- `libgbm1`
- `libdrm2`
- `libgtk-3-0`
- `dbus`
- `xvfb`
These libraries provide necessary GUI components and system services for the test environment.
@@ -54,13 +120,23 @@ If you're planning to work on a bigger feature, please create a [feature request
```bash
sudo apt update
sudo apt install -y \
libatk1.0-0 libatk-bridge2.0-0 libxkbfile1 libx11-xcb1 \
libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 \
libdrm2 libgtk-3-0 dbus xvfb
dbus \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnss3 \
libx11-xcb1 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbfile1 \
libxrandr2 \
xvfb
```
- Run `npm run test:ci` to run tests locally
## Writing and Submitting Code
Anyone can contribute code to Cline, but we ask that you follow these guidelines to ensure your contributions can be smoothly integrated:
@@ -76,7 +152,7 @@ Anyone can contribute code to Cline, but we ask that you follow these guidelines
- Run `npm run lint` to check code style
- Run `npm run format` to automatically format code
- All PRs must pass CI checks which include both linting and formatting
- Address any ESLint warnings or errors before submitting
- Address any warnings or errors from linter before submitting
- Follow TypeScript best practices and maintain type safety
3. **Testing**
@@ -86,6 +162,36 @@ Anyone can contribute code to Cline, but we ask that you follow these guidelines
- Update existing tests if your changes affect them
- Include both unit tests and integration tests where appropriate
**End-to-End (E2E) Testing**
Cline includes comprehensive E2E tests using Playwright that simulate real user interactions with the extension in VS Code:
- **Running E2E tests:**
```bash
npm run test:e2e # Build and run all E2E tests
npm run e2e # Run tests without rebuilding
npm run test:e2e -- --debug # Run with interactive debugger
```
- **Writing E2E tests:**
- Tests are located in `src/test/e2e/`
- Use the `e2e` fixture for single-root workspace tests
- Use `e2eMultiRoot` fixture for multi-root workspace tests
- Follow existing patterns in `auth.test.ts`, `chat.test.ts`, `diff.test.ts`, and `editor.test.ts`
- See `src/test/e2e/README.md` for detailed documentation
- **Debug mode features:**
- Interactive Playwright Inspector for step-by-step debugging
- Record new interactions and generate test code automatically
- Visual VS Code instance for manual testing
- Element inspection and selector validation
- **Test environment:**
- Automated VS Code setup with Cline extension loaded
- Mock API server for backend testing
- Temporary workspaces with test fixtures
- Video recording for failed tests
4. **Version Management with Changesets**
- Create a changeset for any user-facing changes using `npm run changeset`
+6 -50
View File
@@ -2,7 +2,7 @@
English | <a href="https://github.com/cline/cline/blob/main/locales/es/README.md" target="_blank">Español</a> | <a href="https://github.com/cline/cline/blob/main/locales/de/README.md" target="_blank">Deutsch</a> | <a href="https://github.com/cline/cline/blob/main/locales/ja/README.md" target="_blank">日本語</a> | <a href="https://github.com/cline/cline/blob/main/locales/zh-cn/README.md" target="_blank">简体中文</a> | <a href="https://github.com/cline/cline/blob/main/locales/zh-tw/README.md" target="_blank">繁體中文</a> | <a href="https://github.com/cline/cline/blob/main/locales/ko/README.md" target="_blank">한국어</a>
</sub></div>
# Cline \#1 on OpenRouter
# Cline
<p align="center">
<img src="https://media.githubusercontent.com/media/cline/cline/main/assets/docs/demo.gif" width="100%" />
@@ -24,7 +24,7 @@ English | <a href="https://github.com/cline/cline/blob/main/locales/es/README.md
<a href="https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop" target="_blank"><strong>Feature Requests</strong></a>
</td>
<td align="center">
<a href="https://docs.cline.bot/getting-started/getting-started-new-coders" target="_blank"><strong>Getting Started</strong></a>
<a href="https://docs.cline.bot/getting-started/for-new-coders" target="_blank"><strong>Getting Started</strong></a>
</td>
</tbody>
</table>
@@ -32,7 +32,7 @@ English | <a href="https://github.com/cline/cline/blob/main/locales/es/README.md
Meet Cline, an AI assistant that can use your **CLI** a**N**d **E**ditor.
Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthropic.com/claude/sonnet), Cline can handle complex software development tasks step-by-step. With tools that let him create & edit files, explore large projects, use the browser, and execute terminal commands (after you grant permission), he can assist you in ways that go beyond code completion or tech support. Cline can even use the Model Context Protocol (MCP) to create new tools and extend his own capabilities. While autonomous AI scripts traditionally run in sandboxed environments, this extension provides a human-in-the-loop GUI to approve every file change and terminal command, providing a safe and accessible way to explore the potential of agentic AI.
Thanks to [Claude Sonnet's agentic coding capabilities](https://www.anthropic.com/claude/sonnet), Cline can handle complex software development tasks step-by-step. With tools that let him create & edit files, explore large projects, use the browser, and execute terminal commands (after you grant permission), he can assist you in ways that go beyond code completion or tech support. Cline can even use the Model Context Protocol (MCP) to create new tools and extend his own capabilities. While autonomous AI scripts traditionally run in sandboxed environments, this extension provides a human-in-the-loop GUI to approve every file change and terminal command, providing a safe and accessible way to explore the potential of agentic AI.
1. Enter your task and add images to convert mockups into functional apps or fix bugs with screenshots.
2. Cline starts by analyzing your file structure & source code ASTs, running regex searches, and reading relevant files to get up to speed in existing projects. By carefully managing what information is added to context, Cline can provide valuable assistance even for large, complex projects without overwhelming the context window.
@@ -43,7 +43,7 @@ Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthrop
4. When a task is completed, Cline will present the result to you with a terminal command like `open -a "Google Chrome" index.html`, which you run with a click of a button.
> [!TIP]
> Use the `CMD/CTRL + Shift + P` shortcut to open the command palette and type "Cline: Open In New Tab" to open the extension as a tab in your editor. This lets you use Cline side-by-side with your file explorer, and see how he changes your workspace more clearly.
> Follow [this guide](https://docs.cline.bot/features/customization/opening-cline-in-sidebar) to open Cline on the right side of your editor. This lets you use Cline side-by-side with your file explorer, and see how he changes your workspace more clearly.
---
@@ -51,7 +51,7 @@ Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthrop
### Use any API and Model
Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, and GCP Vertex. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available.
Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, GCP Vertex, Cerebras and Groq. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available.
The extension also keeps track of total tokens and API usage cost for the entire task loop and individual requests, keeping you informed of spend every step of the way.
@@ -87,7 +87,7 @@ All changes made by Cline are recorded in your file's Timeline, providing an eas
### Use the Browser
With Claude 3.5 Sonnet's new [Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use) capability, Cline can launch a browser, click elements, type text, and scroll, capturing screenshots and console logs at each step. This allows for interactive debugging, end-to-end testing, and even general web use! This gives him autonomy to fixing visual bugs and runtime issues without you needing to handhold and copy-pasting error logs yourself.
With Claude Sonnet's new [Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use) capability, Cline can launch a browser, click elements, type text, and scroll, capturing screenshots and console logs at each step. This allows for interactive debugging, end-to-end testing, and even general web use! This gives him autonomy to fixing visual bugs and runtime issues without you needing to handhold and copy-pasting error logs yourself.
Try asking Cline to "test the app", and watch as he runs a command like `npm run dev`, launches your locally running dev server in a browser, and performs a series of tests to confirm that everything works. [See a demo here.](https://x.com/sdrzn/status/1850880547825823989)
@@ -141,50 +141,6 @@ For example, when working with a local web server, you can use 'Restore Workspac
To contribute to the project, start with our [Contributing Guide](CONTRIBUTING.md) to learn the basics. You can also join our [Discord](https://discord.gg/cline) to chat with other contributors in the `#contributors` channel. If you're looking for full-time work, check out our open positions on our [careers page](https://cline.bot/join-us)!
<details>
<summary>Local Development Instructions</summary>
1. Clone the repository _(Requires [git-lfs](https://git-lfs.com/))_:
```bash
git clone https://github.com/cline/cline.git
```
2. Open the project in VSCode:
```bash
code cline
```
3. Install the necessary dependencies for the extension and webview-gui:
```bash
npm run install:all
```
4. Launch by pressing `F5` (or `Run`->`Start Debugging`) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.)
</details>
<details>
<summary>Creating a Pull Request</summary>
1. Before creating a PR, generate a changeset entry:
```bash
npm run changeset
```
This will prompt you for:
- Type of change (major, minor, patch)
- `major` → breaking changes (1.0.0 → 2.0.0)
- `minor` → new features (1.0.0 → 1.1.0)
- `patch` → bug fixes (1.0.0 → 1.0.1)
- Description of your changes
2. Commit your changes and the generated `.changeset` file
3. Push your branch and create a PR on GitHub. Our CI will:
- Run tests and checks
- Changesetbot will create a comment showing the version impact
- When merged to main, changesetbot will create a Version Packages PR
- When the Version Packages PR is merged, a new release will be published
</details>
## License
[Apache 2.0 © 2025 Cline Bot Inc.](./LICENSE)
+166
View File
@@ -0,0 +1,166 @@
{
"$schema": "https://biomejs.dev/schemas/2.1.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on",
"useSortedAttributes": "on"
}
}
},
"linter": {
"enabled": true,
"domains": {
"react": "recommended"
},
// Ideally we would want to turn on all the rules that are currently off,
// keeping them off currently to make sure only changes on the migrations
// are included in the initial PR before we apply the format and lint changes.
// TODO: turn on all rules that are currently off if applicable.
// TODO: Remove --diagnostic-level=error from CI commands.
"rules": {
"recommended": true,
"correctness": {
"useExhaustiveDependencies": "off",
"noUndeclaredVariables": "off",
"noEmptyPattern": "off",
"useJsxKeyInIterable": "off",
"noInnerDeclarations": "off",
"useHookAtTopLevel": "off",
"useYield": "off",
"noConstructorReturn": "off",
"noInvalidPositionAtImportRule": "off",
"noSwitchDeclarations": "off",
"noUnusedImports": "error"
},
"a11y": "off",
"style": {
"useNodejsImportProtocol": "off",
"useImportType": "off",
"useBlockStatements": "warn",
"useNamingConvention": "off",
"useThrowOnlyError": "info",
"useConsistentArrayType": "off",
"noParameterAssign": "off",
"useAsConstAssertion": "off",
"useDefaultParameterLast": "off",
"noNonNullAssertion": "off",
"useEnumInitializers": "off",
"useSelfClosingElements": "off",
"useSingleVarDeclarator": "off",
"useNumberNamespace": "off",
"noInferrableTypes": "off",
"useTemplate": "off",
"noUselessElse": "off"
},
"suspicious": {
"noDoubleEquals": "warn",
"noImplicitAnyLet": "info",
"noThenProperty": "off",
"noAsyncPromiseExecutor": "off",
"noImportAssign": "off",
"noExplicitAny": "off",
"noControlCharactersInRegex": "off",
"noShadowRestrictedNames": "off",
"noArrayIndexKey": "info",
"noAssignInExpressions": "info"
},
"complexity": {
"noUselessConstructor": "off",
"useOptionalChain": "off",
"noBannedTypes": "off",
"useLiteralKeys": "off",
"noUselessCatch": "off",
"noUselessSwitchCase": "off",
"noStaticOnlyClass": "off"
},
"security": {
"noDangerouslySetInnerHtml": "info"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 4,
"lineWidth": 130,
"lineEnding": "lf",
"formatWithErrors": true
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all"
}
},
"json": {
"formatter": {
"trailingCommas": "none",
"expand": "always"
}
},
"files": {
"includes": [
"**",
"!**/dist",
"!**/dist-*",
"!**/out",
"!**/evals",
"!**/playwright",
"!**/test-results",
"!**/node_modules",
"!**/webview-ui/build",
"!**/generated",
"!**/proto",
"!**/tests/specs"
]
},
"plugins": [
"src/dev/grit/process-env.grit"
],
"overrides": [
{
"includes": [
"**",
"!**/hosts/vscode/**",
"!**/test/**",
"!**/*.test.ts",
"!src/dev/**",
"!src/extension.ts",
"!src/integrations/git/commit-message-generator.ts",
"!src/integrations/terminal/**",
"!src/core/controller/ui/openWalkthrough.ts"
],
"plugins": [
"src/dev/grit/vscode-api.grit"
]
},
{
"includes": [
"**",
"!src/core/storage/state-migrations.ts",
"!src/core/storage/FileContextTracker.ts",
"!src/core/context/context-tracking/FileContextTracker.ts",
"!src/common.ts",
"!src/services/logging/distinctId.ts",
"!src/core/storage/utils/state-helpers.ts",
"!src/extension.ts"
],
"plugins": [
"src/dev/grit/use-cache-service.grit"
]
}
]
}
+21
View File
@@ -0,0 +1,21 @@
version: v2
modules:
- path: proto
name: cline/cline/lint
lint:
use:
- STANDARD
except: # Add exceptions for current patterns that contradict STANDARD settings
- RPC_PASCAL_CASE # rpcs are camel case (start with lowercase)
- RPC_REQUEST_RESPONSE_UNIQUE # request messages are not unique.
- RPC_REQUEST_STANDARD_NAME # request messages dont all end with Request
- RPC_RESPONSE_STANDARD_NAME # response messages dont all end with Response
- PACKAGE_VERSION_SUFFIX # package name does not contain version.
- ENUM_VALUE_PREFIX # enum values dont start with the enum name.
- ENUM_ZERO_VALUE_SUFFIX # first value does not have to be UNSPECIFIED.
# breaking:
# use:
# - WIRE_JSON # Detect changes that break the json wire format (this is the minimum recommended level.)
+2
View File
@@ -0,0 +1,2 @@
cline-core-debug.log
bin/*
+72
View File
@@ -0,0 +1,72 @@
# Cline CLI
```
/_____/\ /_/\ /_______/\/__/\ /__/\ /_____/\
\:::__\/ \:\ \ \__.::._\/\::\_\\ \ \\::::_\/_
\:\ \ __\:\ \ \::\ \ \:. `-\ \ \\:\/___/\
\:\ \/_/\\:\ \____ _\::\ \__\:. _ \ \\::___\/_
\:\_\ \ \\:\/___/\/__\::\__/\\. \`-\ \ \\:\____/\
\_____\/ \_____\/\________\/ \__\/ \__\/ \_____\/
```
Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more.
## Installation
Install Cline globally using npm:
```bash
npm install -g cline
```
## Usage
```bash
cline
```
This will start the Cline CLI interface where you can interact with the autonomous coding agent.
## Features
- **Autonomous Coding**: AI-powered code generation, editing, and refactoring
- **File Operations**: Create, read, update, and delete files and directories
- **Command Execution**: Run shell commands and scripts
- **Browser Automation**: Interact with web pages and applications
- **Multi-Model Support**: Works with Anthropic Claude, OpenAI GPT, and other AI models
- **MCP Integration**: Extensible through Model Context Protocol servers
- **Project Understanding**: Analyzes codebases to provide context-aware assistance
## Requirements
- Node.js 18.0.0 or higher
- Supported platforms: macOS, Linux. Windows soon
- Supported architectures: x64, arm64
## Configuration
Cline can be configured through:
- Environment variables
- Configuration files
- Command-line arguments
See the [main documentation](https://cline.bot) for detailed configuration options.
## Links
- **Website**: [https://cline.bot](https://cline.bot)
- **Documentation**: [https://docs.cline.bot](https://docs.cline.bot)
- **GitHub**: [https://github.com/cline/cline](https://github.com/cline/cline)
- **VSCode Extension**: Available in the VSCode Marketplace
- **JetBrains Extension**: Available in the JetBrains Marketplace
## License
Apache-2.0 - see [LICENSE](https://github.com/cline/cline/blob/main/LICENSE) for details.
## Support
- Report issues: [GitHub Issues](https://github.com/cline/cline/issues)
- Community: [GitHub Discussions](https://github.com/cline/cline/discussions)
- Documentation: [docs.cline.bot](https://docs.cline.bot)
+71
View File
@@ -0,0 +1,71 @@
package main
import (
"context"
"fmt"
"log"
"os"
"os/signal"
"syscall"
"github.com/spf13/cobra"
"github.com/cline/cli/pkg/hostbridge"
)
var (
port int
verbose bool
)
func main() {
rootCmd := &cobra.Command{
Use: "cline-host",
Short: "Cline Host Bridge Service",
Long: `A simple host bridge service that provides host operations for Cline Core.`,
RunE: runServer,
}
rootCmd.Flags().IntVarP(&port, "port", "p", 51052, "port to listen on")
rootCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "verbose logging")
if err := rootCmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}
func runServer(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
// Create gRPC hostbridge service
service := hostbridge.NewGrpcServer(port, verbose)
// Handle graceful shutdown
ctx, cancel := context.WithCancel(ctx)
defer cancel()
go func() {
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
if verbose {
log.Println("Shutting down hostbridge server...")
}
cancel()
}()
// Start server
if verbose {
log.Printf("Starting Cline Host Bridge on port %d", port)
}
// Run the service
if err := service.Start(ctx); err != nil {
return fmt.Errorf("failed to run service: %w", err)
}
return nil
}
+348
View File
@@ -0,0 +1,348 @@
package main
import (
"context"
"encoding/json"
"fmt"
"io"
"os"
"strings"
"github.com/charmbracelet/huh"
"github.com/charmbracelet/lipgloss"
"github.com/cline/cli/pkg/cli"
"github.com/cline/cli/pkg/cli/auth"
"github.com/cline/cli/pkg/cli/display"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/cli/pkg/common"
"github.com/cline/grpc-go/cline"
"github.com/spf13/cobra"
)
var (
coreAddress string
verbose bool
outputFormat string
// Task creation flags (for root command)
images []string
files []string
mode string
settings []string
yolo bool
oneshot bool
)
func main() {
rootCmd := &cobra.Command{
Use: "cline [prompt]",
Short: "Cline CLI - AI-powered coding assistant",
Long: `A command-line interface for interacting with Cline AI coding assistant.
Start a new task by providing a prompt:
cline "Create a new Python script that prints hello world"
Or pipe a prompt via stdin:
echo "Create a todo app" | cline
cat prompt.txt | cline --yolo
Or run with no arguments to enter interactive mode:
cline
This CLI also provides task management, configuration, and monitoring capabilities.
For detailed documentation including all commands, options, and examples,
see the manual page: man cline`,
Args: cobra.ArbitraryArgs,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
if outputFormat != "rich" && outputFormat != "json" && outputFormat != "plain" {
return fmt.Errorf("invalid output format '%s': must be one of 'rich', 'json', or 'plain'", outputFormat)
}
return global.InitializeGlobalConfig(&global.GlobalConfig{
Verbose: verbose,
OutputFormat: outputFormat,
CoreAddress: coreAddress,
})
},
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
var instanceAddress string
// If --address flag not provided, start instance BEFORE getting prompt
if !cmd.Flags().Changed("address") {
if global.Config.Verbose {
fmt.Println("Starting new Cline instance...")
}
instance, err := global.Clients.StartNewInstance(ctx)
if err != nil {
return fmt.Errorf("failed to start new instance: %w", err)
}
instanceAddress = instance.Address
if global.Config.Verbose {
fmt.Printf("Started instance at %s\n\n", instanceAddress)
}
// Set up cleanup on exit
defer func() {
if global.Config.Verbose {
fmt.Println("\nCleaning up instance...")
}
registry := global.Clients.GetRegistry()
if err := global.KillInstanceByAddress(context.Background(), registry, instanceAddress); err != nil {
if global.Config.Verbose {
fmt.Printf("Warning: Failed to clean up instance: %v\n", err)
}
}
}()
// Check if user has credentials configured
if !isUserReadyToUse(ctx, instanceAddress) {
// Create renderer for welcome messages
renderer := display.NewRenderer(global.Config.OutputFormat)
fmt.Printf("\n%s\n\n", renderer.Dim("Hey there! Looks like you're new here. Let's get you set up"))
if err := auth.HandleAuthMenuNoArgs(ctx); err != nil {
// Check if user cancelled - exit cleanly
if err == huh.ErrUserAborted {
return nil
}
return fmt.Errorf("auth setup failed: %w", err)
}
// Re-check after auth wizard
if !isUserReadyToUse(ctx, instanceAddress) {
return fmt.Errorf("credentials still not configured - please run 'cline auth' to complete setup")
}
fmt.Printf("\n%s\n\n", renderer.Dim("✓ Setup complete, you can now use the Cline CLI"))
}
} else {
// User specified --address flag, use that
instanceAddress = coreAddress
}
// Get content from both args and stdin
prompt, err := getContentFromStdinAndArgs(args)
if err != nil {
return fmt.Errorf("failed to read prompt: %w", err)
}
// If no prompt from args or stdin, show interactive input
if prompt == "" {
// Pass the mode flag to banner so it shows correct mode
prompt, err = promptForInitialTask(ctx, instanceAddress, mode)
if err != nil {
// Check if user cancelled - exit cleanly without error
if err == huh.ErrUserAborted {
return nil
}
return err
}
if prompt == "" {
return fmt.Errorf("prompt required")
}
}
// If oneshot mode, force plan mode and yolo
if oneshot {
mode = "plan"
yolo = true
}
return cli.CreateAndFollowTask(ctx, prompt, cli.TaskOptions{
Images: images,
Files: files,
Mode: mode,
Settings: settings,
Yolo: yolo,
Address: instanceAddress,
Verbose: verbose,
})
},
}
rootCmd.PersistentFlags().StringVar(&coreAddress, "address", fmt.Sprintf("localhost:%d", common.DEFAULT_CLINE_CORE_PORT), "Cline Core gRPC address")
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose output")
rootCmd.PersistentFlags().StringVarP(&outputFormat, "output-format", "F", "rich", "output format (rich|json|plain)")
// Task creation flags (only apply when using root command with prompt)
rootCmd.Flags().StringSliceVarP(&images, "image", "i", nil, "attach image files")
rootCmd.Flags().StringSliceVarP(&files, "file", "f", nil, "attach files")
rootCmd.Flags().StringVarP(&mode, "mode", "m", "plan", "mode (act|plan) - defaults to plan")
rootCmd.Flags().StringSliceVarP(&settings, "setting", "s", nil, "task settings (key=value format)")
rootCmd.Flags().BoolVarP(&yolo, "yolo", "y", false, "enable yolo mode (non-interactive)")
rootCmd.Flags().BoolVar(&yolo, "no-interactive", false, "enable yolo mode (non-interactive)")
rootCmd.Flags().BoolVarP(&oneshot, "oneshot", "o", false, "full autonomous mode")
rootCmd.AddCommand(cli.NewTaskCommand())
rootCmd.AddCommand(cli.NewInstanceCommand())
rootCmd.AddCommand(cli.NewConfigCommand())
rootCmd.AddCommand(cli.NewVersionCommand())
rootCmd.AddCommand(cli.NewAuthCommand())
rootCmd.AddCommand(cli.NewLogsCommand())
// rootCmd.AddCommand(cli.NewDoctorCommand()) // Disabled for now
if err := rootCmd.ExecuteContext(context.Background()); err != nil {
os.Exit(1)
}
}
func promptForInitialTask(ctx context.Context, instanceAddress, modeFlag string) (string, error) {
// Show session banner before the initial input
showSessionBanner(ctx, instanceAddress, modeFlag)
var prompt string
// Create custom theme with mode-colored cursor and title
theme := huh.ThemeCharm()
// Set cursor and title color based on mode
modeColor := lipgloss.Color("3") // Yellow for plan
if modeFlag == "act" {
modeColor = lipgloss.Color("39") // Blue for act
}
theme.Focused.TextInput.Cursor = theme.Focused.TextInput.Cursor.Foreground(modeColor)
theme.Focused.Title = theme.Focused.Title.Foreground(modeColor)
form := huh.NewForm(
huh.NewGroup(
huh.NewText().
Title("Start a new Cline task").
Description("What would you like Cline to help you with?").
Placeholder("e.g., Create a REST API with authentication...").
Lines(5).
Value(&prompt),
),
).WithWidth(48).WithTheme(theme)
err := form.Run()
if err != nil {
// Check if user cancelled with Control-C
if err == huh.ErrUserAborted {
// Return a special error that indicates clean cancellation
// This allows deferred cleanup to run
return "", huh.ErrUserAborted
}
return "", err
}
return strings.TrimSpace(prompt), nil
}
// showSessionBanner displays session info before initial prompt
func showSessionBanner(ctx context.Context, instanceAddress, modeFlag string) {
bannerInfo := display.BannerInfo{
Version: global.CliVersion,
Mode: modeFlag, // Use the mode from command flag, not state
}
// If mode is empty, default to "plan"
if bannerInfo.Mode == "" {
bannerInfo.Mode = "plan"
}
// Get current working directory (this is what Cline will use)
if cwd, err := os.Getwd(); err == nil {
bannerInfo.Workdir = cwd
}
// Get provider/model using auth functions (same logic as auth menu)
manager, err := cli.NewTaskManagerForAddress(ctx, instanceAddress)
if err == nil {
if providerList, err := auth.GetProviderConfigurations(ctx, manager); err == nil {
// Show provider/model for the mode we'll be using
var providerDisplay *auth.ProviderDisplay
if bannerInfo.Mode == "plan" && providerList.PlanProvider != nil {
providerDisplay = providerList.PlanProvider
} else if bannerInfo.Mode == "act" && providerList.ActProvider != nil {
providerDisplay = providerList.ActProvider
}
if providerDisplay != nil {
bannerInfo.Provider = auth.GetProviderIDForEnum(providerDisplay.Provider)
bannerInfo.ModelID = providerDisplay.ModelID
}
}
}
// Render and display banner
banner := display.RenderSessionBanner(bannerInfo)
fmt.Println(banner)
fmt.Println() // Extra spacing before form
}
// isUserReadyToUse checks if the user has completed initial setup
// Returns true if welcomeViewCompleted flag is set OR user is authenticated
// Matches extension logic: welcomeViewCompleted = Boolean(globalState.welcomeViewCompleted || user?.uid)
func isUserReadyToUse(ctx context.Context, instanceAddress string) bool {
manager, err := cli.NewTaskManagerForAddress(ctx, instanceAddress)
if err != nil {
return false
}
// Get state
state, err := manager.GetClient().State.GetLatestState(ctx, &cline.EmptyRequest{})
if err != nil {
return false
}
// Parse state JSON
stateMap := make(map[string]interface{})
if err := json.Unmarshal([]byte(state.StateJson), &stateMap); err != nil {
return false
}
// Check 1: welcomeViewCompleted flag
if welcomeCompleted, ok := stateMap["welcomeViewCompleted"].(bool); ok && welcomeCompleted {
return true
}
// Check 2: Is user authenticated? (matches extension's || user?.uid check)
if userInfo, ok := stateMap["userInfo"].(map[string]interface{}); ok {
if uid, ok := userInfo["uid"].(string); ok && uid != "" {
return true
}
}
return false
}
// getContentFromStdinAndArgs reads content from both command line args and stdin, and combines them
func getContentFromStdinAndArgs(args []string) (string, error) {
var content strings.Builder
// Add command line args first (if any)
if len(args) > 0 {
content.WriteString(strings.Join(args, " "))
}
// Check if stdin has data
stat, err := os.Stdin.Stat()
if err != nil {
return "", fmt.Errorf("failed to stat stdin: %w", err)
}
// Check if data is being piped to stdin
if (stat.Mode() & os.ModeCharDevice) == 0 {
// Only try to read if there's actually data available
if stat.Size() > 0 {
stdinBytes, err := io.ReadAll(os.Stdin)
if err != nil {
return "", fmt.Errorf("failed to read from stdin: %w", err)
}
stdinContent := strings.TrimSpace(string(stdinBytes))
if stdinContent != "" {
if content.Len() > 0 {
content.WriteString(" ")
}
content.WriteString(stdinContent)
}
}
}
return content.String(), nil
}
+154
View File
@@ -0,0 +1,154 @@
package e2e
import (
"context"
"encoding/json"
"os"
"path/filepath"
"syscall"
"testing"
"github.com/cline/cli/pkg/common"
)
// 2. Multi-instance start: default_instance remains the first started.
func TestMultiInstanceDefaultUnchanged(t *testing.T) {
_ = setTempClineDir(t)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Start first instance and wait healthy
_ = mustRunCLI(ctx, t, "instance", "new")
out1 := listInstancesJSON(ctx, t)
if len(out1.CoreInstances) != 1 {
t.Fatalf("expected 1 instance, got %d", len(out1.CoreInstances))
}
firstAddr := out1.CoreInstances[0].Address
waitForAddressHealthy(t, firstAddr, defaultTimeout)
// Start second instance
_ = mustRunCLI(ctx, t, "instance", "new")
out2 := listInstancesJSON(ctx, t)
if len(out2.CoreInstances) < 2 {
t.Fatalf("expected at least 2 instances, got %d", len(out2.CoreInstances))
}
// Default should remain the first started address
if out2.DefaultInstance != firstAddr {
t.Fatalf("default changed; expected %s, got %s", firstAddr, out2.DefaultInstance)
}
}
// 6. Default.json update after removal of current default
func TestDefaultJsonUpdateAfterRemoval(t *testing.T) {
_ = setTempClineDir(t)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Start two instances
_ = mustRunCLI(ctx, t, "instance", "new")
_ = mustRunCLI(ctx, t, "instance", "new")
out := listInstancesJSON(ctx, t)
if len(out.CoreInstances) < 2 {
t.Fatalf("expected at least 2 instances, got %d", len(out.CoreInstances))
}
// Choose second as new default
target := out.CoreInstances[1]
waitForAddressHealthy(t, target.Address, defaultTimeout)
// Set as default
_ = mustRunCLI(ctx, t, "instance", "use", target.Address)
// Verify default switched
out = listInstancesJSON(ctx, t)
if out.DefaultInstance != target.Address {
t.Fatalf("default_instance not updated to %s (got %s)", target.Address, out.DefaultInstance)
}
// Kill the default instance using runtime PID discovery
corePID := getCorePID(t, target.Address)
if corePID <= 0 {
t.Fatalf("could not find PID for core process at %s", target.Address)
}
t.Logf("Killing cline-core process PID %d for instance %s", corePID, target.Address)
if err := syscall.Kill(corePID, syscall.SIGKILL); err != nil {
t.Fatalf("kill pid %d: %v", corePID, err)
}
// Wait for removal
waitForAddressRemoved(t, target.Address, longTimeout)
// Clean up dangling host process (SIGKILL leaves these behind by design)
t.Logf("Cleaning up dangling host process on port %d", target.HostPort())
findAndKillHostProcess(t, target.HostPort())
// Ensure default_instance updated to another available instance (or removed if none remain)
out = listInstancesJSON(ctx, t)
// If there are instances left, default_instance must be one of them
if len(out.CoreInstances) > 0 {
found := false
for _, it := range out.CoreInstances {
if out.DefaultInstance == it.Address {
found = true
break
}
}
if !found {
t.Fatalf("default_instance %s not set to an existing instance after removal", out.DefaultInstance)
}
} else {
// No instances remain; cli-default-instance.json should be removed
clineDir := getClineDir(t)
defPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "settings", "cli-default-instance.json")
if _, err := os.Stat(defPath); err == nil {
t.Fatalf("expected cli-default-instance.json removed when no instances remain")
}
}
// Also verify cli-default-instance.json on disk reflects the in-memory default (if any)
clineDir := getClineDir(t)
defPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "settings", "cli-default-instance.json")
if len(out.CoreInstances) > 0 {
raw, err := os.ReadFile(defPath)
if err != nil {
t.Fatalf("read cli-default-instance.json: %v", err)
}
var tmp struct {
DefaultInstance string `json:"default_instance"`
}
if err := json.Unmarshal(raw, &tmp); err != nil {
t.Fatalf("unmarshal cli-default-instance.json: %v", err)
}
if tmp.DefaultInstance != out.DefaultInstance {
t.Fatalf("cli-default-instance.json mismatch: file=%s list=%s", tmp.DefaultInstance, out.DefaultInstance)
}
}
}
// 11. SQLite database missing (edge): list succeeds and returns empty set
func TestRegistryDirMissingEdge(t *testing.T) {
clineDir := setTempClineDir(t)
// Remove the settings directory entirely (which contains locks.db)
settingsDir := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER)
if err := os.RemoveAll(settingsDir); err != nil {
t.Fatalf("RemoveAll(%s): %v", common.SETTINGS_SUBFOLDER, err)
}
// Listing should succeed and return empty results
ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout)
defer cancel()
out := listInstancesJSON(ctx, t)
if len(out.CoreInstances) != 0 {
t.Fatalf("expected 0 instances after removing %s dir, got %d", common.SETTINGS_SUBFOLDER, len(out.CoreInstances))
}
// Ensure cli-default-instance.json not present
defPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "settings", "cli-default-instance.json")
if _, err := os.Stat(defPath); err == nil {
t.Fatalf("expected no cli-default-instance.json after removing %s dir", common.SETTINGS_SUBFOLDER)
}
}
+378
View File
@@ -0,0 +1,378 @@
package e2e
import (
"context"
"fmt"
"net"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"syscall"
"testing"
"time"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/cli/pkg/common"
"github.com/cline/grpc-go/cline"
)
const (
defaultTimeout = 30 * time.Second
longTimeout = 60 * time.Second
pollInterval = 250 * time.Millisecond
instancesBinRel = "../bin/cline"
)
func repoAwareBinPath(t *testing.T) string {
// Tests live in repoRoot/cli/e2e. Binary is at repoRoot/cli/bin/cline
t.Helper()
wd, err := os.Getwd()
if err != nil {
t.Fatalf("Getwd error: %v", err)
}
// cli/e2e -> cli/bin/cline
p := filepath.Clean(filepath.Join(wd, instancesBinRel))
if _, err := os.Stat(p); err != nil {
t.Fatalf("CLI binary not found at %s; run `npm run compile-cli` first: %v", p, err)
}
return p
}
func setTempClineDir(t *testing.T) string {
t.Helper()
dir := t.TempDir()
clineDir := filepath.Join(dir, ".cline")
if err := os.MkdirAll(clineDir, 0o755); err != nil {
t.Fatalf("mkdir clineDir: %v", err)
}
t.Setenv("CLINE_DIR", clineDir)
return clineDir
}
func runCLI(ctx context.Context, t *testing.T, args ...string) (string, string, int) {
t.Helper()
bin := repoAwareBinPath(t)
// Ensure CLI uses the same CLINE_DIR as the tests by passing --config=<CLINE_DIR>
// (InitializeGlobalConfig uses ConfigPath as the base directory for registry.)
if clineDir := os.Getenv("CLINE_DIR"); clineDir != "" && !contains(args, "--config") {
// Prepend persistent flag so Cobra sees it regardless of subcommand position
args = append([]string{"--config", clineDir}, args...)
}
cmd := exec.CommandContext(ctx, bin, args...)
// Run CLI from repo root so relative paths inside CLI (./cli/bin/...) resolve
if wd, err := os.Getwd(); err == nil {
repoRoot := filepath.Clean(filepath.Join(wd, "..", ".."))
cmd.Dir = repoRoot
}
// propagate env including CLINE_DIR
cmd.Env = os.Environ()
outB, errB := &strings.Builder{}, &strings.Builder{}
cmd.Stdout = outB
cmd.Stderr = errB
err := cmd.Run()
exit := 0
if err != nil {
// Extract exit code if possible
if ee, ok := err.(*exec.ExitError); ok {
exit = ee.ExitCode()
} else {
exit = -1
}
}
return outB.String(), errB.String(), exit
}
func mustRunCLI(ctx context.Context, t *testing.T, args ...string) string {
t.Helper()
out, errOut, exit := runCLI(ctx, t, args...)
if exit != 0 {
t.Fatalf("cline %v failed (exit=%d)\nstdout:\n%s\nstderr:\n%s", args, exit, out, errOut)
}
return out
}
func listInstancesJSON(ctx context.Context, t *testing.T) common.InstancesOutput {
t.Helper()
// Trigger CLI to perform cleanup/health by invoking list (table output is ignored)
_ = mustRunCLI(ctx, t, "instance", "list")
// Read from SQLite locks database to build structured output
clineDir := getClineDir(t)
// Load default instance from settings file
defaultInstance := readDefaultInstanceFromSettings(t, clineDir)
// Load instances from SQLite
instances := readInstancesFromSQLite(t, clineDir)
return common.InstancesOutput{
DefaultInstance: defaultInstance,
CoreInstances: instances,
}
}
func hasAddress(in common.InstancesOutput, addr string) bool {
for _, it := range in.CoreInstances {
if it.Address == addr {
return true
}
}
return false
}
func getByAddress(in common.InstancesOutput, addr string) (common.CoreInstanceInfo, bool) {
for _, it := range in.CoreInstances {
if it.Address == addr {
return it, true
}
}
return common.CoreInstanceInfo{}, false
}
func waitFor(t *testing.T, timeout time.Duration, cond func() (bool, string)) {
t.Helper()
deadline := time.Now().Add(timeout)
for {
ok, msg := cond()
if ok {
return
}
if time.Now().After(deadline) {
t.Fatalf("waitFor timeout: %s", msg)
}
time.Sleep(pollInterval)
}
}
func waitForAddressHealthy(t *testing.T, addr string, timeout time.Duration) {
t.Helper()
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
t.Logf("Waiting for gRPC health check on %s...", addr)
waitFor(t, timeout, func() (bool, string) {
if common.IsInstanceHealthy(ctx, addr) {
return true, ""
}
return false, fmt.Sprintf("gRPC health check failed for %s", addr)
})
t.Logf("gRPC health check passed for %s", addr)
}
func waitForAddressRemoved(t *testing.T, addr string, timeout time.Duration) {
t.Helper()
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
waitFor(t, timeout, func() (bool, string) {
out := listInstancesJSON(ctx, t)
if hasAddress(out, addr) {
return false, fmt.Sprintf("address %s still present", addr)
}
return true, ""
})
}
func findFreePort(t *testing.T) int {
t.Helper()
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
t.Fatalf("listen 127.0.0.1:0: %v", err)
}
defer l.Close()
_, portStr, _ := net.SplitHostPort(l.Addr().String())
var port int
fmt.Sscanf(portStr, "%d", &port)
return port
}
func getClineDir(t *testing.T) string {
t.Helper()
clineDir := os.Getenv("CLINE_DIR")
if clineDir == "" {
t.Fatalf("CLINE_DIR not set")
}
return clineDir
}
// isPortInUse checks if a port is currently in use by any process
func isPortInUse(port int) bool {
conn, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
if err != nil {
return true // Port is in use
}
conn.Close()
return false // Port is free
}
// waitForPortClosed waits for a port to become free (no process listening)
func waitForPortClosed(t *testing.T, port int, timeout time.Duration) {
t.Helper()
waitFor(t, timeout, func() (bool, string) {
if isPortInUse(port) {
return false, fmt.Sprintf("port %d still in use", port)
}
return true, ""
})
}
// waitForPortsClosed waits for both core and host ports to become free
func waitForPortsClosed(t *testing.T, corePort, hostPort int, timeout time.Duration) {
t.Helper()
waitFor(t, timeout, func() (bool, string) {
if isPortInUse(corePort) {
return false, fmt.Sprintf("core port %d still in use", corePort)
}
if isPortInUse(hostPort) {
return false, fmt.Sprintf("host port %d still in use", hostPort)
}
return true, ""
})
}
// findAndKillHostProcess finds and kills any process listening on the host port
// This is used to clean up dangling host processes after SIGKILL tests
func findAndKillHostProcess(t *testing.T, hostPort int) {
t.Helper()
// Use lsof to find process listening on the host port
cmd := exec.Command("lsof", "-ti", fmt.Sprintf(":%d", hostPort))
output, err := cmd.Output()
if err != nil {
// No process found on port - that's fine
return
}
pidStr := strings.TrimSpace(string(output))
if pidStr == "" {
return
}
var pid int
if _, err := fmt.Sscanf(pidStr, "%d", &pid); err != nil {
t.Logf("Warning: could not parse PID from lsof output: %s", pidStr)
return
}
if pid > 0 {
t.Logf("Cleaning up dangling host process PID %d on port %d", pid, hostPort)
if err := syscall.Kill(pid, syscall.SIGKILL); err != nil {
t.Logf("Warning: failed to kill dangling host process %d: %v", pid, err)
}
}
}
// getPIDByPort returns the PID of the process listening on the specified port (fallback method)
func getPIDByPort(t *testing.T, port int) int {
t.Helper()
cmd := exec.Command("lsof", "-ti", fmt.Sprintf(":%d", port))
output, err := cmd.Output()
if err != nil {
return 0 // Process not found
}
pidStr := strings.TrimSpace(string(output))
if pidStr == "" {
return 0
}
pid, err := strconv.Atoi(pidStr)
if err != nil {
t.Logf("Warning: could not parse PID from lsof output: %s", pidStr)
return 0
}
return pid
}
// getCorePIDViaRPC returns the PID of the cline-core process using RPC (preferred method)
func getCorePIDViaRPC(t *testing.T, address string) int {
t.Helper()
// Initialize global config to access registry
clineDir := os.Getenv("CLINE_DIR")
if clineDir == "" {
t.Logf("Warning: CLINE_DIR not set, falling back to lsof")
return getCorePIDViaLsof(t, address)
}
cfg := &global.GlobalConfig{
ConfigPath: clineDir,
}
if err := global.InitializeGlobalConfig(cfg); err != nil {
t.Logf("Warning: failed to initialize global config, falling back to lsof: %v", err)
return getCorePIDViaLsof(t, address)
}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
// Get client for the address
client, err := global.Clients.GetRegistry().GetClient(ctx, address)
if err != nil {
t.Logf("Warning: failed to get client for %s, falling back to lsof: %v", address, err)
return getCorePIDViaLsof(t, address)
}
// Call GetProcessInfo RPC
processInfo, err := client.State.GetProcessInfo(ctx, &cline.EmptyRequest{})
if err != nil {
t.Logf("Warning: GetProcessInfo RPC failed for %s, falling back to lsof: %v", address, err)
return getCorePIDViaLsof(t, address)
}
return int(processInfo.ProcessId)
}
// getCorePIDViaLsof returns the PID using lsof (fallback method)
func getCorePIDViaLsof(t *testing.T, address string) int {
t.Helper()
_, portStr, err := net.SplitHostPort(address)
if err != nil {
t.Logf("Warning: invalid address format %s", address)
return 0
}
port, err := strconv.Atoi(portStr)
if err != nil {
t.Logf("Warning: invalid port in address %s", address)
return 0
}
return getPIDByPort(t, port)
}
// getCorePID returns the PID of the cline-core process for the given address
// Uses RPC first, falls back to lsof if RPC fails
func getCorePID(t *testing.T, address string) int {
t.Helper()
// Try RPC first (preferred method)
if pid := getCorePIDViaRPC(t, address); pid > 0 {
return pid
}
// Fall back to lsof if RPC fails
return getCorePIDViaLsof(t, address)
}
// getHostPID returns the PID of the cline-host process for the given host port
func getHostPID(t *testing.T, hostPort int) int {
t.Helper()
return getPIDByPort(t, hostPort)
}
// contains reports whether slice has the target string.
func contains(slice []string, target string) bool {
for _, s := range slice {
if s == target {
return true
}
}
return false
}
+47
View File
@@ -0,0 +1,47 @@
package e2e
import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"
)
// TestMain validates required artifacts exist before running E2E tests.
// It does NOT build artifacts. Build manually via:
//
// npm run compile-standalone
// npm run compile-cli
func TestMain(m *testing.M) {
// Determine repo root from cli/e2e
wd, err := os.Getwd()
if err != nil {
fmt.Fprintf(os.Stderr, "getwd: %v\n", err)
os.Exit(2)
}
repoRoot := filepath.Clean(filepath.Join(wd, "..", ".."))
cliBin := filepath.Join(repoRoot, "cli", "bin", "cline")
coreJS := filepath.Join(repoRoot, "dist-standalone", "cline-core.js")
missing := []string{}
if _, err := os.Stat(cliBin); err != nil {
missing = append(missing, cliBin)
}
if _, err := os.Stat(coreJS); err != nil {
missing = append(missing, coreJS)
}
if len(missing) > 0 {
if testing.Short() {
// Optional quality-of-life: allow skipping with -short when artifacts are absent
fmt.Fprintf(os.Stderr, "[e2e] skipping (-short) due to missing artifacts:\n %s\n", strings.Join(missing, "\n "))
os.Exit(0)
}
fmt.Fprintf(os.Stderr, "Missing required build artifacts for E2E tests:\n %s\n\nPlease build them first:\n npm run compile-standalone\n npm run compile-cli\n", strings.Join(missing, "\n "))
os.Exit(2)
}
os.Exit(m.Run())
}
+120
View File
@@ -0,0 +1,120 @@
package e2e
import (
"context"
"fmt"
"os"
"path/filepath"
"syscall"
"testing"
"github.com/cline/cli/pkg/common"
)
// 9. Mixed localhost vs 127.0.0.1 addresses coexist and are both healthy
func TestMixedLocalhostVs127Coexist(t *testing.T) {
clineDir := setTempClineDir(t)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Start one instance
_ = mustRunCLI(ctx, t, "instance", "new")
// Get the running instance and its port/PID
out := listInstancesJSON(ctx, t)
if len(out.CoreInstances) == 0 {
t.Fatalf("expected at least 1 instance")
}
inst := out.CoreInstances[0]
waitForAddressHealthy(t, inst.Address, defaultTimeout)
// Manually add a SQLite entry for the same port but 127.0.0.1 host
addr127 := fmt.Sprintf("127.0.0.1:%d", inst.CorePort())
dbPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "locks.db")
if err := insertRemoteInstanceIntoSQLite(t, dbPath, addr127, inst.CorePort(), inst.HostPort()); err != nil {
t.Fatalf("insert 127 alias entry: %v", err)
}
// Verify both addresses appear and are healthy
waitForAddressHealthy(t, inst.Address, defaultTimeout)
waitForAddressHealthy(t, addr127, defaultTimeout)
out = listInstancesJSON(ctx, t)
if !hasAddress(out, inst.Address) || !hasAddress(out, addr127) {
t.Fatalf("expected both %s and %s present", inst.Address, addr127)
}
}
// 10. Start-stop stress: loop starting then killing instances; ensure no leftovers
func TestStartStopStress(t *testing.T) {
_ = setTempClineDir(t)
for i := 0; i < 3; i++ { // keep small for CI time
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Snapshot current addresses
before := listInstancesJSON(ctx, t)
beforeSet := map[string]struct{}{}
for _, it := range before.CoreInstances {
beforeSet[it.Address] = struct{}{}
}
// Start a new instance
_ = mustRunCLI(ctx, t, "instance", "new")
// Find the new instance address
var newAddr string
waitFor(t, defaultTimeout, func() (bool, string) {
after := listInstancesJSON(ctx, t)
for _, it := range after.CoreInstances {
if _, ok := beforeSet[it.Address]; !ok {
newAddr = it.Address
return true, ""
}
}
return false, "new instance address not detected yet"
})
// Wait healthy
waitForAddressHealthy(t, newAddr, defaultTimeout)
// Get PID using runtime discovery and kill it
after := listInstancesJSON(ctx, t)
info, ok := getByAddress(after, newAddr)
if !ok {
t.Fatalf("new instance %s missing", newAddr)
}
// Get PID using runtime discovery
corePID := getCorePID(t, info.Address)
if corePID <= 0 {
t.Fatalf("could not find PID for new instance at %s", info.Address)
}
t.Logf("Killing new instance %s (PID %d) for iteration %d", info.Address, corePID, i)
if err := syscall.Kill(corePID, syscall.SIGKILL); err != nil {
t.Fatalf("kill pid %d: %v", corePID, err)
}
// Wait removed from SQLite database
waitForAddressRemoved(t, newAddr, longTimeout)
// Verify instance is removed from SQLite database
clineDir := os.Getenv("CLINE_DIR")
if clineDir != "" {
dbPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "locks.db")
if verifyInstanceExistsInSQLite(t, dbPath, newAddr) {
t.Fatalf("expected instance removed from SQLite database: %s", newAddr)
}
}
// Clean up dangling host process (SIGKILL leaves these behind by design)
t.Logf("Cleaning up dangling host process on port %d for iteration %d", info.HostPort(), i)
findAndKillHostProcess(t, info.HostPort())
// Verify both ports are now free
waitForPortsClosed(t, info.CorePort(), info.HostPort(), defaultTimeout)
}
}
+161
View File
@@ -0,0 +1,161 @@
package e2e
import (
"database/sql"
"encoding/json"
"os"
"path/filepath"
"strconv"
"testing"
"time"
"github.com/cline/cli/pkg/common"
_ "github.com/glebarez/go-sqlite"
"google.golang.org/grpc/health/grpc_health_v1"
)
// readInstancesFromSQLite reads instances directly from the SQLite database for testing
func readInstancesFromSQLite(t *testing.T, clineDir string) []common.CoreInstanceInfo {
t.Helper()
dbPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "locks.db")
// Check if database exists
if _, err := os.Stat(dbPath); os.IsNotExist(err) {
return []common.CoreInstanceInfo{}
}
db, err := sql.Open("sqlite", dbPath)
if err != nil {
t.Logf("Warning: Failed to open SQLite database: %v", err)
return []common.CoreInstanceInfo{}
}
defer db.Close()
// Query instance locks
query := common.SelectInstanceLockHoldersAscSQL
rows, err := db.Query(query)
if err != nil {
t.Logf("Warning: Failed to query instance locks: %v", err)
return []common.CoreInstanceInfo{}
}
defer rows.Close()
var instances []common.CoreInstanceInfo
for rows.Next() {
var heldBy, lockTarget string
var lockedAt int64
err := rows.Scan(&heldBy, &lockTarget, &lockedAt)
if err != nil {
t.Logf("Warning: Failed to scan lock row: %v", err)
continue
}
// Create InstanceInfo
info := common.CoreInstanceInfo{
Address: heldBy,
HostServiceAddress: lockTarget,
Status: grpc_health_v1.HealthCheckResponse_UNKNOWN, // Will be updated by health check
LastSeen: time.Unix(lockedAt/1000, 0), // Convert from milliseconds
}
instances = append(instances, info)
}
return instances
}
// readDefaultInstanceFromSettings reads the default instance from the settings file
func readDefaultInstanceFromSettings(t *testing.T, clineDir string) string {
t.Helper()
settingsPath := filepath.Join(clineDir, common.SETTINGS_SUBFOLDER, "settings", "cli-default-instance.json")
data, err := os.ReadFile(settingsPath)
if err != nil {
if os.IsNotExist(err) {
return ""
}
t.Logf("Warning: Failed to read default instance file: %v", err)
return ""
}
var tmp struct {
DefaultInstance string `json:"default_instance"`
}
if err := json.Unmarshal(data, &tmp); err != nil {
t.Logf("Warning: Failed to parse default instance file: %v", err)
return ""
}
return tmp.DefaultInstance
}
// insertRemoteInstanceIntoSQLite inserts a remote instance entry directly into SQLite for testing
func insertRemoteInstanceIntoSQLite(t *testing.T, dbPath, address string, corePort, hostPort int) error {
t.Helper()
db, err := sql.Open("sqlite", dbPath)
if err != nil {
return err
}
defer db.Close()
// Initialize database schema for testing
createTableSQL := `
CREATE TABLE IF NOT EXISTS locks (
id INTEGER PRIMARY KEY,
held_by TEXT NOT NULL,
lock_type TEXT NOT NULL CHECK (lock_type IN ('file', 'instance', 'folder')),
lock_target TEXT NOT NULL,
locked_at INTEGER NOT NULL,
UNIQUE(lock_type, lock_target)
);
`
createIndexesSQL := `
CREATE INDEX IF NOT EXISTS idx_locks_held_by ON locks(held_by);
CREATE INDEX IF NOT EXISTS idx_locks_type ON locks(lock_type);
CREATE INDEX IF NOT EXISTS idx_locks_target ON locks(lock_target);
`
if _, err := db.Exec(createTableSQL); err != nil {
return err
}
if _, err := db.Exec(createIndexesSQL); err != nil {
return err
}
// Insert the remote instance
hostAddress := "remote.example.com:0"
if hostPort != 0 {
hostAddress = "remote.example.com:" + strconv.Itoa(hostPort)
}
insertSQL := `INSERT INTO locks (held_by, lock_type, lock_target, locked_at) VALUES (?, 'instance', ?, ?)`
_, err = db.Exec(insertSQL, address, hostAddress, time.Now().Unix()*1000)
return err
}
// verifyInstanceExistsInSQLite checks if an instance exists in the SQLite database
func verifyInstanceExistsInSQLite(t *testing.T, dbPath, address string) bool {
t.Helper()
db, err := sql.Open("sqlite", dbPath)
if err != nil {
t.Logf("Failed to open database: %v", err)
return false
}
defer db.Close()
query := `SELECT COUNT(*) FROM locks WHERE held_by = ? AND lock_type = 'instance'`
var count int
err = db.QueryRow(query, address).Scan(&count)
if err != nil {
t.Logf("Failed to query database: %v", err)
return false
}
return count > 0
}
+178
View File
@@ -0,0 +1,178 @@
package e2e
import (
"context"
"fmt"
"syscall"
"testing"
)
// TestStartAndList verifies self-registration and default.json semantics in a fresh CLINE_DIR.
func TestStartAndList(t *testing.T) {
clineDir := setTempClineDir(t)
t.Logf("Using temp CLINE_DIR: %s", clineDir)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
t.Logf("Starting new instance...")
// Start a new instance
startOutput := mustRunCLI(ctx, t, "instance", "new")
t.Logf("Instance start output: %s", startOutput)
t.Logf("Listing instances to check registration...")
// It should appear healthy in list JSON and be the default.
out := listInstancesJSON(ctx, t)
t.Logf("Found %d instances after start", len(out.CoreInstances))
if len(out.CoreInstances) != 1 {
t.Fatalf("expected 1 instance, got %d", len(out.CoreInstances))
}
addr := out.CoreInstances[0].Address
t.Logf("Instance address: %s, status: %s", addr, out.CoreInstances[0].Status)
t.Logf("Waiting for address %s to become healthy...", addr)
waitForAddressHealthy(t, addr, defaultTimeout)
t.Logf("Address %s is now healthy", addr)
t.Logf("Checking default instance configuration...")
// Default should be set to the new instance.
out = listInstancesJSON(ctx, t)
t.Logf("Default instance: %s", out.DefaultInstance)
if out.DefaultInstance == "" {
t.Fatalf("default_instance not set")
}
if out.DefaultInstance != out.CoreInstances[0].Address {
t.Fatalf("expected default_instance=%s, got %s", out.CoreInstances[0].Address, out.DefaultInstance)
}
t.Logf("TestStartAndList completed successfully")
}
// TestTaskNewDefault ensures tasks route to default instance.
func TestTaskNewDefault(t *testing.T) {
_ = setTempClineDir(t)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Start one instance and wait for healthy
_ = mustRunCLI(ctx, t, "instance", "new")
out := listInstancesJSON(ctx, t)
if len(out.CoreInstances) != 1 {
t.Fatalf("expected 1 instance, got %d", len(out.CoreInstances))
}
addr := out.CoreInstances[0].Address
waitForAddressHealthy(t, addr, defaultTimeout)
// Create a new task at default (success is sufficient)
_ = mustRunCLI(ctx, t, "task", "new", "hello world")
}
// TestExplicitAddressAutoStart verifies that giving an explicit address auto-starts an instance and routes the task.
func TestExplicitAddressAutoStart(t *testing.T) {
_ = setTempClineDir(t)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Find a free port and use explicit address. This should auto-start an instance.
port := findFreePort(t)
addr := "localhost:" + itoa(port)
// Run a task at explicit address (auto-start path)
_ = mustRunCLI(ctx, t, "task", "new", "--address", "localhost:"+itoa(port), "explicit address task")
// Verify the instance is present and healthy
waitForAddressHealthy(t, addr, defaultTimeout)
}
// TestCrashCleanup verifies that after SIGKILL of a local core, the cleanup removes the registry entry.
// Also tests graceful shutdown (SIGTERM) vs crash cleanup and ensures no dangling host processes.
func TestCrashCleanup(t *testing.T) {
_ = setTempClineDir(t)
ctx, cancel := context.WithTimeout(context.Background(), longTimeout)
defer cancel()
// Start two instances for testing both graceful and crash scenarios
_ = mustRunCLI(ctx, t, "instance", "new")
_ = mustRunCLI(ctx, t, "instance", "new")
out := listInstancesJSON(ctx, t)
if len(out.CoreInstances) < 2 {
t.Fatalf("expected at least 2 instances, got %d", len(out.CoreInstances))
}
// Test 1: Graceful shutdown (SIGTERM) - should clean up both processes
gracefulTarget := out.CoreInstances[0]
waitForAddressHealthy(t, gracefulTarget.Address, defaultTimeout)
// Get PID using runtime discovery
gracefulPID := getCorePID(t, gracefulTarget.Address)
if gracefulPID <= 0 {
t.Fatalf("could not find PID for graceful target at %s", gracefulTarget.Address)
}
t.Logf("Testing graceful shutdown (SIGTERM) for instance %s (PID %d)", gracefulTarget.Address, gracefulPID)
if err := syscall.Kill(gracefulPID, syscall.SIGTERM); err != nil {
t.Fatalf("kill SIGTERM pid %d: %v", gracefulPID, err)
}
// Wait for registry cleanup
waitForAddressRemoved(t, gracefulTarget.Address, longTimeout)
// Verify both core and host ports are freed (no dangling processes)
waitForPortsClosed(t, gracefulTarget.CorePort(), gracefulTarget.HostPort(), defaultTimeout)
// Verify the instance is removed from SQLite (no file to check anymore)
// The waitForAddressRemoved already confirms the instance is gone from the registry
// Test 2: Crash cleanup (SIGKILL) - creates dangling host process that we must clean up
crashTarget := out.CoreInstances[1]
waitForAddressHealthy(t, crashTarget.Address, defaultTimeout)
// Get PID using runtime discovery
crashPID := getCorePID(t, crashTarget.Address)
if crashPID <= 0 {
t.Fatalf("could not find PID for crash target at %s", crashTarget.Address)
}
t.Logf("Testing crash cleanup (SIGKILL) for instance %s (PID %d)", crashTarget.Address, crashPID)
if err := syscall.Kill(crashPID, syscall.SIGKILL); err != nil {
t.Fatalf("kill SIGKILL pid %d: %v", crashPID, err)
}
// Wait for registry cleanup
waitForAddressRemoved(t, crashTarget.Address, longTimeout)
// Verify the instance is removed from SQLite (no file to check anymore)
// The waitForAddressRemoved already confirms the instance is gone from the registry
// Clean up dangling host process (SIGKILL leaves these behind by design)
t.Logf("Cleaning up dangling host process %s", crashTarget.HostServiceAddress)
findAndKillHostProcess(t, crashTarget.HostPort())
// Verify both ports are now free
waitForPortsClosed(t, crashTarget.CorePort(), crashTarget.HostPort(), defaultTimeout)
}
// itoa is a small helper for readability
func itoa(i int) string {
return strconvItoa(i)
}
// minimal inline int->string to avoid extra imports in helpers
func strconvItoa(i int) string {
// simple fast path
return fmtInt(i)
}
func fmtInt(i int) string {
// allocate small buffer; ints here are short
return (func(n int) string {
return fmt.Sprintf("%d", n)
})(i)
}
+64
View File
@@ -0,0 +1,64 @@
module github.com/cline/cli
go 1.23.0
require (
github.com/atotto/clipboard v0.1.4
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7
github.com/charmbracelet/bubbletea v1.3.6
github.com/charmbracelet/glamour v0.10.0
github.com/charmbracelet/huh v0.7.1-0.20251005153135-a01a1e304532
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
github.com/cline/grpc-go v0.0.0
github.com/glebarez/go-sqlite v1.22.0
github.com/muesli/termenv v0.16.0
github.com/spf13/cobra v1.8.0
golang.org/x/term v0.32.0
google.golang.org/grpc v1.75.0
google.golang.org/protobuf v1.36.6
)
replace github.com/cline/grpc-go => ../src/generated/grpc-go
require (
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/catppuccin/go v0.3.0 // indirect
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
github.com/charmbracelet/x/ansi v0.9.3 // indirect
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.5 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.26.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
modernc.org/libc v1.37.6 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.28.0 // indirect
)
+162
View File
@@ -0,0 +1,162 @@
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY=
github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY=
github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc=
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws=
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7/go.mod h1:ISC1gtLcVilLOf23wvTfoQuYbW2q0JevFxPfUzZ9Ybw=
github.com/charmbracelet/bubbletea v1.3.6 h1:VkHIxPJQeDt0aFJIsVxw8BQdh/F/L2KKZGsK6et5taU=
github.com/charmbracelet/bubbletea v1.3.6/go.mod h1:oQD9VCRQFF8KplacJLo28/jofOI2ToOfGYeFgBBxHOc=
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
github.com/charmbracelet/glamour v0.10.0 h1:MtZvfwsYCx8jEPFJm3rIBFIMZUfUJ765oX8V6kXldcY=
github.com/charmbracelet/glamour v0.10.0/go.mod h1:f+uf+I/ChNmqo087elLnVdCiVgjSKWuXa/l6NU2ndYk=
github.com/charmbracelet/huh v0.7.1-0.20251005153135-a01a1e304532 h1:+xmbw70JXxmsOqvm1PEIAqFnqI/Hy2RYqrK7CtPmsNY=
github.com/charmbracelet/huh v0.7.1-0.20251005153135-a01a1e304532/go.mod h1:5YVc+SlZ1IhQALxRPpkGwwEKftN/+OlJlnJYlDRFqN4=
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 h1:ZR7e0ro+SZZiIZD7msJyA+NjkCNNavuiPBLgerbOziE=
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834/go.mod h1:aKC/t2arECF6rNOnaKaVU6y4t4ZeHQzqfxedE/VkVhA=
github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0=
github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k=
github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
github.com/charmbracelet/x/conpty v0.1.0 h1:4zc8KaIcbiL4mghEON8D72agYtSeIgq8FSThSPQIb+U=
github.com/charmbracelet/x/conpty v0.1.0/go.mod h1:rMFsDJoDwVmiYM10aD4bH2XiRgwI7NYJtQgl5yskjEQ=
github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 h1:JSt3B+U9iqk37QUU2Rvb6DSBYRLtWqFqfxf8l5hOZUA=
github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86/go.mod h1:2P0UgXMEa6TsToMSuFqKFQR+fZTO9CNGUNokkPatT/0=
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ=
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf h1:rLG0Yb6MQSDKdB52aGX55JT1oi0P0Kuaj7wi1bLUpnI=
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf/go.mod h1:B3UgsnsBZS/eX42BlaNiJkD1pPOUa+oF1IYC6Yd2CEU=
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 h1:qko3AQ4gK1MTS/de7F5hPGx6/k1u0w4TeYmBFwzYVP4=
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0/go.mod h1:pBhA0ybfXv6hDjQUZ7hk1lVxBiUbupdw5R31yPUViVQ=
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=
github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
github.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI=
github.com/charmbracelet/x/xpty v0.1.2/go.mod h1:XK2Z0id5rtLWcpeNiMYBccNNBrP2IJnzHI0Lq13Xzq4=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ=
github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-emoji v1.0.5 h1:EMVWyCGPlXJfUXBXpuMu+ii3TIaxbVBnEX9uaDC4cIk=
github.com/yuin/goldmark-emoji v1.0.5/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/libc v1.37.6 h1:orZH3c5wmhIQFTXF+Nt+eeauyd+ZIt2BX6ARe+kD+aw=
modernc.org/libc v1.37.6/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ=
modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
+331
View File
@@ -0,0 +1,331 @@
.\" Automatically generated by Pandoc 3.8.2
.\"
.TH "CLINE" "1" "January 2025" "Cline CLI 1.0" "User Commands"
.SH NAME
cline \- orchestrate and interact with Cline AI coding agents
.SH SYNOPSIS
\f[B]cline\f[R] [\f[I]prompt\f[R]] [\f[I]options\f[R]]
.PP
\f[B]cline\f[R] \f[I]command\f[R] [\f[I]subcommand\f[R]]
[\f[I]options\f[R]] [\f[I]arguments\f[R]]
.SH DESCRIPTION
Try: cat README.md | cline \(lqSummarize this for me:\(rq
.PP
\f[B]cline\f[R] is a command\-line interface for orchestrating multiple
Cline AI coding agents.
Cline is an autonomous AI agent who can read, write, and execute code
across your projects.
He operates through a client\-server architecture where \f[B]Cline
Core\f[R] runs as a standalone service, and the CLI acts as a scriptable
interface for managing tasks, instances, and agent interactions.
.PP
The CLI is designed for both interactive use and automation, making it
ideal for CI/CD pipelines, parallel task execution, and terminal\-based
workflows.
Multiple frontends (CLI, VSCode, JetBrains) can attach to the same Cline
Core instance, enabling seamless task handoff between environments.
.SH MODES OF OPERATION
.TP
\f[B]Instant Task Mode\f[R]
The simplest invocation: \f[B]cline \(lqprompt here\(rq\f[R] immediately
spawns an instance, creates a task, and enters chat mode.
This is equivalent to running \f[B]cline instance new && cline task new
&& cline task chat\f[R] in sequence.
.TP
\f[B]Subcommand Mode\f[R]
Advanced usage with explicit control: \f[B]cline <command> [subcommand]
[options]\f[R] provides fine\-grained control over instances, tasks,
authentication, and configuration.
.SH AGENT BEHAVIOR
Cline operates in two primary modes:
.TP
\f[B]ACT MODE\f[R]
Cline actively uses tools to accomplish tasks.
He can read files, write code, execute commands, use a headless browser,
and more.
This is the default mode for task execution.
.TP
\f[B]PLAN MODE\f[R]
Cline gathers information and creates a detailed plan before
implementation.
He explores the codebase, asks clarifying questions, and presents a
strategy for user approval before switching to ACT MODE.
.SH INSTANT TASK OPTIONS
When using the instant task syntax \f[B]cline \(lqprompt\(rq\f[R] the
following options are available:
.TP
\f[B]\-o\f[R], \f[B]\-\-oneshot\f[R]
Full autonomous mode.
Cline completes the task and stops following after completion.
Example: cline \-o \(lqwhat\(cqs 6 + 8?\(rq
.TP
\f[B]\-s\f[R], \f[B]\-\-setting\f[R] \f[I]setting\f[R] \f[I]value\f[R]
Override a setting for this task
.TP
\f[B]\-y\f[R], \f[B]\-\-no\-interactive\f[R], \f[B]\-\-yolo\f[R]
Enable fully autonomous mode.
Disables all interactivity:
.RS
.IP \(bu 2
ask_followup_question tool is disabled
.IP \(bu 2
attempt_completion happens automatically
.IP \(bu 2
execute_command runs in non\-blocking mode with timeout
.IP \(bu 2
PLAN MODE automatically switches to ACT MODE
.RE
.TP
\f[B]\-m\f[R], \f[B]\-\-mode\f[R] \f[I]mode\f[R]
Starting mode.
Options: \f[B]act\f[R] (default), \f[B]plan\f[R]
.SH GLOBAL OPTIONS
These options apply to all subcommands:
.TP
\f[B]\-F\f[R], \f[B]\-\-output\-format\f[R] \f[I]format\f[R]
Output format.
Options: \f[B]rich\f[R] (default), \f[B]json\f[R], \f[B]plain\f[R]
.TP
\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Display help information for the command.
.TP
\f[B]\-v\f[R], \f[B]\-\-verbose\f[R]
Enable verbose output for debugging.
.SH COMMANDS
.SS Authentication
\f[B]cline auth\f[R] [\f[I]provider\f[R]] [\f[I]key\f[R]]
.TP
\f[B]cline a\f[R] [\f[I]provider\f[R]] [\f[I]key\f[R]]
Configure authentication for AI model providers.
Launches an interactive wizard if no arguments provided.
If provider is specified without a key, prompts for the key or launches
the appropriate OAuth flow.
.SS Instance Management
Cline Core instances are independent agent processes that can run in the
background.
Multiple instances can run simultaneously, enabling parallel task
execution.
.PP
\f[B]cline instance\f[R]
.TP
\f[B]cline i\f[R]
Display instance management help.
.PP
\f[B]cline instance new\f[R] [\f[B]\-d\f[R]|\f[B]\-\-default\f[R]]
.TP
\f[B]cline i n\f[R] [\f[B]\-d\f[R]|\f[B]\-\-default\f[R]]
Spawn a new Cline Core instance.
Use \f[B]\-\-default\f[R] to set it as the default instance for
subsequent commands.
.PP
\f[B]cline instance list\f[R]
.TP
\f[B]cline i l\f[R]
List all running Cline Core instances with their addresses and status.
.PP
\f[B]cline instance default\f[R] \f[I]address\f[R]
.TP
\f[B]cline i d\f[R] \f[I]address\f[R]
Set the default instance to avoid specifying \f[B]\-\-address\f[R] in
task commands.
.PP
\f[B]cline instance kill\f[R] \f[I]address\f[R]
[\f[B]\-a\f[R]|\f[B]\-\-all\f[R]]
.TP
\f[B]cline i k\f[R] \f[I]address\f[R] [\f[B]\-a\f[R]|\f[B]\-\-all\f[R]]
Terminate a Cline Core instance.
Use \f[B]\-\-all\f[R] to kill all running instances.
.SS Task Management
Tasks represent individual work items that Cline executes.
Tasks maintain conversation history, checkpoints, and settings.
.PP
\f[B]cline task\f[R] [\f[B]\-a\f[R]|\f[B]\-\-address\f[R]
\f[I]ADDR\f[R]]
.TP
\f[B]cline t\f[R] [\f[B]\-a\f[R]|\f[B]\-\-address\f[R] \f[I]ADDR\f[R]]
Display task management help.
The \f[B]\-\-address\f[R] flag specifies which Cline Core instance to
use (e.g., localhost:50052).
.PP
\f[B]cline task new\f[R] \f[I]prompt\f[R] [\f[I]options\f[R]]
.TP
\f[B]cline t n\f[R] \f[I]prompt\f[R] [\f[I]options\f[R]]
Create a new task in the default or specified instance.
Options:
.RS
.TP
\f[B]\-s\f[R], \f[B]\-\-setting\f[R] \f[I]setting\f[R] \f[I]value\f[R]
Set task\-specific settings
.TP
\f[B]\-y\f[R], \f[B]\-\-no\-interactive\f[R], \f[B]\-\-yolo\f[R]
Enable autonomous mode
.TP
\f[B]\-m\f[R], \f[B]\-\-mode\f[R] \f[I]mode\f[R]
Starting mode (act or plan)
.RE
.PP
\f[B]cline task open\f[R] \f[I]task\-id\f[R] [\f[I]options\f[R]]
.TP
\f[B]cline t o\f[R] \f[I]task\-id\f[R] [\f[I]options\f[R]]
Resume a previous task from history.
Accepts the same options as \f[B]task new\f[R].
.PP
\f[B]cline task list\f[R]
.TP
\f[B]cline t l\f[R]
List all tasks in history with their id and snippet
.PP
\f[B]cline task chat\f[R]
.TP
\f[B]cline t c\f[R]
Enter interactive chat mode for the current task.
Allows back\-and\-forth conversation with Cline.
.PP
\f[B]cline task send\f[R] [\f[I]message\f[R]] [\f[I]options\f[R]]
.TP
\f[B]cline t s\f[R] [\f[I]message\f[R]] [\f[I]options\f[R]]
Send a message to Cline.
If no message is provided, reads from stdin.
Options:
.RS
.TP
\f[B]\-a\f[R], \f[B]\-\-approve\f[R]
Approve Cline\(cqs proposed action
.TP
\f[B]\-d\f[R], \f[B]\-\-deny\f[R]
Deny Cline\(cqs proposed action
.TP
\f[B]\-f\f[R], \f[B]\-\-file\f[R] \f[I]FILE\f[R]
Attach a file to the message
.TP
\f[B]\-y\f[R], \f[B]\-\-no\-interactive\f[R], \f[B]\-\-yolo\f[R]
Enable autonomous mode
.TP
\f[B]\-m\f[R], \f[B]\-\-mode\f[R] \f[I]mode\f[R]
Switch mode (act or plan)
.RE
.PP
\f[B]cline task view\f[R] [\f[B]\-f\f[R]|\f[B]\-\-follow\f[R]]
[\f[B]\-c\f[R]|\f[B]\-\-follow\-complete\f[R]]
.TP
\f[B]cline t v\f[R] [\f[B]\-f\f[R]|\f[B]\-\-follow\f[R]] [\f[B]\-c\f[R]|\f[B]\-\-follow\-complete\f[R]]
Display the current conversation.
Use \f[B]\-\-follow\f[R] to stream updates in real\-time, or
\f[B]\-\-follow\-complete\f[R] to follow until task completion.
.PP
\f[B]cline task restore\f[R] \f[I]checkpoint\f[R]
.TP
\f[B]cline t r\f[R] \f[I]checkpoint\f[R]
Restore the task to a previous checkpoint state.
.PP
\f[B]cline task pause\f[R]
.TP
\f[B]cline t p\f[R]
Pause task execution.
.SS Configuration
Configuration can be set globally.
Override these global settings for a task using the
\f[B]\-\-setting\f[R] flag
.PP
\f[B]cline config\f[R]
.PP
\f[B]cline c\f[R]
.PP
\f[B]cline config set\f[R] \f[I]key\f[R] \f[I]value\f[R]
.TP
\f[B]cline c s\f[R] \f[I]key\f[R] \f[I]value\f[R]
Set a configuration variable.
.PP
\f[B]cline config get\f[R] \f[I]key\f[R]
.TP
\f[B]cline c g\f[R] \f[I]key\f[R]
Read a configuration variable.
.PP
\f[B]cline config list\f[R]
.TP
\f[B]cline c l\f[R]
List all configuration variables and their values.
.SH TASK SETTINGS
Task settings are persisted in the \f[I]\(ti/.cline/x/tasks\f[R]
directory.
When resuming a task with \f[B]cline task open\f[R], task settings are
automatically restored.
.PP
Common settings include:
.TP
\f[B]yolo\f[R]
Enable autonomous mode (true/false)
.TP
\f[B]mode\f[R]
Starting mode (act/plan)
.SH NOTES & EXAMPLES
The \f[B]cline task send\f[R] and \f[B]cline task new\f[R] commands
support reading from stdin, enabling powerful pipeline compositions:
.IP
.EX
cat requirements.txt \f[B]|\f[R] cline task send
echo \(dqRefactor this code\(dq \f[B]|\f[R] cline \-y
.EE
.SS Instance Management
Manage multiple Cline instances:
.IP
.EX
\f[I]# Start a new instance and make it default\f[R]
cline instance new \-\-default
\f[I]# List all running instances\f[R]
cline instance list
\f[I]# Kill a specific instance\f[R]
cline instance kill localhost:50052
\f[I]# Kill all CLI instances\f[R]
cline instance kill \-\-all\-cli
.EE
.SS Task History
Work with task history:
.IP
.EX
\f[I]# List previous tasks\f[R]
cline task list
\f[I]# Resume a previous task\f[R]
cline task open 1760501486669
\f[I]# View conversation history\f[R]
cline task view
\f[I]# Start interactive chat with this task\f[R]
cline task chat
.EE
.SH ARCHITECTURE
Cline operates on a three\-layer architecture:
.TP
\f[B]Presentation Layer\f[R]
User interfaces (CLI, VSCode, JetBrains) that connect to Cline Core via
gRPC
.TP
\f[B]Cline Core\f[R]
The autonomous agent service handling task management, AI model
integration, state management, tool orchestration, and real\-time
streaming updates
.TP
\f[B]Host Provider Layer\f[R]
Environment\-specific integrations (VSCode APIs, JetBrains APIs, shell
APIs) that Cline Core uses to interact with the host system
.SH BUGS
Report bugs at: \c
.UR https://github.com/cline/cline/issues
.UE \c
.PP
For real\-time help, join the Discord community at: \c
.UR https://discord.gg/cline
.UE \c
.SH SEE ALSO
Full documentation: \c
.UR https://docs.cline.bot
.UE \c
.SH AUTHORS
Cline is developed by the Cline Bot Inc.\ and the open source community.
.SH COPYRIGHT
Copyright © 2025 Cline Bot Inc.\ Licensed under the Apache License 2.0.
+332
View File
@@ -0,0 +1,332 @@
---
title: CLINE
section: 1
header: User Commands
footer: Cline CLI 1.0
date: January 2025
---
# NAME
cline - orchestrate and interact with Cline AI coding agents
# SYNOPSIS
**cline** [*prompt*] [*options*]
**cline** *command* [*subcommand*] [*options*] [*arguments*]
# DESCRIPTION
Try: cat README.md | cline "Summarize this for me:"
**cline** is a command-line interface for orchestrating multiple Cline AI coding agents. Cline is an autonomous AI agent who can read, write, and execute code across your projects. He operates through a client-server architecture where **Cline Core** runs as a standalone service, and the CLI acts as a scriptable interface for managing tasks, instances, and agent interactions.
The CLI is designed for both interactive use and automation, making it ideal for CI/CD pipelines, parallel task execution, and terminal-based workflows. Multiple frontends (CLI, VSCode, JetBrains) can attach to the same Cline Core instance, enabling seamless task handoff between environments.
# MODES OF OPERATION
**Instant Task Mode**
: The simplest invocation: **cline "prompt here"** immediately spawns an instance, creates a task, and enters chat mode. This is equivalent to running **cline instance new && cline task new && cline task chat** in sequence.
**Subcommand Mode**
: Advanced usage with explicit control: **cline \<command\> [subcommand] [options]** provides fine-grained control over instances, tasks, authentication, and configuration.
# AGENT BEHAVIOR
Cline operates in two primary modes:
**ACT MODE**
: Cline actively uses tools to accomplish tasks. He can read files, write code, execute commands, use a headless browser, and more. This is the default mode for task execution.
**PLAN MODE**
: Cline gathers information and creates a detailed plan before implementation. He explores the codebase, asks clarifying questions, and presents a strategy for user approval before switching to ACT MODE.
# INSTANT TASK OPTIONS
When using the instant task syntax **cline "prompt"** the following options are available:
**-o**, **\--oneshot**
: Full autonomous mode. Cline completes the task and stops following after completion. Example: cline -o "what's 6 + 8?"
**-s**, **\--setting** *setting* *value*
: Override a setting for this task
**-y**, **\--no-interactive**, **\--yolo**
: Enable fully autonomous mode. Disables all interactivity:
- ask_followup_question tool is disabled
- attempt_completion happens automatically
- execute_command runs in non-blocking mode with timeout
- PLAN MODE automatically switches to ACT MODE
**-m**, **\--mode** *mode*
: Starting mode. Options: **act** (default), **plan**
# GLOBAL OPTIONS
These options apply to all subcommands:
**-F**, **\--output-format** *format*
: Output format. Options: **rich** (default), **json**, **plain**
**-h**, **\--help**
: Display help information for the command.
**-v**, **\--verbose**
: Enable verbose output for debugging.
# COMMANDS
## Authentication
**cline auth** [*provider*] [*key*]
**cline a** [*provider*] [*key*]
: Configure authentication for AI model providers. Launches an interactive wizard if no arguments provided. If provider is specified without a key, prompts for the key or launches the appropriate OAuth flow.
## Instance Management
Cline Core instances are independent agent processes that can run in the background. Multiple instances can run simultaneously, enabling parallel task execution.
**cline instance**
**cline i**
: Display instance management help.
**cline instance new** [**-d**|**\--default**]
**cline i n** [**-d**|**\--default**]
: Spawn a new Cline Core instance. Use **\--default** to set it as the default instance for subsequent commands.
**cline instance list**
**cline i l**
: List all running Cline Core instances with their addresses and status.
**cline instance default** *address*
**cline i d** *address*
: Set the default instance to avoid specifying **\--address** in task commands.
**cline instance kill** *address* [**-a**|**\--all**]
**cline i k** *address* [**-a**|**\--all**]
: Terminate a Cline Core instance. Use **\--all** to kill all running instances.
## Task Management
Tasks represent individual work items that Cline executes. Tasks maintain conversation history, checkpoints, and settings.
**cline task** [**-a**|**\--address** *ADDR*]
**cline t** [**-a**|**\--address** *ADDR*]
: Display task management help. The **\--address** flag specifies which Cline Core instance to use (e.g., localhost:50052).
**cline task new** *prompt* [*options*]
**cline t n** *prompt* [*options*]
: Create a new task in the default or specified instance. Options:
**-s**, **\--setting** *setting* *value*
: Set task-specific settings
**-y**, **\--no-interactive**, **\--yolo**
: Enable autonomous mode
**-m**, **\--mode** *mode*
: Starting mode (act or plan)
**cline task open** *task-id* [*options*]
**cline t o** *task-id* [*options*]
: Resume a previous task from history. Accepts the same options as **task new**.
**cline task list**
**cline t l**
: List all tasks in history with their id and snippet
**cline task chat**
**cline t c**
: Enter interactive chat mode for the current task. Allows back-and-forth conversation with Cline.
**cline task send** [*message*] [*options*]
**cline t s** [*message*] [*options*]
: Send a message to Cline. If no message is provided, reads from stdin. Options:
**-a**, **\--approve**
: Approve Cline's proposed action
**-d**, **\--deny**
: Deny Cline's proposed action
**-f**, **\--file** *FILE*
: Attach a file to the message
**-y**, **\--no-interactive**, **\--yolo**
: Enable autonomous mode
**-m**, **\--mode** *mode*
: Switch mode (act or plan)
**cline task view** [**-f**|**\--follow**] [**-c**|**\--follow-complete**]
**cline t v** [**-f**|**\--follow**] [**-c**|**\--follow-complete**]
: Display the current conversation. Use **\--follow** to stream updates in real-time, or **\--follow-complete** to follow until task completion.
**cline task restore** *checkpoint*
**cline t r** *checkpoint*
: Restore the task to a previous checkpoint state.
**cline task pause**
**cline t p**
: Pause task execution.
## Configuration
Configuration can be set globally. Override these global settings for a task using the **\--setting** flag
**cline config**
**cline c**
**cline config set** *key* *value*
**cline c s** *key* *value*
: Set a configuration variable.
**cline config get** *key*
**cline c g** *key*
: Read a configuration variable.
**cline config list**
**cline c l**
: List all configuration variables and their values.
# TASK SETTINGS
Task settings are persisted in the *~/.cline/x/tasks* directory. When resuming a task with **cline task open**, task settings are automatically restored.
Common settings include:
**yolo**
: Enable autonomous mode (true/false)
**mode**
: Starting mode (act/plan)
# NOTES & EXAMPLES
The **cline task send** and **cline task new** commands support reading from stdin, enabling powerful pipeline compositions:
```bash
cat requirements.txt | cline task send
echo "Refactor this code" | cline -y
```
## Instance Management
Manage multiple Cline instances:
```bash
# Start a new instance and make it default
cline instance new --default
# List all running instances
cline instance list
# Kill a specific instance
cline instance kill localhost:50052
# Kill all CLI instances
cline instance kill --all-cli
```
## Task History
Work with task history:
```bash
# List previous tasks
cline task list
# Resume a previous task
cline task open 1760501486669
# View conversation history
cline task view
# Start interactive chat with this task
cline task chat
```
# ARCHITECTURE
Cline operates on a three-layer architecture:
**Presentation Layer**
: User interfaces (CLI, VSCode, JetBrains) that connect to Cline Core via gRPC
**Cline Core**
: The autonomous agent service handling task management, AI model integration, state management, tool orchestration, and real-time streaming updates
**Host Provider Layer**
: Environment-specific integrations (VSCode APIs, JetBrains APIs, shell APIs) that Cline Core uses to interact with the host system
# BUGS
Report bugs at: <https://github.com/cline/cline/issues>
For real-time help, join the Discord community at: <https://discord.gg/cline>
# SEE ALSO
Full documentation: <https://docs.cline.bot>
# AUTHORS
Cline is developed by the Cline Bot Inc. and the open source community.
# COPYRIGHT
Copyright © 2025 Cline Bot Inc. Licensed under the Apache License 2.0.
+68
View File
@@ -0,0 +1,68 @@
{
"name": "cline",
"version": "1.0.3",
"description": "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more",
"main": "cline-core.js",
"bin": {
"cline": "./bin/cline",
"cline-host": "./bin/cline-host"
},
"man": "./man/cline.1",
"scripts": {
"postinstall": "node postinstall.js"
},
"bundleDependencies": [
"@grpc/grpc-js",
"@grpc/reflection",
"better-sqlite3",
"grpc-health-check",
"open",
"vscode-uri"
],
"engines": {
"node": ">=20.0.0"
},
"keywords": [
"cline",
"claude",
"dev",
"mcp",
"openrouter",
"coding",
"agent",
"autonomous",
"chatgpt",
"sonnet",
"ai",
"llama",
"cli"
],
"author": {
"name": "Cline Bot Inc."
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/cline/cline"
},
"homepage": "https://cline.bot",
"bugs": {
"url": "https://github.com/cline/cline/issues"
},
"dependencies": {
"@grpc/grpc-js": "^1.13.3",
"@grpc/reflection": "^1.0.4",
"better-sqlite3": "^12.2.0",
"grpc-health-check": "^2.0.2",
"open": "^10.1.2",
"vscode-uri": "^3.1.0"
},
"os": [
"darwin",
"linux"
],
"cpu": [
"x64",
"arm64"
]
}
+43
View File
@@ -0,0 +1,43 @@
package cli
import (
"github.com/cline/cli/pkg/cli/auth"
"github.com/spf13/cobra"
)
func NewAuthCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "auth",
Short: "Authenticate a provider and configure what model is used",
Long: `Authenticate a provider and configure what model is used
Interactive Mode:
Run without flags to open an interactive menu where you can:
- Sign in to your Cline account
- Configure other LLM providers (Anthropic, OpenAI, etc.)
- Select and switch between AI models
- Manage provider settings
Quick Setup Mode:
Use flags to quickly configure a BYO provider non-interactively:
Examples:
cline auth --provider openai-native --apikey sk-xxx --modelid gpt-5
cline auth -p anthropic -k sk-ant-xxx -m claude-sonnet-4-5-20250929
cline auth -p openai-compatible -k xxx -m gpt-4 -b https://api.example.com/v1
Supported providers: openai-native, openai, anthropic, gemini, openrouter, xai, cerebras, ollama
Note: Bedrock provider requires interactive setup due to complex auth fields`,
RunE: func(cmd *cobra.Command, args []string) error {
return auth.RunAuthFlow(cmd.Context(), args)
},
}
// Add flags for quick setup mode
cmd.Flags().StringVarP(&auth.QuickProvider, "provider", "p", "", "Provider ID for quick setup (e.g., openai-native, anthropic)")
cmd.Flags().StringVarP(&auth.QuickAPIKey, "apikey", "k", "", "API key for the provider")
cmd.Flags().StringVarP(&auth.QuickModelID, "modelid", "m", "", "Model ID to configure (e.g., gpt-4o, claude-sonnet-4-5-20250929)")
cmd.Flags().StringVarP(&auth.QuickBaseURL, "baseurl", "b", "", "Base URL (optional, only for openai provider)")
return cmd
}
+285
View File
@@ -0,0 +1,285 @@
package auth
import (
"context"
"fmt"
"time"
"github.com/charmbracelet/huh"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/cli/pkg/cli/task"
"github.com/cline/grpc-go/cline"
)
var isSessionAuthenticated bool
// Cline provider specific code
func HandleClineAuth(ctx context.Context) error {
verboseLog("Authenticating with Cline...")
// Check if already authenticated
if IsAuthenticated(ctx) {
return signOutDialog(ctx)
}
// Perform sign in
if err := signIn(ctx); err != nil {
return err
}
fmt.Println()
verboseLog("✓ You are signed in!")
// Configure default Cline model after successful authentication
if err := configureDefaultClineModel(ctx); err != nil {
fmt.Printf("Warning: Could not configure default Cline model: %v\n", err)
fmt.Println("You can configure a model later with 'cline auth' and selecting 'Change Cline model'")
}
// Return to main auth menu after successful authentication
return HandleAuthMenuNoArgs(ctx)
}
func signOut(ctx context.Context) error {
client, err := global.GetDefaultClient(ctx)
if err != nil {
return err
}
if _, err = client.Account.AccountLogoutClicked(ctx, &cline.EmptyRequest{}); err != nil {
return err
}
isSessionAuthenticated = false
fmt.Println("You have been signed out of Cline.")
return nil
}
func signOutDialog(ctx context.Context) error {
var confirm bool
form := huh.NewForm(
huh.NewGroup(
huh.NewConfirm().
Title("You are already signed in to Cline.").
Description("Would you like to sign out?").
Value(&confirm),
),
)
if err := form.Run(); err != nil {
return nil
}
if confirm {
if err := signOut(ctx); err != nil {
fmt.Printf("Failed to sign out: %v\n", err)
return err
}
}
return HandleAuthMenuNoArgs(ctx)
}
func signIn(ctx context.Context) error {
if IsAuthenticated(ctx) {
return nil
}
// Subscribe to auth updates before initiating login
verboseLog("Subscribing to auth status updates...")
listener, err := NewAuthStatusListener(ctx)
if err != nil {
verboseLog("Failed to subscribe to auth updates: %v", err)
return fmt.Errorf("failed to subscribe to auth updates: %w", err)
}
defer listener.Stop()
if err := listener.Start(); err != nil {
verboseLog("Failed to start auth listener: %v", err)
return fmt.Errorf("failed to start auth listener: %w", err)
}
// Initiate login (opens browser with callback URL from cline-core's AuthHandler)
verboseLog("Initiating login...")
client, err := global.GetDefaultClient(ctx)
if err != nil {
verboseLog("Failed to obtain client: %v", err)
return fmt.Errorf("failed to obtain client: %w", err)
}
response, err := client.Account.AccountLoginClicked(ctx, &cline.EmptyRequest{})
if err != nil {
verboseLog("Failed to initiate login: %v", err)
return fmt.Errorf("failed to initiate login: %w", err)
}
fmt.Println("\n Opening browser for authentication...")
if response != nil && response.Value != "" {
fmt.Printf(" If the browser doesn't open automatically, visit this URL:\n %s\n\n", response.Value)
}
fmt.Println(" Waiting for you to complete authentication in your browser...")
fmt.Println(" (This may take a few moments. Timeout: 5 minutes)")
// Wait for auth status update confirming success
verboseLog("Waiting for authentication to complete...")
if err := listener.WaitForAuthentication(5 * time.Minute); err != nil {
verboseLog("Authentication failed or timed out: %v", err)
fmt.Println("\n Authentication failed or timed out.")
fmt.Println(" Please try again with 'cline auth'")
return err
}
// Only NOW set the session flag after confirmed authentication
isSessionAuthenticated = true
verboseLog("Login successful")
return nil
}
func IsAuthenticated(ctx context.Context) bool {
if isSessionAuthenticated {
verboseLog("Session is already authenticated")
return true
}
verboseLog("Verifying authentication with server...")
client, err := global.GetDefaultClient(ctx)
if err != nil {
verboseLog("Failed to get client for auth check: %v", err)
return false
}
_, err = client.Account.GetUserCredits(ctx, &cline.EmptyRequest{})
if err == nil {
// Update session variable for future fast-path checks
verboseLog("Server verification successful, updating session flag")
isSessionAuthenticated = true
return true
}
verboseLog("Server verification failed: %v", err)
return false
}
// HandleChangeClineModel allows Cline-authenticated users to change their Cline model selection. Hidden when not authenticated.
func HandleChangeClineModel(ctx context.Context) error {
// Ensure user is authenticated
if !IsAuthenticated(ctx) {
return fmt.Errorf("you must be authenticated with Cline to change models. Run 'cline auth' to sign in")
}
// Get task manager
manager, err := createTaskManager(ctx)
if err != nil {
return fmt.Errorf("failed to create task manager: %w", err)
}
// Launch Cline model selection
return SelectClineModel(ctx, manager)
}
// configureDefaultClineModel configures the default Cline model after authentication
func configureDefaultClineModel(ctx context.Context) error {
verboseLog("Configuring default Cline model...")
// Create task manager
manager, err := task.NewManagerForDefault(ctx)
if err != nil {
return fmt.Errorf("failed to create task manager: %w", err)
}
// Set default Cline model
return SetDefaultClineModel(ctx, manager)
}
// HandleSelectOrganization allows Cline-authenticated users to select which organization to use
func HandleSelectOrganization(ctx context.Context) error {
// Ensure user is authenticated
if !IsAuthenticated(ctx) {
return fmt.Errorf("you must be authenticated with Cline to select an organization. Run 'cline auth' to sign in")
}
// Get client
client, err := global.GetDefaultClient(ctx)
if err != nil {
return fmt.Errorf("failed to get client: %w", err)
}
// Fetch user organizations
orgsResponse, err := client.Account.GetUserOrganizations(ctx, &cline.EmptyRequest{})
if err != nil {
return fmt.Errorf("failed to fetch organizations: %w", err)
}
organizations := orgsResponse.GetOrganizations()
if len(organizations) == 0 {
fmt.Println("You don't have any organizations yet.")
fmt.Println("Visit https://app.cline.bot/dashboard to create an organization.")
return HandleAuthMenuNoArgs(ctx)
}
// Build options list: Personal + Organizations
var options []huh.Option[string]
options = append(options, huh.NewOption("Personal", "personal"))
for _, org := range organizations {
displayName := org.Name
// Show active indicator
if org.Active {
displayName = fmt.Sprintf("%s (active)", displayName)
}
options = append(options, huh.NewOption(displayName, org.OrganizationId))
}
options = append(options, huh.NewOption("(Cancel)", "cancel"))
// Show selection menu
var selected string
form := huh.NewForm(
huh.NewGroup(
huh.NewSelect[string]().
Title("Select which account to use").
Options(options...).
Value(&selected),
),
)
if err := form.Run(); err != nil {
return fmt.Errorf("failed to select organization: %w", err)
}
if selected == "cancel" {
return HandleAuthMenuNoArgs(ctx)
}
// Set the organization
var orgId *string
if selected != "personal" {
orgId = &selected
}
req := &cline.UserOrganizationUpdateRequest{
OrganizationId: orgId,
}
if _, err := client.Account.SetUserOrganization(ctx, req); err != nil {
return fmt.Errorf("failed to set organization: %w", err)
}
if selected == "personal" {
fmt.Println("✓ Switched to personal account")
} else {
// Find the org name to display
var orgName string
for _, org := range organizations {
if org.OrganizationId == selected {
orgName = org.Name
break
}
}
fmt.Printf("✓ Switched to organization: %s\n", orgName)
}
return HandleAuthMenuNoArgs(ctx)
}
+323
View File
@@ -0,0 +1,323 @@
package auth
import (
"context"
"fmt"
"github.com/charmbracelet/huh"
"github.com/cline/cli/pkg/cli/display"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/cli/pkg/cli/task"
"github.com/cline/grpc-go/cline"
)
// contextKey is a distinct type for context keys to avoid collisions
type contextKey string
const authInstanceAddressKey contextKey = "authInstanceAddress"
// AuthAction represents the type of authentication action
type AuthAction string
const (
AuthActionClineLogin AuthAction = "cline_login"
AuthActionBYOSetup AuthAction = "provider_setup"
AuthActionChangeClineModel AuthAction = "change_cline_model"
AuthActionSelectOrganization AuthAction = "select_organization"
AuthActionSelectProvider AuthAction = "select_provider"
AuthActionExit AuthAction = "exit_wizard"
)
// Cline Auth Menu
// Example Layout
//
// ┃ Cline Account: <authenticated/not authenticated>
// ┃ Active Provider: <provider name or none configured>
// ┃ Active Model: <model name or none configured>
// ┃
// ┃ What would you like to do?
// ┃ Change Cline model (only if authenticated) - hidden if not authenticated
// ┃ Authenticate with Cline account / Sign out of Cline - changes based on auth status
// ┃ Select active provider (Cline or BYO) - always shown. Used to switch between Cline and BYO providers
// ┃ Configure BYO API providers - always shown. Launches provider setup wizard
// ┃ Exit authorization wizard - always shown. Exits the auth menu
// RunAuthFlow is the entry point for the entire auth flow with instance management
// It spawns a fresh instance for auth operations and cleans it up when done
func RunAuthFlow(ctx context.Context, args []string) error {
// Spawn a fresh instance for auth operations
instanceInfo, err := global.Clients.StartNewInstance(ctx)
if err != nil {
return fmt.Errorf("failed to start auth instance: %w", err)
}
// Cleanup when done (success, error, or panic)
defer func() {
verboseLog("Shutting down auth instance at %s", instanceInfo.Address)
if err := global.KillInstanceByAddress(context.Background(), global.Clients.GetRegistry(), instanceInfo.Address); err != nil {
verboseLog("Warning: Failed to kill auth instance: %v", err)
}
}()
// Store instance address in context for all auth handlers to use
authCtx := context.WithValue(ctx, authInstanceAddressKey, instanceInfo.Address)
// Route to existing auth flow
return HandleAuthCommand(authCtx, args)
}
// Main entry point for handling the `cline auth` command
// HandleAuthCommand routes the auth command based on the number of arguments
func HandleAuthCommand(ctx context.Context, args []string) error {
// Check if flags are provided for quick setup
if QuickProvider != "" || QuickAPIKey != "" || QuickModelID != "" || QuickBaseURL != "" {
if QuickProvider == "" || QuickAPIKey == "" || QuickModelID == "" {
return fmt.Errorf("quick setup requires --provider, --apikey, and --modelid flags. Use 'cline auth --help' for more information")
}
return QuickSetupFromFlags(ctx, QuickProvider, QuickAPIKey, QuickModelID, QuickBaseURL)
}
switch len(args) {
case 0:
// No args: Show uth wizard
return HandleAuthMenuNoArgs(ctx)
case 1, 2, 3, 4:
fmt.Println("Invalid positional arguments. Correct usage:")
fmt.Println(" cline auth --provider <provider> --apikey <key> --modelid <model> --baseurl <optional>")
return nil
default:
return fmt.Errorf("too many arguments. Use flags for quick setup: --provider, --apikey, --modelid --baseurl(optional)")
}
}
// getAuthInstanceAddress retrieves the auth instance address from context
// Returns empty string if not found (falls back to default behavior)
func getAuthInstanceAddress(ctx context.Context) string {
if addr, ok := ctx.Value(authInstanceAddressKey).(string); ok {
return addr
}
return ""
}
// HandleAuthMenuNoArgs prepares the auth menu when no arguments are provided
func HandleAuthMenuNoArgs(ctx context.Context) error {
// Check if Cline is authenticated
isClineAuth := IsAuthenticated(ctx)
// Get current provider config for display
var currentProvider string
var currentModel string
if manager, err := createTaskManager(ctx); err == nil {
if providerList, err := GetProviderConfigurations(ctx, manager); err == nil {
if providerList.ActProvider != nil {
currentProvider = GetProviderDisplayName(providerList.ActProvider.Provider)
currentModel = providerList.ActProvider.ModelID
}
}
}
// Fetch organizations if authenticated
var hasOrganizations bool
if isClineAuth {
if client, err := global.GetDefaultClient(ctx); err == nil {
if orgsResponse, err := client.Account.GetUserOrganizations(ctx, &cline.EmptyRequest{}); err == nil {
hasOrganizations = len(orgsResponse.GetOrganizations()) > 0
}
}
}
action, err := ShowAuthMenuWithStatus(isClineAuth, hasOrganizations, currentProvider, currentModel)
if err != nil {
// Check if user cancelled - propagate for clean exit
if err == huh.ErrUserAborted {
return huh.ErrUserAborted
}
return err
}
switch action {
case AuthActionClineLogin:
return HandleClineAuth(ctx)
case AuthActionBYOSetup:
return HandleAPIProviderSetup(ctx)
case AuthActionChangeClineModel:
return HandleChangeClineModel(ctx)
case AuthActionSelectOrganization:
return HandleSelectOrganization(ctx)
case AuthActionSelectProvider:
return HandleSelectProvider(ctx)
case AuthActionExit:
return nil
default:
return fmt.Errorf("invalid action")
}
}
// ShowAuthMenuWithStatus displays the main auth menu with Cline + provider status
func ShowAuthMenuWithStatus(isClineAuthenticated bool, hasOrganizations bool, currentProvider, currentModel string) (AuthAction, error) {
var action AuthAction
var options []huh.Option[AuthAction]
// Build menu options based on authentication status
if isClineAuthenticated {
options = []huh.Option[AuthAction]{
huh.NewOption("Change Cline model", AuthActionChangeClineModel),
}
// Add organization selection if user has organizations
if hasOrganizations {
options = append(options, huh.NewOption("Select organization", AuthActionSelectOrganization))
}
options = append(options,
huh.NewOption("Sign out of Cline", AuthActionClineLogin),
huh.NewOption("Select active provider (Cline or BYO)", AuthActionSelectProvider),
huh.NewOption("Configure BYO API providers", AuthActionBYOSetup),
huh.NewOption("Exit authorization wizard", AuthActionExit),
)
} else {
options = []huh.Option[AuthAction]{
huh.NewOption("Authenticate with Cline account", AuthActionClineLogin),
huh.NewOption("Select active provider (Cline or BYO)", AuthActionSelectProvider),
huh.NewOption("Configure BYO API providers", AuthActionBYOSetup),
huh.NewOption("Exit authorization wizard", AuthActionExit),
}
}
// Determine menu title based on status
var title string
renderer := display.NewRenderer(global.Config.OutputFormat)
// Always show Cline authentication status
if isClineAuthenticated {
title = fmt.Sprintf("Cline Account: %s Authenticated\n", renderer.Green("✓"))
} else {
title = fmt.Sprintf("Cline Account: %s Not authenticated\n", renderer.Red("✗"))
}
// Show active provider and model if configured (regardless of Cline auth status)
if currentProvider != "" && currentModel != "" {
title += fmt.Sprintf("Active Provider: %s\nActive Model: %s\n",
renderer.White(currentProvider),
renderer.White(currentModel))
}
// Always end with a huh?
title += "\nWhat would you like to do?"
form := huh.NewForm(
huh.NewGroup(
huh.NewSelect[AuthAction]().
Title(title).
Options(options...).
Value(&action),
),
)
if err := form.Run(); err != nil {
// Check if user cancelled with Control-C
if err == huh.ErrUserAborted {
// Return the error to allow deferred cleanup to run
return "", huh.ErrUserAborted
}
return "", fmt.Errorf("failed to get menu choice: %w", err)
}
return action, nil
}
// HandleAPIProviderSetup launches the API provider configuration wizard
func HandleAPIProviderSetup(ctx context.Context) error {
wizard, err := NewProviderWizard(ctx)
if err != nil {
return fmt.Errorf("failed to create provider wizard: %w", err)
}
return wizard.Run()
}
// HandleSelectProvider allows users to switch between Cline provider and BYO providers
func HandleSelectProvider(ctx context.Context) error {
// Get task manager
manager, err := createTaskManager(ctx)
if err != nil {
return fmt.Errorf("failed to create task manager: %w", err)
}
// Detect all providers with valid configurations (is an API key present)
availableProviders, err := DetectAllConfiguredProviders(ctx, manager)
if err != nil {
return fmt.Errorf("failed to detect configured providers: %w", err)
}
// Build list of available providers
var providerOptions []huh.Option[string]
var providerMapping = make(map[string]cline.ApiProvider)
// Add each configured provider to the selection menu
for _, provider := range availableProviders {
providerName := GetProviderDisplayName(provider)
providerKey := fmt.Sprintf("provider_%d", provider)
providerOptions = append(providerOptions, huh.NewOption(providerName, providerKey))
providerMapping[providerKey] = provider
}
if len(providerOptions) == 0 {
fmt.Println("No providers available. Please configure a provider first.")
return HandleAuthMenuNoArgs(ctx)
}
providerOptions = append(providerOptions, huh.NewOption("(Cancel)", "cancel"))
// Show selection menu
var selected string
form := huh.NewForm(
huh.NewGroup(
huh.NewSelect[string]().
Title("Select which provider to use").
Options(providerOptions...).
Value(&selected),
),
)
if err := form.Run(); err != nil {
// Check if user cancelled with Control-C
if err == huh.ErrUserAborted {
return huh.ErrUserAborted
}
return fmt.Errorf("failed to select provider: %w", err)
}
if selected == "cancel" {
return HandleAuthMenuNoArgs(ctx)
}
// Get the selected provider
selectedProvider := providerMapping[selected]
// Apply the selected provider
if selectedProvider == cline.ApiProvider_CLINE {
// Configure Cline as the active provider
return SelectClineModel(ctx, manager)
} else {
// Switch to the selected BYO provider
return SwitchToBYOProvider(ctx, manager, selectedProvider)
}
}
// createTaskManager is a helper to create a task manager (avoids import cycles)
// Uses the auth instance address from context if available, otherwise falls back to default
func createTaskManager(ctx context.Context) (*task.Manager, error) {
authAddr := getAuthInstanceAddress(ctx)
if authAddr != "" {
return task.NewManagerForAddress(ctx, authAddr)
}
return task.NewManagerForDefault(ctx)
}
func verboseLog(format string, args ...interface{}) {
if global.Config != nil && global.Config.Verbose {
fmt.Printf("[VERBOSE] "+format+"\n", args...)
}
}
+130
View File
@@ -0,0 +1,130 @@
package auth
import (
"context"
"fmt"
"io"
"time"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/grpc-go/cline"
)
// AuthStatusListener manages subscription to auth status updates
type AuthStatusListener struct {
stream cline.AccountService_SubscribeToAuthStatusUpdateClient
updatesCh chan *cline.AuthState
errCh chan error
ctx context.Context
cancel context.CancelFunc
}
// NewAuthStatusListener creates a new auth status listener
func NewAuthStatusListener(parentCtx context.Context) (*AuthStatusListener, error) {
client, err := global.GetDefaultClient(parentCtx)
if err != nil {
return nil, fmt.Errorf("failed to get client: %w", err)
}
// Create cancellable context
ctx, cancel := context.WithCancel(parentCtx)
// Subscribe to auth status updates
stream, err := client.Account.SubscribeToAuthStatusUpdate(ctx, &cline.EmptyRequest{})
if err != nil {
cancel()
return nil, fmt.Errorf("failed to subscribe to auth updates: %w", err)
}
return &AuthStatusListener{
stream: stream,
updatesCh: make(chan *cline.AuthState, 10),
errCh: make(chan error, 1),
ctx: ctx,
cancel: cancel,
}, nil
}
// Start begins listening to the auth status update stream
func (l *AuthStatusListener) Start() error {
verboseLog("Starting auth status listener...")
go l.readStream()
return nil
}
// readStream reads from the gRPC stream and forwards messages to channels
func (l *AuthStatusListener) readStream() {
defer close(l.updatesCh)
defer close(l.errCh)
for {
select {
case <-l.ctx.Done():
verboseLog("Auth listener context cancelled")
return
default:
state, err := l.stream.Recv()
if err != nil {
if err == io.EOF {
verboseLog("Auth status stream closed")
return
}
verboseLog("Error reading from auth status stream: %v", err)
select {
case l.errCh <- err:
case <-l.ctx.Done():
}
return
}
verboseLog("Received auth state update: user=%v", state.User != nil)
select {
case l.updatesCh <- state:
case <-l.ctx.Done():
return
}
}
}
}
// WaitForAuthentication blocks until authentication succeeds or timeout occurs
func (l *AuthStatusListener) WaitForAuthentication(timeout time.Duration) error {
verboseLog("Waiting for authentication (timeout: %v)...", timeout)
timer := time.NewTimer(timeout)
defer timer.Stop()
for {
select {
case <-timer.C:
return fmt.Errorf("authentication timeout after %v - please try again", timeout)
case <-l.ctx.Done():
return fmt.Errorf("authentication cancelled")
case err := <-l.errCh:
return fmt.Errorf("authentication stream error: %w", err)
case state := <-l.updatesCh:
if isAuthenticated(state) {
verboseLog("Authentication successful!")
return nil
}
verboseLog("Received auth update but not authenticated yet...")
}
}
}
// Stop closes the stream and cleans up resources
func (l *AuthStatusListener) Stop() {
verboseLog("Stopping auth status listener...")
l.cancel()
}
// isAuthenticated checks if AuthState indicates successful authentication
func isAuthenticated(state *cline.AuthState) bool {
return state != nil && state.User != nil
}
+247
View File
@@ -0,0 +1,247 @@
package auth
import (
"context"
"fmt"
"strings"
"time"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/cli/pkg/cli/task"
"github.com/cline/grpc-go/cline"
)
// Package-level variables for command-line flags
var (
QuickProvider string // Provider ID (e.g., "openai", "anthropic")
QuickAPIKey string // API key for the provider
QuickModelID string // Model ID to configure
QuickBaseURL string // Base URL (optional, for openai compatible only)
)
// QuickSetupFromFlags performs quick setup using command-line flags
// Returns error if validation fails or configuration cannot be applied
func QuickSetupFromFlags(ctx context.Context, provider, apiKey, modelID, baseURL string) error {
// Validate all input parameters
providerEnum, err := validateQuickSetupInputs(provider, apiKey, modelID, baseURL)
if err != nil {
return err
}
// Create task manager for state operations
manager, err := createTaskManager(ctx)
if err != nil {
return fmt.Errorf("failed to create task manager: %w", err)
}
// Validate and fetch model information if needed
finalModelID, modelInfo, err := validateAndFetchModel(ctx, manager, providerEnum, modelID, apiKey)
if err != nil {
return fmt.Errorf("model validation failed: %w", err)
}
// For Ollama, baseURL is stored in the API key field
finalAPIKey := apiKey
finalBaseURL := baseURL
if providerEnum == cline.ApiProvider_OLLAMA {
if baseURL != "" {
finalAPIKey = baseURL
finalBaseURL = ""
} else if apiKey != "" {
// User provided API key for Ollama - treat it as baseURL
finalAPIKey = apiKey
finalBaseURL = ""
} else {
// Use default Ollama baseURL
finalAPIKey = "http://localhost:11434"
finalBaseURL = ""
}
}
// Configure the provider using existing AddProviderPartial function
if err := AddProviderPartial(ctx, manager, providerEnum, finalModelID, finalAPIKey, finalBaseURL, modelInfo); err != nil {
return fmt.Errorf("failed to configure provider: %w", err)
}
// Set the provider as active for both Plan and Act modes
if err := UpdateProviderPartial(ctx, manager, providerEnum, ProviderUpdatesPartial{}, true); err != nil {
return fmt.Errorf("failed to set provider as active: %w", err)
}
// Mark welcome view as completed
if err := markWelcomeViewCompleted(ctx, manager); err != nil {
// Non-fatal error, just log it
if global.Config.Verbose {
fmt.Printf("[DEBUG] Warning: failed to mark welcome view as completed: %v\n", err)
}
}
// WORKAROUND: Wait for debounced state persistence to complete
// Fixes `cline auth` issue when ran in docker environments
// TODO: implement better solution w/ changes in StateManager
time.Sleep(600 * time.Millisecond)
// Success message
fmt.Printf("\n✓ Successfully configured %s provider\n", GetProviderDisplayName(providerEnum))
fmt.Printf(" Model: %s\n", finalModelID)
if providerEnum == cline.ApiProvider_OLLAMA {
fmt.Printf(" Base URL: %s\n", finalAPIKey)
} else {
fmt.Println(" API Key: Configured")
}
if finalBaseURL != "" {
fmt.Printf(" Custom Base URL: %s\n", finalBaseURL)
}
fmt.Println("\nYou can now use Cline with this provider.")
fmt.Println("Run 'cline start' to begin a new task.")
return nil
}
// validateQuickSetupInputs validates all input parameters for quick setup
// Returns the validated provider enum or an error if validation fails
func validateQuickSetupInputs(provider, apiKey, modelID, baseURL string) (cline.ApiProvider, error) {
// Validate required parameters
if provider == "" {
return cline.ApiProvider_ANTHROPIC, fmt.Errorf("provider is required. Use --provider or -p flag")
}
if strings.TrimSpace(apiKey) == "" && provider != "ollama" {
return cline.ApiProvider_ANTHROPIC, fmt.Errorf("API key is required for %s provider. Use --apikey or -k flag", provider)
}
if strings.TrimSpace(modelID) == "" {
return cline.ApiProvider_ANTHROPIC, fmt.Errorf("model ID is required. Use --modelid or -m flag")
}
// Validate and map provider string to enum
providerEnum, err := validateQuickSetupProvider(provider)
if err != nil {
return cline.ApiProvider_ANTHROPIC, err
}
// Validate that baseURL is only provided for OpenAI-compatible providers
if err := validateBaseURL(baseURL, providerEnum); err != nil {
return cline.ApiProvider_ANTHROPIC, err
}
return providerEnum, nil
}
// validateBaseURL checks if the user's input includes a baseURL for a provider other than OpenAI (compatible)
// Returns error if baseURL is provided for unsupported providers
func validateBaseURL(baseURL string, providerEnum cline.ApiProvider) error {
if providerEnum != cline.ApiProvider_OPENAI {
if baseURL != "" {
return fmt.Errorf("base URL is only supported for OpenAI and OpenAI-compatible providers")
}
}
return nil
}
// validateQuickSetupProvider validates the provider ID and returns the enum value
// Returns error if provider is invalid or not supported for quick setup
func validateQuickSetupProvider(providerID string) (cline.ApiProvider, error) {
// Normalize provider ID (trim whitespace, lowercase)
normalizedID := strings.TrimSpace(strings.ToLower(providerID))
// Explicitly block Bedrock
if normalizedID == "bedrock" {
return cline.ApiProvider_BEDROCK, fmt.Errorf("bedrock provider is not supported for quick setup due to complex authentication requirements. Please use interactive setup: cline auth")
}
// Map provider string to enum using existing function
provider, ok := mapProviderStringToEnum(normalizedID)
if !ok {
// Provider not found - provide helpful error message
supportedProviders := []string{
"openai-native", "openai", "anthropic", "gemini",
"openrouter", "xai", "cerebras", "ollama",
}
return cline.ApiProvider_ANTHROPIC, fmt.Errorf(
"invalid provider '%s'. Supported providers: %s",
providerID,
strings.Join(supportedProviders, ", "),
)
}
// Validate against supported quick setup providers
supportedProviders := map[cline.ApiProvider]bool{
cline.ApiProvider_OPENAI_NATIVE: true,
cline.ApiProvider_OPENAI: true,
cline.ApiProvider_ANTHROPIC: true,
cline.ApiProvider_GEMINI: true,
cline.ApiProvider_OPENROUTER: true,
cline.ApiProvider_XAI: true,
cline.ApiProvider_CEREBRAS: true,
cline.ApiProvider_OLLAMA: true,
cline.ApiProvider_NOUSRESEARCH: true,
}
if !supportedProviders[provider] {
return provider, fmt.Errorf(
"provider '%s' is not supported for quick setup. Please use interactive setup: cline auth",
providerID,
)
}
return provider, nil
}
// validateAndFetchModel validates the model ID or fetches from provider if needed
// Returns the final model ID and optional model info
// For providers with static models, validates against the list
// For providers with dynamic models, fetches the list if possible
func validateAndFetchModel(ctx context.Context, manager *task.Manager, provider cline.ApiProvider, modelID, apiKey string) (string, interface{}, error) {
// Normalize model ID
modelID = strings.TrimSpace(modelID)
if modelID == "" {
return "", nil, fmt.Errorf("model ID cannot be empty")
}
// For most providers, we trust the user's input since we can't easily validate without making API calls
// The actual validation will happen when the model is used
switch provider {
case cline.ApiProvider_OPENROUTER:
// OpenRouter supports model info fetching, but it requires an API call
// For quick setup, we'll trust the user's input and return nil for model info
// The actual model info will be fetched when needed
if global.Config.Verbose {
fmt.Printf("[DEBUG] OpenRouter model ID: %s (will be validated on first use)\n", modelID)
}
return modelID, nil, nil
case cline.ApiProvider_OLLAMA:
// Ollama models can be validated by fetching the list, but this requires the server to be running
// For quick setup, we'll trust the user's input
if global.Config.Verbose {
fmt.Printf("[DEBUG] Ollama model ID: %s (will be validated when server is accessible)\n", modelID)
}
return modelID, nil, nil
default:
// For other providers (Anthropic, OpenAI, Gemini, XAI, Cerebras), trust user input
// Model validation will occur when the model is actually used
if global.Config.Verbose {
fmt.Printf("[DEBUG] %s model ID: %s (will be validated on first use)\n", GetProviderDisplayName(provider), modelID)
}
return modelID, nil, nil
}
}
// markWelcomeViewCompleted marks the welcome view as completed in the state
// This prevents the welcome view from showing up after quick setup
func markWelcomeViewCompleted(ctx context.Context, manager *task.Manager) error {
// Use the State service to update the welcome view flag
_, err := manager.GetClient().State.SetWelcomeViewCompleted(ctx, &cline.BooleanRequest{Value: true})
if err != nil {
return fmt.Errorf("failed to mark welcome view as completed: %w", err)
}
if global.Config.Verbose {
fmt.Println("[DEBUG] Marked welcome view as completed")
}
return nil
}
+141
View File
@@ -0,0 +1,141 @@
package auth
import (
"context"
"fmt"
"github.com/cline/cli/pkg/cli/global"
"github.com/cline/cli/pkg/cli/task"
"github.com/cline/grpc-go/cline"
)
// DefaultClineModelID is the default model ID for Cline provider.
// Cline uses OpenRouter-compatible model IDs.
const DefaultClineModelID = "anthropic/claude-sonnet-4.5"
// FetchClineModels fetches available Cline models from Cline Core.
// Note: Cline provider uses OpenRouter-compatible API and model format.
// The models are fetched using the same method as OpenRouter.
func FetchClineModels(ctx context.Context, manager *task.Manager) (map[string]*cline.OpenRouterModelInfo, error) {
if global.Config.Verbose {
fmt.Println("Fetching Cline models (using OpenRouter-compatible API)")
}
// Cline uses OpenRouter model fetching
models, err := FetchOpenRouterModels(ctx, manager)
if err != nil {
return nil, fmt.Errorf("failed to fetch Cline models: %w", err)
}
return models, nil
}
// GetClineModelInfo retrieves information for a specific Cline model.
func GetClineModelInfo(modelID string, models map[string]*cline.OpenRouterModelInfo) (*cline.OpenRouterModelInfo, error) {
modelInfo, exists := models[modelID]
if !exists {
return nil, fmt.Errorf("model %s not found", modelID)
}
return modelInfo, nil
}
// SetDefaultClineModel configures the default Cline model after authentication.
// This is called automatically after successful Cline sign-in.
func SetDefaultClineModel(ctx context.Context, manager *task.Manager) error {
// Fetch available models
models, err := FetchClineModels(ctx, manager)
if err != nil {
// If we can't fetch models, we'll use the default without model info
fmt.Printf("Warning: Could not fetch Cline models: %v\n", err)
fmt.Printf("Using default model: %s\n", DefaultClineModelID)
return applyDefaultClineModel(ctx, manager, nil)
}
// Check if default model is available
modelInfo, err := GetClineModelInfo(DefaultClineModelID, models)
if err != nil {
fmt.Printf("Warning: Default model not found: %v\n", err)
// Try to use any available model
for modelID := range models {
fmt.Printf("Using available model: %s\n", modelID)
return applyClineModelConfiguration(ctx, manager, modelID, models[modelID])
}
return fmt.Errorf("no usable Cline models found")
}
if err := applyClineModelConfiguration(ctx, manager, DefaultClineModelID, modelInfo); err != nil {
return err
}
if err := setWelcomeViewCompletedWithManager(ctx, manager); err != nil {
verboseLog("Warning: Failed to mark welcome view as completed: %v", err)
}
return nil
}
// SelectClineModel presents a menu to select a Cline model and applies the configuration.
func SelectClineModel(ctx context.Context, manager *task.Manager) error {
// Fetch models (uses OpenRouter-compatible format)
models, err := FetchClineModels(ctx, manager)
if err != nil {
return fmt.Errorf("failed to fetch Cline models: %w", err)
}
// Convert to interface map for generic utilities
modelMap := ConvertOpenRouterModelsToInterface(models)
// Get model IDs as a sorted list
modelIDs := ConvertModelsMapToSlice(modelMap)
// Display selection menu
selectedModelID, err := DisplayModelSelectionMenu(modelIDs, "Cline")
if err != nil {
return fmt.Errorf("model selection failed: %w", err)
}
// Get the selected model info
modelInfo := models[selectedModelID]
// Apply the configuration
if err := applyClineModelConfiguration(ctx, manager, selectedModelID, modelInfo); err != nil {
return err
}
fmt.Println()
// Return to main auth menu after model selection
return HandleAuthMenuNoArgs(ctx)
}
// applyClineModelConfiguration applies a Cline model configuration to both Act and Plan modes using UpdateProviderPartial.
// Cline uses OpenRouter-compatible model format.
func applyClineModelConfiguration(ctx context.Context, manager *task.Manager, modelID string, modelInfo *cline.OpenRouterModelInfo) error {
provider := cline.ApiProvider_CLINE
updates := ProviderUpdatesPartial{
ModelID: &modelID,
ModelInfo: modelInfo,
}
return UpdateProviderPartial(ctx, manager, provider, updates, true)
}
func applyDefaultClineModel(ctx context.Context, manager *task.Manager, modelInfo *cline.OpenRouterModelInfo) error {
if err := applyClineModelConfiguration(ctx, manager, DefaultClineModelID, modelInfo); err != nil {
return err
}
if err := setWelcomeViewCompletedWithManager(ctx, manager); err != nil {
verboseLog("Warning: Failed to mark welcome view as completed: %v", err)
}
return nil
}
func setWelcomeViewCompletedWithManager(ctx context.Context, manager *task.Manager) error {
_, err := manager.GetClient().State.SetWelcomeViewCompleted(ctx, &cline.BooleanRequest{Value: true})
return err
}
+156
View File
@@ -0,0 +1,156 @@
package auth
import (
"context"
"fmt"
"os"
"sort"
"github.com/charmbracelet/huh"
"github.com/cline/cli/pkg/cli/task"
"github.com/cline/grpc-go/cline"
"golang.org/x/term"
)
// FetchOpenRouterModels fetches available OpenRouter models from Cline Core
func FetchOpenRouterModels(ctx context.Context, manager *task.Manager) (map[string]*cline.OpenRouterModelInfo, error) {
resp, err := manager.GetClient().Models.RefreshOpenRouterModelsRpc(ctx, &cline.EmptyRequest{})
if err != nil {
return nil, fmt.Errorf("failed to fetch OpenRouter models: %w", err)
}
return resp.Models, nil
}
// FetchOcaModels fetches available Oca models from Cline Core
func FetchOcaModels(ctx context.Context, manager *task.Manager) (map[string]*cline.OcaModelInfo, error) {
resp, err := manager.GetClient().Models.RefreshOcaModels(ctx, &cline.StringRequest{})
if err != nil {
return nil, fmt.Errorf("failed to fetch Oca models: %w", err)
}
return resp.Models, nil
}
// ConvertOpenRouterModelsToInterface converts OpenRouter model map to generic interface map.
// This allows OpenRouter and Cline models to be used with the generic fetching utilities.
func ConvertOpenRouterModelsToInterface(models map[string]*cline.OpenRouterModelInfo) map[string]interface{} {
result := make(map[string]interface{}, len(models))
for k, v := range models {
result[k] = v
}
return result
}
// FetchOpenAiModels fetches available OpenAI models from Cline Core
// Takes the API key and returns a list of model IDs
func FetchOpenAiModels(ctx context.Context, manager *task.Manager, baseURL, apiKey string) ([]string, error) {
req := &cline.OpenAiModelsRequest{
BaseUrl: baseURL,
ApiKey: apiKey,
}
resp, err := manager.GetClient().Models.RefreshOpenAiModels(ctx, req)
if err != nil {
return nil, fmt.Errorf("failed to fetch OpenAI models: %w", err)
}
return resp.Values, nil
}
// FetchOllamaModels fetches available Ollama models from Cline Core
// Takes the base URL (empty string for default) and returns a list of model IDs
func FetchOllamaModels(ctx context.Context, manager *task.Manager, baseURL string) ([]string, error) {
req := &cline.StringRequest{
Value: baseURL,
}
resp, err := manager.GetClient().Models.GetOllamaModels(ctx, req)
if err != nil {
return nil, fmt.Errorf("failed to fetch Ollama models: %w", err)
}
return resp.Values, nil
}
// DisplayModelSelectionMenu shows an interactive menu for selecting a model from a list.
// Models are displayed alphabetically. Uses model ID as the option value to avoid
// index-based bugs when list order changes.
// Returns the selected model ID.
func DisplayModelSelectionMenu(models []string, providerName string) (string, error) {
if len(models) == 0 {
return "", fmt.Errorf("no models available for selection")
}
// Use model ID as the value (not index) to avoid positional coupling bugs
var selectedModel string
options := make([]huh.Option[string], len(models))
for i, model := range models {
options[i] = huh.NewOption(model, model)
}
title := fmt.Sprintf("Select a %s model", providerName)
form := huh.NewForm(
huh.NewGroup(
huh.NewSelect[string]().
Title(title).
Options(options...).
Height(calculateSelectHeight()).
Filtering(true).
Value(&selectedModel),
),
)
if err := form.Run(); err != nil {
return "", fmt.Errorf("failed to select model: %w", err)
}
return selectedModel, nil
}
// ConvertModelsMapToSlice converts a map of models to a sorted slice of model IDs.
// This is useful for displaying models in a consistent order in UI components.
func ConvertModelsMapToSlice(models map[string]interface{}) []string {
result := make([]string, 0, len(models))
for modelID := range models {
result = append(result, modelID)
}
// Sort alphabetically for consistent display
sort.Strings(result)
return result
}
// ConvertOcaModelsToInterface converts Oca model map to generic interface map.
// This allows Oca and Cline models to be used with the generic fetching utilities.
func ConvertOcaModelsToInterface(models map[string]*cline.OcaModelInfo) map[string]interface{} {
result := make(map[string]interface{}, len(models))
for k, v := range models {
result[k] = v
}
return result
}
// getTerminalHeight returns the terminal height (rows)
func getTerminalHeight() int {
_, height, err := term.GetSize(int(os.Stdout.Fd()))
if err != nil || height <= 0 {
return 25 // safe fallback for non-TTY or errors
}
return height
}
// calculateSelectHeight computes appropriate height for Select component
// Reserves space for title, search UI, and margins
func calculateSelectHeight() int {
height := getTerminalHeight()
// Reserve ~10 rows for UI chrome (title, search, margins)
visibleRows := height - 10
// Clamp between 8 (minimum usable) and 25 (maximum before unwieldy)
if visibleRows < 8 {
return 8
}
if visibleRows > 25 {
return 25
}
return visibleRows
}

Some files were not shown because too many files have changed in this diff Show More