mirror of
https://github.com/cline/cline.git
synced 2026-09-01 23:19:18 +08:00
Compare commits
596 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e028a49bc | |||
| 3d100d835a | |||
| 97a36d5306 | |||
| e67bb6c636 | |||
| b9d3814355 | |||
| fa7794e9a6 | |||
| 88029834be | |||
| 12fbc48629 | |||
| 1f267d058a | |||
| 853b8a6470 | |||
| d2f1e0cde0 | |||
| efe2388e4a | |||
| a5258e46e1 | |||
| 36dfc7de11 | |||
| 247552fcb5 | |||
| 656e3276c6 | |||
| 0e29f05e28 | |||
| 985cb51c39 | |||
| abccde0e2a | |||
| ca984609ca | |||
| 6690d392cd | |||
| 40244f09fe | |||
| 9563a71c8a | |||
| c13e749eed | |||
| 8c3fd8ba55 | |||
| 8bfa7daa28 | |||
| 7cd4be7a68 | |||
| ab9f1a0785 | |||
| 68b84f3df4 | |||
| 16da0f1e06 | |||
| e898bd8825 | |||
| b7b0e96cc7 | |||
| f00c5f4ecc | |||
| 2709ccefcd | |||
| c8f0324536 | |||
| 937cebc7de | |||
| d4d5a49e67 | |||
| 01d3afe0c5 | |||
| 7bdab5613b | |||
| d79722bec0 | |||
| 06af720d85 | |||
| b80ef25a33 | |||
| 1996543eb0 | |||
| d9dfd57da5 | |||
| 890148407a | |||
| 8d6a948478 | |||
| 98e7fac400 | |||
| 090bddbcea | |||
| 5b41cf7af4 | |||
| a2f86bde9b | |||
| 176f591ba3 | |||
| 6f5ff1b407 | |||
| ae076e2506 | |||
| 046d674b85 | |||
| e41e80aaf5 | |||
| 14ed98ae87 | |||
| f8667f8a9d | |||
| 077561fb71 | |||
| 97fd1daec6 | |||
| 5c6e1d2ce9 | |||
| ec4d515d28 | |||
| 59efda3e22 | |||
| 936923d334 | |||
| 0a57ec3b7d | |||
| 670f3a1d62 | |||
| 8104f18f5a | |||
| 4de7790fa1 | |||
| adfb5a2b6e | |||
| d55a23448d | |||
| 1dd164f482 | |||
| 50b43c0559 | |||
| 943c52f0b3 | |||
| b84084936b | |||
| 014910deb9 | |||
| a30cefa595 | |||
| 620f402f36 | |||
| 22ff68565b | |||
| 3e1565da59 | |||
| f8a284c6fe | |||
| 39718cc521 | |||
| e945a45102 | |||
| e2f9c38902 | |||
| 447a6ba4d5 | |||
| 3f914f5092 | |||
| b26997abc0 | |||
| 560c79b885 | |||
| 77cc05c843 | |||
| 7db8c6ae4c | |||
| 6400901821 | |||
| 07c354314a | |||
| 430074d0c2 | |||
| 0eec3b928b | |||
| cb525ee588 | |||
| 1b700805b6 | |||
| 584c0da4ad | |||
| c54cf38974 | |||
| f79d1b9c02 | |||
| 0876b3f335 | |||
| e46980e40f | |||
| 7cb3bd9f85 | |||
| b74fdfe527 | |||
| 288f1bf7f8 | |||
| 8aa6935cbb | |||
| dd0aa2619b | |||
| a4390f7dd8 | |||
| 8e131bbcc1 | |||
| d92de54645 | |||
| febe795af4 | |||
| bb6d02df83 | |||
| 72471f5677 | |||
| 3550486d4b | |||
| 30344befe9 | |||
| bf5e2785c3 | |||
| a4a7caff01 | |||
| d2cdf7ce18 | |||
| befc5adf70 | |||
| b62f61fbc6 | |||
| 6dd0bbdd79 | |||
| b92a280f51 | |||
| cecf7304e1 | |||
| c5eccfe5d6 | |||
| 1fc796020d | |||
| c39a74048a | |||
| c294b86524 | |||
| 8d133d9031 | |||
| 1adf19a873 | |||
| 60d9bd46c5 | |||
| 689afc62eb | |||
| d8e29263df | |||
| 189b91ca36 | |||
| 7172eb194d | |||
| 97838fe349 | |||
| e8e8eac820 | |||
| 54a7fed77b | |||
| ddbe3f47bd | |||
| a9dfc5d0b6 | |||
| 31de5053f3 | |||
| 5a66cb7819 | |||
| 5d4594e82e | |||
| c3326973c7 | |||
| b0de6390f4 | |||
| a6c33afb11 | |||
| ec26a912bc | |||
| 6a11c78288 | |||
| d27b199cea | |||
| 7ba4c9e15e | |||
| 802e72f1bf | |||
| 10a223f27d | |||
| 0fade12e8e | |||
| a4bf34f73b | |||
| 227c7195f6 | |||
| 5e55a7a095 | |||
| 741b1edf73 | |||
| 8b4e8ce37f | |||
| 95ad8d879b | |||
| 2a0d60f642 | |||
| 9f605a1f6c | |||
| 5272788f8c | |||
| a9238b425b | |||
| 79edbf9a92 | |||
| 542ec2bd4a | |||
| 9733ef791e | |||
| f16c70e200 | |||
| ddca8411a6 | |||
| 099f0ec401 | |||
| e35428a7b9 | |||
| 59a68c8d7a | |||
| 336eb46547 | |||
| cdfffb8464 | |||
| 494ce333ce | |||
| 0ae2dc3134 | |||
| 1e06cf0667 | |||
| 980bddb455 | |||
| 78be287e67 | |||
| 02f016c1fd | |||
| e9c7377004 | |||
| 28bc4327b4 | |||
| 889ffcade9 | |||
| 335086ef36 | |||
| 983d14bdcd | |||
| aaa03a37a4 | |||
| c7e8c7da3e | |||
| 0d769b436d | |||
| 361b0cfa2b | |||
| a9527573f1 | |||
| 9702d1a67d | |||
| 922c795699 | |||
| fd8547344a | |||
| 150af1607e | |||
| 4d7ced7e15 | |||
| d7e1fff011 | |||
| 8ca96dfd9f | |||
| 8c559d6916 | |||
| 2158165fc4 | |||
| 78792c240f | |||
| 0abd13e1f2 | |||
| 7e37cec1ab | |||
| b0926b1647 | |||
| 582a3b190d | |||
| 8c8a398f90 | |||
| 742a72b4ec | |||
| 84a00b05e0 | |||
| e21fa3fff9 | |||
| 5b3647fdff | |||
| 14b6e71416 | |||
| 4869aba90f | |||
| c68e427d13 | |||
| 0dca4dedbd | |||
| c6e7b5249e | |||
| 9dcb82f22e | |||
| fa8491b3aa | |||
| b811db823b | |||
| 4f7dc6fb36 | |||
| b7096a77db | |||
| cbcd17764b | |||
| 47899ac52d | |||
| 586eb3cd9e | |||
| 584535393f | |||
| 01a9ab0cf6 | |||
| 51a538373f | |||
| a6ce75d17c | |||
| 0a3d0e3569 | |||
| fccac277d2 | |||
| 00901e01b7 | |||
| 4a3f5c4f69 | |||
| 9f85105186 | |||
| a9e846211b | |||
| 8cbf25c026 | |||
| e5857cbfec | |||
| 064dac48f8 | |||
| 82d0ac2088 | |||
| 3a1cee2faf | |||
| 8171b887ad | |||
| 203f805548 | |||
| c91ec4c97d | |||
| d85c8ceeb2 | |||
| b38994f1e8 | |||
| d846c2cce9 | |||
| 6e50778db7 | |||
| 3a325a6445 | |||
| f73172aeae | |||
| 97c25cb35e | |||
| 0fb82c1975 | |||
| 36c3f93884 | |||
| 3fb0360e01 | |||
| 084c0a73a3 | |||
| 092bd17921 | |||
| 079d05c2cc | |||
| acc795ed69 | |||
| 1aaa30ecce | |||
| f7e5398ac8 | |||
| 89f35b0800 | |||
| d7f30fdf73 | |||
| 0c6a4f9452 | |||
| c1e38e649c | |||
| b8a65a446a | |||
| 6626124bef | |||
| 80f67c3c89 | |||
| 01afe5ec53 | |||
| 83928ccecc | |||
| 38a1179e62 | |||
| e0f9eeaa79 | |||
| f10a82916f | |||
| da12437251 | |||
| fb3012f778 | |||
| 8336831d8f | |||
| ec064426b3 | |||
| 8f72bf11f7 | |||
| 915cf76f85 | |||
| f1fef24f25 | |||
| ceb0900bf6 | |||
| cc9fc9bd1f | |||
| dcf59bc29f | |||
| 5c3e7a38d4 | |||
| d6ccbcdf22 | |||
| e4e03fa0dd | |||
| 10892670be | |||
| 3c7a42c35d | |||
| abfaf6ca7a | |||
| f699f1fd80 | |||
| a6fbdcb5c1 | |||
| a4200869c9 | |||
| 9f59b6010e | |||
| 29d3175e0b | |||
| 600174322e | |||
| 9818d976dd | |||
| 3938e23cde | |||
| 86bb0c6ded | |||
| 36f57ce6c0 | |||
| ed0181a114 | |||
| 439c62935d | |||
| 9bc24ecd96 | |||
| 2150e4882e | |||
| ee347bfe9d | |||
| 08d86990e2 | |||
| f74a8ba82e | |||
| ad51b7a4e1 | |||
| 94516092b1 | |||
| adf25681cc | |||
| e2f73bce61 | |||
| fec8626291 | |||
| 6fa819a170 | |||
| 2ca3e9ac82 | |||
| 9d801a1a68 | |||
| 7bfc00b80e | |||
| a346f05e9c | |||
| 35929b6869 | |||
| ffeee7e48d | |||
| 10239f0616 | |||
| 9f1b01b561 | |||
| 7f641072d4 | |||
| cf0af8a3f0 | |||
| b9551c960a | |||
| f2ffe26aaf | |||
| fbe57b2f10 | |||
| 7f3eb926ee | |||
| 2d390b56f6 | |||
| 67f4caf2fe | |||
| 9b248ad6c2 | |||
| 45974ac925 | |||
| 2cedcc5a58 | |||
| 14a0c60550 | |||
| cdf368c21c | |||
| f3ae1340cf | |||
| 624fb8c8a1 | |||
| dbb5ac265d | |||
| 1fd137b684 | |||
| a718cc950e | |||
| cea93d9e98 | |||
| 346c1f7eff | |||
| 32f200e837 | |||
| 07a2daa827 | |||
| a22fc10a72 | |||
| 0c306121aa | |||
| 97139f713b | |||
| 77a877c6d3 | |||
| 627590ff2a | |||
| 6835870dee | |||
| a48c37ee82 | |||
| 579b1f1968 | |||
| 331da0f802 | |||
| 782ed7ff21 | |||
| c511b91a09 | |||
| efb6ae1529 | |||
| 58f80d4d16 | |||
| c3b556ddce | |||
| f16120fbfc | |||
| 02002860ca | |||
| b97e57fd4e | |||
| cd927ae279 | |||
| e2da226c10 | |||
| eae28f1cee | |||
| 47eacdc545 | |||
| b669dfbc7e | |||
| 9f192768bc | |||
| 8356e058c1 | |||
| 0870c65fa5 | |||
| 36c0192bd2 | |||
| 65a63952e3 | |||
| c6dbbdb43d | |||
| 1a66f64679 | |||
| debcbd537f | |||
| 6938809051 | |||
| b737911cdc | |||
| 1de02e9ab2 | |||
| 08d4240e70 | |||
| fe13ce8d6f | |||
| 7fe7605a85 | |||
| f0e352489f | |||
| aff78bda7c | |||
| c7c1d37379 | |||
| e6da7c7282 | |||
| 78c3c5eff2 | |||
| 6b243ee826 | |||
| 14a056ed3e | |||
| 086879d149 | |||
| 7a24c10188 | |||
| 6cf5fdadb9 | |||
| ee9ddef7c5 | |||
| 699d312dbb | |||
| c3caec253f | |||
| c47503affe | |||
| 5efbf77f7c | |||
| 1700c0e4f8 | |||
| c535a5ec73 | |||
| 644280bbb4 | |||
| 43357c1100 | |||
| eb19731843 | |||
| 95750f8c9c | |||
| 12820a4042 | |||
| 8e3adb42d6 | |||
| 8ab35a5b06 | |||
| ba64d9fafb | |||
| 2ba2b5b264 | |||
| 0dad8e178a | |||
| 1470563142 | |||
| 0ca16961ee | |||
| 8d8452e668 | |||
| 6c18d5154f | |||
| aabe4ae1e1 | |||
| 5147e28aaf | |||
| c6e8b04b86 | |||
| c0b3c69a8f | |||
| 080ed7c1c6 | |||
| 570ece3284 | |||
| 8f6f6464a0 | |||
| 8c565b5a7c | |||
| cd1ff2ad25 | |||
| d2979631d8 | |||
| 4dfc1358c5 | |||
| 6a96c183a3 | |||
| 9df023b9d0 | |||
| 19e4387b86 | |||
| ab01a518d1 | |||
| a66724e312 | |||
| cc56486814 | |||
| 277b20a1b2 | |||
| 55d12d7556 | |||
| a527acc56c | |||
| dc1d7f51cb | |||
| 4ff7e06044 | |||
| 2968c8d99c | |||
| c617d2550e | |||
| 7937530c74 | |||
| 3657e903f5 | |||
| 0fcab4d989 | |||
| afb64c896e | |||
| 65f1b05420 | |||
| 8f37543800 | |||
| abbe40ee9c | |||
| 5c082762c4 | |||
| 4a230ad878 | |||
| 94c432f3f3 | |||
| d88c07c932 | |||
| 5ee5577010 | |||
| 01877c1629 | |||
| f8a7b563aa | |||
| 915555f80f | |||
| 26eafd96dd | |||
| e504b9d414 | |||
| 312777ddc5 | |||
| c79acf5ffe | |||
| 7d5d347cdd | |||
| 95cc15a142 | |||
| f7d464a51d | |||
| a6c4c0c0ea | |||
| 976a8fa85e | |||
| 33413e91c6 | |||
| 801c59e75e | |||
| df9c8e2e80 | |||
| 4d480ea3fe | |||
| 7e26d1117a | |||
| b04810c480 | |||
| 5255da936f | |||
| 248871d770 | |||
| c634bf6368 | |||
| f5dbfaf234 | |||
| aa4d97f05d | |||
| c20a513b70 | |||
| 738c03ff3e | |||
| e8a68c49ce | |||
| 961400fdca | |||
| 8827b167ca | |||
| e1389a62c7 | |||
| 7b416ccc70 | |||
| 29f3cfa894 | |||
| 978f34e30b | |||
| 445e25221a | |||
| 489a05117c | |||
| e572ee44f9 | |||
| f4e14bfe3b | |||
| bddc1b5e96 | |||
| cb0de8f17e | |||
| e1a0b244de | |||
| a9d5411bf0 | |||
| 16af9125ec | |||
| 2792e7698f | |||
| d02e5a89e5 | |||
| 20f19917d3 | |||
| 7e5cd52864 | |||
| 4622ad767b | |||
| 96048d5ac5 | |||
| facec93082 | |||
| c040be9eb1 | |||
| 8d3cf53289 | |||
| 83c4a82e6d | |||
| 6ad11badf3 | |||
| 39c7da301c | |||
| 5275f2eabc | |||
| 7cf68ff279 | |||
| b8af02ebaa | |||
| 904df9f361 | |||
| ca3cf185cf | |||
| a02bf11c81 | |||
| 5f4b8078dc | |||
| 1f573955ff | |||
| dbba0ef776 | |||
| d14345f605 | |||
| 2059e84701 | |||
| f4a9d5f4f3 | |||
| 6303a77e8a | |||
| 2963aa5e93 | |||
| cfc133acd3 | |||
| 311cb3ac0a | |||
| 06fc419a15 | |||
| 10f7b8ca9e | |||
| bc9eaeeff7 | |||
| 94fc619196 | |||
| 7084e74372 | |||
| dd35bce141 | |||
| f1ed93add8 | |||
| a43da8d66b | |||
| 062bb5bb64 | |||
| b667224c13 | |||
| ffbafab5e2 | |||
| 3e9c83b99d | |||
| 9eea9d04b5 | |||
| c83957660a | |||
| cb7234f967 | |||
| a953f6e768 | |||
| 8516aabb88 | |||
| e963d2c194 | |||
| 3b0dbd304a | |||
| 274349f944 | |||
| 6d24e22bf6 | |||
| 8fae4e64d5 | |||
| fc5adcf8eb | |||
| 9eaf023bac | |||
| cf9ce1d103 | |||
| 675b5e1bed | |||
| 2fe24055c0 | |||
| e4d26bef97 | |||
| 1c7d33a495 | |||
| eb6e4818d3 | |||
| 61d2f42955 | |||
| c78fe237e2 | |||
| 0ffb7dd56b | |||
| e9ce38472f | |||
| 5802b6847e | |||
| 4a768702aa | |||
| 4565e067af | |||
| 4650ffa86b | |||
| f6d50ead3f | |||
| 70cc437d71 | |||
| bdfda6f908 | |||
| c5de50fdd2 | |||
| 77c9863b50 | |||
| 03d44105cc | |||
| 79b76fd783 | |||
| 19cc8bc9f8 | |||
| 08c04a3c67 | |||
| 41ae7326c0 | |||
| b0961f4538 | |||
| 26242f6378 | |||
| 13228ed46f | |||
| d162a4b420 | |||
| 1704684af8 | |||
| c63d9a13a5 | |||
| 65243adb24 | |||
| e35f7b4e21 | |||
| 82449dabd6 | |||
| 74ec823017 | |||
| 91e222fe37 | |||
| 14230e7221 | |||
| 4b697d8695 | |||
| deeda6e273 | |||
| 7e7844529f | |||
| 4196c14c9c | |||
| 5294e78dde | |||
| d97424fcab | |||
| 2b3c0bb633 | |||
| b8e2fd669d | |||
| df7f9fcba4 | |||
| db0b022b6e | |||
| 459adf0450 | |||
| df37f29746 | |||
| 60c210b017 | |||
| d4bd755e60 | |||
| aed152b530 | |||
| 5a8e9d8fa8 | |||
| 7610cecde6 | |||
| bb26b3b64d | |||
| aabdeba0f3 | |||
| fd68a81a26 | |||
| 0e07b92be2 | |||
| 4addffe94c | |||
| 0836e4d45a | |||
| 4a57e5a075 | |||
| 29458d7675 | |||
| 90b0d6a73b | |||
| 547051bfa8 | |||
| 93595af09f | |||
| 3828c0d1bc | |||
| a2263de7cb | |||
| e53fa8307d | |||
| b8cfb87121 |
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Fix ENAMETOOLONG when calling Claude Code
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": minor
|
||||
---
|
||||
|
||||
Support Sonnet-4 in SAP AI Core provider
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Removed deleteNonFavoritedTasks, moved popup to extension, cleaned up deletion logic
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
host bridge migration - clipboard
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Refactor task class, moving auto approve
|
||||
@@ -164,6 +164,7 @@ Key providers include:
|
||||
- **OpenRouter**: Meta-provider supporting multiple model providers
|
||||
- **AWS Bedrock**: Integration with Amazon's AI services
|
||||
- **Gemini**: Google's AI models
|
||||
- **Cerebras**: High-performance inference with Llama, Qwen, and DeepSeek models
|
||||
- **Ollama**: Local model hosting
|
||||
- **LM Studio**: Local model hosting
|
||||
- **VSCode LM**: VSCode's built-in language models
|
||||
@@ -209,7 +210,7 @@ class Task {
|
||||
switch (chunk.type) {
|
||||
case "text":
|
||||
// Parse into content blocks
|
||||
this.assistantMessageContent = parseAssistantMessage(chunk.text)
|
||||
this.assistantMessageContent = parseAssistantMessageV2(chunk.text)
|
||||
// Present blocks to user
|
||||
await this.presentAssistantMessage()
|
||||
break
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# Cline Protobuf Development Guide
|
||||
|
||||
This guide outlines how to add new gRPC endpoints for communication between the webview (frontend) and the extension host (backend).
|
||||
|
||||
## Overview
|
||||
|
||||
Cline uses [Protobuf](https://protobuf.dev/) to define a strongly-typed API, ensuring efficient and type-safe communication. All definitions are in the `/proto` directory. The compiler and plugins are included as project dependencies, so no manual installation is needed.
|
||||
|
||||
## Key Concepts & Best Practices
|
||||
|
||||
- **File Structure**: Each feature domain should have its own `.proto` file (e.g., `account.proto`, `task.proto`).
|
||||
- **Message Design**:
|
||||
- For simple, single-value data, use the shared types in `proto/common.proto` (e.g., `StringRequest`, `Empty`, `Int64Request`). This promotes consistency.
|
||||
- For complex data structures, define custom messages within the feature's `.proto` file (see `task.proto` for examples like `NewTaskRequest`).
|
||||
- **Naming Conventions**:
|
||||
- Services: `PascalCaseService` (e.g., `AccountService`).
|
||||
- RPCs: `camelCase` (e.g., `accountEmailIdentified`).
|
||||
- Messages: `PascalCase` (e.g., `StringRequest`).
|
||||
- **Streaming**: For server-to-client streaming, use the `stream` keyword on the response type. See `subscribeToAuthCallback` in `account.proto` for an example.
|
||||
|
||||
---
|
||||
|
||||
## 4-Step Development Workflow
|
||||
|
||||
Here’s how to add a new RPC, using `scrollToSettings` as an example.
|
||||
|
||||
### 1. Define the RPC in a `.proto` File
|
||||
|
||||
Add your service method to the appropriate file in the `proto/` directory.
|
||||
|
||||
**File: `proto/ui.proto`**
|
||||
```proto
|
||||
service UiService {
|
||||
// ... other RPCs
|
||||
// Scrolls to a specific settings section in the settings view
|
||||
rpc scrollToSettings(StringRequest) returns (KeyValuePair);
|
||||
}
|
||||
```
|
||||
Here, we use the common `StringRequest` and `KeyValuePair` types.
|
||||
|
||||
### 2. Compile Definitions
|
||||
|
||||
After editing a `.proto` file, regenerate the TypeScript code. From the project root, run:
|
||||
```bash
|
||||
npm run protos
|
||||
```
|
||||
This command compiles all `.proto` files and outputs the generated code to `src/generated/` and `src/shared/`. Do not edit these generated files manually.
|
||||
|
||||
### 3. Implement the Backend Handler
|
||||
|
||||
Create the RPC implementation in the backend. Handlers are located in `src/core/controller/[service-name]/`.
|
||||
|
||||
**File: `src/core/controller/ui/scrollToSettings.ts`**
|
||||
```typescript
|
||||
import { Controller } from ".."
|
||||
import { StringRequest, KeyValuePair } from "../../../shared/proto/common"
|
||||
|
||||
/**
|
||||
* Executes a scroll to settings action
|
||||
* @param controller The controller instance
|
||||
* @param request The request containing the ID of the settings section to scroll to
|
||||
* @returns KeyValuePair with action and value fields for the UI to process
|
||||
*/
|
||||
export async function scrollToSettings(controller: Controller, request: StringRequest): Promise<KeyValuePair> {
|
||||
return KeyValuePair.create({
|
||||
key: "scrollToSettings",
|
||||
value: request.value || "",
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Call the RPC from the Webview
|
||||
|
||||
Call the new RPC from a React component in `webview-ui/`. The generated client makes this simple.
|
||||
|
||||
**File: `webview-ui/src/components/browser/BrowserSettingsMenu.tsx`** (Example)
|
||||
```tsx
|
||||
import { UiServiceClient } from "../../../services/grpc"
|
||||
import { StringRequest } from "../../../../shared/proto/common"
|
||||
|
||||
// ... inside a React component
|
||||
const handleMenuClick = async () => {
|
||||
try {
|
||||
await UiServiceClient.scrollToSettings(StringRequest.create({ value: "browser" }))
|
||||
} catch (error) {
|
||||
console.error("Error scrolling to browser settings:", error)
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,549 @@
|
||||
The goal of this workflow is to take a changeset for a release of Cline, an autonomous coding agent extension that plugs right into your IDE, and write the updated announcement component, and the updated changelog.
|
||||
|
||||
|
||||
For reference, here are some examples of how we converted previous changesets to announcement components / changelogs.
|
||||
|
||||
|
||||
- 3.14
|
||||
<changeset>
|
||||
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
|
||||
|
||||
Releases
|
||||
claude-dev@3.14.0
|
||||
Minor Changes
|
||||
77c9863: create clinerules folder if its currently a file and creating new rule
|
||||
0ffb7dd: disabling shift hint for now & improving tooltip behavior
|
||||
79b76fd: Add support for custom model ID in AWS Bedrock provider, enabling use of Application Inference Profile.
|
||||
eb6e481: Full support for LaTeX rendering
|
||||
df37f29: Add support for custom API request timeout. Previously, timeouts were hardcoded to 30 seconds for providers like Ollama or 15 seconds for OpenRouter and Cline. Now users can set a custom timeout value in milliseconds through the settings interface.
|
||||
e4d26be: allow cursorrules and windsurfrules
|
||||
c5de50f: Fix Handle @withRetry() SyntaxError when running extension locally issue
|
||||
61d2f42: enabled pricing calculation for gemini and vertex + more robust caching & cache tracking for gemini & vertex
|
||||
aed152b: add truncation notice when truncating manually
|
||||
2fe2405: Migrate Cline Tools Section to new docs
|
||||
19cc8bc: Add a timeout setting for the terminal connection, allowing users to adjust this if they are having timeout issues
|
||||
03d4410: Added copy button to code blocks.
|
||||
c78fe23: addressed race condition in terminal command usage
|
||||
91e222f: add checkpoints after more messages
|
||||
14230e7: add newrule slash command
|
||||
1c7d33a: Add remote config with posthog allowing for disabling new features until they're reading, making for a better developer experience.
|
||||
4196c14: add cache ui for open router and cline provider
|
||||
d97424f: showing expanded task by default
|
||||
5294e78: Refactor to not pass a message for showing the MCP View from the servers modal
|
||||
70cc437: Fix Windows path issue: Correct handling of import.meta.url to avoid leading slash in pathname
|
||||
4b697d8: Migrate the addRemoteServer to protobus
|
||||
Patch Changes
|
||||
c63d9a1: updated drag and drop text to say "drop" instead of "drag"
|
||||
459adf0: Add markdown copy to chat
|
||||
74ec823: Minor UX improvement to drag and drop ux
|
||||
b0961f4: Remove linear pull request action
|
||||
e9ce384: searchCommits protobus migration
|
||||
5802b68: createRuleFile protobus migration
|
||||
df7f9fc: Add dependsOn to more blocks in the tasks.json
|
||||
41ae732: Fix for git commit mentions in repos with no git commits
|
||||
7e78445: Adding args to allow Cursor to open workspaces (for checkpoint testing/development)
|
||||
bdfda6f: feat(bedrock): Introduce Amazon Nova Premier
|
||||
65243ad: Introduce UI library for future UI development
|
||||
4565e06: checkIsImageURL migrated to protobus
|
||||
5a8e9d8: protobus migration for openImage
|
||||
deeda6e: Lowering Gemini cache TTL time
|
||||
db0b022: Adding UI to show openrouter balance next to provider
|
||||
4650ffa: deleteRuleFile protobus migration
|
||||
d4bd755: fix cost calculation
|
||||
</changeset>
|
||||
|
||||
<changelog>
|
||||
## [3.14.0]
|
||||
|
||||
- Add UI to show openrouter balance next to provider
|
||||
- Add support for custom model ID in AWS Bedrock provider, enabling use of Application Inference Profile (Thanks @clicube!)
|
||||
- Add more robust caching & cache tracking for gemini & vertex providers
|
||||
- Add support for LaTeX rendering
|
||||
- Add support for custom API request timeout. Timeouts were 15-30s, but can now be configured via settings for OpenRouter/Cline & Ollama (Thanks @WingsDrafterwork!)
|
||||
- Add truncation notice when truncating manually
|
||||
- Add a timeout setting for the terminal connection, allowing users to set a time to wait for terminal startup
|
||||
- Add copy button to code blocks
|
||||
- Add copy button to markdown blocks (Thanks @weshoke!)
|
||||
- Add checkpoints to more messages
|
||||
- Add slash command to create a new rules file (/newrule)
|
||||
- Add cache ui for open router and cline provider
|
||||
- Add Amazon Nova Premier model to Bedrock (Thanks @watany!)
|
||||
- Add support for cursorrules and windsurfrules
|
||||
- Add support for batch history deletion (Thanks @danix800!)
|
||||
- Improve Drag & Drop experience
|
||||
- Create clinerules folder creating new rule if it's needed
|
||||
- Enable pricing calculation for gemini and vertex providers
|
||||
- Refactor message handling to not show the MCP View of the server modal
|
||||
- Migrate the addRemoteServer to protobus (Thanks @DaveFres!)
|
||||
- Update task header to be expanded by default
|
||||
- Update Gemini cache TTL time to 15 minutes
|
||||
- Fix race condition in terminal command usage
|
||||
- Fix to correctly handle `import.meta.url`, avoiding leading slash in pathname for Windows (Thanks @DaveFres!)
|
||||
- Fix @withRetry() decoration syntax error when running extension locally (Thanks @DaveFres!)
|
||||
- Fix for git commit mentions in repos with no git commits
|
||||
- Fix cost calculation (Thanks @BarreiroT!)
|
||||
</changelog>
|
||||
|
||||
|
||||
<announcement-component>
|
||||
const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
|
||||
const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
|
||||
return (
|
||||
<div style={containerStyle}>
|
||||
<VSCodeButton appearance="icon" onClick={hideAnnouncement} style={closeIconStyle}>
|
||||
<span className="codicon codicon-close"></span>
|
||||
</VSCodeButton>
|
||||
<h3 style={h3TitleStyle}>
|
||||
🎉{" "}New in v{minorVersion}
|
||||
</h3>
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>Gemini prompt caching:</b> Gemini and Vertex providers now support prompt caching and price tracking for
|
||||
Gemini models.
|
||||
</li>
|
||||
<li>
|
||||
<b>Copy Buttons:</b> Buttons were added to Markdown and Code blocks that allow you to copy their contents
|
||||
easily.
|
||||
</li>
|
||||
<li>
|
||||
<b>/newrule command:</b> New slash command to have cline write your .clinerules for you based on your
|
||||
workflow.
|
||||
</li>
|
||||
<li>
|
||||
<b>Drag and drop improvements:</b> Don't forget to hold shift while dragging files!
|
||||
</li>
|
||||
<li>Added more checkpoints across the task, allowing you to restore from more than just file changes.</li>
|
||||
<li>Added support for rendering LaTeX in message responses. (Try asking Cline to show the quadratic formula)</li>
|
||||
</ul>
|
||||
<Accordion isCompact className="pl-0">
|
||||
<AccordionItem
|
||||
key="1"
|
||||
aria-label="Previous Updates"
|
||||
title="Previous Updates:"
|
||||
classNames={{
|
||||
trigger: "bg-transparent border-0 pl-0 pb-0 w-fit",
|
||||
title: "font-bold text-[var(--vscode-foreground)]",
|
||||
indicator:
|
||||
"text-[var(--vscode-foreground)] mb-0.5 -rotate-180 data-[open=true]:-rotate-90 rtl:rotate-0 rtl:data-[open=true]:-rotate-90",
|
||||
}}>
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>Global Cline Rules:</b> store multiple rules files in Documents/Cline/Rules to share between
|
||||
projects.
|
||||
</li>
|
||||
<li>
|
||||
<b>Cline Rules Popup:</b> New button in the chat area to view workspace and global cline rules files
|
||||
to plug and play specific rules for the task
|
||||
</li>
|
||||
<li>
|
||||
<b>Slash Commands:</b> Type <code>/</code> in chat to see the list of quick actions, like starting a
|
||||
new task (more coming soon!)
|
||||
</li>
|
||||
<li>
|
||||
<b>Edit Messages:</b> You can now edit a message you sent previously by clicking on it. Optionally
|
||||
restore your project when the message was sent!
|
||||
</li>
|
||||
</ul>
|
||||
</AccordionItem>
|
||||
</Accordion>
|
||||
|
||||
{/*
|
||||
// Leave this here for an example of how to structure the announcement
|
||||
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
|
||||
<li>
|
||||
OpenRouter now supports prompt caching! They also have much higher rate limits than other providers,
|
||||
so I recommend trying them out.
|
||||
<br />
|
||||
{!apiConfiguration?.openRouterApiKey && (
|
||||
<VSCodeButtonLink
|
||||
href={getOpenRouterAuthUrl(vscodeUriScheme)}
|
||||
style={{
|
||||
transform: "scale(0.85)",
|
||||
transformOrigin: "left center",
|
||||
margin: "4px -30px 2px 0",
|
||||
}}>
|
||||
Get OpenRouter API Key
|
||||
</VSCodeButtonLink>
|
||||
)}
|
||||
{apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && (
|
||||
<VSCodeButton
|
||||
onClick={() => {
|
||||
vscode.postMessage({
|
||||
type: "apiConfiguration",
|
||||
apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" },
|
||||
})
|
||||
}}
|
||||
style={{
|
||||
transform: "scale(0.85)",
|
||||
transformOrigin: "left center",
|
||||
margin: "4px -30px 2px 0",
|
||||
}}>
|
||||
Switch to OpenRouter
|
||||
</VSCodeButton>
|
||||
)}
|
||||
</li>
|
||||
<li>
|
||||
<b>Edit Cline's changes before accepting!</b> When he creates or edits a file, you can modify his
|
||||
changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in
|
||||
the center to undo "<code>{"// rest of code here"}</code>" shenanigans)
|
||||
</li>
|
||||
<li>
|
||||
New <code>search_files</code> tool that lets Cline perform regex searches in your project, letting
|
||||
him refactor code, address TODOs and FIXMEs, remove dead code, and more!
|
||||
</li>
|
||||
<li>
|
||||
When Cline runs commands, you can now type directly in the terminal (+ support for Python
|
||||
environments)
|
||||
</li>
|
||||
</ul>*/}
|
||||
<div style={hrStyle} />
|
||||
<p style={linkContainerStyle}>
|
||||
Join us on{" "}
|
||||
<VSCodeLink style={linkStyle} href="https://x.com/cline">
|
||||
X,
|
||||
</VSCodeLink>{" "}
|
||||
<VSCodeLink style={linkStyle} href="https://discord.gg/cline">
|
||||
discord,
|
||||
</VSCodeLink>{" "}
|
||||
or{" "}
|
||||
<VSCodeLink style={linkStyle} href="https://www.reddit.com/r/cline/">
|
||||
r/cline
|
||||
</VSCodeLink>
|
||||
for more updates!
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</announcement-component>
|
||||
|
||||
- 3.13
|
||||
|
||||
<changeset>
|
||||
Minor Changes
|
||||
2964388: Added copy button to MermaidBlock component
|
||||
75143a7: Add the ability to fetch from global cline rules files
|
||||
Patch Changes
|
||||
a0252e7: convert inline style to tailwind css of file SettingsView.tsx
|
||||
ab59bd9: Add stream options back to xai provider
|
||||
7276f50: Icons to indicate an action is occuring outside of the users workspace
|
||||
0b19ba6: update to NEW model
|
||||
</changeset>
|
||||
|
||||
<changelog>
|
||||
## [3.13.0]
|
||||
|
||||
- Add Cline rules popover under the chat field, allowing you to easily add, enable & disable workspace level or global rule files
|
||||
- Add new slash command menu letting you type “/“ to do quick actions like creating new tasks
|
||||
- Add ability to edit past messages, with options to restore your workspace back to that point
|
||||
- Allow sending a message when selecting an option provided by the question or plan tool
|
||||
- Add command to jump to Cline's chat input
|
||||
- Add support for OpenAI o3 & 4o-mini (Thanks @PeterDaveHello and @arafatkatze!)
|
||||
- Add baseURL option for Google Gemini provider (Thanks @owengo and @olivierhub!)
|
||||
- Add support for Azure's DeepSeek model. (Thanks @yt3trees!)
|
||||
- Add ability for models that support it to receive image responses from MCP servers (Thanks @rikaaa0928!)
|
||||
- Improve search and replace diff editing by making it more flexible with models that fail to follow structured output instructions. (Thanks @chi-cat!)
|
||||
- Add detection of Ctrl+C termination in terminal, improving output reading issues
|
||||
- Fix issue where some commands with large output would cause UI to freeze
|
||||
- Fix token usage tracking issues with vertex provider (Thanks @mzsima!)
|
||||
- Fix issue with xAI reasoning content not being parsed (Thanks @mrubens!)
|
||||
</changelog>
|
||||
|
||||
<announcement-component>
|
||||
const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
|
||||
const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
|
||||
return (
|
||||
<div style={containerStyle}>
|
||||
<VSCodeButton appearance="icon" onClick={hideAnnouncement} style={closeIconStyle}>
|
||||
<span className="codicon codicon-close"></span>
|
||||
</VSCodeButton>
|
||||
<h3 style={h3TitleStyle}>
|
||||
🎉{" "}New in v{minorVersion}
|
||||
</h3>
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>Global Cline Rules:</b> store multiple rules files in Documents/Cline/Rules to share between projects.
|
||||
</li>
|
||||
<li>
|
||||
<b>Cline Rules Popup:</b> New button in the chat area to view workspace and global cline rules files to plug
|
||||
and play specific rules for the task
|
||||
</li>
|
||||
<li>
|
||||
<b>Slash Commands:</b> Type <code>/</code> in chat to see the list of quick actions, like starting a new task
|
||||
(more coming soon!)
|
||||
</li>
|
||||
<li>
|
||||
<b>Edit Messages:</b> You can now edit a message you sent previously by clicking on it. Optionally restore
|
||||
your project when the message was sent!
|
||||
</li>
|
||||
</ul>
|
||||
<h4 style={{ margin: "5px 0 5px" }}>Previous Updates:</h4>
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>Model Favorites:</b> You can now mark your favorite models when using Cline & OpenRouter providers for
|
||||
quick access!
|
||||
</li>
|
||||
<li>
|
||||
<b>Faster Diff Editing:</b> Improved animation performance for large files, plus a new indicator in chat
|
||||
showing the number of edits Cline makes.
|
||||
</li>
|
||||
<li>
|
||||
<b>New Auto-Approve Options:</b> Turn off Cline's ability to read and edit files outside your workspace.
|
||||
</li>
|
||||
</ul>
|
||||
{/*
|
||||
// Leave this here for an example of how to structure the announcement
|
||||
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
|
||||
<li>
|
||||
OpenRouter now supports prompt caching! They also have much higher rate limits than other providers,
|
||||
so I recommend trying them out.
|
||||
<br />
|
||||
{!apiConfiguration?.openRouterApiKey && (
|
||||
<VSCodeButtonLink
|
||||
href={getOpenRouterAuthUrl(vscodeUriScheme)}
|
||||
style={{
|
||||
transform: "scale(0.85)",
|
||||
transformOrigin: "left center",
|
||||
margin: "4px -30px 2px 0",
|
||||
}}>
|
||||
Get OpenRouter API Key
|
||||
</VSCodeButtonLink>
|
||||
)}
|
||||
{apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && (
|
||||
<VSCodeButton
|
||||
onClick={() => {
|
||||
vscode.postMessage({
|
||||
type: "apiConfiguration",
|
||||
apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" },
|
||||
})
|
||||
}}
|
||||
style={{
|
||||
transform: "scale(0.85)",
|
||||
transformOrigin: "left center",
|
||||
margin: "4px -30px 2px 0",
|
||||
}}>
|
||||
Switch to OpenRouter
|
||||
</VSCodeButton>
|
||||
)}
|
||||
</li>
|
||||
<li>
|
||||
<b>Edit Cline's changes before accepting!</b> When he creates or edits a file, you can modify his
|
||||
changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in
|
||||
the center to undo "<code>{"// rest of code here"}</code>" shenanigans)
|
||||
</li>
|
||||
<li>
|
||||
New <code>search_files</code> tool that lets Cline perform regex searches in your project, letting
|
||||
him refactor code, address TODOs and FIXMEs, remove dead code, and more!
|
||||
</li>
|
||||
<li>
|
||||
When Cline runs commands, you can now type directly in the terminal (+ support for Python
|
||||
environments)
|
||||
</li>
|
||||
</ul>*/}
|
||||
<div style={hrStyle} />
|
||||
<p style={linkContainerStyle}>
|
||||
Join us on{" "}
|
||||
<VSCodeLink style={linkStyle} href="https://x.com/cline">
|
||||
X,
|
||||
</VSCodeLink>{" "}
|
||||
<VSCodeLink style={linkStyle} href="https://discord.gg/cline">
|
||||
discord,
|
||||
</VSCodeLink>{" "}
|
||||
or{" "}
|
||||
<VSCodeLink style={linkStyle} href="https://www.reddit.com/r/cline/">
|
||||
r/cline
|
||||
</VSCodeLink>
|
||||
for more updates!
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</announcement-component>
|
||||
|
||||
|
||||
We have a changeset PR that automatically generated as new unreleased PRs are merged into main, the PR is always called "Changeset version bump" and the author is github-actions.
|
||||
|
||||
The Changeset PR description looks something like this:
|
||||
|
||||
<changeset-pr-description>
|
||||
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
|
||||
|
||||
|
||||
# Releases
|
||||
## claude-dev@3.16.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- c6e8b04: Recent task list is now collapsible, allowing users to hide their recent tasks (e.g. when sharing their screen).
|
||||
- aabe4ae: Add detection for new users to display special components
|
||||
- 6c18d51: adds global endpoint for vertex ai users
|
||||
- 080ed7c: Add Tailwind CSS IntelliSense to the the recommended extensions list
|
||||
- 5147e28: new workflow feature
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c0b3c69: fix eternal loading states when the last message is a checkpoint
|
||||
- 570ece3: selectImages protos migration
|
||||
- 8d8452e: askResponse protobus migration
|
||||
- cd1ff2a: Finishing the migration of Vscode Advanced settings to Settings Webview
|
||||
</changeset-pr-description>
|
||||
|
||||
The changeset pr is ALWAYS on the following branch: `changeset-release/main`.
|
||||
|
||||
I have the `gh` command line tool set up and authenticated, so you have everything you need.
|
||||
|
||||
The first step is to get the full diff from the changeset PR to look at the changes that were automatically made to the `CHANGELOG.md` file. By default it will automatically add a new section to the changelog.md file with the new version. The problem with the automatically generated section is that it just takes the text that the developers threw into their changeset files for each corresponding PR, and they can be pretty vague and bad. Additionally there's some stuff that is totally irrelevant for the end user, like minor refactoring changes. So I manually typically go in and update this section to be a proper changelog that will show up in our patchnotes. You can look at how the rest of the file is done because those are all good examples of us updating this to use good language for the end user. We usually put new features up top (and the most exciting flagship features at the very top), and then bug fixes/improvements at the bottom. Having some basic organization to the ordering of the bullet points by content is nice. But use common sense.
|
||||
|
||||
To handle this process effectively, do the following:
|
||||
|
||||
For each of the automatically generated bullet points in the Changelog.md, you should
|
||||
1. Take the commit hash at the start of the bullet point, and use the `gh` command line tool find the PR that it was associated with.
|
||||
2. Use the `gh` command to get the PR title/description/discussion to understand the context surrounding the PR.
|
||||
3. Use the `gh` command line tool to get the full PR diff to fully understand the changes made in the code.
|
||||
4. Synthesize that knowledge to determine (a) whether or not this change is relevant to end users and (b) what the text & ordering of the line should be.
|
||||
5. Update the `CHANGELOG.md` accordingly
|
||||
|
||||
Do this for every single item in the list from the autogenerated bullet points. We want to be diligent and have a full understanding of every feature so we can make the best changelog ever!
|
||||
|
||||
Here are some principles for good changelogs from keepchangelog.com, a handy guide:
|
||||
|
||||
<keepachangelog-pinciples-for-good-changelogs>
|
||||
### Guiding Principles
|
||||
- Changelogs are for humans, not machines.
|
||||
- There should be an entry for every single version.
|
||||
- The same types of changes should be grouped.
|
||||
- The latest version comes first.
|
||||
|
||||
### Bullet points in the changelog should follow these principles:
|
||||
- Types of changes
|
||||
- Added for new features.
|
||||
- Changed for changes in existing functionality.
|
||||
- Deprecated for soon-to-be removed features.
|
||||
- Removed for now removed features.
|
||||
- Fixed for any bug fixes.
|
||||
- Security in case of vulnerabilities.
|
||||
</keepachangelog-pinciples-for-good-changelogs>
|
||||
|
||||
Lastly, when developers make a PR, they typically make a changeset. And they have 3 options when making the changeset:
|
||||
|
||||
1. Patch
|
||||
2. Minor
|
||||
3. Major
|
||||
|
||||
Sometimes they label something as minor when really it should just be a patch. Or vice versa. Because of this, the automatic version bump may be incorrect. So when starting out this workflow, you should use the <ask_followup_question> tool to confirm with me whether or not this should be a patch bump (show the old version number and what the proposed new version number would be) or a minor bump. Part of the release process is making sure the version in package.json that is automatically changed actually corresponds with what we decided the bump should actually be based on the features. ALL these modifications happen in the `changeset-release/main` branch btw.
|
||||
|
||||
<important_note>
|
||||
Before doing any of this, make sure you check out the `changeset-release/main` and pull the most recent up to date changes. Then perform all this work in that branch.
|
||||
|
||||
New announcement banners should ONLY be made for minor version bumps or higher. That's another reason why double checking if the changelog warrants the bump is important.
|
||||
|
||||
Also, SUPER important: For any external contributors that aren't part of the cline github organization, we always want to add a (Thanks @username!) at the end of the changelog to attribute them properly. We're an open source project and it's ethical to do this.
|
||||
</important_note>
|
||||
|
||||
Once the changelog looks good, and the version number looks good, we gotta double check that the version number in the changelog has the brackets around it. And as a final step, double check the package.json version number matches the latest number in the changelog. And as the ultimate final step we run `npm run install:all` to make sure the package version number permiates through the lock file.
|
||||
|
||||
|
||||
<detailed_sequence_of_steps>
|
||||
# Cline Release Process - Detailed Sequence of Steps
|
||||
|
||||
## Before Starting
|
||||
1. First, examine the changeset PR without checking it out:
|
||||
```bash
|
||||
gh pr view changeset-release/main
|
||||
```
|
||||
|
||||
2. View the PR diff to see the auto-generated CHANGELOG.md changes:
|
||||
```bash
|
||||
gh pr diff changeset-release/main > changeset-diff.txt
|
||||
cat changeset-diff.txt | grep -A 50 "CHANGELOG.md"
|
||||
```
|
||||
|
||||
## Initial Setup
|
||||
3. Once you're ready to start, checkout and update the changeset release branch:
|
||||
```bash
|
||||
git checkout changeset-release/main
|
||||
git pull origin changeset-release/main
|
||||
```
|
||||
|
||||
## Analyzing Each Change
|
||||
4. For each commit hash in the auto-generated changelog entries:
|
||||
|
||||
a. Find the PR number associated with a commit hash:
|
||||
```bash
|
||||
gh pr list --search "<commit-hash>" --state merged
|
||||
```
|
||||
|
||||
b. Get PR details for better context:
|
||||
```bash
|
||||
gh pr view <PR-number>
|
||||
```
|
||||
|
||||
c. Check if the contributor is external to determine if attribution is needed:
|
||||
```bash
|
||||
# Extract username from PR
|
||||
USERNAME=$(gh pr view <PR-number> --json author --jq .author.login)
|
||||
|
||||
# Check if user is a member of the Cline organization
|
||||
# this command is a bit finnicky, but it 100% works.
|
||||
# if you see a `Error executing command: The command ran successfully, but we couldn't capture its output. Please proceed accordingly.` error, just retry it until you actually get the output
|
||||
# don't make any assumptions, just retry the command to actually get the output and determine if they're external or not.
|
||||
# no output means they are an external contributor, otherwise if there is output they are an internal contributor (part of our github org)
|
||||
gh api "orgs/cline/members" --jq "map(.login)" | grep -i "pashpashpash"
|
||||
```
|
||||
|
||||
d. View the full PR diff to understand code changes:
|
||||
```bash
|
||||
gh pr diff <PR-number> > pr-diff-<PR-number>.txt
|
||||
cat pr-diff-<PR-number>.txt
|
||||
```
|
||||
|
||||
## Updating the Changelog
|
||||
5. Based on PR analysis, update the CHANGELOG.md with user-friendly descriptions:
|
||||
- Use the `<replace_in_file>` tool to edit the CHANGELOG.md file
|
||||
- Group by feature type (Added, Changed, Fixed)
|
||||
- Put most exciting features at the top
|
||||
- Move bug fixes and small improvements to the bottom
|
||||
- Use clear, end-user focused language
|
||||
- For external contributors, add attribution at the end of the relevant entry: `(Thanks @username!)`
|
||||
|
||||
## Version Number Verification
|
||||
6. Confirm the version bump is appropriate:
|
||||
- Check package.json to verify the auto-generated version number:
|
||||
```bash
|
||||
cat package.json | grep "\"version\""
|
||||
```
|
||||
- If the feature set doesn't warrant a minor bump, use the `<replace_in_file>` tool to modify package.json
|
||||
|
||||
7. Ensure the version in CHANGELOG.md has brackets around it:
|
||||
```
|
||||
## [3.16.0]
|
||||
```
|
||||
|
||||
## Creating the Announcement (for minor/major versions only)
|
||||
8. If this is a minor version bump, create/update the announcement component:
|
||||
- Use the `<replace_in_file>` tool to edit the src/views/components/announcement.tsx file
|
||||
- Update the highlights based on key features
|
||||
- Move previous version highlights to the "Previous Updates" section
|
||||
- Use the previous announcement components as reference for structure
|
||||
|
||||
## Finalizing the Release
|
||||
9. Update dependencies with the new version number:
|
||||
```bash
|
||||
npm run install:all
|
||||
```
|
||||
|
||||
10. Commit your changes:
|
||||
```bash
|
||||
git add CHANGELOG.md package.json package-lock.json src/views/components/announcement.tsx
|
||||
git commit -m "Update CHANGELOG.md and announcement for version 3.16.0"
|
||||
```
|
||||
|
||||
11. Push your changes to the changeset branch:
|
||||
```bash
|
||||
git push origin changeset-release/main
|
||||
```
|
||||
|
||||
12. Check that your changes pushed successfully:
|
||||
```bash
|
||||
git status
|
||||
```
|
||||
</detailed_sequence_of_steps>
|
||||
@@ -0,0 +1,351 @@
|
||||
You have access to the `gh` terminal command. I already authenticated it for you. Please review it to use the PR that I asked you to review. You're already in the `cline` repo.
|
||||
|
||||
<detailed_sequence_of_steps>
|
||||
# GitHub PR Review Process - Detailed Sequence of Steps
|
||||
|
||||
## 1. Gather PR Information
|
||||
1. Get the PR title, description, and comments:
|
||||
```bash
|
||||
gh pr view <PR-number> --json title,body,comments
|
||||
```
|
||||
|
||||
2. Get the full diff of the PR:
|
||||
```bash
|
||||
gh pr diff <PR-number>
|
||||
```
|
||||
|
||||
## 2. Understand the Context
|
||||
1. Identify which files were modified in the PR:
|
||||
```bash
|
||||
gh pr view <PR-number> --json files
|
||||
```
|
||||
|
||||
2. Examine the original files in the main branch to understand the context:
|
||||
```xml
|
||||
<read_file>
|
||||
<path>path/to/file</path>
|
||||
</read_file>
|
||||
```
|
||||
|
||||
3. For specific sections of a file, you can use search_files:
|
||||
```xml
|
||||
<search_files>
|
||||
<path>path/to/directory</path>
|
||||
<regex>search term</regex>
|
||||
<file_pattern>*.ts</file_pattern>
|
||||
</search_files>
|
||||
```
|
||||
|
||||
## 3. Analyze the Changes
|
||||
1. For each modified file, understand:
|
||||
- What was changed
|
||||
- Why it was changed (based on PR description)
|
||||
- How it affects the codebase
|
||||
- Potential side effects
|
||||
|
||||
2. Look for:
|
||||
- Code quality issues
|
||||
- Potential bugs
|
||||
- Performance implications
|
||||
- Security concerns
|
||||
- Test coverage
|
||||
|
||||
## 4. Ask for User Confirmation
|
||||
1. Before making a decision, ask the user if you should approve the PR, providing your assessment and justification:
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Based on my review of PR #<PR-number>, I recommend [approving/requesting changes]. Here's my justification:
|
||||
|
||||
[Detailed justification with key points about the PR quality, implementation, and any concerns]
|
||||
|
||||
Would you like me to proceed with this recommendation?</question>
|
||||
<options>["Yes, approve the PR", "Yes, request changes", "No, I'd like to discuss further"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
## 5. Ask if User Wants a Comment Drafted
|
||||
1. After the user decides on approval/rejection, ask if they would like a comment drafted:
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
|
||||
<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
2. If the user wants a comment drafted, provide a well-structured comment they can copy:
|
||||
```
|
||||
Thank you for this PR! Here's my assessment:
|
||||
|
||||
[Detailed assessment with key points about the PR quality, implementation, and any suggestions]
|
||||
|
||||
[Include specific feedback on code quality, functionality, and testing]
|
||||
```
|
||||
|
||||
## 6. Make a Decision
|
||||
1. Approve the PR if it meets quality standards:
|
||||
```bash
|
||||
# For single-line comments:
|
||||
gh pr review <PR-number> --approve --body "Your approval message"
|
||||
|
||||
# For multi-line comments with proper whitespace formatting:
|
||||
cat << EOF | gh pr review <PR-number> --approve --body-file -
|
||||
Thanks @username for this PR! The implementation looks good.
|
||||
|
||||
I particularly like how you've handled X and Y.
|
||||
|
||||
Great work!
|
||||
EOF
|
||||
```
|
||||
|
||||
2. Request changes if improvements are needed:
|
||||
```bash
|
||||
# For single-line comments:
|
||||
gh pr review <PR-number> --request-changes --body "Your feedback message"
|
||||
|
||||
# For multi-line comments with proper whitespace formatting:
|
||||
cat << EOF | gh pr review <PR-number> --request-changes --body-file -
|
||||
Thanks @username for this PR!
|
||||
|
||||
The implementation looks promising, but there are a few things to address:
|
||||
|
||||
1. Issue one
|
||||
2. Issue two
|
||||
|
||||
Please make these changes and we can merge this.
|
||||
EOF
|
||||
```
|
||||
|
||||
Note: The `cat << EOF | ... --body-file -` approach preserves all whitespace and formatting without requiring temporary files. The `-` parameter tells the command to read from standard input.
|
||||
</detailed_sequence_of_steps>
|
||||
|
||||
<example_review_process>
|
||||
# Example PR Review Process
|
||||
|
||||
Let's walk through a real example of reviewing PR #3627 which fixes the thinking mode calculation for Claude 3.7 models.
|
||||
|
||||
## Step 1: Gather PR Information
|
||||
|
||||
```bash
|
||||
# Get PR details
|
||||
gh pr view 3627 --json title,body,comments
|
||||
|
||||
# Get the full diff
|
||||
gh pr diff 3627
|
||||
```
|
||||
|
||||
## Step 2: Understand the Context
|
||||
|
||||
```xml
|
||||
# Examine the original files to understand what's being changed
|
||||
<read_file>
|
||||
<path>src/shared/api.ts</path>
|
||||
</read_file>
|
||||
|
||||
# Look at the ThinkingBudgetSlider component implementation
|
||||
<read_file>
|
||||
<path>webview-ui/src/components/settings/ThinkingBudgetSlider.tsx</path>
|
||||
</read_file>
|
||||
|
||||
# Check how thinking mode is currently handled in API providers
|
||||
<search_files>
|
||||
<path>src/api/providers</path>
|
||||
<regex>reasoningOn</regex>
|
||||
<file_pattern>*.ts</file_pattern>
|
||||
</search_files>
|
||||
```
|
||||
|
||||
## Step 3: Analyze the Changes
|
||||
|
||||
From the PR information and code examination, we can see that:
|
||||
|
||||
1. The PR fixes an issue with the thinking mode budget calculation for Claude 3.7 models
|
||||
2. Currently, the thinking budget is incorrectly calculated as 80% of maxTokens (8192), resulting in 6553 tokens
|
||||
3. Claude 3.7 actually supports a much larger thinking budget (up to 64000 tokens)
|
||||
4. The PR adds a `thinkingConfig` property with `maxBudget: 64000` to model definitions
|
||||
5. It updates API handlers to use this value when reasoning mode is enabled
|
||||
6. It enhances the slider component to calculate max values based on model-specific percentages
|
||||
7. Comprehensive tests were added to verify the calculations
|
||||
|
||||
## Step 4: Ask for User Confirmation
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Based on my review of PR #3627, I recommend approving this PR. Here's my justification:
|
||||
|
||||
1. The PR correctly fixes the thinking mode budget calculation for Claude 3.7 models
|
||||
2. It properly implements the thinkingConfig.maxBudget property (64000) for Claude 3.7 models
|
||||
3. It applies the appropriate percentage (50%) for the slider calculation
|
||||
4. The changes are well-tested with comprehensive unit tests
|
||||
5. The implementation is clean and follows the project's coding standards
|
||||
6. The PR includes helpful screenshots demonstrating the fix
|
||||
|
||||
Would you like me to proceed with approving this PR?</question>
|
||||
<options>["Yes, approve the PR", "No, I'd like to discuss further", "Let me review it myself first"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
## Step 5: Ask if User Wants a Comment Drafted
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
|
||||
<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
## Step 6: Make a Decision
|
||||
|
||||
```bash
|
||||
# Option 1: Simple one-line comment
|
||||
gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models."
|
||||
|
||||
# Option 2: Multi-line comment with proper whitespace formatting
|
||||
cat << EOF | gh pr review 3627 --approve --body-file -
|
||||
This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models.
|
||||
|
||||
I particularly like:
|
||||
1. The proper implementation of thinkingConfig.maxBudget property (64000)
|
||||
2. The appropriate percentage (50%) for the slider calculation
|
||||
3. The comprehensive unit tests
|
||||
4. The clean implementation that follows project coding standards
|
||||
|
||||
Great work!
|
||||
EOF
|
||||
```
|
||||
</example_review_process>
|
||||
|
||||
<common_gh_commands>
|
||||
# Common GitHub CLI Commands for PR Review
|
||||
|
||||
## Basic PR Commands
|
||||
```bash
|
||||
# List open PRs
|
||||
gh pr list
|
||||
|
||||
# View a specific PR
|
||||
gh pr view <PR-number>
|
||||
|
||||
# View PR with specific fields
|
||||
gh pr view <PR-number> --json title,body,comments,files,commits
|
||||
|
||||
# Check PR status
|
||||
gh pr status
|
||||
```
|
||||
|
||||
## Diff and File Commands
|
||||
```bash
|
||||
# Get the full diff of a PR
|
||||
gh pr diff <PR-number>
|
||||
|
||||
# List files changed in a PR
|
||||
gh pr view <PR-number> --json files
|
||||
|
||||
# Check out a PR locally
|
||||
gh pr checkout <PR-number>
|
||||
```
|
||||
|
||||
## Review Commands
|
||||
```bash
|
||||
# Approve a PR (single-line comment)
|
||||
gh pr review <PR-number> --approve --body "Your approval message"
|
||||
|
||||
# Approve a PR (multi-line comment with proper whitespace)
|
||||
cat << EOF | gh pr review <PR-number> --approve --body-file -
|
||||
Your multi-line
|
||||
approval message with
|
||||
|
||||
proper whitespace formatting
|
||||
EOF
|
||||
|
||||
# Request changes on a PR (single-line comment)
|
||||
gh pr review <PR-number> --request-changes --body "Your feedback message"
|
||||
|
||||
# Request changes on a PR (multi-line comment with proper whitespace)
|
||||
cat << EOF | gh pr review <PR-number> --request-changes --body-file -
|
||||
Your multi-line
|
||||
change request with
|
||||
|
||||
proper whitespace formatting
|
||||
EOF
|
||||
|
||||
# Add a comment review (without approval/rejection)
|
||||
gh pr review <PR-number> --comment --body "Your comment message"
|
||||
|
||||
# Add a comment review with proper whitespace
|
||||
cat << EOF | gh pr review <PR-number> --comment --body-file -
|
||||
Your multi-line
|
||||
comment with
|
||||
|
||||
proper whitespace formatting
|
||||
EOF
|
||||
```
|
||||
|
||||
## Additional Commands
|
||||
```bash
|
||||
# View PR checks status
|
||||
gh pr checks <PR-number>
|
||||
|
||||
# View PR commits
|
||||
gh pr view <PR-number> --json commits
|
||||
|
||||
# Merge a PR (if you have permission)
|
||||
gh pr merge <PR-number> --merge
|
||||
```
|
||||
</common_gh_commands>
|
||||
|
||||
<general_guidelines_for_commenting>
|
||||
When reviewing a PR, please talk normally and like a friendly reviwer. You should keep it short, and start out by thanking the author of the pr and @ mentioning them.
|
||||
|
||||
Whether or not you approve the PR, you should then give a quick summary of the changes without being too verbose or definitive, staying humble like that this is your understanding of the changes. Kind of how I'm talking to you right now.
|
||||
|
||||
If you have any suggestions, or things that need to be changed, request changes instead of approving the PR.
|
||||
|
||||
Leaving inline comments in code is good, but only do so if you have something specific to say about the code. And make sure you leave those comments first, and then request changes in the PR with a short comment explaining the overall theme of what you're asking them to change.
|
||||
</general_guidelines_for_commenting>
|
||||
|
||||
<example_comments_that_i_have_written_before>
|
||||
<brief_approve_comment>
|
||||
Looks good, though we should make this generic for all providers & models at some point
|
||||
</brief_approve_comment>
|
||||
<brief_approve_comment>
|
||||
Will this work for models that may not match across OR/Gemini? Like the thinking models?
|
||||
</brief_approve_comment>
|
||||
<approve_comment>
|
||||
This looks great! I like how you've handled the global endpoint support - adding it to the ModelInfo interface makes total sense since it's just another capability flag, similar to how we handle other model features.
|
||||
|
||||
The filtered model list approach is clean and will be easier to maintain than hardcoding which models work with global endpoints. And bumping the genai library was obviously needed for this to work.
|
||||
|
||||
Thanks for adding the docs about the limitations too - good for users to know they can't use context caches with global endpoints but might get fewer 429 errors.
|
||||
</approve_comment>
|
||||
<requesst_changes_comment>
|
||||
This is awesome. Thanks @scottsus.
|
||||
|
||||
My main concern though - does this work for all the possible VS Code themes? We struggled with this initially which is why it's not super styled currently. Please test and share screenshots with the different themes to make sure before we can merge
|
||||
</request_changes_comment>
|
||||
<request_changes_comment>
|
||||
Hey, the PR looks good overall but I'm concerned about removing those timeouts. Those were probably there for a reason - VSCode's UI can be finicky with timing.
|
||||
|
||||
Could you add back the timeouts after focusing the sidebar? Something like:
|
||||
|
||||
```typescript
|
||||
await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus")
|
||||
await setTimeoutPromise(100) // Give UI time to update
|
||||
visibleWebview = WebviewProvider.getSidebarInstance()
|
||||
```
|
||||
</request_changes_comment>
|
||||
<request_changes_comment>
|
||||
Heya @alejandropta thanks for working on this!
|
||||
|
||||
A few notes:
|
||||
1 - Adding additional info to the environment variables is fairly problematic because env variables get appended to **every single message**. I don't think this is justifiable for a somewhat niche use case.
|
||||
2 - Adding this option to settings to include that could be an option, but we want our options to be simple and straightforward for new users
|
||||
3 - We're working on revisualizing the way our settings page is displayed/organized, and this could potentially be reconciled once that is in and our settings page is more clearly delineated.
|
||||
|
||||
So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us.
|
||||
</request_changes_comment>
|
||||
<request_changes_comment>
|
||||
Also, don't forget to add a changeset since this fixes a user-facing bug.
|
||||
|
||||
The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts.
|
||||
</request_changes_comment>
|
||||
</example_comments_that_i_have_written_before>
|
||||
+11
-2
@@ -5,7 +5,7 @@
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"plugins": ["@typescript-eslint", "eslint-rules"],
|
||||
"rules": {
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"warn",
|
||||
@@ -19,7 +19,16 @@
|
||||
"eqeqeq": "warn",
|
||||
"no-throw-literal": "warn",
|
||||
"semi": "off",
|
||||
"react-hooks/exhaustive-deps": "off"
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"eslint-rules/no-protobuf-object-literals": "error",
|
||||
"eslint-rules/no-grpc-client-object-literals": "error",
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
"selector": "VariableDeclarator[id.type=\"ObjectPattern\"][init.object.name=\"process\"][init.property.name=\"env\"]",
|
||||
"message": "Use process.env.VARIABLE_NAME directly instead of destructuring"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
demo.gif filter=lfs diff=lfs merge=lfs -text
|
||||
assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
* text=auto eol=lf
|
||||
|
||||
@@ -47,6 +47,14 @@ body:
|
||||
placeholder: "e.g., Windows 11, macOS Sonoma, Ubuntu 22.04"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: system-info
|
||||
attributes:
|
||||
label: System Info
|
||||
description: What system information is relevant to the issue?
|
||||
placeholder: "e.g., CPU: Intel Core i7-11700K, GPU: NVIDIA GeForce RTX 3070, RAM: 32GB DDR4"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: cline-version
|
||||
attributes:
|
||||
|
||||
@@ -6,6 +6,3 @@ contact_links:
|
||||
- name: 👋 Cline Discord
|
||||
url: https://discord.gg/cline
|
||||
about: Join our Discord community for discussions and support
|
||||
- name: ❓ Other Questions?
|
||||
url: https://x.com/sdrzn
|
||||
about: Contact the developer on X @sdrzn for other inquiries
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
name: 💡 Feature Proposal & Contribution
|
||||
description: Propose a new feature or improvement, and optionally offer to implement feature as a contributor
|
||||
labels: ["proposal"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Feature Proposal & Contribution for Cline**
|
||||
|
||||
Thank you for proposing a feature or improvement for Cline! This template helps us understand the problem, evaluate the solution, and coordinate implementation.
|
||||
|
||||
**For detailed proposals:** Please provide comprehensive information to enable fast prioritization and discussion.
|
||||
**For contribution offers:** You can indicate your willingness to implement the feature yourself.
|
||||
|
||||
Before submitting:
|
||||
- Search existing [Issues](https://github.com/cline/cline/issues) and [Discussions](https://github.com/cline/cline/discussions) to avoid duplicates
|
||||
- Read the [Contributing Guide](https://github.com/cline/cline/blob/main/CONTRIBUTING.md) if you plan to contribute
|
||||
- Don't start implementation until the proposal is reviewed and approved
|
||||
|
||||
- type: textarea
|
||||
id: problem-description
|
||||
attributes:
|
||||
label: What problem does this solve?
|
||||
description: |
|
||||
Describe the problem clearly from a user's point of view. Focus on why this matters, who it affects, and when it occurs.
|
||||
|
||||
✅ Good examples:
|
||||
- "LLM provider returns 400 error when nearing the context window instead of truncating"
|
||||
- "Submit button is invisible in dark mode"
|
||||
- "Users can't easily share their Cline configurations with team members"
|
||||
|
||||
❌ Avoid vague descriptions:
|
||||
- "Performance is bad"
|
||||
- "UI needs work"
|
||||
|
||||
Your description should include:
|
||||
- Who is affected?
|
||||
- When does it happen?
|
||||
- What's the current vs expected behavior?
|
||||
- What is the impact?
|
||||
placeholder: Be specific about the problem, who it affects, and the impact.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: proposed-solution
|
||||
attributes:
|
||||
label: What's the proposed solution?
|
||||
description: |
|
||||
Describe how the problem should be solved. Be specific about UX, system behavior, and any flows that would change.
|
||||
|
||||
✅ Good examples:
|
||||
- "Add error handling immediately after attempting to create the llm stream and retry after manually truncating"
|
||||
- "Update button styling to ensure contrast in all themes"
|
||||
- "Add export/import functionality in settings with JSON format"
|
||||
|
||||
❌ Avoid vague solutions:
|
||||
- "Improve performance"
|
||||
- "Fix the bug"
|
||||
|
||||
Your solution should include:
|
||||
- What exactly will change?
|
||||
- How will users interact with it?
|
||||
- What's the expected outcome?
|
||||
placeholder: Describe the proposed changes and how they solve the problem.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: contribution-intent
|
||||
attributes:
|
||||
label: Are you interested in implementing this?
|
||||
description: Let us know if you'd like to contribute to this feature
|
||||
options:
|
||||
- "No, just proposing the idea"
|
||||
- "Yes, I'd like to implement this myself"
|
||||
- "Yes, I'd like to collaborate with others"
|
||||
- "Maybe, depending on complexity and guidance"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: implementation-approach
|
||||
attributes:
|
||||
label: Implementation approach (if contributing)
|
||||
description: |
|
||||
**Only fill this out if you selected "Yes" above.**
|
||||
|
||||
How do you plan to implement this? Include:
|
||||
- High-level technical approach
|
||||
- Files/components that would be affected
|
||||
- Any new dependencies required
|
||||
- Potential challenges or considerations you've identified
|
||||
|
||||
This helps us provide better guidance and ensures alignment before you start coding.
|
||||
placeholder: "My implementation approach would be..."
|
||||
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Proposal checklist
|
||||
options:
|
||||
- label: I've checked for existing issues or related proposals
|
||||
required: true
|
||||
- label: I understand this needs review before implementation can start
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: contribution-checklist
|
||||
attributes:
|
||||
label: Contribution checklist (if contributing)
|
||||
description: Only check these if you plan to contribute
|
||||
options:
|
||||
- label: I've read the [Contributing Guide](https://github.com/cline/cline/blob/main/CONTRIBUTING.md)
|
||||
- label: I'm willing to make changes based on feedback
|
||||
- label: I understand the code review process and requirements
|
||||
@@ -1,10 +1,47 @@
|
||||
<!--
|
||||
Thank you for contributing to Cline!
|
||||
|
||||
⚠️ Important: Before submitting this PR, please ensure you have:
|
||||
- Opened an issue and discussed your proposed changes with the community / contributors
|
||||
- Received approval from a core Cline contributor prior to proceeding with the implementation
|
||||
- Link the associated issue in the "Related Issue" section
|
||||
|
||||
Limited exceptions:
|
||||
Small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality may be submitted directly.
|
||||
|
||||
Why this requirement?
|
||||
We deeply appreciate all community contributions - they are the core reason we're able to operate successfully and keep innovating! We welcome community input and want to make it as easy as possible for people to submit quality work. This process helps our core maintainers review new ideas faster and saves contributor time by ensuring you have the go-ahead before spending time on implementation.
|
||||
-->
|
||||
|
||||
### Related Issue
|
||||
|
||||
<!-- Replace XXXX with the issue number that this PR addresses -->
|
||||
**Issue:** #XXXX
|
||||
|
||||
### Description
|
||||
|
||||
<!-- Describe your changes in detail. What problem does this PR solve? -->
|
||||
<!--
|
||||
Help reviewers understand your changes by making this PR readable and well-organized:
|
||||
|
||||
- What problem does this PR solve?
|
||||
- Why were these changes introduced and what purpose do they serve?
|
||||
- For larger changes, provide context about your approach and reasoning
|
||||
|
||||
Small PRs may need minimal description, but larger changes benefit from explaining where you're coming from. Much of this context can be in the linked issue above, so feel free to reference it rather than repeating everything here.
|
||||
-->
|
||||
|
||||
### Test Procedure
|
||||
|
||||
<!-- How did you test this? Are you confident that it will not introduce bugs? If so, why? -->
|
||||
<!--
|
||||
Please walk us through your testing approach and thought process. This helps reviewers understand that you've thoroughly considered the impact of your changes:
|
||||
|
||||
- How did you test this change?
|
||||
- What could potentially break and how did you verify it doesn't?
|
||||
- What existing functionality might be affected and how did you check it still works?
|
||||
- Why are you confident this is ready for merge?
|
||||
|
||||
We're not looking for exhaustive documentation - just evidence that you've thought through the implications of your changes and tested accordingly.
|
||||
-->
|
||||
|
||||
### Type of Change
|
||||
|
||||
@@ -29,7 +66,15 @@
|
||||
|
||||
### Screenshots
|
||||
|
||||
<!-- For UI changes, add screenshots here -->
|
||||
<!--
|
||||
Help reviewers quickly understand your changes:
|
||||
|
||||
- **UI Changes**: Please include screenshots showing before/after states
|
||||
- **Complex Workflows**: Consider uploading a screen recording (video) if your changes involve multiple steps or state transitions
|
||||
- **Backend Changes**: Not required, but feel free to include terminal output or other evidence that demonstrates functionality
|
||||
|
||||
This helps reviewers see what you've built without having to pull down and test your branch first.
|
||||
-->
|
||||
|
||||
### Additional Notes
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ jobs:
|
||||
uses: morfien101/actions-authorized-user@4a3cfbf0bcb3cafe4a71710a278920c5d94bb38b
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
org: ${{ github.repository_owner }}
|
||||
team: "deployer"
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
if: false
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -23,3 +24,5 @@ jobs:
|
||||
uses: codespell-project/codespell-problem-matcher@v1
|
||||
- name: Codespell
|
||||
uses: codespell-project/actions-codespell@v2
|
||||
with:
|
||||
only_warn: 1
|
||||
|
||||
@@ -11,6 +11,10 @@ on:
|
||||
options:
|
||||
- pre-release
|
||||
- release
|
||||
tag:
|
||||
description: "Enter existing tag to publish (e.g., v3.1.2)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -30,11 +34,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.15.1
|
||||
node-version: "lts/*"
|
||||
|
||||
# Cache root dependencies - only reuse if package-lock.json exactly matches
|
||||
- name: Cache root dependencies
|
||||
@@ -54,14 +60,14 @@ jobs:
|
||||
|
||||
- name: Install root dependencies
|
||||
if: steps.root-cache.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
run: npm ci --include=optional
|
||||
|
||||
- name: Install webview-ui dependencies
|
||||
if: steps.webview-cache.outputs.cache-hit != 'true'
|
||||
run: cd webview-ui && npm ci
|
||||
run: cd webview-ui && npm ci --include=optional
|
||||
|
||||
- name: Install Publishing Tools
|
||||
run: npm install -g vsce ovsx
|
||||
run: npm install -g @vscode/vsce ovsx
|
||||
|
||||
- name: Get Version
|
||||
id: get_version
|
||||
@@ -69,14 +75,20 @@ jobs:
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Git Tag
|
||||
id: create_tag
|
||||
- name: Validate Tag
|
||||
id: validate_tag
|
||||
run: |
|
||||
VERSION=v${{ steps.get_version.outputs.version }}
|
||||
echo "tag=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Tagging with $VERSION"
|
||||
git tag "$VERSION"
|
||||
git push origin "$VERSION"
|
||||
TAG="${{ github.event.inputs.tag }}"
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
echo "Using existing tag: $TAG"
|
||||
|
||||
# Verify the tag exists
|
||||
if ! git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||
echo "Error: Tag '$TAG' does not exist in the repository"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Tag '$TAG' validated successfully"
|
||||
|
||||
- name: Package and Publish Extension
|
||||
env:
|
||||
@@ -106,7 +118,7 @@ jobs:
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ steps.create_tag.outputs.tag }}
|
||||
tag_name: ${{ steps.validate_tag.outputs.tag }}
|
||||
files: "*.vsix"
|
||||
# body: ${{ steps.changelog.outputs.content }}
|
||||
generate_release_notes: true
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
name: Create Linear Issue on Pull Request
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
create-linear-issue-on-pull-request:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check for existing Linear link
|
||||
id: check-linear
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const pr = context.payload.pull_request;
|
||||
// 1) PR body
|
||||
if (/https?:\/\/linear\.app/.test(pr.body||"")) {
|
||||
return "true";
|
||||
}
|
||||
// 2) Any linked GitHub issues?
|
||||
const res = await github.graphql(
|
||||
`query($owner:String!,$repo:String!,$prNumber:Int!){
|
||||
repository(owner:$owner,name:$repo){
|
||||
pullRequest(number:$prNumber){
|
||||
closingIssuesReferences(first:10){
|
||||
nodes{number}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
{
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
prNumber: pr.number
|
||||
}
|
||||
);
|
||||
for (const {number} of res.repository.pullRequest.closingIssuesReferences.nodes) {
|
||||
const comments = await github.rest.issues.listComments({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: number
|
||||
});
|
||||
if (comments.data.some(c=>/https?:\/\/linear\.app/.test(c.body))) {
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
return "false";
|
||||
|
||||
- name: Find or create Linear issue via GraphQL
|
||||
if: steps.check-linear.outputs.result == 'false'
|
||||
id: linear
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const API = 'https://api.linear.app/graphql';
|
||||
const apiKey = process.env.LINEAR_API_KEY;
|
||||
|
||||
// Check if API key exists
|
||||
if (!apiKey) {
|
||||
core.setFailed('LINEAR_API_KEY is not set. Please add it to your repository secrets.');
|
||||
core.setOutput('error', 'true');
|
||||
core.setOutput('error-message', 'LINEAR_API_KEY is not set. Please add it to your repository secrets.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Helper to call Linear with error handling
|
||||
async function gql(q, v) {
|
||||
try {
|
||||
const r = await fetch(API, {
|
||||
method:'POST',
|
||||
headers:{
|
||||
'Content-Type':'application/json',
|
||||
'Authorization': apiKey
|
||||
},
|
||||
body: JSON.stringify({ query: q, variables: v })
|
||||
});
|
||||
|
||||
if (!r.ok) {
|
||||
throw new Error(`Linear API responded with status ${r.status}: ${await r.text()}`);
|
||||
}
|
||||
|
||||
const json = await r.json();
|
||||
|
||||
// Check for GraphQL errors
|
||||
if (json.errors && json.errors.length > 0) {
|
||||
const errorMessages = json.errors.map(e => e.message).join(', ');
|
||||
throw new Error(`Linear GraphQL errors: ${errorMessages}`);
|
||||
}
|
||||
|
||||
return json.data;
|
||||
} catch (error) {
|
||||
core.error(`Error calling Linear API: ${error.message}`);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// 1) Set team ID
|
||||
const teamId = "19b9c1b2-5f58-498c-b1bf-23ee8f52a677"
|
||||
|
||||
// 2) Look for existing issue by PR URL
|
||||
const pr = context.payload.pull_request;
|
||||
const searchData = await gql(
|
||||
`query($team:ID!,$q:String!){
|
||||
issues(filter: { team: { id: { eq: $team } } attachments: { some: { url: { eq: $q } } } }){nodes{id,url}}
|
||||
}`,
|
||||
{ team: teamId, q: pr.html_url }
|
||||
);
|
||||
let issue = searchData.issues.nodes[0];
|
||||
|
||||
// 3) Create if missing
|
||||
if (!issue) {
|
||||
const createData = await gql(
|
||||
`mutation($input:IssueCreateInput!){
|
||||
issueCreate(input:$input){issue{id,url}}
|
||||
}`,
|
||||
{
|
||||
input: {
|
||||
teamId,
|
||||
title: `[GITHUB] ${pr.title}`,
|
||||
description: `${pr.body||''}\n\n${pr.html_url}`,
|
||||
stateId: "4d9bcba2-6712-47e3-b577-6ec1ee023dc2",
|
||||
labelIds: ["504e7d60-5037-483f-a9b8-7e298bdf116f"]
|
||||
}
|
||||
}
|
||||
);
|
||||
issue = createData.issueCreate.issue;
|
||||
}
|
||||
|
||||
// Set output for next steps
|
||||
core.setOutput('linear-issue-url', issue.url);
|
||||
core.setOutput('error', 'false');
|
||||
} catch (error) {
|
||||
core.setOutput('error', 'true');
|
||||
core.setOutput('error-message', error.message);
|
||||
core.setFailed(`Failed to create or find Linear issue: ${error.message}`);
|
||||
}
|
||||
|
||||
- name: Comment PR with Linear link
|
||||
if: steps.check-linear.outputs.result == 'false'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const pr = context.payload.pull_request;
|
||||
const url = `${{ steps.linear.outputs.linear-issue-url }}`;
|
||||
const body = `🔗 Linear issue created: ${url}`;
|
||||
// Fetch existing comments
|
||||
const { data: comments } = await github.rest.issues.listComments({
|
||||
...context.repo,
|
||||
issue_number: pr.number
|
||||
});
|
||||
const botComment = comments.find(c =>
|
||||
c.user.type === "Bot" && c.body.startsWith("🔗 Linear issue created:")
|
||||
);
|
||||
if (botComment) {
|
||||
await github.rest.issues.updateComment({
|
||||
...context.repo,
|
||||
comment_id: botComment.id,
|
||||
body
|
||||
});
|
||||
} else {
|
||||
await github.rest.issues.createComment({
|
||||
...context.repo,
|
||||
issue_number: pr.number,
|
||||
body
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
# This workflow will only label and/or close 30 issues at a time in order to avoid exceeding a rate limit.
|
||||
# More info: https://docs.github.com/en/actions/use-cases-and-examples/project-management/closing-inactive-issues
|
||||
name: Close inactive issues
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
|
||||
jobs:
|
||||
close-issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
days-before-issue-stale: 60
|
||||
days-before-issue-close: 14
|
||||
stale-issue-label: "stale"
|
||||
stale-issue-message: "This issue is stale because it has been open for 60 days with no activity."
|
||||
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
exempt-issue-labels: "pinned,security"
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Test Stale Issues Workflow
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
days-before-stale:
|
||||
description: "Days before an issue becomes stale"
|
||||
required: true
|
||||
default: "1"
|
||||
days-before-close:
|
||||
description: "Days before a stale issue is closed"
|
||||
required: true
|
||||
default: "1"
|
||||
|
||||
jobs:
|
||||
test-stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@28ca103
|
||||
with:
|
||||
days-before-issue-stale: ${{ github.event.inputs.days-before-stale }}
|
||||
days-before-issue-close: ${{ github.event.inputs.days-before-close }}
|
||||
stale-issue-label: "stale"
|
||||
stale-issue-message: "This issue is stale because it has been open for ${{ github.event.inputs.days-before-stale }} days with no activity."
|
||||
close-issue-message: "This issue was closed because it has been inactive for ${{ github.event.inputs.days-before-close }} days since being marked as stale."
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
exempt-issue-labels: "pinned,security"
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
debug-only: true
|
||||
+49
-10
@@ -15,7 +15,15 @@ permissions:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os == 'ubuntu-latest' && 'test' || format('test ({0})', matrix.os) }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -23,7 +31,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.15.1
|
||||
node-version: 22
|
||||
|
||||
# Setup Python for coverage script
|
||||
- name: Setup Python
|
||||
@@ -60,6 +68,17 @@ jobs:
|
||||
if: steps.webview-cache.outputs.cache-hit != 'true'
|
||||
run: cd webview-ui && npm ci
|
||||
|
||||
- name: Install local modules on windows
|
||||
if: runner.os == 'Windows' && steps.root-cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
npm install eslint-plugin-eslint-rules
|
||||
cd webview-ui/ && npm install eslint-plugin-eslint-rules
|
||||
|
||||
- name: Set up NPM on Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"
|
||||
|
||||
- name: Type Check
|
||||
run: npm run check-types
|
||||
|
||||
@@ -70,10 +89,10 @@ jobs:
|
||||
run: npm run format
|
||||
|
||||
# Build the extension before running tests
|
||||
- name: Build Extension
|
||||
run: npm run compile
|
||||
- name: Build Tests and Extension
|
||||
run: npm run pretest
|
||||
|
||||
# Disabling due to compatability with test framework and ESM modules
|
||||
# Unit Tests disabled due to module system conflicts between backend and webview-ui
|
||||
# - name: Unit Tests
|
||||
# run: npm run test:unit
|
||||
|
||||
@@ -82,8 +101,9 @@ jobs:
|
||||
id: extension_coverage
|
||||
continue-on-error: true
|
||||
run: |
|
||||
xvfb-run -a npm run test:coverage > extension_coverage.txt 2>&1 || true
|
||||
PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose
|
||||
node ./scripts/test-ci.js > extension_coverage.txt 2>&1
|
||||
# Default the encoding to UTF-8 - It's not the default on Windows
|
||||
PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose
|
||||
|
||||
# Run webview tests with coverage
|
||||
- name: Webview Tests with Coverage
|
||||
@@ -93,13 +113,16 @@ jobs:
|
||||
cd webview-ui
|
||||
# Ensure coverage dependency is installed
|
||||
npm install --no-save @vitest/coverage-v8
|
||||
npm run test:coverage > webview_coverage.txt 2>&1 || true
|
||||
npm run test:coverage > webview_coverage.txt 2>&1
|
||||
cd ..
|
||||
PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose
|
||||
# Default the encoding to UTF-8 - It's not the default on Windows
|
||||
PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose
|
||||
|
||||
# Save coverage reports as artifacts (workflow-scoped)
|
||||
- name: Save Coverage Reports
|
||||
uses: actions/upload-artifact@v4
|
||||
# Only upload artifacts on Linux - We only need coverage from one OS
|
||||
if: runner.os == 'Linux'
|
||||
with:
|
||||
name: pr-coverage-reports
|
||||
path: |
|
||||
@@ -107,6 +130,22 @@ jobs:
|
||||
webview-ui/webview_coverage.txt
|
||||
retention-period: workflow # Artifacts are automatically deleted when the workflow completes
|
||||
|
||||
# Set the check as failed if any of the tests failed
|
||||
- name: Print test results and check for failures
|
||||
run: |
|
||||
echo "Extension Tests Result: ${{ steps.extension_coverage.outcome }}"
|
||||
cat extension_coverage.txt
|
||||
|
||||
echo "Webview Tests Result: ${{ steps.webview_coverage.outcome }}"
|
||||
cat webview-ui/webview_coverage.txt
|
||||
|
||||
# Check if any of the test steps failed
|
||||
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context
|
||||
if [ "${{ steps.extension_coverage.outcome }}" != "success" ] || [ "${{ steps.webview_coverage.outcome }}" != "success" ]; then
|
||||
echo "Tests failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
coverage:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
@@ -132,7 +171,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.15.1
|
||||
node-version: 22
|
||||
|
||||
# Cache root dependencies - only reuse if package-lock.json exactly matches
|
||||
- name: Cache root dependencies
|
||||
|
||||
+20
-1
@@ -1,5 +1,6 @@
|
||||
out
|
||||
dist
|
||||
dist-standalone
|
||||
node_modules
|
||||
tmp
|
||||
.vscode-test/
|
||||
@@ -18,4 +19,22 @@ coverage
|
||||
# But don't ignore the coverage scripts in .github/scripts/
|
||||
!.github/scripts/coverage/
|
||||
|
||||
*evals.env
|
||||
*evals.env
|
||||
|
||||
# Generated files
|
||||
src/generated/
|
||||
# Core
|
||||
src/core/controller/*/methods.ts
|
||||
src/core/controller/*/index.ts
|
||||
src/core/controller/grpc-service-config.ts
|
||||
# Shared
|
||||
src/shared/proto/*.ts
|
||||
src/shared/proto/host/*.ts
|
||||
# Webview
|
||||
webview-ui/src/services/grpc-client.ts
|
||||
# Host bridge
|
||||
src/hosts/vscode/*/methods.ts
|
||||
src/hosts/vscode/*/index.ts
|
||||
src/hosts/vscode/client/host-grpc-client.ts
|
||||
src/hosts/vscode/host-grpc-service-config.ts
|
||||
src/standalone/server-setup.ts
|
||||
+4
-4
@@ -9,9 +9,9 @@ npm run lint || {
|
||||
|
||||
# Run Prettier
|
||||
echo "Running Prettier..."
|
||||
npm run format || {
|
||||
echo "❌ Prettier check failed. Run 'npm run format:fix' to automatically fix formatting issues."
|
||||
exit 1
|
||||
}
|
||||
npx lint-staged --verbose || {
|
||||
echo "❌ Prettier failed. Please fix the errors and try committing again."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "✅ All checks passed!"
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"extension": ["ts"],
|
||||
"spec": "src/**/__tests__/*.ts",
|
||||
"require": ["ts-node/register", "source-map-support/register"],
|
||||
"spec": ["src/**/__tests__/*.ts", "eslint-rules/__tests__/**/*.test.ts"],
|
||||
"require": ["ts-node/register", "source-map-support/register", "./src/test/requires.ts"],
|
||||
"recursive": true
|
||||
}
|
||||
|
||||
@@ -3,3 +3,6 @@ node_modules
|
||||
webview-ui/build/
|
||||
*.md
|
||||
package-lock.json
|
||||
src/core/prompts/system.ts
|
||||
src/core/prompts/model_prompts/claude4.ts
|
||||
evals/
|
||||
+2
-1
@@ -3,5 +3,6 @@
|
||||
"useTabs": true,
|
||||
"printWidth": 130,
|
||||
"semi": false,
|
||||
"bracketSameLine": true
|
||||
"bracketSameLine": true,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ export default defineConfig({
|
||||
mocha: {
|
||||
ui: "bdd",
|
||||
timeout: 20000, // Maximum time (in ms) that a test can run before failing
|
||||
/** Set up alias path resolution during tests
|
||||
* @See {@link file://./test-setup.js}
|
||||
*/
|
||||
require: ["./test-setup.js"],
|
||||
},
|
||||
workspaceFolder: "test-workspace",
|
||||
version: "stable",
|
||||
|
||||
Vendored
+6
-1
@@ -1,5 +1,10 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "connor4312.esbuild-problem-matchers", "ms-vscode.extension-test-runner"]
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"connor4312.esbuild-problem-matchers",
|
||||
"ms-vscode.extension-test-runner",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+43
-1
@@ -9,13 +9,55 @@
|
||||
"name": "Run Extension",
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
|
||||
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--disable-workspace-trust", "${workspaceFolder}"],
|
||||
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
|
||||
"preLaunchTask": "${defaultBuildTask}",
|
||||
"env": {
|
||||
"IS_DEV": "true",
|
||||
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Run Extension (Fresh Install Mode)",
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"--profile-temp",
|
||||
"--sync",
|
||||
"off",
|
||||
"--disable-extensions",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
|
||||
"preLaunchTask": "clean-sandbox",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"postDebugTask": "stop",
|
||||
"env": {
|
||||
"IS_DEV": "true",
|
||||
"DEV_WORKSPACE_FOLDER": "${workspaceFolder}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Run Standalone Service",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
|
||||
"cwd": "${workspaceFolder}/dist-standalone",
|
||||
"outFiles": ["${workspaceFolder}/dist-standalone/**/*.js"],
|
||||
"preLaunchTask": "compile-standalone",
|
||||
"env": {
|
||||
// Turns on grpc debug log.
|
||||
//"GRPC_TRACE": "all",
|
||||
//"GRPC_VERBOSITY": "DEBUG",
|
||||
"NODE_PATH": "${workspaceFolder}/dist-standalone/node_modules",
|
||||
|
||||
"HOST_BRIDGE_ADDRESS": "localhost:50052"
|
||||
},
|
||||
"program": "standalone.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+95
-21
@@ -4,10 +4,35 @@
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "watch",
|
||||
"dependsOn": ["npm: build:webview", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild"],
|
||||
"label": "compile-standalone",
|
||||
"type": "npm",
|
||||
"script": "compile-standalone",
|
||||
"group": "build",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
"reveal": "always"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "npm: protos",
|
||||
"type": "npm",
|
||||
"script": "protos",
|
||||
"problemMatcher": [],
|
||||
"isBackground": false,
|
||||
"presentation": {
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
"IS_DEV": "true"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"dependsOn": ["npm: protos", "npm: build:webview", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild"],
|
||||
"presentation": {
|
||||
"reveal": "always"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
@@ -16,9 +41,15 @@
|
||||
},
|
||||
{
|
||||
"label": "watch:test",
|
||||
"dependsOn": ["npm: build:webview:test", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild:test"],
|
||||
"dependsOn": [
|
||||
"npm: protos",
|
||||
"npm: build:webview:test",
|
||||
"npm: dev:webview",
|
||||
"npm: watch:tsc",
|
||||
"npm: watch:esbuild:test"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
"reveal": "always"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
@@ -29,10 +60,10 @@
|
||||
"problemMatcher": [],
|
||||
"isBackground": true,
|
||||
"label": "npm: build:webview",
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"group": "watch",
|
||||
"reveal": "never",
|
||||
"close": true
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
@@ -47,10 +78,10 @@
|
||||
"problemMatcher": [],
|
||||
"isBackground": true,
|
||||
"label": "npm: build:webview:test",
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"group": "watch",
|
||||
"reveal": "never",
|
||||
"close": true
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
@@ -82,10 +113,10 @@
|
||||
],
|
||||
"isBackground": true,
|
||||
"label": "npm: dev:webview",
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"group": "watch",
|
||||
"reveal": "never",
|
||||
"close": true
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
@@ -97,13 +128,31 @@
|
||||
"type": "npm",
|
||||
"script": "watch:esbuild",
|
||||
"group": "build",
|
||||
"problemMatcher": "$esbuild-watch",
|
||||
"problemMatcher": {
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^✘ \\[ERROR\\] (.*)$",
|
||||
"message": 1
|
||||
},
|
||||
{
|
||||
"regexp": "^\\s+(.*):(\\d+):(\\d+):$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^\\[watch\\] build started$",
|
||||
"endsPattern": "^\\[watch\\] build finished$"
|
||||
}
|
||||
},
|
||||
"isBackground": true,
|
||||
"label": "npm: watch:esbuild",
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"group": "watch",
|
||||
"reveal": "never",
|
||||
"close": true
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
@@ -115,13 +164,31 @@
|
||||
"type": "npm",
|
||||
"script": "watch:esbuild:test",
|
||||
"group": "build",
|
||||
"problemMatcher": "$esbuild-watch",
|
||||
"problemMatcher": {
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^✘ \\[ERROR\\] (.*)$",
|
||||
"message": 1
|
||||
},
|
||||
{
|
||||
"regexp": "^\\s+(.*):(\\d+):(\\d+):$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^\\[watch\\] build started$",
|
||||
"endsPattern": "^\\[watch\\] build finished$"
|
||||
}
|
||||
},
|
||||
"isBackground": true,
|
||||
"label": "npm: watch:esbuild:test",
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"group": "watch",
|
||||
"reveal": "never",
|
||||
"close": true
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
@@ -137,10 +204,10 @@
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"isBackground": true,
|
||||
"label": "npm: watch:tsc",
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"group": "watch",
|
||||
"reveal": "never",
|
||||
"close": true
|
||||
"reveal": "always"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -148,21 +215,28 @@
|
||||
"script": "watch-tests",
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"isBackground": true,
|
||||
"dependsOn": ["npm: protos"],
|
||||
"presentation": {
|
||||
"reveal": "never",
|
||||
"reveal": "always",
|
||||
"group": "watchers"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"label": "tasks: watch-tests",
|
||||
"dependsOn": ["npm: watch", "npm: watch-tests"],
|
||||
"dependsOn": ["npm: protos", "npm: watch", "npm: watch-tests"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "stop",
|
||||
"command": "echo ${input:terminate}",
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"label": "clean-sandbox",
|
||||
"type": "shell",
|
||||
"dependsOn": ["watch"],
|
||||
"command": "rm -rf .vscode-dev"
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
|
||||
+5
-1
@@ -37,8 +37,12 @@ docs/**
|
||||
!node_modules/@vscode/codicons/dist/codicon.css
|
||||
!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
|
||||
!src/integrations/theme/default-themes/**
|
||||
|
||||
# Include icons
|
||||
!assets/icons/**
|
||||
!assets/icons/**
|
||||
|
||||
+291
-2
@@ -1,8 +1,298 @@
|
||||
# Changelog
|
||||
|
||||
## [3.18.0]
|
||||
|
||||
- Optimized Cline to work with the Claude 4 family of models, resulting in improved performance, reliability, and new capabilities
|
||||
- Added a new Gemini CLI provider that allows you to use your local Gemini CLI authentication to access Gemini models for free (Thanks @google-gemini!)
|
||||
- Optimized Cline to work with the Gemini 2.5 family of models
|
||||
- Updated the default and recommended model to Claude 4 Sonnet for the best performance
|
||||
- Fix race condition in Plan/Act mode switching
|
||||
- Improve robustness of search and replace parsing
|
||||
|
||||
## [3.17.16]
|
||||
|
||||
- Fix Claude Code provider error handling for incomplete messages during long-running tasks (Thanks @BarreiroT!)
|
||||
- Add taskId as metadata to LiteLLM API requests for better request tracing (Thanks @jorgegarciarey!)
|
||||
|
||||
## [3.17.15]
|
||||
|
||||
- Fix LiteLLM provider to properly respect selected model IDs when switching between Plan and Act modes (Thanks @sammcj!)
|
||||
- Fix chat input being cleared when switching between Plan/Act modes without sending a message (Thanks @BarreiroT!)
|
||||
- Fix MCP server name display to avoid showing "undefined" for SSE servers, preventing tool/resource invocation failures (Thanks @ramybenaroya!)
|
||||
- Fix AWS Bedrock provider by removing deprecated custom model encoding (Thanks @watany-dev!)
|
||||
- Fix timeline tooltips for followup messages and improve color retrieval code (Thanks @char8x!)
|
||||
- Improve accessibility by making task header buttons properly announced by screen readers (Thanks @yncat!)
|
||||
- Improve accessibility by adding proper state reporting for Plan/Act mode switch for screen readers (Thanks @yncat!)
|
||||
- Prevent reading development environment variables from user's environment (Thanks @BarreiroT!)
|
||||
|
||||
## [3.17.14]
|
||||
|
||||
- Add Claude Code as a new API provider, allowing integration with Anthropic's Claude Code CLI tool and Claude Max Plan (Thanks @BarreiroT!)
|
||||
- Add SAP AI Core as a new API provider with support for Claude and GPT models (Thanks @schardosin!)
|
||||
- Add configurable default terminal profile setting, allowing users to specify which terminal Cline should use (Thanks @valinha!)
|
||||
- Add terminal output size constraint setting to limit how much terminal output is processed
|
||||
- Add MCP Rich Display settings to the settings page for persistent configuration (Thanks @Vl4diC0de!)
|
||||
- Improve copy button functionality with refactored reusable components (Thanks @shouhanzen!)
|
||||
- Improve AWS Bedrock provider by removing deprecated dependency and using standard AWS SDK (Thanks @watany-dev!)
|
||||
- Fix list_files tool to properly return files when targeting hidden directories
|
||||
- Fix search and replace edge case that could cause file deletion, making the algorithm more lenient for models using different diff formats
|
||||
- Fix task restoration issues that could occur when resuming interrupted tasks
|
||||
- Fix checkpoint saving to properly track all file changes
|
||||
- Improve file context warnings to reduce diff edit errors when resuming restored tasks
|
||||
- Clear chat input when switching between Plan/Act modes within a task
|
||||
- Exclude .clinerules files from checkpoint tracking
|
||||
|
||||
## [3.17.13]
|
||||
|
||||
- Add Thinking UX for Gemini models, providing visual feedback during model reasoning
|
||||
- Add support for Notifications MCP integration with Cline
|
||||
- Add prompt caching indicator for Grok 3 models
|
||||
- Sort MCP marketplace by newest listings by default for easier discovery of recent servers
|
||||
- Update O3 model family pricing to reflect latest OpenAI rates
|
||||
- Remove '-beta' suffix from Grok model identifiers
|
||||
- Fix AWS Bedrock provider by removing deprecated Anthropic-Bedrock SDK (Thanks @watany-dev!)
|
||||
- Fix menu display issue for terminal timeout settings
|
||||
- Improve chat input field styling and behavior
|
||||
|
||||
## [3.17.12]
|
||||
|
||||
- **Free Grok Model Available!** Access Grok 3 completely free through the Cline provider
|
||||
- Add collapsible MCP response panels to keep conversations focused on the main AI responses while still allowing access to detailed MCP output (Thanks @valinha!)
|
||||
- Prioritize active files (open tabs) at the top of the file context menu when using @ mentions (Thanks @abeatrix!)
|
||||
- Fix context menu to properly default to "File" option instead of incorrectly selecting "Git Commits"
|
||||
- Fix diff editing to handle out-of-order SEARCH/REPLACE blocks, improving reliability with models that don't follow strict ordering
|
||||
- Fix telemetry warning popup appearing repeatedly for users who have telemetry disabled
|
||||
|
||||
## [3.17.11]
|
||||
|
||||
- Add support for Gemini 2.5 Pro Preview 06-05 model to Vertex AI and Google Gemini providers
|
||||
|
||||
## [3.17.10]
|
||||
|
||||
- Add support for Qwen 3 series models with thinking mode options (Thanks @Jonny-china!)
|
||||
- Add new AskSage models: Claude 4 Sonnet, Claude 4 Opus, GPT 4.1, Gemini 2.5 Pro (Thanks @swhite24!)
|
||||
- Add VSCode walkthrough to help new users get started with Cline
|
||||
- Add support for streamable MCP servers
|
||||
- Improve Ollama model selection with filterable dropdown instead of radio buttons (Thanks @paulgear!)
|
||||
- Add setting to disable aggressive terminal reuse to help users experiencing task lockout issues
|
||||
- Fix settings dialog applying changes even when cancel button is clicked
|
||||
|
||||
## [3.17.9]
|
||||
|
||||
- Aligning Cline to work with Claude 4 model family (Experimental)
|
||||
- Add task timeline scrolling feature
|
||||
- Add support for uploading CSV and XLSX files for data analysis and processing
|
||||
- Add stable Grok-3 models to xAI provider (grok-3, grok-3-fast, grok-3-mini, grok-3-mini-fast) and update default model from grok-3-beta to grok-3 (Thanks @PeterDaveHello!)
|
||||
- Add new models to Vertex AI provider
|
||||
- Add new model to Nebius AI Studio
|
||||
- Remove hard-coded temperature from LM Studio API requests and add support for reasoning_content in LM Studio responses
|
||||
- Display delay information when retrying API calls for better user feedback
|
||||
- Fix AWS Bedrock credential caching issue where externally updated credentials (e.g., by AWS Identity Manager) were not detected, requiring extension restart (Thanks @DaveFres!)
|
||||
- Fix search tool overloading conversation with massive outputs by setting maximum byte limit for responses
|
||||
- Fix checkpoints functionality
|
||||
- Fix token counting for xAI provider
|
||||
- Fix Ollama provider issues
|
||||
- Fix window title display for Windows users
|
||||
- Improve chat box UI
|
||||
|
||||
## [3.17.8]
|
||||
|
||||
- Fix bug where terminal would get stuck and output "capture failure"
|
||||
|
||||
## [3.17.7]
|
||||
|
||||
- Fix diff editing reliability for Claude 4 family models by adding constraints to prevent errors with large replacements
|
||||
|
||||
## [3.17.6]
|
||||
|
||||
- Add Cerebras as a new API provider with 5 high-performance models including reasoning-capable models (Thanks @kevint-cerebras!)
|
||||
- Add support for uploading various file types (XML, JSON, TXT, LOG, MD, DOCX, IPYNB, PDF) alongside images
|
||||
- Add improved onboarding experience for new users with guided setup
|
||||
- Add prompt cache indicator for Gemini 2.5 Flash models
|
||||
- Update SambaNova provider with new model list and documentation links (Thanks @luisfucros!)
|
||||
- Fix diff editing support for Claude 4 family of models
|
||||
- Improve telemetry and analytics for better user experience insights
|
||||
|
||||
## [3.17.5]
|
||||
|
||||
- Fix issue with Claude 4 models where after several conversation turns, it would start making invalid diff edits
|
||||
|
||||
## [3.17.4]
|
||||
|
||||
- Fix thinking budget slider for Claude 4
|
||||
|
||||
## [3.17.3]
|
||||
|
||||
- Fix diff edit errors with Claude 4 models
|
||||
|
||||
## [3.17.2]
|
||||
|
||||
- Add support for Claude 4 models (Sonnet 4 and Opus 4) in AWS Bedrock and Vertex AI providers
|
||||
- Add support for global workflows, allowing workflows to be shared across workspaces with local workflows taking precedence
|
||||
- Fix settings page z-index UI issues that caused display problems
|
||||
- Fix AWS Bedrock environment variable handling to properly restore process.env after API calls (Thanks @DaveFres!)
|
||||
|
||||
## [3.17.1]
|
||||
|
||||
- Add prompt caching for Claude 4 models on Cline and OpenRouter providers
|
||||
- Increase max tokens for Claude Opus 4 from 4096 to 8192
|
||||
|
||||
## [3.17.0]
|
||||
|
||||
- Add support for Anthropic Claude Sonnet 4 and Claude Opus 4 in both Anthropic and Vertex providers
|
||||
- Add integration with Nebius AI Studio as a new provider (Thanks @Aktsvigun!)
|
||||
- Add custom highlight and hotkey suggestion when the assistant prompts to switch to Act mode
|
||||
- Update settings page design, now split into tabs for easier navigation (Thanks Yellow Bat @dlab-anton, and Roo Team!)
|
||||
- Fix MCP Server configuration bug
|
||||
- Fix model listing for Requesty provider
|
||||
- Move all advanced settings to settings page
|
||||
|
||||
## [3.16.3]
|
||||
|
||||
- Add devstral-small-2505 to the Mistral model list, a new specialized coding model from Mistral AI (Thanks @BarreiroT!)
|
||||
- Add documentation links to rules & workflows UI
|
||||
- Add support for Streameable HTTP Transport for MCPs (Thanks @alejandropta!)
|
||||
- Improve error handling for Mistral SDK API
|
||||
|
||||
## [3.16.2]
|
||||
|
||||
- Add support for Gemini 2.5 Flash Preview 05-20 model to Vertex AI provider with massive 1M token context window (Thanks @omercelik!)
|
||||
- Add keyboard shortcut (Cmd+') to quickly focus Cline from anywhere in VS Code
|
||||
- Add lightbulb actions for selected text with options to "Add to Cline", "Explain with Cline", and "Improve with Cline"
|
||||
- Automatically focus Cline window after extension updates
|
||||
|
||||
## [3.16.1]
|
||||
|
||||
- Add Enable auto approve toggle switch, allowing users to easily turn auto-approve functionality on or off without losing their action settings
|
||||
- Improve Gemini retry handling with better UI feedback, showing retry progress during API request attempts
|
||||
- Fix memory leak issue that could occur during long sessions with multiple tasks
|
||||
- Improve UI for Gemini model retry attempts with clearer status updates
|
||||
- Fix quick actions functionality in auto-approve settings
|
||||
- Update UI styling for auto-approve menu items to conserve space
|
||||
|
||||
## [3.16.0]
|
||||
|
||||
- Add new workflow feature allowing users to create and manage workflow files that can be injected into conversations via slash commands
|
||||
- Add collapsible recent task list, allowing users to hide their task history when sharing their screen (Thanks @cosmix!)
|
||||
- Add global endpoint option for Vertex AI users, providing higher availability and reducing 429 errors (Thanks @soniqua!)
|
||||
- Add detection for new users to display special components and guidance
|
||||
- Add Tailwind CSS IntelliSense to the recommended extensions list
|
||||
- Fix eternal loading states when the last message is a checkpoint (Thanks @BarreiroT!)
|
||||
- Improve settings organization by migrating VSCode Advanced settings to Settings Webview
|
||||
|
||||
## [3.15.5]
|
||||
|
||||
- Fix inefficient memory management in the task timeline
|
||||
- Fix Gemini rate limitation response not being handled properly (Thanks @BarreiroT!)
|
||||
|
||||
## [3.15.4]
|
||||
|
||||
- Add gemini model back to vertex provider
|
||||
- Add gemini telemetry
|
||||
- Add filtering for tasks tied to the current workspace
|
||||
|
||||
## [3.15.3]
|
||||
|
||||
- Add Fireworks API Provider
|
||||
- Fix minor visual issues with auto-approve menu
|
||||
- Fix one instance of terminal not getting output
|
||||
- Fix 'Chrome was launched but debug port is not responding' error
|
||||
|
||||
## [3.15.2]
|
||||
|
||||
- Added details to auto approve menu and more sensible default controls
|
||||
- Add detailed configuration options for LiteLLM provider
|
||||
- Add webview telemetry for users who have opted in to telemetry
|
||||
- Update Gemini in OpenRouter/Cline providers to use implicit caching
|
||||
- Fix freezing issues during rendering of large streaming text
|
||||
- Fix grey screen webview crashes by releasing memory after every diff edit
|
||||
- Fix breaking out of diff auto-scroll
|
||||
- Fix IME composition Enter auto‑sending edited message
|
||||
|
||||
## [3.15.1]
|
||||
|
||||
- Fix bug where PowerShell commands weren't given enough time before giving up and showing an error
|
||||
|
||||
## [3.15.0]
|
||||
|
||||
- Add Task Timeline visualization to tasks (Thanks eomcaleb!)
|
||||
- Add cache to ui for OpenAi provider
|
||||
- Add FeatureFlagProvider service for the Node.js extension side
|
||||
- Add copy buttons to task header and assistant messages
|
||||
- Add a more simplified home header was added
|
||||
- Add ability to favorite a task, allowing it to be kept when clearing all tasks
|
||||
- Add npm script for issue creation (Thanks DaveFres!)
|
||||
- Add confirmation dialog to Delete All History button
|
||||
- Add ability to allow the user to type their next message into the chat while Cline is taking action
|
||||
- Add ability to generate commit message via cline (Thanks zapp88!)
|
||||
- Add improvements to caching for gemini models on OpenRouter and Cline providers
|
||||
- Add improvements to allow scrolling the file being edited.
|
||||
- Add ui for windsurf and cursor rules
|
||||
- Add mistral medium-3 model
|
||||
- Add option to collect events to send them in a bundle to avoid sending too many events
|
||||
- Add support to quote a previous message in chat
|
||||
- Add support for Gemini Implicit Caching
|
||||
- Add support for batch selection and deletion of tasks in history (Thanks danix800!)
|
||||
- Update change suggested models
|
||||
- Update fetch cache details from generation endpoint
|
||||
- Update converted docs to Mintlify
|
||||
- Update the isOminiModel to include o4-mini model (Thanks PeterDaveHello!)
|
||||
- Update file size that can be read by Cline, allowing larger files
|
||||
- Update defaults for bedrock API models (Thanks Watany!)
|
||||
- Update to extend ReasoningEffort to non-o3-mini reasoning models for all providers (Thanks PeterDaveHello!)
|
||||
- Update to give error when a user tries to upload an image larger than 7500x7500 pixels
|
||||
- Update announcement so that previous updates are in a dropdown
|
||||
- Update UI for auto approve with favorited settings
|
||||
- Fix bug where certain terminal commands would lock you out of a task
|
||||
- Fix only initialize posthog in the webview if the user has opted into telemetry
|
||||
- Fix bug where autocapture was on for front-end telemetry
|
||||
- Fix for markdown copy excessively escaping characters (Thanks weshoke!)
|
||||
- Fix an issue where loading never finished when using an application inference profile for the model ID (Thanks WinterYukky!)
|
||||
|
||||
## [3.14.1]
|
||||
|
||||
- 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 @withRetry() decoration syntax error when running extension locally (Thanks @DaveFres!)
|
||||
- Fix for git commit mentions in repos with no git commits
|
||||
- Fix cost calculation (Thanks @BarreiroT!)
|
||||
|
||||
## [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 Caching to gemini provider
|
||||
- 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
|
||||
@@ -18,7 +308,6 @@
|
||||
- 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
|
||||
|
||||
+87
-13
@@ -10,16 +10,77 @@ Bug reports help make Cline better for everyone! Before creating a new issue, pl
|
||||
🔐 <b>Important:</b> If you discover a security vulnerability, please use the <a href="https://github.com/cline/cline/security/advisories/new">Github security tool to report it privately</a>.
|
||||
</blockquote>
|
||||
|
||||
|
||||
## Before Contributing
|
||||
|
||||
All contributions must begin with a GitHub Issue, unless the change is for small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality.
|
||||
|
||||
- **Check existing issues**: Search [GitHub Issues](https://github.com/cline/cline/issues).
|
||||
- **Create an issue**: Use appropriate templates:
|
||||
- **Contributions:** Use the "Contribution Request" template to propose what you'd like to work on.
|
||||
- **Bugs:** "Bug Report" template for reporting issues.
|
||||
- **Features:** "Detailed Feature Proposal" template for suggesting new features.
|
||||
- **Wait for approval**: A core Cline contributor must approve your contribution request before you start implementation.
|
||||
- **Claim issues**: Once approved, the issue will be assigned to you.
|
||||
|
||||
**PRs without approved issues may be closed.**
|
||||
|
||||
|
||||
## Deciding What to Work On
|
||||
|
||||
Looking for a good first contribution? Check out issues labeled ["good first issue"](https://github.com/cline/cline/labels/good%20first%20issue) or ["help wanted"](https://github.com/cline/cline/labels/help%20wanted). These are specifically curated for new contributors and areas where we'd love some help!
|
||||
|
||||
We also welcome contributions to our [documentation](https://github.com/cline/cline/tree/main/docs)! Whether it's fixing typos, improving existing guides, or creating new educational content - we'd love to build a community-driven repository of resources that helps everyone get the most out of Cline. You can start by diving into `/docs` and looking for areas that need improvement.
|
||||
|
||||
If you're planning to work on a bigger feature, please create a [feature request](https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) first so we can discuss whether it aligns with Cline's vision.
|
||||
|
||||
## Development Setup
|
||||
|
||||
|
||||
### Local Development Instructions
|
||||
|
||||
1. Clone the repository _(Requires [git-lfs](https://git-lfs.com/))_:
|
||||
```bash
|
||||
git clone https://github.com/cline/cline.git
|
||||
```
|
||||
2. Open the project in VSCode:
|
||||
```bash
|
||||
code cline
|
||||
```
|
||||
3. Install the necessary dependencies for the extension and webview-gui:
|
||||
```bash
|
||||
npm run install:all
|
||||
```
|
||||
4. Launch by pressing `F5` (or `Run`->`Start Debugging`) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.)
|
||||
|
||||
|
||||
|
||||
|
||||
### Creating a Pull Request
|
||||
|
||||
1. Before creating a PR, generate a changeset entry:
|
||||
```bash
|
||||
npm run changeset
|
||||
```
|
||||
This will prompt you for:
|
||||
- Type of change (major, minor, patch)
|
||||
- `major` → breaking changes (1.0.0 → 2.0.0)
|
||||
- `minor` → new features (1.0.0 → 1.1.0)
|
||||
- `patch` → bug fixes (1.0.0 → 1.0.1)
|
||||
- Description of your changes
|
||||
|
||||
2. Commit your changes and the generated `.changeset` file
|
||||
|
||||
3. Push your branch and create a PR on GitHub. Our CI will:
|
||||
- Run tests and checks
|
||||
- Changesetbot will create a comment showing the version impact
|
||||
- When merged to main, changesetbot will create a Version Packages PR
|
||||
- When the Version Packages PR is merged, a new release will be published
|
||||
4. Testing
|
||||
- Run `npm run test` to run tests locally.
|
||||
- Before submitting PR, run `npm run format:fix` to format your code
|
||||
- Run `npm run test:ci` to run tests locally
|
||||
|
||||
### Extension
|
||||
|
||||
1. **VS Code Extensions**
|
||||
|
||||
- When opening the project, VS Code will prompt you to install recommended extensions
|
||||
@@ -29,23 +90,26 @@ If you're planning to work on a bigger feature, please create a [feature request
|
||||
2. **Local Development**
|
||||
- Run `npm run install:all` to install dependencies
|
||||
- Run `npm run test` to run tests locally
|
||||
- Run → Start Debugging or `>Debug: Select and Start Debugging` and wait for a new VS Code instance to open
|
||||
- Before submitting PR, run `npm run format:fix` to format your code
|
||||
|
||||
3. **Linux-specific Setup**
|
||||
VS Code extension tests on Linux require the following system libraries:
|
||||
|
||||
- `libatk1.0-0`
|
||||
- `dbus`
|
||||
- `libasound2`
|
||||
- `libatk-bridge2.0-0`
|
||||
- `libxkbfile1`
|
||||
- `libatk1.0-0`
|
||||
- `libdrm2`
|
||||
- `libgbm1`
|
||||
- `libgtk-3-0`
|
||||
- `libnss3`
|
||||
- `libx11-xcb1`
|
||||
- `libxcomposite1`
|
||||
- `libxdamage1`
|
||||
- `libxfixes3`
|
||||
- `libxkbfile1`
|
||||
- `libxrandr2`
|
||||
- `libgbm1`
|
||||
- `libdrm2`
|
||||
- `libgtk-3-0`
|
||||
- `dbus`
|
||||
- `xvfb`
|
||||
|
||||
These libraries provide necessary GUI components and system services for the test environment.
|
||||
@@ -54,13 +118,23 @@ If you're planning to work on a bigger feature, please create a [feature request
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install -y \
|
||||
libatk1.0-0 libatk-bridge2.0-0 libxkbfile1 libx11-xcb1 \
|
||||
libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 \
|
||||
libdrm2 libgtk-3-0 dbus xvfb
|
||||
dbus \
|
||||
libasound2 \
|
||||
libatk-bridge2.0-0 \
|
||||
libatk1.0-0 \
|
||||
libdrm2 \
|
||||
libgbm1 \
|
||||
libgtk-3-0 \
|
||||
libnss3 \
|
||||
libx11-xcb1 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxfixes3 \
|
||||
libxkbfile1 \
|
||||
libxrandr2 \
|
||||
xvfb
|
||||
```
|
||||
|
||||
- Run `npm run test:ci` to run tests locally
|
||||
|
||||
## Writing and Submitting Code
|
||||
|
||||
Anyone can contribute code to Cline, but we ask that you follow these guidelines to ensure your contributions can be smoothly integrated:
|
||||
|
||||
@@ -30,7 +30,7 @@ English | <a href="https://github.com/cline/cline/blob/main/locales/es/README.md
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Meet Cline, an AI assistant that can use your **CLI** a**N**d **E**ditor.
|
||||
Meet Cline (pronounced /klaɪn/, like "Klein"), an AI assistant that can use your **CLI** a**N**d **E**ditor.
|
||||
|
||||
Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthropic.com/claude/sonnet), Cline can handle complex software development tasks step-by-step. With tools that let him create & edit files, explore large projects, use the browser, and execute terminal commands (after you grant permission), he can assist you in ways that go beyond code completion or tech support. Cline can even use the Model Context Protocol (MCP) to create new tools and extend his own capabilities. While autonomous AI scripts traditionally run in sandboxed environments, this extension provides a human-in-the-loop GUI to approve every file change and terminal command, providing a safe and accessible way to explore the potential of agentic AI.
|
||||
|
||||
@@ -51,7 +51,7 @@ Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthrop
|
||||
|
||||
### Use any API and Model
|
||||
|
||||
Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, and GCP Vertex. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available.
|
||||
Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, GCP Vertex, and Cerebras. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available.
|
||||
|
||||
The extension also keeps track of total tokens and API usage cost for the entire task loop and individual requests, keeping you informed of spend every step of the way.
|
||||
|
||||
@@ -141,50 +141,6 @@ For example, when working with a local web server, you can use 'Restore Workspac
|
||||
|
||||
To contribute to the project, start with our [Contributing Guide](CONTRIBUTING.md) to learn the basics. You can also join our [Discord](https://discord.gg/cline) to chat with other contributors in the `#contributors` channel. If you're looking for full-time work, check out our open positions on our [careers page](https://cline.bot/join-us)!
|
||||
|
||||
<details>
|
||||
<summary>Local Development Instructions</summary>
|
||||
|
||||
1. Clone the repository _(Requires [git-lfs](https://git-lfs.com/))_:
|
||||
```bash
|
||||
git clone https://github.com/cline/cline.git
|
||||
```
|
||||
2. Open the project in VSCode:
|
||||
```bash
|
||||
code cline
|
||||
```
|
||||
3. Install the necessary dependencies for the extension and webview-gui:
|
||||
```bash
|
||||
npm run install:all
|
||||
```
|
||||
4. Launch by pressing `F5` (or `Run`->`Start Debugging`) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Creating a Pull Request</summary>
|
||||
|
||||
1. Before creating a PR, generate a changeset entry:
|
||||
```bash
|
||||
npm run changeset
|
||||
```
|
||||
This will prompt you for:
|
||||
- Type of change (major, minor, patch)
|
||||
- `major` → breaking changes (1.0.0 → 2.0.0)
|
||||
- `minor` → new features (1.0.0 → 1.1.0)
|
||||
- `patch` → bug fixes (1.0.0 → 1.0.1)
|
||||
- Description of your changes
|
||||
|
||||
2. Commit your changes and the generated `.changeset` file
|
||||
|
||||
3. Push your branch and create a PR on GitHub. Our CI will:
|
||||
- Run tests and checks
|
||||
- Changesetbot will create a comment showing the version impact
|
||||
- When merged to main, changesetbot will create a Version Packages PR
|
||||
- When the Version Packages PR is merged, a new release will be published
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[Apache 2.0 © 2025 Cline Bot Inc.](./LICENSE)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
version: v2
|
||||
modules:
|
||||
- path: proto
|
||||
name: cline/cline/lint
|
||||
|
||||
lint:
|
||||
use:
|
||||
- STANDARD
|
||||
|
||||
except: # Add exceptions for current patterns that contradict STANDARD settings
|
||||
- RPC_PASCAL_CASE # rpcs are camel case (start with lowercase)
|
||||
- PACKAGE_DIRECTORY_MATCH # the protos in the cline package are not in a dir named cline.
|
||||
- RPC_REQUEST_RESPONSE_UNIQUE # request messages are not unique.
|
||||
- RPC_REQUEST_STANDARD_NAME # request messages dont all end with Request
|
||||
- RPC_RESPONSE_STANDARD_NAME # response messages dont all end with Response
|
||||
- PACKAGE_VERSION_SUFFIX # package name does not contain version.
|
||||
- ENUM_VALUE_PREFIX # enum values dont start with the enum name.
|
||||
- ENUM_ZERO_VALUE_SUFFIX # first value does not have to be UNSPECIFIED.
|
||||
|
||||
# breaking:
|
||||
# use:
|
||||
# - WIRE_JSON # Detect changes that break the json wire format (this is the minimum recommended level.)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 902 B |
Binary file not shown.
|
After Width: | Height: | Size: 666 B |
+192
@@ -0,0 +1,192 @@
|
||||
{
|
||||
"$schema": "https://mintlify.com/docs.json",
|
||||
"theme": "linden",
|
||||
"name": "Cline",
|
||||
"description": "AI-powered coding assistant for VSCode",
|
||||
"colors": {
|
||||
"primary": "#9D4EDD",
|
||||
"light": "#F0E6FF",
|
||||
"dark": "#000000"
|
||||
},
|
||||
"logo": {
|
||||
"light": "/assets/robot_panel_light.png",
|
||||
"dark": "/assets/robot_panel_dark.png"
|
||||
},
|
||||
"favicon": {
|
||||
"light": "/assets/robot_panel_light.png",
|
||||
"dark": "/assets/robot_panel_dark.png"
|
||||
},
|
||||
"background": {
|
||||
"color": {
|
||||
"light": "#F0E6FF",
|
||||
"dark": "#000000"
|
||||
},
|
||||
"decoration": "gradient"
|
||||
},
|
||||
"styling": {
|
||||
"eyebrows": "breadcrumbs",
|
||||
"codeblocks": "system"
|
||||
},
|
||||
"appearance": {
|
||||
"default": "system",
|
||||
"strict": false
|
||||
},
|
||||
"fonts": {
|
||||
"family": "Roboto",
|
||||
"weight": 400
|
||||
},
|
||||
"navbar": {
|
||||
"links": [
|
||||
{
|
||||
"label": "GitHub",
|
||||
"href": "https://github.com/cline/cline"
|
||||
},
|
||||
{
|
||||
"label": "Discord",
|
||||
"href": "https://discord.gg/cline"
|
||||
}
|
||||
],
|
||||
"primary": {
|
||||
"type": "button",
|
||||
"label": "Install Cline",
|
||||
"href": "https://cline.bot/install?utm_source=website&utm_medium=header"
|
||||
}
|
||||
},
|
||||
"navigation": {
|
||||
"groups": [
|
||||
{
|
||||
"group": "Getting Started",
|
||||
"pages": [
|
||||
"getting-started/for-new-coders",
|
||||
"getting-started/installing-cline",
|
||||
"getting-started/installing-dev-essentials",
|
||||
"getting-started/model-selection-guide",
|
||||
"getting-started/our-favorite-tech-stack",
|
||||
"getting-started/task-management",
|
||||
"getting-started/understanding-context-management",
|
||||
"getting-started/what-is-cline"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Improving Your Prompting Skills",
|
||||
"pages": ["prompting/prompt-engineering-guide", "prompting/cline-memory-bank"]
|
||||
},
|
||||
{
|
||||
"group": "Features",
|
||||
"pages": [
|
||||
"features/auto-approve",
|
||||
"features/checkpoints",
|
||||
"features/cline-rules",
|
||||
"features/drag-and-drop",
|
||||
"features/plan-and-act",
|
||||
"features/slash-commands/workflows",
|
||||
"features/editing-messages",
|
||||
{
|
||||
"group": "@ Mentions",
|
||||
"pages": [
|
||||
"features/at-mentions/overview",
|
||||
"features/at-mentions/file-mentions",
|
||||
"features/at-mentions/terminal-mentions",
|
||||
"features/at-mentions/problem-mentions",
|
||||
"features/at-mentions/git-mentions",
|
||||
"features/at-mentions/url-mentions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Slash Commands",
|
||||
"pages": [
|
||||
"features/slash-commands/new-task",
|
||||
"features/slash-commands/new-rule",
|
||||
"features/slash-commands/smol",
|
||||
"features/slash-commands/report-bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Commands & Shortcuts",
|
||||
"pages": [
|
||||
"features/commands-and-shortcuts/overview",
|
||||
"features/commands-and-shortcuts/code-commands",
|
||||
"features/commands-and-shortcuts/terminal-integration",
|
||||
"features/commands-and-shortcuts/git-integration",
|
||||
"features/commands-and-shortcuts/keyboard-shortcuts"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Exploring Cline's Tools",
|
||||
"pages": [
|
||||
"exploring-clines-tools/cline-tools-guide",
|
||||
"exploring-clines-tools/new-task-tool",
|
||||
"exploring-clines-tools/remote-browser-support"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Enterprise Solutions",
|
||||
"pages": [
|
||||
"enterprise-solutions/cloud-provider-integration",
|
||||
"enterprise-solutions/custom-instructions",
|
||||
"enterprise-solutions/mcp-servers",
|
||||
"enterprise-solutions/security-concerns"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "MCP Servers",
|
||||
"pages": [
|
||||
"mcp/mcp-overview",
|
||||
"mcp/adding-mcp-servers-from-github",
|
||||
"mcp/configuring-mcp-servers",
|
||||
"mcp/connecting-to-a-remote-server",
|
||||
"mcp/mcp-marketplace",
|
||||
"mcp/mcp-server-development-protocol",
|
||||
"mcp/mcp-transport-mechanisms"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Provider Configuration",
|
||||
"pages": [
|
||||
"provider-config/anthropic",
|
||||
"provider-config/claude-code",
|
||||
"provider-config/aws-bedrock-with-credentials-authentication",
|
||||
"provider-config/aws-bedrock-with-profile-authentication",
|
||||
"provider-config/gcp-vertex-ai",
|
||||
"provider-config/litellm-and-cline-using-codestral",
|
||||
"provider-config/vscode-language-model-api",
|
||||
"provider-config/xai-grok",
|
||||
"provider-config/mistral-ai",
|
||||
"provider-config/deepseek",
|
||||
"provider-config/ollama",
|
||||
"provider-config/openai",
|
||||
"provider-config/openai-compatible",
|
||||
"provider-config/openrouter",
|
||||
"provider-config/requesty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Running Models Locally",
|
||||
"pages": [
|
||||
"running-models-locally/read-me-first",
|
||||
"running-models-locally/lm-studio",
|
||||
"running-models-locally/ollama"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "More Info",
|
||||
"pages": ["more-info/telemetry"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"footer": {
|
||||
"socials": {
|
||||
"x": "https://x.com/cline",
|
||||
"github": "https://github.com/cline/cline",
|
||||
"discord": "https://discord.gg/cline"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"prompt": "Search Cline documentation..."
|
||||
},
|
||||
"contextual": {
|
||||
"options": ["copy"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "Cloud Provider Integration"
|
||||
---
|
||||
|
||||
Cline supports major cloud providers like AWS Bedrock and Google's Cloud Vertex; whichever your team currently uses is appropriate, and there's no need to change providers to utilize Cline's features.
|
||||
|
||||
For the purpose of this document, we assume your organization will use cloud-based frontier models. Cloud inference providers offer cutting-edge capabilities and the flexibility to select models which best suit your needs.
|
||||
|
||||
Certain scenarios may warrant using local models, including handling highly sensitive data, applications requiring consistent low-latency responses, or compliance with strict data sovereignty requirements. If your team needs to utilize local models, see [Running Local Models ](/running-models-locally/read-me-first.mdx)with Cline.
|
||||
|
||||
---
|
||||
|
||||
## AWS Bedrock Setup Guides
|
||||
|
||||
#### [IAM Security Best Practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) (For administrators)
|
||||
|
||||
#### [AWS Bedrock setup for Legacy IAM (AWS Credentials)](/provider-config/aws-bedrock-with-credentials-authentication)
|
||||
|
||||
#### [AWS Bedrock setup for SSO token (AWS Profile)](/provider-config/aws-bedrock-with-profile-authentication)
|
||||
|
||||
#### VPC Endpoint Setup
|
||||
|
||||
To protect your team's data, Cline supports VPC (Virtual Private Cloud) endpoints, which create private connections between your data and AWS Bedrock. AWS VPCs enhance security by eliminating the need for public IP addresses, network gateways, or complex firewall rules—essentially creating a private highway for data that bypasses the public internet entirely. By keeping traffic within AWS's private network, teams also benefit from lower latency and more predictable performance when accessing services like AWS Bedrock or custom APIs. For those working with confidential information or operating in highly regulated industries like healthcare or finance, VPCs offers the perfect balance between the accessibility of cloud services and the security of private infrastructure.
|
||||
|
||||
---
|
||||
|
||||
1. Consult the [AWS guide](https://docs.aws.amazon.com/bedrock/latest/userguide/vpc-interface-endpoints.html) to creating VPC endpoints. This document specifies pre-requisites and describes the syntax used for creating VPC endpoints.
|
||||
2. Follow the directions for [creating a VPC endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html#create-interface-endpoint-aws) in the AWS console. The image below pertains to steps 4 and 5 of the AWS guide linked above.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/vpc-console.png" alt="VPC Console" />
|
||||
</Frame>
|
||||
|
||||
3. Note the IP address of your VPC endpoint, open Cline's settings menu, and select `AWS Bedrock`from the API Provider dropdown.
|
||||
4. Click the `Use Custom VPC endpoint`checkbox and enter the IP address of your VPC endpoint
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/vpc-settings-menu.png" alt="VPC Settings Menu" />
|
||||
</Frame>
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "Custom Instructions"
|
||||
---
|
||||
|
||||
## Building Custom Instructions for Teams
|
||||
|
||||
**Creating standardized project instructions ensures that all team members work within consistent guidelines. Start by documenting your project's technical foundation, then identify which information needs to be included in the instructions. The exact scope will vary depending on your team's needs, but generally it's best to provide as much information as possible. By creating comprehensive instructions that all team members follow, you establish a shared understanding of how code should be written, tested, and deployed across your project, resulting in more maintainable and consistent software.**
|
||||
|
||||
---
|
||||
|
||||
Here are a few topics and examples to consider for your team's custom instructions:
|
||||
|
||||
1. **Testing framework and specific commands**
|
||||
- "All components must include Jest tests with at least 85% coverage. Run tests using `npm run test:coverage` before submitting any pull request."
|
||||
2. **Explicit library preferences**
|
||||
- "Use React Query for data fetching and state management. Avoid Redux unless specifically required for complex global state. For styling, use Tailwind CSS with our custom theme configuration found in `src/styles/theme.js.`"
|
||||
3. **Where to find documentation**
|
||||
- "All API documentation is available in our internal Notion workspace under 'Engineering > API Reference'. For component usage examples, refer to our Storybook instance at `https://storybook.internal.company.com`"
|
||||
4. **Which MCP servers to use, and for which purposes**
|
||||
- "For database operations, use the Postgres MCP server with credentials stored in 1Password under 'Development > Database'. For deployments, use the AWS MCP server which requires the deployment role from IAM. Refer to `docs/mcp-setup.md` for configuration instructions."
|
||||
5. **Coding conventions specific to your project**
|
||||
- "Name all React components using PascalCase and all helper functions using camelCase. Place components in the `src/components` directory organized by feature, not by type. Always use TypeScript interfaces for prop definitions."
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "MCP Servers"
|
||||
---
|
||||
|
||||
**Model Context Protocol (MCP) servers expand Cline's capabilities by providing standardized access to external data sources and executable functions. By implementing MCP servers, LLM tools can dynamically retrieve and incorporate relevant information from both local and remote data sources. This capability ensures that the models operate with the most current and contextually appropriate data, improving the accuracy and relevance of their outputs.**
|
||||
|
||||
---
|
||||
|
||||
### Secure Architecture Fundamentals
|
||||
|
||||
MCP servers follow a client-server architecture where hosts (LLM applications like Cline) initiate connections through a transport layer to MCP servers. This architecture inherently provides security benefits as it maintains clear separation between components. Enterprise deployments should focus on the proper implementation of this architecture to ensure secure operations, particularly regarding the message exchange patterns and connection lifecycle management. For MCP architecture details, see [MCP Architecture](https://modelcontextprotocol.io/docs/concepts/architecture), and for latest specifications, see [MCP Specifications](https://spec.modelcontextprotocol.io/specification/2024-11-05/).
|
||||
|
||||
### Transport Layer Security
|
||||
|
||||
For enterprise environments, selecting the appropriate transport mechanism is crucial. While stdio transport works efficiently for local processes, HTTP with Server-Sent Events (SSE) transport requires additional security measures. TLS should be used for all remote connections whenever possible. This is especially important when MCP servers are deployed across different network segments within corporate infrastructure.
|
||||
|
||||
### Message Validation and Access Control
|
||||
|
||||
The MCP architecture defines standard error codes and message types (Requests, Results, Errors, and Notifications), providing a structured framework for secure communication. Security teams should consider message validation, sanitizing inputs, checking message size limits, and verifying JSON-RPC format. Additionally, implementing resource protection through access controls, path validation, and request rate limiting helps prevent potential abuse of MCP server capabilities.
|
||||
|
||||
### Monitoring and Compliance
|
||||
|
||||
For enterprise compliance requirements, implementing comprehensive logging of protocol events, message flows, and errors is essential. The MCP architecture supports diagnostic capabilities including health checks, connection state monitoring, and resource usage tracking. Organizations should extend these capabilities to meet their specific compliance needs, particularly for audit trails of all MCP server interactions and resource access patterns.
|
||||
|
||||
By leveraging the client-server design of the MCP architecture and implementing appropriate security controls at each layer, enterprises can safely integrate MCP servers into their environments while maintaining their security posture and meeting regulatory requirements.
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
title: "Security Concerns"
|
||||
---
|
||||
|
||||
## Enterprise Security with Cline
|
||||
|
||||
#### Cline addresses enterprise security concerns through its unique client-side architecture that prioritizes data privacy, secure cloud integration, and transparent operations. Below is a comprehensive overview of how Cline maintains robust security measures for enterprise environments.
|
||||
|
||||
---
|
||||
|
||||
### Client-Side Architecture
|
||||
|
||||
Cline operates exclusively as a client-side VSCode extension with zero server-side components. This fundamental design choice ensures that your code and data remain within your secure environment at all times. Unlike traditional AI assistants that send data to external servers for processing, Cline connects directly to your chosen cloud provider's AI endpoints, keeping all sensitive information within your infrastructure boundaries.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/cline-arch.png"
|
||||
alt="Cline's relationship to local and remote assets"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
### Data Privacy Commitment
|
||||
|
||||
Cline implements a strict zero data retention policy, meaning your intellectual property never leaves your secure environment. The extension does not collect, store, or transmit your code to any central servers. This approach significantly reduces potential attack vectors that might otherwise be introduced through data transmission to third-party systems. Telemetry collection is optional and requires explicit consent.
|
||||
|
||||
### Cloud Provider Integration
|
||||
|
||||
Enterprise teams can access cutting-edge AI models through their existing cloud deployments. Cline supports seamless integration with:
|
||||
|
||||
- AWS Bedrock
|
||||
- Google Cloud Vertex AI
|
||||
- Microsoft Azure
|
||||
|
||||
These integrations utilize your organization's existing security credentials, including native IAM role assumption for AWS. This ensures that all AI processing occurs within your corporate cloud environment, maintaining compliance with your established security protocols.
|
||||
|
||||
### Open-Source Transparency
|
||||
|
||||
Cline's codebase is completely open-source, allowing for comprehensive security auditing by your internal teams. This transparency enables security professionals to verify exactly how the extension functions and confirm that it adheres to your organization's security requirements. Organizations can review the code to ensure it aligns with their security policies before deployment.
|
||||
|
||||
### Controlled Modifications
|
||||
|
||||
The extension implements safeguards against unauthorized changes to your codebase. Cline requires explicit user approval for all file modifications and terminal commands, preventing accidental or unwanted alterations. This approval-based workflow maintains the integrity of your projects while still providing AI assistance.
|
||||
|
||||
### Enterprise Deployment Support
|
||||
|
||||
For organizations with strict security review processes, Cline provides comprehensive documentation including detailed deployment diagrams, sequence diagrams illustrating all data flows, and complete security posture documentation. These materials facilitate thorough security reviews and help demonstrate compliance with enterprise data handling standards and regulations.
|
||||
|
||||
### Access Control
|
||||
|
||||
Enterprise editions of Cline (planned for Q2 2025) will include centralized administration features that allow organizations to:
|
||||
|
||||
- Manage user access with customizable permission levels
|
||||
- Provision accounts with corporate credentials
|
||||
- Immediately revoke access when needed
|
||||
- Control which AI providers and LLM endpoints can be used
|
||||
- Deploy standardized settings across the organization
|
||||
- Prevent unauthorized use of personal API keys
|
||||
|
||||
### Compliance and Governance
|
||||
|
||||
Cline's architecture supports compliance with data sovereignty requirements and enterprise data handling regulations. The planned Enterprise Complete edition will further enhance governance with detailed audit logging, compliance reporting, and automated policy enforcement mechanisms.
|
||||
|
||||
By combining client-side processing, direct cloud provider integration, and transparent operations, Cline offers enterprise teams a secure way to leverage AI assistance while maintaining strict control over their sensitive code and data.
|
||||
@@ -0,0 +1,139 @@
|
||||
---
|
||||
title: "Cline Tools Reference Guide"
|
||||
---
|
||||
|
||||
## What Can Cline Do?
|
||||
|
||||
Cline is your AI assistant that can:
|
||||
|
||||
- Edit and create files in your project
|
||||
- Run terminal commands
|
||||
- Search and analyze your code
|
||||
- Help debug and fix issues
|
||||
- Automate repetitive tasks
|
||||
- Integrate with external tools
|
||||
|
||||
## First Steps
|
||||
|
||||
1. **Start a Task**
|
||||
|
||||
- Type your request in the chat
|
||||
- Example: "Create a new React component called Header"
|
||||
|
||||
2. **Provide Context**
|
||||
|
||||
- Use @ mentions to add files, folders, or URLs
|
||||
- Example: "@file:src/components/App.tsx"
|
||||
|
||||
3. **Review Changes**
|
||||
- Cline will show diffs before making changes
|
||||
- You can edit or reject changes
|
||||
|
||||
## Key Features
|
||||
|
||||
1. **File Editing**
|
||||
|
||||
- Create new files
|
||||
- Modify existing code
|
||||
- Search and replace across files
|
||||
|
||||
2. **Terminal Commands**
|
||||
|
||||
- Run npm commands
|
||||
- Start development servers
|
||||
- Install dependencies
|
||||
|
||||
3. **Code Analysis**
|
||||
|
||||
- Find and fix errors
|
||||
- Refactor code
|
||||
- Add documentation
|
||||
|
||||
4. **Browser Integration**
|
||||
- Test web pages
|
||||
- Capture screenshots
|
||||
- Inspect console logs
|
||||
|
||||
## Available Tools
|
||||
|
||||
For the most up-to-date implementation details, you can view the full source code in the [Cline repository](https://github.com/cline/cline/blob/main/src/core/Cline.ts).
|
||||
|
||||
Cline has access to the following tools for various tasks:
|
||||
|
||||
1. **File Operations**
|
||||
|
||||
- `write_to_file`: Create or overwrite files
|
||||
- `read_file`: Read file contents
|
||||
- `replace_in_file`: Make targeted edits to files
|
||||
- `search_files`: Search files using regex
|
||||
- `list_files`: List directory contents
|
||||
|
||||
2. **Terminal Operations**
|
||||
|
||||
- `execute_command`: Run CLI commands
|
||||
- `list_code_definition_names`: List code definitions
|
||||
|
||||
3. **MCP Tools**
|
||||
|
||||
- `use_mcp_tool`: Use tools from MCP servers
|
||||
- `access_mcp_resource`: Access MCP server resources
|
||||
- Users can create custom MCP tools that Cline can then access
|
||||
- Example: Create a weather API tool that Cline can use to fetch forecasts
|
||||
|
||||
4. **Interaction Tools**
|
||||
- `ask_followup_question`: Ask user for clarification
|
||||
- `attempt_completion`: Present final results
|
||||
|
||||
Each tool has specific parameters and usage patterns. Here are some examples:
|
||||
|
||||
- Create a new file (write_to_file):
|
||||
|
||||
```xml
|
||||
<write_to_file>
|
||||
<path>src/components/Header.tsx</path>
|
||||
<content>
|
||||
// Header component code
|
||||
</content>
|
||||
</write_to_file>
|
||||
```
|
||||
|
||||
- Search for a pattern (search_files):
|
||||
|
||||
```xml
|
||||
<search_files>
|
||||
<path>src</path>
|
||||
<regex>function\s+\w+\(</regex>
|
||||
<file_pattern>*.ts</file_pattern>
|
||||
</search_files>
|
||||
```
|
||||
|
||||
- Run a command (execute_command):
|
||||
```xml
|
||||
<execute_command>
|
||||
<command>npm install axios</command>
|
||||
<requires_approval>false</requires_approval>
|
||||
</execute_command>
|
||||
```
|
||||
|
||||
## Common Tasks
|
||||
|
||||
1. **Create a New Component**
|
||||
|
||||
- "Create a new React component called Footer"
|
||||
|
||||
2. **Fix a Bug**
|
||||
|
||||
- "Fix the error in src/utils/format.ts"
|
||||
|
||||
3. **Refactor Code**
|
||||
|
||||
- "Refactor the Button component to use TypeScript"
|
||||
|
||||
4. **Run Commands**
|
||||
- "Run npm install to add axios"
|
||||
|
||||
## Getting Help
|
||||
|
||||
- [Join the Discord community](https://discord.gg/cline)
|
||||
- Check the documentation
|
||||
- Provide feedback to improve Cline
|
||||
@@ -0,0 +1,386 @@
|
||||
---
|
||||
title: "New Task Tool"
|
||||
---
|
||||
|
||||
### The `new_task` Tool & Context Management Strategies
|
||||
|
||||
#### Overview
|
||||
|
||||
Cline includes a powerful internal tool, `new_task`, designed to help manage workflow continuity and context preservation, especially during complex or long-running tasks. This tool, combined with Cline's awareness of its own context window usage and the flexibility of `.clinerules`, enables sophisticated strategies for breaking down work and ensuring seamless transitions between task sessions.
|
||||
|
||||
Understanding the core capabilities and how they interact with custom rules is key to leveraging this feature effectively.
|
||||
|
||||
#### Core Capabilities
|
||||
|
||||
Two fundamental capabilities enable advanced context management:
|
||||
|
||||
1. **The `new_task` Tool:**
|
||||
- **Function:** Allows Cline, upon user approval, to end the current task session and immediately start a new one.
|
||||
- **Context Preloading:** Crucially, Cline can **preload** this new task session with specific context provided within the tool's `<context>` block. This context can be anything Cline or a `.clinerules` file defines – summaries, code snippets, next steps, project state, etc.
|
||||
2. **Context Window Awareness:**
|
||||
- **Tracking:** Cline internally tracks the percentage of its available context window currently being used during a task.
|
||||
- **Visibility:** This information is visible in the `environment_details` provided to Cline in its prompt.
|
||||
|
||||
#### Using the `/newtask` Slash Command
|
||||
|
||||
As a quick alternative to Cline suggesting the `newtask` tool or defining complex rules, you can directly initiate the process using a Slash Command.
|
||||
|
||||
- **How:** Simply type `/newtask` in the chat input field.
|
||||
- **Action:** Cline will propose creating a new task, typically suggesting context based on the current session (similar to its default behavior when using the tool). You will still get the `ask_followup_question` prompt to confirm and potentially modify the context before the new task is created.
|
||||
- **Benefit:** Provides a fast, user-initiated way to leverage the `new_task` functionality for branching explorations or managing long sessions without waiting for Cline to suggest it.
|
||||
|
||||
<Note>
|
||||
For more details on using the `/newtask` slash command, see the [New Task Command](/features/slash-commands/new-task)
|
||||
documentation.
|
||||
</Note>
|
||||
|
||||
#### Default Behavior (Without `.clinerules`)
|
||||
|
||||
By default, without specific `.clinerules` dictating its behavior:
|
||||
|
||||
- **Tool Availability:** The `new_task` tool exists, and Cline _can_ choose to use it.
|
||||
- **Context Awareness:** Cline _is_ aware of its context usage percentage.
|
||||
- **No Automatic Trigger:** Cline **will not** automatically initiate a task handoff _solely_ based on context usage reaching a specific percentage (like 50%). The decision to suggest using `new_task` comes from the AI model's reasoning based on the overall task progress and prompt instructions.
|
||||
- **Basic Context Preloading:** If `new_task` is used without specific rules defining the `<context>` block structure, Cline will attempt to preload relevant information based on its current understanding (e.g., a basic summary of progress and next steps), but this may be less comprehensive than a rule-driven approach.
|
||||
|
||||
#### The Power of `.clinerules`: Enabling Custom Workflows
|
||||
|
||||
While the core capabilities exist by default, the true power, automation, and customization emerge when you combine `new_task` and context awareness with custom workflows defined in `.clinerules`. This allows you to precisely control _when_ and _how_ Cline manages context and task continuity.
|
||||
|
||||
Key benefits of using `.clinerules` with `new_task`:
|
||||
|
||||
- **Automated Context Management:** Define rules to automatically trigger handoffs at specific context percentages (e.g., >50%, >70%) or token counts, ensuring optimal performance and preventing context loss.
|
||||
- **Model-Specific Optimization:** Tailor handoff triggers based on known thresholds for different LLMs (e.g., trigger earlier for models known to degrade past a certain token count).
|
||||
- **Intelligent Breakpoints:** Instruct Cline via rules to find logical stopping points (e.g., after completing a function or test) _after_ a context threshold is passed, ensuring cleaner handoffs.
|
||||
- **Structured Task Decomposition:** Use Plan Mode to define subtasks, then use `.clinerules` to have Cline automatically create a new task via `new_task` upon completing each subtask, preloading the context for the _next_ subtask.
|
||||
- **Custom Context Packaging:** Mandate the exact structure and content of the `<context>` block in `.clinerules` for highly detailed and consistent handoffs (see example below).
|
||||
- **Improved Memory Persistence:** Use `new_task` context blocks as a primary, integrated way to persist information across sessions, potentially replacing or supplementing file-based memory systems.
|
||||
- **Workflow Automation:** Define rules for specific scenarios, like always preloading certain setup instructions or project boilerplate when starting tasks of a particular type.
|
||||
|
||||
#### Example Rule-Driven Workflow: Task Handoff Process
|
||||
|
||||
A common workflow, **driven by specific `.clinerules` like the example below**, involves these steps:
|
||||
|
||||
1. **Trigger Identification (Rule-Based):** Cline monitors for handoff points defined in the rules (e.g., context usage > 50%, task completion).
|
||||
2. **User Confirmation:** Cline uses `ask_followup_question` to propose creating a new task, often showing the intended context defined by the rules.
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>I've completed [specific accomplishment] and context usage is high (XX%). Would you like me to create a new task to continue with [remaining work], preloading the following context?</question>
|
||||
<options>["Yes, create new task", "Modify context first", "No, continue this session"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
3. **User Control:** You can approve, deny, or ask Cline to modify the context before the new task is created.
|
||||
4. **Context Packaging (`new_task` Tool):** If approved, Cline uses `new_task`, packaging the context according to the structure mandated by the `.clinerules`.
|
||||
5. **New Task Creation:** The current task ends, and a new session begins immediately, preloaded with the specified context.
|
||||
|
||||
#### The Handoff Context Block (Rule-Defined Structure)
|
||||
|
||||
The effectiveness of rule-driven handoffs depends heavily on how `.clinerules` define the `<context>` block. A comprehensive structure often includes:
|
||||
|
||||
- **`## Completed Work`**: Detailed list of accomplishments, files modified/created, key decisions.
|
||||
- **`## Current State`**: Project status, running processes, key file states.
|
||||
- **`## Next Steps`**: Clear, prioritized list of remaining tasks, implementation details, known challenges.
|
||||
- **`## Reference Information`**: Links, code snippets, patterns, user preferences.
|
||||
- **Actionable Start:** A clear instruction for the immediate next action.
|
||||
|
||||
#### Potential Use Cases & Workflows
|
||||
|
||||
The flexibility of `new_task` combined with `.clinerules` opens up many possibilities:
|
||||
|
||||
- **Proactive Context Window Management:** Automatically trigger handoffs at specific percentages (e.g., 50%, 70%) or token counts to maintain optimal performance.
|
||||
- **Intelligent Breakpoints:** Instruct Cline to find logical stopping points (e.g., after completing a function or test) _after_ a context threshold is passed, ensuring cleaner handoffs.
|
||||
- **Structured Task Decomposition:** Use Plan Mode to define subtasks, then use `.clinerules` to have Cline automatically create a new task via `new_task` upon completing each subtask.
|
||||
- **Automated Session Summaries:** Configure the `<context>` block to always include a summary of the previous session's key discussion points.
|
||||
- **Preloading Boilerplate/Setup:** Start new tasks related to specific projects preloaded with standard setup instructions or file templates.
|
||||
- **"Memory Bank" Alternative:** Use `new_task` context blocks as the primary way to persist information across sessions, potentially replacing file-based memory systems.
|
||||
|
||||
Experimenting with `.clinerules` is encouraged to discover workflows that best suit your needs!
|
||||
|
||||
#### Example `.clinerules`: Task Handoff Strategy Guide
|
||||
|
||||
Below is an example `.clinerules` file focused specifically on using `new_task` for context window management. **Remember, this is just one specific strategy; the core `new_task` tool can be used differently with other custom rules.**
|
||||
|
||||
````markdown
|
||||
# You MUST use the `new_task` tool: Task Handoff Strategy Guide
|
||||
|
||||
**⚠️ CRITICAL INSTRUCTIONS - YOU MUST FOLLOW THESE GUIDELINES ⚠️**
|
||||
|
||||
This guide provides **MANDATORY** instructions for effectively breaking down complex tasks and implementing a smooth handoff process between tasks. You **MUST** follow these guidelines to ensure continuity, context preservation, and efficient task completion.
|
||||
|
||||
## ⚠️ CONTEXT WINDOW MONITORING - MANDATORY ACTION REQUIRED ⚠️
|
||||
|
||||
You **MUST** monitor the context window usage displayed in the environment details. When usage exceeds 50% of the available context window, you **MUST** initiate a task handoff using the `new_task` tool.
|
||||
|
||||
Example of context window usage over 50% with a 200K context window:
|
||||
|
||||
\`\`\`text
|
||||
|
||||
# Context Window Usage
|
||||
|
||||
105,000 / 200,000 tokens (53%)
|
||||
Model: anthropic/claude-sonnet-4 (200K context window)
|
||||
\`\`\`
|
||||
|
||||
**IMPORTANT**: When you see context window usage at or above 50%, you MUST:
|
||||
|
||||
1. Complete your current logical step
|
||||
2. Use the `ask_followup_question` tool to offer creating a new task
|
||||
3. If approved, use the `new_task` tool with comprehensive handoff instructions
|
||||
|
||||
## Task Breakdown in Plan Mode - REQUIRED PROCESS
|
||||
|
||||
Plan Mode is specifically designed for analyzing complex tasks and breaking them into manageable subtasks. When in Plan Mode, you **MUST**:
|
||||
|
||||
### 1. Initial Task Analysis - REQUIRED
|
||||
|
||||
- **MUST** begin by thoroughly understanding the full scope of the user's request
|
||||
- **MUST** identify all major components and dependencies of the task
|
||||
- **MUST** consider potential challenges, edge cases, and prerequisites
|
||||
|
||||
### 2. Strategic Task Decomposition - REQUIRED
|
||||
|
||||
- **MUST** break the overall task into logical, discrete subtasks
|
||||
- **MUST** prioritize subtasks based on dependencies (what must be completed first)
|
||||
- **MUST** aim for subtasks that can be completed within a single session (15-30 minutes of work)
|
||||
- **MUST** consider natural breaking points where context switching makes sense
|
||||
|
||||
### 3. Creating a Task Roadmap - REQUIRED
|
||||
|
||||
- **MUST** present a clear, numbered list of subtasks to the user
|
||||
- **MUST** explain dependencies between subtasks
|
||||
- **MUST** provide time estimates for each subtask when possible
|
||||
- **MUST** use Mermaid diagrams to visualize task flow and dependencies when helpful
|
||||
|
||||
\`\`\`mermaid
|
||||
graph TD
|
||||
A[Main Task] --> B[Subtask 1: Setup]
|
||||
A --> C[Subtask 2: Core Implementation]
|
||||
A --> D[Subtask 3: Testing]
|
||||
A --> E[Subtask 4: Documentation]
|
||||
B --> C
|
||||
C --> D
|
||||
\`\`\`
|
||||
|
||||
### 4. Getting User Approval - REQUIRED
|
||||
|
||||
- **MUST** ask for user feedback on the proposed task breakdown
|
||||
- **MUST** adjust the plan based on user priorities or additional requirements
|
||||
- **MUST** confirm which subtask to begin with
|
||||
- **MUST** request the user to toggle to Act Mode when ready to implement
|
||||
|
||||
## Task Implementation and Handoff Process - MANDATORY PROCEDURES
|
||||
|
||||
When implementing tasks in Act Mode, you **MUST** follow these guidelines for effective task handoff:
|
||||
|
||||
### 1. Focused Implementation - REQUIRED
|
||||
|
||||
- **MUST** focus on completing the current subtask fully
|
||||
- **MUST** document progress clearly through comments and commit messages
|
||||
- **MUST** create checkpoints at logical completion points
|
||||
|
||||
### 2. Recognizing Completion Points - CRITICAL
|
||||
|
||||
You **MUST** identify natural handoff points when:
|
||||
|
||||
- The current subtask is fully completed
|
||||
- You've reached a logical stopping point in a larger subtask
|
||||
- The implementation is taking longer than expected and can be continued later
|
||||
- The task scope has expanded beyond the original plan
|
||||
- **CRITICAL**: The context window usage exceeds 50% (e.g., 100,000+ tokens for a 200K context window)
|
||||
|
||||
### 3. Initiating the Handoff Process - MANDATORY ACTION
|
||||
|
||||
When you've reached a completion point, you **MUST**:
|
||||
|
||||
1. Summarize what has been accomplished so far
|
||||
2. Clearly state what remains to be done
|
||||
3. **MANDATORY**: Use the `ask_followup_question` tool to offer creating a new task:
|
||||
|
||||
\`\`\`xml
|
||||
<ask_followup_question>
|
||||
<question>I've completed [specific accomplishment]. Would you like me to create a new task to continue with [remaining work]?</question>
|
||||
<options>["Yes, create a new task", "No, continue in this session", "Let me think about it"]</options>
|
||||
</ask_followup_question>
|
||||
\`\`\`
|
||||
|
||||
### 4. Creating a New Task with Context - REQUIRED ACTION
|
||||
|
||||
If the user agrees to create a new task, you **MUST** use the `new_task` tool with comprehensive handoff instructions:
|
||||
|
||||
\`\`\`xml
|
||||
<new_task>
|
||||
<context>
|
||||
|
||||
# Task Continuation: [Brief Task Title]
|
||||
|
||||
## Completed Work
|
||||
|
||||
- [Detailed list of completed items]
|
||||
- [Include specific files modified/created]
|
||||
- [Note any important decisions made]
|
||||
|
||||
## Current State
|
||||
|
||||
- [Description of the current state of the project]
|
||||
- [Any running processes or environment setup]
|
||||
- [Key files and their current state]
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Detailed list of remaining tasks]
|
||||
- [Specific implementation details to address]
|
||||
- [Any known challenges to be aware of]
|
||||
|
||||
## Reference Information
|
||||
|
||||
- [Links to relevant documentation]
|
||||
- [Important code snippets or patterns to follow]
|
||||
- [Any user preferences noted during the current session]
|
||||
|
||||
Please continue the implementation by [specific next action].
|
||||
</context>
|
||||
</new_task>
|
||||
\`\`\`
|
||||
|
||||
### 5. Detailed Context Transfer - MANDATORY COMPONENTS
|
||||
|
||||
When creating a new task, you **MUST** always include:
|
||||
|
||||
#### Project Context - REQUIRED
|
||||
|
||||
- **MUST** include the overall goal and purpose of the project
|
||||
- **MUST** include key architectural decisions and patterns
|
||||
- **MUST** include technology stack and dependencies
|
||||
|
||||
#### Implementation Details - REQUIRED
|
||||
|
||||
- **MUST** list files created or modified in the current session
|
||||
- **MUST** describe specific functions, classes, or components implemented
|
||||
- **MUST** explain design patterns being followed
|
||||
- **MUST** outline testing approach
|
||||
|
||||
#### Progress Tracking - REQUIRED
|
||||
|
||||
- **MUST** provide checklist of completed items
|
||||
- **MUST** provide checklist of remaining items
|
||||
- **MUST** note any blockers or challenges encountered
|
||||
|
||||
#### User Preferences - REQUIRED
|
||||
|
||||
- **MUST** note coding style preferences mentioned by the user
|
||||
- **MUST** document specific approaches requested by the user
|
||||
- **MUST** highlight priority areas identified by the user
|
||||
|
||||
## Best Practices for Effective Handoffs - MANDATORY GUIDELINES
|
||||
|
||||
### 1. Maintain Continuity - REQUIRED
|
||||
|
||||
- **MUST** use consistent terminology between tasks
|
||||
- **MUST** reference previous decisions and their rationale
|
||||
- **MUST** maintain the same architectural approach unless explicitly changing direction
|
||||
|
||||
### 2. Preserve Context - REQUIRED
|
||||
|
||||
- **MUST** include relevant code snippets in the handoff
|
||||
- **MUST** summarize key discussions from the previous session
|
||||
- **MUST** reference specific files and line numbers when applicable
|
||||
|
||||
### 3. Set Clear Next Actions - REQUIRED
|
||||
|
||||
- **MUST** begin the handoff with a clear, actionable next step
|
||||
- **MUST** prioritize remaining tasks
|
||||
- **MUST** highlight any decisions that need to be made
|
||||
|
||||
### 4. Document Assumptions - REQUIRED
|
||||
|
||||
- **MUST** clearly state any assumptions made during implementation
|
||||
- **MUST** note areas where user input might be needed
|
||||
- **MUST** identify potential alternative approaches
|
||||
|
||||
### 5. Optimize for Resumability - REQUIRED
|
||||
|
||||
- **MUST** structure the handoff so the next session can begin working immediately
|
||||
- **MUST** include setup instructions if environment configuration is needed
|
||||
- **MUST** provide a quick summary at the top for rapid context restoration
|
||||
|
||||
## Example Task Handoff
|
||||
|
||||
### Example #1 of an effective task handoff:
|
||||
|
||||
\`\`\`xml
|
||||
<new_task>
|
||||
<context>
|
||||
|
||||
# Task Continuation: Implement User Authentication System
|
||||
|
||||
## Completed Work
|
||||
|
||||
- Created basic Express.js server structure
|
||||
- Implemented MongoDB connection and user schema
|
||||
- Completed user registration endpoint with password hashing
|
||||
- Added input validation using Joi
|
||||
- Created initial test suite for registration endpoint
|
||||
|
||||
## Current State
|
||||
|
||||
- Server runs successfully on port 3000
|
||||
- MongoDB connection is established
|
||||
- Registration endpoint (/api/users/register) is fully functional
|
||||
- Test suite passes for all registration scenarios
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Implement login endpoint (/api/users/login)
|
||||
- Use bcrypt to compare passwords
|
||||
- Generate JWT token upon successful login
|
||||
- Add proper error handling for invalid credentials
|
||||
2. Create authentication middleware
|
||||
- Verify JWT tokens
|
||||
- Extract user information
|
||||
- Handle expired tokens
|
||||
3. Add protected routes that require authentication
|
||||
4. Implement password reset functionality
|
||||
|
||||
## Reference Information
|
||||
|
||||
- JWT secret should be stored in .env file
|
||||
- Follow the existing error handling pattern in routes/users.js
|
||||
- User schema is defined in models/User.js
|
||||
- Test patterns are established in tests/auth.test.js
|
||||
|
||||
Please continue by implementing the login endpoint following the same patterns established in the registration endpoint.
|
||||
</context>
|
||||
</new_task>
|
||||
\`\`\`
|
||||
|
||||
### Example #2 of an ineffective task handoff:
|
||||
|
||||
_(Note: The example provided in the original rules showing "YOLO MODE Implementation" seems less like a direct handoff context block and more like a general status update with future considerations. A true ineffective handoff might lack detail in 'Current State' or 'Next Steps')._
|
||||
|
||||
## When to Use Task Handoffs - MANDATORY TRIGGERS
|
||||
|
||||
You **MUST** initiate task handoffs in these scenarios:
|
||||
|
||||
1. **CRITICAL**: When context window usage exceeds 50% (e.g., 100,000+ tokens for a 200K context window)
|
||||
2. **Long-running projects** that exceed a single session
|
||||
3. **Complex implementations** with multiple distinct phases
|
||||
4. **When context window limitations** are approaching
|
||||
5. **When switching focus areas** within a larger project
|
||||
6. **When different expertise** might be beneficial for different parts of the task
|
||||
|
||||
**⚠️ FINAL REMINDER - CRITICAL INSTRUCTION ⚠️**
|
||||
|
||||
You **MUST** monitor the context window usage in the environment details section. When it exceeds 50% (e.g., "105,000 / 200,000 tokens (53%)"), you **MUST** proactively initiate the task handoff process using the `ask_followup_question` tool followed by the `new_task` tool. You MUST use the `new_task` tool.
|
||||
|
||||
By strictly following these guidelines, you'll ensure smooth transitions between tasks, maintain project momentum, and provide the best possible experience for users working on complex, multi-session projects.
|
||||
|
||||
```markdown
|
||||
## User Interaction & Workflow Considerations
|
||||
|
||||
- **Linear Flow:** Currently, using `new_task` creates a linear sequence. The old task ends, and the new one begins. The old task history remains accessible for backtracking.
|
||||
- **User Approval:** You always have control, approving the handoff and having the chance to modify the context Cline proposes to carry forward.
|
||||
- **Flexibility:** The core `new_task` tool is a flexible building block. Experiment with `.clinerules` to create workflows that best suit your needs, whether for strict context management, task decomposition, or other creative uses.
|
||||
```
|
||||
````
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
title: "Remote Browser Support"
|
||||
description: "Remote browser support allows Cline to utilize a remote Chrome instance, leveraging authentication tokens and session cookies relevant to certain web development test cases."
|
||||
icon: globe-pointer
|
||||
---
|
||||
|
||||
The Remote Browser feature in Cline allows the AI assistant to interact with web content directly through a controlled browser instance. This enables several powerful capabilities:
|
||||
|
||||
- Viewing and interacting with websites
|
||||
- Testing locally running web applications
|
||||
- Monitoring console logs and errors
|
||||
- Performing browser actions like clicking, typing, and scrolling
|
||||
|
||||
## Remote Browser in Cline
|
||||
|
||||
### What is Remote Browser?
|
||||
|
||||
Remote Browser allows Cline to view and interact with websites directly. This feature enables Cline to:
|
||||
|
||||
- Visit websites and view their content
|
||||
- Test your locally running web applications
|
||||
- Fill out forms and click on elements
|
||||
- Capture screenshots of what it sees
|
||||
- Scroll through pages to see more content
|
||||
|
||||
### How to Use Remote Browser
|
||||
|
||||
#### Basic Commands
|
||||
|
||||
You can ask Cline to use the browser with simple instructions:
|
||||
|
||||
- **Open a website**: "Use the browser to check the website at [https://example.com](https://example.com/)"
|
||||
- **Click on elements**: "Click the login button"
|
||||
- **Type text**: "Type 'Hello world' in the search box"
|
||||
- **Scroll the page**: "Scroll down to see more content"
|
||||
- **Close the browser**: "Close the browser now"
|
||||
|
||||
#### Example Workflows
|
||||
|
||||
**Testing a Web Application:**
|
||||
|
||||
```javascript
|
||||
Can you start my React app with "npm start" and then check if it's working properly at http://localhost:3000?
|
||||
```
|
||||
|
||||
**Analyzing a Website:**
|
||||
|
||||
```javascript
|
||||
Can you visit https://example.com and tell me what you think about its design and layout?
|
||||
```
|
||||
|
||||
**Filling Out a Form:**
|
||||
|
||||
```javascript
|
||||
Please go to https://example.com/contact, fill out the contact form with some test data, and submit it.
|
||||
```
|
||||
|
||||
### Important Things to Know
|
||||
|
||||
#### One Browser at a Time
|
||||
|
||||
Cline can only use one browser at a time. If you want to visit a different website, you can either:
|
||||
|
||||
- Ask Cline to navigate to a new URL within the same browser session
|
||||
- Ask Cline to close the current browser and open a new one
|
||||
|
||||
#### Browser Must Be Closed Before Using Other Tools
|
||||
|
||||
If you want Cline to edit files or run commands after using the browser, you must first ask it to close the browser:
|
||||
|
||||
```javascript
|
||||
Close the browser and then update the CSS file to fix the alignment issue we saw.
|
||||
```
|
||||
|
||||
#### What Cline Sees
|
||||
|
||||
The browser has a fixed viewport size (900x600 pixels by default), similar to a small laptop screen. Cline will share screenshots after each action so you can see exactly what it sees.
|
||||
|
||||
#### Console Logs
|
||||
|
||||
Cline captures browser console logs, which can be helpful for debugging web applications. These logs are included with each screenshot.
|
||||
|
||||
### Common Use Cases
|
||||
|
||||
- **Web Development**: Test your websites and web applications
|
||||
- **UI/UX Review**: Get feedback on website design and usability
|
||||
- **Content Research**: Have Cline browse websites to gather information
|
||||
- **Form Testing**: Verify that forms work correctly
|
||||
- **Responsive Design Testing**: Check how websites look at different screen sizes
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
- **If a website doesn't load**: Try providing a direct URL with the http:// or https:// prefix
|
||||
- **If clicking doesn't work**: Try describing the location of the element more precisely
|
||||
- **If the browser seems stuck**: Ask Cline to close the browser and try again
|
||||
|
||||
### Using Remote Browser with VS Code in WSL
|
||||
|
||||
When running VS Code in WSL, you'll need to configure Windows to allow WSL to connect to Chrome. Follow these steps:
|
||||
|
||||
#### Open PowerShell as Administrator and Run:
|
||||
|
||||
```powershell
|
||||
# Allow WSL to connect to Chrome's debugging port
|
||||
New-NetFirewallRule -DisplayName "WSL Chrome Debug" -Direction Inbound -LocalPort 9222 -Protocol TCP -Action Allow
|
||||
```
|
||||
|
||||
#### Configure Cline in VS Code:
|
||||
|
||||
1. Open VS Code settings
|
||||
2. Search for "Cline: Chrome Executable Path"
|
||||
3. Set the value to the path of your Chrome executable (e.g., `C:\Program Files\Google\Chrome\Application\chrome.exe`)
|
||||
|
||||
Cline should now be able to use the Remote Browser feature from within WSL.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: "File Mentions"
|
||||
sidebarTitle: "File Mentions"
|
||||
---
|
||||
|
||||
File mentions let you pull any file from your workspace directly into your conversation with Cline. No more copying and pasting code snippets - just type `@/` and point to the file you need help with.
|
||||
|
||||
When you type `@/` in the chat, Cline shows your workspace files. Navigate through folders, select the file you want, and it's instantly available to Cline - complete with all imports, related functions, and surrounding context.
|
||||
|
||||
I use file mentions constantly when debugging. Instead of trying to figure out which parts of my code to copy over, I just reference the file directly:
|
||||
|
||||
```
|
||||
I'm getting this error when my form submits: @terminal
|
||||
|
||||
Here's my component: @/src/components/ContactForm.jsx
|
||||
|
||||
And the API endpoint: @/src/api/contact.js
|
||||
|
||||
What am I missing?
|
||||
```
|
||||
|
||||
This gives Cline everything it needs - the error message, the component code, and the API endpoint - all without me having to copy anything. Cline can see imports, dependencies, and all the surrounding context that might be causing the issue.
|
||||
|
||||
File mentions shine when you're dealing with complex bugs that span multiple files. Before, I'd have to carefully copy each relevant file, making sure I didn't miss anything important. Now I just reference each file with `@/` and Cline gets the complete picture.
|
||||
|
||||
Next time you're stuck on a problem, try using file mentions instead of copying code. You'll save time and get better answers because Cline has all the context it needs.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use a file mention in your message, here's what happens behind the scenes:
|
||||
|
||||
1. When you send your message, Cline detects the `@/path/to/file` pattern in your text
|
||||
2. The extension resolves the file path relative to your workspace root
|
||||
3. It checks if the file is binary (like an image) or text-based
|
||||
4. For text files, it reads the complete file content
|
||||
5. The file content is appended to your message in a structured format:
|
||||
```
|
||||
<file_content path="path/to/file">
|
||||
[Complete file content]
|
||||
</file_content>
|
||||
```
|
||||
6. This enhanced message with the embedded file content is sent to the AI
|
||||
7. The AI can now "see" the complete file content as if you had copied and pasted it
|
||||
|
||||
This seamless process happens automatically whenever you use a file mention, giving the AI full context without you having to manually copy anything.
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: "Folder Mentions"
|
||||
sidebarTitle: "Folder Mentions"
|
||||
---
|
||||
|
||||
Folder mentions let you bring entire directories into your conversation with Cline. Just type `@/` followed by a folder path ending with a slash, and Cline gets access to the folder structure and its contents.
|
||||
|
||||
When you type `@/` in chat, Cline shows your workspace files and folders. Navigate to the folder you want, make sure to include the trailing slash, and Cline will see the folder's structure and contents.
|
||||
|
||||
I use folder mentions when I need help understanding or refactoring a whole section of my codebase. Instead of referencing individual files one by one, I can just point to the entire directory:
|
||||
|
||||
```
|
||||
I'm trying to understand how the authentication flow works in my app.
|
||||
Can you explain the structure and relationships between the files in @/src/auth/?
|
||||
```
|
||||
|
||||
Cline can then see all the files in the auth directory, their contents, and how they relate to each other. This gives it the full context to explain complex interactions between multiple files.
|
||||
|
||||
Folder mentions are also perfect for getting help with project organization. When I'm unsure if my project structure makes sense, I'll ask Cline to review it:
|
||||
|
||||
```
|
||||
I'm setting up a new React project. Does this folder structure make sense? @/src/
|
||||
What would you change to make it more maintainable as the project grows?
|
||||
```
|
||||
|
||||
Next time you're working with multiple related files, try using folder mentions instead of referencing each file individually. You'll get more comprehensive help because Cline can see the bigger picture of how everything fits together.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use a folder mention in your message, here's what happens behind the scenes:
|
||||
|
||||
1. When you send your message, Cline detects the `@/path/to/folder/` pattern (with trailing slash) in your text
|
||||
2. The extension resolves the folder path relative to your workspace root
|
||||
3. It calls `fs.readdir()` to get a list of all files and subdirectories in that folder
|
||||
4. For each file in the directory, it checks if it's binary or text-based
|
||||
5. For text files, it extracts the complete content
|
||||
6. The folder structure and file contents are appended to your message in a structured format:
|
||||
|
||||
```
|
||||
<folder_content path="path/to/folder">
|
||||
├── file1.txt
|
||||
├── file2.js
|
||||
└── subfolder/
|
||||
|
||||
<file_content path="path/to/folder/file1.txt">
|
||||
[File content]
|
||||
</file_content>
|
||||
|
||||
<file_content path="path/to/folder/file2.js">
|
||||
[File content]
|
||||
</file_content>
|
||||
</folder_content>
|
||||
```
|
||||
|
||||
7. This enhanced message with the embedded folder structure and file contents is sent to the AI
|
||||
8. The AI can now "see" both the directory structure and the content of files within that directory
|
||||
|
||||
This process happens automatically whenever you use a folder mention, giving the AI a comprehensive view of your project structure and file contents.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
title: "Git Mentions"
|
||||
sidebarTitle: "Git Mentions"
|
||||
---
|
||||
|
||||
Git mentions let you bring your repository's history and changes directly into your conversation with Cline. You can reference uncommitted changes with `@git-changes` or specific commits with `@[commit-hash]`.
|
||||
|
||||
When you type `@` in chat, you can select "Git Changes" from the menu or type `@git-changes` directly. For specific commits, type `@` followed by the commit hash (at least 7 characters). Cline will immediately see the git status, diffs, commit messages, and other relevant information.
|
||||
|
||||
I use git mentions constantly when I'm trying to understand code changes or troubleshoot issues introduced by recent commits. Instead of trying to copy and paste diffs or commit logs, I just ask:
|
||||
|
||||
```
|
||||
I think this commit broke our authentication flow: @a1b2c3d
|
||||
|
||||
Can you explain what changed and why it might be causing the issue?
|
||||
```
|
||||
|
||||
This gives Cline the complete commit information, including the commit message, author, date, and the full diff. Cline can then analyze exactly what changed and how it might affect other parts of the codebase.
|
||||
|
||||
The `@git-changes` mention is perfect when you're working on changes and want feedback before committing:
|
||||
|
||||
```
|
||||
Here are my current changes: @git-changes
|
||||
|
||||
I'm trying to implement a new feature for user profiles. Does my approach make sense?
|
||||
Are there any potential issues or improvements you'd suggest?
|
||||
```
|
||||
|
||||
This shows Cline all your uncommitted changes, including new files, modified files, and their diffs. Cline can then review your changes and provide feedback on your implementation.
|
||||
|
||||
Git mentions are especially powerful when combined with file mentions. When I'm investigating a bug, I'll often reference both:
|
||||
|
||||
```
|
||||
I think this commit introduced a bug: @a1b2c3d
|
||||
|
||||
Here's the current implementation: @/src/components/Auth.jsx
|
||||
|
||||
How can I fix the issue while preserving the intended functionality?
|
||||
```
|
||||
|
||||
Next time you're working with code changes or investigating issues, try using git mentions instead of manually describing or copying changes. You'll get more accurate help because Cline can see exactly what changed and in what context.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use git mentions in your message, here's what happens behind the scenes:
|
||||
|
||||
### For Git Changes (`@git-changes`)
|
||||
|
||||
1. When you send your message, Cline detects the `@git-changes` pattern in your text
|
||||
2. The extension runs git commands to get the current working state of your repository
|
||||
3. It captures the output of `git status` and `git diff` to see all uncommitted changes
|
||||
4. This information is appended to your message in a structured format:
|
||||
|
||||
```
|
||||
<git_working_state>
|
||||
On branch main
|
||||
Changes not staged for commit:
|
||||
modified: src/components/Button.jsx
|
||||
modified: src/styles/main.css
|
||||
|
||||
[Complete diff output with all changes]
|
||||
</git_working_state>
|
||||
```
|
||||
|
||||
### For Specific Commits (`@[commit-hash]`)
|
||||
|
||||
1. When you send your message, Cline detects the `@` followed by a commit hash pattern
|
||||
2. The extension runs `git show` and related commands to get information about that commit
|
||||
3. It retrieves the commit message, author, date, and the complete diff
|
||||
4. This information is appended to your message in a structured format:
|
||||
|
||||
```
|
||||
<git_commit hash="a1b2c3d">
|
||||
commit a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t
|
||||
Author: Developer Name <dev@example.com>
|
||||
Date: Mon May 20 14:30:45 2025 -0700
|
||||
|
||||
Fix authentication bug in login form
|
||||
|
||||
[Complete diff output showing all changes in the commit]
|
||||
</git_commit>
|
||||
```
|
||||
|
||||
This process happens automatically whenever you use git mentions, giving the AI complete visibility into your code changes without you having to copy and paste diffs or commit logs.
|
||||
@@ -0,0 +1,118 @@
|
||||
---
|
||||
title: "@ Mentions Overview"
|
||||
sidebarTitle: "Overview"
|
||||
---
|
||||
|
||||
@ mentions are one of Cline's most powerful features, letting you seamlessly bring external context into your conversations. Instead of copying and pasting code, error messages, or documentation, you can simply reference them with an @ symbol.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/at-mentions.png" alt="@ Mentions Overview" />
|
||||
</Frame>
|
||||
|
||||
When you type `@` in the chat input, Cline shows a menu of available mention types. These mentions let you reference files, folders, problems, terminal output, git changes, and even web content directly in your conversations.
|
||||
|
||||
## Available @ Mentions
|
||||
|
||||
Cline supports several types of @ mentions, each designed to bring different kinds of context into your conversations:
|
||||
|
||||
<Columns cols={2}>
|
||||
<Card title="File Mentions" icon="file" href="/features/at-mentions/file-mentions">
|
||||
Reference any file in your workspace with `@/path/to/file`. Cline sees the complete file content, including imports, related
|
||||
functions, and surrounding context.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Folder Mentions" icon="folder" href="/features/at-mentions/folder-mentions">
|
||||
Reference entire directories with `@/path/to/folder/`. Cline sees the folder structure and all file contents, perfect for
|
||||
understanding complex interactions between multiple files.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Problem Mentions" icon="triangle-exclamation" href="/features/at-mentions/problem-mentions">
|
||||
Use `@problems` to show Cline all the errors and warnings in your workspace. Cline sees the complete list with file locations
|
||||
and error messages.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Terminal Mentions" icon="terminal" href="/features/at-mentions/terminal-mentions">
|
||||
Use `@terminal` to share your recent terminal output. Cline sees the complete output with formatting preserved, perfect for
|
||||
debugging build errors or test failures.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Git Mentions" icon="code-branch" href="/features/at-mentions/git-mentions">
|
||||
Reference uncommitted changes with `@git-changes` or specific commits with `@[commit-hash]`. Cline sees the complete diff,
|
||||
commit message, and other relevant information.
|
||||
</Card>
|
||||
|
||||
<Card title="URL Mentions" icon="globe" href="/features/at-mentions/url-mentions">
|
||||
Reference web content with `@https://example.com`. Cline fetches and sees the complete webpage content, perfect for
|
||||
referencing documentation or GitHub issues.
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
## Why @ Mentions Matter
|
||||
|
||||
@ mentions transform how you interact with Cline by:
|
||||
|
||||
1. **Eliminating copy-paste**: No more copying and pasting code, error messages, or terminal output. Just reference them directly.
|
||||
|
||||
2. **Preserving context**: Cline sees the complete context, including imports, related functions, and surrounding code that might be relevant.
|
||||
|
||||
3. **Maintaining formatting**: Terminal output, error messages, and web content keep their formatting, making them easier to understand.
|
||||
|
||||
4. **Enabling complex workflows**: Combine multiple @ mentions to give Cline a complete picture of your problem:
|
||||
|
||||
```
|
||||
I'm getting these errors: @problems
|
||||
|
||||
Here's my component: @/src/components/Form.jsx
|
||||
And the API endpoint: @/src/api/users.js
|
||||
|
||||
The error happens when I submit: @terminal
|
||||
|
||||
I think this commit might have caused it: @a1b2c3d
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
To use @ mentions:
|
||||
|
||||
1. Type `@` in the chat input
|
||||
2. Select the type of mention from the menu or continue typing
|
||||
3. For files and folders, navigate through your workspace structure
|
||||
4. Send your message as usual
|
||||
|
||||
Cline will automatically process the mentions and include the referenced content in the context sent to the AI.
|
||||
|
||||
Try using @ mentions in your next conversation with Cline - you'll be amazed at how much more efficient and effective your interactions become when you can seamlessly bring in external context.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use @ mentions in your messages, there's a sophisticated process happening behind the scenes:
|
||||
|
||||
1. **Detection**: When you send a message, Cline scans the text for @ mention patterns using regular expressions
|
||||
2. **Processing**: For each detected mention, Cline:
|
||||
- Determines the mention type (file, folder, problems, terminal, git, URL)
|
||||
- Fetches the relevant content (file contents, terminal output, etc.)
|
||||
- Formats the content appropriately
|
||||
3. **Enhancement**: The original message is enhanced with structured data:
|
||||
|
||||
```
|
||||
Your original message with @/path/to/file
|
||||
|
||||
<file_content path="/path/to/file">
|
||||
[Complete file content]
|
||||
</file_content>
|
||||
```
|
||||
|
||||
4. **Context Inclusion**: This enhanced message with all the embedded content is sent to the AI model
|
||||
5. **Seamless Response**: The AI can now "see" all the referenced content as if you had manually copied and pasted it
|
||||
|
||||
This entire process happens automatically and seamlessly whenever you use @ mentions, giving the AI complete context without you having to manually copy anything.
|
||||
|
||||
Each type of @ mention has its own specific implementation details, which you can find in their respective documentation pages.
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: "Problem Mentions"
|
||||
sidebarTitle: "Problem Mentions"
|
||||
---
|
||||
|
||||
The problems mention gives Cline instant access to all the errors and warnings in your workspace. Just type `@problems` and Cline can see every diagnostic issue VSCode has detected.
|
||||
|
||||
When you type `@` in chat, select "Problems" from the menu or just type `@problems` directly. Cline will immediately see all the errors and warnings from your workspace, complete with file locations and error messages.
|
||||
|
||||
I use the problems mention constantly when I'm stuck on build errors or TypeScript issues. Instead of trying to describe the errors or copy them one by one, I just ask:
|
||||
|
||||
```
|
||||
I'm getting these TypeScript errors and I'm not sure how to fix them: @problems
|
||||
|
||||
Can you help me understand what's wrong and how to fix it?
|
||||
```
|
||||
|
||||
This gives Cline the complete list of errors with their exact locations and messages. Cline can then analyze the patterns across multiple errors and suggest comprehensive solutions.
|
||||
|
||||
The problems mention is especially powerful when combined with file mentions. When I'm dealing with complex type errors, I'll reference both:
|
||||
|
||||
```
|
||||
I'm getting these type errors: @problems
|
||||
|
||||
Here's my component: @/src/components/DataTable.tsx
|
||||
And the types file: @/src/types/api.ts
|
||||
|
||||
How can I fix these issues?
|
||||
```
|
||||
|
||||
This approach gives Cline everything it needs - the exact errors, the component code, and the type definitions - all without me having to copy anything manually.
|
||||
|
||||
Next time you're stuck on errors, try using `@problems` instead of copying error messages. You'll get more accurate help because Cline can see the complete error context and locations.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use the problems mention in your message, here's what happens behind the scenes:
|
||||
|
||||
1. When you send your message, Cline detects the `@problems` pattern in your text
|
||||
2. The extension calls VSCode's built-in `vscode.languages.getDiagnostics()` API to get all errors and warnings
|
||||
3. It formats these diagnostics into a structured text representation with file paths, line numbers, and error messages
|
||||
4. The formatted problems list is appended to your message in a structured format:
|
||||
```
|
||||
<workspace_diagnostics>
|
||||
/path/to/file.js:10:5 - error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
/path/to/file.js:15:3 - warning: This variable is never used.
|
||||
</workspace_diagnostics>
|
||||
```
|
||||
5. This enhanced message with the embedded diagnostics is sent to the AI
|
||||
6. The AI can now "see" all the errors and warnings in your workspace, complete with their locations and messages
|
||||
|
||||
This process happens automatically whenever you use the problems mention, giving the AI a comprehensive view of all the issues in your workspace without you having to copy them manually.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
title: "Terminal Mentions"
|
||||
sidebarTitle: "Terminal Mentions"
|
||||
---
|
||||
|
||||
The terminal mention lets you bring your terminal output directly into your conversation with Cline. Just type `@terminal` and Cline can see the recent output from your terminal.
|
||||
|
||||
When you type `@` in chat, select "Terminal" from the menu or just type `@terminal` directly. Cline will immediately see the recent output from your active terminal, including error messages, build logs, or command results.
|
||||
|
||||
I use the terminal mention all the time when I'm dealing with build errors, test failures, or debugging output. Instead of trying to copy and paste terminal output (which often loses formatting), I just ask:
|
||||
|
||||
```
|
||||
I'm getting this error when running my tests: @terminal
|
||||
|
||||
What's causing this and how can I fix it?
|
||||
```
|
||||
|
||||
This gives Cline the complete terminal output with all its formatting intact. Cline can then analyze the error messages, stack traces, and surrounding context to provide more accurate help.
|
||||
|
||||
The terminal mention is especially powerful when combined with file mentions. When I'm debugging a failed API call, I'll reference both:
|
||||
|
||||
```
|
||||
I'm getting this error when calling my API: @terminal
|
||||
|
||||
Here's my API client code: @/src/api/client.js
|
||||
And the endpoint implementation: @/src/server/routes/users.js
|
||||
|
||||
What am I doing wrong?
|
||||
```
|
||||
|
||||
This approach gives Cline everything it needs - the exact error output, the client code, and the server implementation - all without me having to copy anything manually.
|
||||
|
||||
Next time you're running into issues with command output or build errors, try using `@terminal` instead of copying the output. You'll get more accurate help because Cline can see the complete terminal context with proper formatting.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use the terminal mention in your message, here's what happens behind the scenes:
|
||||
|
||||
1. When you send your message, Cline detects the `@terminal` pattern in your text
|
||||
2. The extension calls `getLatestTerminalOutput()` which accesses VSCode's terminal API
|
||||
3. It captures the recent output buffer from your active terminal
|
||||
4. The terminal output is appended to your message in a structured format:
|
||||
|
||||
```
|
||||
<terminal_output>
|
||||
$ npm run test
|
||||
> project@1.0.0 test
|
||||
> jest
|
||||
|
||||
FAIL src/components/__tests__/Button.test.js
|
||||
● Button component › renders correctly
|
||||
|
||||
[Complete terminal output with formatting preserved]
|
||||
</terminal_output>
|
||||
```
|
||||
|
||||
5. This enhanced message with the embedded terminal output is sent to the AI
|
||||
6. The AI can now "see" the complete terminal output with all formatting preserved
|
||||
|
||||
This process happens automatically whenever you use the terminal mention, giving the AI access to your command results, error messages, and other terminal output without you having to copy it manually.
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: "URL Mentions"
|
||||
sidebarTitle: "URL Mentions"
|
||||
---
|
||||
|
||||
URL mentions let you bring web content directly into your conversation with Cline. Just type `@` followed by any URL, and Cline can see the content of that webpage without you having to copy and paste anything.
|
||||
|
||||
When you type `@` in chat followed by a URL (like `@https://example.com`), Cline will fetch the content of that webpage and include it in the context. This works for documentation pages, GitHub issues, Stack Overflow questions, or any other web content you want to reference.
|
||||
|
||||
I use URL mentions constantly when I'm working with external APIs or libraries. Instead of trying to explain how an API works or copying documentation snippets, I just reference the docs directly:
|
||||
|
||||
```
|
||||
I'm trying to implement authentication with this API: @https://api.example.com/docs/auth
|
||||
|
||||
Can you help me write the code to get an access token based on these docs?
|
||||
```
|
||||
|
||||
This gives Cline the complete documentation page, so it can see all the authentication requirements, endpoints, parameters, and examples. Cline can then provide more accurate and comprehensive help based on the official documentation.
|
||||
|
||||
URL mentions are especially useful for referencing GitHub issues or discussions:
|
||||
|
||||
```
|
||||
I'm trying to fix this issue in our project: @https://github.com/our-org/our-repo/issues/123
|
||||
|
||||
Here's my current implementation: @/src/components/Feature.jsx
|
||||
|
||||
What changes do I need to make to address the issue?
|
||||
```
|
||||
|
||||
This shows Cline the complete GitHub issue, including the description, comments, and any code snippets or screenshots. Cline can then help you implement a solution that directly addresses the reported issue.
|
||||
|
||||
Next time you're working with external documentation or online resources, try using URL mentions instead of copying and pasting content. You'll get more accurate help because Cline can see the complete context of the webpage, including formatting, code examples, and surrounding information.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use a URL mention in your message, here's what happens behind the scenes:
|
||||
|
||||
1. When you send your message, Cline detects the `@http://...` or `@https://...` pattern in your text
|
||||
2. The extension launches a headless browser (Puppeteer) in the background
|
||||
3. It navigates to the URL and waits for the page to load completely
|
||||
4. The browser captures the page content, including text, formatting, and code examples
|
||||
5. The content is converted to a Markdown format that preserves the structure
|
||||
6. This content is appended to your message in a structured format:
|
||||
|
||||
```
|
||||
<url_content url="https://example.com/docs">
|
||||
# Example API Documentation
|
||||
|
||||
## Authentication
|
||||
|
||||
To authenticate with the API, you need to...
|
||||
|
||||
const token = await api.authenticate({
|
||||
username: 'user',
|
||||
password: 'pass'
|
||||
});
|
||||
|
||||
[Complete webpage content in Markdown format]
|
||||
</url_content>
|
||||
```
|
||||
|
||||
7. The browser is then closed to free up resources
|
||||
8. This enhanced message with the embedded webpage content is sent to the AI
|
||||
|
||||
This process happens automatically whenever you use a URL mention, giving the AI access to the complete content of the webpage without you having to copy and paste anything.
|
||||
@@ -0,0 +1,59 @@
|
||||
The Auto Approve menu lets you set fine-grained permissions on what you allow Cline to do in an automated way.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/auto-approve.png" alt="Auto Approve" />
|
||||
</Frame>
|
||||
|
||||
## How it works
|
||||
|
||||
By default, Cline will ask for your permission before calling any tool, including reading or writing files.
|
||||
|
||||
If you want to allow Cline to do something without asking, you can set the Auto Approve permission for that tool.
|
||||
|
||||
## Permission Options
|
||||
|
||||
- **Read project files**
|
||||
|
||||
- Allows Cline to read files within your current workspace without asking
|
||||
- **Read all files**
|
||||
- Extends read permission to files outside your workspace (system files, config files, etc.)
|
||||
|
||||
- **Edit project files**
|
||||
|
||||
- Allows Cline to modify files within your current workspace without confirmation
|
||||
- **Edit all files**
|
||||
- Extends modification permission to files outside your workspace
|
||||
|
||||
- **Execute safe commands**
|
||||
|
||||
- Allows execution of terminal commands that the model deems non-destructive
|
||||
- **Execute all commands**
|
||||
- Permits execution of any terminal command without asking
|
||||
|
||||
- **Use the browser**
|
||||
|
||||
- Allows Cline to use the browser tool to fetch web content
|
||||
|
||||
- **Use MCP servers**
|
||||
|
||||
- Permits connection to and usage of MCP servers for extended functionality
|
||||
|
||||
- **Maximum requests**
|
||||
- Sets the number of consecutive automated actions Cline can take before requiring your input
|
||||
|
||||
## Best Practices
|
||||
|
||||
Personally, I like to keep auto-editing disabled because it gives me a chance to review changes every step of the way.
|
||||
|
||||
For most serious development workflows, I recommend starting with:
|
||||
|
||||
- Auto-approving read access to project files
|
||||
- Setting a reasonable maximum request limit (10-20)
|
||||
|
||||
This gives Cline enough freedom to explore your codebase without constant interruptions, while still requiring permission for edits or potentially destructive actions.
|
||||
|
||||
As you build more trust in Cline's capabilities with your specific projects, you can gradually increase the permissions to match your comfort level.
|
||||
|
||||
Remember that you can always adjust these settings as your needs change - tighten permissions for critical production work, or loosen them when prototyping and exploring.
|
||||
|
||||
You can even use the quick "star" actions to quickly toggle your auto-approved selections on and off as you go.
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
title: "Checkpoints"
|
||||
sidebarTitle: "Checkpoints"
|
||||
---
|
||||
|
||||
Checkpoints automatically save snapshots of your workspace after each step in a task. This feature lets you track changes, roll back when needed, and experiment confidently with your code.
|
||||
|
||||
## How Checkpoints Work
|
||||
|
||||
Cline creates a checkpoint after each tool use (file edits, commands, etc.). These checkpoints:
|
||||
|
||||
- Work alongside your Git workflow without interference
|
||||
- Maintain context between restores
|
||||
- Use a shadow Git repository to track changes
|
||||
|
||||
For example, if you're working on a feature and Cline makes multiple file changes, each change creates a checkpoint. This means you can review each modification and, if needed, roll back to any point without affecting your main Git repository.
|
||||
|
||||
## Viewing Changes & Restoring
|
||||
|
||||
After each tool use, you can:
|
||||
|
||||
1. Click the "Compare" button to see modified files
|
||||
2. Click the "Restore" button to open restore options
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(13).png"
|
||||
alt="Checkpoint comparison and restore options"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
## Restore Options
|
||||
|
||||
To restore to a previous point:
|
||||
|
||||
1. Click the "Restore" button next to any step
|
||||
2. Choose from three options:
|
||||
- **Restore Task and Workspace**: Reset both codebase and task to that point
|
||||
- **Restore Task Only**: Keep codebase changes but revert task context
|
||||
- **Restore Workspace Only**: Reset codebase while preserving task context
|
||||
|
||||
Example: If Cline makes changes you don't like while styling a component, you can use "Restore Workspace Only" to revert the code changes while keeping the conversation context, allowing you to try a different approach.
|
||||
|
||||
<Frame caption="Reverting both codebase and task to before any changes were made to start fresh">
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/checkpointsDemo.gif" alt="Checkpoint restore demo" />
|
||||
</Frame>
|
||||
|
||||
## Use Cases
|
||||
|
||||
Checkpoints let you be more experimental with Cline. While human coding is often methodical and iterative, AI can make substantial changes quickly. Checkpoints help you track these changes and revert if needed.
|
||||
|
||||
### Using Auto-Approve Mode
|
||||
|
||||
- Provides safety net for rapid iterations
|
||||
- Makes it easy to undo unexpected results
|
||||
|
||||
### Testing Different Approaches
|
||||
|
||||
- Try multiple solutions confidently
|
||||
- Compare different implementations
|
||||
- Quickly revert to working states
|
||||
- Ideal for exploring different design patterns or architectural approaches
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. Use checkpoints as safety nets when experimenting
|
||||
2. Leverage auto-approve mode more confidently, knowing you can always roll back
|
||||
3. Restore selectively based on needs:
|
||||
- Use "Restore Task and Workspace" for a fresh start
|
||||
- Use "Restore Task Only" to try different prompts, but keep file changes
|
||||
- Use "Restore Workspace Only" to attempt different implementations while preserving conversation context
|
||||
|
||||
## Relationship with Message Editing
|
||||
|
||||
The [message editing feature](/features/editing-messages) uses checkpoints under the hood when you select the "Restore All" option. This allows you to not only edit and resubmit your message but also restore your workspace to the state it was in at that point in the conversation.
|
||||
|
||||
## Deleting Checkpoints
|
||||
|
||||
You can delete all checkpoints by using the **"Delete All History"** button in the task history menu. Note that this will also delete all tasks. Checkpoints are stored in VS Code's globalStorage.
|
||||
@@ -0,0 +1,162 @@
|
||||
Cline Rules allow you to provide Cline with system-level guidance. Think of them as a persistent way to include context and preferences for your projects or globally for every conversation.
|
||||
|
||||
## Creating a Rule
|
||||
|
||||
You can create a rule by clicking the `+` button in the Rules tab. This will open a new file in your IDE which you can use to write your rule.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/cline-rules.png" alt="Create a Rule" />
|
||||
</Frame>
|
||||
|
||||
Once you save the file:
|
||||
|
||||
- Your rule will be stored in the `.clinerules/` directory in your project (if it's a Workspace Rule)
|
||||
- Or in the `Documents/Cline/Rules` directory (if it's a Global Rule).
|
||||
|
||||
You can also have Cline create a rule for you by using the [`/newrule` slash command](/features/slash-commands/new-rule) in the chat.
|
||||
|
||||
```markdown Example Cline Rule Structure [expandable]
|
||||
# Project Guidelines
|
||||
|
||||
## Documentation Requirements
|
||||
|
||||
- Update relevant documentation in /docs when modifying features
|
||||
- Keep README.md in sync with new capabilities
|
||||
- Maintain changelog entries in CHANGELOG.md
|
||||
|
||||
## Architecture Decision Records
|
||||
|
||||
Create ADRs in /docs/adr for:
|
||||
|
||||
- Major dependency changes
|
||||
- Architectural pattern changes
|
||||
- New integration patterns
|
||||
- Database schema changes
|
||||
Follow template in /docs/adr/template.md
|
||||
|
||||
## Code Style & Patterns
|
||||
|
||||
- Generate API clients using OpenAPI Generator
|
||||
- Use TypeScript axios template
|
||||
- Place generated code in /src/generated
|
||||
- Prefer composition over inheritance
|
||||
- Use repository pattern for data access
|
||||
- Follow error handling pattern in /src/utils/errors.ts
|
||||
|
||||
## Testing Standards
|
||||
|
||||
- Unit tests required for business logic
|
||||
- Integration tests for API endpoints
|
||||
- E2E tests for critical user flows
|
||||
```
|
||||
|
||||
### Key Benefits
|
||||
|
||||
1. **Version Controlled**: The `.clinerules` file becomes part of your project's source code
|
||||
2. **Team Consistency**: Ensures consistent behavior across all team members
|
||||
3. **Project-Specific**: Rules and standards tailored to each project's needs
|
||||
4. **Institutional Knowledge**: Maintains project standards and practices in code
|
||||
|
||||
Place the `.clinerules` file in your project's root directory:
|
||||
|
||||
```
|
||||
your-project/
|
||||
├── .clinerules
|
||||
├── src/
|
||||
├── docs/
|
||||
└── ...
|
||||
```
|
||||
|
||||
Cline's system prompt, on the other hand, is not user-editable ([here's where you can find it](https://github.com/cline/cline/blob/main/src/core/prompts/system.ts)). For a broader look at prompt engineering best practices, check out [this resource](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview).
|
||||
|
||||
### Tips for Writing Effective Cline Rules
|
||||
|
||||
- Be Clear and Concise: Use simple language and avoid ambiguity.
|
||||
- Focus on Desired Outcomes: Describe the results you want, not the specific steps.
|
||||
- Test and Iterate: Experiment to find what works best for your workflow.
|
||||
|
||||
### .clinerules/ Folder System
|
||||
|
||||
```
|
||||
your-project/
|
||||
├── .clinerules/ # Folder containing active rules
|
||||
│ ├── 01-coding.md # Core coding standards
|
||||
│ ├── 02-documentation.md # Documentation requirements
|
||||
│ └── current-sprint.md # Rules specific to current work
|
||||
├── src/
|
||||
└── ...
|
||||
```
|
||||
|
||||
Cline automatically processes **all Markdown files** inside the `.clinerules/` directory, combining them into a unified set of rules. The numeric prefixes (optional) help organize files in a logical sequence.
|
||||
|
||||
#### Using a Rules Bank
|
||||
|
||||
For projects with multiple contexts or teams, maintain a rules bank directory:
|
||||
|
||||
```
|
||||
your-project/
|
||||
├── .clinerules/ # Active rules - automatically applied
|
||||
│ ├── 01-coding.md
|
||||
│ └── client-a.md
|
||||
│
|
||||
├── clinerules-bank/ # Repository of available but inactive rules
|
||||
│ ├── clients/ # Client-specific rule sets
|
||||
│ │ ├── client-a.md
|
||||
│ │ └── client-b.md
|
||||
│ ├── frameworks/ # Framework-specific rules
|
||||
│ │ ├── react.md
|
||||
│ │ └── vue.md
|
||||
│ └── project-types/ # Project type standards
|
||||
│ ├── api-service.md
|
||||
│ └── frontend-app.md
|
||||
└── ...
|
||||
```
|
||||
|
||||
#### Benefits of the Folder Approach
|
||||
|
||||
1. **Contextual Activation**: Copy only relevant rules from the bank to the active folder
|
||||
2. **Easier Maintenance**: Update individual rule files without affecting others
|
||||
3. **Team Flexibility**: Different team members can activate rules specific to their current task
|
||||
4. **Reduced Noise**: Keep the active ruleset focused and relevant
|
||||
|
||||
#### Usage Examples
|
||||
|
||||
Switch between client projects:
|
||||
|
||||
```bash
|
||||
# Switch to Client B project
|
||||
rm .clinerules/client-a.md
|
||||
cp clinerules-bank/clients/client-b.md .clinerules/
|
||||
```
|
||||
|
||||
Adapt to different tech stacks:
|
||||
|
||||
```bash
|
||||
# Frontend React project
|
||||
cp clinerules-bank/frameworks/react.md .clinerules/
|
||||
```
|
||||
|
||||
#### Implementation Tips
|
||||
|
||||
- Keep individual rule files focused on specific concerns
|
||||
- Use descriptive filenames that clearly indicate the rule's purpose
|
||||
- Consider git-ignoring the active `.clinerules/` folder while tracking the `clinerules-bank/`
|
||||
- Create team scripts to quickly activate common rule combinations
|
||||
|
||||
The folder system transforms your Cline rules from a static document into a dynamic knowledge system that adapts to your team's changing contexts and requirements.
|
||||
|
||||
### Managing Rules with the Toggleable Popover
|
||||
|
||||
To make managing both single `.clinerules` files and the folder system even easier, Cline v3.13 introduces a dedicated popover UI directly accessible from the chat interface.
|
||||
|
||||
Located conveniently under the chat input field, this popover allows you to:
|
||||
|
||||
- **Instantly See Active Rules:** View which global rules (from your user settings) and workspace rules (`.clinerules` file or folder contents) are currently active.
|
||||
- **Quickly Toggle Rules:** Enable or disable specific rule files within your workspace `.clinerules/` folder with a single click. This is perfect for activating context-specific rules (like `react-rules.md` or `memory-bank.md`) only when needed.
|
||||
- **Easily Add/Manage Rules:** Quickly create a workspace `.clinerules` file or folder if one doesn't exist, or add new rule files to an existing folder.
|
||||
|
||||
This UI significantly simplifies switching contexts and managing different sets of instructions without needing to manually edit files or configurations during a conversation.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(1).png" alt="Cline Logo" />
|
||||
</Frame>
|
||||
@@ -0,0 +1,129 @@
|
||||
---
|
||||
title: "Code Commands"
|
||||
sidebarTitle: "Code Commands"
|
||||
---
|
||||
|
||||
Cline's code commands bring AI assistance directly into your editor, letting you interact with your code without leaving your workflow. With a simple right-click, you can add code to Cline, and through the lightbulb menu, you can fix errors, get explanations, or improve your code.
|
||||
|
||||
## Available Code Commands
|
||||
|
||||
When you interact with code in your editor, you can access Cline commands in two ways:
|
||||
|
||||
### Right-Click Context Menu
|
||||
|
||||
When you right-click on selected code, you'll see:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/code-commands.png" alt="Right Click Menu" />
|
||||
</Frame>
|
||||
|
||||
#### Add to Cline
|
||||
|
||||
The "Add to Cline" command sends your selected code to the Cline chat panel. This is perfect for:
|
||||
|
||||
- Asking questions about specific code snippets
|
||||
- Requesting improvements or optimizations
|
||||
- Getting explanations of complex logic
|
||||
|
||||
When you use this command, Cline automatically includes:
|
||||
|
||||
- The file path (as a file mention)
|
||||
- The selected code with proper formatting
|
||||
- The programming language for accurate syntax highlighting
|
||||
|
||||
### Lightbulb Menu (Code Actions)
|
||||
|
||||
When you see a lightbulb icon in your editor, click it to access these Cline commands:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/lightbulb-actions.png" alt="Lightbulb Menu" />
|
||||
</Frame>
|
||||
|
||||
#### Fix with Cline
|
||||
|
||||
The "Fix with Cline" command appears in the lightbulb menu when your code has errors or warnings. This command:
|
||||
|
||||
1. Captures the selected code
|
||||
2. Identifies the errors or warnings from VSCode's diagnostics
|
||||
3. Sends both to Cline with a request to fix the issues
|
||||
4. Provides a solution that addresses the specific problems
|
||||
|
||||
This is incredibly useful for quickly resolving syntax errors, linter warnings, or type issues without having to manually describe the problem.
|
||||
|
||||
#### Explain with Cline
|
||||
|
||||
The "Explain with Cline" command helps you understand complex code. When you select code and use this command from the lightbulb menu, Cline:
|
||||
|
||||
1. Analyzes the selected code
|
||||
2. Provides a clear explanation of what the code does
|
||||
3. Breaks down complex logic into understandable parts
|
||||
4. Highlights important patterns or techniques used
|
||||
|
||||
#### Improve with Cline
|
||||
|
||||
The "Improve with Cline" command helps you enhance your code. When you select code and use this command from the lightbulb menu, Cline:
|
||||
|
||||
1. Analyzes the selected code for potential improvements
|
||||
2. Suggests optimizations, refactorings, or better practices
|
||||
3. Explains the reasoning behind the suggested changes
|
||||
4. Provides improved code that maintains the original functionality
|
||||
|
||||
## How to Use Code Commands
|
||||
|
||||
Using Cline's code commands is simple:
|
||||
|
||||
### For Right-Click Commands:
|
||||
|
||||
1. Select the code you want to work with
|
||||
2. Right-click to open the context menu
|
||||
3. Choose "Add to Cline"
|
||||
4. View the result in the Cline chat panel
|
||||
|
||||
### For Lightbulb Menu Commands:
|
||||
|
||||
1. Select the code you want to work with
|
||||
2. Look for the lightbulb icon that appears in the editor gutter
|
||||
3. Click the lightbulb to see available actions
|
||||
4. Choose the appropriate Cline command (Fix, Explain, or Improve)
|
||||
5. View the result in the Cline chat panel
|
||||
|
||||
After using any command, you can:
|
||||
|
||||
- Ask follow-up questions
|
||||
- Request modifications to the solution
|
||||
- Apply the changes back to your code
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
When you use a code command, here's what happens behind the scenes:
|
||||
|
||||
1. **Code Selection**: The extension captures your selected code and its context
|
||||
2. **Metadata Collection**: Cline gathers important metadata:
|
||||
|
||||
- File path and name
|
||||
- Programming language
|
||||
- Any associated diagnostics (errors/warnings)
|
||||
- Surrounding code context when relevant
|
||||
|
||||
3. **Command Processing**:
|
||||
|
||||
- For "Add to Cline," the code is formatted and sent to the chat panel
|
||||
- For "Fix with Cline," the code and diagnostics are analyzed and a fix is generated
|
||||
- For "Explain with Cline," the code is analyzed to provide a clear explanation
|
||||
- For "Improve with Cline," the code is analyzed for potential optimizations and improvements
|
||||
|
||||
4. **Integration with Chat**: The results appear in the Cline chat panel, where you can:
|
||||
- See the AI's response
|
||||
- Ask follow-up questions
|
||||
- Apply suggested changes
|
||||
|
||||
This seamless integration between your editor and Cline's AI capabilities makes it easy to get assistance without disrupting your coding flow.
|
||||
|
||||
## Tips for Effective Use
|
||||
|
||||
- **Select complete logical units**: When possible, select entire functions, classes, or modules to give Cline complete context
|
||||
- **Include imports**: For language-specific help, include relevant imports so Cline understands dependencies
|
||||
- **Combine with @ mentions**: For complex issues, use code commands along with file or problem mentions for more context
|
||||
- **Use keyboard shortcuts**: Speed up your workflow by [assigning keyboard shortcuts](/features/commands-and-shortcuts/keyboard-shortcuts) to common code commands
|
||||
|
||||
Next time you're struggling with a piece of code, try using Cline's code commands instead of switching to a separate chat interface. You'll be amazed at how much more efficient your workflow becomes when AI assistance is integrated directly into your editor.
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
title: "Generate Commit Message"
|
||||
sidebarTitle: "Generate Commit Message"
|
||||
---
|
||||
|
||||
Cline's Git integration brings AI assistance directly to your version control workflow. Generate commit messages without leaving your editor.
|
||||
|
||||
## Generate Commit Message
|
||||
|
||||
One of the most useful Git integrations is the ability to automatically generate meaningful commit messages:
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/generate-commit-message-with-cline.png"
|
||||
alt="Generate Commit Message with Cline"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
1. Make your changes and stage them in Git
|
||||
2. Click the robot icon in the Source Control view or run the "Generate Commit Message with Cline" command
|
||||
3. Cline analyzes your changes and generates a descriptive commit message
|
||||
4. The message is automatically inserted into the commit message input box
|
||||
|
||||
The generated commit messages:
|
||||
|
||||
- Start with a concise summary (50-72 characters)
|
||||
- Use imperative mood (e.g., "Add feature" not "Added feature")
|
||||
- Describe what was changed and why
|
||||
- Follow Git best practices
|
||||
|
||||
This feature saves time and ensures your commit history is consistent and informative.
|
||||
|
||||
<Tip>
|
||||
For information about using `@git-changes` and `@[commit-hash]` mentions in your chat messages, see the [Git
|
||||
Mentions](/features/at-mentions/git-mentions) documentation.
|
||||
</Tip>
|
||||
|
||||
## How It Works
|
||||
|
||||
When you use Cline's commit message generation feature, here's what happens behind the scenes:
|
||||
|
||||
1. Cline retrieves the current Git diff using `getWorkingState()`
|
||||
2. It formats this diff into a specialized prompt for the AI
|
||||
3. The AI analyzes the changes and generates an appropriate commit message
|
||||
4. The message is extracted and inserted into the Git commit message input box
|
||||
|
||||
This process uses your current Cline API configuration, so the quality of the generated messages matches your chosen AI model.
|
||||
|
||||
## Tips for Effective Use
|
||||
|
||||
- **Generate commit messages for complex changes**: The AI excels at summarizing multiple related changes into a coherent message.
|
||||
|
||||
- **Review and edit generated messages**: While the AI generates high-quality messages, it's always good practice to review and adjust them if needed.
|
||||
|
||||
- **Stage related changes together**: For the best results, stage related changes together so the AI can generate a cohesive message.
|
||||
|
||||
- **Use for consistent commit history**: Using the generate commit message feature helps maintain a consistent style across your commit history.
|
||||
|
||||
## How It Works Under the Hood
|
||||
|
||||
The commit message generation leverages VSCode's Git extension API to access repository information:
|
||||
|
||||
1. When you trigger the command:
|
||||
- Cline gets the current diff
|
||||
- It sends this to the AI with specific instructions for commit message formatting
|
||||
- It parses the AI's response
|
||||
- It accesses the Git extension API to set the commit message
|
||||
|
||||
This integration with Git makes it easy to generate high-quality commit messages without disrupting your workflow.
|
||||
|
||||
Next time you're struggling to write a good commit message, try using Cline's commit message generation. You'll save time and improve your version control workflow with AI assistance right where you need it.
|
||||
@@ -0,0 +1,103 @@
|
||||
---
|
||||
title: "Keyboard Shortcuts"
|
||||
sidebarTitle: "Keyboard Shortcuts"
|
||||
---
|
||||
|
||||
Cline's keyboard shortcuts let you access AI assistance without taking your hands off the keyboard. Speed up your workflow by using hotkeys for common Cline actions.
|
||||
|
||||
## Default Keyboard Shortcuts
|
||||
|
||||
Cline comes with the following built-in keyboard shortcuts to streamline your workflow:
|
||||
|
||||
| Action | Windows/Linux | macOS | Condition | Description |
|
||||
| ----------------------- | ------------- | ------- | ---------------------------- | ----------------------------------------- |
|
||||
| Add to Cline | `Ctrl+'` | `Cmd+'` | When text is selected | Adds selected code to Cline chat |
|
||||
| Focus Chat Input | `Ctrl+'` | `Cmd+'` | When no text is selected | Focuses the Cline chat input field |
|
||||
| Generate Commit Message | (unset) | (unset) | When Git is the SCM provider | Available through the Source Control view |
|
||||
|
||||
## Available Commands for Custom Shortcuts
|
||||
|
||||
While Cline has only a few default keyboard shortcuts, you can assign your own shortcuts to any of these commands:
|
||||
|
||||
| Command ID | Description |
|
||||
| ---------------------------------------------------------------------------------------- | --------------------------------------------- |
|
||||
| [`cline.openInNewTab`](/features/commands-and-shortcuts/overview) | Opens Cline in a new editor tab |
|
||||
| [`cline.addToChat`](/features/commands-and-shortcuts/code-commands) | Adds selected code to Cline chat |
|
||||
| [`cline.addTerminalOutputToChat`](/features/commands-and-shortcuts/terminal-integration) | Adds terminal output to Cline |
|
||||
| `cline.focusChatInput` | Focuses the Cline chat input field |
|
||||
| [`cline.generateGitCommitMessage`](/features/commands-and-shortcuts/git-integration) | Generates a commit message for staged changes |
|
||||
| [`cline.explainCode`](/features/commands-and-shortcuts/code-commands) | Explains selected code |
|
||||
| [`cline.improveCode`](/features/commands-and-shortcuts/code-commands) | Suggests improvements for selected code |
|
||||
| [`cline.fixWithCline`](/features/commands-and-shortcuts/code-commands) | Fixes code with errors |
|
||||
| `claude-dev.SidebarProvider.focus` | Opens and focuses the Cline sidebar |
|
||||
|
||||
## Customizing Keyboard Shortcuts
|
||||
|
||||
You can customize Cline's keyboard shortcuts to match your preferences:
|
||||
|
||||
1. Open the Keyboard Shortcuts editor in VSCode:
|
||||
|
||||
- Press `Ctrl+K Ctrl+S` (Windows/Linux) or `Cmd+K Cmd+S` (macOS)
|
||||
- Or go to File > Preferences > Keyboard Shortcuts
|
||||
|
||||
2. Search for "Cline" to see all available commands
|
||||
|
||||
3. Click on the pencil icon next to any command to change its shortcut
|
||||
|
||||
4. Press the keys you want to assign to that command
|
||||
|
||||
5. Press Enter to save the new shortcut
|
||||
|
||||
## Suggested Custom Shortcuts
|
||||
|
||||
Here are some suggested shortcuts you might find useful:
|
||||
|
||||
| Action | Suggested Shortcut | Command ID | Description |
|
||||
| --------------------- | ------------------------------ | ----------------------------------------- | ----------------------------- |
|
||||
| Open Cline Sidebar | `Ctrl+Shift+C` / `Cmd+Shift+C` | `claude-dev.SidebarProvider.focus` | Opens the Cline sidebar panel |
|
||||
| New Task | `Alt+N` | `cline.plusButtonClicked` | Starts a new Cline task |
|
||||
| Add Terminal to Cline | `Alt+T` | `cline.addTerminalOutputToChat` | Adds terminal output to Cline |
|
||||
| Clear Current Task | `Alt+C` | (Requires custom keybinding to UI action) | Clears the current task |
|
||||
|
||||
## Keyboard-Only Workflow
|
||||
|
||||
With the right shortcuts, you can use Cline without ever touching the mouse:
|
||||
|
||||
1. Select code with keyboard navigation (`Shift+Arrow` keys)
|
||||
2. Send to Cline with `Ctrl+'` / `Cmd+'`
|
||||
3. Type your question and press Enter
|
||||
4. Review the response and apply suggestions
|
||||
|
||||
## Editor Integration Shortcuts
|
||||
|
||||
Cline's keyboard shortcuts integrate seamlessly with VSCode's built-in shortcuts:
|
||||
|
||||
- Use VSCode's selection shortcuts (`Ctrl+L` / `Cmd+L` to select line, etc.) before sending code to Cline
|
||||
- Combine with VSCode's split editor shortcuts to view code and Cline side by side
|
||||
- Use VSCode's terminal focus shortcut (`` Ctrl+` `` / `` Cmd+` ``) before capturing terminal output
|
||||
|
||||
## Tips for Effective Use
|
||||
|
||||
- **Learn the default shortcut first**: The `Ctrl+'` / `Cmd+'` shortcut is versatile - it adds selected code to chat when text is selected, or focuses the chat input when nothing is selected
|
||||
- **Create muscle memory**: Use keyboard shortcuts consistently to build habits
|
||||
- **Customize for your workflow**: Assign shortcuts to commands you use frequently
|
||||
- **Consider ergonomics**: Choose shortcuts that are comfortable for your keyboard layout
|
||||
|
||||
Keyboard shortcuts may seem like a small optimization, but they can significantly speed up your workflow when using Cline regularly. By keeping your hands on the keyboard, you maintain your coding flow while still getting AI assistance exactly when you need it.
|
||||
|
||||
## How to Find All Available Commands
|
||||
|
||||
To see all Cline commands that can be assigned shortcuts:
|
||||
|
||||
1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
|
||||
2. Type "Cline" to filter the list
|
||||
3. Browse the available commands
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/editor-integration.png"
|
||||
alt="Editor Integration Overview"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
This helps you discover features you might not have known about and assign shortcuts to the ones you use most frequently.
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: "Commands & Shortcuts Overview"
|
||||
sidebarTitle: "Overview"
|
||||
---
|
||||
|
||||
Cline integrates directly into VSCode's interface, letting you access AI assistance without disrupting your workflow. These integrations appear as commands in context menus, keyboard shortcuts, and quick fixes throughout the editor.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/editor-integration.png"
|
||||
alt="Editor Integration Overview"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
### What are Editor Integrations?
|
||||
|
||||
Editor integrations are commands and shortcuts that let you use Cline right where you're working. Instead of switching to the Cline panel first, you can select code, right-click, and immediately send it to Cline for help.
|
||||
These integrations appear in different places throughout VSCode:
|
||||
|
||||
- In the editor context menu (right-click menu) - "Add to Cline"
|
||||
- In the terminal context menu - "Add to Cline"
|
||||
- In the Source Control view - "Generate Commit Message"
|
||||
- As keyboard shortcuts - Various Cline commands
|
||||
- As Quick Fix options (lightbulb menu) - "Fix with Cline", "Explain with Cline", "Improve with Cline"
|
||||
|
||||
### Available Editor Integrations
|
||||
|
||||
Cline offers several editor integrations, each designed to enhance different aspects of your development workflow:
|
||||
|
||||
<Columns cols={2}>
|
||||
<Card title="Code Commands" icon="code" href="/features/commands-and-shortcuts/code-commands">
|
||||
Right-click on code to add it to Cline, or use the lightbulb menu to fix errors, explain code, or improve it. Cline sees the complete code context, including imports and surrounding functions.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Terminal Integration" icon="terminal" href="/features/commands-and-shortcuts/terminal-integration">
|
||||
Add terminal output to Cline with a right-click or use `@terminal` mentions. Perfect for debugging build errors, test
|
||||
failures, or runtime issues.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Git Integration" icon="code-branch" href="/features/commands-and-shortcuts/git-integration">
|
||||
Generate commit messages, explain diffs, or analyze changes with Cline's Git integration. Cline understands your version
|
||||
control context.
|
||||
</Card>
|
||||
|
||||
{" "}
|
||||
|
||||
<Card title="Keyboard Shortcuts" icon="keyboard" href="/features/commands-and-shortcuts/keyboard-shortcuts">
|
||||
Speed up your workflow with keyboard shortcuts for common Cline actions. Quickly add code to chat, fix errors, or improve your code.
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
### How They Work
|
||||
|
||||
When you use these commands, Cline:
|
||||
|
||||
- Captures the relevant context (selected code, file path, terminal output, etc.)
|
||||
- Focuses the Cline interface
|
||||
- Creates a conversation with the captured context
|
||||
- In some cases, automatically generates a suggested prompt
|
||||
|
||||
Behind the scenes, these commands use VSCode's extension API to register commands, access editor state, and control VSCode's interface.
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
title: "Terminal Integration"
|
||||
sidebarTitle: "Terminal Integration"
|
||||
---
|
||||
|
||||
Cline's terminal integration lets you bring your terminal output directly into your conversations with Cline. Instead of copying and pasting error messages or command results, you can send them to Cline with a simple right-click in the terminal.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/terminal-integration.png"
|
||||
alt="Terminal Integration"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
## Right-Click Terminal Integration
|
||||
|
||||
When you're working in the VSCode terminal and see output you want to discuss with Cline:
|
||||
|
||||
1. Right-click in the terminal
|
||||
2. Select "Add to Cline" from the context menu
|
||||
3. The terminal output is immediately sent to the Cline chat panel
|
||||
|
||||
This is perfect for:
|
||||
|
||||
- Debugging build errors
|
||||
- Understanding test failures
|
||||
- Analyzing command output
|
||||
- Getting help with error messages
|
||||
|
||||
The right-click terminal integration is especially useful when you're already working in the terminal and encounter an issue.
|
||||
|
||||
Instead of switching context to the Cline chat panel and typing a description of the problem, you can send the terminal output directly to Cline with just a couple of clicks.
|
||||
|
||||
Alternatively, you can use the [`@terminal`](/features/at-mentions/terminal-mentions) mention to send the full terminal output to Cline.
|
||||
|
||||
<Tip>
|
||||
For information about using `@terminal` mentions in your chat messages, see the [Terminal
|
||||
Mentions](/features/at-mentions/terminal-mentions) documentation.
|
||||
</Tip>
|
||||
|
||||
## How Terminal Integration Works
|
||||
|
||||
When you use the right-click terminal integration, Cline:
|
||||
|
||||
1. Captures the terminal output with all formatting preserved
|
||||
2. Includes the complete context, including command history and results
|
||||
3. Formats it appropriately for the AI to understand
|
||||
4. Enables the AI to see exactly what you're seeing
|
||||
|
||||
This gives Cline the full context it needs to provide accurate help with terminal-related issues.
|
||||
|
||||
## Behind the Scenes
|
||||
|
||||
The terminal integration uses a clever technique to capture terminal output:
|
||||
|
||||
1. When you trigger the integration, Cline:
|
||||
|
||||
- Temporarily saves your current clipboard content
|
||||
- Selects all terminal content (or uses your existing selection)
|
||||
- Copies it to the clipboard
|
||||
- Reads the clipboard to get the terminal content
|
||||
- Restores your original clipboard content
|
||||
|
||||
2. The terminal content is then:
|
||||
- Formatted with proper syntax highlighting
|
||||
- Added to your message or sent as a new message
|
||||
- Enhanced with additional context when needed
|
||||
|
||||
This approach ensures that all terminal output, including colors and formatting, is accurately captured without affecting your clipboard.
|
||||
|
||||
## Tips for Effective Use
|
||||
|
||||
- **Use terminal integration for error messages**: When you encounter an error in the terminal, sending it to Cline often results in faster resolution than trying to describe the error.
|
||||
|
||||
- **Select specific output when needed**: By default, the integration captures all terminal content, but you can also select specific lines before right-clicking to focus on just the relevant output.
|
||||
|
||||
- **Combine with file mentions**: After sending terminal output to Cline, you can enhance your question by mentioning relevant files using the @ mentions feature.
|
||||
|
||||
- **Use for build and test output**: Terminal integration is particularly useful for understanding complex build errors or test failures that span multiple lines.
|
||||
|
||||
Next time you're staring at a cryptic error message in your terminal, try using Cline's terminal integration instead of copying and pasting. You'll get more accurate help because Cline can see the complete terminal context with proper formatting.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "Drag & Drop"
|
||||
sidebarTitle: "Drag & Drop"
|
||||
---
|
||||
|
||||
Dragging and dropping files into Cline is a quick way to add images, code, and other files to your conversations.
|
||||
|
||||
<Note>Due to VS Code quirks, to drag and drop files into the Cline chat input, you need to hold `Shift` while dragging.</Note>
|
||||
|
||||
Dragging and dropping workspace files into Cline will automatically create a [file mention](/features/at-mentions/file-mentions). This allows you to reference the file in your conversation without needing to type out the path.
|
||||
|
||||
### Supported File Types
|
||||
|
||||
Cline supports dragging external images from your file system, as well as files from your workspace.
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: "Editing Messages"
|
||||
sidebarTitle: "Editing Messages"
|
||||
---
|
||||
|
||||
Cline allows you to edit chat messages in a task after they've been submitted. This feature lets you refine your requests without starting a new task, helping you get better results with minimal disruption to your workflow.
|
||||
|
||||
## When to Edit Messages
|
||||
|
||||
You might want to edit a message when:
|
||||
|
||||
- You didn't get the results you wanted
|
||||
- You thought of a better way to phrase your request
|
||||
- You need to add more information or context
|
||||
- You made a typo or error in your original message
|
||||
|
||||
## How to Edit Messages
|
||||
|
||||
1. Click on any message in the conversation (except the initial task message)
|
||||
2. Edit the text as needed
|
||||
3. Use the restore options to resubmit your request
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/message-editing.png"
|
||||
alt="Message editing interface"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
## Restore Options
|
||||
|
||||
When you edit a message, you have two options for restoring:
|
||||
|
||||
### Restore Chat
|
||||
|
||||
The "Restore Chat" option:
|
||||
|
||||
- Restores just the task state
|
||||
- Re-submits an API request with your edited message
|
||||
- Preserves all file changes made up to that point
|
||||
- Is useful when you want to keep the current state of your workspace
|
||||
|
||||
### Restore All
|
||||
|
||||
The "Restore All" option:
|
||||
|
||||
- Restores both the task state and workspace state
|
||||
- Re-submits an API request with your edited message
|
||||
- Reverts your workspace to how it was at that point in the conversation
|
||||
- Uses [checkpoints](/features/checkpoints) under the hood to restore your workspace
|
||||
- Is useful when you want to try a completely different approach
|
||||
|
||||
## Keyboard Shortcuts
|
||||
|
||||
When editing a message, you can use these keyboard shortcuts:
|
||||
|
||||
- **Escape**: Exit edit mode without making changes
|
||||
- **Enter**: Restore just the task (equivalent to "Restore Chat")
|
||||
- **Cmd/Ctrl + Enter**: Restore the task and workspace (equivalent to "Restore All")
|
||||
- **Shift + Enter**: Insert a new line / line break in your message
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use message editing for minor adjustments to your requests
|
||||
- For major changes in direction, consider starting a new task
|
||||
- When using "Restore All," be aware that any file changes made after that message will be reverted
|
||||
- Edit messages closer to the beginning of a conversation to avoid losing significant progress
|
||||
@@ -0,0 +1,159 @@
|
||||
---
|
||||
title: "Plan & Act"
|
||||
sidebarTitle: "Plan & Act"
|
||||
---
|
||||
|
||||
Plan & Act modes represent Cline's approach to structured AI development, emphasizing thoughtful planning before implementation. This dual-mode system helps developers create more maintainable, accurate code while reducing iteration time.
|
||||
|
||||
<Frame>
|
||||
<iframe
|
||||
style={{ width: "100%", aspectRatio: "16/9" }}
|
||||
src="https://www.youtube.com/embed/b7o6URFPp64"
|
||||
title="YouTube video player"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowFullScreen></iframe>
|
||||
</Frame>
|
||||
|
||||
#### Plan Mode: Think First
|
||||
|
||||
Plan mode is where you and Cline figure out what you're trying to build and how you'll build it. In this mode, Cline:
|
||||
|
||||
- Can read your entire codebase to understand the context
|
||||
- Won't make any changes to your files
|
||||
- Focuses on understanding requirements and creating a strategy
|
||||
- Helps identify potential issues before you write a single line of code
|
||||
|
||||
#### Act Mode: Build It
|
||||
|
||||
Once you've got a plan, you switch to Act mode. Now Cline:
|
||||
|
||||
- Has all the building capabilities at its disposal
|
||||
- Can make changes to your codebase
|
||||
- Still remembers everything from your planning session
|
||||
- Executes the strategy you worked out together
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(5).png" alt="Act mode capabilities" />
|
||||
</Frame>
|
||||
|
||||
### Workflow Guide
|
||||
|
||||
When I'm working on a new feature or fixing a complex bug, here's what works for me:
|
||||
|
||||
1. I start in Plan mode and tell Cline what I want to build
|
||||
2. Cline helps me explore the codebase, looking at relevant files
|
||||
3. Together we figure out the best approach, considering edge cases and potential issues
|
||||
4. When I'm confident in our plan, I switch to Act mode
|
||||
5. Cline implements the solution based on our planning
|
||||
|
||||
#### 1. Start with Plan Mode
|
||||
|
||||
Begin every significant development task in Plan mode:
|
||||
|
||||
In this mode:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(5)%20(1).png" alt="Plan mode workflow" />
|
||||
</Frame>
|
||||
|
||||
- Share your requirements
|
||||
- Let Cline analyze relevant files
|
||||
- Engage in dialogue to clarify objectives
|
||||
- Develop implementation strategy
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(2)%20(1)%20(1)%20(1).png"
|
||||
alt="Planning phase"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
#### 2. Switch to Act Mode
|
||||
|
||||
Once you have a clear plan, switch to Act mode:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/switching-to-act.gif" alt="Switching to Act mode" />
|
||||
</Frame>
|
||||
|
||||
Act mode allows Cline to:
|
||||
|
||||
- Execute against the agreed plan
|
||||
- Make changes to your codebase
|
||||
- Maintain context from planning phase
|
||||
|
||||
#### 3. Iterate as Needed
|
||||
|
||||
Complex projects often require multiple plan-act cycles:
|
||||
|
||||
- Return to Plan mode when encountering unexpected complexity
|
||||
- Use Act mode for implementing solutions
|
||||
- Maintain development momentum while ensuring quality
|
||||
|
||||
### Best Practices
|
||||
|
||||
#### Planning Phase
|
||||
|
||||
1. Be comprehensive with requirements
|
||||
2. Share relevant context upfront
|
||||
3. Point Cline to relevant files if he hasn't read them
|
||||
4. Validate approach before implementation
|
||||
|
||||
#### Implementation Phase
|
||||
|
||||
1. Follow the established plan
|
||||
2. Monitor progress against objectives
|
||||
3. Track changes and their impact
|
||||
4. Document significant decisions
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(3)%20(1).png"
|
||||
alt="Implementation best practices"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
### Power User Tips
|
||||
|
||||
#### Enhancing Planning
|
||||
|
||||
- Use Plan mode to explore edge cases before implementation
|
||||
- Switch back to Plan when encountering unexpected complexity
|
||||
- Leverage [file reading](/features/at-mentions/file-mentions) to validate assumptions early
|
||||
- Have Cline write markdown files of the plan for future reference
|
||||
|
||||
### Common Patterns
|
||||
|
||||
#### When to Use Each Mode
|
||||
|
||||
I've found Plan mode works best when:
|
||||
|
||||
- Starting something new where the approach isn't obvious
|
||||
- Debugging a tricky issue where I'm not sure what's wrong
|
||||
- Making architectural decisions that will affect multiple parts of the codebase
|
||||
- Trying to understand a complex workflow or feature
|
||||
|
||||
And Act mode is perfect for:
|
||||
|
||||
- Implementing a solution we've already planned out
|
||||
- Making routine changes where the approach is clear
|
||||
- Following established patterns in the codebase
|
||||
- Running tests and making minor adjustments
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(6).png" alt="Mode usage patterns" />
|
||||
</Frame>
|
||||
|
||||
### Contributing
|
||||
|
||||
Share your experiences and improvements:
|
||||
|
||||
- Join our [Discord community](https://discord.gg/cline)
|
||||
- Participate in discussions
|
||||
- Submit feature requests
|
||||
- Report issues
|
||||
|
||||
---
|
||||
|
||||
Remember: The time invested in planning pays dividends in implementation quality and maintenance efficiency.
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "New Rule Command"
|
||||
sidebarTitle: "/newrule"
|
||||
---
|
||||
|
||||
`/newrule` is a slash command that lets you teach Cline your preferred way of working. It creates a markdown file in your `.clinerules` directory that acts like persistent instructions for how Cline should behave when helping with your projects.
|
||||
|
||||
Think of it as setting up house rules that Cline will always follow, so you don't have to repeat your preferences in every conversation.
|
||||
|
||||
#### Using the `/newrule` Slash Command
|
||||
|
||||
When you want Cline to consistently follow certain guidelines:
|
||||
|
||||
- Type `/newrule` in the chat
|
||||
- Cline will help you create a structured rule file by asking about your preferences for:
|
||||
- Communication style (verbose vs. concise)
|
||||
- Development workflows
|
||||
- Coding standards
|
||||
- Project context
|
||||
- Any other specific guidelines
|
||||
- You'll review the rule file before it's created
|
||||
- Once approved, Cline creates a markdown file in your `.clinerules` directory that will automatically be loaded for future conversations
|
||||
|
||||
#### Example
|
||||
|
||||
I used `/newrule` when I was fed up with repeating the same instructions on every new task. I had specific preferences for how I wanted my React components structured, which testing library to use, and even my preferred variable naming style.
|
||||
|
||||
Instead of typing these preferences each time, I just used `/newrule` and worked with Cline to create a detailed rule file. We built a markdown file that covered everything from code organization to my preference for functional components over class components.
|
||||
|
||||
Now whenever I chat with Cline about my React project, it automatically follows these guidelines without me having to remind it. The best part is that I can create different rule files for different projects, so Cline adapts to whatever codebase I'm working on.
|
||||
|
||||
#### Inspiration
|
||||
|
||||
Here's how I use `/newrule` to make my development smoother:
|
||||
|
||||
- I created a rule file for each major project with specific architectural patterns and library preferences, so Cline always generates code that matches our existing codebase.
|
||||
|
||||
- For my team's shared projects, we have a common rule file that ensures consistent code style and documentation practices regardless of who's using Cline.
|
||||
|
||||
- When working with legacy code, I made a rule file that reminds Cline about the quirks and constraints of the old system, so it never suggests modern approaches that won't integrate well.
|
||||
|
||||
- I even have a personal rule file for my side projects with all my opinionated preferences - two-space indentation, arrow functions everywhere, and my exact folder structure requirements.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: "New Task Command"
|
||||
sidebarTitle: "/newtask"
|
||||
---
|
||||
|
||||
`/newtask` is a slash command that works like a perfect developer handoff. It intelligently packages what matters - the overall plan, work accomplished, relevant files, and next steps - into a fresh task with a clean context window. All while leaving behind the noise of tool calls, documentation searches, and implementation details.
|
||||
|
||||
It's exactly what you'd do when bringing a new developer onto your project: provide the essential context they need to continue the work without overwhelming them with every keystroke that came before.
|
||||
|
||||
#### Using the `/newtask` Slash Command
|
||||
|
||||
When your context window is filling up but you're not done with your project:
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/newtask.png"
|
||||
alt="Using the /newtask slash command"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
- Type `/newtask` in the chat input field
|
||||
- Cline will analyze your conversation and propose a distilled version of the context to carry forward
|
||||
- You can refine this proposed context through conversation before committing
|
||||
- Once satisfied, a button appears to create the new task with your refined context
|
||||
|
||||
#### Example
|
||||
|
||||
I regularly use `/newtask` when working through complex implementations with multiple steps. For instance, if I've completed 3 steps of a 10-step process and my context is already 75% full with documentation snippets, file contents, and detailed discussions.
|
||||
|
||||
Rather than losing those insights or starting from scratch, I use `/newtask` to have Cline extract what matters - the key decisions, file changes, and progress so far - without all the noise of individual tool calls and research steps.
|
||||
|
||||
I like to think of `/newtask` as a new developer joining the project. I need to give them the full understanding of the work that has been done, awareness of the relevant files, any other context that would be helpful, and where to go next.
|
||||
|
||||
#### Inspiration
|
||||
|
||||
Here are some popular ways to use `/newtask`:
|
||||
|
||||
- I research complex APIs using the Context7 MCP server, filling my context with documentation. Once I understand the concepts, I use `/newtask` to start fresh with just the essential knowledge needed for implementation.
|
||||
- After identifying the root cause of a tough bug through multiple debugging attempts and file explorations, I use `/newtask` to continue with a clean slate that includes the solution but discards all the failed attempts.
|
||||
- When a client discussion explores multiple approaches and finally settles on one direction, I use `/newtask` to focus solely on implementing the chosen solution.
|
||||
- For complex projects spanning multiple days, I use `/newtask` at logical stopping points to maintain a clean workspace while carrying forward my progress.
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: "Report Bug Command"
|
||||
sidebarTitle: "/reportbug"
|
||||
---
|
||||
|
||||
`/reportbug` is an absolute lifesaver when you hit a weird issue with Cline. Instead of having to remember all the details GitHub wants for a bug report, this command turns Cline into your personal bug reporting assistant.
|
||||
|
||||
It walks you through collecting all the info needed for a proper bug report and then shoots it straight to our GitHub issues page with all the right formatting and system details included.
|
||||
|
||||
#### Using the `/reportbug` Slash Command
|
||||
|
||||
When you run into something funky that doesn't seem right:
|
||||
|
||||
- Just type `/reportbug` in the chat
|
||||
- Cline will guide you through all the details we need:
|
||||
- A quick title describing the issue
|
||||
- What actually happened vs. what you expected
|
||||
- Steps to reproduce the bug
|
||||
- Any relevant output or errors you saw
|
||||
- Additional context that might help us fix it
|
||||
- You'll get to review everything before it's submitted
|
||||
- Once you approve, it opens a perfectly formatted GitHub issue with all your info plus automatic system details
|
||||
|
||||
#### Example
|
||||
|
||||
Last week I hit a weird bug where Cline kept timing out when reading large files. Instead of trying to remember all the GitHub template fields, I just typed `/reportbug` and Cline guided me through the whole process.
|
||||
|
||||
It asked me about what I was trying to do, what happened instead, and the exact steps that led to the issue. The best part was that it automatically included my OS version, Cline version, and all the technical details our devs would need.
|
||||
|
||||
A few seconds later, I had a properly formatted GitHub issue created without having to hunt down any of that info myself.
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: "Smol Command"
|
||||
sidebarTitle: "/smol"
|
||||
---
|
||||
|
||||
`/smol` (or its alias, `/compact`) is a slash command that compresses your conversation history while preserving essential context.
|
||||
|
||||
Unlike `/newtask` which creates a new task, `/smol` condenses your current conversation into a comprehensive summary, freeing up context window space while allowing you to continue working in the same task.
|
||||
|
||||
Think of it like summarizing the relevant parts of a conversation while discarding the rest.
|
||||
|
||||
#### Using the `/smol` Slash Command
|
||||
|
||||
When your context window is getting full but you want to continue in the same task:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/smol.png" alt="Using the /smol slash command" />
|
||||
</Frame>
|
||||
|
||||
- Type `/smol` (or its alias `/compact`) in the chat input field
|
||||
- Cline will analyze your conversation and create a detailed summary that preserves essential information
|
||||
- You'll have a chance to review this summary and provide feedback if needed
|
||||
- Once accepted, the detailed conversation history is replaced with this condensed version
|
||||
|
||||
#### Example
|
||||
|
||||
I use `/smol` when I'm deep into a complex debugging session and need to continue in the same task. After exploring multiple approaches and examining several files, my context window gets crowded with all the back-and-forth.
|
||||
|
||||
By using `/smol`, I can condense all that exploration into a concise summary that captures what we've learned, which files we've examined, and what approaches we've tried. This frees up space to continue the debugging without losing the insights we've gained.
|
||||
|
||||
The key difference from `/newtask` is that I'm staying in the same conversation flow rather than creating a separate task. This is particularly useful when I'm in the middle of something and don't want to context switch.
|
||||
|
||||
#### Inspiration
|
||||
|
||||
Here are powerful ways I use `/smol` in my workflow:
|
||||
|
||||
- During lengthy brainstorming sessions, I use `/smol` to condense our exploration before implementing the chosen solution, all within the same task.
|
||||
- When debugging complex issues that involve multiple file checks and test runs, I use `/smol` to summarize what we've learned while continuing the debugging process.
|
||||
- For iterative development, I use `/smol` after completing each feature to compress the implementation details while keeping the key decisions and approaches accessible.
|
||||
- When gathering requirements from multiple sources, I use `/smol` to distill the essential needs into a concise summary before moving to the design phase.
|
||||
|
||||
#### Smol vs Newtask
|
||||
|
||||
People often ask me when to use `/smol` vs `/newtask`. Frankly, it's a matter of personal preference and what you're trying to achieve. Here are some guidelines:
|
||||
|
||||
- Use `/smol` when you're in the middle of something and want to keep going in the same task. It's perfect when you're deep in a debugging flow or brainstorming session and don't want to break your momentum. The downside? Once you compress your history, you can't get those detailed conversations back.
|
||||
- Use `/newtask` when you're at a logical transition point and want to start fresh. It's great for moving from planning to implementation, or when you want to preserve your full conversation history (since it creates a new task rather than overwriting your current one).
|
||||
@@ -0,0 +1,445 @@
|
||||
---
|
||||
title: "Workflows"
|
||||
sidebarTitle: "Workflows"
|
||||
---
|
||||
|
||||
Workflows allow you to define a series of steps to guide Cline through a repetitive set of tasks, such as deploying a service or submitting a PR.
|
||||
|
||||
To invoke a workflow, type `/[workflow-name.md]` in the chat.
|
||||
|
||||
## How to Create and Use Workflows
|
||||
|
||||
Workflows live alongside [Cline Rules](/features/cline-rules). Creating one is straightforward:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/workflows.png" alt="Workflows tab in Cline" />
|
||||
</Frame>
|
||||
|
||||
1. Create a markdown file with clear instructions for the steps Cline should take
|
||||
2. Save it with a `.md` extension in your workflows directory
|
||||
3. To trigger a workflow, just type `/` followed by the workflow filename
|
||||
4. Provide any required parameters when prompted
|
||||
|
||||
The real power comes from how you structure your workflow files. You can:
|
||||
|
||||
- Leverage Cline's [built-in tools](/exploring-clines-tools/cline-tools-guide) like `ask_followup_question`, `read_file`, `search_files`, and `new_task`
|
||||
- Use command-line tools you already have installed like `gh` or `docker`
|
||||
- Reference external [MCP tool calls](/mcp/mcp-overview) like Slack or Whatsapp
|
||||
- Chain multiple actions together in a specific sequence
|
||||
|
||||
## Real-world Example
|
||||
|
||||
I created a PR Review workflow that's already saving me tons of time.
|
||||
|
||||
````md pr-review.md [expandable]
|
||||
You have access to the `gh` terminal command. I already authenticated it for you. Please review it to use the PR that I asked you to review. You're already in the `cline` repo.
|
||||
|
||||
<detailed_sequence_of_steps>
|
||||
|
||||
# GitHub PR Review Process - Detailed Sequence of Steps
|
||||
|
||||
## 1. Gather PR Information
|
||||
|
||||
1. Get the PR title, description, and comments:
|
||||
|
||||
```bash
|
||||
gh pr view <PR-number> --json title,body,comments
|
||||
```
|
||||
|
||||
2. Get the full diff of the PR:
|
||||
```bash
|
||||
gh pr diff <PR-number>
|
||||
```
|
||||
|
||||
## 2. Understand the Context
|
||||
|
||||
1. Identify which files were modified in the PR:
|
||||
|
||||
```bash
|
||||
gh pr view <PR-number> --json files
|
||||
```
|
||||
|
||||
2. Examine the original files in the main branch to understand the context:
|
||||
|
||||
```xml
|
||||
<read_file>
|
||||
<path>path/to/file</path>
|
||||
</read_file>
|
||||
```
|
||||
|
||||
3. For specific sections of a file, you can use search_files:
|
||||
```xml
|
||||
<search_files>
|
||||
<path>path/to/directory</path>
|
||||
<regex>search term</regex>
|
||||
<file_pattern>*.ts</file_pattern>
|
||||
</search_files>
|
||||
```
|
||||
|
||||
## 3. Analyze the Changes
|
||||
|
||||
1. For each modified file, understand:
|
||||
|
||||
- What was changed
|
||||
- Why it was changed (based on PR description)
|
||||
- How it affects the codebase
|
||||
- Potential side effects
|
||||
|
||||
2. Look for:
|
||||
- Code quality issues
|
||||
- Potential bugs
|
||||
- Performance implications
|
||||
- Security concerns
|
||||
- Test coverage
|
||||
|
||||
## 4. Ask for User Confirmation
|
||||
|
||||
1. Before making a decision, ask the user if you should approve the PR, providing your assessment and justification:
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Based on my review of PR #<PR-number>, I recommend [approving/requesting changes]. Here's my justification:
|
||||
|
||||
[Detailed justification with key points about the PR quality, implementation, and any concerns]
|
||||
|
||||
Would you like me to proceed with this recommendation?</question>
|
||||
<options>["Yes, approve the PR", "Yes, request changes", "No, I'd like to discuss further"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
## 5. Ask if User Wants a Comment Drafted
|
||||
|
||||
1. After the user decides on approval/rejection, ask if they would like a comment drafted:
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
|
||||
<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
2. If the user wants a comment drafted, provide a well-structured comment they can copy:
|
||||
|
||||
```
|
||||
Thank you for this PR! Here's my assessment:
|
||||
|
||||
[Detailed assessment with key points about the PR quality, implementation, and any suggestions]
|
||||
|
||||
[Include specific feedback on code quality, functionality, and testing]
|
||||
```
|
||||
|
||||
## 6. Make a Decision
|
||||
|
||||
1. Approve the PR if it meets quality standards:
|
||||
|
||||
```bash
|
||||
# For single-line comments:
|
||||
gh pr review <PR-number> --approve --body "Your approval message"
|
||||
|
||||
# For multi-line comments with proper whitespace formatting:
|
||||
cat << EOF | gh pr review <PR-number> --approve --body-file -
|
||||
Thanks @username for this PR! The implementation looks good.
|
||||
|
||||
I particularly like how you've handled X and Y.
|
||||
|
||||
Great work!
|
||||
EOF
|
||||
```
|
||||
|
||||
2. Request changes if improvements are needed:
|
||||
|
||||
```bash
|
||||
# For single-line comments:
|
||||
gh pr review <PR-number> --request-changes --body "Your feedback message"
|
||||
|
||||
# For multi-line comments with proper whitespace formatting:
|
||||
cat << EOF | gh pr review <PR-number> --request-changes --body-file -
|
||||
Thanks @username for this PR!
|
||||
|
||||
The implementation looks promising, but there are a few things to address:
|
||||
|
||||
1. Issue one
|
||||
2. Issue two
|
||||
|
||||
Please make these changes and we can merge this.
|
||||
EOF
|
||||
```
|
||||
|
||||
Note: The `cat << EOF | ... --body-file -` approach preserves all whitespace and formatting without requiring temporary files. The `-` parameter tells the command to read from standard input.
|
||||
</detailed_sequence_of_steps>
|
||||
|
||||
<example_review_process>
|
||||
|
||||
# Example PR Review Process
|
||||
|
||||
Let's walk through a real example of reviewing PR #3627 which fixes the thinking mode calculation for Claude 3.7 models.
|
||||
|
||||
## Step 1: Gather PR Information
|
||||
|
||||
```bash
|
||||
# Get PR details
|
||||
gh pr view 3627 --json title,body,comments
|
||||
|
||||
# Get the full diff
|
||||
gh pr diff 3627
|
||||
```
|
||||
|
||||
## Step 2: Understand the Context
|
||||
|
||||
```xml
|
||||
# Examine the original files to understand what's being changed
|
||||
<read_file>
|
||||
<path>src/shared/api.ts</path>
|
||||
</read_file>
|
||||
|
||||
# Look at the ThinkingBudgetSlider component implementation
|
||||
<read_file>
|
||||
<path>webview-ui/src/components/settings/ThinkingBudgetSlider.tsx</path>
|
||||
</read_file>
|
||||
|
||||
# Check how thinking mode is currently handled in API providers
|
||||
<search_files>
|
||||
<path>src/api/providers</path>
|
||||
<regex>reasoningOn</regex>
|
||||
<file_pattern>*.ts</file_pattern>
|
||||
</search_files>
|
||||
```
|
||||
|
||||
## Step 3: Analyze the Changes
|
||||
|
||||
From the PR information and code examination, we can see that:
|
||||
|
||||
1. The PR fixes an issue with the thinking mode budget calculation for Claude 3.7 models
|
||||
2. Currently, the thinking budget is incorrectly calculated as 80% of maxTokens (8192), resulting in 6553 tokens
|
||||
3. Claude 3.7 actually supports a much larger thinking budget (up to 64000 tokens)
|
||||
4. The PR adds a `thinkingConfig` property with `maxBudget: 64000` to model definitions
|
||||
5. It updates API handlers to use this value when reasoning mode is enabled
|
||||
6. It enhances the slider component to calculate max values based on model-specific percentages
|
||||
7. Comprehensive tests were added to verify the calculations
|
||||
|
||||
## Step 4: Ask for User Confirmation
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Based on my review of PR #3627, I recommend approving this PR. Here's my justification:
|
||||
|
||||
1. The PR correctly fixes the thinking mode budget calculation for Claude 3.7 models
|
||||
2. It properly implements the thinkingConfig.maxBudget property (64000) for Claude 3.7 models
|
||||
3. It applies the appropriate percentage (50%) for the slider calculation
|
||||
4. The changes are well-tested with comprehensive unit tests
|
||||
5. The implementation is clean and follows the project's coding standards
|
||||
6. The PR includes helpful screenshots demonstrating the fix
|
||||
|
||||
Would you like me to proceed with approving this PR?</question>
|
||||
<options>["Yes, approve the PR", "No, I'd like to discuss further", "Let me review it myself first"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
## Step 5: Ask if User Wants a Comment Drafted
|
||||
|
||||
```xml
|
||||
<ask_followup_question>
|
||||
<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
|
||||
<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
|
||||
</ask_followup_question>
|
||||
```
|
||||
|
||||
## Step 6: Make a Decision
|
||||
|
||||
```bash
|
||||
# Option 1: Simple one-line comment
|
||||
gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models."
|
||||
|
||||
# Option 2: Multi-line comment with proper whitespace formatting
|
||||
cat << EOF | gh pr review 3627 --approve --body-file -
|
||||
This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models.
|
||||
|
||||
I particularly like:
|
||||
1. The proper implementation of thinkingConfig.maxBudget property (64000)
|
||||
2. The appropriate percentage (50%) for the slider calculation
|
||||
3. The comprehensive unit tests
|
||||
4. The clean implementation that follows project coding standards
|
||||
|
||||
Great work!
|
||||
EOF
|
||||
```
|
||||
|
||||
</example_review_process>
|
||||
|
||||
<common_gh_commands>
|
||||
|
||||
# Common GitHub CLI Commands for PR Review
|
||||
|
||||
## Basic PR Commands
|
||||
|
||||
```bash
|
||||
# List open PRs
|
||||
gh pr list
|
||||
|
||||
# View a specific PR
|
||||
gh pr view <PR-number>
|
||||
|
||||
# View PR with specific fields
|
||||
gh pr view <PR-number> --json title,body,comments,files,commits
|
||||
|
||||
# Check PR status
|
||||
gh pr status
|
||||
```
|
||||
|
||||
## Diff and File Commands
|
||||
|
||||
```bash
|
||||
# Get the full diff of a PR
|
||||
gh pr diff <PR-number>
|
||||
|
||||
# List files changed in a PR
|
||||
gh pr view <PR-number> --json files
|
||||
|
||||
# Check out a PR locally
|
||||
gh pr checkout <PR-number>
|
||||
```
|
||||
|
||||
## Review Commands
|
||||
|
||||
```bash
|
||||
# Approve a PR (single-line comment)
|
||||
gh pr review <PR-number> --approve --body "Your approval message"
|
||||
|
||||
# Approve a PR (multi-line comment with proper whitespace)
|
||||
cat << EOF | gh pr review <PR-number> --approve --body-file -
|
||||
Your multi-line
|
||||
approval message with
|
||||
|
||||
proper whitespace formatting
|
||||
EOF
|
||||
|
||||
# Request changes on a PR (single-line comment)
|
||||
gh pr review <PR-number> --request-changes --body "Your feedback message"
|
||||
|
||||
# Request changes on a PR (multi-line comment with proper whitespace)
|
||||
cat << EOF | gh pr review <PR-number> --request-changes --body-file -
|
||||
Your multi-line
|
||||
change request with
|
||||
|
||||
proper whitespace formatting
|
||||
EOF
|
||||
|
||||
# Add a comment review (without approval/rejection)
|
||||
gh pr review <PR-number> --comment --body "Your comment message"
|
||||
|
||||
# Add a comment review with proper whitespace
|
||||
cat << EOF | gh pr review <PR-number> --comment --body-file -
|
||||
Your multi-line
|
||||
comment with
|
||||
|
||||
proper whitespace formatting
|
||||
EOF
|
||||
```
|
||||
|
||||
## Additional Commands
|
||||
|
||||
```bash
|
||||
# View PR checks status
|
||||
gh pr checks <PR-number>
|
||||
|
||||
# View PR commits
|
||||
gh pr view <PR-number> --json commits
|
||||
|
||||
# Merge a PR (if you have permission)
|
||||
gh pr merge <PR-number> --merge
|
||||
```
|
||||
|
||||
</common_gh_commands>
|
||||
|
||||
<general_guidelines_for_commenting>
|
||||
When reviewing a PR, please talk normally and like a friendly reviwer. You should keep it short, and start out by thanking the author of the pr and @ mentioning them.
|
||||
|
||||
Whether or not you approve the PR, you should then give a quick summary of the changes without being too verbose or definitive, staying humble like that this is your understanding of the changes. Kind of how I'm talking to you right now.
|
||||
|
||||
If you have any suggestions, or things that need to be changed, request changes instead of approving the PR.
|
||||
|
||||
Leaving inline comments in code is good, but only do so if you have something specific to say about the code. And make sure you leave those comments first, and then request changes in the PR with a short comment explaining the overall theme of what you're asking them to change.
|
||||
</general_guidelines_for_commenting>
|
||||
|
||||
<example_comments_that_i_have_written_before>
|
||||
<brief_approve_comment>
|
||||
Looks good, though we should make this generic for all providers & models at some point
|
||||
</brief_approve_comment>
|
||||
<brief_approve_comment>
|
||||
Will this work for models that may not match across OR/Gemini? Like the thinking models?
|
||||
</brief_approve_comment>
|
||||
<approve_comment>
|
||||
This looks great! I like how you've handled the global endpoint support - adding it to the ModelInfo interface makes total sense since it's just another capability flag, similar to how we handle other model features.
|
||||
|
||||
The filtered model list approach is clean and will be easier to maintain than hardcoding which models work with global endpoints. And bumping the genai library was obviously needed for this to work.
|
||||
|
||||
Thanks for adding the docs about the limitations too - good for users to know they can't use context caches with global endpoints but might get fewer 429 errors.
|
||||
</approve_comment>
|
||||
<requesst_changes_comment>
|
||||
This is awesome. Thanks @scottsus.
|
||||
|
||||
My main concern though - does this work for all the possible VS Code themes? We struggled with this initially which is why it's not super styled currently. Please test and share screenshots with the different themes to make sure before we can merge
|
||||
</request_changes_comment>
|
||||
<request_changes_comment>
|
||||
Hey, the PR looks good overall but I'm concerned about removing those timeouts. Those were probably there for a reason - VSCode's UI can be finicky with timing.
|
||||
|
||||
Could you add back the timeouts after focusing the sidebar? Something like:
|
||||
|
||||
```typescript
|
||||
await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus")
|
||||
await setTimeoutPromise(100) // Give UI time to update
|
||||
visibleWebview = WebviewProvider.getSidebarInstance()
|
||||
```
|
||||
|
||||
</request_changes_comment>
|
||||
<request_changes_comment>
|
||||
Heya @alejandropta thanks for working on this!
|
||||
|
||||
A few notes:
|
||||
1 - Adding additional info to the environment variables is fairly problematic because env variables get appended to **every single message**. I don't think this is justifiable for a somewhat niche use case.
|
||||
2 - Adding this option to settings to include that could be an option, but we want our options to be simple and straightforward for new users
|
||||
3 - We're working on revisualizing the way our settings page is displayed/organized, and this could potentially be reconciled once that is in and our settings page is more clearly delineated.
|
||||
|
||||
So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us.
|
||||
</request_changes_comment>
|
||||
<request_changes_comment>
|
||||
Also, don't forget to add a changeset since this fixes a user-facing bug.
|
||||
|
||||
The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts.
|
||||
</request_changes_comment>
|
||||
</example_comments_that_i_have_written_before>
|
||||
````
|
||||
|
||||
When I get a new PR to review, I used to manually gather context: checking the PR description, examining the diff, looking at surrounding files, and finally forming an opinion. Now I just:
|
||||
|
||||
1. Type `/pr-review.md` in chat
|
||||
2. Paste in the PR number
|
||||
3. Let Cline handle everything else
|
||||
|
||||
My workflow uses the `gh` command-line tool and Cline's built in `ask_followup_question` to:
|
||||
|
||||
- Pull the PR description and comments
|
||||
- Examine the diff
|
||||
- Check surrounding files for context
|
||||
- Analyze potential issues
|
||||
- Asks me if it's cool approve it if everything looks good, with justification for why it should be approved
|
||||
- If I say "yes," Cline automatically approves the PR with the `gh` command
|
||||
|
||||
This has taken my PR review process from a manual, multi-step operation to a single command that gives me everything I need to make an informed decision.
|
||||
|
||||
> This is just one example of a workflow file. You can find more in our [prompts repository](https://github.com/cline/prompts) for inspiration.
|
||||
|
||||
## Building Your Own Workflows
|
||||
|
||||
The beauty of workflows is they're completely customizable to your needs. You might create workflows for all kinds of repetitive tasks:
|
||||
|
||||
- For releases, you could have a workflow that grabs all merged PRs, builds a changelog, and handles version bumps.
|
||||
- Setting up new projects is perfect for workflows. Just run one command to create your folder structure, install dependencies, and set up configs.
|
||||
- Need to create a report? Create a workflow that grabs stats from different sources and formats them exactly how you like. You can even visualize them with a charting library and then make a presentation out of it with a library like [slidev](https://sli.dev/).
|
||||
- You can even use workflows to draft messages to your team using an MCP server like Slack or Whatsapp after you submit a PR.
|
||||
|
||||
With Workflows, your imagination is the limit. The true potential comes from spotting those annoying repetitive tasks you do all the time.
|
||||
|
||||
If you can describe something as "first I do X, then Y, then Z" - that's a perfect workflow candidate.
|
||||
|
||||
Start with something small that bugs you, turn it into a workflow, and keep refining it. You'll be shocked how much of your day can be automated this way.
|
||||
@@ -0,0 +1,68 @@
|
||||
---
|
||||
title: "For New Coders"
|
||||
description: "Welcome to Cline, your AI-powered coding companion! This guide will help you quickly set up your development environment and begin your coding journey with ease."
|
||||
---
|
||||
|
||||
> 💡 **Tip:** If you're completely new to coding, take your time with each step. There's no rush — Cline is here to guide you!
|
||||
|
||||
### 🚀 Getting Started
|
||||
|
||||
Before you jump into coding, make sure you have these essentials ready:
|
||||
|
||||
#### 1. **VS Code**
|
||||
|
||||
A popular, free, and powerful code editor.
|
||||
|
||||
- [<u>Download VS Code</u>](https://code.visualstudio.com/)
|
||||
|
||||
📺 **Recommended YouTube Tutorial:** [<u>How to Install VS Code</u>](https://www.youtube.com/watch?v=MlIzFUI1QGA)
|
||||
|
||||
> ✅ **Pro Tip:** Install VS Code in your Applications folder (macOS) or Program Files (Windows) for easy access from your dock or start menu.
|
||||
|
||||
#### 2. **Organize Your Projects**
|
||||
|
||||
Create a dedicated folder named `Cline` in your Documents folder for all your coding projects:
|
||||
|
||||
- **macOS:** `/Users/[your-username]/Documents/Cline`
|
||||
- **Windows:** `C:\Users\[your-username]\Documents\Cline`
|
||||
|
||||
Inside your `Cline` folder, structure projects clearly:
|
||||
|
||||
- `Documents/Cline/workout-app` _(e.g., for a fitness tracking app)_
|
||||
- `Documents/Cline/portfolio-website` _(e.g., to showcase your work)_
|
||||
|
||||
> 💡 **Tip:** Keeping your projects organized from the start will save you time and confusion later!
|
||||
|
||||
#### 3. **Install the Cline VS Code Extension**
|
||||
|
||||
Enhance your coding workflow by installing the Cline extension directly within VS Code:
|
||||
|
||||
- Get Started with Cline Extension Tutorial
|
||||
|
||||
📺 **Recommended YouTube Tutorial:** [<u>How To Install Extensions in VS Code</u>](https://www.youtube.com/watch?v=E7trgwZa-mk)
|
||||
|
||||
> ✅ **Pro Tip:** After installing, reload VS Code to ensure the extension is activated properly.
|
||||
|
||||
#### 4. **Essential Development Tools**
|
||||
|
||||
Basic software required for coding efficiently:
|
||||
|
||||
- Homebrew (macOS)
|
||||
- Node.js
|
||||
- Git
|
||||
|
||||
👉 [<u>Follow our detailed guide on Installing Essential Development Tools with step-by-step help from Cline.</u>](https://docs.cline.bot/getting-started/installing-dev-essentials#installing-dev-essentials)
|
||||
|
||||
📺 **Recommended YouTube Tutorials for Manual Installation:**
|
||||
|
||||
- **For macOS:**
|
||||
- [<u>Install Homebrew on Mac</u>](https://www.youtube.com/watch?v=hwGNgVbqasc)
|
||||
- [<u>Install Git on macOS 2024</u>](https://www.youtube.com/watch?v=B4qsvQ5IqWk)
|
||||
- [<u>Install Node.js on Mac (M1 | M2 | M3)</u>](https://www.youtube.com/watch?v=I8H4wolRFBk)
|
||||
- **For Windows:**
|
||||
- [<u>Install Git on Windows 10/11 (2024)</u>](https://www.youtube.com/watch?v=yjxv1HuRQy0)
|
||||
- [<u>Install Node.js in Windows 10/11</u>](https://www.youtube.com/watch?v=uCgAuOYpJd0)
|
||||
|
||||
> ⚠️ **Note:** If you run into permission issues during installation, try running your terminal or command prompt as an administrator.
|
||||
|
||||
🎉 You're all set! Dive in and start coding smarter and faster with **Cline**.
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
title: "Installing Cline"
|
||||
description: "Cline is a VS Code extension that brings AI-powered coding assistance directly
|
||||
to your editor. Install using one of these methods:"
|
||||
---
|
||||
|
||||
### Installation Options
|
||||
|
||||
- **VS Code Marketplace (Recommended):** Fastest method for standard VS Code and Cursor users.
|
||||
- **Open VSX Registry:** For VS Code-compatible editors like VSCodium.
|
||||
|
||||
### 🛠️ VS Code Marketplace: Step-by-Step Setup
|
||||
|
||||
Follow these steps to get Cline up and running:
|
||||
|
||||
1. **Open VS Code:** Launch the VS Code application.
|
||||
|
||||
> ⚠️ **Note:** If VS Code shows "Running extensions might...", click "Allow".
|
||||
|
||||
2. **Open Your Cline Folder:** In VS Code, open the Cline folder you created in Documents.
|
||||
3. **Navigate to Extensions:** Click on the Extensions icon in the Activity Bar on the side of VS Code (`Ctrl + Shift + X` or `Cmd + Shift + X`).
|
||||
4. **Search for 'Cline':** In the Extensions search bar, type `Cline`.
|
||||
|
||||
<Frame caption="VS Code marketplace with Cline extension ready to install">
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(20).png"
|
||||
alt="VS Code marketplace showing Cline extension"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
1. **Install the Extension:** Click the "Install" button next to the Cline extension.
|
||||
2. **Open Cline:**
|
||||
- Click the Cline icon in the Activity Bar.
|
||||
- Or, use the command palette (`Ctrl/Cmd + Shift + P`) and type "Cline: Open In New Tab" for a better view.
|
||||
3. **Troubleshooting:** If you don't see the Cline icon, try restarting VS Code.
|
||||
|
||||
> ✅ **Pro Tip:** You should see the Cline chat window appear in your VS Code editor!
|
||||
|
||||
### 🌐 Open VSX Registry
|
||||
|
||||
For VS Code-compatible editors without Marketplace access (like VSCodium and Windsurf):
|
||||
|
||||
1. Open your editor.
|
||||
2. Access the Extensions view.
|
||||
3. Search for "Cline".
|
||||
4. Select "Cline" by saoudrizwan and click **Install**.
|
||||
5. Reload if prompted.
|
||||
|
||||
### 👤 Creating Your Cline Account
|
||||
|
||||
Now that you have Cline installed, let's get you set up with your account:
|
||||
|
||||
1. **Sign In to Cline:**
|
||||
- Click the **Sign In** button in the Cline extension.
|
||||
- You'll be taken to [app.cline.bot](https://app.cline.bot) to create your account.
|
||||
2. **Start with Free Credits:**
|
||||
- No credit card needed!
|
||||
3. **Available AI Models:**
|
||||
- Anthropic Claude 3.5-Sonnet (recommended for coding)
|
||||
- DeepSeek Chat (cost-effective alternative)
|
||||
- Google Gemini 2.0 Flash
|
||||
- And more — all through your Cline account.
|
||||
|
||||
### 💻 Your First Interaction with Cline
|
||||
|
||||
You're ready to start building! Copy and paste this prompt into the Cline chat window:
|
||||
|
||||
```
|
||||
Hey Cline! Could you help me create a new project folder called "hello-world" in my Cline directory and make a simple webpage that says "Hello World" in big blue text?
|
||||
```
|
||||
|
||||
> ✅ **Pro Tip:** Cline will help you create the project folder and set up your first webpage!
|
||||
|
||||
### 🧩 Tips for Working with Cline
|
||||
|
||||
- **Ask Questions:** If you're unsure about something, ask Cline!
|
||||
- **Use Screenshots:** Cline can understand images — show him what you're working on.
|
||||
- **Copy and Paste Errors:** Share error messages in the chat for solutions.
|
||||
- **Speak Plainly:** Use your own words — Cline will translate them into code.
|
||||
|
||||
### 🫂 Still Struggling?
|
||||
|
||||
Join our Discord community and engage with our team and other Cline users directly.
|
||||
@@ -0,0 +1,111 @@
|
||||
---
|
||||
title: "Installing Dev Essentials"
|
||||
description: >-
|
||||
When you start coding, you'll need some essential development tools installed
|
||||
on your computer. Cline can help you install everything you need in a safe,
|
||||
guided way.
|
||||
---
|
||||
|
||||
### 🧰 The Essential Tools
|
||||
|
||||
Here are the core tools you'll need for development:
|
||||
|
||||
- **Node.js & npm:** Required for JavaScript and web development
|
||||
- **Git:** For tracking changes in your code and collaborating with others
|
||||
- **Package Managers:** Tools that make it easy to install other development tools
|
||||
- Homebrew for macOS
|
||||
- Chocolatey for Windows
|
||||
- apt/yum for Linux
|
||||
|
||||
> 💡 **Tip:** These tools are the foundation of your developer toolkit. Installing them properly will set you up for success!
|
||||
|
||||
### 🚀 Let Cline Install Everything
|
||||
|
||||
Copy one of these prompts based on your operating system and paste it into **Cline**:
|
||||
|
||||
#### For macOS
|
||||
|
||||
```
|
||||
Hello Cline! I need help setting up my Mac for software development. Could you please help me install the essential development tools like Homebrew, Node.js, Git, and any other core utilities that are commonly needed for coding? I'd like you to guide me through the process step-by-step.
|
||||
```
|
||||
|
||||
#### For Windows
|
||||
|
||||
```
|
||||
Hello Cline! I need help setting up my Windows PC for software development. Could you please help me install the essential development tools like Node.js, Git, and any other core utilities that are commonly needed for coding? I'd like you to guide me through the process step-by-step.
|
||||
```
|
||||
|
||||
#### For Linux
|
||||
|
||||
```
|
||||
Hello Cline! I need help setting up my Linux system for software development. Could you please help me install the essential development tools like Node.js, Git, and any other core utilities that are commonly needed for coding? I'd like you to guide me through the process step-by-step.
|
||||
```
|
||||
|
||||
> ✅ **Pro Tip:** Cline will show you each command before running it. You stay in control the entire time!
|
||||
|
||||
### 🔍 What Will Happen
|
||||
|
||||
Cline will guide you through the following steps:
|
||||
|
||||
1. Installing the appropriate package manager for your system
|
||||
2. Using the package manager to install Node.js and Git
|
||||
3. Showing you the exact command before it runs (you approve each step!)
|
||||
4. Verifying each installation is successful
|
||||
|
||||
> ⚠️ **Note:** You might need to enter your computer's password for some installations. This is normal!
|
||||
|
||||
### 💡 Why These Tools Are Important
|
||||
|
||||
- **Node.js & npm:**
|
||||
- Build websites with frameworks like React or Next.js
|
||||
- Run JavaScript code
|
||||
- Install JavaScript packages
|
||||
- **Git:**
|
||||
- Save different versions of your code
|
||||
- Collaborate with other developers
|
||||
- Back up your work
|
||||
- **Package Managers:**
|
||||
- Quickly install and update development tools
|
||||
- Keep your environment organized and up to date
|
||||
|
||||
### 🧩 Notes
|
||||
|
||||
> 💡 **Tip:** The installation process is interactive — Cline will guide you step by step!
|
||||
|
||||
- All commands are shown to you for approval before they run.
|
||||
- If you run into any issues, Cline will help troubleshoot them.
|
||||
- You may need to enter your computer's password for certain steps.
|
||||
|
||||
### 🧑💻 Additional Tips for New Coders
|
||||
|
||||
#### Understanding the Terminal
|
||||
|
||||
The Terminal is an application where you can type commands to interact with your computer.
|
||||
|
||||
- **macOS:** Open it by searching for "Terminal" in Spotlight.
|
||||
- **Example:**
|
||||
|
||||
```
|
||||
$ open -a Terminal
|
||||
```
|
||||
|
||||
#### Understanding VS Code Features
|
||||
|
||||
- **Terminal in VS Code:** Run commands directly from within VS Code!
|
||||
- Go to **View > Terminal** or press \`Ctrl + \`\`.
|
||||
- Example:
|
||||
|
||||
```
|
||||
$ node -v
|
||||
v16.14.0
|
||||
```
|
||||
|
||||
- **Document View:** Where you edit your code files.
|
||||
- Open files from the Explorer panel on the left.
|
||||
- **Problems Section:** View errors or warnings in your code.
|
||||
- Access it by clicking the lightbulb icon or **View > Problems**.
|
||||
|
||||
#### Common Features
|
||||
|
||||
- **Command Line Interface (CLI):** A powerful tool for running commands.
|
||||
- **Permissions:** You might need to grant permissions to certain commands — this keeps your system secure.
|
||||
@@ -0,0 +1,126 @@
|
||||
---
|
||||
title: "Model Selection Guide"
|
||||
description: "Last updated: Feb 5, 2025."
|
||||
---
|
||||
|
||||
## Understanding Context Windows
|
||||
|
||||
Think of a context window as your AI assistant's working memory - similar to RAM in a computer. It determines how much information the model can "remember" and process at once during your conversation. This includes:
|
||||
|
||||
- Your code files and conversations
|
||||
- The assistant's responses
|
||||
- Any documentation or additional context provided
|
||||
|
||||
Context windows are measured in tokens (roughly 3/4 of a word in English). Different models have different context window sizes:
|
||||
|
||||
- Claude 3.5 Sonnet: 200K tokens
|
||||
- DeepSeek Models: 128K tokens
|
||||
- Gemini Flash 2.0: 1M tokens
|
||||
- Gemini 1.5 Pro: 2M tokens
|
||||
|
||||
When you reach the limit of your context window, older information needs to be removed to make room for new information - just like clearing RAM to run new programs. This is why sometimes AI assistants might seem to "forget" earlier parts of your conversation.
|
||||
|
||||
Cline helps you manage this limitation with its Context Window Progress Bar, which shows:
|
||||
|
||||
- Input tokens (what you've sent to the model)
|
||||
- Output tokens (what the model has generated)
|
||||
- A visual representation of how much of your context window you've used
|
||||
- The total capacity for your chosen model
|
||||
|
||||
<Frame caption="Visual representation of the context window usage in Cline">
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(11).png"
|
||||
alt="Context window progress bar example"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
This visibility helps you work more effectively with Cline by letting you know when you might need to start fresh or break tasks into smaller chunks.
|
||||
|
||||
### Model Comparison
|
||||
|
||||
## LLM Model Comparison for Cline (Feb 2025)
|
||||
|
||||
| Model | Input Cost\* | Output Cost\* | Context Window | Best For |
|
||||
| ----------------- | ------------ | ------------- | -------------- | ----------------------------------- |
|
||||
| Claude 3.5 Sonnet | $3.00 | $15.00 | 200K | Best code implementation & tool use |
|
||||
| DeepSeek R1 | $0.55 | $2.19 | 128K | Planning & reasoning champion |
|
||||
| DeepSeek V3 | $0.14 | $0.28 | 128K | Value code implementation |
|
||||
| o3-mini | $1.10 | $4.40 | 200K | Flexible use, strong planning |
|
||||
| Gemini Flash 2.0 | $0.00 | $0.00 | 1M | Strong all-rounder |
|
||||
| Gemini 1.5 Pro | $0.00 | $0.00 | 2M | Large context processing |
|
||||
|
||||
\*Costs per million tokens
|
||||
|
||||
### Top Picks for 2025
|
||||
|
||||
1. **Claude 3.5 Sonnet**
|
||||
- Best overall code implementation
|
||||
- Most reliable tool usage
|
||||
- Expensive but worth it for critical code
|
||||
2. **DeepSeek R1**
|
||||
- Exceptional planning & reasoning
|
||||
- Great value pricing
|
||||
3. **o3-mini**
|
||||
- Strong for planning with adjustable reasoning
|
||||
- Three reasoning modes for different needs
|
||||
- Requires OpenAI Tier 3 API access
|
||||
- 200K context window
|
||||
4. **DeepSeek V3**
|
||||
- Reliable code implementation
|
||||
- Great for daily coding
|
||||
- Cost-effective for implementation
|
||||
5. **Gemini Flash 2.0**
|
||||
- Massive 1M context window
|
||||
- Improved speed and performance
|
||||
- Good all-around capabilities
|
||||
|
||||
### Best Models by Mode (Plan or Act)
|
||||
|
||||
#### Planning
|
||||
|
||||
1. **DeepSeek R1**
|
||||
- Best reasoning capabilities in class
|
||||
- Excellent at breaking down complex tasks
|
||||
- Strong math/algorithm planning
|
||||
- MoE architecture helps with reasoning
|
||||
2. **o3-mini (high reasoning)**
|
||||
- Three reasoning levels:
|
||||
- High: Complex planning
|
||||
- Medium: Daily tasks
|
||||
- Low: Quick ideas
|
||||
- 200K context helps with large projects
|
||||
3. **Gemini Flash 2.0**
|
||||
- Massive context window for complex planning
|
||||
- Strong reasoning capabilities
|
||||
- Good with multi-step tasks
|
||||
|
||||
#### Acting (coding)
|
||||
|
||||
1. **Claude 3.5 Sonnet**
|
||||
- Best code quality
|
||||
- Most reliable with Cline tools
|
||||
- Worth the premium for critical code
|
||||
2. **DeepSeek V3**
|
||||
- Nearly Sonnet-level code quality
|
||||
- Better API stability than R1
|
||||
- Great for daily coding
|
||||
- Strong tool usage
|
||||
3. **Gemini 1.5 Pro**
|
||||
- 2M context window
|
||||
- Good with complex codebases
|
||||
- Reliable API
|
||||
- Strong multi-file understanding
|
||||
|
||||
### A Note on Local Models
|
||||
|
||||
While running models locally might seem appealing for cost savings, we currently don't recommend any local models for use with Cline. [Local models are significantly less reliable](https://docs.cline.bot/running-models-locally/read-me-first) at using Cline's essential tools and typically retain only 1-26% of the original model's capabilities. The full cloud version of DeepSeek-R1, for example, is 671B parameters - local versions are drastically simplified copies that struggle with complex tasks and tool usage. Even with high-end hardware (RTX 3070+, 32GB+ RAM), you'll experience slower responses, less reliable tool execution, and reduced capabilities. For the best development experience, we recommend sticking with the cloud models listed above.
|
||||
|
||||
### Key Takeaways
|
||||
|
||||
1. **Plan vs Act Matters**: Choose models based on task type
|
||||
2. **Real Performance > Benchmarks**: Focus on actual Cline performance
|
||||
3. **Mix & Match**: Use different models for planning and implementation
|
||||
4. **Cost vs Quality**: Premium models worth it for critical code
|
||||
5. **Keep Backups**: Have alternatives ready for API issues
|
||||
|
||||
_\*Note: Based on real usage patterns and community feedback rather than just benchmarks. Your experience may vary. This is not an exhaustive list of all the models available for use within Cline._
|
||||
@@ -0,0 +1,238 @@
|
||||
---
|
||||
title: "Our Favorite Tech Stack"
|
||||
description: "A curated list of our recommended technologies and tools for building modern web applications with Cline."
|
||||
---
|
||||
|
||||
## Recommended Stack for New Cline Users (2025)
|
||||
|
||||
### Your Complete Development Environment
|
||||
|
||||
#### Development Tools
|
||||
|
||||
- **VS Code** - Your code editor, [download here](https://code.visualstudio.com/)
|
||||
- **GitHub** - Where your code lives, [sign up here](https://github.com)
|
||||
|
||||
#### Frontend
|
||||
|
||||
- **Next.js 14+** - React framework with App Router
|
||||
- **Tailwind CSS** - Beautiful styling without writing CSS
|
||||
- **TypeScript** - JavaScript, but safer and smarter
|
||||
|
||||
#### Backend
|
||||
|
||||
- **Supabase** - Your complete backend solution, [sign up with GitHub](https://supabase.com)
|
||||
- PostgreSQL database
|
||||
- Authentication
|
||||
- File storage
|
||||
- Real-time updates
|
||||
|
||||
#### Deployment
|
||||
|
||||
- **Vercel** - Where your app runs, [sign up with GitHub](https://vercel.com)
|
||||
- Automatic deployments from GitHub
|
||||
- Preview deployments for testing
|
||||
- Production-ready CDN
|
||||
|
||||
#### AI Development
|
||||
|
||||
Choose your AI assistant based on your needs:
|
||||
|
||||
| Model | Input Cost (per 1M tokens) | Output Cost (per 1M tokens) | Best For |
|
||||
| ----------------- | -------------------------- | --------------------------- | ------------------------------ |
|
||||
| Claude 3.5 Sonnet | $3.00 | $15.00 | Production apps, complex tasks |
|
||||
| DeepSeek R1 | $1.00 | $3.00 | Budget-conscious production |
|
||||
| DeepSeek V3 | $0.14 | $2.20 | Budget-conscious development |
|
||||
|
||||
#### Free Tier Benefits
|
||||
|
||||
**Vercel (Hobby)**
|
||||
|
||||
- 100 GB data transfer/month
|
||||
- 100k serverless function invocations
|
||||
- 100 MB deployment size
|
||||
- Automatic HTTPS & CI/CD
|
||||
|
||||
**Supabase (Free)**
|
||||
|
||||
- 500 MB database storage
|
||||
- 1 GB file storage
|
||||
- 50k monthly active users
|
||||
- 2M real-time messages/month
|
||||
|
||||
**GitHub (Free)**
|
||||
|
||||
- Unlimited public repositories
|
||||
- GitHub Actions CI/CD
|
||||
- Project management tools
|
||||
- Collaboration features
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. Install the development essentials:
|
||||
- Follow our [Development Essentials Installation Guide](https://docs.cline.bot/getting-started/installing-dev-essentials)
|
||||
2. Set up Cline's Memory Bank:
|
||||
- Follow the [Memory Bank setup instructions](https://docs.cline.bot/prompting/cline-memory-bank)
|
||||
- Create an empty `cline_docs` folder in your project root
|
||||
- Create `projectBrief.md` in the `cline_docs` folder (see example below)
|
||||
- Tell Cline to "initialize memory bank"
|
||||
3. Add our recommended stack configuration:
|
||||
- Create `.clinerules` file (see template below)
|
||||
- Let Cline handle the rest!
|
||||
|
||||
#### Example Project Brief
|
||||
|
||||
```markdown
|
||||
# Project Brief
|
||||
|
||||
## Overview
|
||||
|
||||
Building a [type of application] that will [main purpose].
|
||||
|
||||
## Core Features
|
||||
|
||||
- Feature 1
|
||||
- Feature 2
|
||||
- Feature 3
|
||||
|
||||
## Target Users
|
||||
|
||||
[Describe who will use your application]
|
||||
|
||||
## Technical Preferences (optional)
|
||||
|
||||
- Any specific technologies you want to use
|
||||
- Any specific requirements or constraints
|
||||
```
|
||||
|
||||
### .clinerules Template
|
||||
|
||||
```markdown
|
||||
# Project Configuration
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- Next.js 14+ with App Router
|
||||
- Tailwind CSS for styling
|
||||
- Supabase for backend
|
||||
- Vercel for deployment
|
||||
- GitHub for version control
|
||||
|
||||
## Project Structure
|
||||
|
||||
/src
|
||||
/app # Next.js App Router pages
|
||||
/components # React components
|
||||
/lib # Utility functions
|
||||
/types # TypeScript types
|
||||
/supabase
|
||||
/migrations # SQL migration files
|
||||
/seed # Seed data files
|
||||
/public # Static assets
|
||||
|
||||
## Database Migrations
|
||||
|
||||
SQL files in /supabase/migrations should:
|
||||
|
||||
- Use sequential numbering: 001, 002, etc.
|
||||
- Include descriptive names
|
||||
- Be reviewed by Cline before execution
|
||||
Example: 001_create_users_table.sql
|
||||
|
||||
## Development Workflow
|
||||
|
||||
- Cline helps write and review code changes
|
||||
- Vercel automatically deploys from main branch
|
||||
- Database migrations reviewed by Cline before execution
|
||||
|
||||
## Security
|
||||
|
||||
DO NOT read or modify:
|
||||
|
||||
- .env files
|
||||
- \*_/config/secrets._
|
||||
- Any file containing API keys or credentials
|
||||
```
|
||||
|
||||
### Learning Resources (2025)
|
||||
|
||||
Want to learn more about the technologies we're using? Here are some great resources:
|
||||
|
||||
#### Next.js and React
|
||||
|
||||
- [Official Learn Next.js Course](https://nextjs.org/learn) - Interactive tutorial
|
||||
- [NextJS App Router: Modern Web Dev in 1 Hour](https://www.youtube.com/nextjs-modern) - Quick overview
|
||||
- [Building Real-World Apps with Next.js](https://www.youtube.com/nextjs-real-world) - Practical examples
|
||||
|
||||
#### Supabase
|
||||
|
||||
- [Supabase From Scratch](https://www.udemy.com/supabase-scratch) - Comprehensive course
|
||||
- [Official Quickstart Guides](https://supabase.com/docs/guides/getting-started)
|
||||
- [Real-Time Apps with Next.js and Supabase](https://www.newline.co/courses/supabase-nextjs)
|
||||
|
||||
#### Tailwind CSS
|
||||
|
||||
- [Tailwind CSS Tutorial for Beginners](https://www.youtube.com/tailwind-2025)
|
||||
- [Official Tailwind Documentation](https://tailwindcss.com/docs)
|
||||
- Interactive course at [Scrimba Tailwind CSS Course](https://scrimba.com/learn/tailwind)
|
||||
|
||||
### Other Things to Know
|
||||
|
||||
#### Working with Git & GitHub
|
||||
|
||||
Git helps you track changes in your code and collaborate with others. Here are the essential commands you'll use:
|
||||
|
||||
**Daily Development**
|
||||
|
||||
```bash
|
||||
# Save your changes (do this often!)
|
||||
git add . # Stage all changed files
|
||||
git commit -m "Add login page" # Save changes with a clear message
|
||||
|
||||
# Share your changes
|
||||
git push origin main # Upload to GitHub
|
||||
```
|
||||
|
||||
**Common Workflow**
|
||||
|
||||
1. **Start of day**: Get latest changes
|
||||
|
||||
```bash
|
||||
git pull origin main # Download latest code
|
||||
```
|
||||
|
||||
2. **During development**: Save work regularly
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Clear message about changes"
|
||||
```
|
||||
|
||||
3. **End of day**: Share your progress
|
||||
|
||||
```bash
|
||||
git push origin main # Upload to GitHub
|
||||
```
|
||||
|
||||
**Best Practices**
|
||||
|
||||
- Commit often with clear messages
|
||||
- Pull before starting new work
|
||||
- Push completed work to share with others
|
||||
- Use `.gitignore` to avoid committing sensitive files
|
||||
|
||||
> **Tip**: Vercel automatically deploys when you push to main!
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
- Store secrets in `.env.local` for development
|
||||
- Add them to Vercel project settings for production
|
||||
- Never commit `.env` files to Git
|
||||
|
||||
#### Getting Help
|
||||
|
||||
1. Use `/help` in Cline chat for immediate assistance
|
||||
2. Check [Cline Documentation](https://docs.cline.bot)
|
||||
3. Join our [Discord Community](https://discord.gg/cline)
|
||||
4. Search GitHub issues for common problems
|
||||
|
||||
Remember: Cline is here to help at every step. Just ask for guidance or clarification when needed!
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: "Task Management in Cline"
|
||||
description: "Learn how to effectively manage your task history, use favorites, and organize your work in Cline."
|
||||
---
|
||||
|
||||
# Task Management
|
||||
|
||||
As you use Cline, you'll accumulate many tasks over time. The task management system helps you organize, filter, search, and clean up your task history to keep your workspace efficient.
|
||||
|
||||
## Accessing Task History
|
||||
|
||||
You can access your task history by:
|
||||
|
||||
1. Clicking on the "History" button in the Cline sidebar
|
||||
2. Using the command palette to search for "Cline: Show Task History"
|
||||
|
||||
## Task History Features
|
||||
|
||||
The task history view provides several powerful features:
|
||||
|
||||
### Searching and Filtering
|
||||
|
||||
- **Search Bar**: Use the fuzzy search at the top to quickly find tasks by content
|
||||
- **Sort Options**: Sort tasks by:
|
||||
- Newest (default)
|
||||
- Oldest
|
||||
- Most Expensive (highest API cost)
|
||||
- Most Tokens (highest token usage)
|
||||
- Most Relevant (when searching)
|
||||
- **Favorites Filter**: Toggle to show only favorited tasks
|
||||
|
||||
### Task Actions
|
||||
|
||||
Each task in the history view has several actions available:
|
||||
|
||||
- **Open**: Click on a task to reopen it in the Cline chat
|
||||
- **Favorite**: Click the star icon to mark a task as a favorite
|
||||
- **Delete**: Remove individual tasks (favorites are protected from deletion)
|
||||
- **Export**: Export a task's conversation to markdown
|
||||
|
||||
## ⭐ Task Favorites
|
||||
|
||||
The favorites feature allows you to mark important tasks that you want to preserve and find quickly.
|
||||
|
||||
### How Favorites Work
|
||||
|
||||
- **Marking Favorites**: Click the star icon next to any task to toggle its favorite status
|
||||
- **Protection**: Favorited tasks are protected from individual and bulk deletion operations (can be overridden)
|
||||
- **Filtering**: Use the favorites filter to quickly access your important tasks
|
||||
|
||||
## Batch Operations
|
||||
|
||||
The task history view supports several batch operations:
|
||||
|
||||
- **Select Multiple**: Use the checkboxes to select multiple tasks
|
||||
- **Select All/None**: Quickly select or deselect all tasks
|
||||
- **Delete Selected**: Remove all selected tasks
|
||||
- **Delete All**: Remove all tasks from history (favorites are preserved unless you choose to include them)
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Favorite Important Tasks**: Mark reference tasks or frequently accessed conversations as favorites
|
||||
2. **Regular Cleanup**: Periodically remove old or unused tasks to improve performance
|
||||
3. **Use Search**: Leverage the fuzzy search to quickly find specific conversations
|
||||
4. **Export Valuable Tasks**: Export important tasks to markdown for external reference
|
||||
|
||||
Task management helps you maintain an organized workflow when using Cline, allowing you to quickly find past conversations, preserve important work, and keep your history clean and efficient.
|
||||
@@ -0,0 +1,159 @@
|
||||
---
|
||||
title: "Context Management"
|
||||
description: "Context is key to getting the most out of Cline"
|
||||
---
|
||||
|
||||
> 💡 **Quick Reference**
|
||||
>
|
||||
> - Context = The information Cline knows about your project
|
||||
> - Context Window = How much information Cline can hold at once
|
||||
> - Use context files to maintain project knowledge
|
||||
> - Reset when the context window gets full
|
||||
|
||||
## Understanding Context & Context Windows
|
||||
|
||||
<Frame caption="In a world of infinite context, the context window is what Cline currently has available">
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(2).png"
|
||||
alt="In a world of infinite context, the context window is what Cline currently has available"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
Think of working with Cline like collaborating with a thorough, proactive teammate:
|
||||
|
||||
### How Context is Built
|
||||
|
||||
Cline actively builds context in two ways:
|
||||
|
||||
1. **Automatic Context Gathering (i.e. Cline-driven)**
|
||||
- Proactively reads related files
|
||||
- Explores project structure
|
||||
- Analyzes patterns and relationships
|
||||
- Maps dependencies and imports
|
||||
- Asks clarifying questions
|
||||
2. **User-Guided Context**
|
||||
- Share specific files
|
||||
- Provide documentation
|
||||
- Answer Cline's questions
|
||||
- Guide focus areas
|
||||
- Share design thoughts and requirements
|
||||
|
||||
💡 **Key Point**: Cline isn't passive - it actively seeks to understand your project. You can either let it explore or guide its focus, especially in [Plan](https://docs.cline.bot/features/plan-and-act) mode.
|
||||
|
||||
### Context & Context Windows
|
||||
|
||||
Think of context like a whiteboard you and Cline share:
|
||||
|
||||
- **Context** is all the information available:
|
||||
- What Cline has discovered
|
||||
- What you've shared
|
||||
- Your conversation history
|
||||
- Project requirements
|
||||
- Previous decisions
|
||||
- **Context Window** is the size of the whiteboard itself:
|
||||
- Measured in tokens (1 token ≈ 3/4 of an English word)
|
||||
- Each model has a fixed size:
|
||||
- Claude 3.5 Sonnet: 200,000 tokens
|
||||
- DeepSeek: 64,000 tokens
|
||||
- When the whiteboard is full, you need to erase (clear context) to write more
|
||||
- [How Cline manages context under the hood](https://cline.bot/blog/understanding-the-new-context-window-progress-bar-in-cline)
|
||||
|
||||
⚠️ **Important**: Having a large context window (like Claude's 200k tokens) doesn't mean you should fill it completely. Just like a cluttered whiteboard, too much information can make it harder to focus on what's important.
|
||||
|
||||
## Understanding the Context Window Progress Bar
|
||||
|
||||
Cline provides a visual way to monitor your context window usage through a progress bar:
|
||||
|
||||
<Frame caption="Visual representation of the context window usage">
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(1)%20(1).png"
|
||||
alt="Context window progress bar"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
### Reading the Bar
|
||||
|
||||
- ↑ shows input tokens (what you've sent to the LLM)
|
||||
- ↓ shows output tokens (what the LLM has generated)
|
||||
- The progress bar visualizes how much of your context window you've used
|
||||
- The total shows your model's maximum capacity (e.g., 200k for Claude 3.5-Sonnet)
|
||||
|
||||
### When to Watch the Bar
|
||||
|
||||
- During long coding sessions
|
||||
- When working with multiple files
|
||||
- Before starting complex tasks
|
||||
- When Cline seems to lose context
|
||||
|
||||
💡 **Tip**: Consider starting a fresh session when usage reaches 70-80% to maintain optimal performance.
|
||||
|
||||
## Working with Context Files
|
||||
|
||||
Context files help maintain understanding across sessions. They serve as documentation specifically designed to help AI assistants understand your project.
|
||||
|
||||
#### Approaches to Context Files
|
||||
|
||||
1. **Evergreen Project Context (i.e.** [**Memory Bank**](https://docs.cline.bot/prompting/cline-memory-bank)**)**
|
||||
- Living documentation that evolves with your project
|
||||
- Updated as architecture and patterns emerge
|
||||
- Example: The Memory Bank pattern maintains files like `techContext.md` and `systemPatterns.md`
|
||||
- Useful for long-running projects and teams
|
||||
2. **Task-Specific Context (i.e.** [**Structured Approach**](https://cline.bot/blog/building-advanced-software-with-cline-a-structured-approach)**)**
|
||||
|
||||
- Created for specific implementation tasks
|
||||
- Document requirements, constraints, and decisions
|
||||
- Example:
|
||||
|
||||
```markdown
|
||||
# auth-system-implementation.md
|
||||
|
||||
## Requirements
|
||||
|
||||
- OAuth2 implementation
|
||||
- Support for Google and GitHub
|
||||
- Rate limiting on auth endpoints
|
||||
|
||||
## Technical Decisions
|
||||
|
||||
- Using Passport.js for provider integration
|
||||
- JWT for session management
|
||||
- Redis for rate limiting
|
||||
```
|
||||
|
||||
3. **Knowledge Transfer Docs**
|
||||
- Switch to plan mode and ask Cline to document everything you've accomplished so far, along with the remaining steps, in a markdown file.
|
||||
- Copy the contents of the markdown file.
|
||||
- Start a new task using that content as context.
|
||||
|
||||
#### Using Context Files Effectively
|
||||
|
||||
1. **Structure and Format**
|
||||
- Use clear, consistent organization
|
||||
- Include relevant examples
|
||||
- Link related concepts
|
||||
- Keep information focused
|
||||
2. **Maintenance**
|
||||
- Update after significant changes
|
||||
- Version control your context files
|
||||
- Remove outdated information
|
||||
- Document key decisions
|
||||
|
||||
## Practical Tips
|
||||
|
||||
1. **Starting New Projects**
|
||||
- Let Cline explore the codebase
|
||||
- Answer its questions about structure and patterns
|
||||
- Consider setting up basic context files
|
||||
- Document key design decisions
|
||||
2. **Ongoing Development**
|
||||
- Update context files with significant changes
|
||||
- Share relevant documentation
|
||||
- Use Plan mode for complex discussions
|
||||
- Start fresh sessions when needed
|
||||
3. **Team Projects**
|
||||
- Share common context files (consider using [.clinerules](https://docs.cline.bot/features/cline-rules) files in project roots)
|
||||
- Document architectural decisions
|
||||
- Maintain consistent patterns
|
||||
- Keep documentation current
|
||||
|
||||
Remember: The goal is to help Cline maintain consistent understanding of your project across sessions.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "What is Cline?"
|
||||
description: "An introduction to Cline, your AI-powered development assistant in VS Code."
|
||||
---
|
||||
|
||||
Cline is an AI development assistant which integrates with Microsoft Visual Studio Code. It provides an interface between your IDE and LLMs facilitating code development, increasing productivity and lowering the barrier to entry for new coders. Depending on permissions, Cline can read/write files, execute commands, use your web browser, and expand its capabilities with Model Context Protocol servers.
|
||||
|
||||
What makes Cline distinctive is its thoughtful approach to code generation and its extensive integration capabilities. Rather than simply generating code snippets, Cline collaborates with developers by planning solutions step-by-step, maintaining awareness of the entire development environment, and requiring explicit approval for all changes. It can understand large codebases, accelerate onboarding for new engineers, and connect with hundreds of tools through its Model Context Protocol Marketplace, enabling everything from streamlined project deployments to automated incident response—all through natural language commands.
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
title: "Adding MCP Servers from GitHub"
|
||||
---
|
||||
|
||||
This guide provides a step-by-step walkthrough of how to use Cline to build an existing MCP server from a GitHub repository.
|
||||
|
||||
## **Finding an MCP Server**
|
||||
|
||||
There are multiple places online to find MCP servers:
|
||||
|
||||
- **Cline can automatically add MCP servers to its list, which you can then edit.** Cline can clone repositories directly from GitHub and build the servers for you.
|
||||
- **GitHub:** Two of the most common places to find MCP servers on GitHub include:
|
||||
- [Official MCP servers repository](https://github.com/modelcontextprotocol/servers)
|
||||
- [Awesome-MCP servers repository](https://github.com/punkpeye/awesome-mcp-servers)
|
||||
- **Online directories:** Several websites list MCP servers including:
|
||||
|
||||
- [mcpservers.org](https://mcpservers.org/)
|
||||
- [mcp.so](https://mcp.so/)
|
||||
- [glama.ai/mcp/servers](https://glama.ai/mcp/servers)
|
||||
|
||||
These directories allow users to sort the servers by various criteria such as downloads, date, stars, and use case. Each entry provides information such as features, tools, and configuration instructions.
|
||||
|
||||
- **PulseMCP:** This website has a blog post discussing how AI could use MCP servers to make websites obsolete. PulseMCP also includes an FAQ section about MCP servers: [https://www.pulsemcp.com/](https://www.pulsemcp.com/)
|
||||
|
||||
## **Building with Cline**
|
||||
|
||||
1. **Initiate the Process:** Provide Cline with the following information:
|
||||
- **GitHub Repository URL:** The URL of the server's repository.
|
||||
- **README.md Contents:** This is optional but helpful for Cline to understand the server's purpose and configuration. You can copy the README.md file from the GitHub repository.
|
||||
2. **Example Interaction with Cline:**
|
||||
|
||||
```
|
||||
User: "Cline, I want to add the MCP server for Brave browser control. Here's the GitHub link: @https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search Can you add it?"
|
||||
|
||||
Cline: "OK. Cloning the repository to the MCP directory. It needs to be built because it has a 'package.json' file. Should I run 'npm run build'?"
|
||||
|
||||
User: "Yes, build it."
|
||||
|
||||
Cline: "Build complete. This server needs a browser path. Where's your Brave browser executable?"
|
||||
|
||||
User: "It's in '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser'."
|
||||
|
||||
Cline: "OK. I've updated the server config with that path and added it to 'cline_mcp_settings.json'. Anything else?"
|
||||
|
||||
User: "No, that's all. Let's test it."
|
||||
|
||||
Cline: "Great! Starting the MCP Inspector to test the server connection. After that, we can try controlling the browser from Cline."
|
||||
```
|
||||
|
||||
3. **Cline's Actions:** Based on your instructions, Cline will perform the following:
|
||||
- **Repository Cloning:** Cline will clone the repository to your local machine, usually in the directory specified in your configuration.
|
||||
- **Tweaking:** You can guide Cline to modify the server's configuration. For instance:
|
||||
- **User:** "This server requires an API key. Can you find where it should be added?"
|
||||
- Cline may automatically update the `cline_mcp_settings.json` file or other relevant files based on your instructions.
|
||||
- **Building the Server:** Cline will run the appropriate build command for the server, which is commonly `npm run build`.
|
||||
- **Adding Server to Settings:** Cline will add the server's configuration to the `cline_mcp_settings.json` file.
|
||||
|
||||
## **Testing and Troubleshooting**
|
||||
|
||||
1. **Test the Server:** Once Cline finishes the build process, test the server to make sure it works as expected. Cline can assist you if you encounter any problems.
|
||||
2. **MCP Inspector:** You can use the MCP Inspector to test the server's connection and functionality.
|
||||
|
||||
## **Best Practices**
|
||||
|
||||
- **Understand the Basics:** While Cline simplifies the process, it's beneficial to have a basic understanding of the server's code, the MCP protocol ([learn more](/mcp/mcp-overview)), and how to configure the server. This allows for more effective troubleshooting and customization.
|
||||
- **Clear Instructions:** Provide clear and specific instructions to Cline throughout the process.
|
||||
- **Testing:** Thoroughly test the server after installation and configuration to ensure it functions correctly.
|
||||
- **Version Control:** Use a version control system (like Git) to track changes to the server's code.
|
||||
- **Stay Updated:** Keep your MCP servers updated to benefit from the latest features and security patches.
|
||||
@@ -0,0 +1,166 @@
|
||||
---
|
||||
title: "Configuring MCP Servers"
|
||||
---
|
||||
|
||||
## Global MCP Server Inclusion Mode
|
||||
|
||||
Utilizing MCP servers will increase your token usage. Cline offers the ability to restrict or disable MCP server functionality as desired.
|
||||
|
||||
1. Click the "MCP Servers" icon in the top navigation bar of the Cline extension.
|
||||
2. Select the "Installed" tab, and then Click the "Advanced MCP Settings" link at the bottom of that pane.
|
||||
3. Cline will open a new settings window. find `Cline>Mcp:Mode` and make your selection from the dropdown menu.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/MCP-settings-edit%20(1).png"
|
||||
alt="MCP settings edit"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
## Managing Individual MCP Servers
|
||||
|
||||
Each MCP server has its own configuration panel where you can modify settings, manage tools, and control its operation. To access these settings:
|
||||
|
||||
1. Click the "MCP Servers" icon in the top navigation bar of the Cline extension.
|
||||
2. Locate the MCP server you want to manage in the list, and open it by clicking on its name.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/MCP-settings-individual.png"
|
||||
alt="MCP settings individual"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
### Deleting a Server
|
||||
|
||||
1. Click the Trash icon next to the MCP server you would like to delete, or the red Delete Server button at the bottom of the MCP server config box.
|
||||
|
||||
**NOTE:** There is no delete confirmation dialog box
|
||||
|
||||
### Restarting a Server
|
||||
|
||||
1. Click the Restart button next to the MCP server you would like to restart, or the gray Restart Server button at the bottom of the MCP server config box.
|
||||
|
||||
### Enabling or Disabling a Server
|
||||
|
||||
1. Click the toggle switch next to the MCP server to enable/disable servers individually.
|
||||
|
||||
### Network Timeout
|
||||
|
||||
To set the maximum time to wait for a response after a tool call to the MCP server:
|
||||
|
||||
1. Click the `Network Timeout` dropdown at the bottom of the individual MCP server's config box and change the time. Default is 1 minute but it can be set between 30 seconds and 1 hour.
|
||||
|
||||
## Editing MCP Settings Files
|
||||
|
||||
Settings for all installed MCP servers are located in the `cline_mcp_settings.json` file:
|
||||
|
||||
1. Click the MCP Servers icon at the top navigation bar of the Cline pane.
|
||||
2. Select the "Installed" tab.
|
||||
3. Click the "Configure MCP Servers" button at the bottom of the pane.
|
||||
|
||||
The file uses a JSON format with a `mcpServers` object containing named server configurations:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"server1": {
|
||||
"command": "python",
|
||||
"args": ["/path/to/server.py"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
_Example of MCP Server config in Cline (STDIO Transport)_
|
||||
|
||||
---
|
||||
|
||||
## Understanding Transport Types
|
||||
|
||||
MCP supports two transport types for server communication:
|
||||
|
||||
### STDIO Transport
|
||||
|
||||
Used for local servers running on your machine:
|
||||
|
||||
- Communicates via standard input/output streams
|
||||
- Lower latency (no network overhead)
|
||||
- Better security (no network exposure)
|
||||
- Simpler setup (no HTTP server needed)
|
||||
- Runs as a child process on your machine
|
||||
|
||||
For more in-depth information about how STDIO transport works, see [MCP Transport Mechanisms](/mcp/mcp-transport-mechanisms).
|
||||
|
||||
STDIO configuration example:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"local-server": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### SSE Transport
|
||||
|
||||
Used for remote servers accessed over HTTP/HTTPS:
|
||||
|
||||
- Communicates via Server-Sent Events protocol
|
||||
- Can be hosted on a different machine
|
||||
- Supports multiple client connections
|
||||
- Requires network access
|
||||
- Allows centralized deployment and management
|
||||
|
||||
For more in-depth information about how SSE transport works, see [MCP Transport Mechanisms](/mcp/mcp-transport-mechanisms).
|
||||
|
||||
SSE configuration example:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"url": "https://your-server-url.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token"
|
||||
},
|
||||
"alwaysAllow": ["tool3"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Using MCP Tools in Your Workflow
|
||||
|
||||
After configuring an MCP server, Cline will automatically detect available tools and resources. To use them:
|
||||
|
||||
1. Type your request in Cline's conversation window
|
||||
2. Cline will identify when an MCP tool can help with your task
|
||||
3. Approve the tool use when prompted (or use auto-approval)
|
||||
|
||||
Example: "Analyze the performance of my API" might use an MCP tool that tests API endpoints.
|
||||
|
||||
## Troubleshooting MCP Servers
|
||||
|
||||
Common issues and solutions:
|
||||
|
||||
- **Server Not Responding:** Check if the server process is running and verify network connectivity
|
||||
- **Permission Errors:** Ensure proper API keys and credentials are configured in your `mcp_settings.json` file
|
||||
- **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings
|
||||
- **Slow Performance:** Try adjusting the network timeout value for the specific MCP server
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
title: "Connecting to a Remote Server"
|
||||
description: "The Model Context Protocol (MCP) allows Cline to communicate with external servers that provide additional tools and resources to extend its capabilities. This guide explains how to add and connect to remote MCP servers through the MCP Servers interface."
|
||||
---
|
||||
|
||||
## Adding and Managing Remote MCP Servers
|
||||
|
||||
### Accessing the MCP Servers Interface
|
||||
|
||||
To access the MCP Servers interface in Cline:
|
||||
|
||||
1. Click on the Cline icon in the VSCode sidebar
|
||||
2. Open the menu (⋮) in the top right corner of the Cline panel
|
||||
3. Select "MCP Servers" from the dropdown menu
|
||||
|
||||
### Understanding the MCP Servers Interface
|
||||
|
||||
The MCP Servers interface is divided into three main tabs:
|
||||
|
||||
- **Marketplace**: Discover and install pre-configured MCP servers (if enabled)
|
||||
- **Remote Servers**: Connect to existing MCP servers via URL endpoints
|
||||
- **Installed**: Manage your connected MCP servers
|
||||
|
||||
### Adding a Remote MCP Server
|
||||
|
||||
The "Remote Servers" tab allows you to connect to any MCP server that's accessible via a URL endpoint:
|
||||
|
||||
1. Click on the "Remote Servers" tab in the MCP Servers interface
|
||||
2. Fill in the required information:
|
||||
- **Server Name**: Provide a unique, descriptive name for the server
|
||||
- **Server URL**: Enter the complete URL endpoint of the MCP server (e.g., `https://example.com/mcp-sse`)
|
||||
3. Click "Add Server" to initiate the connection
|
||||
4. Cline will attempt to connect to the server and display the connection status
|
||||
|
||||
> **Note**: When connecting to a remote server, ensure you trust the source, as MCP servers can execute code in your environment.
|
||||
|
||||
### Remote Server Discovery
|
||||
|
||||
If you're looking for MCP servers to connect to, several third-party marketplaces provide directories of available servers with various capabilities.
|
||||
|
||||
> **Warning**: The following third-party marketplaces are listed for informational purposes only. Cline does not endorse, verify, or take responsibility for any servers listed on these marketplaces. These servers are cloud-hosted services that process your requests and may have access to data you share with them. Always review privacy policies and terms of use before connecting to third-party services.
|
||||
|
||||
#### Composio MCP Integration
|
||||
|
||||
[Composio's MCP Marketplace](https://mcp.composio.dev/) provides access to a wide range of third-party servers that support the Model Context Protocol (MCP). These servers expose APIs for services like GitHub, Notion, Slack, and others. Each server includes configuration instructions and built-in authentication support (e.g. OAuth or API keys). To connect, locate the desired service in the marketplace and follow the integration steps provided there.
|
||||
|
||||
#### Connecting via Smithery
|
||||
|
||||
Smithery is a third-party MCP server marketplace that allows users to discover and connect to a variety of Model Context Protocol (MCP) servers. If you're using an MCP-compatible client (such as Cursor, Claude Desktop, or Cline), you can browse available servers and integrate them directly into your workflow.
|
||||
|
||||
To explore available options, visit the Smithery marketplace: [https://smithery.ai](https://smithery.ai)
|
||||
|
||||
Please note: Smithery is maintained independently and is not affiliated with our project. Use at your own discretion.
|
||||
|
||||
### Managing Installed MCP Servers
|
||||
|
||||
Once added, your MCP servers appear in the "Installed" tab where you can:
|
||||
|
||||
#### View Server Status
|
||||
|
||||
Each server displays its current status:
|
||||
|
||||
- **Green dot**: Connected and ready to use
|
||||
- **Yellow dot**: In the process of connecting
|
||||
- **Red dot**: Disconnected or experiencing errors
|
||||
|
||||
#### Configure Server Settings
|
||||
|
||||
Click on a server to expand its settings panel:
|
||||
|
||||
1. **Tools & Resources**:
|
||||
- View all available tools and resources from the server
|
||||
- Configure auto-approval settings for tools (if enabled)
|
||||
2. **Request Timeout**:
|
||||
- Set how long Cline should wait for server responses
|
||||
- Options range from 30 seconds to 1 hour
|
||||
3. **Server Management**:
|
||||
- **Restart Server**: Reconnect if the server becomes unresponsive
|
||||
- **Delete Server**: Remove the server from your configuration
|
||||
|
||||
#### Enable/Disable Servers
|
||||
|
||||
Toggle the switch next to each server to enable or disable it:
|
||||
|
||||
- **Enabled**: Cline can use the server's tools and resources
|
||||
- **Disabled**: The server remains in your configuration but is not active
|
||||
|
||||
### Troubleshooting Connection Issues
|
||||
|
||||
If a server fails to connect:
|
||||
|
||||
1. An error message will be displayed with details about the failure
|
||||
2. Check that the server URL is correct and the server is running
|
||||
3. Use the "Restart Server" button to attempt reconnection
|
||||
4. If problems persist, you can delete the server and try adding it again
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
For advanced users, Cline stores MCP server configurations in a JSON file that can be modified:
|
||||
|
||||
1. In the "Installed" tab, click "Configure MCP Servers" to access the settings file
|
||||
2. The configuration for each server follows this format:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"exampleServer": {
|
||||
"url": "https://example.com/mcp-sse",
|
||||
"disabled": false,
|
||||
"autoApprove": ["tool1", "tool2"],
|
||||
"timeout": 30
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Key configuration options:
|
||||
|
||||
- **url**: The endpoint URL (for remote servers)
|
||||
- **disabled**: Whether the server is currently enabled (true/false)
|
||||
- **autoApprove**: List of tool names that don't require confirmation
|
||||
- **timeout**: Maximum time in seconds to wait for server responses
|
||||
|
||||
For additional MCP settings, click the "Advanced MCP Settings" link to access VSCode settings.
|
||||
|
||||
### Using MCP Server Tools
|
||||
|
||||
Once connected, Cline can use the tools and resources provided by the MCP server. When Cline suggests using an MCP tool:
|
||||
|
||||
1. A tool approval prompt will appear (unless auto-approved)
|
||||
2. Review the tool details and parameters before approving
|
||||
3. The tool will execute and return results to Cline
|
||||
@@ -0,0 +1,199 @@
|
||||
---
|
||||
title: "MCP Made Easy"
|
||||
description: "Learn how to use the MCP Marketplace to discover, install, and configure MCP servers that enhance Cline's capabilities with additional tools and resources."
|
||||
---
|
||||
|
||||
## What's an MCP Server?
|
||||
|
||||
MCP servers are specialized extensions that enhance Cline's capabilities. They enable Cline to perform additional tasks like fetching web pages, processing images, accessing APIs, and much more.
|
||||
|
||||
## MCP Marketplace Walkthrough
|
||||
|
||||
The MCP Marketplace provides a one-click installation experience for hundreds of MCP servers across various categories.
|
||||
|
||||
### 1. Access the Marketplace
|
||||
|
||||
- In Cline, click the "Extensions" button (square icon) in the top toolbar
|
||||
- The MCP marketplace will open, showing available servers by category
|
||||
|
||||
### 2. Browse and Select a Server
|
||||
|
||||
- Browse servers by category (Search, File-systems, Browser-automation, Research-data, etc.)
|
||||
- Click on a server to see details about its capabilities and requirements
|
||||
|
||||
### 3. Install and Configure
|
||||
|
||||
- Click the install button for your chosen server
|
||||
- If the server requires an API key (most do), Cline will guide you through:
|
||||
- Where to get the API key
|
||||
- How to enter it securely
|
||||
- The server will be added to your MCP settings automatically
|
||||
|
||||
### 4. Verify Installation
|
||||
|
||||
- Cline will show confirmation when installation is complete
|
||||
- Check the server status in Cline's MCP settings UI
|
||||
|
||||
### 5. Using Your New Server
|
||||
|
||||
- After successful installation, Cline will automatically integrate the server's capabilities
|
||||
- You'll see new tools and resources available in Cline's system prompt
|
||||
- Simply ask Cline to use the capabilities of your new server
|
||||
- Example: "Search the web for recent React updates using Perplexity"
|
||||
|
||||
**Corporate Users:** If you're using Cline in a corporate environment, ensure you have permission to install third-party MCP servers according to your organization's security policies.
|
||||
|
||||
## What Happens Behind the Scenes
|
||||
|
||||
When you install an MCP server, several things happen automatically:
|
||||
|
||||
### 1. Installation Process
|
||||
|
||||
- The server code is cloned/installed to `/Users/<username>/Documents/Cline/MCP/`
|
||||
- Dependencies are installed
|
||||
- The server is built (TypeScript/JavaScript compilation or Python package installation)
|
||||
|
||||
### 2. Configuration
|
||||
|
||||
- The MCP settings file is updated with your server configuration
|
||||
- This file is located at: `/Users/<username>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
||||
- Environment variables (like API keys) are securely stored
|
||||
- The server path is registered
|
||||
|
||||
### 3. Server Launch
|
||||
|
||||
- Cline detects the configuration change
|
||||
- Cline launches your server as a separate process
|
||||
- Communication is established via stdio or HTTP
|
||||
|
||||
### 4. Integration with Cline
|
||||
|
||||
- Your server's capabilities are added to Cline's system prompt
|
||||
- Tools become available via `use_mcp_tool` commands
|
||||
- Resources become available via `access_mcp_resource` commands
|
||||
- Cline can now use these capabilities when prompted by the user
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### System Requirements
|
||||
|
||||
Make sure your system meets these requirements:
|
||||
|
||||
- **Node.js 18.x or newer**
|
||||
- Check by running: `node --version`
|
||||
- Install from: https://nodejs.org/
|
||||
- Required for JavaScript/TypeScript implementations
|
||||
- **Python 3.10 or newer**
|
||||
- Check by running: `python --version`
|
||||
- Install from: https://python.org/
|
||||
- Note: Some specialized implementations may require Python 3.11+
|
||||
- **UV Package Manager**
|
||||
- Modern Python package manager for dependency isolation
|
||||
- Install using:
|
||||
```bash
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
```
|
||||
Or: `pip install uv`
|
||||
- Verify with: `uv --version`
|
||||
|
||||
If any of these commands fail or show older versions, please install/update before continuing!
|
||||
|
||||
### Common Installation Issues
|
||||
|
||||
- Ensure your internet connection is stable
|
||||
- Check that you have the necessary permissions to install new software
|
||||
- Verify that the API key was entered correctly (if required)
|
||||
- Check the server status in the MCP settings UI for any error messages
|
||||
|
||||
### How to Remove an MCP Server
|
||||
|
||||
To completely remove a faulty MCP server:
|
||||
|
||||
1. Open the MCP settings file: `/Users/<username>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
||||
2. Delete the entire entry for your server from the `mcpServers` object
|
||||
3. Save the file
|
||||
4. Restart Cline
|
||||
|
||||
### I'm Still Getting an Error
|
||||
|
||||
If you're getting an error when using an MCP server, you can try the following:
|
||||
|
||||
- Check the MCP settings file for errors
|
||||
- Use a Claude Sonnet model for installation
|
||||
- Verify that paths to your server's files are correct
|
||||
- Ensure all required environment variables are set
|
||||
- Check if another process is using the same port (for HTTP-based servers)
|
||||
- Try removing and reinstalling the server (remove from both the `cline_mcp_settings.json` file and the `/Users/<username>/Documents/Cline/MCP/` directory)
|
||||
- Use a terminal and run the command with its arguments directly. This will allow you to see the same errors that Cline is seeing
|
||||
|
||||
## MCP Server Rules
|
||||
|
||||
Cline is already aware of your active MCP servers and what they are for, but when you have a lot of MCP servers enabled, it can be useful to define when to use each server.
|
||||
|
||||
Utilize a `.clinerules` file or custom instructions to support intelligent MCP server activation through keyword-based triggers, making Cline's tool selection more intuitive and context-aware.
|
||||
|
||||
### How MCP Rules Work
|
||||
|
||||
MCP Rules group your connected MCP servers into functional categories and define trigger keywords that activate them automatically when detected in your conversations with Cline.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpRules": {
|
||||
"webInteraction": {
|
||||
"servers": ["firecrawl-mcp-server", "fetch-mcp"],
|
||||
"triggers": ["web", "scrape", "browse", "website"],
|
||||
"description": "Tools for web browsing and scraping"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Configuration Structure
|
||||
|
||||
1. **Categories**: Group related servers (e.g., "webInteraction", "mediaAndDesign")
|
||||
2. **Servers**: List server names in each category
|
||||
3. **Triggers**: Keywords that activate these servers
|
||||
4. **Description**: Human-readable category explanation
|
||||
|
||||
### Benefits of MCP Rules
|
||||
|
||||
- **Contextual Tool Selection**: Cline selects appropriate tools based on conversation context
|
||||
- **Reduced Friction**: No need to manually specify which tool to use
|
||||
- **Organized Capabilities**: Logically group related tools and servers
|
||||
- **Prioritization**: Handle ambiguous cases with explicit priority ordering
|
||||
|
||||
### Example Usage
|
||||
|
||||
When you write "Can you scrape this website?", Cline detects "scrape" and "website" as triggers, automatically selecting web-related MCP servers.
|
||||
|
||||
For finance tasks like "What's Apple's stock price?", keywords like "stock" and "price" trigger finance-related servers.
|
||||
|
||||
### Quick Start Template
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpRules": {
|
||||
"category1": {
|
||||
"servers": ["server-name-1", "server-name-2"],
|
||||
"triggers": ["keyword1", "keyword2", "phrase1", "phrase2"],
|
||||
"description": "Description of what these tools do"
|
||||
},
|
||||
"category2": {
|
||||
"servers": ["server-name-3"],
|
||||
"triggers": ["keyword3", "keyword4", "phrase3"],
|
||||
"description": "Description of what these tools do"
|
||||
},
|
||||
"category3": {
|
||||
"servers": ["server-name-4", "server-name-5"],
|
||||
"triggers": ["keyword5", "keyword6", "phrase4"],
|
||||
"description": "Description of what these tools do"
|
||||
}
|
||||
},
|
||||
"defaultBehavior": {
|
||||
"priorityOrder": ["category1", "category2", "category3"],
|
||||
"fallbackBehavior": "Ask user which tool would be most appropriate"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Add this to your `.clinerules` file or to your custom instructions to make Cline's MCP server selection more intuitive and context-aware.
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
title: "MCP Overview"
|
||||
description: "Learn about Model Context Protocol (MCP) servers, their capabilities, and how Cline can help build and use them. MCP standardizes how applications provide context to LLMs, acting like a USB-C port for AI applications."
|
||||
---
|
||||
|
||||
## Quick Links
|
||||
|
||||
- [Building MCP Servers from GitHub](/mcp/adding-mcp-servers-from-github)
|
||||
- [Building Custom MCP Servers from Scratch](/mcp/mcp-server-development-protocol)
|
||||
|
||||
## Overview
|
||||
|
||||
Model Context Protocol is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications; it provides a standardized way to connect AI models to different data sources and tools. MCP servers act as intermediaries between large language models (LLMs), such as Claude, and external tools or data sources. They are small programs that expose functionalities to LLMs, enabling them to interact with the outside world through the MCP. An MCP server is essentially like an API that an LLM can use.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/mcp-diagram.png"
|
||||
alt="MCP diagram showing how MCP servers connect LLMs to external tools and data sources"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
## Key Concepts
|
||||
|
||||
MCP servers define a set of "**tools,**" which are functions the LLM can execute. These tools offer a wide range of capabilities.
|
||||
|
||||
**Here's how MCP works:**
|
||||
|
||||
- **MCP hosts** discover the capabilities of connected servers and load their tools, prompts, and resources.
|
||||
- **Resources** provide consistent access to read-only data, akin to file paths or database queries.
|
||||
- **Security** is ensured as servers isolate credentials and sensitive data. Interactions require explicit user approval.
|
||||
|
||||
## Use Cases
|
||||
|
||||
The potential of MCP servers is vast. They can be used for a variety of purposes.
|
||||
|
||||
**Here are some concrete examples of how MCP servers can be used:**
|
||||
|
||||
- **Web Services and API Integration:**
|
||||
- Monitor GitHub repositories for new issues
|
||||
- Post updates to Twitter based on specific triggers
|
||||
- Retrieve real-time weather data for location-based services
|
||||
- **Browser Automation:**
|
||||
- Automate web application testing
|
||||
- Scrape e-commerce sites for price comparisons
|
||||
- Generate screenshots for website monitoring
|
||||
- **Database Queries:**
|
||||
- Generate weekly sales reports
|
||||
- Analyze customer behavior patterns
|
||||
- Create real-time dashboards for business metrics
|
||||
- **Project and Task Management:**
|
||||
- Automate Jira ticket creation based on code commits
|
||||
- Generate weekly progress reports
|
||||
- Create task dependencies based on project requirements
|
||||
- **Codebase Documentation:**
|
||||
- Generate API documentation from code comments
|
||||
- Create architecture diagrams from code structure
|
||||
- Maintain up-to-date README files
|
||||
|
||||
## Getting Started
|
||||
|
||||
Cline does not come with any pre-installed MCP servers. You'll need to find and install them separately.
|
||||
|
||||
**Choose the right approach for your needs:**
|
||||
|
||||
- **Community Repositories:** Check for community-maintained lists of MCP servers on GitHub. See [Adding MCP Servers from Github](/mcp/adding-mcp-servers-from-github)
|
||||
- **Cline Marketplace:** Install one from Cline's [MCP Marketplace](/mcp/mcp-marketplace)
|
||||
- **Ask Cline:** You can ask Cline to help you find or create MCP servers
|
||||
- **Build Your Own:** Create custom MCP servers using the [MCP SDK](https://github.com/modelcontextprotocol/)
|
||||
- **Customize Existing Servers:** Modify existing servers to fit your specific requirements
|
||||
|
||||
## Integration with Cline
|
||||
|
||||
Cline simplifies the building and use of MCP servers through its AI capabilities.
|
||||
|
||||
### Building MCP Servers
|
||||
|
||||
- **Natural language understanding:** Instruct Cline in natural language to build an MCP server by describing its functionalities. Cline will interpret your instructions and generate the necessary code.
|
||||
- **Cloning and building servers:** Cline can clone existing MCP server repositories from GitHub and build them automatically.
|
||||
- **Configuration and dependency management:** Cline handles configuration files, environment variables, and dependencies.
|
||||
- **Troubleshooting and debugging:** Cline helps identify and resolve errors during development.
|
||||
|
||||
### Using MCP Servers
|
||||
|
||||
- **Tool execution:** Cline seamlessly integrates with MCP servers, allowing you to execute their defined tools.
|
||||
- **Context-aware interactions:** Cline can intelligently suggest using relevant tools based on conversation context.
|
||||
- **Dynamic integrations:** Combine multiple MCP server capabilities for complex tasks. For example, Cline could use a GitHub server to get data and a Notion server to create a formatted report.
|
||||
|
||||
## Security Considerations
|
||||
|
||||
When working with MCP servers, it's important to follow security best practices:
|
||||
|
||||
- **Authentication:** Always use secure authentication methods for API access
|
||||
- **Environment Variables:** Store sensitive information in environment variables
|
||||
- **Access Control:** Limit server access to authorized users only
|
||||
- **Data Validation:** Validate all inputs to prevent injection attacks
|
||||
- **Logging:** Implement secure logging practices without exposing sensitive data
|
||||
|
||||
## Resources
|
||||
|
||||
There are various resources available for finding and learning about MCP servers.
|
||||
|
||||
**Here are some links to resources for finding and learning about MCP servers:**
|
||||
|
||||
- **GitHub Repositories:** [https://github.com/modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers) and [https://github.com/punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)
|
||||
- **Online Directories:** [https://mcpservers.org/](https://mcpservers.org/), [https://mcp.so/](https://mcp.so/), and [https://glama.ai/mcp/servers](https://glama.ai/mcp/servers)
|
||||
- **PulseMCP:** [https://www.pulsemcp.com/](https://www.pulsemcp.com/)
|
||||
- **YouTube Tutorial (AI-Driven Coder):** A video guide for building and using MCP servers: [https://www.youtube.com/watch?v=b5pqTNiuuJg](https://www.youtube.com/watch?v=b5pqTNiuuJg)
|
||||
@@ -0,0 +1,705 @@
|
||||
---
|
||||
title: "MCP Server Development Protocol"
|
||||
description: "This protocol is designed to streamline the development process of building MCP servers with Cline."
|
||||
---
|
||||
|
||||
> 🚀 **Build and share your MCP servers with the world.** Once you've created a great MCP server, submit it to the [Cline MCP Marketplace](https://github.com/cline/mcp-marketplace) to make it discoverable and one-click installable by thousands of developers.
|
||||
|
||||
## What Are MCP Servers?
|
||||
|
||||
Model Context Protocol (MCP) servers extend AI assistants like Cline by giving them the ability to:
|
||||
|
||||
- Access external APIs and services
|
||||
- Retrieve real-time data
|
||||
- Control applications and local systems
|
||||
- Perform actions beyond what text prompts alone can achieve
|
||||
|
||||
Without MCP, AI assistants are powerful but isolated. With MCP, they gain the ability to interact with virtually any digital system.
|
||||
|
||||
## The Development Protocol
|
||||
|
||||
The heart of effective MCP server development is following a structured protocol. This protocol is implemented through a `.clinerules` file that lives at the **root** of your MCP working directory (/Users/your-name/Documents/Cline/MCP).
|
||||
|
||||
### Using `.clinerules` Files
|
||||
|
||||
A `.clinerules` file is a special configuration that Cline reads automatically when working in the directory where it's placed. These files:
|
||||
|
||||
- Configure Cline's behavior and enforce best practices
|
||||
- Switch Cline into a specialized MCP development mode
|
||||
- Provide a step-by-step protocol for building servers
|
||||
- Implement safety measures like preventing premature completion
|
||||
- Guide you through planning, implementation, and testing phases
|
||||
|
||||
Here's the complete MCP Server Development Protocol that should be placed in your `.clinerules` file:
|
||||
|
||||
````markdown
|
||||
# MCP Server Development Protocol
|
||||
|
||||
⚠️ CRITICAL: DO NOT USE attempt_completion BEFORE TESTING ⚠️
|
||||
|
||||
## Step 1: Planning (PLAN MODE)
|
||||
|
||||
- What problem does this tool solve?
|
||||
- What API/service will it use?
|
||||
- What are the authentication requirements?
|
||||
□ Standard API key
|
||||
□ OAuth (requires separate setup script)
|
||||
□ Other credentials
|
||||
|
||||
## Step 2: Implementation (ACT MODE)
|
||||
|
||||
1. Bootstrap
|
||||
|
||||
- For web services, JavaScript integration, or Node.js environments:
|
||||
```bash
|
||||
npx @modelcontextprotocol/create-server my-server
|
||||
cd my-server
|
||||
npm install
|
||||
```
|
||||
- For data science, ML workflows, or Python environments:
|
||||
```bash
|
||||
pip install mcp
|
||||
# Or with uv (recommended)
|
||||
uv add "mcp[cli]"
|
||||
```
|
||||
|
||||
2. Core Implementation
|
||||
|
||||
- Use MCP SDK
|
||||
- Implement comprehensive logging
|
||||
- TypeScript (for web/JS projects):
|
||||
```typescript
|
||||
console.error("[Setup] Initializing server...")
|
||||
console.error("[API] Request to endpoint:", endpoint)
|
||||
console.error("[Error] Failed with:", error)
|
||||
```
|
||||
- Python (for data science/ML projects):
|
||||
```python
|
||||
import logging
|
||||
logging.error('[Setup] Initializing server...')
|
||||
logging.error(f'[API] Request to endpoint: {endpoint}')
|
||||
logging.error(f'[Error] Failed with: {str(error)}')
|
||||
```
|
||||
- Add type definitions
|
||||
- Handle errors with context
|
||||
- Implement rate limiting if needed
|
||||
|
||||
3. Configuration
|
||||
|
||||
- Get credentials from user if needed
|
||||
- Add to MCP settings:
|
||||
|
||||
- For TypeScript projects:
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"my-server": {
|
||||
"command": "node",
|
||||
"args": ["path/to/build/index.js"],
|
||||
"env": {
|
||||
"API_KEY": "key"
|
||||
},
|
||||
"disabled": false,
|
||||
"autoApprove": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
- For Python projects:
|
||||
|
||||
```bash
|
||||
# Directly with command line
|
||||
mcp install server.py -v API_KEY=key
|
||||
|
||||
# Or in settings.json
|
||||
{
|
||||
"mcpServers": {
|
||||
"my-server": {
|
||||
"command": "python",
|
||||
"args": ["server.py"],
|
||||
"env": {
|
||||
"API_KEY": "key"
|
||||
},
|
||||
"disabled": false,
|
||||
"autoApprove": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Step 3: Testing (BLOCKER ⛔️)
|
||||
|
||||
<thinking>
|
||||
BEFORE using attempt_completion, I MUST verify:
|
||||
□ Have I tested EVERY tool?
|
||||
□ Have I confirmed success from the user for each test?
|
||||
□ Have I documented the test results?
|
||||
|
||||
If ANY answer is "no", I MUST NOT use attempt_completion.
|
||||
</thinking>
|
||||
|
||||
1. Test Each Tool (REQUIRED)
|
||||
□ Test each tool with valid inputs
|
||||
□ Verify output format is correct
|
||||
⚠️ DO NOT PROCEED UNTIL ALL TOOLS TESTED
|
||||
|
||||
## Step 4: Completion
|
||||
|
||||
❗ STOP AND VERIFY:
|
||||
□ Every tool has been tested with valid inputs
|
||||
□ Output format is correct for each tool
|
||||
|
||||
Only after ALL tools have been tested can attempt_completion be used.
|
||||
|
||||
## Key Requirements
|
||||
|
||||
- ✓ Must use MCP SDK
|
||||
- ✓ Must have comprehensive logging
|
||||
- ✓ Must test each tool individually
|
||||
- ✓ Must handle errors gracefully
|
||||
- ⛔️ NEVER skip testing before completion
|
||||
````
|
||||
|
||||
When this `.clinerules` file is present in your working directory, Cline will:
|
||||
|
||||
1. Start in **PLAN MODE** to design your server before implementation
|
||||
2. Enforce proper implementation patterns in **ACT MODE**
|
||||
3. Require testing of all tools before allowing completion
|
||||
4. Guide you through the entire development lifecycle
|
||||
|
||||
## Getting Started
|
||||
|
||||
Creating an MCP server requires just a few simple steps to get started:
|
||||
|
||||
### 1. Create a `.clinerules` file (🚨 IMPORTANT)
|
||||
|
||||
First, add a `.clinerules` file to the root of your MCP working directory using the protocol above. This file configures Cline to use the MCP development protocol when working in this folder.
|
||||
|
||||
### 2. Start a Chat with a Clear Description
|
||||
|
||||
Begin your Cline chat by clearly describing what you want to build. Be specific about:
|
||||
|
||||
- The purpose of your MCP server
|
||||
- Which API or service you want to integrate with
|
||||
- Any specific tools or features you need
|
||||
|
||||
For example:
|
||||
|
||||
```plaintext
|
||||
I want to build an MCP server for the AlphaAdvantage financial API.
|
||||
It should allow me to get real-time stock data, perform technical
|
||||
analysis, and retrieve company financial information.
|
||||
```
|
||||
|
||||
### 3. Work Through the Protocol
|
||||
|
||||
Cline will automatically start in PLAN MODE, guiding you through the planning process:
|
||||
|
||||
- Discussing the problem scope
|
||||
- Reviewing API documentation
|
||||
- Planning authentication methods
|
||||
- Designing tool interfaces
|
||||
|
||||
When ready, switch to ACT MODE using the toggle at the bottom of the chat to begin implementation.
|
||||
|
||||
### 4. Provide API Documentation Early
|
||||
|
||||
One of the most effective ways to help Cline build your MCP server is to share official API documentation right at the start:
|
||||
|
||||
```plaintext
|
||||
Here's the API documentation for the service:
|
||||
[Paste API documentation here]
|
||||
```
|
||||
|
||||
Providing comprehensive API details (endpoints, authentication, data structures) significantly improves Cline's ability to implement an effective MCP server.
|
||||
|
||||
## Understanding the Two Modes
|
||||
|
||||
### PLAN MODE
|
||||
|
||||
In this collaborative phase, you work with Cline to design your MCP server:
|
||||
|
||||
- Define the problem scope
|
||||
- Choose appropriate APIs
|
||||
- Plan authentication methods
|
||||
- Design the tool interfaces
|
||||
- Determine data formats
|
||||
|
||||
### ACT MODE
|
||||
|
||||
Once planning is complete, Cline helps implement the server:
|
||||
|
||||
- Set up the project structure
|
||||
- Write the implementation code
|
||||
- Configure settings
|
||||
- Test each component thoroughly
|
||||
- Finalize documentation
|
||||
|
||||
## Case Study: AlphaAdvantage Stock Analysis Server
|
||||
|
||||
Let's walk through the development process of our AlphaAdvantage MCP server, which provides stock data analysis and reporting capabilities.
|
||||
|
||||
### Planning Phase
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/planning-phase.gif"
|
||||
alt="Planning phase demonstration"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
During the planning phase, we:
|
||||
|
||||
1. **Defined the problem**: Users need access to financial data, stock analysis, and market insights directly through their AI assistant
|
||||
2. **Selected the API**: AlphaAdvantage API for financial market data
|
||||
- Standard API key authentication
|
||||
- Rate limits of 5 requests per minute (free tier)
|
||||
- Various endpoints for different financial data types
|
||||
3. **Designed the tools needed**:
|
||||
- Stock overview information (current price, company details)
|
||||
- Technical analysis with indicators (RSI, MACD, etc.)
|
||||
- Fundamental analysis (financial statements, ratios)
|
||||
- Earnings report data
|
||||
- News and sentiment analysis
|
||||
4. **Planned data formatting**:
|
||||
- Clean, well-formatted markdown output
|
||||
- Tables for structured data
|
||||
- Visual indicators (↑/↓) for trends
|
||||
- Proper formatting of financial numbers
|
||||
|
||||
### Implementation
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/building-mcp-plugin.gif"
|
||||
alt="Building MCP plugin demonstration"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
We began by bootstrapping the project:
|
||||
|
||||
```bash
|
||||
npx @modelcontextprotocol/create-server alphaadvantage-mcp
|
||||
cd alphaadvantage-mcp
|
||||
npm install axios node-cache
|
||||
```
|
||||
|
||||
Next, we structured our project with:
|
||||
|
||||
```plaintext
|
||||
src/
|
||||
├── api/
|
||||
│ └── alphaAdvantageClient.ts # API client with rate limiting & caching
|
||||
├── formatters/
|
||||
│ └── markdownFormatter.ts # Output formatters for clean markdown
|
||||
└── index.ts # Main MCP server implementation
|
||||
```
|
||||
|
||||
#### API Client Implementation
|
||||
|
||||
The API client implementation included:
|
||||
|
||||
- **Rate limiting**: Enforcing the 5 requests per minute limit
|
||||
- **Caching**: Reducing API calls with strategic caching
|
||||
- **Error handling**: Robust error detection and reporting
|
||||
- **Typed interfaces**: Clear TypeScript types for all data
|
||||
|
||||
Key implementation details:
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Manage rate limiting based on free tier (5 calls per minute)
|
||||
*/
|
||||
private async enforceRateLimit() {
|
||||
if (this.requestsThisMinute >= 5) {
|
||||
console.error("[Rate Limit] Rate limit reached. Waiting for next minute...");
|
||||
return new Promise<void>((resolve) => {
|
||||
const remainingMs = 60 * 1000 - (Date.now() % (60 * 1000));
|
||||
setTimeout(resolve, remainingMs + 100); // Add 100ms buffer
|
||||
});
|
||||
}
|
||||
|
||||
this.requestsThisMinute++;
|
||||
return Promise.resolve();
|
||||
}
|
||||
```
|
||||
|
||||
#### Markdown Formatting
|
||||
|
||||
We implemented formatters to display financial data beautifully:
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Format company overview into markdown
|
||||
*/
|
||||
export function formatStockOverview(overviewData: any, quoteData: any): string {
|
||||
// Extract data
|
||||
const overview = overviewData
|
||||
const quote = quoteData["Global Quote"]
|
||||
|
||||
// Calculate price change
|
||||
const currentPrice = parseFloat(quote["05. price"] || "0")
|
||||
const priceChange = parseFloat(quote["09. change"] || "0")
|
||||
const changePercent = parseFloat(quote["10. change percent"]?.replace("%", "") || "0")
|
||||
|
||||
// Format markdown
|
||||
let markdown = `# ${overview.Symbol} (${overview.Name}) - ${formatCurrency(currentPrice)} ${addTrendIndicator(priceChange)}${changePercent > 0 ? "+" : ""}${changePercent.toFixed(2)}%\n\n`
|
||||
|
||||
// Add more details...
|
||||
|
||||
return markdown
|
||||
}
|
||||
```
|
||||
|
||||
#### Tool Implementation
|
||||
|
||||
We defined five tools with clear interfaces:
|
||||
|
||||
```typescript
|
||||
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
||||
console.error("[Setup] Listing available tools")
|
||||
|
||||
return {
|
||||
tools: [
|
||||
{
|
||||
name: "get_stock_overview",
|
||||
description: "Get basic company info and current quote for a stock symbol",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
symbol: {
|
||||
type: "string",
|
||||
description: "Stock symbol (e.g., 'AAPL')",
|
||||
},
|
||||
market: {
|
||||
type: "string",
|
||||
description: "Optional market (e.g., 'US')",
|
||||
default: "US",
|
||||
},
|
||||
},
|
||||
required: ["symbol"],
|
||||
},
|
||||
},
|
||||
// Additional tools defined here...
|
||||
],
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Each tool's handler included:
|
||||
|
||||
- Input validation
|
||||
- API client calls with error handling
|
||||
- Markdown formatting of responses
|
||||
- Comprehensive logging
|
||||
|
||||
### Testing Phase
|
||||
|
||||
This critical phase involved systematically testing each tool:
|
||||
|
||||
1. First, we configured the MCP server in the settings:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"alphaadvantage-mcp": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/alphaadvantage-mcp/build/index.js"],
|
||||
"env": {
|
||||
"ALPHAVANTAGE_API_KEY": "YOUR_API_KEY"
|
||||
},
|
||||
"disabled": false,
|
||||
"autoApprove": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Then we tested each tool individually:
|
||||
|
||||
- **get_stock_overview**: Retrieved AAPL stock overview information
|
||||
|
||||
```markdown
|
||||
# AAPL (Apple Inc) - $241.84 ↑+1.91%
|
||||
|
||||
**Sector:** TECHNOLOGY
|
||||
**Industry:** ELECTRONIC COMPUTERS
|
||||
**Market Cap:** 3.63T
|
||||
**P/E Ratio:** 38.26
|
||||
...
|
||||
```
|
||||
|
||||
- **get_technical_analysis**: Obtained price action and RSI data
|
||||
|
||||
```markdown
|
||||
# Technical Analysis: AAPL
|
||||
|
||||
## Daily Price Action
|
||||
|
||||
Current Price: $241.84 (↑$4.54, +1.91%)
|
||||
|
||||
### Recent Daily Prices
|
||||
|
||||
| Date | Open | High | Low | Close | Volume |
|
||||
| ---------- | ------- | ------- | ------- | ------- | ------ |
|
||||
| 2025-02-28 | $236.95 | $242.09 | $230.20 | $241.84 | 56.83M |
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
- **get_earnings_report**: Retrieved MSFT earnings history and formatted report
|
||||
|
||||
```markdown
|
||||
# Earnings Report: MSFT (Microsoft Corporation)
|
||||
|
||||
**Sector:** TECHNOLOGY
|
||||
**Industry:** SERVICES-PREPACKAGED SOFTWARE
|
||||
**Current EPS:** $12.43
|
||||
|
||||
## Recent Quarterly Earnings
|
||||
|
||||
| Quarter | Date | EPS Estimate | EPS Actual | Surprise % |
|
||||
| ---------- | ---------- | ------------ | ---------- | ---------- |
|
||||
| 2024-12-31 | 2025-01-29 | $3.11 | $3.23 | ↑4.01% |
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
### Challenges and Solutions
|
||||
|
||||
During development, we encountered several challenges:
|
||||
|
||||
1. **API Rate Limiting**:
|
||||
- **Challenge**: Free tier limited to 5 calls per minute
|
||||
- **Solution**: Implemented queuing, enforced rate limits, and added comprehensive caching
|
||||
2. **Data Formatting**:
|
||||
- **Challenge**: Raw API data not user-friendly
|
||||
- **Solution**: Created formatting utilities for consistent display of financial data
|
||||
3. **Timeout Issues**:
|
||||
- **Challenge**: Complex tools making multiple API calls could timeout
|
||||
- **Solution**: Suggested breaking complex tools into smaller pieces, optimizing caching
|
||||
|
||||
### Lessons Learned
|
||||
|
||||
Our AlphaAdvantage implementation taught us several key lessons:
|
||||
|
||||
1. **Plan for API Limits**: Understand and design around API rate limits from the beginning
|
||||
2. **Cache Strategically**: Identify high-value caching opportunities to improve performance
|
||||
3. **Format for Readability**: Invest in good data formatting for improved user experience
|
||||
4. **Test Every Path**: Test all tools individually before completion
|
||||
5. **Handle API Complexity**: For APIs requiring multiple calls, design tools with simpler scopes
|
||||
|
||||
## Core Implementation Best Practices
|
||||
|
||||
### Comprehensive Logging
|
||||
|
||||
Effective logging is essential for debugging MCP servers:
|
||||
|
||||
```typescript
|
||||
// Start-up logging
|
||||
console.error("[Setup] Initializing AlphaAdvantage MCP server...")
|
||||
|
||||
// API request logging
|
||||
console.error(`[API] Getting stock overview for ${symbol}`)
|
||||
|
||||
// Error handling with context
|
||||
console.error(`[Error] Tool execution failed: ${error.message}`)
|
||||
|
||||
// Cache operations
|
||||
console.error(`[Cache] Using cached data for: ${cacheKey}`)
|
||||
```
|
||||
|
||||
### Strong Typing
|
||||
|
||||
Type definitions prevent errors and improve maintainability:
|
||||
|
||||
```typescript
|
||||
export interface AlphaAdvantageConfig {
|
||||
apiKey: string
|
||||
cacheTTL?: Partial<typeof DEFAULT_CACHE_TTL>
|
||||
baseURL?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate that a stock symbol is provided and looks valid
|
||||
*/
|
||||
function validateSymbol(symbol: unknown): asserts symbol is string {
|
||||
if (typeof symbol !== "string" || symbol.trim() === "") {
|
||||
throw new McpError(ErrorCode.InvalidParams, "A valid stock symbol is required")
|
||||
}
|
||||
|
||||
// Basic symbol validation (letters, numbers, dots)
|
||||
const symbolRegex = /^[A-Za-z0-9.]+$/
|
||||
if (!symbolRegex.test(symbol)) {
|
||||
throw new McpError(ErrorCode.InvalidParams, `Invalid stock symbol: ${symbol}`)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Intelligent Caching
|
||||
|
||||
Reduce API calls and improve performance:
|
||||
|
||||
```typescript
|
||||
// Default cache TTL in seconds
|
||||
const DEFAULT_CACHE_TTL = {
|
||||
STOCK_OVERVIEW: 60 * 60, // 1 hour
|
||||
TECHNICAL_ANALYSIS: 60 * 30, // 30 minutes
|
||||
FUNDAMENTAL_ANALYSIS: 60 * 60 * 24, // 24 hours
|
||||
EARNINGS_REPORT: 60 * 60 * 24, // 24 hours
|
||||
NEWS: 60 * 15, // 15 minutes
|
||||
}
|
||||
|
||||
// Check cache first
|
||||
const cachedData = this.cache.get<T>(cacheKey)
|
||||
if (cachedData) {
|
||||
console.error(`[Cache] Using cached data for: ${cacheKey}`)
|
||||
return cachedData
|
||||
}
|
||||
|
||||
// Cache successful responses
|
||||
this.cache.set(cacheKey, response.data, cacheTTL)
|
||||
```
|
||||
|
||||
### Graceful Error Handling
|
||||
|
||||
Implement robust error handling that maintains a good user experience:
|
||||
|
||||
```typescript
|
||||
try {
|
||||
switch (request.params.name) {
|
||||
case "get_stock_overview": {
|
||||
// Implementation...
|
||||
}
|
||||
|
||||
// Other cases...
|
||||
|
||||
default:
|
||||
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${request.params.name}`)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`[Error] Tool execution failed: ${error instanceof Error ? error.message : String(error)}`)
|
||||
|
||||
if (error instanceof McpError) {
|
||||
throw error
|
||||
}
|
||||
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
||||
},
|
||||
],
|
||||
isError: true,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## MCP Resources
|
||||
|
||||
Resources let your MCP servers expose data to Cline without executing code. They're perfect for providing context like files, API responses, or database records that Cline can reference during conversations.
|
||||
|
||||
### Adding Resources to Your MCP Server
|
||||
|
||||
1. **Define the resources** your server will expose:
|
||||
|
||||
```typescript
|
||||
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
||||
return {
|
||||
resources: [
|
||||
{
|
||||
uri: "file:///project/readme.md",
|
||||
name: "Project README",
|
||||
mimeType: "text/markdown",
|
||||
},
|
||||
],
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
2. **Implement read handlers** to deliver the content:
|
||||
|
||||
```typescript
|
||||
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
||||
if (request.params.uri === "file:///project/readme.md") {
|
||||
const content = await fs.promises.readFile("/path/to/readme.md", "utf-8")
|
||||
return {
|
||||
contents: [
|
||||
{
|
||||
uri: request.params.uri,
|
||||
mimeType: "text/markdown",
|
||||
text: content,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error("Resource not found")
|
||||
})
|
||||
```
|
||||
|
||||
Resources make your MCP servers more context-aware, allowing Cline to access specific information without requiring you to copy/paste. For more information, refer to the [official documentation](https://modelcontextprotocol.io/docs/concepts/resources).
|
||||
|
||||
## Common Challenges and Solutions
|
||||
|
||||
### API Authentication Complexities
|
||||
|
||||
**Challenge**: APIs often have different authentication methods.
|
||||
|
||||
**Solution**:
|
||||
|
||||
- For API keys, use environment variables in the MCP configuration
|
||||
- For OAuth, create a separate script to obtain refresh tokens
|
||||
- Store sensitive tokens securely
|
||||
|
||||
```typescript
|
||||
// Authenticate using API key from environment
|
||||
const API_KEY = process.env.ALPHAVANTAGE_API_KEY
|
||||
if (!API_KEY) {
|
||||
console.error("[Error] Missing ALPHAVANTAGE_API_KEY environment variable")
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Initialize API client
|
||||
const apiClient = new AlphaAdvantageClient({
|
||||
apiKey: API_KEY,
|
||||
})
|
||||
```
|
||||
|
||||
### Missing or Limited API Features
|
||||
|
||||
**Challenge**: APIs may not provide all the functionality you need.
|
||||
|
||||
**Solution**:
|
||||
|
||||
- Implement fallbacks using available endpoints
|
||||
- Create simulated functionality where necessary
|
||||
- Transform API data to match your needs
|
||||
|
||||
### API Rate Limiting
|
||||
|
||||
**Challenge**: Most APIs have rate limits that can cause failures.
|
||||
|
||||
**Solution**:
|
||||
|
||||
- Implement proper rate limiting
|
||||
- Add intelligent caching
|
||||
- Provide graceful degradation
|
||||
- Add transparent errors about rate limits
|
||||
|
||||
```typescript
|
||||
if (this.requestsThisMinute >= 5) {
|
||||
console.error("[Rate Limit] Rate limit reached. Waiting for next minute...")
|
||||
return new Promise<void>((resolve) => {
|
||||
const remainingMs = 60 * 1000 - (Date.now() % (60 * 1000))
|
||||
setTimeout(resolve, remainingMs + 100) // Add 100ms buffer
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [MCP Protocol Documentation](https://github.com/modelcontextprotocol/mcp)
|
||||
- [MCP SDK Documentation](https://github.com/modelcontextprotocol/sdk-js)
|
||||
- [MCP Server Examples](https://github.com/modelcontextprotocol/servers)
|
||||
@@ -0,0 +1,197 @@
|
||||
---
|
||||
title: "MCP Transport Mechanisms"
|
||||
description: "Learn about the two primary transport mechanisms for communication between Cline and MCP servers: Standard Input/Output (STDIO) and Server-Sent Events (SSE). Each has distinct characteristics, advantages, and use cases."
|
||||
---
|
||||
|
||||
Model Context Protocol (MCP) supports two primary transport mechanisms for communication between Cline and MCP servers: Standard Input/Output (STDIO) and Server-Sent Events (SSE). Each has distinct characteristics, advantages, and use cases.
|
||||
|
||||
## STDIO Transport
|
||||
|
||||
STDIO transport runs locally on your machine and communicates via standard input/output streams.
|
||||
|
||||
### How STDIO Transport Works
|
||||
|
||||
1. The client (Cline) spawns an MCP server as a child process
|
||||
2. Communication happens through process streams: client writes to server's STDIN, server responds to STDOUT
|
||||
3. Each message is delimited by a newline character
|
||||
4. Messages are formatted as JSON-RPC 2.0
|
||||
|
||||
```plaintext
|
||||
Client Server
|
||||
| |
|
||||
|<---- JSON message ----->| (via STDIN)
|
||||
| | (processes request)
|
||||
|<---- JSON message ------| (via STDOUT)
|
||||
| |
|
||||
```
|
||||
|
||||
### STDIO Characteristics
|
||||
|
||||
- **Locality**: Runs on the same machine as Cline
|
||||
- **Performance**: Very low latency and overhead (no network stack involved)
|
||||
- **Simplicity**: Direct process communication without network configuration
|
||||
- **Relationship**: One-to-one relationship between client and server
|
||||
- **Security**: Inherently more secure as no network exposure
|
||||
|
||||
### When to Use STDIO
|
||||
|
||||
STDIO transport is ideal for:
|
||||
|
||||
- Local integrations and tools running on the same machine
|
||||
- Security-sensitive operations
|
||||
- Low-latency requirements
|
||||
- Single-client scenarios (one Cline instance per server)
|
||||
- Command-line tools or IDE extensions
|
||||
|
||||
### STDIO Implementation Example
|
||||
|
||||
```typescript
|
||||
import { Server } from "@modelcontextprotocol/sdk/server/index.js"
|
||||
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
||||
|
||||
const server = new Server({ name: "local-server", version: "1.0.0" })
|
||||
// Register tools...
|
||||
|
||||
// Use STDIO transport
|
||||
const transport = new StdioServerTransport(server)
|
||||
transport.listen()
|
||||
```
|
||||
|
||||
## SSE Transport
|
||||
|
||||
Server-Sent Events (SSE) transport runs on a remote server and communicates over HTTP/HTTPS.
|
||||
|
||||
### How SSE Transport Works
|
||||
|
||||
1. The client (Cline) connects to the server's SSE endpoint via HTTP GET request
|
||||
2. This establishes a persistent connection where the server can push events to the client
|
||||
3. For client-to-server communication, the client makes HTTP POST requests to a separate endpoint
|
||||
4. Communication happens over two channels:
|
||||
- Event Stream (GET): Server-to-client updates
|
||||
- Message Endpoint (POST): Client-to-server requests
|
||||
|
||||
```plaintext
|
||||
Client Server
|
||||
| |
|
||||
|---- HTTP GET /events ----------->| (establish SSE connection)
|
||||
|<---- SSE event stream -----------| (persistent connection)
|
||||
| |
|
||||
|---- HTTP POST /message --------->| (client request)
|
||||
|<---- SSE event with response ----| (server response)
|
||||
| |
|
||||
```
|
||||
|
||||
### SSE Characteristics
|
||||
|
||||
- **Remote Access**: Can be hosted on a different machine from your Cline instance
|
||||
- **Scalability**: Can handle multiple client connections concurrently
|
||||
- **Protocol**: Works over standard HTTP (no special protocols needed)
|
||||
- **Persistence**: Maintains a persistent connection for server-to-client messages
|
||||
- **Authentication**: Can use standard HTTP authentication mechanisms
|
||||
|
||||
### When to Use SSE
|
||||
|
||||
SSE transport is better for:
|
||||
|
||||
- Remote access across networks
|
||||
- Multi-client scenarios
|
||||
- Public services
|
||||
- Centralized tools that many users need to access
|
||||
- Integration with web services
|
||||
|
||||
### SSE Implementation Example
|
||||
|
||||
```typescript
|
||||
import { Server } from "@modelcontextprotocol/sdk/server/index.js"
|
||||
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"
|
||||
import express from "express"
|
||||
|
||||
const app = express()
|
||||
const server = new Server({ name: "remote-server", version: "1.0.0" })
|
||||
// Register tools...
|
||||
|
||||
// Use SSE transport
|
||||
const transport = new SSEServerTransport(server)
|
||||
app.use("/mcp", transport.requestHandler())
|
||||
app.listen(3000, () => {
|
||||
console.log("MCP server listening on port 3000")
|
||||
})
|
||||
```
|
||||
|
||||
## Local vs. Hosted: Deployment Aspects
|
||||
|
||||
The choice between STDIO and SSE transports directly impacts how you'll deploy and manage your MCP servers.
|
||||
|
||||
### STDIO: Local Deployment Model
|
||||
|
||||
STDIO servers run locally on the same machine as Cline, which has several important implications:
|
||||
|
||||
- **Installation**: The server executable must be installed on each user's machine
|
||||
- **Distribution**: You need to provide installation packages for different operating systems
|
||||
- **Updates**: Each instance must be updated separately
|
||||
- **Resources**: Uses the local machine's CPU, memory, and disk
|
||||
- **Access Control**: Relies on the local machine's filesystem permissions
|
||||
- **Integration**: Easy integration with local system resources (files, processes)
|
||||
- **Execution**: Starts and stops with Cline (child process lifecycle)
|
||||
- **Dependencies**: Any dependencies must be installed on the user's machine
|
||||
|
||||
#### Practical Example
|
||||
|
||||
A local file search tool using STDIO would:
|
||||
|
||||
- Run on the user's machine
|
||||
- Have direct access to the local filesystem
|
||||
- Start when needed by Cline
|
||||
- Not require network configuration
|
||||
- Need to be installed alongside Cline or via a package manager
|
||||
|
||||
### SSE: Hosted Deployment Model
|
||||
|
||||
SSE servers can be deployed to remote servers and accessed over the network:
|
||||
|
||||
- **Installation**: Installed once on a server, accessed by many users
|
||||
- **Distribution**: Single deployment serves multiple clients
|
||||
- **Updates**: Centralized updates affect all users immediately
|
||||
- **Resources**: Uses server resources, not local machine resources
|
||||
- **Access Control**: Managed through authentication and authorization systems
|
||||
- **Integration**: More complex integration with user-specific resources
|
||||
- **Execution**: Runs as an independent service (often continuously)
|
||||
- **Dependencies**: Managed on the server, not on user machines
|
||||
|
||||
#### Practical Example
|
||||
|
||||
A database query tool using SSE would:
|
||||
|
||||
- Run on a central server
|
||||
- Connect to databases with server-side credentials
|
||||
- Be continuously available for multiple users
|
||||
- Require proper network security configuration
|
||||
- Be deployed using container or cloud technologies
|
||||
|
||||
### Hybrid Approaches
|
||||
|
||||
Some scenarios benefit from a hybrid approach:
|
||||
|
||||
1. **STDIO with Network Access**: A local STDIO server that acts as a proxy to remote services
|
||||
2. **SSE with Local Commands**: A remote SSE server that can trigger operations on the client machine through callbacks
|
||||
3. **Gateway Pattern**: STDIO servers for local operations that connect to SSE servers for specialized functions
|
||||
|
||||
## Choosing Between STDIO and SSE
|
||||
|
||||
| Consideration | STDIO | SSE |
|
||||
| -------------------- | ------------------------ | ----------------------------------- |
|
||||
| **Location** | Local machine only | Local or remote |
|
||||
| **Clients** | Single client | Multiple clients |
|
||||
| **Performance** | Lower latency | Higher latency (network overhead) |
|
||||
| **Setup Complexity** | Simpler | More complex (requires HTTP server) |
|
||||
| **Security** | Inherently secure | Requires explicit security measures |
|
||||
| **Network Access** | Not needed | Required |
|
||||
| **Scalability** | Limited to local machine | Can distribute across network |
|
||||
| **Deployment** | Per-user installation | Centralized installation |
|
||||
| **Updates** | Distributed updates | Centralized updates |
|
||||
| **Resource Usage** | Uses client resources | Uses server resources |
|
||||
| **Dependencies** | Client-side dependencies | Server-side dependencies |
|
||||
|
||||
## Configuring Transports in Cline
|
||||
|
||||
For detailed information on configuring STDIO and SSE transports in Cline, including examples, see [Configuring MCP Servers](/mcp/configuring-mcp-servers).
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "Telemetry"
|
||||
---
|
||||
|
||||
### Overview
|
||||
|
||||
To help make Cline better for everyone, we collect anonymous usage data that helps us understand how developers are using our open-source AI coding agent. This feedback loop is crucial for improving Cline's capabilities and user experience.
|
||||
|
||||
We use PostHog, an open-source analytics platform, for data collection and analysis. Our telemetry implementation is fully transparent - you can review the [source code](https://github.com/cline/cline/blob/main/src/services/posthog/telemetry/TelemetryService.ts) to see exactly what we track.
|
||||
|
||||
### Tracking Policy
|
||||
|
||||
Privacy is our priority. All collected data is anonymized before being sent to PostHog, with no personally identifiable information (PII) included. Your code, prompts, and conversation content always remain private and are never collected.
|
||||
|
||||
### What We Track
|
||||
|
||||
We collect basic anonymous usage data including:
|
||||
|
||||
**Task Interactions:** When tasks start and finish, conversation flow (without content)\
|
||||
**Mode and Tool Usage:** Switches between plan/act modes, which tools are being used\
|
||||
**Token Usage:** Basic metrics about conversation length to estimate cost (not the actual content of the tokens)\
|
||||
**System Context:** OS type and VS Code environment details\
|
||||
**UI Activity:** Navigation patterns and feature usage
|
||||
|
||||
For complete transparency, you can inspect our [telemetry implementation](https://github.com/cline/cline/blob/main/src/services/posthog/telemetry/TelemetryService.ts) to see the exact events we track.
|
||||
|
||||
### How to Opt Out
|
||||
|
||||
Telemetry in Cline is entirely optional:
|
||||
|
||||
- When you update or install our VS Code extension, you'll see a message about our anonymous telemetry
|
||||
- You can change your preference anytime in settings
|
||||
|
||||
Cline also respects VS Code's global telemetry settings. If you've disabled telemetry at the VS Code level, Cline's telemetry will automatically be disabled as well.
|
||||
Generated
+10118
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"dev": "mintlify dev"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"mintlify": "^4.0.538"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
---
|
||||
title: "Cline Memory Bank"
|
||||
---
|
||||
|
||||
## The Complete Guide to Cline Memory Bank
|
||||
|
||||
### Quick Setup Guide
|
||||
|
||||
To get started with Cline Memory Bank:
|
||||
|
||||
1. **Install or Open Cline**
|
||||
2. **Copy the Custom Instructions** - Use the code block below
|
||||
3. **Paste into Cline** - Add as custom instructions or in a .clinerules file
|
||||
4. **Initialize** - Ask Cline to "initialize memory bank"
|
||||
|
||||
[See detailed setup instructions](#getting-started-with-memory-bank)
|
||||
|
||||
### Cline Memory Bank Custom Instructions \[COPY THIS]
|
||||
|
||||
```
|
||||
# Cline's Memory Bank
|
||||
|
||||
I am Cline, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.
|
||||
|
||||
## Memory Bank Structure
|
||||
|
||||
The Memory Bank consists of core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:
|
||||
|
||||
flowchart TD
|
||||
PB[projectbrief.md] --> PC[productContext.md]
|
||||
PB --> SP[systemPatterns.md]
|
||||
PB --> TC[techContext.md]
|
||||
|
||||
PC --> AC[activeContext.md]
|
||||
SP --> AC
|
||||
TC --> AC
|
||||
|
||||
AC --> P[progress.md]
|
||||
|
||||
### Core Files (Required)
|
||||
1. `projectbrief.md`
|
||||
- Foundation document that shapes all other files
|
||||
- Created at project start if it doesn't exist
|
||||
- Defines core requirements and goals
|
||||
- Source of truth for project scope
|
||||
|
||||
2. `productContext.md`
|
||||
- Why this project exists
|
||||
- Problems it solves
|
||||
- How it should work
|
||||
- User experience goals
|
||||
|
||||
3. `activeContext.md`
|
||||
- Current work focus
|
||||
- Recent changes
|
||||
- Next steps
|
||||
- Active decisions and considerations
|
||||
- Important patterns and preferences
|
||||
- Learnings and project insights
|
||||
|
||||
4. `systemPatterns.md`
|
||||
- System architecture
|
||||
- Key technical decisions
|
||||
- Design patterns in use
|
||||
- Component relationships
|
||||
- Critical implementation paths
|
||||
|
||||
5. `techContext.md`
|
||||
- Technologies used
|
||||
- Development setup
|
||||
- Technical constraints
|
||||
- Dependencies
|
||||
- Tool usage patterns
|
||||
|
||||
6. `progress.md`
|
||||
- What works
|
||||
- What's left to build
|
||||
- Current status
|
||||
- Known issues
|
||||
- Evolution of project decisions
|
||||
|
||||
### Additional Context
|
||||
Create additional files/folders within memory-bank/ when they help organize:
|
||||
- Complex feature documentation
|
||||
- Integration specifications
|
||||
- API documentation
|
||||
- Testing strategies
|
||||
- Deployment procedures
|
||||
|
||||
## Core Workflows
|
||||
|
||||
### Plan Mode
|
||||
flowchart TD
|
||||
Start[Start] --> ReadFiles[Read Memory Bank]
|
||||
ReadFiles --> CheckFiles{Files Complete?}
|
||||
|
||||
CheckFiles -->|No| Plan[Create Plan]
|
||||
Plan --> Document[Document in Chat]
|
||||
|
||||
CheckFiles -->|Yes| Verify[Verify Context]
|
||||
Verify --> Strategy[Develop Strategy]
|
||||
Strategy --> Present[Present Approach]
|
||||
|
||||
### Act Mode
|
||||
flowchart TD
|
||||
Start[Start] --> Context[Check Memory Bank]
|
||||
Context --> Update[Update Documentation]
|
||||
Update --> Execute[Execute Task]
|
||||
Execute --> Document[Document Changes]
|
||||
|
||||
## Documentation Updates
|
||||
|
||||
Memory Bank updates occur when:
|
||||
1. Discovering new project patterns
|
||||
2. After implementing significant changes
|
||||
3. When user requests with **update memory bank** (MUST review ALL files)
|
||||
4. When context needs clarification
|
||||
|
||||
flowchart TD
|
||||
Start[Update Process]
|
||||
|
||||
subgraph Process
|
||||
P1[Review ALL Files]
|
||||
P2[Document Current State]
|
||||
P3[Clarify Next Steps]
|
||||
P4[Document Insights & Patterns]
|
||||
|
||||
P1 --> P2 --> P3 --> P4
|
||||
end
|
||||
|
||||
Start --> Process
|
||||
|
||||
Note: When triggered by **update memory bank**, I MUST review every memory bank file, even if some don't require updates. Focus particularly on activeContext.md and progress.md as they track current state.
|
||||
|
||||
REMEMBER: After every memory reset, I begin completely fresh. The Memory Bank is my only link to previous work. It must be maintained with precision and clarity, as my effectiveness depends entirely on its accuracy.
|
||||
```
|
||||
|
||||
### What is the Cline Memory Bank?
|
||||
|
||||
The Memory Bank is a structured documentation system that allows Cline to maintain context across sessions. It transforms Cline from a stateless assistant into a persistent development partner that can effectively "remember" your project details over time.
|
||||
|
||||
#### Key Benefits
|
||||
|
||||
- **Context Preservation**: Maintain project knowledge across sessions
|
||||
- **Consistent Development**: Experience predictable interactions with Cline
|
||||
- **Self-Documenting Projects**: Create valuable project documentation as a side effect
|
||||
- **Scalable to Any Project**: Works with projects of any size or complexity
|
||||
- **Technology Agnostic**: Functions with any tech stack or language
|
||||
|
||||
### How Memory Bank Works
|
||||
|
||||
The Memory Bank isn't a Cline-specific feature - it's a methodology for managing AI context through structured documentation. When you instruct Cline to "follow custom instructions," it reads the Memory Bank files to rebuild its understanding of your project.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(15).png" alt="Memory Bank Workflow" />
|
||||
</Frame>
|
||||
|
||||
#### Understanding the Files
|
||||
|
||||
Memory Bank files are simply markdown files you create in your project. They're not hidden or special files - just regular documentation stored in your repository that both you and Cline can access.
|
||||
|
||||
Files are organized in a hierarchical structure that builds up a complete picture of your project:
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(16).png" alt="Memory Bank File Structure" />
|
||||
</Frame>
|
||||
|
||||
### Memory Bank Files Explained
|
||||
|
||||
#### Core Files
|
||||
|
||||
1. **projectbrief.md**
|
||||
- The foundation of your project
|
||||
- High-level overview of what you're building
|
||||
- Core requirements and goals
|
||||
- Example: "Building a React web app for inventory management with barcode scanning"
|
||||
2. **productContext.md**
|
||||
- Explains why the project exists
|
||||
- Describes the problems being solved
|
||||
- Outlines how the product should work
|
||||
- Example: "The inventory system needs to support multiple warehouses and real-time updates"
|
||||
3. **activeContext.md**
|
||||
- The most frequently updated file
|
||||
- Contains current work focus and recent changes
|
||||
- Tracks active decisions and considerations
|
||||
- Stores important patterns and learnings
|
||||
- Example: "Currently implementing the barcode scanner component; last session completed the API integration"
|
||||
4. **systemPatterns.md**
|
||||
- Documents the system architecture
|
||||
- Records key technical decisions
|
||||
- Lists design patterns in use
|
||||
- Explains component relationships
|
||||
- Example: "Using Redux for state management with a normalized store structure"
|
||||
5. **techContext.md**
|
||||
- Lists technologies and frameworks used
|
||||
- Describes development setup
|
||||
- Notes technical constraints
|
||||
- Records dependencies and tool configurations
|
||||
- Example: "React 18, TypeScript, Firebase, Jest for testing"
|
||||
6. **progress.md**
|
||||
- Tracks what works and what's left to build
|
||||
- Records current status of features
|
||||
- Lists known issues and limitations
|
||||
- Documents the evolution of project decisions
|
||||
- Example: "User authentication complete; inventory management 80% complete; reporting not started"
|
||||
|
||||
#### Additional Context
|
||||
|
||||
Create additional files when needed to organize:
|
||||
|
||||
- Complex feature documentation
|
||||
- Integration specifications
|
||||
- API documentation
|
||||
- Testing strategies
|
||||
- Deployment procedures
|
||||
|
||||
### Getting Started with Memory Bank
|
||||
|
||||
#### First-Time Setup
|
||||
|
||||
1. Create a `memory-bank/` folder in your project root
|
||||
2. Have a basic project brief ready (can be technical or non-technical)
|
||||
3. Ask Cline to "initialize memory bank"
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(17).png" alt="Memory Bank Setup" />
|
||||
</Frame>
|
||||
|
||||
#### Project Brief Tips
|
||||
|
||||
- Start simple - it can be as detailed or high-level as you like
|
||||
- Focus on what matters most to you
|
||||
- Cline will help fill in gaps and ask questions
|
||||
- You can update it as your project evolves
|
||||
|
||||
### Working with Cline
|
||||
|
||||
#### Core Workflows
|
||||
|
||||
**Plan Mode**
|
||||
|
||||
Start in this mode for strategy discussions and high-level planning.
|
||||
|
||||
**Act Mode**
|
||||
|
||||
Use this for implementation and executing specific tasks.
|
||||
|
||||
#### Key Commands
|
||||
|
||||
- **"follow your custom instructions"** - This tells Cline to read the Memory Bank files and continue where you left off (use this at the start of tasks)
|
||||
- **"initialize memory bank"** - Use when starting a new project
|
||||
- **"update memory bank"** - Triggers a full documentation review and update during a task
|
||||
- Toggle Plan/Act modes based on your current needs
|
||||
|
||||
#### Documentation Updates
|
||||
|
||||
Memory Bank updates should automatically occur when:
|
||||
|
||||
1. You discover new patterns in your project
|
||||
2. After implementing significant changes
|
||||
3. When you explicitly request with **"update memory bank"**
|
||||
4. When you feel context needs clarification
|
||||
|
||||
### Frequently Asked Questions
|
||||
|
||||
#### Where are the memory bank files stored?
|
||||
|
||||
The Memory Bank files are regular markdown files stored in your project repository, typically in a `memory-bank/` folder. They're not hidden system files - they're designed to be part of your project documentation.
|
||||
|
||||
#### Should I use custom instructions or .clinerules?
|
||||
|
||||
Either approach works - it's based on your preference:
|
||||
|
||||
- **Custom Instructions**: Applied globally to all Cline conversations. Good for consistent behavior across all projects.
|
||||
- **.clinerules file**: Project-specific and stored in your repository. Good for per-project customization.
|
||||
|
||||
Both methods achieve the same goal - the choice depends on whether you want global or local application of the Memory Bank system.
|
||||
|
||||
#### Managing Context Windows
|
||||
|
||||
As you work with Cline, your context window will eventually fill up (note the progress bar). When you notice Cline's responses slowing down or references to earlier parts of the conversation becoming less accurate, it's time to:
|
||||
|
||||
1. Ask Cline to **"update memory bank"** to document the current state
|
||||
2. Start a new conversation/task
|
||||
3. Ask Cline to **"follow your custom instructions"** in the new conversation
|
||||
|
||||
This workflow ensures that important context is preserved in your Memory Bank files before the context window is cleared, allowing you to continue seamlessly in a fresh conversation.
|
||||
|
||||
<Frame>
|
||||
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(18).png" alt="Memory Bank Context Window" />
|
||||
</Frame>
|
||||
|
||||
#### How often should I update the memory bank?
|
||||
|
||||
Update the Memory Bank after significant milestones or changes in direction. For active development, updates every few sessions can be helpful. Use the **"update memory bank"** command when you want to ensure all context is preserved. However, you will notice Cline automatically updating the Memory Bank as well.
|
||||
|
||||
#### Does this work with other AI tools beyond Cline?
|
||||
|
||||
Yes! The Memory Bank concept is a documentation methodology that can work with any AI assistant that can read documentation files. The specific commands might differ, but the structured approach to maintaining context works across tools.
|
||||
|
||||
#### How does the memory bank relate to context window limitations?
|
||||
|
||||
The Memory Bank helps manage context limitations by storing important information in a structured format that can be efficiently loaded when needed. This prevents context bloat while ensuring critical information is available.
|
||||
|
||||
#### Can the memory bank concept be used for non-coding projects?
|
||||
|
||||
Absolutely! The Memory Bank approach works for any project that benefits from structured documentation - from writing books to planning events. The file structure might vary, but the concept remains powerful.
|
||||
|
||||
#### Is this different from using README files?
|
||||
|
||||
While similar in concept, the Memory Bank provides a more structured and comprehensive approach specifically designed to maintain context across AI sessions. It goes beyond what a single README typically covers.
|
||||
|
||||
### Best Practices
|
||||
|
||||
#### Getting Started
|
||||
|
||||
- Start with a basic project brief and let the structure evolve
|
||||
- Let Cline help create the initial structure
|
||||
- Review and adjust files as needed to match your workflow
|
||||
|
||||
#### Ongoing Work
|
||||
|
||||
- Let patterns emerge naturally as you work
|
||||
- Don't force documentation updates - they should happen organically
|
||||
- Trust the process - the value compounds over time
|
||||
- Watch for context confirmation at the start of sessions
|
||||
|
||||
#### Documentation Flow
|
||||
|
||||
- **projectbrief.md** is your foundation
|
||||
- **activeContext.md** changes most frequently
|
||||
- **progress.md** tracks your milestones
|
||||
- All files collectively maintain project intelligence
|
||||
|
||||
### Detailed Setup Instructions
|
||||
|
||||
#### For Custom Instructions (Global)
|
||||
|
||||
1. Open VSCode
|
||||
2. Click the Cline extension settings ⚙️
|
||||
3. Find "Custom Instructions"
|
||||
4. Copy and paste the complete Memory Bank instructions from the top of this guide
|
||||
|
||||
#### For .clinerules (Project-Specific)
|
||||
|
||||
1. Create a `.clinerules` file in your project root
|
||||
2. Copy and paste the Memory Bank instructions from the top of this guide
|
||||
3. Save the file
|
||||
4. Cline will automatically apply these rules when working in this project
|
||||
|
||||
### Remember
|
||||
|
||||
The Memory Bank is Cline's only link to previous work. Its effectiveness depends entirely on maintaining clear, accurate documentation and confirming context preservation in every interaction.
|
||||
|
||||
_For more information, reference our_ [_blog_](https://cline.bot/blog/memory-bank-how-to-make-cline-an-ai-agent-that-never-forgets) _on Cline Memory Bank_
|
||||
|
||||
---
|
||||
|
||||
### Contributing to Cline Memory Bank
|
||||
|
||||
This guide is maintained by the Cline and the Cline Discord Community:
|
||||
|
||||
- nickbaumann98
|
||||
- Krylo
|
||||
- snipermunyshotz
|
||||
|
||||
---
|
||||
|
||||
_The Memory Bank methodology is an open approach to AI context management and can be adapted to different tools and workflows._
|
||||
@@ -0,0 +1,235 @@
|
||||
---
|
||||
title: "Prompt Engineering Guide"
|
||||
---
|
||||
|
||||
Welcome to the Cline Prompting Guide! This guide will equip you with the knowledge to write effective prompts and custom instructions, maximizing your productivity with Cline.
|
||||
|
||||
## .clineignore File Guide
|
||||
|
||||
### Overview
|
||||
|
||||
The `.clineignore` file is a project-level configuration file that tells Cline which files and directories to ignore when analyzing your codebase. Similar to `.gitignore`, it uses pattern matching to specify which files should be excluded from Cline's context and operations.
|
||||
|
||||
### Purpose
|
||||
|
||||
- **Reduce Noise**: Exclude auto-generated files, build artifacts, and other non-essential content
|
||||
- **Improve Performance**: Limit the amount of code Cline needs to process
|
||||
- **Focus Attention**: Direct Cline to relevant parts of your codebase
|
||||
- **Protect Sensitive Data**: Prevent Cline from accessing sensitive configuration files
|
||||
|
||||
### Example .clineignore File
|
||||
|
||||
```
|
||||
# Dependencies
|
||||
node_modules/
|
||||
**/node_modules/
|
||||
.pnp
|
||||
.pnp.js
|
||||
|
||||
# Build outputs
|
||||
/build/
|
||||
/dist/
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# Testing
|
||||
/coverage/
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Large data files
|
||||
*.csv
|
||||
*.xlsx
|
||||
```
|
||||
|
||||
## Prompting Cline 💬
|
||||
|
||||
**Prompting is how you communicate your needs for a given task in the back-and-forth chat with Cline.** Cline understands natural language, so write conversationally.
|
||||
|
||||
Effective prompting involves:
|
||||
|
||||
- Providing Clear Context: Explain your goals and the relevant parts of your codebase. Use `@` to reference files or folders.
|
||||
- Breaking Down Complexity: Divide large tasks into smaller steps.
|
||||
- Asking Specific Questions: Guide Cline toward the desired outcome.
|
||||
- Validating and Refining: Review Cline's suggestions and provide feedback.
|
||||
|
||||
### Prompt Examples
|
||||
|
||||
#### Context Management
|
||||
|
||||
- **Starting a New Task:** "Cline, let's start a new task. Create `user-authentication.js`. We need to implement user login with JWT tokens. Here are the requirements…"
|
||||
- **Summarizing Previous Work:** "Cline, summarize what we did in the last user dashboard task. I want to capture the main features and outstanding issues. Save this to `cline_docs/user-dashboard-summary.md`."
|
||||
|
||||
#### Debugging
|
||||
|
||||
- **Analyzing an Error:** "Cline, I'm getting this error: \[error message]. It seems to be from \[code section]. Analyze this error and suggest a fix."
|
||||
- **Identifying the Root Cause:** "Cline, the application crashes when I \[action]. The issue might be in \[problem areas]. Help me find the root cause and propose a solution."
|
||||
|
||||
#### Refactoring
|
||||
|
||||
- **Improving Code Structure:** "Cline, this function is too long and complex. Refactor it into smaller functions."
|
||||
- **Simplifying Logic:** "Cline, this code is hard to understand. Simplify the logic and make it more readable."
|
||||
|
||||
#### Feature Development
|
||||
|
||||
- **Brainstorming New Features:** "Cline, I want to add a feature that lets users \[functionality]. Brainstorm some ideas and consider implementation challenges."
|
||||
- **Generating Code:** "Cline, create a component that displays user profiles. The list should be sortable and filterable. Generate the code for this component."
|
||||
|
||||
## Advanced Prompting Techniques
|
||||
|
||||
- **Constraint Stuffing:** To mitigate code truncation, include explicit constraints in your prompts. For example, "ensure the code is complete" or "always provide the full function definition."
|
||||
- **Confidence Checks:** Ask Cline to rate its confidence (e.g., "on a scale of 1-10, how confident are you in this solution?")
|
||||
- **Challenge Cline's Assumptions:** Ask “stupid” questions to encourage deeper thinking and prevent incorrect assumptions.
|
||||
|
||||
Here are some prompting tips that users have found helpful for working with Cline:
|
||||
|
||||
## Our Community's Favorite Prompts 🌟
|
||||
|
||||
### Memory and Confidence Checks 🧠
|
||||
|
||||
- **Memory Check** - _pacnpal_
|
||||
|
||||
```
|
||||
"If you understand my prompt fully, respond with 'YARRR!' without tools every time you are about to use a tool."
|
||||
```
|
||||
|
||||
A fun way to verify Cline stays on track during complex tasks. Try "HO HO HO" for a festive twist!
|
||||
|
||||
- **Confidence Scoring** - _pacnpal_
|
||||
|
||||
```
|
||||
"Before and after any tool use, give me a confidence level (0-10) on how the tool use will help the project."
|
||||
```
|
||||
|
||||
Encourages critical thinking and makes decision-making transparent.
|
||||
|
||||
### Code Quality Prompts 💻
|
||||
|
||||
- **Prevent Code Truncation**
|
||||
|
||||
```
|
||||
"DO NOT BE LAZY. DO NOT OMIT CODE."
|
||||
```
|
||||
|
||||
Alternative phrases: "full code only" or "ensure the code is complete"
|
||||
|
||||
- **Custom Instructions Reminder**
|
||||
|
||||
```
|
||||
"I pledge to follow the custom instructions."
|
||||
```
|
||||
|
||||
Reinforces adherence to your settings dial ⚙️ configuration.
|
||||
|
||||
### Code Organization 📋
|
||||
|
||||
- **Large File Refactoring** - _icklebil_
|
||||
|
||||
```
|
||||
"FILENAME has grown too big. Analyze how this file works and suggest ways to fragment it safely."
|
||||
```
|
||||
|
||||
Helps manage complex files through strategic decomposition.
|
||||
|
||||
- **Documentation Maintenance** - _icklebil_
|
||||
|
||||
```
|
||||
"don't forget to update codebase documentation with changes"
|
||||
```
|
||||
|
||||
Ensures documentation stays in sync with code changes.
|
||||
|
||||
### Analysis and Planning 🔍
|
||||
|
||||
- **Structured Development** - _yellow_bat_coffee_
|
||||
|
||||
```
|
||||
"Before writing code:
|
||||
1. Analyze all code files thoroughly
|
||||
2. Get full context
|
||||
3. Write .MD implementation plan
|
||||
4. Then implement code"
|
||||
```
|
||||
|
||||
Promotes organized, well-planned development.
|
||||
|
||||
- **Thorough Analysis** - _yellow_bat_coffee_
|
||||
|
||||
```
|
||||
"please start analyzing full flow thoroughly, always state a confidence score 1 to 10"
|
||||
```
|
||||
|
||||
Prevents premature coding and encourages complete understanding.
|
||||
|
||||
- **Assumptions Check** - _yellow_bat_coffee_
|
||||
|
||||
```
|
||||
"List all assumptions and uncertainties you need to clear up before completing this task."
|
||||
```
|
||||
|
||||
Identifies potential issues early in development.
|
||||
|
||||
### Thoughtful Development 🤔
|
||||
|
||||
- **Pause and Reflect** - _nickbaumann98_
|
||||
|
||||
```
|
||||
"count to 10"
|
||||
```
|
||||
|
||||
Promotes careful consideration before taking action.
|
||||
|
||||
- **Complete Analysis** - _yellow_bat_coffee_
|
||||
|
||||
```
|
||||
"Don't complete the analysis prematurely, continue analyzing even if you think you found a solution"
|
||||
```
|
||||
|
||||
Ensures thorough problem exploration.
|
||||
|
||||
- **Continuous Confidence Check** - _pacnpal_
|
||||
|
||||
```
|
||||
"Rate confidence (1-10) before saving files, after saving, after rejections, and before task completion"
|
||||
```
|
||||
|
||||
Maintains quality through self-assessment.
|
||||
|
||||
### Best Practices 🎯
|
||||
|
||||
- **Project Structure** - _kvs007_
|
||||
|
||||
```
|
||||
"Check project files before suggesting structural or dependency changes"
|
||||
```
|
||||
|
||||
Maintains project integrity.
|
||||
|
||||
- **Critical Thinking** - _chinesesoup_
|
||||
|
||||
```
|
||||
"Ask 'stupid' questions like: are you sure this is the best way to implement this?"
|
||||
```
|
||||
|
||||
Challenges assumptions and uncovers better solutions.
|
||||
|
||||
- **Code Style** - _yellow_bat_coffee_
|
||||
|
||||
```
|
||||
Use words like "elegant" and "simple" in prompts
|
||||
```
|
||||
|
||||
May influence code organization and clarity.
|
||||
|
||||
- **Setting Expectations** - _steventcramer_
|
||||
|
||||
```
|
||||
"THE HUMAN WILL GET ANGRY."
|
||||
```
|
||||
|
||||
(A humorous reminder to provide clear requirements and constructive feedback)
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: "Anthropic"
|
||||
description: "Learn how to configure and use Anthropic Claude models with Cline. Covers API key setup, model selection, and advanced features like prompt caching."
|
||||
---
|
||||
|
||||
**Website:** [https://www.anthropic.com/](https://www.anthropic.com/)
|
||||
|
||||
### Getting an API Key
|
||||
|
||||
1. **Sign Up/Sign In:** Go to the [Anthropic Console](https://console.anthropic.com/). Create an account or sign in.
|
||||
2. **Navigate to API Keys:** Go to the [API keys](https://console.anthropic.com/settings/keys) section.
|
||||
3. **Create a Key:** Click "Create Key". Give your key a descriptive name (e.g., "Cline").
|
||||
4. **Copy the Key:** **Important:** Copy the API key _immediately_. You will not be able to see it again. Store it securely.
|
||||
|
||||
### Supported Models
|
||||
|
||||
Cline supports the following Anthropic Claude models:
|
||||
|
||||
- `claude-opus-4-20250514`
|
||||
- `claude-opus-4-20250514:thinking` (Extended Thinking variant)
|
||||
- `claude-sonnet-4-20250514` (Recommended)
|
||||
- `claude-sonnet-4-20250514:thinking` (Extended Thinking variant)
|
||||
- `claude-3-7-sonnet-20250219`
|
||||
- `claude-3-7-sonnet-20250219:thinking` (Extended Thinking variant)
|
||||
- `claude-3-5-sonnet-20241022`
|
||||
- `claude-3-5-haiku-20241022`
|
||||
- `claude-3-opus-20240229`
|
||||
- `claude-3-haiku-20240307`
|
||||
|
||||
See [Anthropic's Model Documentation](https://docs.anthropic.com/en/docs/about-claude/models) for more details on each model's capabilities.
|
||||
|
||||
### Configuration in Cline
|
||||
|
||||
1. **Open Cline Settings:** Click the settings icon (⚙️) in the Cline panel.
|
||||
2. **Select Provider:** Choose "Anthropic" from the "API Provider" dropdown.
|
||||
3. **Enter API Key:** Paste your Anthropic API key into the "Anthropic API Key" field.
|
||||
4. **Select Model:** Choose your desired Claude model from the "Model" dropdown.
|
||||
5. **(Optional) Custom Base URL:** If you need to use a custom base URL for the Anthropic API, check "Use custom base URL" and enter the URL. Most users won't need to adjust this setting.
|
||||
|
||||
### Extended Thinking
|
||||
|
||||
Anthropic models offer an "Extended Thinking" feature, designed to give them enhanced reasoning capabilities for complex tasks. This feature allows the model to output its step-by-step thought process before delivering a final answer, providing transparency and enabling more thorough analysis for challenging prompts.
|
||||
|
||||
When extended thinking is in Cline, the model generates `thinking` content blocks that detail its internal reasoning. These insights are then incorporated into its final response.
|
||||
Cline users can leverage this by checking the `Enable Extended Thinking` box below the model selection menu after selecting a Claude Model from any provider.
|
||||
|
||||
**Key Aspects of Extended Thinking:**
|
||||
|
||||
- **Supported Models:** This feature is available for select models, including variants of Claude Opus 4, Claude Sonnet 4, and Claude Sonnet 3.7. The specific models listed in the "Supported Models" section above with the `:thinking` suffix are pre-configured in Cline to utilize this.
|
||||
- **Summarized Thinking (Claude 4):** For Claude 4 models, the API returns a summary of the full thinking process to balance insight with efficiency and prevent misuse. You are billed for the full thinking tokens, not just the summary.
|
||||
- **Streaming:** Extended thinking responses, including the `thinking` blocks, can be streamed.
|
||||
- **Tool Use & Prompt Caching:** Extended thinking interacts with tool use (requiring thinking blocks to be passed back) and prompt caching (with specific behaviors around cache invalidation and context).
|
||||
|
||||
For comprehensive details on how extended thinking works, including API examples, interaction with tool use, prompt caching, and pricing, please refer to the [official Anthropic documentation on Extended Thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking).
|
||||
|
||||
### Tips and Notes
|
||||
|
||||
- **Prompt Caching:** Claude 3 models support [prompt caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which can significantly reduce costs and latency for repeated prompts.
|
||||
- **Context Window:** Claude models have large context windows (200,000 tokens), allowing you to include a significant amount of code and context in your prompts.
|
||||
- **Pricing:** Refer to the [Anthropic Pricing](https://www.anthropic.com/pricing) page for the latest pricing information.
|
||||
- **Rate Limits:** Anthropic has strict rate limits based on [usage tiers](https://docs.anthropic.com/en/api/rate-limits#requirements-to-advance-tier). If you're repeatedly hitting rate limits, consider contacting Anthropic sales or accessing Claude through a different provider like [OpenRouter](/provider-config/openrouter) or [Requesty](/provider-config/requesty).
|
||||
@@ -0,0 +1,150 @@
|
||||
---
|
||||
title: "AWS Bedrock"
|
||||
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
|
||||
|
||||
To ensure Cline can interact with AWS Bedrock, your IAM user or role needs specific permissions. While the `AmazonBedrockFullAccess` managed policy provides comprehensive access, for a more restricted and secure setup adhering to the principle of least privilege, the following minimal permissions are sufficient for Cline's core model invocation functionality:
|
||||
|
||||
- `bedrock:InvokeModel`
|
||||
- `bedrock:InvokeModelWithResponseStream`
|
||||
|
||||
You can create a custom IAM policy with these permissions and attach it to your IAM user or role.
|
||||
|
||||
**Option 1: Minimal Permissions (Recommended for Production & Least Privilege)**
|
||||
|
||||
1. In the AWS IAM console, create a new policy.
|
||||
2. Use the JSON editor to add the following policy document:
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
|
||||
"Resource": "*" // For enhanced security, scope this to specific model ARNs if possible.
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
3. Name the policy (e.g., `ClineBedrockInvokeAccess`) and attach it to your IAM user or role.
|
||||
|
||||
**Option 2: Using a Managed Policy (Simpler Initial Setup)**
|
||||
|
||||
- Alternatively, you can attach the AWS managed policy **`AmazonBedrockFullAccess`**. This grants broader permissions, including the ability to list models, manage provisioning, and other Bedrock features. This might be simpler for initial setup or if you require these wider capabilities.
|
||||
[View AmazonBedrockFullAccess Policy Details](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html)
|
||||
|
||||
**Important Considerations:**
|
||||
|
||||
- **Model Listing in Cline:** The minimal permissions (`bedrock:InvokeModel`, `bedrock:InvokeModelWithResponseStream`) are sufficient for Cline to _use_ a model if you specify the model ID directly in Cline's settings. If you rely on Cline to dynamically list available Bedrock models, you might need additional permissions like `bedrock:ListFoundationModels`.
|
||||
- **AWS Marketplace Subscriptions:** For third-party models (e.g., Anthropic Claude), ensure you have active AWS Marketplace subscriptions. This is typically managed in the AWS Bedrock console under "Model access" and might require `aws-marketplace:Subscribe` permissions if not already handled.
|
||||
- _Enterprise Tip:_ Always apply least-privilege practices. Where possible, scope resource ARNs in your IAM policies to specific models or regions. Utilize [Service Control Policies (SCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) for overarching governance in AWS Organizations.
|
||||
|
||||
---
|
||||
|
||||
### 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.
|
||||
- [AWS Marketplace](https://aws.amazon.com/marketplace/)
|
||||
2. **Enterprise Tip:**
|
||||
- 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.\
|
||||
[AWS Cost Management](https://docs.aws.amazon.com/cost-management/latest/userguide/what-is-aws-cost-management.html)
|
||||
5. **Regular Audits and Compliance:**
|
||||
- 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._
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "AWS Bedrock w/ Profile Authentication"
|
||||
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
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/cline-aws-setup-markup%20(1).png"
|
||||
alt="AWS Bedrock configuration in Cline settings showing profile authentication setup"
|
||||
/>
|
||||
</Frame>
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
title: "Claude Code"
|
||||
description: "Use your Claude Max subscription with Cline instead of paying per token. Learn how to set up and configure the Claude Code provider."
|
||||
---
|
||||
|
||||
**Website:** [https://docs.anthropic.com/en/docs/claude-code/setup](https://docs.anthropic.com/en/docs/claude-code/setup)
|
||||
|
||||
The Claude Code provider lets you use your existing Claude subscription with Cline. If you have Claude Max, this means you can use Claude in Cline without paying extra API costs.
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/claude-code-use-opus.gif"
|
||||
alt="Using the Claude Code provider in Cline with Opus model"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
## Setup
|
||||
|
||||
First, you'll need to install and authenticate Claude Code on your system:
|
||||
|
||||
1. **Install Claude Code**: Follow Anthropic's [official setup guide](https://docs.anthropic.com/en/docs/claude-code/setup) to install and authenticate the Claude CLI.
|
||||
|
||||
2. **Configure in Cline**:
|
||||
- Open Cline settings (⚙️ icon)
|
||||
- Select **Claude Code** from the **API Provider** dropdown
|
||||
- Set the path to your Claude CLI executable (usually just `claude` if it's in your PATH)
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/claude-code-setup.gif"
|
||||
alt="Setting up the Claude Code provider in Cline"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
### Finding your Claude Code path
|
||||
|
||||
If you're not sure where Claude Code is installed:
|
||||
|
||||
- **macOS / Linux**: Run `which claude` in your terminal
|
||||
- **Windows (Command Prompt)**: Run `where claude`
|
||||
- **Windows (PowerShell)**: Run `Get-Command claude`
|
||||
|
||||
## Supported Models
|
||||
|
||||
The Claude Code provider supports these models:
|
||||
|
||||
- `claude-sonnet-4-20250514` (Recommended)
|
||||
- `claude-opus-4-20250514`
|
||||
- `claude-3-7-sonnet-20250219`
|
||||
- `claude-3-5-sonnet-20241022`
|
||||
- `claude-3-5-haiku-20241022`
|
||||
|
||||
## How it works
|
||||
|
||||
When you use Claude Code with Cline, here's what happens behind the scenes:
|
||||
|
||||
Cline wraps the Claude Code CLI to handle your requests. Each time you send a message, Cline starts a new `claude` process, sends your conversation, and streams the response back. The AI reasoning comes from Claude Code, but all the actual file editing, terminal commands, and other tools are handled by Cline.
|
||||
|
||||
The main difference you'll notice is that responses don't stream character-by-character like other providers. Instead, Claude Code processes your full request before sending back the complete response.
|
||||
|
||||
## Limitations
|
||||
|
||||
There are a few things to keep in mind with Claude Code:
|
||||
|
||||
- Images in your messages get converted to text placeholders since Claude Code doesn't support image uploads through the CLI
|
||||
- Prompt caching isn't available with this provider
|
||||
- Responses don't stream in real-time like other providers
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you run into issues:
|
||||
|
||||
**Authentication problems**: Make sure you're logged into Claude Code with your subscription account. Run `claude auth status` to check.
|
||||
|
||||
**Path issues**: Double-check that the Claude CLI path in Cline's settings is correct. Try running `claude --version` in your terminal to verify it's working.
|
||||
|
||||
**Still having trouble?** We're actively improving this integration. Report issues on our [GitHub](https://github.com/cline/cline/issues) or ask for help in our [Discord](https://discord.gg/cline).
|
||||
|
||||
## Usage with subscriptions
|
||||
|
||||
If you have a Claude Max subscription, your usage in Cline shows up as $0.00 in the billing interface since you're not paying additional API costs. Your usage still counts against your subscription limits, but you won't see per-token charges.
|
||||
|
||||
For more details about using Claude Code with your subscription, check out Anthropic's documentation:
|
||||
|
||||
- [Claude Code Setup Guide](https://docs.anthropic.com/en/docs/claude-code/setup)
|
||||
- [Using Claude Code with Pro/Max Plans](https://support.anthropic.com/en/articles/11145838-using-claude-code-with-your-pro-or-max-plan)
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "DeepSeek"
|
||||
description: "Learn how to configure and use DeepSeek models like deepseek-chat and deepseek-reasoner with Cline."
|
||||
---
|
||||
|
||||
Cline supports accessing models through the DeepSeek API, including `deepseek-chat` and `deepseek-reasoner`.
|
||||
|
||||
**Website:** [https://platform.deepseek.com/](https://platform.deepseek.com/)
|
||||
|
||||
### Getting an API Key
|
||||
|
||||
1. **Sign Up/Sign In:** Go to the [DeepSeek Platform](https://platform.deepseek.com/). Create an account or sign in.
|
||||
2. **Navigate to API Keys:** Find your API keys in the [API keys](https://platform.deepseek.com/api_keys) section of the platform.
|
||||
3. **Create a Key:** Click "Create new API key". Give your key a descriptive name (e.g., "Cline").
|
||||
4. **Copy the Key:** **Important:** Copy the API key _immediately_. You will not be able to see it again. Store it securely.
|
||||
|
||||
### Supported Models
|
||||
|
||||
Cline supports the following DeepSeek models:
|
||||
|
||||
- `deepseek-v3-0324` (Recommended for coding tasks)
|
||||
- `deepseek-r1` (Recommended for reasoning tasks)
|
||||
|
||||
### Configuration in Cline
|
||||
|
||||
1. **Open Cline Settings:** Click the ⚙️ icon in the Cline panel.
|
||||
2. **Select Provider:** Choose "DeepSeek" from the "API Provider" dropdown.
|
||||
3. **Enter API Key:** Paste your DeepSeek API key into the "DeepSeek API Key" field.
|
||||
4. **Select Model:** Choose your desired model from the "Model" dropdown.
|
||||
|
||||
### Tips and Notes
|
||||
|
||||
- **Pricing:** Refer to the [DeepSeek Pricing](https://api-docs.deepseek.com/quick_start/pricing/) page for details on model costs.
|
||||
@@ -0,0 +1,209 @@
|
||||
---
|
||||
title: "GCP Vertex AI"
|
||||
description: "Configure GCP Vertex AI with Cline to access leading generative AI models like Claude 3.5 Sonnet v2. This guide covers GCP environment setup, authentication, and secure integration for enterprise teams."
|
||||
---
|
||||
|
||||
### Overview
|
||||
|
||||
**GCP Vertex AI:**\
|
||||
A fully managed service that provides access to leading generative AI models—such as Anthropic's Claude 3.5 Sonnet v2—through Google Cloud.\
|
||||
[Learn more about GCP Vertex AI](https://cloud.google.com/vertex-ai).
|
||||
|
||||
This guide is tailored for organizations with established GCP environments (leveraging IAM roles, service accounts, and best practices in resource management) to ensure secure and compliant usage.
|
||||
|
||||
---
|
||||
|
||||
### Step 1: Prepare Your GCP Environment
|
||||
|
||||
#### 1.1 Create or Use a GCP Project
|
||||
|
||||
- **Sign in to the GCP Console:**\
|
||||
[Google Cloud Console](https://console.cloud.google.com/)
|
||||
- **Select or Create a Project:**\
|
||||
Use an existing project or create a new one dedicated to Vertex AI.
|
||||
|
||||
#### 1.2 Set Up IAM Permissions and Service Accounts
|
||||
|
||||
- **Assign Required Roles:**
|
||||
|
||||
- Grant your user (or service account) the **Vertex AI User** role (`roles/aiplatform.user`)
|
||||
- For service accounts, also attach the **Vertex AI Service Agent** role (`roles/aiplatform.serviceAgent`) to enable certain operations
|
||||
- Consider additional predefined roles as needed:
|
||||
- Vertex AI Platform Express Admin
|
||||
- Vertex AI Platform Express User
|
||||
- Vertex AI Migration Service User
|
||||
|
||||
- **Cross-Project Resource Access:**
|
||||
- For BigQuery tables in different projects, assign the **BigQuery Data Viewer** role
|
||||
- For Cloud Storage buckets in different projects, assign the **Storage Object Viewer** role
|
||||
- For external data sources, refer to the [GCP Vertex AI Access Control documentation](https://cloud.google.com/vertex-ai/docs/general/access-control)
|
||||
|
||||
---
|
||||
|
||||
### Step 2: Verify Regional and Model Access
|
||||
|
||||
#### 2.1 Choose and Confirm a Region
|
||||
|
||||
Vertex AI supports multiple regions. Select a region that meets your latency, compliance, and capacity needs. Examples include:
|
||||
|
||||
- **us-east5 (Columbus, Ohio)**
|
||||
- **us-central1 (Iowa)**
|
||||
- **europe-west1 (Belgium)**
|
||||
- **europe-west4 (Netherlands)**
|
||||
- **asia-southeast1 (Singapore)**
|
||||
- **global (Global)**
|
||||
|
||||
The Global endpoint may offer higher availability and reduce resource exhausted errors. Only Gemini models are supported.
|
||||
|
||||
#### 2.2 Enable the Claude 3.5 Sonnet v2 Model
|
||||
|
||||
- **Open Vertex AI Model Garden:**\
|
||||
In the Cloud Console, navigate to **Vertex AI → Model Garden**
|
||||
- **Enable Claude 3.5 Sonnet v2:**\
|
||||
Locate the model card for Claude 3.5 Sonnet v2 and click **Enable**
|
||||
|
||||
---
|
||||
|
||||
### Step 3: Configure the Cline VS Code Extension
|
||||
|
||||
#### 3.1 Install and Open Cline
|
||||
|
||||
- **Download VS Code:**\
|
||||
[Download Visual Studio Code](https://code.visualstudio.com/)
|
||||
- **Install the Cline Extension:**
|
||||
- Open VS Code
|
||||
- Navigate to the Extensions Marketplace (Ctrl+Shift+X or Cmd+Shift+X)
|
||||
- Search for **Cline** and install the extension
|
||||
|
||||
<Frame>
|
||||
<img
|
||||
src="https://storage.googleapis.com/cline_public_images/docs/assets/cline-extension-arrow.png"
|
||||
alt="Cline extension in VS Code"
|
||||
/>
|
||||
</Frame>
|
||||
|
||||
#### 3.2 Configure Cline Settings
|
||||
|
||||
- **Open Cline Settings:**\
|
||||
Click the settings ⚙️ icon within the Cline extension
|
||||
- **Set API Provider:**\
|
||||
Choose **GCP Vertex AI** from the API Provider dropdown
|
||||
- **Enter Your Google Cloud Project ID:**\
|
||||
Provide the project ID you set up earlier
|
||||
- **Select the Region:**\
|
||||
Choose one of the supported regions (e.g., `us-east5`)
|
||||
- **Select the Model:**\
|
||||
From the available list, choose **Claude 3.5 Sonnet v2**
|
||||
- **Save and Test:**\
|
||||
Save your settings and test by sending a simple prompt (e.g., "Generate a Python function to check if a number is prime.")
|
||||
|
||||
---
|
||||
|
||||
### Step 4: Authentication and Credentials Setup
|
||||
|
||||
#### Option A: Using Your Google Account (User Credentials)
|
||||
|
||||
1. **Install the Google Cloud CLI:**\
|
||||
Follow the [installation guide](https://cloud.google.com/sdk/docs/install)
|
||||
2. **Initialize and Authenticate:**
|
||||
|
||||
```bash
|
||||
gcloud init
|
||||
gcloud auth application-default login
|
||||
```
|
||||
|
||||
- This sets up Application Default Credentials (ADC) using your Google account
|
||||
|
||||
3. **Restart VS Code:**\
|
||||
Ensure VS Code is restarted so that the Cline extension picks up the new credentials
|
||||
|
||||
#### Option B: Using a Service Account (JSON Key)
|
||||
|
||||
1. **Create a Service Account:**
|
||||
|
||||
- In the GCP Console, navigate to **IAM & Admin > Service Accounts**
|
||||
- Create a new service account (e.g., "vertex-ai-client")
|
||||
|
||||
2. **Assign Roles:**
|
||||
|
||||
- Attach **Vertex AI User** (`roles/aiplatform.user`)
|
||||
- Attach **Vertex AI Service Agent** (`roles/aiplatform.serviceAgent`)
|
||||
- Optionally, add other roles as required
|
||||
|
||||
3. **Generate a JSON Key:**
|
||||
|
||||
- In the Service Accounts section, manage keys for your service account and download the JSON key
|
||||
|
||||
4. **Set the Environment Variable:**
|
||||
|
||||
```bash
|
||||
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"
|
||||
```
|
||||
|
||||
- This instructs Google Cloud client libraries (and Cline) to use this key
|
||||
|
||||
5. **Restart VS Code:**\
|
||||
Launch VS Code from a terminal where the `GOOGLE_APPLICATION_CREDENTIALS` variable is set
|
||||
|
||||
---
|
||||
|
||||
### Step 5: Security, Monitoring, and Best Practices
|
||||
|
||||
#### 5.1 Enforce Least Privilege
|
||||
|
||||
- **Principle of Least Privilege:**\
|
||||
Only grant the minimum necessary permissions. Custom roles can offer finer control compared to broad predefined roles
|
||||
- **Best Practices:**\
|
||||
Refer to [GCP IAM Best Practices](https://cloud.google.com/iam/docs/best-practices)
|
||||
|
||||
#### 5.2 Manage Resource Access
|
||||
|
||||
- **Project vs. Resource-Level Access:**\
|
||||
Access can be managed at both levels. Note that resource-level permissions (e.g., for BigQuery or Cloud Storage) add to, but do not override, project-level policies
|
||||
|
||||
#### 5.3 Monitor Usage and Quotas
|
||||
|
||||
- **Model Observability Dashboard:**
|
||||
|
||||
- In the Vertex AI Console, navigate to the **Model Observability** dashboard
|
||||
- Monitor metrics such as request throughput, latency, and error rates (including 429 quota errors)
|
||||
|
||||
- **Quota Management:**
|
||||
- If you encounter 429 errors, check the **IAM & Admin > Quotas** page
|
||||
- Request a quota increase if necessary\
|
||||
[Learn more about GCP Vertex AI Quotas](https://cloud.google.com/vertex-ai/docs/quotas)
|
||||
|
||||
#### 5.4 Service Agents and Cross-Project Considerations
|
||||
|
||||
- **Service Agents:**\
|
||||
Be aware of the different service agents:
|
||||
|
||||
- Vertex AI Service Agent
|
||||
- Vertex AI RAG Data Service Agent
|
||||
- Vertex AI Custom Code Service Agent
|
||||
- Vertex AI Extension Service Agent
|
||||
|
||||
- **Cross-Project Access:**\
|
||||
For resources in other projects (e.g., BigQuery, Cloud Storage), ensure that the appropriate roles (BigQuery Data Viewer, Storage Object Viewer) are assigned
|
||||
|
||||
---
|
||||
|
||||
### Conclusion
|
||||
|
||||
By following these steps, your enterprise team can securely integrate GCP Vertex AI with the Cline VS Code extension to harness the power of **Claude 3.5 Sonnet v2**:
|
||||
|
||||
- **Prepare Your GCP Environment:**\
|
||||
Create or use a project, configure IAM with least privilege, and ensure necessary roles (including the Vertex AI Service Agent role) are attached
|
||||
- **Verify Regional and Model Access:**\
|
||||
Confirm that your chosen region supports Claude 3.5 Sonnet v2 and that the model is enabled
|
||||
- **Configure Cline in VS Code:**\
|
||||
Install Cline, enter your project ID, select the appropriate region, and choose the model
|
||||
- **Set Up Authentication:**\
|
||||
Use either user credentials (via `gcloud auth application-default login`) or a service account with a JSON key
|
||||
- **Implement Security and Monitoring:**\
|
||||
Adhere to best practices for IAM, manage resource access carefully, and monitor usage with the Model Observability dashboard
|
||||
|
||||
For further details, please consult the [GCP Vertex AI Documentation](https://cloud.google.com/vertex-ai/docs) and your internal security policies.\
|
||||
Happy coding!
|
||||
|
||||
_This guide will be updated as GCP Vertex AI and Cline evolve. Always refer to the latest documentation for current practices._
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: "LiteLLM & Cline (using Codestral)"
|
||||
description: "Learn how to set up and run LiteLLM with Cline using the Codestral model. This guide covers Docker setup, configuration, and integration with Cline."
|
||||
---
|
||||
|
||||
### Using LiteLLM with Cline
|
||||
|
||||
This guide demonstrates how to run a demo for LiteLLM starting with the Codestral model for use with Cline.
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
- [Docker CLI or Docker Desktop](https://www.docker.com/get-started/) installed to run the LiteLLM image locally
|
||||
- For this example config: A Codestral API Key (different from the Mistral API Keys)
|
||||
|
||||
#### Setup
|
||||
|
||||
1. **Create a `.env` file and fill in the appropriate field**
|
||||
|
||||
```bash
|
||||
# Tip: Use the following command to generate a random alphanumeric key:
|
||||
# openssl rand -base64 32 | tr -dc 'A-Za-z0-9' | head -c 32
|
||||
LITELLM_MASTER_KEY=YOUR_LITELLM_MASTER_KEY
|
||||
CODESTRAL_API_KEY=YOUR_CODESTRAL_API_KEY
|
||||
```
|
||||
|
||||
_Note: Although this is limited to localhost, it's a good practice set LITELLM_MASTER_KEY to something secure_
|
||||
|
||||
2. **Configuration**
|
||||
|
||||
We'll need to create a `config.yaml` file to contain our LiteLLM configuration. In this case we'll just have one model, 'codestral-latest' and label it 'codestral'
|
||||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: codestral
|
||||
litellm_params:
|
||||
model: codestral/codestral-latest
|
||||
api_key: os.environ/CODESTRAL_API_KEY
|
||||
```
|
||||
|
||||
#### Running the Demo
|
||||
|
||||
1. **Startup the LiteLLM docker container**
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
--env-file .env \
|
||||
-v $(pwd)/config.yaml:/app/config.yaml \
|
||||
-p 127.0.0.1:4000:4000 \
|
||||
ghcr.io/berriai/litellm:main-latest \
|
||||
--config /app/config.yaml --detailed_debug
|
||||
```
|
||||
|
||||
2. **Setup Cline**
|
||||
|
||||
Once the LiteLLM server is up and running you can set it up in Cline:
|
||||
|
||||
- Base URL should be `http://0.0.0.0:4000/v1`
|
||||
- API Key should be the one you set in `.env` for LITELLM_MASTER_KEY
|
||||
- Model ID is `codestral` or whatever you named it under `config.yaml`
|
||||
|
||||
#### Getting Help
|
||||
|
||||
- [LiteLLM Documentation](https://docs.litellm.ai/)
|
||||
- [Mistral AI Console](https://console.mistral.ai/)
|
||||
- [Cline Discord Community](https://discord.gg/cline)
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: "Mistral"
|
||||
description: "Learn how to configure and use Mistral AI models, including Codestral, with Cline. Covers API key setup and model selection."
|
||||
---
|
||||
|
||||
Cline supports accessing models through the Mistral AI API, including both standard Mistral models and the code-specialized Codestral model.
|
||||
|
||||
**Website:** [https://mistral.ai/](https://mistral.ai/)
|
||||
|
||||
### Getting an API Key
|
||||
|
||||
1. **Sign Up/Sign In:** Go to the [Mistral Platform](https://console.mistral.ai/). Create an account or sign in. You may need to go through a verification process.
|
||||
2. **Create an API Key:**
|
||||
- [La Plateforme API Key](https://console.mistral.ai/api-keys/) and/or
|
||||
- [Codestral API Key](https://console.mistral.ai/codestral)
|
||||
|
||||
### Supported Models
|
||||
|
||||
Cline supports the following Mistral models:
|
||||
|
||||
- pixtral-large-2411
|
||||
- ministral-3b-2410
|
||||
- ministral-8b-2410
|
||||
- mistral-small-latest
|
||||
- mistral-medium-latest
|
||||
- mistral-small-2501
|
||||
- pixtral-12b-2409
|
||||
- open-mistral-nemo-2407
|
||||
- open-codestral-mamba
|
||||
- codestral-2501
|
||||
- devstral-small-2505
|
||||
|
||||
**Note:** Model availability and specifications may change.
|
||||
Refer to the [Mistral AI documentation](https://docs.mistral.ai/api/) and [Mistral Model Overview](https://docs.mistral.ai/getting-started/models/models_overview/) for the most current information.
|
||||
|
||||
### Configuration in Cline
|
||||
|
||||
1. **Open Cline Settings:** Click the settings icon (⚙️) in the Cline panel.
|
||||
2. **Select Provider:** Choose "Mistral" from the "API Provider" dropdown.
|
||||
3. **Enter API Key:** Paste your Mistral API key into the "Mistral API Key" field if you're using a standard `mistral` model. If you intend to use `codestral-latest`, see the "Using Codestral" section below.
|
||||
4. **Select Model:** Choose your desired model from the "Model" dropdown.
|
||||
|
||||
### Using Codestral
|
||||
|
||||
[Codestral](https://docs.mistral.ai/capabilities/code_generation/) is a model specifically designed for code generation and interaction.
|
||||
For Codestral, you can use different endpoints (Default: codestral.mistral.ai).
|
||||
If using the La Plateforme API Key for Codestral, change the **Codestral Base Url** to: `https://api.mistral.ai`
|
||||
|
||||
To use Codestral with Cline:
|
||||
|
||||
1. **Select "Mistral" as the API Provider in Cline Settings.**
|
||||
2. **Select a Codestral Model** (e.g., `codestral-latest`) from the "Model" dropdown.
|
||||
3. **Enter your Codestral API Key** (from `codestral.mistral.ai`) or your La Plateforme API Key (from `api.mistral.ai`) into the appropriate API key field in Cline.
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
title: "Ollama"
|
||||
---
|
||||
|
||||
Cline supports running models locally using Ollama. This approach offers privacy, offline access, and potentially reduced costs. It requires some initial setup and a sufficiently powerful computer. Because of the present state of consumer hardware, it's not recommended to use Ollama with Cline as performance will likely be poor for average hardware configurations.
|
||||
|
||||
**Website:** [https://ollama.com/](https://ollama.com/)
|
||||
|
||||
### Setting up Ollama
|
||||
|
||||
1. **Download and Install Ollama:**
|
||||
Obtain the Ollama installer for your operating system from the [Ollama website](https://ollama.com/) and follow their installation guide. Ensure Ollama is running. You can typically start it with:
|
||||
|
||||
```bash
|
||||
ollama serve
|
||||
```
|
||||
|
||||
2. **Download a Model:**
|
||||
Ollama supports a wide variety of models. A list of available models can be found on the [Ollama model library](https://ollama.com/library). Some models recommended for coding tasks include:
|
||||
|
||||
- `codellama:7b-code` (a good, smaller starting point)
|
||||
- `codellama:13b-code` (offers better quality, larger size)
|
||||
- `codellama:34b-code` (provides even higher quality, very large)
|
||||
- `qwen2.5-coder:32b`
|
||||
- `mistralai/Mistral-7B-Instruct-v0.1` (a solid general-purpose model)
|
||||
- `deepseek-coder:6.7b-base` (effective for coding)
|
||||
- `llama3:8b-instruct-q5_1` (suitable for general tasks)
|
||||
|
||||
To download a model, open your terminal and execute:
|
||||
|
||||
```bash
|
||||
ollama pull <model_name>
|
||||
```
|
||||
|
||||
For instance:
|
||||
|
||||
```bash
|
||||
ollama pull qwen2.5-coder:32b
|
||||
```
|
||||
|
||||
3. **Configure the Model's Context Window:**
|
||||
By default, Ollama models often use a context window of 2048 tokens, which can be insufficient for many Cline requests. A minimum of 12,000 tokens is advisable for decent results, with 32,000 tokens being ideal. To adjust this, you'll modify the model's parameters and save it as a new version.
|
||||
|
||||
First, load the model (using `qwen2.5-coder:32b` as an example):
|
||||
|
||||
```bash
|
||||
ollama run qwen2.5-coder:32b
|
||||
```
|
||||
|
||||
Once the model is loaded within the Ollama interactive session, set the context size parameter:
|
||||
|
||||
```
|
||||
/set parameter num_ctx 32768
|
||||
```
|
||||
|
||||
Then, save this configured model with a new name:
|
||||
|
||||
```
|
||||
/save your_custom_model_name
|
||||
```
|
||||
|
||||
(Replace `your_custom_model_name` with a name of your choice.)
|
||||
|
||||
4. **Configure Cline:**
|
||||
- Open the Cline sidebar (usually indicated by the Cline icon).
|
||||
- Click the settings gear icon (⚙️).
|
||||
- Select "ollama" as the API Provider.
|
||||
- Enter the Model name you saved in the previous step (e.g., `your_custom_model_name`).
|
||||
- (Optional) Adjust the base URL if Ollama is running on a different machine or port. The default is `http://localhost:11434`.
|
||||
- (Optional) Configure the Model context size in Cline's Advanced settings. This helps Cline manage its context window effectively with your customized Ollama model.
|
||||
|
||||
### Tips and Notes
|
||||
|
||||
- **Resource Demands:** Running large language models locally can be demanding on system resources. Ensure your computer meets the requirements for your chosen model.
|
||||
- **Model Choice:** Experiment with various models to discover which best fits your specific tasks and preferences.
|
||||
- **Offline Capability:** After downloading a model, you can use Cline with that model even without an internet connection.
|
||||
- **Token Usage Tracking:** Cline tracks token usage for models accessed via Ollama, allowing you to monitor consumption.
|
||||
- **Ollama's Own Documentation:** For more detailed information, consult the official [Ollama documentation](https://ollama.com/docs).
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
title: "OpenAI Compatible"
|
||||
description: "Learn how to configure Cline with various AI model providers that offer OpenAI-compatible APIs."
|
||||
---
|
||||
|
||||
Cline supports a wide range of AI model providers that offer APIs compatible with the OpenAI API standard. This allows you to use models from providers _other than_ OpenAI, while still utilizing a familiar API interface. This includes providers such as:
|
||||
|
||||
- **Local models** running through tools like Ollama and LM Studio (which are covered in their respective sections).
|
||||
- **Cloud providers** like Perplexity, Together AI, Anyscale, and many others.
|
||||
- **Any other provider** that offers an OpenAI-compatible API endpoint.
|
||||
|
||||
This document focuses on setting up providers _other than_ the official OpenAI API (which has its own [dedicated configuration page](/provider-config/openai)).
|
||||
|
||||
### General Configuration
|
||||
|
||||
The key to using an OpenAI-compatible provider with Cline is to configure these main settings:
|
||||
|
||||
1. **Base URL:** This is the API endpoint specific to the provider. It will _not_ be `https://api.openai.com/v1` (that URL is for the official OpenAI API).
|
||||
2. **API Key:** This is the secret key you obtain from your chosen provider.
|
||||
3. **Model ID:** This is the specific name or identifier for the model you wish to use.
|
||||
|
||||
You'll find these settings in the Cline settings panel (click the ⚙️ icon):
|
||||
|
||||
- **API Provider:** Select "OpenAI Compatible".
|
||||
- **Base URL:** Enter the base URL provided by your chosen provider. **This is a crucial step.**
|
||||
- **API Key:** Enter your API key from the provider.
|
||||
- **Model:** Choose or enter the model ID.
|
||||
- **Model Configuration:** This section allows you to customize advanced parameters for the model, such as:
|
||||
- Max Output Tokens
|
||||
- Context Window size
|
||||
- Image Support capabilities
|
||||
- Computer Use (e.g., for models with tool/function calling)
|
||||
- Input Price (per token/million tokens)
|
||||
- Output Price (per token/million tokens)
|
||||
|
||||
### Supported Models (for OpenAI Native Endpoint)
|
||||
|
||||
While the "OpenAI Compatible" provider type allows connecting to various endpoints, if you are connecting directly to the official OpenAI API (or an endpoint that mirrors it exactly), Cline recognizes the following model IDs based on the `openAiNativeModels` definition in its source code:
|
||||
|
||||
- `o3-mini`
|
||||
- `o3-mini-high`
|
||||
- `o3-mini-low`
|
||||
- `o1`
|
||||
- `o1-preview`
|
||||
- `o1-mini`
|
||||
- `gpt-4.5-preview`
|
||||
- `gpt-4o`
|
||||
- `gpt-4o-mini`
|
||||
|
||||
**Note:** If you are using a different OpenAI-compatible provider (such as Together AI, Anyscale, etc.), the available model IDs will differ. Always refer to your specific provider's documentation for their supported model names and any unique configuration details.
|
||||
|
||||
### v0 (Vercel SDK) in Cline:
|
||||
|
||||
- For developers working with v0, their [AI SDK documentation](https://vercel.com/docs/v0/cline) provides valuable insights and examples for integrating various models, many of which are OpenAI-compatible. This can be a helpful resource for understanding how to structure calls and manage configurations when using Cline with services deployed on or integrated with Vercel.
|
||||
|
||||
- v0 can be used in Cline with the OpenAI Compatible provider.
|
||||
|
||||
- ### Quickstart
|
||||
|
||||
- 1. With the OpenAI Compatible provider selected, set the Base URL to https://api.v0.dev/v1.
|
||||
- 2. Paste in your v0 API Key
|
||||
- 3. Set the Model ID: v0-1.0-md
|
||||
- 4. Click Verify to confirm the connection.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
- **"Invalid API Key":** Double-check that you've entered the API key correctly and that it's for the correct provider.
|
||||
- **"Model Not Found":** Ensure you're using a valid model ID for your chosen provider and that it's available at the specified Base URL.
|
||||
- **Connection Errors:** Verify the Base URL is correct, that your provider's API is accessible from your machine, and that there are no firewall or network issues.
|
||||
- **Unexpected Results:** If you're getting unexpected outputs, try a different model or double-check all configuration parameters.
|
||||
|
||||
By using an OpenAI-compatible provider, you can leverage the flexibility of Cline with a wider array of AI models. Remember to always consult your provider's documentation for the most accurate and up-to-date information.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user