Commit graph

861 commits

Author SHA1 Message Date
Andrew Monostate
d7e9ead730 feat: add X AI provider integration 2025-02-28 12:01:00 -08:00
Daniel Trugman
d6184e9dac
OpenAI & DeepSeek cost calculation (#1864)
* 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
2025-02-28 11:25:17 -08:00
Jon Atkinson
602d25075b
fix: Respect the user's XDG Document folder settings on Linux. (#1884)
This is related to issue #899.

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-02-27 18:23:29 -08:00
Eric Li
ea2f4080f8
opt: Enhance OpenAiHandler to diagnose request issues and handle empty streams (#1702) 2025-02-27 17:21:00 -08:00
Dennis Bartlett
10cde3671e
Feature/privacy policy (#1994)
* Update Privacy to point to website. Add ToS to point to website.

* Lint Fix
2025-02-27 17:19:26 -08:00
Andrei Edell
43e939666d
Hugelung/gpt 4.5 (#1999)
* Add gpt-4.5-preview

* changeset

---------

Co-authored-by: Andrei Edell <andrei@nugbase.com>
2025-02-27 16:29:19 -08:00
Dennis Bartlett
ff0eb8fa77 Fix rebase conflict resolution discrepency 2025-02-27 16:18:49 -08:00
pashpashpash
39980e9be7 Revert "Better Streaming Support (#1980)" (#1993)
This reverts commit 93856ab3b06fef1b5b2f47b8ee6c2af5ab89dbe7.
2025-02-27 15:50:02 -08:00
brownrw8
9b5cefd69d Better Streaming Support (#1980)
* feat: enterprise support

* Update src/api/providers/enterprise.ts

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

* refactor + anthropic

* fix

* update chunking

* fix enterprise providers

* minor refactor for chunking

* comments

* defaults

* tests

* remove imports

* suggested fixes

* decouple message type

* upgrade libs, prompt caching no longer in beta for claude models

* updates for tests

* enterprise -> streaming provider

* update tests

* remove section from anthropic.ts

* handle specific GCP Vertex invalid_grant error

* finish comment

* add caching stats to chunking

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-02-27 15:46:01 -08:00
canvrno
30a4a0e1f1 Check git out - Checkpoints 2.0
**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.
2025-02-27 15:40:52 -08:00
Trevor Hudson
e5d616b0bf add optional telemetry (#1939)
* add optional telemetry

* move capture

* add changeset

* implement suggestions
2025-02-27 15:40:47 -08:00
brownrw8
5d8172a25f feat: Set preferred language in settings and have it update system prompt (#1538)
* feat: set preferred language in settings and have it update system prompt

* Update webview-ui/src/components/settings/PreferredLanguagePicker.tsx

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

* remove unnecessary useEffect

* tweak prompt

* formatting from main

* Update Cline.ts

* Revert "Update Cline.ts"

This reverts commit bee6f0fee0b0783293aa035e566978589fe837d6.

* Fixes

* Update Cline.ts

* move preferredLanguage to Advanced Settings

* remove unneccessary import

* remove more imports

* skip language prompt for default language `en`

* Update package.json

* lint

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-27 14:45:46 -08:00
Frostbourne
916660a390 [ENG-126] Migrate to Vite (#1876)
* 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>
2025-02-27 14:45:46 -08:00
Andrei Edell
202e3a6d05 Hugelung/rich mcp response (#1941)
* 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>
2025-02-27 14:45:42 -08:00
Doug Daniels
a229b8ce9d
feat(vertex): Add prompt caching support for Claude on Vertex AI (#1885)
* 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
2025-02-26 22:28:02 -08:00
Minhao-Zhang
7bc02926b4
Fix Official DeepSeek-V3 cost (#1944)
* update the api price for deepseek (discount period is over)

* update the api price for deepseek (discount period is over)
2025-02-26 19:05:19 -08:00
watany
5e65ea04c9
fix: Anthropic's default model is 3.7 (#1971)
* fix: Anthropic's default model is 3.7

* changeset
2025-02-26 18:42:39 -08:00
Saoud Rizwan
e14fd78767 Use GUI telemetry toggle to more clearly show user if they're opted in or not 2025-02-25 17:34:36 -08:00
Saoud Rizwan
8c5f8b253b Fix resetting telemetryEnabled if global setting is toggled off 2025-02-25 15:43:40 -08:00
Saoud Rizwan
db463dc1ef Add open from history event 2025-02-25 15:27:34 -08:00
Saoud Rizwan
568932492b Add optional opt-in telemetry to help fix bugs and improve product 2025-02-25 15:23:38 -08:00
Saoud Rizwan
35a64a3666 Modify MCP marketplace installation instructions 2025-02-24 22:57:02 -08:00
Saoud Rizwan
3d19123e0b Merge branch 'main' of github.com:cline/cline 2025-02-24 18:23:49 -08:00
Saoud Rizwan
408c0887ac Update default model ID 2025-02-24 18:17:35 -08:00
Dennis Bartlett
b4e67afcba
Reapply "Add IS_DEV and Hot Reloading to debug. (#1895)" (#1917) (#1942)
* 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
2025-02-24 18:16:15 -08:00
Saoud Rizwan
1c9da770a8 Revert "Temporarily revert default openrouter model until API is fixed"
This reverts commit 45b13dd775.
2025-02-24 18:15:33 -08:00
Saoud Rizwan
5f57c1f2f3 Add new openrouter model IDs 2025-02-24 18:14:58 -08:00
Saoud Rizwan
f14542d61f Revert "Everyone Gets a Timeout (#1889)"
This reverts commit 87670a37b8.
2025-02-24 18:13:59 -08:00
Saoud Rizwan
131b245023 Revert "Anthropic: Bump it up! (#1938)"
This reverts commit c2809491b4.
2025-02-24 18:09:51 -08:00
Evan
c2809491b4
Anthropic: Bump it up! (#1938)
* Updated Anthropic SDK and fixed types

* adjust export markdown handling

* adjust export markdown handling

* added changeset
2025-02-24 17:02:21 -08:00
Evan
87670a37b8
Everyone Gets a Timeout (#1889)
* timeouts for individual servers

* changeset

* remove logger

* use const and descriptive function for time settings
2025-02-24 13:53:29 -08:00
canvrno
0f1240063c
MCP Marketplace server installation prompt adjustment (#1901)
* MCP server isntallation prompt adjustment

* changeset
2025-02-24 12:37:17 -08:00
Saoud Rizwan
45b13dd775 Temporarily revert default openrouter model until API is fixed 2025-02-24 11:14:32 -08:00
Saoud Rizwan
1127e2a33c Add Claude 3.7 Sonnet 2025-02-24 11:07:23 -08:00
Saoud Rizwan
25ea46aa8d
Revert "Add IS_DEV and Hot Reloading to debug. (#1895)" (#1917)
This reverts commit b0446f7bac.
2025-02-23 16:10:37 -08:00
Dennis Bartlett
b0446f7bac
Add IS_DEV and Hot Reloading to debug. (#1895)
* Add IS_DEV and Hot Reloading to debug.

* Changeset Added

* Clean logs
2025-02-21 00:21:00 -08:00
Quentin Machu
82f1f79b3e fix: make AWS Bedrock authentication predictable
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: 61b55599d5/packages/bedrock-sdk/src/auth.ts (L19)
2025-02-20 22:41:29 +08:00
Shawn Smith
45e1f58bbc
Feat: MCP Marketplace Setting (#1877)
* feat-mc-marketplace-setting

* add changeset

* Fixes

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-19 23:40:22 -08:00
Saoud Rizwan
ab8376fee4 Add 'Restore Task' option back to checkpoints 2025-02-19 18:57:16 -08:00
Saoud Rizwan
26be9469c4 Add delete button to MCP server 2025-02-19 18:02:20 -08:00
Saoud Rizwan
d72127550d Prepare for release 2025-02-19 09:20:44 -08:00
Saoud Rizwan
d6f51b4525 Fix tests 2025-02-18 22:17:01 -08:00
Saoud Rizwan
c846bc4455 Adjust mermaid diagram colors 2025-02-18 22:14:36 -08:00
Saoud Rizwan
efaa0d057e Add instruction about handling MCP servers with unexpected build path 2025-02-18 21:40:38 -08:00
Saoud Rizwan
ceeb33fdc5 Fix race condition where MCP servers were sent to webview before it was initialized 2025-02-18 21:38:43 -08:00
Saoud Rizwan
f938c40539 Fix MCP prompt to handle dist/index.js convention 2025-02-18 20:54:10 -08:00
Saoud Rizwan
f80552f92d Adjust MCP install prompt to demonstrate 2025-02-18 19:12:35 -08:00
Saoud Rizwan
f9025426b8 Toggle to act mode and enable MCP prompt if user one-click installs MCP server 2025-02-18 18:24:08 -08:00
Saoud Rizwan
ccdbe3a4a9 Prepare for release 2025-02-18 17:10:59 -08:00
Saoud Rizwan
a01471f469 Show MCP server display name instead of ID 2025-02-18 15:37:42 -08:00