* 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
* Refactor Task class to use global state for API provider ID in telemetry events because this.apiProvider is readonly and shows the old value on model switch
* Updating README
* Updating README
* Updating README
* Updating README
* Updating README
* Updating README
Adding model information to Requesty provider.
- Add a new model picker component for Requesty.
- Enable controlling thinking budget via a slider
IMPORTANT:
Model information is fetched ONLY(!) when the user chooses "requesty"
as their provider to avoid any boot latency.
* added message catching to test server
* added message catching to test server
* fixing logger initialization
* fixed race condition
* adding logging
* removed redundant if condition
* Fixes issue where deleting tasks wasn't clearing the task metadata or context history files; let model recording fail gracefully
* Create clean-boats-film.md
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* Enhance chat component interactivity by adding row index and hover state management. Updated BrowserSessionRow, ChatRow, and CheckmarkControl to support row-specific hover effects and state tracking, improving user experience during interactions.
* Adding hovered row index
* Adding hovered row index
* Adding hovered row index
* add metadata for model and apiProvider so it's available to Cline
* fix test
* check for existing array in case of old task
* only write if the metadata changes
* feat: add tiered pricing for gemini-2.5-pro
* fix: ensure price tiers are sorted before lookup
* refactor: remove old prices
* refactor(settings): improve model tier pricing display clarity
- Clarify token limit display using full numbers instead of 'k'.
- Specify price unit as '/million tokens' for better understanding.
* add cmd + quote keybinding to add to cline chat
* changeset
* auto focus and start cursor on new line for easy UX
* changeset
* Remove extra new line character
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* base context manager
* responses
* changeset
* Disable unit tests until runner is updated (#2733)
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* Add dispatch trigger and restrictions to changeset converter.
* Update .github/workflows/changeset-converter.yml
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update action to specific version
* Fix format, Update package-lock version
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* make ServerRow not optionally not expandable
* changeset
* factor out servers toggle list
* changeset
* add servers modal
* changest
* Reduce padding in modal
* separate fetch useEffect for more efficient rendering
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* manual port
* successfully open remote chrome
* clean up auto-detect vs specified path
* move the browser settings into regular settings
* changeset & prettier
* correct chrome path description, remove some old comments, and rename headless mode to local mode
* rename incorrect headless mode to 'local mode'
* Sub-PR of hugelung/remote_browser: clicking browser widget's gear opens basic settings & scrolls down with a highlight (#2439)
* first version of scrolling to browser settings
* really nice generic scroll to settings & highlight
* formatting & changeset
---------
Co-authored-by: Andrei Edell <andrei@nugbase.com>
* added feature to detect and display chrome path as placeholder in browser settings (#2442)
Co-authored-by: Andrei Edell <garoth@gmail.com>
* Features to relaunch browser in debug, test connection (#2440)
* Features to Relaunch browser in debug, test connection
* Update src/services/browser/BrowserSession.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update webview-ui/src/components/browser/BrowserSettingsMenu.tsx
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: Andrei Edell <garoth@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix a merge conflict resolution error
* fix linter issue
* clarify settings descriptions
* Remove sketchy network scanning code
* respect viewport size in remote host
* headless browser fix (#2451)
* Disable notifications in browser
* start of info panel popover (#2453)
* start of info panel popover
* remove duplicated message & prettier fix
* Revert "remove duplicated message & prettier fix"
This reverts commit dcefef35aa.
* info styling, close browser tab, hide headless info
---------
Co-authored-by: Andrei Edell <andrei@nugbase.com>
* remove headless checkbox
* settings layout rework & more auto
* new chrome flags experiments
* make headless choice automatic & phrasing & visual cleanups
* auto-recheck chrome connection every second
- while we are looking at settings
- while we have remote debugging enabled
* continuous remote connection testing & ux cleanup
* remove advanced settings from package.json
* format fixes
* dont display connection type after dc to smooth over ui of reloading tasks
* seems we need package-lock now for ci
* Revert "remove advanced settings from package.json"
This reverts commit 5defe4a8ca.
* relaunch correctly with default session
* prevent about:blank opening on relaunch
* Resolve merge conflicts with refactor
* add browser tool telemetry
* try launching chrome using node spawn_child to detach it
* browser settings update
* do async dispose for browsersession
* remove duplicated message implementation
* Remove remote browser settings from configuration, and enhance browser settings UI with an advanced settings button.
* Remove updateBrowserSettings
* Fix text with chrome path
* fix arafat's pr note about multiple timers
* fix saoud's note about require use
* Remote browser logging (#2682)
* logging
* reduce logging levels
---------
Co-authored-by: Andrei Edell <andrei@nugbase.com>
* Make browser status popup adapt to viewport width
* remove requires for exec/spawn
* remove unneeded comments
* error telemetry
* remove headless mode / settings everywhere
* migrate values list to simple endpoint string
* fix log spam and clean up a comment
* Fixes; copy
* Remove local state since we're already using extension state
* Remove unnecessary remoteBrowserHost and remoteBrowserEnabled states
* Fix status wrapping
---------
Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: canvrno <kevin@cline.bot>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: frostbournesb <frostbournesb@protonmail.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* Feature: Drag and Drop
* leading slash
Insert multiple files sequencially
Folder drop
Older mention mechanism restore
Multiple files droped
Webview not neccesary
comments removed
More comments
things
restored code
removed comment
* handleTextDrop
* StopPrograpation not need it
* Multiple folders drag and drop
* changesets
* Comments removed
* More comments removed
* Consolidate drag-and-drop message types
* Context menu fileSearchResult error
* package lock version
* inputValue and comments on removeMention restored
* reorganize directory structure
* rename back files to make diff more readable
* rename back because it didn't help
* rename index files to their component names
* fix addLocalServerForm imports
* Fix: Better Windows path support
* Move to 'chai' for test running
* Fix: Let's start with what we know
* Chore: Add 'root' level file path test, remove less useful tests
* Chore: Add 'root' level file path test, remove less useful tests
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* feat: add extended thinking slider to LiteLLM provider
Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
* feat: add changeset
Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
* fix: format
Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
---------
Signed-off-by: Jorge García Rey <jorgegar@inditex.com>
* add coverage to github workflows
* add changeset
* continue to run on errors
* address comments from ellipsis-dev
* add unit tests, confirm passing
* remove pyproject.toml approach to deps instalL
* use github_output env var
* add verbose mode for debugging
* verbose was not being captured
* std out, not print
* remove 1000 line dump...
* print every line separately to prevent clipping
* build extension before testing
* clean up debugging prints
* break coverage.py into smaller files
* break coverage.py into smaller files
* Relative module names not supported
* rename coverage to coverage_check to avoid naming collision
* rename coverage to coverage_check to avoid naming collision
* debugging missing coverage files
* output error on coverage report
* handling ellipsis-dev comments
* see if we need vscode test deps
* experimenting to try to get it running
* use absolute paths
* put everything in root directory
* address more comments from ellipsis-dev
* import run_command in extraction.py
* fix verbose flag
* use parent parser
* ensure safe command test will allow our commands
* make sure we install before coverage
* update tests to ensure run
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* Add disk.ts and move out ensureTaskDirectoryExists
* refactor: move disk operations out of Task
* Move prompts out of Task
* Remove legacy tool_use conversion
* task feedback telemetry
* only showing first time
* Update webview-ui/src/components/chat/ChatRow.tsx
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* package lock
* lint
* no need to pass messageTs
* using type from webviewmessage
* Fix merge conflicts
* Fix whitespace issue
* Update TaskFeedbackButtons to use VSCodeButton for feedback options
- Replaced custom FeedbackButton component with VSCodeButton for improved consistency with VSCode UI.
- Removed unnecessary animation state and feedback text, simplifying the component structure.
- Added IconWrapper for better styling of feedback icons.
- Adjusted layout and spacing in ButtonsContainer for a cleaner appearance.
* Move feedback icons placement
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* feat: add `string.test.ts`
refactor: type improvement of variable `match` in file `src/api/transform/o1-format.ts`
* feat: add more test with function `removeInvalidChars`
* refactor: Replace ClineProvider with Controller for improved architecture
- Replaced instances of ClineProvider with Controller in extension.ts and related files to enhance code organization and maintainability.
- Introduced a new Controller class to manage interactions previously handled by ClineProvider, streamlining the extension's functionality.
- Updated command registrations and message handling to utilize the new Controller structure, ensuring consistent behavior across the extension.
- Removed the ClineProvider class and its associated methods, consolidating functionality within the Controller class.
- Added new state management and task handling capabilities within the Controller to support the updated architecture.
* clean up
* refactor: Update Task class to use Controller reference
- Replaced all instances of ClineProvider with Controller in the Task class to align with the recent architectural changes.
- Updated references for context management, task history, and message handling to utilize the new Controller structure.
- Ensured consistent behavior across the Task class by adapting to the Controller's methods and properties.
* refactor: Simplify WebviewProvider listeners structure
* Fixes
* Make controller a dependency of webview
* refactor: Improve message listener in WebviewProvider
- Updated the setWebviewMessageListener method to use an arrow function for the message handler, preserving the 'this' context of the controller.
- Added detailed comments explaining the importance of maintaining the correct 'this' context when passing methods as callbacks in JavaScript/TypeScript.
* Add doc
* Add to chat for visible webview
* Fixes
* fix: Update Google Gemini API key link
Google updated where you can sign up for API keys. This is the new link that will take people closer to where they can generate an API key.
* Add changeset
* feat(extension): add access to history, mcp, and new task buttons in popped-out view
- Added new commands to the editor/title section in package.json to ensure buttons are available in the popped-out view.
- Updated command registrations in src/extension.ts to use ClineProvider.getVisibleInstance() for better instance management.
* chore: run changeset
* Move restart/delete server and all toggle all
* changeset
* move buttons back to the bottom and show icons even when expanded
* Only display auto-approve all if auto-approve mcp is enabled
* Move auto-approve setting to bottom
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Add Coverage Reporting
* automate tests via github workflow
* ensure documents are cleaned up at the end of the workflow
* add changeset
* backout github workflow changes
* update changeset to reflect split
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* take into account max_tokens for OpenAI Compatible provider
* change set
* considering default -1 value
* checking maxTokens is set and greater than 0
---------
Co-authored-by: Felipe Albuquerque <felipe.albuquerque@dell.com>
* feat: add gemini 2.5 pro to Google AI Studio avaliable Models
* Create cuddly-countries-tap.md
---------
Co-authored-by: Daniel Steigman <35793213+NightTrek@users.noreply.github.com>
* Accounts Modal mocked
* fix dividers
* Fix flex styling
* Fix account card in other views
* Move AccountInfoCard to tailwind and fix flex styling
* Get credits data from endpoint
* refactor creditshistorytable
* prettier
* changeset
* Properly connect and format data from endpoint
* Overflow scroll box
* linter
* Update webview-ui/src/utils/format.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Make svg asset a component
* fix svg type
* Use clineprovider weakref
* Move shared types to shared folder
* Make account view buttons full width
* Make history table take full height
* Update webview-ui/src/components/account/AccountView.tsx
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>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Calculate and display total tasks and checkpoints size
* changeset
* Remove logs and add try/catch to file deletion
* call postMessage from HistoryView instead
* Add question options
* Fixes
* Fix taskheader for anthropic only showing cache info after first request
* Add plan mode options
* Fixes
* Start task header not expanded
* feat: Enable VPC endpoint configuration for Amazon Bedrock in AWS Profile mode
This update allows specifying a VPC endpoint when connecting to Amazon Bedrock using AWS Profile mode. It ensures that all API requests stay within a private network and do not traverse the public internet.
* Hide VPC textfield behind toggle
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Set up branch
* Feat/add sambanova provider (#2142)
* feat(api): Add SambaNova provider type definitions
- Add 'sambanova' to ApiProvider type
- Add sambanovaApiKey to ApiHandlerOptions interface
- Add SambaNova model definitions
* feat(api): Implement SambaNova provider handler
- Create SambanovaHandler class
- Implement createMessage and getModel methods
- Register the provider in the API factory
* feat(ui): Add SambaNova provider UI components
- Add SambaNova to provider dropdown
- Add UI components for API key and model selection
* feat(storage): Update secret storage for SambaNova API key
- Update SecretKey type to include sambanovaApiKey
- Update getState method to include the SambaNova API key
- Update API configuration handler to store the SambaNova API key
* feat(sambanova): format fix
* feat(sambanova): adding previously untracked files
* fix: will ensure that when no model ID is explicitly selected for the Sambanova provider, it will use the default model ID that's already defined in the codebase (Meta-Llama-3.3-70B-Instruct)
* fix: changing how the dropdown is created by following existing pattern
* fix: changing how the dropdown is created by following existing pattern
* fix: added SamanovaHandler to buildApiHandler
---------
Co-authored-by: saad.khan.hd <saad.khan@hd.digital>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* support deepseek and qwen models
* remove unused imports
* Add missing API provider implementation
---------
Co-authored-by: saad-noodleseed <saad@noodleseed.com>
Co-authored-by: saad.khan.hd <saad.khan@hd.digital>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Revert "Merge pull request #1964 from cline/ocasta181/ENG-209"
This reverts commit ca17a06618, reversing
changes made to 6b9c2a1a45.
* Set hard 300kb limit on file size cline reads into context
* Add changeset
* add temperature to openai compatible model configuration
* prevent type errors
* improved options layout
* changeset
* move temperature to openaimodelinfo
* type error
* use nullish coalescing operator
* Allow user to pass decimal values
* Rename openAiTemperature to temperature
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* add qwen qwq-plus model
* rename variable
* set up branch
* segment alibaba models between mainland and international
* allow temperature passing to qwq
* changeset
---------
Co-authored-by: yaojunWang <gooqle.com.hk@gmail.com>
* remove claude tool use backwards compatability
* remove anthropic tool use from mistal-format
* further simplify mistral-format
* fix linting error in unrelated file
* welcome page now shows login button
* adding cline apikey to context
* added cline provider + making sure welcome page closes
* adjusting welcome page language
* swapped cline provider to use openai flavor requests
* handling credit limit errors (super hacky ugh)
* welcome view hiding api options by default
* added back account page and relying more heavily on the firebase custom token to ensure persistent login
* persisting login state through window reloads
* renaming Account -> Cline Account
* use openrouter format with cline api
* Update welcome experience
* Fix error handling
* added generation details tracking to cline provider
* small edit to account view
* logging cline instead of openrouter
* logging cline instead of openrouter
* response.data instead of response.data.data
* set isdev to false for prerelease
* changeset added
* Update tricky-zebras-talk.md
* Update tricky-zebras-talk.md
* welcome page language
* more logging and updated authentication system to be more robust and reliable
* only removing custom token on explicit log out action
* even more aggressive custom token fetching + storing in apiConfig
* moving firebase auth logic to webview because nodejs firebase token refresh is not supported
* cleaned up all old logic for extension server side auth persistence
* reconciling merge conflicts with main
* reconciling merge conflicts
* package-lock.json
* package lock
* package-lock
* packagejson + lock
* use standard API Request Failed title for all API errors while maintaining detailed credit limit information in error content
* deleting packagejson line for vertexai
* reverting package-lock changes
* package-lock.json straight from main
* removing redundant csp allowance
* Fix package-lock
* Add missing options to cline stream
* Remove duplicate csp
* Remove email subscribe
* Update welcome page and cline account view
* Fixes
* Fix errors
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* rebased to main
* Added files from patch
* restored ClineProvider call to Migration deletes, added try try catch
* Restored changes to Cline.ts
* Updated tests
* Updated tests, prettier
* Optimize commit operation
* Fixed branch deletion, cleanup
* Cleanup
* minor cleanuop
* changeset
* Fix checkpoint tracker initial commit not tracking any files
* Ensure we are getting hash from branch and not main
* Revert first commit logic
* Change to get the correct hash for 'See new changes' on new and resumed tasks
* Make checkpoints commits async
* Update .changeset/cold-beers-laugh.md
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* updated service with specific events
* added telemetry to understand task creation and tool usage and task completion
* updated the telemetry system to track system messages and user messages
* added better message counting telemetry
* removed a create task which was suppose to be a restart
* updated so we can detect task completion properly
* switched to production key
* added changeset
* Modify telemetry signatures
* Fixes
* remove redundant task created
* Update src/services/telemetry/TelemetryService.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Clean up apiconfiguration
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Fixed problem with “win+shift+a” shortcut not working in Windows
* fix package-lock.json
* Revert "fix package-lock.json"
This reverts commit 1ffdfef4f3.
* Add retries to bedrock createMessage
Add retries to Bedrock's createMessage as indicated by [this](https://github.com/cline/cline/pull/1605#issuecomment-2665904349)
Similar to [this comment](https://github.com/cline/cline/pull/1605#issuecomment-2666290702) I am also experiencing a 429 every once in a while. Measuring a before/after, it's about a 90% improvement when there's no prompt caching. I'm going to add some logging and see if I can track it down further but honestly this is probably worth it as is.
* Add changeset
* Add Bedrock prompt caching support (optional)
This feature protected under checkbox because it is not yet rolled out
to everyone, and if you will try to send cache headers, and its not
enabled for you, you will get error
* Add changeset
* Update supported models
* Fix copy
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Extract reuseable ModelDescriptionMarkdown from OpenRouter model picker
* Requesty: Add model picker component
* Refactor readOpenRouterModels to allow any dynamic list filename
* Extract parsePrice to allow reuse by other providers
* Simplify model display name switch case
* Requesty: Add dynamic model list fetching from API
* Requesty: Add default model selection
* Requesty: Specify max_tokens when sending request
* Add changeset
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* Add OpenAI compatible cost calculation
* Requesty: Prepare for correct price calculation
* Native OpenAI: Update model caching info
According to [OpenAI's
website](https://platform.openai.com/docs/guides/prompt-caching),
gpt-4o, gpt-4o-mini, o1-preview and o1-mini support caching.
For gpt-4o, even though gpt-4o-2024-05-13 and
chatgpt-4o-latest do no support caching, users will see there are no
cached tokens, which will help avoid confusion.
* Native OpenAI: Call getModel once
* Native OpenAI: Extract yield usage into method
* Native OpenAI: Add caching and cost info to task header
* DeepSeek: Add cost info to task header
* Add changeset
**Branch-Per-Task:** Each repo now has a single Shadow Git repo, with separate branches per task (instead of one Shadow Git repo per task).
- **Legacy Support:** Existing Checkpoints remain functional, while all new Checkpoints use branch-per-task.
- **Commits:** Legacy tasks commit to legacy Checkpoints; new tasks commit using branch-per-task.
- **Diffing & Deletions:** Both legacy and branch-per-task Checkpoints support diffing and deletion.
No migration needed—existing tasks stay as-is, and new tasks adopt **branch-per-task** automatically.
* Initial webview vite migration
* Make vite work
* Fix test running
* Enable HMR, disable vite chunking
* Silence type checking errors
* Vite doesn't use browserslist
* get rid of breaking css flag
* add doc to getHMRHtmlContent
* Make it work
* Changeset
* Add IS_DEV to env definitions
* Update tasks to include HMR
* Update CSP image rules
* prettier
* reintroduce IS_DEV in env
* add new deps to pkg lock
---------
Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
* showing images after mcp responses
* images now open in a webview tab
* Open Graph link metadata display for MCP responses
* almost totally working rich mcp response display with images and embeds
* closer
* header for response display
* updated styling of mcp responses
* default to plain text if rich response is loading
* formatting fix
* added changeset output
* remove some old code
* add the dashed border back
* avoid XSS attacks by sanitizing the preview image urls and embeds
* remove incorrect vendor prefix css
* delete old version of open image implementation
* undo some comment removals and cleanups to make PR easier to read
---------
Co-authored-by: Andrei Edell <andrei@nugbase.com>
* feat(vertex): Add prompt caching support for Claude on Vertex AI
* Remove countTokens update claude 3.7
* claude-3-7-sonnet@20250219 support in Vertex AI as default model
* v0.1 of the cline rules file for the extension
* added changeset
* improved the cline rules file
* added new version of the webview state definition
* added more in depth pass from gemini
* Reapply "Add IS_DEV and Hot Reloading to debug. (#1895)" (#1917)
This reverts commit 25ea46aa8d.
* Update TODO to be more explicit. Update logic for checking IS_DEV
* Update TODO with even more explanation. (Now with 2x more explanation per explanation
Anthropic's Bedrock SDK creates an AWS credential provider chain [1]
for each request it needs to sign. By doing so right before actually
having to sign the request, it can utilize any session created after
VSCode launched (i.e. outside of the process), and it can renew the
sessions every time necessary transparently for the user.
Cline, on the other hand, by transforming the provided AWS_PROFILE into
a key / secret / session, as part of client initialization, completely
short-circuits this, making it very difficult for users in companies where
sessions are short-lived. Furthermore, Cline would silently ignore the
provided AWS_PROFILE if there isn't a current/non-expired session at the time
of initialization, pass null keys to the Bedrock SDK, which would then
make use the default profile, which may not be configured or authorized
to use AWS Bedrock (as most AWS SSO hub accounts would). From the
perspective of the user, this would manifest itself as an "supported
country" error or unhelpful errors that are basically impossible to
debug without attaching a debugger to Cline.. and such developers may
end up reaching out to their DevOps/IT teams for help, which also could
turn into a waste of time.
This PR addresses the aforementioned issues by resolving the credentials on
every invocation.
1: https://github.com/anthropics/anthropic-sdk-typescript/blob/61b55599d50d9c93840e4736cb756cb3a62b0696/packages/bedrock-sdk/src/auth.ts#L19
* add alibaba qwen-max qwen-plus qwen-turbo qwen-coder-plus stable/latest models
* add alibaba qwen-max qwen-plus qwen-turbo qwen-coder-plus stable/latest models
* Provide the api line choice for international user
* Remove redundant code
* Copy fixes
* Create dry-socks-talk.md
* fix problem what is when you use Qwen api provider and then you want to change the api provider ,the apiline dropdown will obscure your api provider drop-down options
* feat: add qwen2.5-coder models
Description
Add new models as list:
qwen2.5-coder-32b-instruct
qwen2.5-coder-14b-instruct
qwen2.5-coder-7b-instruct
qwen2.5-coder-3b-instruct
Doc: https://help.aliyun.com/zh/model-studio/getting-started/models#9f8890ce29g5u
* add changeset
* feat: add all alibaba qwen2.5 coder models
---------
Co-authored-by: yaojunWang <gooqle.com.hk@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: 刘耸 <song.liu@yo-star.com>
* feat: add support for qwen vl models
* feat: add support for qwen vl models
* feat: updated the price of the Qianwen model following the BaiLian platform documentation
---------
Co-authored-by: 执无 <jiyong.wjy@alibaba-inc.com>
* add alibaba qwen-max qwen-plus qwen-turbo qwen-coder-plus stable/latest models
* add alibaba qwen-max qwen-plus qwen-turbo qwen-coder-plus stable/latest models
* Provide the api line choice for international user
* Remove redundant code
* Copy fixes
* Create dry-socks-talk.md
* fix problem what is when you use Qwen api provider and then you want to change the api provider ,the apiline dropdown will obscure your api provider drop-down options
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Show status code / message when API request error occurs.
* Moved logic to a helper method.
* Different error message format.
* Removed old comment.
---------
Co-authored-by: Michael Overhorst <m.overhorst@spotonmedics.nl>
- Add all available Mistral models with specific version numbers
- Include Premier models (Mistral Large, Pixtral, Ministral, etc.)
- Include Free models (Mistral Small, Pixtral 12B, etc.)
- Set correct token limits and pricing for each model
Fixes#1609
* Provide explicit command chaining instructions
* Added shell detection for powershell
The default-shell library being used only returns cmd for windows users. This change will utilize VS Code API calls to determine the user's shell/terminal settings. MacOS & Linux will, for now, continue to use the existing method. Still working on tests.
* Replaced default-shell, added tests
Replaced default-shell with local code that replicates the old behavior on macOS & Linux
Windows shell detection uses VS Code settings to get the user's default terminal profile
Adjusted prompt change
* One small change
* Removed & attributed old package + typo
* Added VSC load for other OSes, refactor, better tests
* Fixed system.ts explicit git lines
* Added back changes for terminal-command-chaining
* One minor, but important change
* wip
* LLMFileAccessController and tests
* added class and tests
* cleaning up
* formatting
* removing some defaults
* package json and remove defaults list
Added CheckpointExclusions.ts to separate file filtering for checkpoints. This excludes default a default list of extensions, build artifacts, binary files, large files (>10MB), and various development-specific files from being tracked in checkpoints. Includes a caching system to improve filtering performance and handles OS-specific binary detection. TODO - Make exclusions user-configurable.
* feat: Add DeepSeek-R1 (deepseek-reasoner) support
- Add new deepseek-reasoner model with proper pricing info
- Fix temperature parameter being sent to unsupported deepseek-reasoner model
- Improve model selection logic in DeepSeekHandler
- Update CHANGELOG with new features and fixes
- Bump version to 3.1.11
* style: apply prettier formatting to deepseek provider and api definitions
* add mcp-quickstart.md and supporting image assets 📝
* Update mcp-quickstart.md
* Fix issues in the quick start
* Minor tweaks to quick start.
* More refinements to the quick start
* more tweaks to the quickstart
* add authors to quickstart
* Update mcp-quickstart.md for asdf fixes
Adds instructions that might help `asdf` users on macos to get past some errors running `npx`.
* Fix formatting and missing link
* Update mcp-quickstart.md - minor tweak 💄
* Fixes
---------
Co-authored-by: Todd Schavey <tschavey@archer.com>
Co-authored-by: mikeabney <git@mikeabney.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Update memory bank documentation
* Add Memory Bank demo GIF
* Update GIF path in markdown
* Update memory bank docs with formatted headers and image
* Remove GIF from memory bank documentation
* Chore: Pretier for consistant formatting
- TODO: This PR needs to be updated by Saoud after he runs `npm install` & `npm format:fix` and commits the results of the prettier changes.
* Revert prettier config
* Run npm install
* Fix prettier config and ignore package lock
* Run format
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
per feature request https://github.com/saoudrizwan/claude-dev/issues/278
this makes the file more readable/parseable.
also added minor fix in README for debugging.
Test Plan:
1. Launch Debug Instance of VSCode
2. Went to Extension, clicked on a recent Task, clicked "Export"
3. Opened saved export file, saw properly formatted timestamp above each User/Assistant action.
Co-authored-by: Philip Fung
# Cline Extension Architecture & Development Guide
## Project Overview
Cline is a VSCode extension that provides AI assistance through a combination of a core extension backend and a React-based webview frontend. The extension is built with TypeScript and follows a modular architecture pattern.
- **Core Extension**: Anything inside the src folder, organized into modular components
- **Core Extension State**: Managed by the Controller class in src/core/controller/index.ts, which serves as the single source of truth for the extension's state. It manages multiple types of persistent storage (global state, workspace state, and secrets), handles state distribution to both the core extension and webview components, and coordinates state across multiple extension instances. This includes managing API configurations, task history, settings, and MCP configurations.
- **Webview**: Anything inside the webview-ui. All the react or view's seen by the user and user interaction components
- **Webview State**: Managed by ExtensionStateContext in webview-ui/src/context/ExtensionStateContext.tsx, which provides React components with access to the extension's state through a context provider pattern. It maintains local state for UI components, handles real-time updates through message events, manages partial message updates, and provides methods for state modifications. The context includes extension version, messages, task history, theme, API configurations, MCP servers, marketplace catalog, and workspace file paths. It synchronizes with the core extension through VSCode's message passing system and provides type-safe access to state through a custom hook (useExtensionState).
### Core Extension Architecture
The core extension follows a clear hierarchical structure:
1.**WebviewProvider** (src/core/webview/index.ts): Manages the webview lifecycle and communication
2.**Controller** (src/core/controller/index.ts): Handles webview messages and task management
3.**Task** (src/core/task/index.ts): Executes API requests and tool operations
This architecture provides clear separation of concerns:
- WebviewProvider focuses on VSCode webview integration
- Controller manages state and coordinates tasks
- Task handles the execution of AI requests and tool operations
### WebviewProvider Implementation
The WebviewProvider class in `src/core/webview/index.ts` is responsible for:
- Managing multiple active instances through a static set (`activeInstances`)
- Implementing HTML content generation with proper CSP headers
- Supporting Hot Module Replacement (HMR) for development
- Setting up message listeners between the webview and extension
The WebviewProvider maintains a reference to the Controller and delegates message handling to it. It also handles the creation of both sidebar and tab panel webviews, allowing Cline to be used in different contexts within VSCode.
### Core Extension State
The `Controller` class manages multiple types of persistent storage:
- **Global State:** Stored across all VSCode instances. Used for settings and data that should persist globally.
- **Workspace State:** Specific to the current workspace. Used for task-specific data and settings.
- **Secrets:** Secure storage for sensitive information like API keys.
The `Controller` handles the distribution of state to both the core extension and webview components. It also coordinates state across multiple extension instances, ensuring consistency.
State synchronization between instances is handled through:
- File-based storage for task history and conversation data
- VSCode's global state API for settings and configuration
- Secrets storage for sensitive information
- Event listeners for file changes and configuration updates
The Controller implements methods for:
- Saving and loading task state
- Managing API configurations
- Handling user authentication
- Coordinating MCP server connections
- Managing task history and checkpoints
### Webview State
The `ExtensionStateContext` in `webview-ui/src/context/ExtensionStateContext.tsx` provides React components with access to the extension's state. It uses a context provider pattern and maintains local state for UI components. The context includes:
- Extension version
- Messages
- Task history
- Theme
- API configurations
- MCP servers
- Marketplace catalog
- Workspace file paths
It synchronizes with the core extension through VSCode's message passing system and provides type-safe access to the state via a custom hook (`useExtensionState`).
The ExtensionStateContext handles:
- Real-time updates through message events
- Partial message updates for streaming content
- State modifications through setter methods
- Type-safe access to state through a custom hook
## API Provider System
Cline supports multiple AI providers through a modular API provider system. Each provider is implemented as a separate module in the `src/api/providers/` directory and follows a common interface.
### API Provider Architecture
The API system consists of:
1.**API Handlers**: Provider-specific implementations in `src/api/providers/`
2.**API Transformers**: Stream transformation utilities in `src/api/transform/`
3.**API Configuration**: User settings for API keys and endpoints
4.**API Factory**: Builder function to create the appropriate handler
Key providers include:
- **Anthropic**: Direct integration with Claude models
- **OpenRouter**: Meta-provider supporting multiple model providers
- **AWS Bedrock**: Integration with Amazon's AI services
- **Gemini**: Google's AI models
- **Ollama**: Local model hosting
- **LM Studio**: Local model hosting
- **VSCode LM**: VSCode's built-in language models
### API Configuration Management
API configurations are stored securely:
- API keys are stored in VSCode's secrets storage
- Model selections and non-sensitive settings are stored in global state
- The Controller manages switching between providers and updating configurations
The system supports:
- Secure storage of API keys
- Model selection and configuration
- Automatic retry and error handling
- Token usage tracking and cost calculation
- Context window management
### Plan/Act Mode API Configuration
Cline supports separate model configurations for Plan and Act modes:
- Different models can be used for planning vs. execution
- The system preserves model selections when switching modes
- The Controller handles the transition between modes and updates the API configuration accordingly
## Task Execution System
The Task class is responsible for executing AI requests and tool operations. Each task runs in its own instance of the Task class, ensuring isolation and proper state management.
### Task Execution Loop
The core task execution loop follows this pattern:
- Automatically truncates conversation when needed
- Preserves important context while freeing space
- Handles different model context sizes
2.**Streaming Architecture**
- Real-time chunk processing
- Partial content handling
- Race condition prevention
- Error recovery during streaming
3.**Error Handling**
- Automatic retry for transient failures
- User-prompted retry for persistent issues
- Detailed error reporting
- State cleanup on failure
4.**Token Tracking**
- Per-request token counting
- Cumulative usage tracking
- Cost calculation
- Cache hit monitoring
### Context Management System
The Context Management System handles conversation history truncation to prevent context window overflow errors. Implemented in the `ContextManager` class, it ensures long-running conversations remain within model context limits while preserving critical context.
Key features:
1.**Model-Aware Sizing**: Dynamically adjusts based on different model context windows (64K for DeepSeek, 128K for most models, 200K for Claude).
2.**Proactive Truncation**: Monitors token usage and preemptively truncates conversations when approaching limits, maintaining buffers of 27K-40K tokens depending on the model.
3.**Intelligent Preservation**: Always preserves the original task message and maintains the user-assistant conversation structure when truncating.
4.**Adaptive Strategies**: Uses different truncation strategies based on context pressure - removing half of the conversation for moderate pressure or three-quarters for severe pressure.
5.**Error Recovery**: Includes specialized detection for context window errors from different providers with automatic retry and more aggressive truncation when needed.
### Task State & Resumption
The Task class provides robust task state management and resumption capabilities:
consttask=`Set up the MCP server from ${mcpDetails.githubUrl}...`
// Initialize task and show chat view
awaitthis.initClineWithTask(task)
}
}
```
## Conclusion
This guide provides a comprehensive overview of the Cline extension architecture, with special focus on state management, data persistence, and code organization. Following these patterns ensures robust feature implementation with proper state handling across the extension's components.
Remember:
- Always persist important state in the extension
- The core extension follows a WebviewProvider -> Controller -> Task flow
- Use proper typing for all state and messages
- Handle errors and edge cases
- Test state persistence across webview reloads
- Follow the established patterns for consistency
- Place new code in appropriate directories
- Maintain clear separation of concerns
- Install dependencies in correct package.json
## Contributing
Contributions to the Cline extension are welcome! Please follow these guidelines:
When adding new tools or API providers, follow the existing patterns in the `src/integrations/` and `src/api/providers/` directories, respectively. Ensure that your code is well-documented and includes appropriate error handling.
The `.clineignore` file allows users to specify files and directories that Cline should not access. When implementing new features, respect the `.clineignore` rules and ensure that your code does not attempt to read or modify ignored files.
**Important:** All bug reports must be reproducible using Claude 3.5 Sonnet. Cline uses complex prompts so less capable models may not work as expected.
- type:textarea
id:what-happened
attributes:
label:What happened?
description:Also tell us, what did you expect to happen?
placeholder:Tell us what you see!
validations:
required:true
- type:textarea
id:steps
attributes:
label:Steps to reproduce
description:How do you trigger this bug? Please walk us through it step by step.
value:|
1.
2.
3.
validations:
required:true
- type:textarea
id:logs
attributes:
label:Relevant API REQUEST output
description:Please copy and paste any relevant output. This will be automatically formatted into code, so no need for backticks.
render:shell
- type:input
id:provider-model
attributes:
label:Provider/Model
description:What provider and model were you using when the issue occurred?
# 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/**
webview-ui/public/**
webview-ui/scripts/**
webview-ui/index.html
webview-ui/README.md
webview-ui/package.json
@@ -31,6 +30,19 @@ webview-ui/package-lock.json
webview-ui/node_modules/**
**/.gitignore
# Ignore docs
docs/**
# Fix issue where codicons don't get packaged (https://github.com/microsoft/vscode-extension-samples/issues/692)
!node_modules/@vscode/codicons/dist/codicon.css
!node_modules/@vscode/codicons/dist/codicon.ttf
!node_modules/@vscode/codicons/dist/codicon.ttf
# Include KaTeX CSS and fonts for LaTeX rendering
!webview-ui/node_modules/katex/dist/katex.min.css
!webview-ui/node_modules/katex/dist/fonts/**
# Include default themes JSON files used in getTheme
All notable changes to the "claude-dev" extension will be documented in this file.
## [3.14.1]
<!-- Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. -->
- Disables autocaptures when initializing feature flags
## [3.14.0]
- 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 when creating new rule if it's needed
- Enable pricing calculation for gemini and vertex providers
- Refactor message handling to not show the MCP View of the server modal
- Migrate the addRemoteServer to protobus (Thanks @DaveFres!)
- Update task header to be expanded by default
- Update Gemini cache TTL time to 15 minutes
- Fix race condition in terminal command usage
- Fix to correctly handle `import.meta.url`, avoiding leading slash in pathname for Windows (Thanks @DaveFres!)
- Fix for git commit mentions in repos with no git commits
- Fix cost calculation (Thanks @BarreiroT!)
## [3.13.3]
- Add download counts to MCP marketplace items
- Add `/compact` command
- Add prompt caching to gemini models in cline / openrouter providers
- Add tooltips to bottom row menu
## [3.13.2]
- Add Gemini 2.5 Flash model to Vertex and Gemini Providers (Thanks monotykamary!)
- Add Caching to gemini provider (Thanks arafatkatze!)
- Add thinking budget support to Gemini Models (Thanks monotykamary!)
- Add !include .file directive support for .clineignore (Thanks watany-dev!)
- Improve slash command functionality
- Improve prompting for new task tool
- Fix o1 temperature being passed to the azure api (Thanks treeleaves30760!)
- Fix to make "add new rule file" button functional
- Fix Ollama provider timeout, allowing for a larger loading time (Thanks suvarchal!)
- Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification (Thanks yt3trees!)
- Fix settings to not reset by changing providers
- Fix terminal outputs missing commas
- Fix terminal errors caused by starting non-alphanumeric outputs
- Fix auto approve settings becoming unset
- Fix Mermaid syntax error in documentation (Thanks tuki0918!)
- Remove supportsComputerUse restriction and support browser use through any model that supports images (Thanks arafatkatze!)
## [3.13.1]
- Fix bug where task cancellation during thinking stream would result in error state
## [3.13.0]
- Add Cline rules popover under the chat field, allowing you to easily add, enable & disable workspace level or global rule files
- Add new slash command menu letting you type “/“ to do quick actions like creating new tasks
- Add ability to edit past messages, with options to restore your workspace back to that point
- Allow sending a message when selecting an option provided by the question or plan tool
- Add command to jump to Cline's chat input
- Add support for OpenAI o3 & 4o-mini (Thanks @PeterDaveHello and @arafatkatze!)
- Add baseURL option for Google Gemini provider (Thanks @owengo and @olivierhub!)
- Add support for Azure's DeepSeek model. (Thanks @yt3trees!)
- Add ability for models that support it to receive image responses from MCP servers (Thanks @rikaaa0928!)
- Improve search and replace diff editing by making it more flexible with models that fail to follow structured output instructions. (Thanks @chi-cat!)
- Add detection of Ctrl+C termination in terminal, improving output reading issues
- Fix issue where some commands with large output would cause UI to freeze
- Fix issue with xAI reasoning content not being parsed (Thanks @mrubens!)
## [3.12.3]
- Add copy button to MermaidBlock component (Thanks @cacosub7!)
- Add the ability to fetch from global cline rules files
- Add icon to indicate when a file outside of the users workspace is edited
## [3.12.2]
- Add gpt-4.1
## [3.12.1]
- Use visual checkpoint indicator to make it clear when checkpoints are created
- Big shoutout to @samuel871211 for numerous code quality improvements, refactoring contributions, and webview performance improvements!
- Use improved context manager
## [3.12.0]
- Add favorite toggles for models when using the Cline & OpenRouter providers
- Add auto-approve options for edits/reads outside of the workspace
- Improve diff editing animation for large files
- Add indicator showing number of diff edits when Cline edits a file
- Add streaming support and reasoning effort option to xAI's Grok 3 Mini
- Add settings button to MCP popover to easily modify installed servers
- Fix bug where browser tool actions would show unparsed results in the chat view
- Fix issue with new checkpoints popover hiding too quickly
- Fix duplicate checkpoints bug
- Improve Ollama provider with retry mechanism, timeout handling, and improved error handling (thanks suvarchal!)
## [3.11.0]
- Redesign checkpoint UI to declutter chat view by using a subtle indicator line that expands to a popover on hover, with a new date indicator for when it was created
- Add support for xAI's provider's Grok 3 models
- Add more robust error tracking for users opted in to telemetry (thank you for helping us make Cline better!)
## [3.10.1]
- Add CMD+' keyboard shortcut to add selected text to Cline
- Cline now auto focuses the text field when using 'Add to Cline' shortcut
- Add new 'Create New Task' tool to let Cline start a new task autonomously!
- Fix Mermaid diagram issues
- Fix Gemini provider cost calculation to take new tiered pricing structure into account
## [3.10.0]
- Add setting to let browser tool use local Chrome via remote debugging, enabling session-based browsing. Replaces sessionless Chromium, unlocking debugging and productivity workflows tied to your real browser state.
- Add new auto-approve option to approve _ALL_ commands (use at your own risk!)
- Add modal in the chat area to more easily enable or disable MCP servers
- Add drag and drop of file/folders into cline chat (Thanks eljapi!)
- Add prompt caching for LiteLLM + Claude (Thanks sammcj!)
- Add Improved context management
- Fix MCP auto approve toggle issues being out of sync with settings
## [3.9.2]
- Add recommended models for Cline provider
- Add ability to detect when user edits files manually so Cline knows to re-read, leading to reduced diff edit errors
- Add improvements to file mention searching for faster searching
- Add scoring logic to file mentions to sort and exclude results based on relevance
- Add Support for Bytedance Doubao (Thanks Tunixer!)
- Fix to prevent duplicate BOM (Thanks bamps53!)
## [3.9.1]
- Add Gemini 2.5 Pro Preview 03-25 to Google Provider
## [3.9.0]
- Add Enable extended thinking for LiteLLM provider (Thanks @jorgegarciarey!)
- Add a tab for configuring local MCP Servers
- Fix issue with DeepSeek API provider token counting + context management
- Fix issues with checkpoints hanging under certain conditions
## [3.8.6]
- Add UI for adding remote servers
- Add Mentions Feature Guide and update related documentation
- Fix bug where menu would open in sidebar and open tab
- Fix issue with Cline accounts not showing user info in popout tabs
- Fix bug where menu buttons wouldn't open view in sidebar
## [3.8.5]
- Add support for remote MCP Servers using SSE
- Add gemini-2.5-pro-exp-03-25 to Vertex AI (thanks @arri-cc!)
- Add access to history, mcp, and new task buttons in popout view
- Add task feedback telemetry (thumbs up/down on task completion)
- Add toggle disabled for remote servers
- Move the MCP Restart and Delete buttons and add an auto-approve all toggle
- Update Requestly UX for model selection (thanks @arafatkatze!)
- Add escape for html content for gemini when running commands
- Improve search and replace edit failure behaviors
## [3.8.4]
- Add Sambanova Deepseek-V3-0324
- Add cost calculation support for LiteLLM provider
- Fix bug where Cline would use plan_mode_response bug without response parameter
## [3.8.3]
- Add support for SambaNova QwQ-32B model
- Add OpenAI "dynamic" model chatgpt-4o-latest
- Add Amazon Nova models to AWS Bedrock
- Improve file handling for NextJS folder naming (fixes issues with parentheses in folder names)
- Add Gemini 2.5 Pro to Google AI Studio available models
- Handle "input too large" errors for Anthropic
- Fix "See more" not showing up for tasks after task un-fold
- Fix gpt-4.5-preview's supportsPromptCache value to true
## [3.8.2]
- Fix bug where switching to plan/act would result in VS Code LM/OpenRouter model being reset
## [3.8.0]
- Add 'Add to Cline' as an option when you right-click in a file or the terminal, making it easier to add context to your current task
- Add 'Fix with Cline' code action - when you see a lightbulb icon in your editor, you can now select 'Fix with Cline' to send the code and associated errors for Cline to fix. (Cursor users can also use the 'Quick Fix (CMD + .)' menu to see this option)
- Add Account view to display billing and usage history for Cline account users. You can now keep track of credits used and transaction history right in the extension!
- Add 'Sort underling provider routing' setting to Cline/OpenRouter allowing you to sort provider used by throughput, price, latency, or the default (combination of price and uptime)
- Improve rich MCP display with dynamic image loading and support for GIFs
- Add 'Documentation' menu item to easily access Cline's docs
- Add OpenRouter's new usage_details feature for more reliable cost reporting
- Display total space Cline takes on disk next to 'Delete all Tasks' button in History view
- Fix 'Context Window Exceeded' error for OpenRouter/Cline Accounts (additional support coming soon)
- Fix bug where OpenRouter model ID would be set to invalid value
- Add button to delete MCP servers in a failure state
## [3.7.1]
- Fix issue with 'See more' button in task header not showing when starting new tasks
- Fix issue with checkpoints using local git commit hooks
## [3.7.0]
- Cline now displays selectable options when asking questions or presenting a plan, saving you from having to type out responses!
- Add support for a `.clinerules/` directory to load multiple files at once (thanks @ryo-ma!)
- Prevent Cline from reading extremely large files into context that would overload context window
- Improve checkpoints loading performance and display warning for large projects not suited for checkpoints
- Add SambaNova API provider (thanks @saad-noodleseed!)
- Add DeepSeek-R1 to AWS Bedrock (thanks @watany-dev!)
## [3.6.5]
- Add 'Delete all Task History' button to History view
- Add toggle to disable model switching between Plan/Act modes in Settings (new users default to disabled)
- Add temperature option to OpenAI Compatible
- Add Kotlin support to tree-sitter parser (thanks @fumiya-kume!)
## [3.6.3]
- Improve QwQ support for Alibaba (thanks @meglinge!) and OpenRouter
- Improve diff edit prompting to prevent immediately reverting to write_to_file when a model uses search patterns that don't match anything in the file
- Fix bug where new checkpoints system would revert file changes when switching between tasks
- Fix issue with incorrect token count for some OpenAI compatible providers
## [3.6.0]
- Add Cline API as a provider option, allowing new users to sign up and get started with Cline for free
- Optimize checkpoints with branch-per-task strategy, reducing storage required and first task load times
- Fix problem with Plan/Act toggle keyboard shortcut not working in Windows (thanks @yt3trees!)
- Add new Gemini models to GCP Vertex (thanks @shohei-ihaya!) and Claude models AskSage (thanks @swhite24!)
- Improve OpenRouter/Cline error reporting
## [3.5.1]
- Add timeout option to MCP servers
- Add Gemini Flash models to Vertex provider (thanks @jpaodev!)
- Add prompt caching support for AWS Bedrock provider (thanks @buger!)
- Add AskSage provider (thanks @swhite24!)
## [3.5.0]
- Add 'Enable extended thinking' option for Claude 3.7 Sonnet, with ability to set different budgets for Plan and Act modes
- Add support for rich MCP responses with automatic image previews, website thumbnails, and WolframAlpha visualizations
- Add language preference option in Advanced Settings
- Add xAI Provider Integration with support for all Grok models (thanks @andrewmonostate!)
- Fix issue with Linux XDG pointing to incorrect path for Document folder (thanks @jonatkinson!)
## [3.4.10]
- Add support for GPT-4.5 preview model
## [3.4.9]
- Add toggle to let users opt-in to anonymous telemetry and error reporting
## [3.4.6]
- Add support for Claude 3.7 Sonnet
## [3.4.0]
- Introducing MCP Marketplace! You can now discover and install the best MCP servers right from within the extension, with new servers added regularly
- Add mermaid diagram support in Plan mode! You can now see visual representations of mermaid code blocks in chat, and click on them to see an expanded view
- Use more visual checkpoints indicators after editing files & running commands
- Create a checkpoint at the beginning of each task to easily revert to the initial state
- Add 'Terminal' context mention to reference the active terminal's contents
- Add 'Git Commits' context mention to reference current working changes or specific commits (thanks @mrubens!)
- Send current textfield contents as additional feedback when toggling from Plan to Act Mode, or when hitting 'Approve' button
- Add advanced configuration options for OpenAI Compatible (context window, max output, pricing, etc.)
- Add Alibaba Qwen 2.5 coder models, VL models, and DeepSeek-R1/V3 support
- Improve support for AWS Bedrock Profiles
- Fix Mistral provider support for non-codestral models
- Add advanced setting to disable browser tool
- Add advanced setting to set chromium executable path for browser tool
## [3.3.2]
- Fix bug where OpenRouter requests would periodically not return cost/token stats, leading to context window limit errors
- Make checkpoints more visible and keep track of restored checkpoints
## [3.3.0]
- Add .clineignore to block Cline from accessing specified file patterns
- Add keyboard shortcut + tooltips for Plan/Act toggle
- Fix bug where new files won't show up in files dropdown
- Add automatic retry for rate limited requests (thanks @ViezeVingertjes!)
- Adding reasoning_effort support for o3-mini in Advanced Settings
- Added support for AWS provider profiles using the AWS CLI to make the profile, enabling long lived connections to AWS bedrock
- Adding Requesty API provider
- Add Together API provider
- Add Alibaba Qwen API provider (thanks @aicccode!)
## [3.2.13]
- Add new gemini models gemini-2.0-flash-lite-preview-02-05 and gemini-2.0-flash-001
- Add all available Mistral API models (thanks @ViezeVingertjes!)
- Add LiteLLM API provider support (thanks @him0!)
## [3.2.12]
- Fix command chaining for Windows users
- Fix reasoning_content error for OpenAI providers
## [3.2.11]
- Add OpenAI o3-mini model
## [3.2.10]
- Improve support for DeepSeek-R1 (deepseek-reasoner) model for OpenRouter, OpenAI-compatible, and DeepSeek direct (thanks @Szpadel!)
- Show Reasoning tokens for models that support it
- Fix issues with switching models between Plan/Act modes
## [3.2.6]
- Save last used API/model when switching between Plan and Act, for users that like to use different models for each mode
- New Context Window progress bar in the task header to understand increased cost/generation degradation as the context increases
- Localize READMEs and add language selector for English, Spanish, German, Chinese, and Japanese
- Add Advanced Settings to remove MCP prompts from requests to save tokens, enable/disable checkpoints for users that don't use git (more coming soon!)
- Add Gemini 2.0 Flash Thinking experimental model
- Allow new users to subscribe to mailing list to get notified when new Accounts option is available
## [3.2.5]
- Use yellow textfield outline in Plan mode to better distinguish from Act mode
## [3.2.3]
- Add DeepSeek-R1 (deepseek-reasoner) model support with proper parameter handling (thanks @slavakurilyak!)
## [3.2.0]
- Add Plan/Act mode toggle to let you plan tasks with Cline before letting him get to work
- Easily switch between API providers and models using a new popup menu under the chat field
- Add VS Code LM API provider to run models provided by other VS Code extensions (e.g. GitHub Copilot). Shoutout to @julesmons, @RaySinner, and @MrUbens for putting this together!
- Add on/off toggle for MCP servers to disable them when not in use. Thanks @MrUbens!
- Add Auto-approve option for individual tools in MCP servers. Thanks @MrUbens!
## [3.1.10]
- New icon!
## [3.1.9]
- Add Mistral API provider with codestral-latest model
## [3.1.7]
- Add ability to change viewport size and headless mode when Cline asks to launch the browser
## [3.1.6]
- Fix bug where filepaths with Chinese characters would not show up in context mention menu (thanks @chi-chat!)
- Update Anthropic model prices (thanks @timoteostewart!)
## [3.1.5]
- Fix bug where Cline couldn't read "@/" import path aliases from tool results
## [3.1.4]
- Fix issue where checkpoints would not work for users with git commit signing enabled globally
## [3.1.2]
- Fix issue where LFS files would be not be ignored when creating checkpoints
## [3.1.0]
- Added checkpoints: Snapshots of workspace are automatically created whenever Cline uses a tool
- Compare changes: Hover over any tool use to see a diff between the snapshot and current workspace state
- Restore options: Choose to restore just the task state, just the workspace files, or both
- New 'See new changes' button appears after task completion, providing an overview of all workspace changes
- Task header now shows disk space usage with a delete button to help manage snapshot storage
## [3.0.12]
- Fix DeepSeek API cost reporting (input price is 0 since it's all either a cache read or write, different than how Anthropic reports cache usage)
## [3.0.11]
- Emphasize auto-formatting done by the editor in file edit responses for more reliable diff editing
## [3.0.10]
- Add DeepSeek provider to API Provider options
- Fix context window limit errors for DeepSeek v3
## [3.0.9]
- Fix bug where DeepSeek v3 would incorrectly escape HTML entities in diff edits
## [3.0.8]
- Mitigate DeepSeek v3 diff edit errors by adding 'auto-formatting considerations' to system prompt, encouraging model to use updated file contents as reference point for SEARCH blocks
## [3.0.7]
- Revert to using batched file watcher to fix crash when many files would be created at once
## [3.0.6]
- Fix bug where some files would be missing in the `@` context mention menu
- Add Bedrock support in additional regions
- Diff edit improvements
- Add OpenRouter's middle-out transform for models that don't use prompt caching (prevents context window limit errors, but cannot be applied to models like Claude since it would continuously break the cache)
## [3.0.4]
- Fix bug where gemini models would add code block artifacts to the end of text content
- Fix context mention menu visual issues on light themes
## [3.0.2]
- Adds block anchor matching for more reliable diff edits (if 3+ lines, first and last line are used as anchors to search for)
- Add instruction to system prompt to use complete lines in diff edits to work properly with fallback strategies
- Improves diff edit error handling
- Adds new Gemini models
## [3.0.0]
- Cline now uses a search & replace diff based approach when editing large files to prevent code deletion issues.
- Adds support for a more comprehensive auto-approve configuration, allowing you to specify which tools require approval and which don't.
- Adds ability to enable system notifications for when Cline needs approval or completes a task.
- Adds support for a root-level `.clinerules` file that can be used to specify custom instructions for the project.
## [2.2.0]
- Add support for Model Context Protocol (MCP), enabling Cline to use custom tools like web-search tool or GitHub tool
- Add MCP server management tab accessible via the server icon in the menu bar
- Add ability for Cline to dynamically create new MCP servers based on user requests (e.g., "add a tool that gets the latest npm docs")
## [2.1.6]
- Add LM Studio as an API provider option (make sure to start the LM Studio server to use it with the extension!)
## [2.1.5]
- Add support for prompt caching for new Claude model IDs on OpenRouter (e.g. `anthropic/claude-3.5-sonnet-20240620`)
## [2.1.4]
- AWS Bedrock fixes (add missing regions, support for cross-region inference, and older Sonnet model for regions where new model is not available)
## [2.1.3]
- Add support for Claude 3.5 Haiku, 66% cheaper than Sonnet with similar intelligence
## [2.1.2]
- Misc. bug fixes
- Update README with new browser feature
## [2.1.1]
- Add stricter prompt to prevent Cline from editing files during a browser session without first closing the browser
## [2.1.0]
- Cline now uses Anthropic's new "Computer Use" feature to launch a browser, click, type, and scroll. This gives him more autonomy in runtime debugging, end-to-end testing, and even general web use. Try asking "Look up the weather in Colorado" to see it in action! (Available with Claude 3.5 Sonnet v2)
## [2.0.19]
- Fix model info for Claude 3.5 Sonnet v1 on OpenRouter
## [2.0.18]
- Add support for both v1 and v2 of Claude 3.5 Sonnet for GCP Vertex and AWS Bedrock (for cases where the new model is not enabled yet or unavailable in your region)
## [2.0.17]
- Update Anthropic model IDs
## [2.0.16]
- Adjustments to system prompt
## [2.0.15]
- Fix bug where modifying Cline's edits would lead him to try to re-apply the edits
- Fix bug where weaker models would display file contents before using the write_to_file tool
- Fix o1-mini and o1-preview errors when using OpenAI native
## [2.0.14]
- Gracefully cancel requests while stream could be hanging
## [2.0.13]
- Detect code omission and show warning with troubleshooting link
## [2.0.12]
- Keep cursor out of the way during file edit streaming animation
## [2.0.11]
- Adjust prompts around read_file to prevent re-reading files unnecessarily
## [2.0.10]
- More adjustments to system prompt to prevent lazy coding
## [2.0.9]
- Update system prompt to try to prevent Cline from lazy coding (`// rest of code here...`)
## [2.0.8]
- Fix o1-mini and o1-preview for OpenAI
- Fix diff editor not opening sometimes in slow environments like project idx
## [2.0.7]
- Misc. bug fixes
## [2.0.6]
- Update URLs to https://github.com/cline/cline
## [2.0.5]
- Fixed bug where Cline's edits would stream into the active tab when switching tabs during a write_to_file
- Added explanation in task continuation prompt that an interrupted write_to_file reverts the file to its original contents, preventing unnecessary re-reads
- Fixed non-first chunk error handling in case stream fails mid-way through
## [2.0.0]
- New name! Meet Cline, an AI assistant that can use your CLI and Editor
- Responses are now streamed with a yellow text decoration animation to keep track of Cline's progress as he edits files
- New Cancel button to give Cline feedback if he goes off in the wrong direction, giving you more control over tasks
- Re-imagined tool calling prompt resulting in ~40% fewer requests to accomplish tasks + better performance with other models
- Search and use any model with OpenRouter
## [1.9.7]
- Only auto-include error diagnostics after file edits, removed warnings to keep Claude from getting distracted in projects with strict linting rules
## [1.9.6]
- Added support for new Google Gemini models `gemini-1.5-flash-002` and `gemini-1.5-pro-002`
- Updated system prompt to be more lenient when terminal output doesn't stream back properly
- Adjusted system prompt to prevent overuse of the inspect_site tool
- Increased global line height for improved readability
## [1.9.0]
- Claude can now use a browser! This update adds a new `inspect_site` tool that captures screenshots and console logs from websites (including localhost), making it easier for Claude to troubleshoot issues on his own.
- Improved automatic linter/compiler debugging by only sending Claude new errors that result from his edits, rather than reporting all workspace problems.
## [1.8.0]
- You can now use '@' in the textarea to add context!
-@url: Paste in a URL for the extension to fetch and convert to markdown, useful when you want to give Claude the latest docs!
-@problems: Add workspace errors and warnings for Claude to fix, no more back-and-forth about debugging
-@file: Adds a file's contents so you don't have to waste API requests approving read file (+ type to search files)
-@folder: Adds folder's files all at once to speed up your workflow even more
## [1.7.0]
- Adds problems monitoring to keep Claude updated on linter/compiler/build issues, letting him proactively fix errors on his own! (adding missing imports, fixing type errors, etc.)
## [1.6.5]
- Adds support for OpenAI o1, Azure OpenAI, and Google Gemini (free for up to 15 requests per minute!)
- Task header can now be collapsed to provide more space for viewing conversations
- Adds fuzzy search and sorting to Task History, making it easier to find specific tasks
## [1.6.0]
- Commands now run directly in your terminal thanks to VSCode 1.93's new shell integration updates! Plus a new 'Proceed While Running' button to let Claude continue working while commands run, sending him new output along the way (i.e. letting him react to server errors as he edits files)
## [1.5.27]
- Claude's changes now appear in your file's Timeline, allowing you to easily view a diff of each edit. This is especially helpful if you want to revert to a previous version. No need for git—everything is tracked by VSCode's local history!
- Updated system prompt to keep Claude from re-reading files unnecessarily
## [1.5.19]
- Adds support for OpenAI compatible API providers (e.g. Ollama!)
## [1.5.13]
- New terminal emulator! When Claude runs commands, you can now type directly in the terminal (+ support for Python environments)
- Adds search to Task History
## [1.5.6]
- You can now edit Claude's changes before accepting! When he edits or creates a file, you can modify his changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in the center to undo `// rest of code here` shenanigans)
## [1.5.4]
- Adds support for reading .pdf and .docx files (try "turn my business_plan.docx into a company website")
## [1.5.0]
- Adds new `search_files` tool that lets Claude perform regex searches in your project, making it easy for him to refactor code, address TODOs and FIXMEs, remove dead code, and more!
## [1.4.0]
- Adds "Always allow read-only operations" setting to let Claude read files and view directories without needing approval (off by default)
- Implement sliding window context management to keep tasks going past 200k tokens
- Adds Google Cloud Vertex AI support and updates Claude 3.5 Sonnet max output to 8192 tokens for all providers.
- Improves system prompt to guard against lazy edits (less "//rest of code here")
## [1.3.0]
- Adds task history
## [1.2.0]
- Adds support for Prompt Caching to significantly reduce costs and response times (currently only available through Anthropic API for Claude 3.5 Sonnet and Claude 3.0 Haiku)
## [1.1.1]
- Adds option to choose other Claude models (+ GPT-4o, DeepSeek, and Mistral if you use OpenRouter)
- Adds option to add custom instructions to the end of the system prompt
## [1.1.0]
- Paste images in chat to use Claude's vision capabilities and turn mockups into fully functional applications or fix bugs with screenshots
## [1.0.9]
- Add support for OpenRouter and AWS Bedrock
- Add support for OpenRouter and AWS Bedrock
## [1.0.8]
- Shows diff view of new or edited files right in the editor
- Shows diff view of new or edited files right in the editor
## [1.0.7]
- Replace `list_files` and `analyze_project` with more explicit `list_files_top_level`, `list_files_recursive`, and `view_source_code_definitions_top_level` to get source code definitions only for files relevant to the task
- Replace `list_files` and `analyze_project` with more explicit `list_files_top_level`, `list_files_recursive`, and `view_source_code_definitions_top_level` to get source code definitions only for files relevant to the task
## [1.0.6]
- Interact with CLI commands by sending messages to stdin and terminating long-running processes like servers
- Export tasks to markdown files (useful as context for future tasks)
- Interact with CLI commands by sending messages to stdin and terminating long-running processes like servers
- Export tasks to markdown files (useful as context for future tasks)
## [1.0.5]
- Claude now has context about vscode's visible editors and opened tabs
- Claude now has context about vscode's visible editors and opened tabs
## [1.0.4]
- Open in the editor (using menu bar or `Claude Dev: Open In New Tab` in command palette) to see how Claude updates your workspace more clearly
- New `analyze_project` tool to help Claude get a comprehensive overview of your project's source code definitions and file structure
- Provide feedback to tool use like terminal commands and file edits
- Updated max output tokens to 8192 so less lazy coding (`// rest of code here...`)
- Added ability to retry failed API requests (helpful for rate limits)
- Quality of life improvements like markdown rendering, memory optimizations, better theme support
- Open in the editor (using menu bar or `Claude Dev: Open In New Tab` in command palette) to see how Claude updates your workspace more clearly
- New `analyze_project` tool to help Claude get a comprehensive overview of your project's source code definitions and file structure
- Provide feedback to tool use like terminal commands and file edits
- Updated max output tokens to 8192 so less lazy coding (`// rest of code here...`)
- Added ability to retry failed API requests (helpful for rate limits)
- Quality of life improvements like markdown rendering, memory optimizations, better theme support
We're thrilled you're interested in contributing to Cline. Whether you're fixing a bug, adding a feature, or improving our docs, every contribution makes Cline smarter! To keep our community vibrant and welcoming, all members must adhere to our [Code of Conduct](CODE_OF_CONDUCT.md).
## Reporting Bugs or Issues
Bug reports help make Cline better for everyone! Before creating a new issue, please [search existing ones](https://github.com/cline/cline/issues) to avoid duplicates. When you're ready to report a bug, head over to our [issues page](https://github.com/cline/cline/issues/new/choose) where you'll find a template to help you with filling out the relevant information.
<blockquote class='warning-note'>
🔐 <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>
## 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
1.**VS Code Extensions**
- When opening the project, VS Code will prompt you to install recommended extensions
- These extensions are required for development - please accept all installation prompts
- If you dismissed the prompts, you can install them manually from the Extensions panel
2.**Local Development**
- Run `npm run install:all` to install dependencies
- Run `npm run test` to run tests locally
- 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`
-`libatk-bridge2.0-0`
-`libxkbfile1`
-`libx11-xcb1`
-`libxcomposite1`
-`libxdamage1`
-`libxfixes3`
-`libxrandr2`
-`libgbm1`
-`libdrm2`
-`libgtk-3-0`
-`dbus`
-`xvfb`
These libraries provide necessary GUI components and system services for the test environment.
For example, on Debian-based distributions (e.g., Ubuntu), you can install these libraries using apt:
- Use conventional commit format (e.g., "feat:", "fix:", "docs:")
- Reference relevant issues in commits using #issue-number
6.**Before Submitting**
- Rebase your branch on the latest main
- Ensure your branch builds successfully
- Double-check all tests are passing
- Review your changes for any debugging code or console logs
7.**Pull Request Description**
- Clearly describe what your changes do
- Include steps to test the changes
- List any breaking changes
- Add screenshots for UI changes
## Contribution Agreement
By submitting a pull request, you agree that your contributions will be licensed under the same license as the project ([Apache 2.0](LICENSE)).
Remember: Contributing to Cline isn't just about writing code - it's about being part of a community that's shaping the future of AI-assisted development. Let's build something amazing together! 🚀
Thanks to [Claude 3.5 Sonnet's agentic coding capabilities](https://www-cdn.anthropic.com/fed9cc193a14b84131812372d8d5857f8f304c52/Model_Card_Claude_3_Addendum.pdf) Claude Dev can handle complex software development tasks step-by-step. With tools that let him read & write files, analyze project source code, and execute terminal commands (after you grant permission), he can assist you in ways that go beyond simple code completion or tech support. From building software projects to running system operations, Claude Dev is only limited by your imagination.
Meet Cline, an AI assistant that can use your **CLI** a**N**d **E**ditor.
While autonomous AI scripts traditionally run in sandboxed environments, Claude Dev provides a human-in-the-loop GUI to supervise every file changed and command executed, providing a safe and accessible way to explore the potential of agentic AI.
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.
- Inspect diffs of every change Claude makes right in the editor, and keep track with syntax highlighted previews in chat
- Runs CLI commands directly in chat, so you never have to open a terminal yourself (+ respond to interactive commands by sending a message)
- Presents permission buttons (i.e. 'Approve CLI command') before tool use or sending information to the API
- Keep track of total tokens and API usage cost for the entire task loop and individual requests
-Set a maximum # of API requests allowed for a task before being prompted for permission to proceed
- When a task is completed, Claude determines if he can present the result to you with a CLI command like `open -a "Google Chrome" index.html`, which you run with a click of a button
1. Enter your task and add images to convert mockups into functional apps or fix bugs with screenshots.
2. Cline starts by analyzing your file structure & source code ASTs, running regex searches, and reading relevant files to get up to speed in existing projects. By carefully managing what information is added to context, Cline can provide valuable assistance even for large, complex projects without overwhelming the context window.
3. Once Cline has the information he needs, he can:
- Create and edit files + monitor linter/compiler errors along the way, letting him proactively fix issues like missing imports and syntax errors on his own.
- Execute commands directly in your terminal and monitor their output as he works, letting him e.g., react to dev serverissues after editing a file.
- For web development tasks, Cline can launch the site in a headless browser, click, type, scroll, and capture screenshots + console logs, allowing him to fix runtime errors and visual bugs.
4. When a task is completed, Cline will present the result to you with a terminal command like`open -a "Google Chrome" index.html`, which you run with a click of a button.
_**Pro tip**: Use the `Cmd + Shift + P` shortcut to open the command palette and type `Claude Dev: Open In New Tab` to start a new task right in your editor._
> [!TIP]
> Use the`CMD/CTRL + Shift + P`shortcut to open the command palette and type"Cline: Open In New Tab"to open the extension as a tab in your editor. This lets you use Cline side-by-side with your file explorer, and see how he changes your workspace more clearly.
## How it works
---
Claude Dev uses an agentic loop style implementation with chain-of-thought prompting and access to powerful tools that give him the ability to accomplish nearly any task. Start by providing a task and the agentic loop fires off, where it might use certain tools (with your permission) to accomplish each step in its thought process.
Claude Dev has access to the following capabilities:
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.
1.**`execute_command`**: Execute CLI commands on the system (only with your permission, output is streamed into the chat and you can respond to stdinor exit long-running processes when you're ready)
2.**`list_files_top_level`**: List all paths for files at the top level of the specified directory (useful for generic file operations like retrieving a file from your Desktop)
3.**`list_files_recursive`**: List all paths for files in the specified directory and nested subdirectories (excludes files in .gitignore)
4.**`view_source_code_definitions_top_level`**: Parses all source code files at the top level of the specified directory to extract names of key elements like classes and functions (see more below)
5.**`read_file`**: Read the contents of a file at the specified path
6.**`write_to_file`**: Write content to a file at the specified path, automatically creating any necessary directories
7.**`ask_followup_question`**: Ask the user a question to gather additional information needed to complete a task (due to the autonomous nature of the program, this isn't a typical chatbot–Claude Dev must explicitly interrupt his task loop to ask for more information)
8.**`attempt_completion`**: Present the result to the user after completing a task, potentially with a CLI command to kickoff a demonstration
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.
### Working in Existing Projects
<!-- Transparent pixel to create line break after floating image -->
Developers tend to name directories, files, classes, functions, and other components in ways that reflect their purpose and role within the larger system. These names often encapsulate high-level concepts and relationships that are crucial for understanding a project's overall architecture.
Claude Dev leverages the fact that large language models are fundamentally built on natural language processing, and by focusing on these named elements we provide the LLM with a structural understanding of the codebase that aligns closely with how developers conceptualize and organize their code. By effectively extracting the "language" of the codebase, we enable the LLM to grasp structure and intent without wasting context on implementation details.
1.**File Structure**: Claude first uses the `list_files_recursive` tool to get a complete picture of the project's file structure. It turns out Claude 3.5 Sonnet is _really_ good at inferring what it needs to process further just from these file names alone.
### Run Commands in Terminal
2.**High-Level Code Overview**: Claude may then use the `view_source_code_definitions_top_level` tool on specific directories of interest. This tool uses [tree-sitter](https://github.com/tree-sitter/tree-sitter) to parse source code with custom tag queries that extract names of classes, functions, methods, and other definitions. `view_source_code_definitions_top_level` works by first identifying source code files that tree-sitter can parse (currently supports `python`, `javascript`, `typescript`, `ruby`, `go`, `java`, `php`, `rust`, `c`, `c++`, `c#`, `swift`), then parsing each file into an abstract syntax tree, and finally applying a language-specific query to extract definition names (you can see the exact query used for each language in `src/parse-source-code/queries`). The results are formatted into a concise & readable output that Claude can easily interpret to quickly understand the code's structure and purpose.
Thanks to the new [shell integration updates in VSCode v1.93](https://code.visualstudio.com/updates/v1_93#_terminal-shell-integration-api), Cline can execute commands directly in your terminal and receive the output. This allows him to perform a wide range of tasks, from installing packages and running build scripts to deploying applications, managing databases, and executing tests, all while adapting to your dev environment & toolchain to get the job done right.
3.**Read Relevant Files**: With the insights gained from the project file structure and high-level code overview, Claude can then use the `read_file` tool to examine specific files that are most relevant to the task at hand.
For long running processes like dev servers, use the "Proceed While Running" button to let Cline continue in the task while the command runs in the background. As Cline works he’ll be notified of any new terminal output along the way, letting him react to issues that may come up, such as compile-time errors when editing files.
By carefully managing what information is added to context, Claude can provide valuable assistance even for complex, large-scale projects without overwhelming its context window (200k tokens, translating to roughly 150k words or about 500 pages of a typical book).
<!-- Transparent pixel to create line break after floating image -->
Claude always asks for your permission first before any tools are executed or information is sent back to the API. This puts you in control of this agentic loop, every step of the way.
Cline can create and edit files directly in your editor, presenting you a diff view of the changes. You can edit or revert Cline's changes directly in the diff view editor, or provide feedback in chat until you're satisfied with the result. Cline also monitors linter/compiler errors (missing imports, syntax errors, etc.) so he can fix issues that come up along the way on his own.
Feel free to contribute to this project by submitting issues and pull requests. Contributions are welcome and appreciated!
To build Claude Dev locally, follow these steps:
All changes made by Cline are recorded in your file's Timeline, providing an easy way to track and revert modifications if needed.
1. Clone the repository:
<!-- Transparent pixel to create line break after floating image -->
With Claude 3.5 Sonnet's new [Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use) capability, Cline can launch a browser, click elements, type text, and scroll, capturing screenshots and console logs at each step. This allows for interactive debugging, end-to-end testing, and even general web use! This gives him autonomy to fixing visual bugs and runtime issues without you needing to handhold and copy-pasting error logs yourself.
Try asking Cline to "test the app", and watch as he runs a command like `npm run dev`, launches your locally running dev server in a browser, and performs a series of tests to confirm that everything works. [See a demo here.](https://x.com/sdrzn/status/1850880547825823989)
<!-- Transparent pixel to create line break after floating image -->
Thanks to the [Model Context Protocol](https://github.com/modelcontextprotocol), Cline can extend his capabilities through custom tools. While you can use [community-made servers](https://github.com/modelcontextprotocol/servers), Cline can instead create and install tools tailored to your specific workflow. Just ask Cline to "add a tool" and he will handle everything, from creating a new MCP server to installing it into the extension. These custom tools then become part of Cline's toolkit, ready to use in future tasks.
- "add a tool that fetches Jira tickets": Retrieve ticket ACs and put Cline to work
- "add a tool that manages AWS EC2s": Check server metrics and scale instances up or down
- "add a tool that pulls the latest PagerDuty incidents": Fetch details and ask Cline to fix bugs
<!-- Transparent pixel to create line break after floating image -->
As Cline works through a task, the extension takes a snapshot of your workspace at each step. You can use the 'Compare' button to see a diff between the snapshot and your current workspace, and the 'Restore' button to roll back to that point.
For example, when working with a local web server, you can use 'Restore Workspace Only' to quickly test different versions of your app, then use 'Restore Task and Workspace' when you find the version you want to continue building from. This lets you safely explore different approaches without losing progress.
<!-- Transparent pixel to create line break after floating image -->
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/))_:
3. Install the necessary dependencies for the extension and webview-gui:
```bash
npm run install:all
```
4. Launch by pressing `F5` to open a new VSCode window with the extension loaded
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.)
## Reviews
</details>
<details>
<summary>Creating a Pull Request</summary>
1. Before creating a PR, generate a changeset entry:
```bash
npm run changeset
```
This will prompt you for:
- Type of change (major, minor, patch)
- `major` → breaking changes (1.0.0 → 2.0.0)
- `minor` → new features (1.0.0 → 1.1.0)
- `patch` → bug fixes (1.0.0 → 1.0.1)
- Description of your changes
2. Commit your changes and the generated `.changeset` file
3. Push your branch and create a PR on GitHub. Our CI will:
- Run tests and checks
- Changesetbot will create a comment showing the version impact
- When merged to main, changesetbot will create a Version Packages PR
- When the Version Packages PR is merged, a new release will be published
</details>
- ["Claude Sonnet 3.5 Artifacts in VSCode With This Extension"](https://www.youtube.com/watch?v=5FbZ8ALfSTs) by [CoderOne](https://www.youtube.com/@CoderOne)
- ["Meet Claude Dev — An Open-Source AI Programmer In VS Code"](https://generativeai.pub/meet-claude-dev-an-open-source-autonomous-ai-programmer-in-vs-code-f457f9821b7b) and ["Build games with zero code using Claude Dev in VS Code](https://www.youtube.com/watch?v=VT-JYVi81ew) by [Jim Clyde Monge](https://jimclydemonge.medium.com/)
- ["AI Development with Claude Dev"](https://www.linkedin.com/pulse/ai-development-claude-dev-shannon-lal-3ql3e/) by Shannon Lal
- ["Code Smarter with Claude Dev: An AI Programmer for Your Projects"](https://www.linkedin.com/pulse/code-smarter-claude-dev-ai-programmer-your-projects-iana-detochka-jiqpe) by Iana D.
- [Claude Dev also hit top 10 posts of all time on r/ClaudeAI (thank you for all the lovely comments)](https://www.reddit.com/r/ClaudeAI/comments/1e3h0f1/my_submission_to_anthropics_build_with_claude/)
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
## Questions?
Contact me on X <a href="https://x.com/sdrzn" target="_blank">@sdrzn</a>. Please create an <a href="https://github.com/saoudrizwan/claude-dev/issues">issue</a> if you come across a bug or would like a feature to be added.
## Acknowledgments
Special thanks to Anthropic for providing the API that powers this extension.
description: "Learn how to set up AWS Bedrock with Cline using credentials authentication. This guide covers AWS environment setup, regional access verification, and secure integration with the Cline VS Code extension."
---
### Overview
- **AWS Bedrock:** A fully managed service that offers access to leading generative AI models (e.g., Anthropic Claude, Amazon Titan) through AWS.\
[Learn more about AWS Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html).
- **Cline:** A VS Code extension that acts as a coding assistant by integrating with AI models—empowering developers to generate code, debug, and analyze data.
- **Enterprise Focus:** This guide is tailored for organizations with established AWS environments (using IAM roles, AWS SSO, AWS Organizations, etc.) to ensure secure and compliant usage.
---
### Step 1: Prepare Your AWS Environment
#### 1.1 Create or Use an IAM Role/User
1. **Sign in to the AWS Management Console:**\
[AWS Console](https://aws.amazon.com/console/)
2. **Access IAM:**
- Search for **IAM (Identity and Access Management)** in the AWS Console.
- Either create a new IAM user or use your enterprise's AWS SSO to assume a dedicated role for Bedrock access.
- [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html)
#### 1.2 Attach the Required Policies
1. **Attach the Managed Policy:**
- Attach the **`AmazonBedrockFullAccess`** managed policy to your user/role.\
- Ensure your policy includes permissions for model invocation (e.g., `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream`), model listing, and AWS Marketplace actions (like `aws-marketplace:Subscribe`).
- _Enterprise Tip:_ Apply least-privilege practices by scoping resource ARNs and using [Service Control Policies (SCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) to restrict access where necessary.
---
### Step 2: Verify Regional and Model Access
#### 2.1 Choose and Confirm a Region
1. **Select a Region:**\
AWS Bedrock is available in multiple regions (e.g., US East, Europe, Asia Pacific). Choose the region that meets your latency and compliance needs.\
[AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/)
2. **Verify Model Access:**
- In the AWS Bedrock console, confirm that the models your team requires (e.g., Anthropic Claude, Amazon Titan) are marked as "Access granted."
- **Note:** Some advanced models might require an [Inference Profile](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-prereq.html) if not available on-demand.
#### 2.2 Set Up AWS Marketplace Subscriptions (if needed)
1. **Subscribe to Third-Party Models:**
- Navigate to the AWS Bedrock console and locate the model subscription section.
- For models from third-party providers (e.g., Anthropic), accept the terms to subscribe.
- Model subscriptions are often managed centrally. Confirm with your cloud team if a standard subscription process is in place.
---
### Step 3: Configure the Cline VS Code Extension
#### 3.1 Install and Open Cline
1. **Install VS Code:**\
Download from the [VS Code website](https://code.visualstudio.com/).
2. **Install the Cline Extension:**
- Open VS Code.
- Go to the Extensions Marketplace (`Ctrl+Shift+X` or `Cmd+Shift+X`).
- Search for **Cline** and install it.
#### 3.2 Configure Cline Settings
1. **Open Cline Settings:**
- Click on the settings ⚙️ to select your API Provider.
2. **Select AWS Bedrock as the API Provider:**
- From the API Provider dropdown, choose **AWS Bedrock**.
3. **Enter Your AWS Credentials:**
- Input your **Access Key** and **Secret Key** (or use temporary credentials if using AWS SSO).
- Specify the correct **AWS Region** (e.g., `us-east-1` or your enterprise-approved region).
4. **Select a Model:**
- Choose an on-demand model (e.g., **anthropic.claude-3-5-sonnet-20241022-v2:0**).
5. **Save and Test:**
- Click **Done/Save** to apply your settings.
- Test the integration by sending a simple prompt (e.g., "Generate a Python function to check if a number is prime.").
---
### Step 4: Security, Monitoring, and Best Practices
1. **Secure Access:**
- Prefer AWS SSO/federated roles over long-lived IAM credentials.
- [AWS IAM Best Practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
2. **Enhance Network Security:**
- Consider setting up [AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-overview.html) to securely connect to Bedrock.
3. **Monitor and Log Activity:**
- Enable AWS CloudTrail to log Bedrock API calls.
- Use CloudWatch to monitor metrics like invocation count, latency, and token usage.
- Set up alerts for abnormal activity.
4. **Handle Errors and Manage Costs:**
- Implement exponential backoff for throttling errors.
- Use AWS Cost Explorer and set billing alerts to track usage.\
- Periodically review IAM roles and CloudTrail logs.
- Follow internal data privacy and governance policies.
---
### Conclusion
By following these steps, your enterprise team can securely integrate AWS Bedrock with the Cline VS Code extension to accelerate development:
1. **Prepare Your AWS Environment:** Create or use a secure IAM role/user, attach the `AmazonBedrockFullAccess` policy, and ensure necessary permissions.
2. **Verify Region and Model Access:** Confirm that your selected region supports your required models and subscribe via AWS Marketplace if needed.
3. **Configure Cline in VS Code:** Install and set up Cline with your AWS credentials and choose an appropriate model.
4. **Implement Security and Monitoring:** Use best practices for IAM, network security, monitoring, and cost management.
For further details, consult the [AWS Bedrock Documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html) and coordinate with your internal cloud team. Happy coding!
---
_This guide will be updated as AWS Bedrock and Cline evolve. Always refer to the latest documentation and internal policies for up-to-date practices._
description: "Learn how to configure AWS Bedrock to use AWS Profiles for authentication with Cline, focusing on SSO/Federated roles for secure access."
---
### Overview
Cline offers the option of utilizing AWS credentials or AWS profiles to access AWS Bedrock services. SSO/Federated roles are suggested over Legacy IAM configuration; this guide describes how to configure your environment so that Cline uses SSO roles for authentication.
---
### Configuration Steps
1. Install the [latest version](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) of AWS CLI
- Follow the AWS docs to install your OS-specific version of AWS CLI
2. [Configure IAM authentication](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html) with the AWS CLI
- If you do not already have AWS access through the IAM Identity Center, follow the [IAM User Guide](https://docs.aws.amazon.com/singlesignon/latest/userguide/getting-started.html) to set up IAM users and roles. Ensure you have a `PowerUserAccess` role.
- If you have access to AWS through your employer, open your AWS access portal and find the appropriate account. Ensure you have `PowerUserAccess` permissions.
- Open the `Access keys` link and note the `SSO start URL` and `SSO region`, which are needed in the next step
3. Continue configuring your profile using [the `aws configure sso` CLI wizard](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html#cli-configure-sso-configure)
- Once configured, use the following command to authenticate the AWS CLI: `aws sso login --profile <AWS-profile-name>`
- Note which profile name you attach to your AWS account, this is needed to configure Cline in the following steps
4. If you haven't already done so, install VSCode and the Cline extension. Consult the [Getting Started](/getting-started) page for guidance.
5. Open the Cline extension, then click on the settings button ⚙️ to select your API Provider.
- From the API Provider dropdown, select AWS Bedrock
- Select the AWS Profile radio button, then enter the AWS Profile Name from step 3
- Select your AWS Region from the dropdown menu
- Selecting the cross-region inference checkbox is required for some models
alt="AWS Bedrock configuration in Cline settings showing profile authentication setup"
/>
</Frame>
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.