- 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 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
- 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
- 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
* 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>
* 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
* 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.
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>
* 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
* 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>
* 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>
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.
* 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>
* 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>
* refactor out useEffect logic
* add markdown parsing to mcp response
* add display mode to global state; simplify state flow
* fix imports after merge conflicts
* 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>
* 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.
* 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
* 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
* 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>
* 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>
* 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
* 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>
* In the DiffViewProvider, store the absolutePath instead of the cwd.
Remove unused var `scrollListener`.
* Remove cwd param
* Don't call getCwd in a loop
* 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>
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.
* 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>
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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* 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>
* 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>
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>
* 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.
* 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
* Instead of getting the cwd from the workspaceFolders use the host bridge util getCwd()
Replace uses in integrations/claude-code/run.ts
* Organize imports
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).
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.
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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>
- 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
* 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.
* host bridge migration - clipboard
* changeset
* removed dev logging
* switched to empty return on clipboard write
* Moved new hostServiceNameMap entry to new proto configs
- 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
* 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
* 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>
* 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
* 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>
* 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
* 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>
* 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>
* 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
* 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
* 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.
* 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>
* 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
* 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
* 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
* 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)
* 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>
* move apiConversationHistory to MessageStateHandler
* move clineMessages state to MessageStateManager class
* remove unused imports
* remove redundant line
* 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
* 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>
* 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
* 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
* 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
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").
* 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.
* 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
* + 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>
* 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
* 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
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.
* 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
* 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>
* 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>
* 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
* 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
* 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.
* 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
* 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>
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.
* 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
* 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
* 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
* 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>
* 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>
* 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>
* 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
* 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
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* 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
* 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>
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.
* 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>
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.
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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 ### 新增上下文.
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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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`
* 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>
* feat: Enhance HistoryPreview component with collapsible/expandable task history view
* fix: Update font size for empty state/'No recent tasks' message in HistoryPreview component
* 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
• 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>
* 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
* 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>
* 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>
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`.
* simplified home header
* changeset
* add variable color logo for different themes
* random slash
---------
Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
* 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>
* 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>
* 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>
* fix(bedrock): application inference profile is not work
* chore: add change set
* chore: change the encoding condition to whether it contains a slash
* 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>
* 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>
* 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>
- 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.
* 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>
* 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
* 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>
* 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
* 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>
* deleteTasksWithIDs protobus migration
* Moved deleteTasksWithIds to dedicated message type
* Created common StringArrayRequest
* Delete webview-ui/.vite-port
* 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>
* 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.
* 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
* 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>
* 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
* 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>
* 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>
* 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>
* 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.
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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>
* 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
* 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>
* 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
* 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
* - 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
* 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
* 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>
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.
* 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
* 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
Enhance Ollama provider with retry mechanism, timeout handling, and improved error handling. This change adds robust error handling, automatic retries, timeout handling, and improved stream processing to the Ollama provider, making it more reliable and preventing the infinite "thinking" problem. Tests are now skipped if Ollama is not running locally.
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`).
-**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
Here’s 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
serviceUiService{
// ... other RPCs
// Scrolls to a specific settings section in the settings view
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]/`.
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!)
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
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:
# 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:
<important>If using the direct approach, pipe outputs through `cat` to avoid interactive terminals. If the user's shell is not bash/zsh, adjust the command and chaining
syntax accordingly.</important>
## 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
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]
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
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:
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.
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 isn’t 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:
Screenshots work similarly - the frame provides visual polish and consistency:
```jsx
<Frame>
<imgsrc="/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.
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:
**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 can’t execute commands or read their output, you lose access to one of its most powerful capabilities.
Good Example:
- When Cline can’t 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.
**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.
**Important:** All bug reports must be reproducible using Claude 4 Sonnet. Cline uses complex prompts so less capable models may not work as expected.
⚠️ 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
@@ -29,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.
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."
# 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 +48,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)
@@ -10,16 +10,74 @@ 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. 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
- Run `npm run test:ci` to run tests locally
### Extension
1. **VS Code Extensions**
- When opening the project, VS Code will prompt you to install recommended extensions
@@ -29,23 +87,26 @@ 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 test` to run tests locally
- Run → Start Debugging or `>Debug: Select and Start Debugging` and wait for a new VS Code instance to open
- 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 +115,23 @@ If you're planning to work on a bigger feature, please create a [feature request
@@ -30,7 +30,7 @@ English | <a href="https://github.com/cline/cline/blob/main/locales/es/README.md
</table>
</div>
Meet Cline, an AI assistant that can use your **CLI** a**N**d **E**ditor.
Meet Cline (pronounced /klaɪn/, like "Klein"), 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.
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.
@@ -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
Cline supports major cloud providers like AWS Bedrock and Google's Cloud Vertex; whichever your team currently uses is appropriate, and there's no need to change providers to utilize Cline's features.
For the purpose of this document, we assume your organization will use cloud-based frontier models. Cloud inference providers offer cutting-edge capabilities and the flexibility to select models which best suit your needs.
Certain scenarios may warrant using local models, including handling highly sensitive data, applications requiring consistent low-latency responses, or compliance with strict data sovereignty requirements. If your team needs to utilize local models, see [Running Local Models ](/running-models-locally/read-me-first.mdx)with Cline.
---
## AWS Bedrock Setup Guides
#### [IAM Security Best Practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) (For administrators)
#### [AWS Bedrock setup for API Keys](/provider-config/aws-bedrock-with-apikey-authentication)
#### [AWS Bedrock setup for Legacy IAM (AWS Credentials)](/provider-config/aws-bedrock-with-credentials-authentication)
#### [AWS Bedrock setup for SSO token (AWS Profile)](/provider-config/aws-bedrock-with-profile-authentication)
#### VPC Endpoint Setup
To protect your team's data, Cline supports VPC (Virtual Private Cloud) endpoints, which create private connections between your data and AWS Bedrock. AWS VPCs enhance security by eliminating the need for public IP addresses, network gateways, or complex firewall rules—essentially creating a private highway for data that bypasses the public internet entirely. By keeping traffic within AWS's private network, teams also benefit from lower latency and more predictable performance when accessing services like AWS Bedrock or custom APIs. For those working with confidential information or operating in highly regulated industries like healthcare or finance, VPCs offers the perfect balance between the accessibility of cloud services and the security of private infrastructure.
---
1. Consult the [AWS guide](https://docs.aws.amazon.com/bedrock/latest/userguide/vpc-interface-endpoints.html) to creating VPC endpoints. This document specifies pre-requisites and describes the syntax used for creating VPC endpoints.
2. Follow the directions for [creating a VPC endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html#create-interface-endpoint-aws) in the AWS console. The image below pertains to steps 4 and 5 of the AWS guide linked above.
**Creating standardized project instructions ensures that all team members work within consistent guidelines. Start by documenting your project's technical foundation, then identify which information needs to be included in the instructions. The exact scope will vary depending on your team's needs, but generally it's best to provide as much information as possible. By creating comprehensive instructions that all team members follow, you establish a shared understanding of how code should be written, tested, and deployed across your project, resulting in more maintainable and consistent software.**
---
Here are a few topics and examples to consider for your team's custom instructions:
1. **Testing framework and specific commands**
- "All components must include Jest tests with at least 85% coverage. Run tests using `npm run test:coverage` before submitting any pull request."
2. **Explicit library preferences**
- "Use React Query for data fetching and state management. Avoid Redux unless specifically required for complex global state. For styling, use Tailwind CSS with our custom theme configuration found in `src/styles/theme.js.`"
3. **Where to find documentation**
- "All API documentation is available in our internal Notion workspace under 'Engineering > API Reference'. For component usage examples, refer to our Storybook instance at `https://storybook.internal.company.com`"
4. **Which MCP servers to use, and for which purposes**
- "For database operations, use the Postgres MCP server with credentials stored in 1Password under 'Development > Database'. For deployments, use the AWS MCP server which requires the deployment role from IAM. Refer to `docs/mcp-setup.md` for configuration instructions."
5. **Coding conventions specific to your project**
- "Name all React components using PascalCase and all helper functions using camelCase. Place components in the `src/components` directory organized by feature, not by type. Always use TypeScript interfaces for prop definitions."
**Model Context Protocol (MCP) servers expand Cline's capabilities by providing standardized access to external data sources and executable functions. By implementing MCP servers, LLM tools can dynamically retrieve and incorporate relevant information from both local and remote data sources. This capability ensures that the models operate with the most current and contextually appropriate data, improving the accuracy and relevance of their outputs.**
---
### Secure Architecture Fundamentals
MCP servers follow a client-server architecture where hosts (LLM applications like Cline) initiate connections through a transport layer to MCP servers. This architecture inherently provides security benefits as it maintains clear separation between components. Enterprise deployments should focus on the proper implementation of this architecture to ensure secure operations, particularly regarding the message exchange patterns and connection lifecycle management. For MCP architecture details, see [MCP Architecture](https://modelcontextprotocol.io/docs/concepts/architecture), and for latest specifications, see [MCP Specifications](https://spec.modelcontextprotocol.io/specification/2024-11-05/).
### Transport Layer Security
For enterprise environments, selecting the appropriate transport mechanism is crucial. While stdio transport works efficiently for local processes, HTTP with Server-Sent Events (SSE) transport requires additional security measures. TLS should be used for all remote connections whenever possible. This is especially important when MCP servers are deployed across different network segments within corporate infrastructure.
### Message Validation and Access Control
The MCP architecture defines standard error codes and message types (Requests, Results, Errors, and Notifications), providing a structured framework for secure communication. Security teams should consider message validation, sanitizing inputs, checking message size limits, and verifying JSON-RPC format. Additionally, implementing resource protection through access controls, path validation, and request rate limiting helps prevent potential abuse of MCP server capabilities.
### Monitoring and Compliance
For enterprise compliance requirements, implementing comprehensive logging of protocol events, message flows, and errors is essential. The MCP architecture supports diagnostic capabilities including health checks, connection state monitoring, and resource usage tracking. Organizations should extend these capabilities to meet their specific compliance needs, particularly for audit trails of all MCP server interactions and resource access patterns.
By leveraging the client-server design of the MCP architecture and implementing appropriate security controls at each layer, enterprises can safely integrate MCP servers into their environments while maintaining their security posture and meeting regulatory requirements.
#### Cline addresses enterprise security concerns through its unique client-side architecture that prioritizes data privacy, secure cloud integration, and transparent operations. Below is a comprehensive overview of how Cline maintains robust security measures for enterprise environments.
---
### Client-Side Architecture
Cline operates exclusively as a client-side VSCode extension with zero server-side components. This fundamental design choice ensures that your code and data remain within your secure environment at all times. Unlike traditional AI assistants that send data to external servers for processing, Cline connects directly to your chosen cloud provider's AI endpoints, keeping all sensitive information within your infrastructure boundaries.
alt="Cline's relationship to local and remote assets"
/>
</Frame>
### Data Privacy Commitment
Cline implements a strict zero data retention policy, meaning your intellectual property never leaves your secure environment. The extension does not collect, store, or transmit your code to any central servers. This approach significantly reduces potential attack vectors that might otherwise be introduced through data transmission to third-party systems. Telemetry collection is optional and requires explicit consent.
### Cloud Provider Integration
Enterprise teams can access cutting-edge AI models through their existing cloud deployments. Cline supports seamless integration with:
- AWS Bedrock
- Google Cloud Vertex AI
- Microsoft Azure
These integrations utilize your organization's existing security credentials, including native IAM role assumption for AWS. This ensures that all AI processing occurs within your corporate cloud environment, maintaining compliance with your established security protocols.
### Open-Source Transparency
Cline's codebase is completely open-source, allowing for comprehensive security auditing by your internal teams. This transparency enables security professionals to verify exactly how the extension functions and confirm that it adheres to your organization's security requirements. Organizations can review the code to ensure it aligns with their security policies before deployment.
### Controlled Modifications
The extension implements safeguards against unauthorized changes to your codebase. Cline requires explicit user approval for all file modifications and terminal commands, preventing accidental or unwanted alterations. This approval-based workflow maintains the integrity of your projects while still providing AI assistance.
### Enterprise Deployment Support
For organizations with strict security review processes, Cline provides comprehensive documentation including detailed deployment diagrams, sequence diagrams illustrating all data flows, and complete security posture documentation. These materials facilitate thorough security reviews and help demonstrate compliance with enterprise data handling standards and regulations.
### Access Control
Enterprise editions of Cline (planned for Q2 2025) will include centralized administration features that allow organizations to:
- Manage user access with customizable permission levels
- Provision accounts with corporate credentials
- Immediately revoke access when needed
- Control which AI providers and LLM endpoints can be used
- Deploy standardized settings across the organization
- Prevent unauthorized use of personal API keys
### Compliance and Governance
Cline's architecture supports compliance with data sovereignty requirements and enterprise data handling regulations. The planned Enterprise Complete edition will further enhance governance with detailed audit logging, compliance reporting, and automated policy enforcement mechanisms.
By combining client-side processing, direct cloud provider integration, and transparent operations, Cline offers enterprise teams a secure way to leverage AI assistance while maintaining strict control over their sensitive code and data.
- Example: "Create a new React component called Header"
2. **Provide Context**
- Use @ mentions to add files, folders, or URLs
- Example: "@file:src/components/App.tsx"
3. **Review Changes**
- Cline will show diffs before making changes
- You can edit or reject changes
## Key Features
1. **File Editing**
- Create new files
- Modify existing code
- Search and replace across files
2. **Terminal Commands**
- Run npm commands
- Start development servers
- Install dependencies
3. **Code Analysis**
- Find and fix errors
- Refactor code
- Add documentation
4. **Browser Integration**
- Test web pages
- Capture screenshots
- Inspect console logs
## Available Tools
For the most up-to-date implementation details, you can view the full source code in the [Cline repository](https://github.com/cline/cline/blob/main/src/core/Cline.ts).
Cline has access to the following tools for various tasks:
1. **File Operations**
- `write_to_file`: Create or overwrite files
- `read_file`: Read file contents
- `replace_in_file`: Make targeted edits to files
- `search_files`: Search files using regex
- `list_files`: List directory contents
2. **Terminal Operations**
- `execute_command`: Run CLI commands
- `list_code_definition_names`: List code definitions
3. **MCP Tools**
- `use_mcp_tool`: Use tools from MCP servers
- `access_mcp_resource`: Access MCP server resources
- Users can create custom MCP tools that Cline can then access
- Example: Create a weather API tool that Cline can use to fetch forecasts
4. **Interaction Tools**
- `ask_followup_question`: Ask user for clarification
- `attempt_completion`: Present final results
Each tool has specific parameters and usage patterns. Here are some examples:
- Create a new file (write_to_file):
```xml
<write_to_file>
<path>src/components/Header.tsx</path>
<content>
// Header component code
</content>
</write_to_file>
```
- Search for a pattern (search_files):
```xml
<search_files>
<path>src</path>
<regex>function\s+\w+\(</regex>
<file_pattern>*.ts</file_pattern>
</search_files>
```
- Run a command (execute_command):
```xml
<execute_command>
<command>npm install axios</command>
<requires_approval>false</requires_approval>
</execute_command>
```
## Common Tasks
1. **Create a New Component**
- "Create a new React component called Footer"
2. **Fix a Bug**
- "Fix the error in src/utils/format.ts"
3. **Refactor Code**
- "Refactor the Button component to use TypeScript"
4. **Run Commands**
- "Run npm install to add axios"
## Getting Help
- [Join the Discord community](https://discord.gg/cline)
### The `new_task` Tool & Context Management Strategies
#### Overview
Cline includes a powerful internal tool, `new_task`, designed to help manage workflow continuity and context preservation, especially during complex or long-running tasks. This tool, combined with Cline's awareness of its own context window usage and the flexibility of `.clinerules`, enables sophisticated strategies for breaking down work and ensuring seamless transitions between task sessions.
Understanding the core capabilities and how they interact with custom rules is key to leveraging this feature effectively.
#### Core Capabilities
Two fundamental capabilities enable advanced context management:
1. **The `new_task` Tool:**
- **Function:** Allows Cline, upon user approval, to end the current task session and immediately start a new one.
- **Context Preloading:** Crucially, Cline can **preload** this new task session with specific context provided within the tool's `<context>` block. This context can be anything Cline or a `.clinerules` file defines – summaries, code snippets, next steps, project state, etc.
2. **Context Window Awareness:**
- **Tracking:** Cline internally tracks the percentage of its available context window currently being used during a task.
- **Visibility:** This information is visible in the `environment_details` provided to Cline in its prompt.
#### Using the `/newtask` Slash Command
As a quick alternative to Cline suggesting the `newtask` tool or defining complex rules, you can directly initiate the process using a Slash Command.
- **How:** Simply type `/newtask` in the chat input field.
- **Action:** Cline will propose creating a new task, typically suggesting context based on the current session (similar to its default behavior when using the tool). You will still get the `ask_followup_question` prompt to confirm and potentially modify the context before the new task is created.
- **Benefit:** Provides a fast, user-initiated way to leverage the `new_task` functionality for branching explorations or managing long sessions without waiting for Cline to suggest it.
<Note>
For more details on using the `/newtask` slash command, see the [New Task Command](/features/slash-commands/new-task)
documentation.
</Note>
#### Default Behavior (Without `.clinerules`)
By default, without specific `.clinerules` dictating its behavior:
- **Tool Availability:** The `new_task` tool exists, and Cline _can_ choose to use it.
- **Context Awareness:** Cline _is_ aware of its context usage percentage.
- **No Automatic Trigger:** Cline **will not** automatically initiate a task handoff _solely_ based on context usage reaching a specific percentage (like 50%). The decision to suggest using `new_task` comes from the AI model's reasoning based on the overall task progress and prompt instructions.
- **Basic Context Preloading:** If `new_task` is used without specific rules defining the `<context>` block structure, Cline will attempt to preload relevant information based on its current understanding (e.g., a basic summary of progress and next steps), but this may be less comprehensive than a rule-driven approach.
#### The Power of `.clinerules`: Enabling Custom Workflows
While the core capabilities exist by default, the true power, automation, and customization emerge when you combine `new_task` and context awareness with custom workflows defined in `.clinerules`. This allows you to precisely control _when_ and _how_ Cline manages context and task continuity.
Key benefits of using `.clinerules` with `new_task`:
- **Automated Context Management:** Define rules to automatically trigger handoffs at specific context percentages (e.g., >50%, >70%) or token counts, ensuring optimal performance and preventing context loss.
- **Model-Specific Optimization:** Tailor handoff triggers based on known thresholds for different LLMs (e.g., trigger earlier for models known to degrade past a certain token count).
- **Intelligent Breakpoints:** Instruct Cline via rules to find logical stopping points (e.g., after completing a function or test) _after_ a context threshold is passed, ensuring cleaner handoffs.
- **Structured Task Decomposition:** Use Plan Mode to define subtasks, then use `.clinerules` to have Cline automatically create a new task via `new_task` upon completing each subtask, preloading the context for the _next_ subtask.
- **Custom Context Packaging:** Mandate the exact structure and content of the `<context>` block in `.clinerules` for highly detailed and consistent handoffs (see example below).
- **Improved Memory Persistence:** Use `new_task` context blocks as a primary, integrated way to persist information across sessions, potentially replacing or supplementing file-based memory systems.
- **Workflow Automation:** Define rules for specific scenarios, like always preloading certain setup instructions or project boilerplate when starting tasks of a particular type.
#### Example Rule-Driven Workflow: Task Handoff Process
A common workflow, **driven by specific `.clinerules` like the example below**, involves these steps:
1. **Trigger Identification (Rule-Based):** Cline monitors for handoff points defined in the rules (e.g., context usage > 50%, task completion).
2. **User Confirmation:** Cline uses `ask_followup_question` to propose creating a new task, often showing the intended context defined by the rules.
```xml
<ask_followup_question>
<question>I've completed [specific accomplishment] and context usage is high (XX%). Would you like me to create a new task to continue with [remaining work], preloading the following context?</question>
<options>["Yes, create new task", "Modify context first", "No, continue this session"]</options>
</ask_followup_question>
```
3. **User Control:** You can approve, deny, or ask Cline to modify the context before the new task is created.
4. **Context Packaging (`new_task` Tool):** If approved, Cline uses `new_task`, packaging the context according to the structure mandated by the `.clinerules`.
5. **New Task Creation:** The current task ends, and a new session begins immediately, preloaded with the specified context.
#### The Handoff Context Block (Rule-Defined Structure)
The effectiveness of rule-driven handoffs depends heavily on how `.clinerules` define the `<context>` block. A comprehensive structure often includes:
- **`## Completed Work`**: Detailed list of accomplishments, files modified/created, key decisions.
- **`## Current State`**: Project status, running processes, key file states.
- **`## Next Steps`**: Clear, prioritized list of remaining tasks, implementation details, known challenges.
- **`## Reference Information`**: Links, code snippets, patterns, user preferences.
- **Actionable Start:** A clear instruction for the immediate next action.
#### Potential Use Cases & Workflows
The flexibility of `new_task` combined with `.clinerules` opens up many possibilities:
- **Proactive Context Window Management:** Automatically trigger handoffs at specific percentages (e.g., 50%, 70%) or token counts to maintain optimal performance.
- **Intelligent Breakpoints:** Instruct Cline to find logical stopping points (e.g., after completing a function or test) _after_ a context threshold is passed, ensuring cleaner handoffs.
- **Structured Task Decomposition:** Use Plan Mode to define subtasks, then use `.clinerules` to have Cline automatically create a new task via `new_task` upon completing each subtask.
- **Automated Session Summaries:** Configure the `<context>` block to always include a summary of the previous session's key discussion points.
- **Preloading Boilerplate/Setup:** Start new tasks related to specific projects preloaded with standard setup instructions or file templates.
- **"Memory Bank" Alternative:** Use `new_task` context blocks as the primary way to persist information across sessions, potentially replacing file-based memory systems.
Experimenting with `.clinerules` is encouraged to discover workflows that best suit your needs!
#### Example `.clinerules`: Task Handoff Strategy Guide
Below is an example `.clinerules` file focused specifically on using `new_task` for context window management. **Remember, this is just one specific strategy; the core `new_task` tool can be used differently with other custom rules.**
````markdown
# You MUST use the `new_task` tool: Task Handoff Strategy Guide
**⚠️ CRITICAL INSTRUCTIONS - YOU MUST FOLLOW THESE GUIDELINES ⚠️**
This guide provides **MANDATORY** instructions for effectively breaking down complex tasks and implementing a smooth handoff process between tasks. You **MUST** follow these guidelines to ensure continuity, context preservation, and efficient task completion.
You **MUST** monitor the context window usage displayed in the environment details. When usage exceeds 50% of the available context window, you **MUST** initiate a task handoff using the `new_task` tool.
Example of context window usage over 50% with a 200K context window:
**IMPORTANT**: When you see context window usage at or above 50%, you MUST:
1. Complete your current logical step
2. Use the `ask_followup_question` tool to offer creating a new task
3. If approved, use the `new_task` tool with comprehensive handoff instructions
## Task Breakdown in Plan Mode - REQUIRED PROCESS
Plan Mode is specifically designed for analyzing complex tasks and breaking them into manageable subtasks. When in Plan Mode, you **MUST**:
### 1. Initial Task Analysis - REQUIRED
- **MUST** begin by thoroughly understanding the full scope of the user's request
- **MUST** identify all major components and dependencies of the task
- **MUST** consider potential challenges, edge cases, and prerequisites
### 2. Strategic Task Decomposition - REQUIRED
- **MUST** break the overall task into logical, discrete subtasks
- **MUST** prioritize subtasks based on dependencies (what must be completed first)
- **MUST** aim for subtasks that can be completed within a single session (15-30 minutes of work)
- **MUST** consider natural breaking points where context switching makes sense
### 3. Creating a Task Roadmap - REQUIRED
- **MUST** present a clear, numbered list of subtasks to the user
- **MUST** explain dependencies between subtasks
- **MUST** provide time estimates for each subtask when possible
- **MUST** use Mermaid diagrams to visualize task flow and dependencies when helpful
\`\`\`mermaid
graph TD
A[Main Task] --> B[Subtask 1: Setup]
A --> C[Subtask 2: Core Implementation]
A --> D[Subtask 3: Testing]
A --> E[Subtask 4: Documentation]
B --> C
C --> D
\`\`\`
### 4. Getting User Approval - REQUIRED
- **MUST** ask for user feedback on the proposed task breakdown
- **MUST** adjust the plan based on user priorities or additional requirements
- **MUST** confirm which subtask to begin with
- **MUST** request the user to toggle to Act Mode when ready to implement
## Task Implementation and Handoff Process - MANDATORY PROCEDURES
When implementing tasks in Act Mode, you **MUST** follow these guidelines for effective task handoff:
### 1. Focused Implementation - REQUIRED
- **MUST** focus on completing the current subtask fully
- **MUST** document progress clearly through comments and commit messages
- **MUST** create checkpoints at logical completion points
### 2. Recognizing Completion Points - CRITICAL
You **MUST** identify natural handoff points when:
- The current subtask is fully completed
- You've reached a logical stopping point in a larger subtask
- The implementation is taking longer than expected and can be continued later
- The task scope has expanded beyond the original plan
- **CRITICAL**: The context window usage exceeds 50% (e.g., 100,000+ tokens for a 200K context window)
### 3. Initiating the Handoff Process - MANDATORY ACTION
When you've reached a completion point, you **MUST**:
1. Summarize what has been accomplished so far
2. Clearly state what remains to be done
3. **MANDATORY**: Use the `ask_followup_question` tool to offer creating a new task:
\`\`\`xml
<ask_followup_question>
<question>I've completed [specific accomplishment]. Would you like me to create a new task to continue with [remaining work]?</question>
<options>["Yes, create a new task", "No, continue in this session", "Let me think about it"]</options>
</ask_followup_question>
\`\`\`
### 4. Creating a New Task with Context - REQUIRED ACTION
If the user agrees to create a new task, you **MUST** use the `new_task` tool with comprehensive handoff instructions:
\`\`\`xml
<new_task>
<context>
# Task Continuation: [Brief Task Title]
## Completed Work
- [Detailed list of completed items]
- [Include specific files modified/created]
- [Note any important decisions made]
## Current State
- [Description of the current state of the project]
- [Any running processes or environment setup]
- [Key files and their current state]
## Next Steps
- [Detailed list of remaining tasks]
- [Specific implementation details to address]
- [Any known challenges to be aware of]
## Reference Information
- [Links to relevant documentation]
- [Important code snippets or patterns to follow]
- [Any user preferences noted during the current session]
Please continue the implementation by [specific next action].
</context>
</new_task>
\`\`\`
### 5. Detailed Context Transfer - MANDATORY COMPONENTS
When creating a new task, you **MUST** always include:
#### Project Context - REQUIRED
- **MUST** include the overall goal and purpose of the project
- **MUST** include key architectural decisions and patterns
- **MUST** include technology stack and dependencies
#### Implementation Details - REQUIRED
- **MUST** list files created or modified in the current session
- **MUST** describe specific functions, classes, or components implemented
- **MUST** explain design patterns being followed
- **MUST** outline testing approach
#### Progress Tracking - REQUIRED
- **MUST** provide checklist of completed items
- **MUST** provide checklist of remaining items
- **MUST** note any blockers or challenges encountered
#### User Preferences - REQUIRED
- **MUST** note coding style preferences mentioned by the user
- **MUST** document specific approaches requested by the user
- **MUST** highlight priority areas identified by the user
## Best Practices for Effective Handoffs - MANDATORY GUIDELINES
### 1. Maintain Continuity - REQUIRED
- **MUST** use consistent terminology between tasks
- **MUST** reference previous decisions and their rationale
- **MUST** maintain the same architectural approach unless explicitly changing direction
### 2. Preserve Context - REQUIRED
- **MUST** include relevant code snippets in the handoff
- **MUST** summarize key discussions from the previous session
- **MUST** reference specific files and line numbers when applicable
### 3. Set Clear Next Actions - REQUIRED
- **MUST** begin the handoff with a clear, actionable next step
- **MUST** prioritize remaining tasks
- **MUST** highlight any decisions that need to be made
### 4. Document Assumptions - REQUIRED
- **MUST** clearly state any assumptions made during implementation
- **MUST** note areas where user input might be needed
- **MUST** identify potential alternative approaches
### 5. Optimize for Resumability - REQUIRED
- **MUST** structure the handoff so the next session can begin working immediately
- **MUST** include setup instructions if environment configuration is needed
- **MUST** provide a quick summary at the top for rapid context restoration
## Example Task Handoff
### Example #1 of an effective task handoff:
\`\`\`xml
<new_task>
<context>
# Task Continuation: Implement User Authentication System
## Completed Work
- Created basic Express.js server structure
- Implemented MongoDB connection and user schema
- Completed user registration endpoint with password hashing
- Added input validation using Joi
- Created initial test suite for registration endpoint
## Current State
- Server runs successfully on port 3000
- MongoDB connection is established
- Registration endpoint (/api/users/register) is fully functional
- Test suite passes for all registration scenarios
## Next Steps
1. Implement login endpoint (/api/users/login)
- Use bcrypt to compare passwords
- Generate JWT token upon successful login
- Add proper error handling for invalid credentials
2. Create authentication middleware
- Verify JWT tokens
- Extract user information
- Handle expired tokens
3. Add protected routes that require authentication
4. Implement password reset functionality
## Reference Information
- JWT secret should be stored in .env file
- Follow the existing error handling pattern in routes/users.js
- User schema is defined in models/User.js
- Test patterns are established in tests/auth.test.js
Please continue by implementing the login endpoint following the same patterns established in the registration endpoint.
</context>
</new_task>
\`\`\`
### Example #2 of an ineffective task handoff:
_(Note: The example provided in the original rules showing "YOLO MODE Implementation" seems less like a direct handoff context block and more like a general status update with future considerations. A true ineffective handoff might lack detail in 'Current State' or 'Next Steps')._
## When to Use Task Handoffs - MANDATORY TRIGGERS
You **MUST** initiate task handoffs in these scenarios:
1. **CRITICAL**: When context window usage exceeds 50% (e.g., 100,000+ tokens for a 200K context window)
2. **Long-running projects** that exceed a single session
3. **Complex implementations** with multiple distinct phases
4. **When context window limitations** are approaching
5. **When switching focus areas** within a larger project
6. **When different expertise** might be beneficial for different parts of the task
**⚠️ FINAL REMINDER - CRITICAL INSTRUCTION ⚠️**
You **MUST** monitor the context window usage in the environment details section. When it exceeds 50% (e.g., "105,000 / 200,000 tokens (53%)"), you **MUST** proactively initiate the task handoff process using the `ask_followup_question` tool followed by the `new_task` tool. You MUST use the `new_task` tool.
By strictly following these guidelines, you'll ensure smooth transitions between tasks, maintain project momentum, and provide the best possible experience for users working on complex, multi-session projects.
```markdown
## User Interaction & Workflow Considerations
- **Linear Flow:** Currently, using `new_task` creates a linear sequence. The old task ends, and the new one begins. The old task history remains accessible for backtracking.
- **User Approval:** You always have control, approving the handoff and having the chance to modify the context Cline proposes to carry forward.
- **Flexibility:** The core `new_task` tool is a flexible building block. Experiment with `.clinerules` to create workflows that best suit your needs, whether for strict context management, task decomposition, or other creative uses.
description: "Remote browser support allows Cline to utilize a remote Chrome instance, leveraging authentication tokens and session cookies relevant to certain web development test cases."
icon: globe-pointer
---
The Remote Browser feature in Cline allows the AI assistant to interact with web content directly through a controlled browser instance. This enables several powerful capabilities:
- Viewing and interacting with websites
- Testing locally running web applications
- Monitoring console logs and errors
- Performing browser actions like clicking, typing, and scrolling
## Remote Browser in Cline
### What is Remote Browser?
Remote Browser allows Cline to view and interact with websites directly. This feature enables Cline to:
- Visit websites and view their content
- Test your locally running web applications
- Fill out forms and click on elements
- Capture screenshots of what it sees
- Scroll through pages to see more content
### How to Use Remote Browser
#### Basic Commands
You can ask Cline to use the browser with simple instructions:
- **Open a website**: "Use the browser to check the website at [https://example.com](https://example.com/)"
- **Click on elements**: "Click the login button"
- **Type text**: "Type 'Hello world' in the search box"
- **Scroll the page**: "Scroll down to see more content"
- **Close the browser**: "Close the browser now"
#### Example Workflows
**Testing a Web Application:**
```javascript
Can you start my React app with "npm start" and then check if it's working properly at http://localhost:3000?
```
**Analyzing a Website:**
```javascript
Can you visit https://example.com and tell me what you think about its design and layout?
```
**Filling Out a Form:**
```javascript
Please go to https://example.com/contact, fill out the contact form with some test data, and submit it.
```
### Important Things to Know
#### One Browser at a Time
Cline can only use one browser at a time. If you want to visit a different website, you can either:
- Ask Cline to navigate to a new URL within the same browser session
- Ask Cline to close the current browser and open a new one
#### Browser Must Be Closed Before Using Other Tools
If you want Cline to edit files or run commands after using the browser, you must first ask it to close the browser:
```javascript
Close the browser and then update the CSS file to fix the alignment issue we saw.
```
#### What Cline Sees
The browser has a fixed viewport size (900x600 pixels by default), similar to a small laptop screen. Cline will share screenshots after each action so you can see exactly what it sees.
#### Console Logs
Cline captures browser console logs, which can be helpful for debugging web applications. These logs are included with each screenshot.
### Common Use Cases
- **Web Development**: Test your websites and web applications
- **UI/UX Review**: Get feedback on website design and usability
- **Content Research**: Have Cline browse websites to gather information
- **Form Testing**: Verify that forms work correctly
- **Responsive Design Testing**: Check how websites look at different screen sizes
### Troubleshooting
- **If a website doesn't load**: Try providing a direct URL with the http:// or https:// prefix
- **If clicking doesn't work**: Try describing the location of the element more precisely
- **If the browser seems stuck**: Ask Cline to close the browser and try again
### Using Remote Browser with VS Code in WSL
When running VS Code in WSL, you'll need to configure Windows to allow WSL to connect to Chrome. Follow these steps:
File mentions let you pull any file from your workspace directly into your conversation with Cline. No more copying and pasting code snippets - just type `@/` and point to the file you need help with.
When you type `@/` in the chat, Cline shows your workspace files. Navigate through folders, select the file you want, and it's instantly available to Cline - complete with all imports, related functions, and surrounding context.
I use file mentions constantly when debugging. Instead of trying to figure out which parts of my code to copy over, I just reference the file directly:
```
I'm getting this error when my form submits: @terminal
Here's my component: @/src/components/ContactForm.jsx
And the API endpoint: @/src/api/contact.js
What am I missing?
```
This gives Cline everything it needs - the error message, the component code, and the API endpoint - all without me having to copy anything. Cline can see imports, dependencies, and all the surrounding context that might be causing the issue.
File mentions shine when you're dealing with complex bugs that span multiple files. Before, I'd have to carefully copy each relevant file, making sure I didn't miss anything important. Now I just reference each file with `@/` and Cline gets the complete picture.
Next time you're stuck on a problem, try using file mentions instead of copying code. You'll save time and get better answers because Cline has all the context it needs.
## How It Works Under the Hood
When you use a file mention in your message, here's what happens behind the scenes:
1. When you send your message, Cline detects the `@/path/to/file` pattern in your text
2. The extension resolves the file path relative to your workspace root
3. It checks if the file is binary (like an image) or text-based
4. For text files, it reads the complete file content
5. The file content is appended to your message in a structured format:
```
<file_content path="path/to/file">
[Complete file content]
</file_content>
```
6. This enhanced message with the embedded file content is sent to the AI
7. The AI can now "see" the complete file content as if you had copied and pasted it
This seamless process happens automatically whenever you use a file mention, giving the AI full context without you having to manually copy anything.
Folder mentions let you bring entire directories into your conversation with Cline. Just type `@/` followed by a folder path ending with a slash, and Cline gets access to the folder structure and its contents.
When you type `@/` in chat, Cline shows your workspace files and folders. Navigate to the folder you want, make sure to include the trailing slash, and Cline will see the folder's structure and contents.
I use folder mentions when I need help understanding or refactoring a whole section of my codebase. Instead of referencing individual files one by one, I can just point to the entire directory:
```
I'm trying to understand how the authentication flow works in my app.
Can you explain the structure and relationships between the files in @/src/auth/?
```
Cline can then see all the files in the auth directory, their contents, and how they relate to each other. This gives it the full context to explain complex interactions between multiple files.
Folder mentions are also perfect for getting help with project organization. When I'm unsure if my project structure makes sense, I'll ask Cline to review it:
```
I'm setting up a new React project. Does this folder structure make sense? @/src/
What would you change to make it more maintainable as the project grows?
```
Next time you're working with multiple related files, try using folder mentions instead of referencing each file individually. You'll get more comprehensive help because Cline can see the bigger picture of how everything fits together.
## How It Works Under the Hood
When you use a folder mention in your message, here's what happens behind the scenes:
1. When you send your message, Cline detects the `@/path/to/folder/` pattern (with trailing slash) in your text
2. The extension resolves the folder path relative to your workspace root
3. It calls `fs.readdir()` to get a list of all files and subdirectories in that folder
4. For each file in the directory, it checks if it's binary or text-based
5. For text files, it extracts the complete content
6. The folder structure and file contents are appended to your message in a structured format:
```
<folder_content path="path/to/folder">
├── file1.txt
├── file2.js
└── subfolder/
<file_content path="path/to/folder/file1.txt">
[File content]
</file_content>
<file_content path="path/to/folder/file2.js">
[File content]
</file_content>
</folder_content>
```
7. This enhanced message with the embedded folder structure and file contents is sent to the AI
8. The AI can now "see" both the directory structure and the content of files within that directory
This process happens automatically whenever you use a folder mention, giving the AI a comprehensive view of your project structure and file contents.
Git mentions let you bring your repository's history and changes directly into your conversation with Cline. You can reference uncommitted changes with `@git-changes` or specific commits with `@[commit-hash]`.
When you type `@` in chat, you can select "Git Changes" from the menu or type `@git-changes` directly. For specific commits, type `@` followed by the commit hash (at least 7 characters). Cline will immediately see the git status, diffs, commit messages, and other relevant information.
I use git mentions constantly when I'm trying to understand code changes or troubleshoot issues introduced by recent commits. Instead of trying to copy and paste diffs or commit logs, I just ask:
```
I think this commit broke our authentication flow: @a1b2c3d
Can you explain what changed and why it might be causing the issue?
```
This gives Cline the complete commit information, including the commit message, author, date, and the full diff. Cline can then analyze exactly what changed and how it might affect other parts of the codebase.
The `@git-changes` mention is perfect when you're working on changes and want feedback before committing:
```
Here are my current changes: @git-changes
I'm trying to implement a new feature for user profiles. Does my approach make sense?
Are there any potential issues or improvements you'd suggest?
```
This shows Cline all your uncommitted changes, including new files, modified files, and their diffs. Cline can then review your changes and provide feedback on your implementation.
Git mentions are especially powerful when combined with file mentions. When I'm investigating a bug, I'll often reference both:
```
I think this commit introduced a bug: @a1b2c3d
Here's the current implementation: @/src/components/Auth.jsx
How can I fix the issue while preserving the intended functionality?
```
Next time you're working with code changes or investigating issues, try using git mentions instead of manually describing or copying changes. You'll get more accurate help because Cline can see exactly what changed and in what context.
## How It Works Under the Hood
When you use git mentions in your message, here's what happens behind the scenes:
### For Git Changes (`@git-changes`)
1. When you send your message, Cline detects the `@git-changes` pattern in your text
2. The extension runs git commands to get the current working state of your repository
3. It captures the output of `git status` and `git diff` to see all uncommitted changes
4. This information is appended to your message in a structured format:
```
<git_working_state>
On branch main
Changes not staged for commit:
modified: src/components/Button.jsx
modified: src/styles/main.css
[Complete diff output with all changes]
</git_working_state>
```
### For Specific Commits (`@[commit-hash]`)
1. When you send your message, Cline detects the `@` followed by a commit hash pattern
2. The extension runs `git show` and related commands to get information about that commit
3. It retrieves the commit message, author, date, and the complete diff
4. This information is appended to your message in a structured format:
```
<git_commit hash="a1b2c3d">
commit a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t
Author: Developer Name <dev@example.com>
Date: Mon May 20 14:30:45 2025 -0700
Fix authentication bug in login form
[Complete diff output showing all changes in the commit]
</git_commit>
```
This process happens automatically whenever you use git mentions, giving the AI complete visibility into your code changes without you having to copy and paste diffs or commit logs.
@ mentions are one of Cline's most powerful features, letting you seamlessly bring external context into your conversations. Instead of copying and pasting code, error messages, or documentation, you can simply reference them with an @ symbol.
When you type `@` in the chat input, Cline shows a menu of available mention types. These mentions let you reference files, folders, problems, terminal output, git changes, and even web content directly in your conversations.
## Available @ Mentions
Cline supports several types of @ mentions, each designed to bring different kinds of context into your conversations:
Reference web content with `@https://example.com`. Cline fetches and sees the complete webpage content, perfect for
referencing documentation or GitHub issues.
</Card>
</Columns>
## Why @ Mentions Matter
@ mentions transform how you interact with Cline by:
1. **Eliminating copy-paste**: No more copying and pasting code, error messages, or terminal output. Just reference them directly.
2. **Preserving context**: Cline sees the complete context, including imports, related functions, and surrounding code that might be relevant.
3. **Maintaining formatting**: Terminal output, error messages, and web content keep their formatting, making them easier to understand.
4. **Enabling complex workflows**: Combine multiple @ mentions to give Cline a complete picture of your problem:
```
I'm getting these errors: @problems
Here's my component: @/src/components/Form.jsx
And the API endpoint: @/src/api/users.js
The error happens when I submit: @terminal
I think this commit might have caused it: @a1b2c3d
```
## Getting Started
To use @ mentions:
1. Type `@` in the chat input
2. Select the type of mention from the menu or continue typing
3. For files and folders, navigate through your workspace structure
4. Send your message as usual
Cline will automatically process the mentions and include the referenced content in the context sent to the AI.
Try using @ mentions in your next conversation with Cline - you'll be amazed at how much more efficient and effective your interactions become when you can seamlessly bring in external context.
## How It Works Under the Hood
When you use @ mentions in your messages, there's a sophisticated process happening behind the scenes:
1. **Detection**: When you send a message, Cline scans the text for @ mention patterns using regular expressions
2. **Processing**: For each detected mention, Cline:
- Determines the mention type (file, folder, problems, terminal, git, URL)
- Fetches the relevant content (file contents, terminal output, etc.)
- Formats the content appropriately
3. **Enhancement**: The original message is enhanced with structured data:
```
Your original message with @/path/to/file
<file_content path="/path/to/file">
[Complete file content]
</file_content>
```
4. **Context Inclusion**: This enhanced message with all the embedded content is sent to the AI model
5. **Seamless Response**: The AI can now "see" all the referenced content as if you had manually copied and pasted it
This entire process happens automatically and seamlessly whenever you use @ mentions, giving the AI complete context without you having to manually copy anything.
Each type of @ mention has its own specific implementation details, which you can find in their respective documentation pages.
The problems mention gives Cline instant access to all the errors and warnings in your workspace. Just type `@problems` and Cline can see every diagnostic issue VSCode has detected.
When you type `@` in chat, select "Problems" from the menu or just type `@problems` directly. Cline will immediately see all the errors and warnings from your workspace, complete with file locations and error messages.
I use the problems mention constantly when I'm stuck on build errors or TypeScript issues. Instead of trying to describe the errors or copy them one by one, I just ask:
```
I'm getting these TypeScript errors and I'm not sure how to fix them: @problems
Can you help me understand what's wrong and how to fix it?
```
This gives Cline the complete list of errors with their exact locations and messages. Cline can then analyze the patterns across multiple errors and suggest comprehensive solutions.
The problems mention is especially powerful when combined with file mentions. When I'm dealing with complex type errors, I'll reference both:
```
I'm getting these type errors: @problems
Here's my component: @/src/components/DataTable.tsx
And the types file: @/src/types/api.ts
How can I fix these issues?
```
This approach gives Cline everything it needs - the exact errors, the component code, and the type definitions - all without me having to copy anything manually.
Next time you're stuck on errors, try using `@problems` instead of copying error messages. You'll get more accurate help because Cline can see the complete error context and locations.
## How It Works Under the Hood
When you use the problems mention in your message, here's what happens behind the scenes:
1. When you send your message, Cline detects the `@problems` pattern in your text
2. The extension calls VSCode's built-in `vscode.languages.getDiagnostics()` API to get all errors and warnings
3. It formats these diagnostics into a structured text representation with file paths, line numbers, and error messages
4. The formatted problems list is appended to your message in a structured format:
```
<workspace_diagnostics>
/path/to/file.js:10:5 - error TS2322: Type 'string' is not assignable to type 'number'.
/path/to/file.js:15:3 - warning: This variable is never used.
</workspace_diagnostics>
```
5. This enhanced message with the embedded diagnostics is sent to the AI
6. The AI can now "see" all the errors and warnings in your workspace, complete with their locations and messages
This process happens automatically whenever you use the problems mention, giving the AI a comprehensive view of all the issues in your workspace without you having to copy them manually.
The terminal mention lets you bring your terminal output directly into your conversation with Cline. Just type `@terminal` and Cline can see the recent output from your terminal.
When you type `@` in chat, select "Terminal" from the menu or just type `@terminal` directly. Cline will immediately see the recent output from your active terminal, including error messages, build logs, or command results.
I use the terminal mention all the time when I'm dealing with build errors, test failures, or debugging output. Instead of trying to copy and paste terminal output (which often loses formatting), I just ask:
```
I'm getting this error when running my tests: @terminal
What's causing this and how can I fix it?
```
This gives Cline the complete terminal output with all its formatting intact. Cline can then analyze the error messages, stack traces, and surrounding context to provide more accurate help.
The terminal mention is especially powerful when combined with file mentions. When I'm debugging a failed API call, I'll reference both:
```
I'm getting this error when calling my API: @terminal
Here's my API client code: @/src/api/client.js
And the endpoint implementation: @/src/server/routes/users.js
What am I doing wrong?
```
This approach gives Cline everything it needs - the exact error output, the client code, and the server implementation - all without me having to copy anything manually.
Next time you're running into issues with command output or build errors, try using `@terminal` instead of copying the output. You'll get more accurate help because Cline can see the complete terminal context with proper formatting.
## How It Works Under the Hood
When you use the terminal mention in your message, here's what happens behind the scenes:
1. When you send your message, Cline detects the `@terminal` pattern in your text
2. The extension calls `getLatestTerminalOutput()` which accesses VSCode's terminal API
3. It captures the recent output buffer from your active terminal
4. The terminal output is appended to your message in a structured format:
```
<terminal_output>
$ npm run test
> project@1.0.0 test
> jest
FAIL src/components/__tests__/Button.test.js
● Button component › renders correctly
[Complete terminal output with formatting preserved]
</terminal_output>
```
5. This enhanced message with the embedded terminal output is sent to the AI
6. The AI can now "see" the complete terminal output with all formatting preserved
This process happens automatically whenever you use the terminal mention, giving the AI access to your command results, error messages, and other terminal output without you having to copy it manually.
## Troubleshooting Terminal Issues
If you're experiencing issues with terminal mentions or terminal integration in general (such as "Shell Integration Unavailable" or commands not showing output), please refer to our comprehensive [Terminal Integration Troubleshooting Guide](/troubleshooting/terminal-integration-guide).
Common issues include:
- Terminal mentions not capturing output
- "Shell Integration Unavailable" messages in Cline chat
- Commands executing but output not visible to Cline
- Terminal integration working inconsistently
The troubleshooting guide provides platform-specific solutions and detailed configuration steps to resolve these issues.
URL mentions let you bring web content directly into your conversation with Cline. Just type `@` followed by any URL, and Cline can see the content of that webpage without you having to copy and paste anything.
When you type `@` in chat followed by a URL (like `@https://example.com`), Cline will fetch the content of that webpage and include it in the context. This works for documentation pages, GitHub issues, Stack Overflow questions, or any other web content you want to reference.
I use URL mentions constantly when I'm working with external APIs or libraries. Instead of trying to explain how an API works or copying documentation snippets, I just reference the docs directly:
```
I'm trying to implement authentication with this API: @https://api.example.com/docs/auth
Can you help me write the code to get an access token based on these docs?
```
This gives Cline the complete documentation page, so it can see all the authentication requirements, endpoints, parameters, and examples. Cline can then provide more accurate and comprehensive help based on the official documentation.
URL mentions are especially useful for referencing GitHub issues or discussions:
```
I'm trying to fix this issue in our project: @https://github.com/our-org/our-repo/issues/123
Here's my current implementation: @/src/components/Feature.jsx
What changes do I need to make to address the issue?
```
This shows Cline the complete GitHub issue, including the description, comments, and any code snippets or screenshots. Cline can then help you implement a solution that directly addresses the reported issue.
Next time you're working with external documentation or online resources, try using URL mentions instead of copying and pasting content. You'll get more accurate help because Cline can see the complete context of the webpage, including formatting, code examples, and surrounding information.
## How It Works Under the Hood
When you use a URL mention in your message, here's what happens behind the scenes:
1. When you send your message, Cline detects the `@http://...` or `@https://...` pattern in your text
2. The extension launches a headless browser (Puppeteer) in the background
3. It navigates to the URL and waits for the page to load completely
4. The browser captures the page content, including text, formatting, and code examples
5. The content is converted to a Markdown format that preserves the structure
6. This content is appended to your message in a structured format:
```
<url_content url="https://example.com/docs">
# Example API Documentation
## Authentication
To authenticate with the API, you need to...
const token = await api.authenticate({
username: 'user',
password: 'pass'
});
[Complete webpage content in Markdown format]
</url_content>
```
7. The browser is then closed to free up resources
8. This enhanced message with the embedded webpage content is sent to the AI
This process happens automatically whenever you use a URL mention, giving the AI access to the complete content of the webpage without you having to copy and paste anything.
By default, Cline will ask for your permission before calling any tool, including reading or writing files.
If you want to allow Cline to do something without asking, you can set the Auto Approve permission for that tool.
## Permission Options
- **Read project files**
- Allows Cline to read files within your current workspace without asking
- **Read all files**
- Extends read permission to files outside your workspace (system files, config files, etc.)
- **Edit project files**
- Allows Cline to modify files within your current workspace without confirmation
- **Edit all files**
- Extends modification permission to files outside your workspace
- **Execute safe commands**
- Allows execution of terminal commands that the model deems non-destructive
- **Execute all commands**
- Permits execution of any terminal command without asking
- **Use the browser**
- Allows Cline to use the browser tool to fetch web content
- **Use MCP servers**
- Permits connection to and usage of MCP servers for extended functionality
- **Maximum requests**
- Sets the number of consecutive automated actions Cline can take before requiring your input
## Best Practices
Personally, I like to keep auto-editing disabled because it gives me a chance to review changes every step of the way.
For most serious development workflows, I recommend starting with:
- Auto-approving read access to project files
- Setting a reasonable maximum request limit (10-20)
This gives Cline enough freedom to explore your codebase without constant interruptions, while still requiring permission for edits or potentially destructive actions.
As you build more trust in Cline's capabilities with your specific projects, you can gradually increase the permissions to match your comfort level.
Remember that you can always adjust these settings as your needs change - tighten permissions for critical production work, or loosen them when prototyping and exploring.
You can even use the quick "star" actions to quickly toggle your auto-approved selections on and off as you go.
Checkpoints automatically save snapshots of your workspace after each step in a task. This feature lets you track changes, roll back when needed, and experiment confidently with your code.
## How Checkpoints Work
Cline creates a checkpoint after each tool use (file edits, commands, etc.). These checkpoints:
- Work alongside your Git workflow without interference
- Maintain context between restores
- Use a shadow Git repository to track changes
For example, if you're working on a feature and Cline makes multiple file changes, each change creates a checkpoint. This means you can review each modification and, if needed, roll back to any point without affecting your main Git repository.
## Viewing Changes & Restoring
After each tool use, you can:
1. Click the "Compare" button to see modified files
2. Click the "Restore" button to open restore options
- **Restore Workspace Only**: Reset codebase while preserving task context
Example: If Cline makes changes you don't like while styling a component, you can use "Restore Workspace Only" to revert the code changes while keeping the conversation context, allowing you to try a different approach.
<Frame caption="Reverting both codebase and task to before any changes were made to start fresh">
Checkpoints let you be more experimental with Cline. While human coding is often methodical and iterative, AI can make substantial changes quickly. Checkpoints help you track these changes and revert if needed.
### Using Auto-Approve Mode
- Provides safety net for rapid iterations
- Makes it easy to undo unexpected results
### Testing Different Approaches
- Try multiple solutions confidently
- Compare different implementations
- Quickly revert to working states
- Ideal for exploring different design patterns or architectural approaches
## Best Practices
1. Use checkpoints as safety nets when experimenting
2. Leverage auto-approve mode more confidently, knowing you can always roll back
3. Restore selectively based on needs:
- Use "Restore Task and Workspace" for a fresh start
- Use "Restore Task Only" to try different prompts, but keep file changes
- Use "Restore Workspace Only" to attempt different implementations while preserving conversation context
## Relationship with Message Editing
The [message editing feature](/features/editing-messages) uses checkpoints under the hood when you select the "Restore All" option. This allows you to not only edit and resubmit your message but also restore your workspace to the state it was in at that point in the conversation.
## Deleting Checkpoints
You can delete all checkpoints by using the **"Delete All History"** button in the task history menu. Note that this will also delete all tasks. Checkpoints are stored in VS Code's globalStorage.
Cline Rules allow you to provide Cline with system-level guidance. Think of them as a persistent way to include context and preferences for your projects or globally for every conversation.
## Creating a Rule
You can create a rule by clicking the `+` button in the Rules tab. This will open a new file in your IDE which you can use to write your rule.
<Frame>
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/cline-rules.png" alt="Create a Rule" />
</Frame>
Once you save the file:
- Your rule will be stored in the `.clinerules/` directory in your project (if it's a Workspace Rule)
- Or in the Global Rules directory (if it's a Global Rule):
### Global Rules Directory Location
The location of your Global Rules directory depends on your operating system:
| Operating System | Default Location | Notes |
|------------------|------------------|-------|
| **Windows** | `Documents\Cline\Rules` | Uses system Documents folder |
| **macOS** | `~/Documents/Cline/Rules` | Uses user Documents folder |
| **Linux/WSL** | `~/Documents/Cline/Rules` | May fall back to `~/Cline/Rules` on some systems |
> **Note for Linux/WSL users**: If you don't find your global rules in `~/Documents/Cline/Rules`, check `~/Cline/Rules` as the location may vary depending on your system configuration and whether the Documents directory exists.
You can also have Cline create a rule for you by using the [`/newrule` slash command](/features/slash-commands/new-rule) in the chat.
```markdown Example Cline Rule Structure [expandable]
# Project Guidelines
## Documentation Requirements
- Update relevant documentation in /docs when modifying features
- Keep README.md in sync with new capabilities
- Maintain changelog entries in CHANGELOG.md
## Architecture Decision Records
Create ADRs in /docs/adr for:
- Major dependency changes
- Architectural pattern changes
- New integration patterns
- Database schema changes
Follow template in /docs/adr/template.md
## Code Style & Patterns
- Generate API clients using OpenAPI Generator
- Use TypeScript axios template
- Place generated code in /src/generated
- Prefer composition over inheritance
- Use repository pattern for data access
- Follow error handling pattern in /src/utils/errors.ts
## Testing Standards
- Unit tests required for business logic
- Integration tests for API endpoints
- E2E tests for critical user flows
```
### Key Benefits
1. **Version Controlled**: The `.clinerules` file becomes part of your project's source code
2. **Team Consistency**: Ensures consistent behavior across all team members
3. **Project-Specific**: Rules and standards tailored to each project's needs
4. **Institutional Knowledge**: Maintains project standards and practices in code
Place the `.clinerules` file in your project's root directory:
```
your-project/
├── .clinerules
├── src/
├── docs/
└── ...
```
Cline's system prompt, on the other hand, is not user-editable ([here's where you can find it](https://github.com/cline/cline/blob/main/src/core/prompts/system.ts)). For a broader look at prompt engineering best practices, check out [this resource](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview).
### Tips for Writing Effective Cline Rules
- Be Clear and Concise: Use simple language and avoid ambiguity.
- Focus on Desired Outcomes: Describe the results you want, not the specific steps.
- Test and Iterate: Experiment to find what works best for your workflow.
│ └── current-sprint.md # Rules specific to current work
├── src/
└── ...
```
Cline automatically processes **all Markdown files** inside the `.clinerules/` directory, combining them into a unified set of rules. The numeric prefixes (optional) help organize files in a logical sequence.
#### Using a Rules Bank
For projects with multiple contexts or teams, maintain a rules bank directory:
```
your-project/
├── .clinerules/ # Active rules - automatically applied
│ ├── 01-coding.md
│ └── client-a.md
│
├── clinerules-bank/ # Repository of available but inactive rules
│ ├── clients/ # Client-specific rule sets
│ │ ├── client-a.md
│ │ └── client-b.md
│ ├── frameworks/ # Framework-specific rules
│ │ ├── react.md
│ │ └── vue.md
│ └── project-types/ # Project type standards
│ ├── api-service.md
│ └── frontend-app.md
└── ...
```
#### Benefits of the Folder Approach
1. **Contextual Activation**: Copy only relevant rules from the bank to the active folder
2. **Easier Maintenance**: Update individual rule files without affecting others
3. **Team Flexibility**: Different team members can activate rules specific to their current task
4. **Reduced Noise**: Keep the active ruleset focused and relevant
- Keep individual rule files focused on specific concerns
- Use descriptive filenames that clearly indicate the rule's purpose
- Consider git-ignoring the active `.clinerules/` folder while tracking the `clinerules-bank/`
- Create team scripts to quickly activate common rule combinations
The folder system transforms your Cline rules from a static document into a dynamic knowledge system that adapts to your team's changing contexts and requirements.
### Managing Rules with the Toggleable Popover
To make managing both single `.clinerules` files and the folder system even easier, Cline v3.13 introduces a dedicated popover UI directly accessible from the chat interface.
Located conveniently under the chat input field, this popover allows you to:
- **Instantly See Active Rules:** View which global rules (from your user settings) and workspace rules (`.clinerules` file or folder contents) are currently active.
- **Quickly Toggle Rules:** Enable or disable specific rule files within your workspace `.clinerules/` folder with a single click. This is perfect for activating context-specific rules (like `react-rules.md` or `memory-bank.md`) only when needed.
- **Easily Add/Manage Rules:** Quickly create a workspace `.clinerules` file or folder if one doesn't exist, or add new rule files to an existing folder.
This UI significantly simplifies switching contexts and managing different sets of instructions without needing to manually edit files or configurations during a conversation.
Cline's code commands bring AI assistance directly into your editor, letting you interact with your code without leaving your workflow. With a simple right-click, you can add code to Cline, and through the lightbulb menu, you can fix errors, get explanations, or improve your code.
## Available Code Commands
When you interact with code in your editor, you can access Cline commands in two ways:
### Right-Click Context Menu
When you right-click on selected code, you'll see:
The "Fix with Cline" command appears in the lightbulb menu when your code has errors or warnings. This command:
1. Captures the selected code
2. Identifies the errors or warnings from VSCode's diagnostics
3. Sends both to Cline with a request to fix the issues
4. Provides a solution that addresses the specific problems
This is incredibly useful for quickly resolving syntax errors, linter warnings, or type issues without having to manually describe the problem.
#### Explain with Cline
The "Explain with Cline" command helps you understand complex code. When you select code and use this command from the lightbulb menu, Cline:
1. Analyzes the selected code
2. Provides a clear explanation of what the code does
3. Breaks down complex logic into understandable parts
4. Highlights important patterns or techniques used
#### Improve with Cline
The "Improve with Cline" command helps you enhance your code. When you select code and use this command from the lightbulb menu, Cline:
1. Analyzes the selected code for potential improvements
2. Suggests optimizations, refactorings, or better practices
3. Explains the reasoning behind the suggested changes
4. Provides improved code that maintains the original functionality
## How to Use Code Commands
Using Cline's code commands is simple:
### For Right-Click Commands:
1. Select the code you want to work with
2. Right-click to open the context menu
3. Choose "Add to Cline"
4. View the result in the Cline chat panel
### For Lightbulb Menu Commands:
1. Select the code you want to work with
2. Look for the lightbulb icon that appears in the editor gutter
3. Click the lightbulb to see available actions
4. Choose the appropriate Cline command (Fix, Explain, or Improve)
5. View the result in the Cline chat panel
After using any command, you can:
- Ask follow-up questions
- Request modifications to the solution
- Apply the changes back to your code
## How It Works Under the Hood
When you use a code command, here's what happens behind the scenes:
1. **Code Selection**: The extension captures your selected code and its context
2. **Metadata Collection**: Cline gathers important metadata:
- File path and name
- Programming language
- Any associated diagnostics (errors/warnings)
- Surrounding code context when relevant
3. **Command Processing**:
- For "Add to Cline," the code is formatted and sent to the chat panel
- For "Fix with Cline," the code and diagnostics are analyzed and a fix is generated
- For "Explain with Cline," the code is analyzed to provide a clear explanation
- For "Improve with Cline," the code is analyzed for potential optimizations and improvements
4. **Integration with Chat**: The results appear in the Cline chat panel, where you can:
- See the AI's response
- Ask follow-up questions
- Apply suggested changes
This seamless integration between your editor and Cline's AI capabilities makes it easy to get assistance without disrupting your coding flow.
## Tips for Effective Use
- **Select complete logical units**: When possible, select entire functions, classes, or modules to give Cline complete context
- **Include imports**: For language-specific help, include relevant imports so Cline understands dependencies
- **Combine with @ mentions**: For complex issues, use code commands along with file or problem mentions for more context
- **Use keyboard shortcuts**: Speed up your workflow by [assigning keyboard shortcuts](/features/commands-and-shortcuts/keyboard-shortcuts) to common code commands
Next time you're struggling with a piece of code, try using Cline's code commands instead of switching to a separate chat interface. You'll be amazed at how much more efficient your workflow becomes when AI assistance is integrated directly into your editor.
When you use Cline's commit message generation feature, here's what happens behind the scenes:
1. Cline retrieves the current Git diff using `getWorkingState()`
2. It formats this diff into a specialized prompt for the AI
3. The AI analyzes the changes and generates an appropriate commit message
4. The message is extracted and inserted into the Git commit message input box
This process uses your current Cline API configuration, so the quality of the generated messages matches your chosen AI model.
## Tips for Effective Use
- **Generate commit messages for complex changes**: The AI excels at summarizing multiple related changes into a coherent message.
- **Review and edit generated messages**: While the AI generates high-quality messages, it's always good practice to review and adjust them if needed.
- **Stage related changes together**: For the best results, stage related changes together so the AI can generate a cohesive message.
- **Use for consistent commit history**: Using the generate commit message feature helps maintain a consistent style across your commit history.
## How It Works Under the Hood
The commit message generation leverages VSCode's Git extension API to access repository information:
1. When you trigger the command:
- Cline gets the current diff
- It sends this to the AI with specific instructions for commit message formatting
- It parses the AI's response
- It accesses the Git extension API to set the commit message
This integration with Git makes it easy to generate high-quality commit messages without disrupting your workflow.
Next time you're struggling to write a good commit message, try using Cline's commit message generation. You'll save time and improve your version control workflow with AI assistance right where you need it.
Cline's keyboard shortcuts let you access AI assistance without taking your hands off the keyboard. Speed up your workflow by using hotkeys for common Cline actions.
## Default Keyboard Shortcuts
Cline comes with the following built-in keyboard shortcuts to streamline your workflow:
| Open Cline Sidebar | `Ctrl+Shift+C` / `Cmd+Shift+C` | `claude-dev.SidebarProvider.focus` | Opens the Cline sidebar panel |
| New Task | `Alt+N` | `cline.plusButtonClicked` | Starts a new Cline task |
| Add Terminal to Cline | `Alt+T` | `cline.addTerminalOutputToChat` | Adds terminal output to Cline |
| Clear Current Task | `Alt+C` | (Requires custom keybinding to UI action) | Clears the current task |
## Keyboard-Only Workflow
With the right shortcuts, you can use Cline without ever touching the mouse:
1. Select code with keyboard navigation (`Shift+Arrow` keys)
2. Send to Cline with `Ctrl+'` / `Cmd+'`
3. Type your question and press Enter
4. Review the response and apply suggestions
## Editor Integration Shortcuts
Cline's keyboard shortcuts integrate seamlessly with VSCode's built-in shortcuts:
- Use VSCode's selection shortcuts (`Ctrl+L` / `Cmd+L` to select line, etc.) before sending code to Cline
- Combine with VSCode's split editor shortcuts to view code and Cline side by side
- Use VSCode's terminal focus shortcut (`` Ctrl+` `` / `` Cmd+` ``) before capturing terminal output
## Tips for Effective Use
- **Learn the default shortcut first**: The `Ctrl+'` / `Cmd+'` shortcut is versatile - it adds selected code to chat when text is selected, or focuses the chat input when nothing is selected
- **Create muscle memory**: Use keyboard shortcuts consistently to build habits
- **Customize for your workflow**: Assign shortcuts to commands you use frequently
- **Consider ergonomics**: Choose shortcuts that are comfortable for your keyboard layout
Keyboard shortcuts may seem like a small optimization, but they can significantly speed up your workflow when using Cline regularly. By keeping your hands on the keyboard, you maintain your coding flow while still getting AI assistance exactly when you need it.
## How to Find All Available Commands
To see all Cline commands that can be assigned shortcuts:
1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
Cline integrates directly into VSCode's interface, letting you access AI assistance without disrupting your workflow. These integrations appear as commands in context menus, keyboard shortcuts, and quick fixes throughout the editor.
Editor integrations are commands and shortcuts that let you use Cline right where you're working. Instead of switching to the Cline panel first, you can select code, right-click, and immediately send it to Cline for help.
These integrations appear in different places throughout VSCode:
- In the editor context menu (right-click menu) - "Add to Cline"
- In the terminal context menu - "Add to Cline"
- In the Source Control view - "Generate Commit Message"
- As keyboard shortcuts - Various Cline commands
- As Quick Fix options (lightbulb menu) - "Fix with Cline", "Explain with Cline", "Improve with Cline"
### Available Editor Integrations
Cline offers several editor integrations, each designed to enhance different aspects of your development workflow:
Right-click on code to add it to Cline, or use the lightbulb menu to fix errors, explain code, or improve it. Cline sees the complete code context, including imports and surrounding functions.
Cline's terminal integration lets you bring your terminal output directly into your conversations with Cline. Instead of copying and pasting error messages or command results, you can send them to Cline with a simple right-click in the terminal.
When you're working in the VSCode terminal and see output you want to discuss with Cline:
1. Right-click in the terminal
2. Select "Add to Cline" from the context menu
3. The terminal output is immediately sent to the Cline chat panel
This is perfect for:
- Debugging build errors
- Understanding test failures
- Analyzing command output
- Getting help with error messages
The right-click terminal integration is especially useful when you're already working in the terminal and encounter an issue.
Instead of switching context to the Cline chat panel and typing a description of the problem, you can send the terminal output directly to Cline with just a couple of clicks.
Alternatively, you can use the [`@terminal`](/features/at-mentions/terminal-mentions) mention to send the full terminal output to Cline.
<Tip>
For information about using `@terminal` mentions in your chat messages, see the [Terminal
When you use the right-click terminal integration, Cline:
1. Captures the terminal output with all formatting preserved
2. Includes the complete context, including command history and results
3. Formats it appropriately for the AI to understand
4. Enables the AI to see exactly what you're seeing
This gives Cline the full context it needs to provide accurate help with terminal-related issues.
## Behind the Scenes
The terminal integration uses a clever technique to capture terminal output:
1. When you trigger the integration, Cline:
- Temporarily saves your current clipboard content
- Selects all terminal content (or uses your existing selection)
- Copies it to the clipboard
- Reads the clipboard to get the terminal content
- Restores your original clipboard content
2. The terminal content is then:
- Formatted with proper syntax highlighting
- Added to your message or sent as a new message
- Enhanced with additional context when needed
This approach ensures that all terminal output, including colors and formatting, is accurately captured without affecting your clipboard.
## Tips for Effective Use
- **Use terminal integration for error messages**: When you encounter an error in the terminal, sending it to Cline often results in faster resolution than trying to describe the error.
- **Select specific output when needed**: By default, the integration captures all terminal content, but you can also select specific lines before right-clicking to focus on just the relevant output.
- **Combine terminal outputs with file mentions**: After sending terminal output to Cline, you can enhance your question by mentioning relevant files using the @ mentions feature.
- **Contextualize build & test outputs with the terminal**: Terminal integration is particularly useful for understanding complex build errors or test failures that span multiple lines.
Next time you're staring at a cryptic error message in your terminal, try using Cline's terminal integration instead of copying and pasting. You'll get more accurate help because Cline can see the complete terminal context with proper formatting.
## Troubleshooting Terminal Issues
If you're experiencing issues with terminal integration, such as "Shell Integration Unavailable" or commands not showing output, please refer to our comprehensive [Terminal Integration Troubleshooting Guide](/troubleshooting/terminal-integration-guide).
The troubleshooting guide covers:
- Common terminal integration issues and quick fixes
- Platform-specific solutions for Windows, macOS, and Linux
- Shell-specific configurations for zsh, bash, PowerShell, and more
- Advanced debugging techniques
- Terminal settings optimization
<Tip>
**Quick Fix**: Most terminal issues can be resolved by switching to bash in the Cline settings and increasing the shell
Dragging and dropping files into Cline is a quick way to add images, code, and other files to your conversations.
<Note>Due to VS Code quirks, to drag and drop files into the Cline chat input, you need to hold `Shift` while dragging.</Note>
Dragging and dropping workspace files into Cline will automatically create a [file mention](/features/at-mentions/file-mentions). This allows you to reference the file in your conversation without needing to type out the path.
### Supported File Types
Cline supports dragging external images from your file system, as well as files from your workspace.
Cline allows you to edit chat messages in a task after they've been submitted. This feature lets you refine your requests without starting a new task, helping you get better results with minimal disruption to your workflow.
## When to Edit Messages
You might want to edit a message when:
- You didn't get the results you wanted
- You thought of a better way to phrase your request
- You need to add more information or context
- You made a typo or error in your original message
## How to Edit Messages
1. Click on any message in the conversation (except the initial task message)
2. Edit the text as needed
3. Use the restore options to resubmit your request
Plan & Act modes represent Cline's approach to structured AI development, emphasizing thoughtful planning before implementation. This dual-mode system helps developers create more maintainable, accurate code while reducing iteration time.
`/newrule` is a slash command that lets you teach Cline your preferred way of working. It creates a markdown file in your `.clinerules` directory that acts like persistent instructions for how Cline should behave when helping with your projects.
Think of it as setting up house rules that Cline will always follow, so you don't have to repeat your preferences in every conversation.
#### Using the `/newrule` Slash Command
When you want Cline to consistently follow certain guidelines:
- Type `/newrule` in the chat
- Cline will help you create a structured rule file by asking about your preferences for:
- Communication style (verbose vs. concise)
- Development workflows
- Coding standards
- Project context
- Any other specific guidelines
- You'll review the rule file before it's created
- Once approved, Cline creates a markdown file in your `.clinerules` directory that will automatically be loaded for future conversations
#### Example
I used `/newrule` when I was fed up with repeating the same instructions on every new task. I had specific preferences for how I wanted my React components structured, which testing library to use, and even my preferred variable naming style.
Instead of typing these preferences each time, I just used `/newrule` and worked with Cline to create a detailed rule file. We built a markdown file that covered everything from code organization to my preference for functional components over class components.
Now whenever I chat with Cline about my React project, it automatically follows these guidelines without me having to remind it. The best part is that I can create different rule files for different projects, so Cline adapts to whatever codebase I'm working on.
#### Inspiration
Here's how I use `/newrule` to make my development smoother:
- I created a rule file for each major project with specific architectural patterns and library preferences, so Cline always generates code that matches our existing codebase.
- For my team's shared projects, we have a common rule file that ensures consistent code style and documentation practices regardless of who's using Cline.
- When working with legacy code, I made a rule file that reminds Cline about the quirks and constraints of the old system, so it never suggests modern approaches that won't integrate well.
- I even have a personal rule file for my side projects with all my opinionated preferences - two-space indentation, arrow functions everywhere, and my exact folder structure requirements.
`/newtask` is a slash command that works like a perfect developer handoff. It intelligently packages what matters - the overall plan, work accomplished, relevant files, and next steps - into a fresh task with a clean context window. All while leaving behind the noise of tool calls, documentation searches, and implementation details.
It's exactly what you'd do when bringing a new developer onto your project: provide the essential context they need to continue the work without overwhelming them with every keystroke that came before.
#### Using the `/newtask` Slash Command
When your context window is filling up but you're not done with your project:
- Cline will analyze your conversation and propose a distilled version of the context to carry forward
- You can refine this proposed context through conversation before committing
- Once satisfied, a button appears to create the new task with your refined context
#### Example
I regularly use `/newtask` when working through complex implementations with multiple steps. For instance, if I've completed 3 steps of a 10-step process and my context is already 75% full with documentation snippets, file contents, and detailed discussions.
Rather than losing those insights or starting from scratch, I use `/newtask` to have Cline extract what matters - the key decisions, file changes, and progress so far - without all the noise of individual tool calls and research steps.
I like to think of `/newtask` as a new developer joining the project. I need to give them the full understanding of the work that has been done, awareness of the relevant files, any other context that would be helpful, and where to go next.
#### Inspiration
Here are some popular ways to use `/newtask`:
- I research complex APIs using the Context7 MCP server, filling my context with documentation. Once I understand the concepts, I use `/newtask` to start fresh with just the essential knowledge needed for implementation.
- After identifying the root cause of a tough bug through multiple debugging attempts and file explorations, I use `/newtask` to continue with a clean slate that includes the solution but discards all the failed attempts.
- When a client discussion explores multiple approaches and finally settles on one direction, I use `/newtask` to focus solely on implementing the chosen solution.
- For complex projects spanning multiple days, I use `/newtask` at logical stopping points to maintain a clean workspace while carrying forward my progress.
`/reportbug` is an absolute lifesaver when you hit a weird issue with Cline. Instead of having to remember all the details GitHub wants for a bug report, this command turns Cline into your personal bug reporting assistant.
It walks you through collecting all the info needed for a proper bug report and then shoots it straight to our GitHub issues page with all the right formatting and system details included.
#### Using the `/reportbug` Slash Command
When you run into something funky that doesn't seem right:
- Just type `/reportbug` in the chat
- Cline will guide you through all the details we need:
- A quick title describing the issue
- What actually happened vs. what you expected
- Steps to reproduce the bug
- Any relevant output or errors you saw
- Additional context that might help us fix it
- You'll get to review everything before it's submitted
- Once you approve, it opens a perfectly formatted GitHub issue with all your info plus automatic system details
#### Example
Last week I hit a weird bug where Cline kept timing out when reading large files. Instead of trying to remember all the GitHub template fields, I just typed `/reportbug` and Cline guided me through the whole process.
It asked me about what I was trying to do, what happened instead, and the exact steps that led to the issue. The best part was that it automatically included my OS version, Cline version, and all the technical details our devs would need.
A few seconds later, I had a properly formatted GitHub issue created without having to hunt down any of that info myself.
`/smol` (or its alias, `/compact`) is a slash command that compresses your conversation history while preserving essential context.
Unlike `/newtask` which creates a new task, `/smol` condenses your current conversation into a comprehensive summary, freeing up context window space while allowing you to continue working in the same task.
Think of it like summarizing the relevant parts of a conversation while discarding the rest.
#### Using the `/smol` Slash Command
When your context window is getting full but you want to continue in the same task:
<Frame>
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/smol.png" alt="Using the /smol slash command" />
</Frame>
- Type `/smol` (or its alias `/compact`) in the chat input field
- Cline will analyze your conversation and create a detailed summary that preserves essential information
- You'll have a chance to review this summary and provide feedback if needed
- Once accepted, the detailed conversation history is replaced with this condensed version
#### Example
I use `/smol` when I'm deep into a complex debugging session and need to continue in the same task. After exploring multiple approaches and examining several files, my context window gets crowded with all the back-and-forth.
By using `/smol`, I can condense all that exploration into a concise summary that captures what we've learned, which files we've examined, and what approaches we've tried. This frees up space to continue the debugging without losing the insights we've gained.
The key difference from `/newtask` is that I'm staying in the same conversation flow rather than creating a separate task. This is particularly useful when I'm in the middle of something and don't want to context switch.
#### Inspiration
Here are powerful ways I use `/smol` in my workflow:
- During lengthy brainstorming sessions, I use `/smol` to condense our exploration before implementing the chosen solution, all within the same task.
- When debugging complex issues that involve multiple file checks and test runs, I use `/smol` to summarize what we've learned while continuing the debugging process.
- For iterative development, I use `/smol` after completing each feature to compress the implementation details while keeping the key decisions and approaches accessible.
- When gathering requirements from multiple sources, I use `/smol` to distill the essential needs into a concise summary before moving to the design phase.
#### Smol vs Newtask
People often ask me when to use `/smol` vs `/newtask`. Frankly, it's a matter of personal preference and what you're trying to achieve. Here are some guidelines:
- Use `/smol` when you're in the middle of something and want to keep going in the same task. It's perfect when you're deep in a debugging flow or brainstorming session and don't want to break your momentum. The downside? Once you compress your history, you can't get those detailed conversations back.
- Use `/newtask` when you're at a logical transition point and want to start fresh. It's great for moving from planning to implementation, or when you want to preserve your full conversation history (since it creates a new task rather than overwriting your current one).
Workflows allow you to define a series of steps to guide Cline through a repetitive set of tasks, such as deploying a service or submitting a PR.
To invoke a workflow, type `/[workflow-name.md]` in the chat.
## How to Create and Use Workflows
Workflows live alongside [Cline Rules](/features/cline-rules). Creating one is straightforward:
<Frame>
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/workflows.png" alt="Workflows tab in Cline" />
</Frame>
1. Create a markdown file with clear instructions for the steps Cline should take
2. Save it with a `.md` extension in your workflows directory
3. To trigger a workflow, just type `/` followed by the workflow filename
4. Provide any required parameters when prompted
The real power comes from how you structure your workflow files. You can:
- Leverage Cline's [built-in tools](/exploring-clines-tools/cline-tools-guide) like `ask_followup_question`, `read_file`, `search_files`, and `new_task`
- Use command-line tools you already have installed like `gh` or `docker`
- Reference external [MCP tool calls](/mcp/mcp-overview) like Slack or Whatsapp
- Chain multiple actions together in a specific sequence
## Real-world Example
I created a PR Review workflow that's already saving me tons of time.
````md pr-review.md [expandable]
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]
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
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:
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>
````
When I get a new PR to review, I used to manually gather context: checking the PR description, examining the diff, looking at surrounding files, and finally forming an opinion. Now I just:
1. Type `/pr-review.md` in chat
2. Paste in the PR number
3. Let Cline handle everything else
My workflow uses the `gh` command-line tool and Cline's built in `ask_followup_question` to:
- Pull the PR description and comments
- Examine the diff
- Check surrounding files for context
- Analyze potential issues
- Asks me if it's cool approve it if everything looks good, with justification for why it should be approved
- If I say "yes," Cline automatically approves the PR with the `gh` command
This has taken my PR review process from a manual, multi-step operation to a single command that gives me everything I need to make an informed decision.
> This is just one example of a workflow file. You can find more in our [prompts repository](https://github.com/cline/prompts) for inspiration.
## Building Your Own Workflows
The beauty of workflows is they're completely customizable to your needs. You might create workflows for all kinds of repetitive tasks:
- For releases, you could have a workflow that grabs all merged PRs, builds a changelog, and handles version bumps.
- Setting up new projects is perfect for workflows. Just run one command to create your folder structure, install dependencies, and set up configs.
- Need to create a report? Create a workflow that grabs stats from different sources and formats them exactly how you like. You can even visualize them with a charting library and then make a presentation out of it with a library like [slidev](https://sli.dev/).
- You can even use workflows to draft messages to your team using an MCP server like Slack or Whatsapp after you submit a PR.
With Workflows, your imagination is the limit. The true potential comes from spotting those annoying repetitive tasks you do all the time.
If you can describe something as "first I do X, then Y, then Z" - that's a perfect workflow candidate.
Start with something small that bugs you, turn it into a workflow, and keep refining it. You'll be shocked how much of your day can be automated this way.
description: "Welcome to Cline, your AI-powered coding companion! This guide will help you quickly set up your development environment and begin your coding journey with ease."
---
> 💡 **Tip:** If you're completely new to coding, take your time with each step. There's no rush — Cline is here to guide you!
### 🚀 Getting Started
Before you jump into coding, make sure you have these essentials ready:
#### 1. **VS Code**
A popular, free, and powerful code editor.
- [<u>Download VS Code</u>](https://code.visualstudio.com/)
📺 **Recommended YouTube Tutorial:** [<u>How to Install VS Code</u>](https://www.youtube.com/watch?v=MlIzFUI1QGA)
> ✅ **Pro Tip:** Install VS Code in your Applications folder (macOS) or Program Files (Windows) for easy access from your dock or start menu.
#### 2. **Organize Your Projects**
Create a dedicated folder named `Cline` in your Documents folder for all your coding projects:
Inside your `Cline` folder, structure projects clearly:
- `Documents/Cline/workout-app` _(e.g., for a fitness tracking app)_
- `Documents/Cline/portfolio-website` _(e.g., to showcase your work)_
> 💡 **Tip:** Keeping your projects organized from the start will save you time and confusion later!
#### 3. **Install the Cline VS Code Extension**
Enhance your coding workflow by installing the Cline extension directly within VS Code:
- Get Started with Cline Extension Tutorial
📺 **Recommended YouTube Tutorial:** [<u>How To Install Extensions in VS Code</u>](https://www.youtube.com/watch?v=E7trgwZa-mk)
> ✅ **Pro Tip:** After installing, reload VS Code to ensure the extension is activated properly.
#### 4. **Essential Development Tools**
Basic software required for coding efficiently:
- Homebrew (macOS)
- Node.js
- Git
👉 [<u>Follow our detailed guide on Installing Essential Development Tools with step-by-step help from Cline.</u>](https://docs.cline.bot/getting-started/installing-dev-essentials#installing-dev-essentials)
📺 **Recommended YouTube Tutorials for Manual Installation:**
- **For macOS:**
- [<u>Install Homebrew on Mac</u>](https://www.youtube.com/watch?v=hwGNgVbqasc)
- [<u>Install Git on macOS 2024</u>](https://www.youtube.com/watch?v=B4qsvQ5IqWk)
- [<u>Install Node.js on Mac (M1 | M2 | M3)</u>](https://www.youtube.com/watch?v=I8H4wolRFBk)
- **For Windows:**
- [<u>Install Git on Windows 10/11 (2024)</u>](https://www.youtube.com/watch?v=yjxv1HuRQy0)
- [<u>Install Node.js in Windows 10/11</u>](https://www.youtube.com/watch?v=uCgAuOYpJd0)
> ⚠️ **Note:** If you run into permission issues during installation, try running your terminal or command prompt as an administrator.
🎉 You're all set! Dive in and start coding smarter and faster with **Cline**.
1. **Install the Extension:** Click the "Install" button next to the Cline extension.
2. **Open Cline:**
- Click the Cline icon in the Activity Bar.
- Or, use the command palette (`Ctrl/Cmd + Shift + P`) and type "Cline: Open In New Tab" for a better view.
3. **Troubleshooting:** If you don't see the Cline icon, try restarting VS Code.
> ✅ **Pro Tip:** You should see the Cline chat window appear in your VS Code editor!
### 🌐 Open VSX Registry
For VS Code-compatible editors without Marketplace access (like VSCodium and Windsurf):
1. Open your editor.
2. Access the Extensions view.
3. Search for "Cline".
4. Select "Cline" by saoudrizwan and click **Install**.
5. Reload if prompted.
### 👤 Creating Your Cline Account
Now that you have Cline installed, let's get you set up with your account:
1. **Sign In to Cline:**
- Click the **Sign In** button in the Cline extension.
- You'll be taken to [app.cline.bot](https://app.cline.bot) to create your account.
2. **Start with Free Credits:**
- No credit card needed!
3. **Available AI Models:**
- Anthropic Claude 3.5-Sonnet (recommended for coding)
- DeepSeek Chat (cost-effective alternative)
- Google Gemini 2.0 Flash
- And more — all through your Cline account.
### 💻 Your First Interaction with Cline
You're ready to start building! Copy and paste this prompt into the Cline chat window:
```
Hey Cline! Could you help me create a new project folder called "hello-world" in my Cline directory and make a simple webpage that says "Hello World" in big blue text?
```
> ✅ **Pro Tip:** Cline will help you create the project folder and set up your first webpage!
### 🧩 Tips for Working with Cline
- **Ask Questions:** If you're unsure about something, ask Cline!
- **Use Screenshots:** Cline can understand images — show him what you're working on.
- **Copy and Paste Errors:** Share error messages in the chat for solutions.
- **Speak Plainly:** Use your own words — Cline will translate them into code.
### 🫂 Still Struggling?
Join our Discord community and engage with our team and other Cline users directly.
When you start coding, you'll need some essential development tools installed
on your computer. Cline can help you install everything you need in a safe,
guided way.
---
### 🧰 The Essential Tools
Here are the core tools you'll need for development:
- **Node.js & npm:** Required for JavaScript and web development
- **Git:** For tracking changes in your code and collaborating with others
- **Package Managers:** Tools that make it easy to install other development tools
- Homebrew for macOS
- Chocolatey for Windows
- apt/yum for Linux
> 💡 **Tip:** These tools are the foundation of your developer toolkit. Installing them properly will set you up for success!
### 🚀 Let Cline Install Everything
Copy one of these prompts based on your operating system and paste it into **Cline**:
#### For macOS
```
Hello Cline! I need help setting up my Mac for software development. Could you please help me install the essential development tools like Homebrew, Node.js, Git, and any other core utilities that are commonly needed for coding? I'd like you to guide me through the process step-by-step.
```
#### For Windows
```
Hello Cline! I need help setting up my Windows PC for software development. Could you please help me install the essential development tools like Node.js, Git, and any other core utilities that are commonly needed for coding? I'd like you to guide me through the process step-by-step.
```
#### For Linux
```
Hello Cline! I need help setting up my Linux system for software development. Could you please help me install the essential development tools like Node.js, Git, and any other core utilities that are commonly needed for coding? I'd like you to guide me through the process step-by-step.
```
> ✅ **Pro Tip:** Cline will show you each command before running it. You stay in control the entire time!
### 🔍 What Will Happen
Cline will guide you through the following steps:
1. Installing the appropriate package manager for your system
2. Using the package manager to install Node.js and Git
3. Showing you the exact command before it runs (you approve each step!)
4. Verifying each installation is successful
> ⚠️ **Note:** You might need to enter your computer's password for some installations. This is normal!
### 💡 Why These Tools Are Important
- **Node.js & npm:**
- Build websites with frameworks like React or Next.js
- Run JavaScript code
- Install JavaScript packages
- **Git:**
- Save different versions of your code
- Collaborate with other developers
- Back up your work
- **Package Managers:**
- Quickly install and update development tools
- Keep your environment organized and up to date
### 🧩 Notes
> 💡 **Tip:** The installation process is interactive — Cline will guide you step by step!
- All commands are shown to you for approval before they run.
- If you run into any issues, Cline will help troubleshoot them.
- You may need to enter your computer's password for certain steps.
### 🧑💻 Additional Tips for New Coders
#### Understanding the Terminal
The Terminal is an application where you can type commands to interact with your computer.
- **macOS:** Open it by searching for "Terminal" in Spotlight.
- **Example:**
```
$ open -a Terminal
```
#### Understanding VS Code Features
- **Terminal in VS Code:** Run commands directly from within VS Code!
- Go to **View > Terminal** or press \`Ctrl + \`\`.
- Example:
```
$ node -v
v16.14.0
```
- **Document View:** Where you edit your code files.
- Open files from the Explorer panel on the left.
- **Problems Section:** View errors or warnings in your code.
- Access it by clicking the lightbulb icon or **View > Problems**.
#### Common Features
- **Command Line Interface (CLI):** A powerful tool for running commands.
- **Permissions:** You might need to grant permissions to certain commands — this keeps your system secure.
Think of a context window as your AI assistant's working memory - similar to RAM in a computer. It determines how much information the model can "remember" and process at once during your conversation. This includes:
- Your code files and conversations
- The assistant's responses
- Any documentation or additional context provided
Context windows are measured in tokens (roughly 3/4 of a word in English). Different models have different context window sizes:
- Claude 3.5 Sonnet: 200K tokens
- DeepSeek Models: 128K tokens
- Gemini Flash 2.0: 1M tokens
- Gemini 1.5 Pro: 2M tokens
When you reach the limit of your context window, older information needs to be removed to make room for new information - just like clearing RAM to run new programs. This is why sometimes AI assistants might seem to "forget" earlier parts of your conversation.
Cline helps you manage this limitation with its Context Window Progress Bar, which shows:
- Input tokens (what you've sent to the model)
- Output tokens (what the model has generated)
- A visual representation of how much of your context window you've used
- The total capacity for your chosen model
<Frame caption="Visual representation of the context window usage in Cline">
| Gemini 1.5 Pro | $0.00 | $0.00 | 2M | Large context processing |
\*Costs per million tokens
### Top Picks for 2025
1. **Claude 3.5 Sonnet**
- Best overall code implementation
- Most reliable tool usage
- Expensive but worth it for critical code
2. **DeepSeek R1**
- Exceptional planning & reasoning
- Great value pricing
3. **o3-mini**
- Strong for planning with adjustable reasoning
- Three reasoning modes for different needs
- Requires OpenAI Tier 3 API access
- 200K context window
4. **DeepSeek V3**
- Reliable code implementation
- Great for daily coding
- Cost-effective for implementation
5. **Gemini Flash 2.0**
- Massive 1M context window
- Improved speed and performance
- Good all-around capabilities
### Best Models by Mode (Plan or Act)
#### Planning
1. **DeepSeek R1**
- Best reasoning capabilities in class
- Excellent at breaking down complex tasks
- Strong math/algorithm planning
- MoE architecture helps with reasoning
2. **o3-mini (high reasoning)**
- Three reasoning levels:
- High: Complex planning
- Medium: Daily tasks
- Low: Quick ideas
- 200K context helps with large projects
3. **Gemini Flash 2.0**
- Massive context window for complex planning
- Strong reasoning capabilities
- Good with multi-step tasks
#### Acting (coding)
1. **Claude 3.5 Sonnet**
- Best code quality
- Most reliable with Cline tools
- Worth the premium for critical code
2. **DeepSeek V3**
- Nearly Sonnet-level code quality
- Better API stability than R1
- Great for daily coding
- Strong tool usage
3. **Gemini 1.5 Pro**
- 2M context window
- Good with complex codebases
- Reliable API
- Strong multi-file understanding
### A Note on Local Models
While running models locally might seem appealing for cost savings, we currently don't recommend any local models for use with Cline. [Local models are significantly less reliable](https://docs.cline.bot/running-models-locally/read-me-first) at using Cline's essential tools and typically retain only 1-26% of the original model's capabilities. The full cloud version of DeepSeek-R1, for example, is 671B parameters - local versions are drastically simplified copies that struggle with complex tasks and tool usage. Even with high-end hardware (RTX 3070+, 32GB+ RAM), you'll experience slower responses, less reliable tool execution, and reduced capabilities. For the best development experience, we recommend sticking with the cloud models listed above.
### Key Takeaways
1. **Plan vs Act Matters**: Choose models based on task type
2. **Real Performance > Benchmarks**: Focus on actual Cline performance
3. **Mix & Match**: Use different models for planning and implementation
4. **Cost vs Quality**: Premium models worth it for critical code
5. **Keep Backups**: Have alternatives ready for API issues
_\*Note: Based on real usage patterns and community feedback rather than just benchmarks. Your experience may vary. This is not an exhaustive list of all the models available for use within Cline._
description: "Learn how to effectively manage your task history, use favorites, and organize your work in Cline."
---
# Task Management
As you use Cline, you'll accumulate many tasks over time. The task management system helps you organize, filter, search, and clean up your task history to keep your workspace efficient.
## Accessing Task History
You can access your task history by:
1. Clicking on the "History" button in the Cline sidebar
2. Using the command palette to search for "Cline: Show Task History"
## Task History Features
The task history view provides several powerful features:
### Searching and Filtering
- **Search Bar**: Use the fuzzy search at the top to quickly find tasks by content
- **Sort Options**: Sort tasks by:
- Newest (default)
- Oldest
- Most Expensive (highest API cost)
- Most Tokens (highest token usage)
- Most Relevant (when searching)
- **Favorites Filter**: Toggle to show only favorited tasks
### Task Actions
Each task in the history view has several actions available:
- **Open**: Click on a task to reopen it in the Cline chat
- **Favorite**: Click the star icon to mark a task as a favorite
- **Delete**: Remove individual tasks (favorites are protected from deletion)
- **Export**: Export a task's conversation to markdown
## ⭐ Task Favorites
The favorites feature allows you to mark important tasks that you want to preserve and find quickly.
### How Favorites Work
- **Marking Favorites**: Click the star icon next to any task to toggle its favorite status
- **Protection**: Favorited tasks are protected from individual and bulk deletion operations (can be overridden)
- **Filtering**: Use the favorites filter to quickly access your important tasks
## Batch Operations
The task history view supports several batch operations:
- **Select Multiple**: Use the checkboxes to select multiple tasks
- **Select All/None**: Quickly select or deselect all tasks
- **Delete Selected**: Remove all selected tasks
- **Delete All**: Remove all tasks from history (favorites are preserved unless you choose to include them)
## Best Practices
1. **Favorite Important Tasks**: Mark reference tasks or frequently accessed conversations as favorites
2. **Regular Cleanup**: Periodically remove old or unused tasks to improve performance
3. **Use Search**: Leverage the fuzzy search to quickly find specific conversations
4. **Export Valuable Tasks**: Export important tasks to markdown for external reference
Task management helps you maintain an organized workflow when using Cline, allowing you to quickly find past conversations, preserve important work, and keep your history clean and efficient.
💡 **Key Point**: Cline isn't passive - it actively seeks to understand your project. You can either let it explore or guide its focus, especially in [Plan](https://docs.cline.bot/features/plan-and-act) mode.
### Context & Context Windows
Think of context like a whiteboard you and Cline share:
- **Context** is all the information available:
- What Cline has discovered
- What you've shared
- Your conversation history
- Project requirements
- Previous decisions
- **Context Window** is the size of the whiteboard itself:
- Measured in tokens (1 token ≈ 3/4 of an English word)
- Each model has a fixed size:
- Claude 3.5 Sonnet: 200,000 tokens
- DeepSeek: 64,000 tokens
- When the whiteboard is full, you need to erase (clear context) to write more
- [How Cline manages context under the hood](https://cline.bot/blog/understanding-the-new-context-window-progress-bar-in-cline)
⚠️ **Important**: Having a large context window (like Claude's 200k tokens) doesn't mean you should fill it completely. Just like a cluttered whiteboard, too much information can make it harder to focus on what's important.
## Understanding the Context Window Progress Bar
Cline provides a visual way to monitor your context window usage through a progress bar:
<Frame caption="Visual representation of the context window usage">
- ↑ shows input tokens (what you've sent to the LLM)
- ↓ shows output tokens (what the LLM has generated)
- The progress bar visualizes how much of your context window you've used
- The total shows your model's maximum capacity (e.g., 200k for Claude 3.5-Sonnet)
### When to Watch the Bar
- During long coding sessions
- When working with multiple files
- Before starting complex tasks
- When Cline seems to lose context
💡 **Tip**: Consider starting a fresh session when usage reaches 70-80% to maintain optimal performance.
## Working with Context Files
Context files help maintain understanding across sessions. They serve as documentation specifically designed to help AI assistants understand your project.
description: "An introduction to Cline, your AI-powered development assistant in VS Code."
---
Cline is an AI development assistant which integrates with Microsoft Visual Studio Code. It provides an interface between your IDE and LLMs facilitating code development, increasing productivity and lowering the barrier to entry for new coders. Depending on permissions, Cline can read/write files, execute commands, use your web browser, and expand its capabilities with Model Context Protocol servers.
What makes Cline distinctive is its thoughtful approach to code generation and its extensive integration capabilities. Rather than simply generating code snippets, Cline collaborates with developers by planning solutions step-by-step, maintaining awareness of the entire development environment, and requiring explicit approval for all changes. It can understand large codebases, accelerate onboarding for new engineers, and connect with hundreds of tools through its Model Context Protocol Marketplace, enabling everything from streamlined project deployments to automated incident response—all through natural language commands.
This guide provides a step-by-step walkthrough of how to use Cline to build an existing MCP server from a GitHub repository.
## **Finding an MCP Server**
There are multiple places online to find MCP servers:
- **Cline can automatically add MCP servers to its list, which you can then edit.** Cline can clone repositories directly from GitHub and build the servers for you.
- **GitHub:** Two of the most common places to find MCP servers on GitHub include:
These directories allow users to sort the servers by various criteria such as downloads, date, stars, and use case. Each entry provides information such as features, tools, and configuration instructions.
- **PulseMCP:** This website has a blog post discussing how AI could use MCP servers to make websites obsolete. PulseMCP also includes an FAQ section about MCP servers: [https://www.pulsemcp.com/](https://www.pulsemcp.com/)
## **Building with Cline**
1. **Initiate the Process:** Provide Cline with the following information:
- **GitHub Repository URL:** The URL of the server's repository.
- **README.md Contents:** This is optional but helpful for Cline to understand the server's purpose and configuration. You can copy the README.md file from the GitHub repository.
2. **Example Interaction with Cline:**
```
User: "Cline, I want to add the MCP server for Brave browser control. Here's the GitHub link: @https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search Can you add it?"
Cline: "OK. Cloning the repository to the MCP directory. It needs to be built because it has a 'package.json' file. Should I run 'npm run build'?"
User: "Yes, build it."
Cline: "Build complete. This server needs a browser path. Where's your Brave browser executable?"
User: "It's in '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser'."
Cline: "OK. I've updated the server config with that path and added it to 'cline_mcp_settings.json'. Anything else?"
User: "No, that's all. Let's test it."
Cline: "Great! Starting the MCP Inspector to test the server connection. After that, we can try controlling the browser from Cline."
```
3. **Cline's Actions:** Based on your instructions, Cline will perform the following:
- **Repository Cloning:** Cline will clone the repository to your local machine, usually in the directory specified in your configuration.
- **Tweaking:** You can guide Cline to modify the server's configuration. For instance:
- **User:** "This server requires an API key. Can you find where it should be added?"
- Cline may automatically update the `cline_mcp_settings.json` file or other relevant files based on your instructions.
- **Building the Server:** Cline will run the appropriate build command for the server, which is commonly `npm run build`.
- **Adding Server to Settings:** Cline will add the server's configuration to the `cline_mcp_settings.json` file.
## **Testing and Troubleshooting**
1. **Test the Server:** Once Cline finishes the build process, test the server to make sure it works as expected. Cline can assist you if you encounter any problems.
2. **MCP Inspector:** You can use the MCP Inspector to test the server's connection and functionality.
## **Best Practices**
- **Understand the Basics:** While Cline simplifies the process, it's beneficial to have a basic understanding of the server's code, the MCP protocol ([learn more](/mcp/mcp-overview)), and how to configure the server. This allows for more effective troubleshooting and customization.
- **Clear Instructions:** Provide clear and specific instructions to Cline throughout the process.
- **Testing:** Thoroughly test the server after installation and configuration to ensure it functions correctly.
- **Version Control:** Use a version control system (like Git) to track changes to the server's code.
- **Stay Updated:** Keep your MCP servers updated to benefit from the latest features and security patches.
1. Click the Trash icon next to the MCP server you would like to delete, or the red Delete Server button at the bottom of the MCP server config box.
**NOTE:** There is no delete confirmation dialog box
### Restarting a Server
1. Click the Restart button next to the MCP server you would like to restart, or the gray Restart Server button at the bottom of the MCP server config box.
### Enabling or Disabling a Server
1. Click the toggle switch next to the MCP server to enable/disable servers individually.
### Network Timeout
To set the maximum time to wait for a response after a tool call to the MCP server:
1. Click the `Network Timeout` dropdown at the bottom of the individual MCP server's config box and change the time. Default is 1 minute but it can be set between 30 seconds and 1 hour.
## Editing MCP Settings Files
Settings for all installed MCP servers are located in the `cline_mcp_settings.json` file:
1. Click the MCP Servers icon at the top navigation bar of the Cline pane.
2. Select the "Installed" tab.
3. Click the "Configure MCP Servers" button at the bottom of the pane.
The file uses a JSON format with a `mcpServers` object containing named server configurations:
```json
{
"mcpServers": {
"server1": {
"command": "python",
"args": ["/path/to/server.py"],
"env": {
"API_KEY": "your_api_key"
},
"alwaysAllow": ["tool1", "tool2"],
"disabled": false
}
}
}
```
_Example of MCP Server config in Cline (STDIO Transport)_
---
## Understanding Transport Types
MCP supports two transport types for server communication:
### STDIO Transport
Used for local servers running on your machine:
- Communicates via standard input/output streams
- Lower latency (no network overhead)
- Better security (no network exposure)
- Simpler setup (no HTTP server needed)
- Runs as a child process on your machine
For more in-depth information about how STDIO transport works, see [MCP Transport Mechanisms](/mcp/mcp-transport-mechanisms).
STDIO configuration example:
```json
{
"mcpServers": {
"local-server": {
"command": "node",
"args": ["/path/to/server.js"],
"env": {
"API_KEY": "your_api_key"
},
"alwaysAllow": ["tool1", "tool2"],
"disabled": false
}
}
}
```
### SSE Transport
Used for remote servers accessed over HTTP/HTTPS:
- Communicates via Server-Sent Events protocol
- Can be hosted on a different machine
- Supports multiple client connections
- Requires network access
- Allows centralized deployment and management
For more in-depth information about how SSE transport works, see [MCP Transport Mechanisms](/mcp/mcp-transport-mechanisms).
SSE configuration example:
```json
{
"mcpServers": {
"remote-server": {
"url": "https://your-server-url.com/mcp",
"headers": {
"Authorization": "Bearer your-token"
},
"alwaysAllow": ["tool3"],
"disabled": false
}
}
}
```
---
## Using MCP Tools in Your Workflow
After configuring an MCP server, Cline will automatically detect available tools and resources. To use them:
1. Type your request in Cline's conversation window
2. Cline will identify when an MCP tool can help with your task
3. Approve the tool use when prompted (or use auto-approval)
Example: "Analyze the performance of my API" might use an MCP tool that tests API endpoints.
## Troubleshooting MCP Servers
Common issues and solutions:
- **Server Not Responding:** Check if the server process is running and verify network connectivity
- **Permission Errors:** Ensure proper API keys and credentials are configured in your `mcp_settings.json` file
- **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings
- **Slow Performance:** Try adjusting the network timeout value for the specific MCP server
description: "The Model Context Protocol (MCP) allows Cline to communicate with external servers that provide additional tools and resources to extend its capabilities. This guide explains how to add and connect to remote MCP servers through the MCP Servers interface."
---
## Adding and Managing Remote MCP Servers
### Accessing the MCP Servers Interface
To access the MCP Servers interface in Cline:
1. Click on the Cline icon in the VSCode sidebar
2. Open the menu (⋮) in the top right corner of the Cline panel
3. Select "MCP Servers" from the dropdown menu
### Understanding the MCP Servers Interface
The MCP Servers interface is divided into three main tabs:
- **Marketplace**: Discover and install pre-configured MCP servers (if enabled)
- **Remote Servers**: Connect to existing MCP servers via URL endpoints
- **Installed**: Manage your connected MCP servers
### Adding a Remote MCP Server
The "Remote Servers" tab allows you to connect to any MCP server that's accessible via a URL endpoint:
1. Click on the "Remote Servers" tab in the MCP Servers interface
2. Fill in the required information:
- **Server Name**: Provide a unique, descriptive name for the server
- **Server URL**: Enter the complete URL endpoint of the MCP server (e.g., `https://example.com/mcp-sse`)
3. Click "Add Server" to initiate the connection
4. Cline will attempt to connect to the server and display the connection status
> **Note**: When connecting to a remote server, ensure you trust the source, as MCP servers can execute code in your environment.
### Remote Server Discovery
If you're looking for MCP servers to connect to, several third-party marketplaces provide directories of available servers with various capabilities.
> **Warning**: The following third-party marketplaces are listed for informational purposes only. Cline does not endorse, verify, or take responsibility for any servers listed on these marketplaces. These servers are cloud-hosted services that process your requests and may have access to data you share with them. Always review privacy policies and terms of use before connecting to third-party services.
#### Composio MCP Integration
[Composio's MCP Marketplace](https://mcp.composio.dev/) provides access to a wide range of third-party servers that support the Model Context Protocol (MCP). These servers expose APIs for services like GitHub, Notion, Slack, and others. Each server includes configuration instructions and built-in authentication support (e.g. OAuth or API keys). To connect, locate the desired service in the marketplace and follow the integration steps provided there.
#### Connecting via Smithery
Smithery is a third-party MCP server marketplace that allows users to discover and connect to a variety of Model Context Protocol (MCP) servers. If you're using an MCP-compatible client (such as Cursor, Claude Desktop, or Cline), you can browse available servers and integrate them directly into your workflow.
To explore available options, visit the Smithery marketplace: [https://smithery.ai](https://smithery.ai)
Please note: Smithery is maintained independently and is not affiliated with our project. Use at your own discretion.
### Managing Installed MCP Servers
Once added, your MCP servers appear in the "Installed" tab where you can:
#### View Server Status
Each server displays its current status:
- **Green dot**: Connected and ready to use
- **Yellow dot**: In the process of connecting
- **Red dot**: Disconnected or experiencing errors
#### Configure Server Settings
Click on a server to expand its settings panel:
1. **Tools & Resources**:
- View all available tools and resources from the server
- Configure auto-approval settings for tools (if enabled)
2. **Request Timeout**:
- Set how long Cline should wait for server responses
- Options range from 30 seconds to 1 hour
3. **Server Management**:
- **Restart Server**: Reconnect if the server becomes unresponsive
- **Delete Server**: Remove the server from your configuration
#### Enable/Disable Servers
Toggle the switch next to each server to enable or disable it:
- **Enabled**: Cline can use the server's tools and resources
- **Disabled**: The server remains in your configuration but is not active
### Troubleshooting Connection Issues
If a server fails to connect:
1. An error message will be displayed with details about the failure
2. Check that the server URL is correct and the server is running
3. Use the "Restart Server" button to attempt reconnection
4. If problems persist, you can delete the server and try adding it again
### Advanced Configuration
For advanced users, Cline stores MCP server configurations in a JSON file that can be modified:
1. In the "Installed" tab, click "Configure MCP Servers" to access the settings file
2. The configuration for each server follows this format:
```json
{
"mcpServers": {
"exampleServer": {
"url": "https://example.com/mcp-sse",
"disabled": false,
"autoApprove": ["tool1", "tool2"],
"timeout": 30
}
}
}
```
Key configuration options:
- **url**: The endpoint URL (for remote servers)
- **disabled**: Whether the server is currently enabled (true/false)
- **autoApprove**: List of tool names that don't require confirmation
- **timeout**: Maximum time in seconds to wait for server responses
For additional MCP settings, click the "Advanced MCP Settings" link to access VSCode settings.
### Using MCP Server Tools
Once connected, Cline can use the tools and resources provided by the MCP server. When Cline suggests using an MCP tool:
1. A tool approval prompt will appear (unless auto-approved)
2. Review the tool details and parameters before approving
3. The tool will execute and return results to Cline
description: "Learn how to use the MCP Marketplace to discover, install, and configure MCP servers that enhance Cline's capabilities with additional tools and resources."
---
## What's an MCP Server?
MCP servers are specialized extensions that enhance Cline's capabilities. They enable Cline to perform additional tasks like fetching web pages, processing images, accessing APIs, and much more.
## MCP Marketplace Walkthrough
The MCP Marketplace provides a one-click installation experience for hundreds of MCP servers across various categories.
### 1. Access the Marketplace
- In Cline, click the "Extensions" button (square icon) in the top toolbar
- The MCP marketplace will open, showing available servers by category
### 2. Browse and Select a Server
- Browse servers by category (Search, File-systems, Browser-automation, Research-data, etc.)
- Click on a server to see details about its capabilities and requirements
### 3. Install and Configure
- Click the install button for your chosen server
- If the server requires an API key (most do), Cline will guide you through:
- Where to get the API key
- How to enter it securely
- The server will be added to your MCP settings automatically
### 4. Verify Installation
- Cline will show confirmation when installation is complete
- Check the server status in Cline's MCP settings UI
### 5. Using Your New Server
- After successful installation, Cline will automatically integrate the server's capabilities
- You'll see new tools and resources available in Cline's system prompt
- Simply ask Cline to use the capabilities of your new server
- Example: "Search the web for recent React updates using Perplexity"
**Corporate Users:** If you're using Cline in a corporate environment, ensure you have permission to install third-party MCP servers according to your organization's security policies.
## What Happens Behind the Scenes
When you install an MCP server, several things happen automatically:
### 1. Installation Process
- The server code is cloned/installed to `/Users/<username>/Documents/Cline/MCP/`
- Dependencies are installed
- The server is built (TypeScript/JavaScript compilation or Python package installation)
### 2. Configuration
- The MCP settings file is updated with your server configuration
- This file is located at: `/Users/<username>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
- Environment variables (like API keys) are securely stored
- The server path is registered
### 3. Server Launch
- Cline detects the configuration change
- Cline launches your server as a separate process
- Communication is established via stdio or HTTP
### 4. Integration with Cline
- Your server's capabilities are added to Cline's system prompt
- Tools become available via `use_mcp_tool` commands
- Resources become available via `access_mcp_resource` commands
- Cline can now use these capabilities when prompted by the user
## Troubleshooting
### System Requirements
Make sure your system meets these requirements:
- **Node.js 18.x or newer**
- Check by running: `node --version`
- Install from: https://nodejs.org/
- Required for JavaScript/TypeScript implementations
- **Python 3.10 or newer**
- Check by running: `python --version`
- Install from: https://python.org/
- Note: Some specialized implementations may require Python 3.11+
- **UV Package Manager**
- Modern Python package manager for dependency isolation
- Install using:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Or: `pip install uv`
- Verify with: `uv --version`
If any of these commands fail or show older versions, please install/update before continuing!
### Common Installation Issues
- Ensure your internet connection is stable
- Check that you have the necessary permissions to install new software
- Verify that the API key was entered correctly (if required)
- Check the server status in the MCP settings UI for any error messages
### How to Remove an MCP Server
To completely remove a faulty MCP server:
1. Open the MCP settings file: `/Users/<username>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
2. Delete the entire entry for your server from the `mcpServers` object
3. Save the file
4. Restart Cline
### I'm Still Getting an Error
If you're getting an error when using an MCP server, you can try the following:
- Check the MCP settings file for errors
- Use a Claude Sonnet model for installation
- Verify that paths to your server's files are correct
- Ensure all required environment variables are set
- Check if another process is using the same port (for HTTP-based servers)
- Try removing and reinstalling the server (remove from both the `cline_mcp_settings.json` file and the `/Users/<username>/Documents/Cline/MCP/` directory)
- Use a terminal and run the command with its arguments directly. This will allow you to see the same errors that Cline is seeing
## MCP Server Rules
Cline is already aware of your active MCP servers and what they are for, but when you have a lot of MCP servers enabled, it can be useful to define when to use each server.
Utilize a `.clinerules` file or custom instructions to support intelligent MCP server activation through keyword-based triggers, making Cline's tool selection more intuitive and context-aware.
### How MCP Rules Work
MCP Rules group your connected MCP servers into functional categories and define trigger keywords that activate them automatically when detected in your conversations with Cline.
"fallbackBehavior": "Ask user which tool would be most appropriate"
}
}
```
Add this to your `.clinerules` file or to your custom instructions to make Cline's MCP server selection more intuitive and context-aware.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.