diff --git a/.changeset/brown-bars-bake.md b/.changeset/brown-bars-bake.md deleted file mode 100644 index b43ade07..00000000 --- a/.changeset/brown-bars-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Refactor Anthropic handler to use metadata for reasoning support diff --git a/.changeset/bumpy-cities-listen.md b/.changeset/bumpy-cities-listen.md deleted file mode 100644 index 11dedaaa..00000000 --- a/.changeset/bumpy-cities-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix cline auth for bedrock provider diff --git a/.changeset/clean-olives-share.md b/.changeset/clean-olives-share.md deleted file mode 100644 index ce9be30a..00000000 --- a/.changeset/clean-olives-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Prevent duplicate error messages during streaming for Diff Edit tool when Parallel Tool Calling is not enabled. diff --git a/.changeset/fair-islands-throw.md b/.changeset/fair-islands-throw.md deleted file mode 100644 index 85c90205..00000000 --- a/.changeset/fair-islands-throw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix issues where platform-based content was not displayed correctly. diff --git a/.changeset/fix-banner-carousel.md b/.changeset/fix-banner-carousel.md deleted file mode 100644 index 1ddc9a1f..00000000 --- a/.changeset/fix-banner-carousel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix banner carousel styling and dismiss functionality diff --git a/.changeset/fix-history-filters.md b/.changeset/fix-history-filters.md new file mode 100644 index 00000000..6cb2d32e --- /dev/null +++ b/.changeset/fix-history-filters.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix Workspace and Favorites history filters to work independently instead of being mutually exclusive diff --git a/.changeset/slick-grapes-chew.md b/.changeset/lazy-mice-explode.md similarity index 54% rename from .changeset/slick-grapes-chew.md rename to .changeset/lazy-mice-explode.md index f0c1d242..0d8f991a 100644 --- a/.changeset/slick-grapes-chew.md +++ b/.changeset/lazy-mice-explode.md @@ -2,4 +2,4 @@ "claude-dev": patch --- -bump go version +Add a new api provider. diff --git a/.changeset/loose-candies-go.md b/.changeset/loose-candies-go.md deleted file mode 100644 index 903a3dd3..00000000 --- a/.changeset/loose-candies-go.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix: correct typos in gemini system prompt overrides diff --git a/.changeset/model-picker-favorites.md b/.changeset/model-picker-favorites.md deleted file mode 100644 index 136c2d43..00000000 --- a/.changeset/model-picker-favorites.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix model picker favorites ordering, star toggle, and keyboard navigation for openrouter and vercel-ai-gateway providers diff --git a/.changeset/petite-queens-attend.md b/.changeset/petite-queens-attend.md deleted file mode 100644 index 0511d1de..00000000 --- a/.changeset/petite-queens-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Refactor Bedrock provider to use metadata for reasoning support diff --git a/.changeset/poor-impalas-rhyme.md b/.changeset/poor-impalas-rhyme.md deleted file mode 100644 index d8ed59bd..00000000 --- a/.changeset/poor-impalas-rhyme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -add multi-root workspace support to cline CLI diff --git a/.changeset/small-moments-dance.md b/.changeset/small-moments-dance.md deleted file mode 100644 index 094b9603..00000000 --- a/.changeset/small-moments-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -show slash command autocompletion in the cli diff --git a/.changeset/sour-drinks-battle.md b/.changeset/sour-drinks-battle.md deleted file mode 100644 index 231b9aa0..00000000 --- a/.changeset/sour-drinks-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Add background edit mode with webview diff view. diff --git a/.changeset/thin-suits-build.md b/.changeset/thin-suits-build.md deleted file mode 100644 index e2a62e81..00000000 --- a/.changeset/thin-suits-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix sapaicore security issue diff --git a/.changeset/three-areas-cheer.md b/.changeset/three-areas-cheer.md new file mode 100644 index 00000000..1a34f08a --- /dev/null +++ b/.changeset/three-areas-cheer.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix regression that broke JSON parsing for SAP AI Core provider in native API mode for claude models diff --git a/.changeset/true-words-bake.md b/.changeset/true-words-bake.md deleted file mode 100644 index b4431f96..00000000 --- a/.changeset/true-words-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix Plan/Act mode settings not updating when switching tabs for OpenAI Compatible Endpoints Provider in the settings view diff --git a/.changeset/two-states-say.md b/.changeset/two-states-say.md deleted file mode 100644 index 0887df4d..00000000 --- a/.changeset/two-states-say.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix: Fetch remote config values from the cache diff --git a/.changeset/wicked-showers-ring.md b/.changeset/wicked-showers-ring.md deleted file mode 100644 index 5a7a7212..00000000 --- a/.changeset/wicked-showers-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Replace current diff edit tools with Apply Patch tool for GPT-5+ models diff --git a/.clinerules/workflows/pr-review.md b/.clinerules/workflows/pr-review.md index a4714939..24b07855 100644 --- a/.clinerules/workflows/pr-review.md +++ b/.clinerules/workflows/pr-review.md @@ -351,4 +351,4 @@ 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. - + \ No newline at end of file diff --git a/.env b/.env new file mode 100644 index 00000000..58526b46 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +IS_DEV=false +IS_TEST=false +TELEMETRY_SERVICE_API_KEY=your-posthog-telemetry-api-key +ERROR_SERVICE_API_KEY=your-posthog-error-tracking-api-key +POSTHOG_TELEMETRY_ENABLED=false \ No newline at end of file diff --git a/.github/workflows/claude-issue-triage.yml b/.github/workflows/claude-issue-triage.yml index b53be6a7..f3431fb9 100644 --- a/.github/workflows/claude-issue-triage.yml +++ b/.github/workflows/claude-issue-triage.yml @@ -152,8 +152,14 @@ jobs: - **Possible Duplicates section** - ALWAYS include a "Possible Duplicates" section at the end of your comment listing issues that might be duplicates so maintainers can quickly close if appropriate. If none found, say "No obvious duplicates found." ## Labels + First, retrieve all available labels and read their descriptions to understand what each is for: gh label list --json name,description --limit 100 - gh issue edit ${{ github.event.issue.number || inputs.issue_number }} --add-label "label1,label2" # Only use available labels, don't create new ones + + Then apply the appropriate labels based on your analysis. Only use labels from the list above—do not create new labels. + gh issue edit ${{ github.event.issue.number || inputs.issue_number }} --add-label "label1,label2" + + If your regression analysis found a likely culprit (a recent PR/commit that probably caused this issue), add the "Regression" label: + gh issue edit ${{ github.event.issue.number || inputs.issue_number }} --add-label "Regression" IMPORTANT: After posting your comment, add the "Bot Responded" label to indicate this issue has received an automated response: gh issue edit ${{ github.event.issue.number || inputs.issue_number }} --add-label "Bot Responded" diff --git a/.github/workflows/claude-pr-review.yml b/.github/workflows/claude-pr-review.yml new file mode 100644 index 00000000..ac4783a1 --- /dev/null +++ b/.github/workflows/claude-pr-review.yml @@ -0,0 +1,272 @@ +name: Claude PR Review + +on: + pull_request: + types: [opened, ready_for_review] + # Manual trigger for backfilling existing PRs. Run from terminal: + # gh workflow run claude-pr-review.yml -f pr_number=1234 + # Or batch process open PRs: + # gh pr list --state open --limit 10 --json number --jq '.[].number' | while read num; do + # gh workflow run claude-pr-review.yml -f pr_number=$num + # sleep 60 + # done + workflow_dispatch: + inputs: + pr_number: + description: 'PR number to review' + required: true + type: string + +jobs: + claude-pr-review: + # Runs on PR opened/ready_for_review (skips drafts) or manual trigger for backfilling + if: | + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + github.event_name == 'workflow_dispatch' + + runs-on: ubuntu-latest + timeout-minutes: 120 + + # SECURITY: These permissions are intentionally restrictive. + # - contents: read -> Claude can read the codebase but CANNOT write/push any code + # - pull-requests: write -> Claude can post reviews and inline suggestions + # - issues: read -> Claude can search for related issues + # NOTE: Even with pull-requests: write, Claude CANNOT merge PRs because branch protection + # requires 1 approval from a Code Owner. The GITHUB_TOKEN cannot bypass this. + permissions: + contents: read + pull-requests: write + issues: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get PR number + id: pr + run: | + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + echo "number=${{ inputs.pr_number }}" >> $GITHUB_OUTPUT + else + echo "number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT + fi + + - name: Run PR Review + id: review + uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + allowed_non_write_users: "*" + claude_args: --model claude-opus-4-5-20251101 --allowedTools "Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch" + prompt: | + You're a GitHub PR reviewer for the open source Cline repository. Your goal is to give the PR author helpful feedback and give maintainers the context they need to review efficiently. + + PR: #${{ steps.pr.outputs.number }} + + ## Gather context + + ```bash + # Get full PR details + gh pr view ${{ steps.pr.outputs.number }} --json number,title,body,author,createdAt,updatedAt,isDraft,labels,commits,files,additions,deletions,changedFiles,baseRefName,headRefName,mergeable,reviewDecision + + # Get the diff + gh pr diff ${{ steps.pr.outputs.number }} + + # Check CI status + gh pr checks ${{ steps.pr.outputs.number }} + + # Get existing review comments (to understand context and your previous feedback) + gh api repos/${{ github.repository }}/pulls/${{ steps.pr.outputs.number }}/comments --jq '.[] | {user: .user.login, body: .body, path: .path, created_at: .created_at}' + + # Get conversation comments + gh pr view ${{ steps.pr.outputs.number }} --comments + ``` + + If this is a re-review (workflow_dispatch event): + Read your previous comments carefully. Understand what you asked for before. + Check if new commits or comments address your previous feedback. + + ## Check contributing guidelines + + Flag (but don't block) if: + - Missing changeset - For user-facing changes, check if there's a `.changeset/` file: + ```bash + gh pr diff ${{ steps.pr.outputs.number }} --name-only | grep '.changeset/' || echo "No changeset found" + ``` + If missing, ask them to run `npm run changeset` + - Missing tests - New features should have tests + + ## Find related issues and PRs + + Search thoroughly for context that might help with the review: + + ```bash + # Find related issues for context + gh issue list --search "" --state all --limit 30 + gh issue list --search "" --state all --limit 20 + + # Find similar PRs for reference + gh pr list --search "" --state all --limit 30 + ``` + + For each relevant issue or PR you find, read it including comments: + ```bash + gh issue view --comments + gh pr view --comments + ``` + + Look for: + - Open issues this PR might fix that weren't linked in the description + - Similar PRs that went through review - what feedback did they get? What patterns did they follow? + - Context from maintainer discussions that could inform your review + + ## Find subject matter experts + + For files changed in this PR, find who knows the code best: + ```bash + # Get files changed + gh pr diff ${{ steps.pr.outputs.number }} --name-only + + # For each relevant path, find contributors + git log --since="6 months ago" --format="%an" -- | sort | uniq -c | sort -rn | head -5 + ``` + + Cross-reference git authors with GitHub usernames. Include an SME table in your response: + + | SME | Reason | + |-----|--------| + | @username1 | Authored PR #X which modified this area | + | @username2 | Primary contributor to affected file (15 commits in 6 months) | + | @username3 | Reviewed similar PR #Y with extensive feedback | + + ## Deep code review + + This is the most important part. Don't just look for syntax issues - understand what the PR is trying to achieve and whether the implementation is the right approach. + + Step 1: Understand the intent + Read the PR description and understand what the author is trying to accomplish. What problem are they solving? What feature are they adding? + + Step 2: Form your own opinion first + Before analyzing their code, think about how YOU would implement this feature or fix. What files would you touch? What patterns would you follow? What edge cases would you handle? + + Step 3: Compare approaches + Now look at their implementation. How does it compare to what you would have done? + - Is their approach better in some ways? Note what they did well. + - Is their approach missing something? Be specific about what and why. + - Are there edge cases they haven't considered? + - Does it follow the patterns established in similar parts of the codebase? + + Step 4: Look at the bigger picture + - What other files or systems does this change interact with? + - Could this break anything else? + - Is there additional work needed beyond this PR to complete the feature? + - Does this fit well with the overall architecture? + + Step 5: Find reference implementations + Look for similar changes in the codebase: + ```bash + git log --oneline --all --grep="" | head -20 + git log --oneline -- | head -20 + ``` + + If this is adding a new API provider, look at how other providers are implemented. + If this is adding a new feature, look at how similar features were added. + Note where their implementation aligns with or diverges from established patterns. + + Step 6: Standard code review checks + - DRY: Is there duplicated code that could be extracted? + - Error handling: Are errors handled appropriately? + - Security: Any injection risks, credential exposure, unsafe dependencies? + - Performance: Any obvious inefficiencies, memory leaks, N+1 patterns? + - Types: Is TypeScript used correctly? Any unsafe type assertions? + - Naming: Are variables and functions named clearly? + - Comments: Is complex logic explained? Are there outdated comments? + + ## Inline code suggestions + + For specific code improvements, use GitHub's suggestion syntax via `gh api`. + This creates suggestions the author can commit with one click. + + Single-line suggestion: + ```bash + gh api repos/${{ github.repository }}/pulls/${{ steps.pr.outputs.number }}/reviews \ + -X POST \ + -f commit_id="$(gh pr view ${{ steps.pr.outputs.number }} --json headRefOid -q .headRefOid)" \ + -f event="COMMENT" \ + -f body="" \ + -F comments='[ + { + "path": "src/example.ts", + "line": 42, + "body": "Consider simplifying:\n\n```suggestion\nconst result = items.filter(Boolean);\n```" + } + ]' + ``` + + Multi-line suggestion (replacing lines 40-45): + ```bash + gh api repos/${{ github.repository }}/pulls/${{ steps.pr.outputs.number }}/reviews \ + -X POST \ + -f commit_id="$(gh pr view ${{ steps.pr.outputs.number }} --json headRefOid -q .headRefOid)" \ + -f event="COMMENT" \ + -f body="" \ + -F comments='[ + { + "path": "src/example.ts", + "start_line": 40, + "line": 45, + "body": "This can be simplified:\n\n```suggestion\nconst simplified = doThing();\n```" + } + ]' + ``` + + Use inline suggestions for concrete improvements. Use regular comments for questions or broader feedback. + + ## Post your review + + After your investigation, post a single helpful comment that helps the author and gives maintainers context. + + Start with a warm thank you for their contribution. Be conversational, not robotic. + + Include what's relevant: + - In-depth explanation of what the PR does - Be comprehensive. A maintainer should be able to read this section and fully understand the author's intent, why they made the changes, how they implemented it, and what files/systems are affected. Don't just summarize - explain. + - Related issues/PRs you found that provide useful context (link to them) + - Your review findings (issues to address, suggestions, etc.) + - Clear next steps for the author + + Include a "For Maintainers" section with: + - Anything else useful to help the maintainer resolve this PR + - Related issues/PRs with context on why they're relevant + - Open issues this PR might fix that weren't linked in the description + - Your recommendation: merge as-is, needs changes, needs discussion, close, etc. + - SME table - who should review this and why + + For the SME table: + | SME | Reason | + |-----|--------| + | @username | Primary contributor to affected files | + + ## Update labels + + Add appropriate labels based on your analysis: + ```bash + gh label list --json name,description --limit 100 + gh pr edit ${{ steps.pr.outputs.number }} --add-label "label1,label2" + ``` + + When done, add the reviewed label: + ```bash + gh pr edit ${{ steps.pr.outputs.number }} --add-label "Bot Reviewed" + ``` + + ## Remember + + - This is a one-time automated response - you will NOT see their reply or respond again. Never say things like "let me know if you have questions", "I can help you with", or "feel free to ask" - you won't be there to follow up. Frame any questions for the maintainers who will follow up. + - Be helpful and welcoming - Many contributors are new to the project + - Be specific - Point to exact lines and suggest fixes, don't give vague feedback + - Think deeply - Don't just surface-level review, understand the intent and evaluate the approach + - Use inline suggestions - Make it easy for authors to accept changes + - You're a first-pass reviewer - A human maintainer will do final approval diff --git a/.gitignore b/.gitignore index b06a7181..f9d06b61 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ tmp .DS_Store .idea +.husky/_/ pnpm-lock.yaml @@ -29,6 +30,8 @@ coverage-unit *evals.env .env +.worktrees + ## Generated files ## src/generated/ src/shared/proto/ diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 00000000..d4cabf14 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..a7c9523f --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} diff --git a/.vs/cline/v17/.wsuo b/.vs/cline/v17/.wsuo new file mode 100644 index 00000000..b90aea40 Binary files /dev/null and b/.vs/cline/v17/.wsuo differ diff --git a/.vs/cline/v17/DocumentLayout.json b/.vs/cline/v17/DocumentLayout.json new file mode 100644 index 00000000..d65db5b9 --- /dev/null +++ b/.vs/cline/v17/DocumentLayout.json @@ -0,0 +1,12 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\proj\\cline\\", + "Documents": [], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [] + } + ] +} diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 00000000..b2f318c4 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/.vscodeignore b/.vscodeignore index 2d15bd4d..dae2dc7c 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -52,6 +52,7 @@ webview-ui/node_modules/** # Ignore docs docs/** +assets/docs/** old_docs/** # Fix issue where codicons don't get packaged (https://github.com/microsoft/vscode-extension-samples/issues/692) diff --git a/CHANGELOG.md b/CHANGELOG.md index eef0b58f..0727fa45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [3.46.1] + +### Fixed + +- Remove GLM 4.6 from free models + + +## [3.46.0] + +### Added + +- Added GLM 4.7 model +- Enhanced background terminal execution with command tracking, log file output, zombie process prevention (10-minute timeout), and clickable log paths in UI +- Apply Patch tool for GPT-5+ models (replacing current diff edit tools) + +### Fixed + +- Duplicate error messages during streaming for Diff Edit tool when Parallel Tool Calling is not enabled +- Banner carousel styling and dismiss functionality +- Typos in Gemini system prompt overrides +- Model picker favorites ordering, star toggle, and keyboard navigation for OpenRouter and Vercel AI Gateway providers +- Fetch remote config values from the cache + +### Refactored + +- Anthropic handler to use metadata for reasoning support +- Bedrock provider to use metadata for reasoning support + ## [3.45.1] - Fixed MCP settings race condition where toggling auto-approve or changing timeout settings would cause the UI to flash and revert diff --git a/CLAUDE.md b/CLAUDE.md index 4e941e07..c898cbf1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,6 +14,9 @@ This file is the secret sauce for working effectively in this codebase. It captu **What NOT to add:** Stuff you can figure out from reading a few files, obvious patterns, or standard practices. This file should be high-signal, not comprehensive. +## Miscellaneous +- This is a VS Code extension—check `package.json` for available scripts before trying to verify builds (e.g., `npm run compile`, not `npm run build`). + ## gRPC/Protobuf Communication The extension and webview communicate via gRPC-like protocol over VS Code message passing. diff --git a/README.md b/README.md index 21bd19fb..ca9f4a1f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,106 @@ [![MCP市场](https://img.shields.io/badge/MCP%E5%B8%82%E5%9C%BA-访问-blue)](https://www.mcp-home.com/) [![Cline Chinese文档](https://img.shields.io/badge/Cline%20Chinese-文档-blue)](https://hybridtalentcomputing.gitbook.io/cline-chinese-doc/) [![Discord](https://img.shields.io/badge/Discord-加入讨论-7289DA)](https://discord.gg/fhj9hqy89t) [![Version](https://img.shields.io/visual-studio-marketplace/v/HybridTalentComputing.cline-chinese)](https://marketplace.visualstudio.com/items?itemName=HybridTalentComputing.cline-chinese) [![Downloads](https://img.shields.io/visual-studio-marketplace/d/HybridTalentComputing.cline-chinese)](https://marketplace.visualstudio.com/items?itemName=HybridTalentComputing.cline-chinese) [![Rating](https://img.shields.io/visual-studio-marketplace/r/HybridTalentComputing.cline-chinese)](https://marketplace.visualstudio.com/items?itemName=HybridTalentComputing.cline-chinese)

+ + + +Cline中文汉化版,由**胜算云**进行汉化,**长三角国家技术创新中心**专项扶持,打造**中国版OpenRouter**,让中国开发者更方便进行 AI 编程。 + +--- + +| ✨ **Cline中文版增加功能** | 👉 **扫码添加,领取 100 万 Tokens** 👈 | +|:--|:--:| +|✅**国内充值** —— 支持微信/支付宝付款,按使用量计费

✅ **大模型调用** —— 支持国内使用Claude Sonnet 4.5、GPT-5、Gemini 2.5 Pro/Flash、Deepseek、GLM-4.6等100+全球AI编程大模型。

✅ **企业级稳定路由** —— 接入亚马逊云,谷歌云,火山引擎服务器,延迟低至1.27S,稳定率99%+,TPM高达100万,RPM高达250

✅ **VS Code 插件/原生集成** —— 快速安装,即刻启用
| ![个人企业微信](https://www.shengsuanyun.com/relation.webp) | + +--- + +## 🎁 限时福利 + +> 🧧 注册限时领取 **100 万 Tokens** 算力额度 + + +👉 **注册链接**:[https://www.shengsuanyun.com/](https://www.shengsuanyun.com/?from=CH_R39YE8W1) + +--- + +## 📦 Cline功能介绍: + +1. AI 聊天助手(Chat Assistant) +- 在侧边栏提供一个 AI 聊天界面。 +- 可以向 AI 提问技术问题、解释代码逻辑、翻译术语,或进行日常对话。 +- 非常适合开发者在编程中遇到卡点时快速寻求建议。 +--- +💡 2. 代码片段辅助(Inline Chat) +- 在代码中选中一段内容,右键点击即可让 AI 进行解释、翻译、改写或优化。 +- 编辑器内直接生成替换代码,提高代码质量与开发效率。 +--- +⚡ 3. 快速命令生成(Terminal Assistant) +- 支持用户用自然语言描述操作需求,AI 自动生成对应的终端命令(如 shell、bash 命令)。 +- 对于不熟悉命令行的开发者尤其有用。 +--- +📂 4. 多文件支持 +- 支持向 AI 上传多个文件,进行上下文理解或分析。 +- 适用于代码审查、文档生成、项目理解等使用场景。 +--- +🧩 5. 自定义模型调用(API Key 配置) +- 支持用户自定义接入任意 API 服务(如 OpenAI、Anthropic 等),不强依赖官方服务。 +- 可以根据自己的账号配置调用不同模型,用于不同任务。 +## 功能展示
+ +
+ +> 演示视频使用 免费 LLM Coding 大模型API DeepSeek V3 0324 模型,展示了 Cline 中文版的主要功能和使用效果,视频没有加速,推理速度快到飞起。
+> 本项目推荐使用[胜算云](https://router.shengsuanyun.com/)的LLM API进行智能编码推理,中国大陆地区可以免魔法访问世界范围内的最全的人工智能API,超低价格外,同时可以开发票,以及免费的云部署项目,让您的 +AI项目全面得到落地使用。
+中国大陆地区针对DeepSeek官方不提供以下服务,我们则完全支持:
+> - 对外进行项目合作,提供私有化部署及相关支持服务;
+> - 开放文件上传及联网搜索 API 接口;
+--- +| 厂商 / 团队 |模型名称 | +| --- | --- | +| OpenAI | GPT(ChatGPT) | +|Anthropic|Claude| +|Google DeepMind|Gemini| +Meta AI |LLaMA +Mistral AI|Mistral、Mixtral +Cohere |Command R +xAI(Elon Musk)|Grok +Perplexity AI|Perplexity LLM(集成多模型 + 自研) +Amazon Titan|Titan Text +AI21 Labs|Jurassic +Aleph Alpha(德国)|Luminous +Reka AI |Reka Core +--- +## 项目地址 +国际 +Github: https://github.com/SSYCloud/cline-chinese-ssy
+中国大陆
+Gitcode:https://gitcode.com/shengsuan-cloud/cline-chinese-ssy
+Gitee: https://gitee.com/shengsuan-cloud/cline-chinese-ssy
+--- +## 文档地址(包括使用方法,MCP知识,常见问题解答等)
+https://modelmesh.gitbook.io/cline-zhong-wen-ban-docs/
+--- +## 其他支持插件 + +Kilo SSY Code Agent
+https://marketplace.visualstudio.com/items?itemName=shengsuan-cloud.kilo-ssy
+ +Roo Code Chinese SSY
+https://marketplace.visualstudio.com/items?itemName=shengsuan-cloud.roo-vibecoding
+ +--- +## 欢迎关注我的自媒体账号 + +欢迎关注我的自媒体账号,获取更多AI开发和技术分享: + +- 知乎:[胜算云](https://zhihu.com/people/shengsuanyunrouter) +- B站: [胜算云](https://space.bilibili.com/3546885937695051) +- B站:[扎马步的阑尾猫](https://space.bilibili.com/3546790324341546?spm_id_from=333.40164.0.0) + +## 加入社群 + +感兴趣的可以扫码加入微信社群,一起交流学习AI(如果二维码失效,请查看github项目中的首页中,相同位置的群二维码, 或者加入Discord频道): ## 项目地址 https://github.com/HybridTalentComputing/cline-chinese diff --git a/assets/icons/icon.png b/assets/icons/icon.png index db6f1d8f..5b5318fa 100644 Binary files a/assets/icons/icon.png and b/assets/icons/icon.png differ diff --git a/assets/icons/icon.svg b/assets/icons/icon.svg index 2a3908aa..61ab2a8c 100644 --- a/assets/icons/icon.svg +++ b/assets/icons/icon.svg @@ -1,16 +1,13 @@ - - - Group Copy 2 - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + diff --git a/assets/icons/online.svg b/assets/icons/online.svg new file mode 100644 index 00000000..d3f672aa --- /dev/null +++ b/assets/icons/online.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/robot_panel_light.png b/assets/icons/robot_panel_light.png index 2f028e0a..39c0af82 100644 Binary files a/assets/icons/robot_panel_light.png and b/assets/icons/robot_panel_light.png differ diff --git a/biome.jsonc b/biome.jsonc index 193a79b6..45b18440 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -111,6 +111,11 @@ "expand": "always" } }, + "css": { + "parser": { + "cssModules": false + } + }, "files": { "includes": [ "**", diff --git a/cli/cmd/cline-host/main.go b/cli/cmd/cline-host/main.go index 6dd8e444..19cfb70e 100644 --- a/cli/cmd/cline-host/main.go +++ b/cli/cmd/cline-host/main.go @@ -9,7 +9,6 @@ import ( "syscall" "github.com/spf13/cobra" - "github.com/cline/cli/pkg/hostbridge" ) diff --git a/cli/pkg/cli/auth/providers_list.go b/cli/pkg/cli/auth/providers_list.go index b0cbe1d3..611a18b6 100644 --- a/cli/pkg/cli/auth/providers_list.go +++ b/cli/pkg/cli/auth/providers_list.go @@ -114,6 +114,7 @@ func (r *ProviderListResult) GetAllReadyProviders() []*ProviderDisplay { cline.ApiProvider_NOUSRESEARCH, cline.ApiProvider_OCA, cline.ApiProvider_HICAP, + cline.ApiProvider_SSY, } // Check each provider to see if it's ready to use @@ -242,6 +243,8 @@ func mapProviderStringToEnum(providerStr string) (cline.ApiProvider, bool) { return cline.ApiProvider_OCA, true case "hicap": return cline.ApiProvider_HICAP, true + case "shengsuanyun": + return cline.ApiProvider_SSY, true case "nousResearch": return cline.ApiProvider_NOUSRESEARCH, true default: @@ -277,6 +280,8 @@ func GetProviderIDForEnum(provider cline.ApiProvider) string { return "oca" case cline.ApiProvider_HICAP: return "hicap" + case cline.ApiProvider_SSY: + return "shengsuanyun" case cline.ApiProvider_NOUSRESEARCH: return "nousResearch" default: @@ -362,6 +367,8 @@ func GetProviderDisplayName(provider cline.ApiProvider) string { return "Oracle Code Assist" case cline.ApiProvider_HICAP: return "Hicap" + case cline.ApiProvider_SSY: + return "胜算云" case cline.ApiProvider_NOUSRESEARCH: return "NousResearch" default: diff --git a/cli/pkg/cli/handlers/say_handlers.go b/cli/pkg/cli/handlers/say_handlers.go index 2f42d1ac..9d0f266d 100644 --- a/cli/pkg/cli/handlers/say_handlers.go +++ b/cli/pkg/cli/handlers/say_handlers.go @@ -306,7 +306,7 @@ func (h *SayHandler) handleErrorRetry(msg *types.ClineMessage, dc *DisplayContex // Retry failed after max attempts message := fmt.Sprintf("Auto-retry failed after %d attempts. Manual intervention required.", retryInfo.MaxAttempts) if dc.SystemRenderer != nil { - return dc.SystemRenderer.RenderWarning("Auto-Retry Failed", message) + return dc.SystemRenderer.RenderWarning("自动重试失败", message) } return dc.Renderer.RenderMessage("WARNING", message, true) } diff --git a/cli/pkg/generated/providers.go b/cli/pkg/generated/providers.go index 7bb3b4a0..bc0e138c 100644 --- a/cli/pkg/generated/providers.go +++ b/cli/pkg/generated/providers.go @@ -145,6 +145,7 @@ const ( XAI = "xai" CEREBRAS = "cerebras" OCA = "oca" + SSY = "shengsuanyun" NOUSRESEARCH = "nousResearch" ) @@ -162,6 +163,7 @@ var AllProviders = []string{ "xai", "cerebras", "oca", + "shengsuanyun", "nousResearch", } @@ -472,7 +474,15 @@ var rawConfigFields = ` [ "required": true, "fieldType": "password", "placeholder": "Enter your API key" - }, + },{ + "name": "ssyApiKey", + "type": "string", + "comment": "", + "category": "general", + "required": true, + "fieldType": "password", + "placeholder": "请输入 API key" + } ]` // Raw model definitions data (parsed from TypeScript) @@ -1302,6 +1312,539 @@ var rawModelDefinitions = ` { "description": "SOTA performance with ~1500 tokens/s" } }, + "shengsuanyun": { + "ali/qwen3-next-80b-a3b-thinking": { + "maxTokens": 32768, + "contextWindow": 131072, + "inputPrice": 1407, + "outputPrice": 5628, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Qwen3-Next-80B-A3B-Thinking 是Qwen3-Next系列中以推理为核心的对话模型,默认输出结构化的“思维链”内容。它专为复杂多步问题而设计,能够处理数学证明、代码生成与调试、逻辑推演以及智能体规划等任务,并在知识、推理、编程、对齐和多语言评测上表现出色。与以往的Qwen3模型相比,该版本在长链式思维下的稳定性与推理阶段的高效扩展上更具优势,且在复杂指令跟随时显著降低了重复或偏离任务的情况。" + }, + "ali/qwen3-next-80b-a3b-Instruct": { + "maxTokens": 32768, + "contextWindow": 131072, + "inputPrice": 1407, + "outputPrice": 14071, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Qwen3-Next-80B-A3B-Instruct是Qwen3-Next系列中的一款指令微调对话模型,专为提供快速、稳定的响应而优化。它能够胜任复杂推理、代码生成、知识问答和多语言应用,同时在对齐与格式控制方面保持稳健。与以往的Qwen3 指令模型相比,该版本在超长输入和多轮对话场景下具备更高吞吐与更强稳定性,非常适用于RAG、工具调用以及需要一致性最终答案的智能体工作流。" + }, + "ali/qwen3-max-preview": { + "maxTokens": 32768, + "contextWindow": 262144, + "inputPrice": 8442, + "outputPrice": 33770, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Qwen3-Max-Preview是阿里巴巴旗下通义千问团队发布的最新旗舰大语言模型,是 Qwen3 系列中参数量最大的模型,参数规模超过1万亿。模型在推理、指令跟随、多语言支持和长尾知识覆盖等方面有重大改进,支持超过100种语言,中英文理解能力出色。在数学推理、编程和科学推理等任务中表现出色,能更可靠地遵循复杂指令,减少幻觉,生成更高质量的响应。" + }, + "ali/qwen3-vl-plus": { + "maxTokens": 258048, + "contextWindow": 262144, + "inputPrice": 1407, + "outputPrice": 14071, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Qwen3系列视觉理解模型,实现思考模式和非思考模式的有效融合,视觉智能体能力在OS World等公开测试集上达到世界顶尖水平。此版本在视觉coding、空间感知、多模态思考等方向全面升级;视觉感知与识别能力大幅提升,支持超长视频理解。" + }, + "ali/qwen3-omni-flash": { + "maxTokens": 16384, + "contextWindow": 65536, + "inputPrice": 2532, + "outputPrice": 9708, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Qwen-Omni 模型能够接收文本、图片、音频、视频等多种模态的组合输入,并生成文本或语音形式的回复, 提供多种拟人音色,支持多语言和方言的语音输出,可应用于文本创作、视觉识别、语音助手等场景。" + }, + "ali/qwen3-max": { + "maxTokens": 32768, + "contextWindow": 262144, + "inputPrice": 8442, + "outputPrice": 33770, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Qwen3-Max 是在 Qwen3 系列的基础上构建的更新版本,与 2025 年 1 月版本相比,在推理、指令遵循、多语言支持和长尾知识覆盖方面进行了重大改进。它在数学、编码、逻辑和科学任务中提供更高的准确性,更可靠地遵循复杂的中文和英文指令,减少幻觉,并为开放式问答、写作和对话提供更高质量的回答。该模型支持 100 多种语言,具有更强的翻译和常识推理能力,并针对检索增强生成 (RAG) 和工具调用进行了优化,尽管它不包括专用的“思考”模式。" + }, + "ali/qwen3-coder-480b-a35b-instruct": { + "maxTokens": 65536, + "contextWindow": 128000, + "inputPrice": 8442, + "outputPrice": 33770, + "supportsImages": true, + "supportsPromptCache": false, + "description": "基于Qwen3的代码生成模型,具有强大的Coding Agent能力,代码能力达到开源模型 SOTA。" + }, + "ali/qwen3-coder-plus": { + "maxTokens": 65536, + "contextWindow": 1048576, + "inputPrice": 5628, + "outputPrice": 22513, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Qwen3-Coder-Plus,这是通义千问系列迄今为止最具代理能力的代码模型。" + }, + "anthropic/claude-sonnet-4.5": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Claude Sonnet 4.5 是 Anthropic 迄今为止最先进的 Sonnet 模型,针对真实代理和编码工作流程进行了优化。它在 SWE-bench Verified 等编码基准测试中展现出顶尖性能,并在系统设计、代码安全性和规范遵循性方面均有所改进。该模型旨在实现扩展自主操作,保持跨会话的任务连续性,并提供基于事实的进度跟踪。\n\nSonnet 4.5 还引入了更强大的代理功能,包括改进的工具编排、推测并行执行以及更高效的上下文和内存管理。凭借增强的上下文跟踪和跨工具调用的令牌使用感知功能,它尤其适用于多上下文和长时间运行的工作流。用例涵盖软件工程、网络安全、财务分析、研究代理以及其他需要持续推理和工具使用的领域。" + }, + "anthropic/claude-haiku-4.5:thinking": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 10000, + "outputPrice": 50000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Claude Haiku 4.5 为各种用例提供​​近乎前沿的性能,并脱颖而出,成为最佳编码和代理模型之一——其速度和成本恰到好处,能够为免费产品和海量用户体验提供支持。用例:为免费层级用户体验提供支持:Claude Haiku 4.5 以合理的成本和速度提供近乎前沿的性能,使为免费代理产品和代理用例提供支持在经济上可行。" + }, + "anthropic/claude-sonnet-4.5:thinking": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Claude Sonnet 4.5 是 Anthropic 迄今为止最先进的 Sonnet 模型,针对真实代理和编码工作流程进行了优化。它在 SWE-bench Verified 等编码基准测试中展现出顶尖性能,并在系统设计、代码安全性和规范遵循性方面均有所改进。该模型旨在实现扩展自主操作,保持跨会话的任务连续性,并提供基于事实的进度跟踪。\n\nSonnet 4.5 还引入了更强大的代理功能,包括改进的工具编排、推测并行执行以及更高效的上下文和内存管理。凭借增强的上下文跟踪和跨工具调用的令牌使用感知功能,它尤其适用于多上下文和长时间运行的工作流。用例涵盖软件工程、网络安全、财务分析、研究代理以及其他需要持续推理和工具使用的领域。" + }, + "anthropic/claude-haiku-4.5": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 10000, + "outputPrice": 50000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Claude Haiku 4.5 为各种用例提供​​近乎前沿的性能,并脱颖而出,成为最佳编码和代理模型之一——其速度和成本恰到好处,能够为免费产品和海量用户体验提供支持。用例:为免费层级用户体验提供支持:Claude Haiku 4.5 以合理的成本和速度提供近乎前沿的性能,使为免费代理产品和代理用例提供支持在经济上可行。" + }, + "anthropic/claude-sonnet-4": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": true, + "description": "Claude Sonnet 4是对Sonnet 3.7的全面升级,在编程与推理任务中展现出更高的精度与可控性。该模型兼顾能力与计算效率,适用于从日常编码到复杂软件开发等多种场景。" + }, + "anthropic/claude-sonnet-4:thinking": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": true, + "description": "Claude Sonnet 4 ( Thinking ),在编程与推理任务中展现出更高的精度与可控性。该模型兼顾能力与计算效率,适用于从日常编码到复杂软件开发等多种场景。" + }, + "anthropic/claude-opus-4.1": { + "maxTokens": 32000, + "contextWindow": 200000, + "inputPrice": 150000, + "outputPrice": 750000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Claude Opus 4.1是Anthropic旗舰模型的更新版本,在编码、推理和代理任务方面均有提升。它在SWE-bench Verified测试中达到了74.5%的准确率,并在多文件代码重构、调试精度和面向细节的推理方面展现出显著提升。" + }, + "anthropic/claude-3.5-haiku": { + "maxTokens": 8000, + "contextWindow": 200000, + "inputPrice": 8000, + "outputPrice": 40000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Claude 3.5 Haiku是Anthropic最快且最具成本效益的下一代模型,非常适合速度和经济性重要的应用场景。" + }, + "anthropic/claude-3.7-sonnet:thinking": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": true, + "description": "Claude-3.7-sonnet(Thinking)是Anthropic于 2025 年推出的新一代思维型大语言模型。该模型首次融合自回归生成与符号推理架构,具备多步骤思维展示、自我纠错能力以及长达 10 万 tokens 的上下文理解能力,标志着AI从简单生成向深度逻辑推理与透明思考的跨越。" + }, + "anthropic/claude-3.7-sonnet": { + "maxTokens": 64000, + "contextWindow": 200000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": true, + "description": "Claude 3.7 Sonnet是首个提供扩展思考功能的Claude模型,可通过仔细、逐步的推理解决复杂问题。" + }, + "anthropic/claude-opus-4": { + "maxTokens": 32000, + "contextWindow": 200000, + "inputPrice": 150000, + "outputPrice": 750000, + "supportsImages": true, + "supportsPromptCache": true, + "description": "Claude Opus 4是Anthropic专为构建复杂的人工智能代理而设计的模型,能够在最少的监督下自主推理、规划和执行复杂的任务。该模型在需要扩展上下文、深度推理和自适应执行的软件开发场景中表现卓越。" + }, + "deepseek/deepseek-r1-0528": { + "maxTokens": 48000, + "contextWindow": 96000, + "inputPrice": 5628, + "outputPrice": 22513, + "supportsImages": false, + "supportsPromptCache": true, + "description": "DeepSeek R1-0528是DeepSeek R1模型的小版本升级版。通过增加计算资源和引入后训练阶段的算法优化,DeepSeek R1-0528显著提升了推理与推断的深度和能力。该模型在数学、编程及一般逻辑等多项基准测试中表现优异,整体性能已接近业内领先的 O3和Gemini 2.5 Pro模型,展现出强大的多领域应用潜力。" + }, + "deepseek/deepseek-v3.1-think": { + "maxTokens": 16000, + "contextWindow": 128000, + "inputPrice": 5628, + "outputPrice": 16885, + "supportsImages": true, + "supportsPromptCache": false, + "description": "DeepSeek-V3.1-Think采用混合推理架构,支持思考与非思考双模式运行,具备更高的思考效率,相比 DeepSeek-R1-0528 能够更快得出答案,并通过Post-Training优化显著增强了工具调用与智能体任务的处理能力。" + }, + "deepseek/deepseek-v3.1": { + "maxTokens": 16000, + "contextWindow": 128000, + "inputPrice": 5628, + "outputPrice": 16885, + "supportsImages": true, + "supportsPromptCache": false, + "description": "DeepSeek V3.1是DeepSeek的新一代模型,具备混合推理(Think & Non-Think双模式),显著提升思考速度和任务处理效率,并通过后训练强化工具调用与多步骤智能体能力。" + }, + "deepseek/deepseek-v3.2": { + "maxTokens": 8000, + "contextWindow": 128000, + "inputPrice": 2814, + "outputPrice": 4221, + "supportsImages": false, + "supportsPromptCache": false, + "description": "引入了DeepSeek Sparse Attention(一种稀疏注意力机制)的实验性质版本,针对长文本的训练和推理效率进行了探索性的优化和验证" + }, + "deepseek/deepseek-v3.2-think": { + "maxTokens": 64000, + "contextWindow": 128000, + "inputPrice": 2814, + "outputPrice": 4221, + "supportsImages": false, + "supportsPromptCache": false, + "description": "引入了DeepSeek Sparse Attention(一种稀疏注意力机制)的实验性质版本,针对长文本的训练和推理效率进行了探索性的优化和验证" + }, + "deepseek/deepseek-r1-0120": { + "maxTokens": 16384, + "contextWindow": 13072, + "inputPrice": 5628, + "outputPrice": 22513, + "supportsImages": false, + "supportsPromptCache": true, + "description": "DeepSeek-R1是深度求索DeepSeek公司发布的一款大型语言模型,专为数学、代码和逻辑推理任务设计,对标OpenAI的o1模型。它采用强化学习进行训练,无需依赖大量的监督微调数据,并且支持多语言,在推理能力和效率上都有显著提升。" + }, + "deepseek/deepseek-v3": { + "maxTokens": 16000, + "contextWindow": 128000, + "inputPrice": 2814, + "outputPrice": 11256, + "supportsImages": false, + "supportsPromptCache": true, + "description": "DeepSeek-V3是DeepSeek公司发布的一款大型语言模型,以其在数学、编码和中文等任务上的卓越性能而闻名。该模型采用了MoE架构,拥有6710亿参数,每个token激活的参数量为370亿,并且支持128K token的超长上下文窗口。DeepSeek-V3不仅在性能上对标GPT-4o等主流模型,还在推理速度和效率上取得了显著提升。" + }, + "google/gemini-2.5-flash": { + "maxTokens": 65535, + "contextWindow": 1048576, + "inputPrice": 3000, + "outputPrice": 25000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Gemini 2.5 Flash是Google在性价比方面表现最优的模型,兼具全面能力与高效性能。作为首个具备“思维能力”的 Flash 系列模型,Gemini 2.5 Flash支持可视化的思维过程,让用户直观了解模型在生成回答时的推理路径。" + }, + "google/gemini-2.5-pro": { + "maxTokens": 65535, + "contextWindow": 1048576, + "inputPrice": 12500, + "outputPrice": 100000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Gemini 2.5 Pro是一款强大的推理模型,专为解决复杂问题而设计。它具备卓越的理解与分析能力,能够处理来自多种信息源的海量数据,包括文本、音频、图像、视频,甚至是完整的代码库。" + }, + "google/gemini-2.5-flash-lite": { + "maxTokens": 64000, + "contextWindow": 1000000, + "inputPrice": 1000, + "outputPrice": 4000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Gemini 2.5 Flash-Lite 是Gemini 2.5 系列中的一个轻量级推理模型,优化了超低延迟和成本效率。与早期的 Flash 模型相比,它提供了更好的吞吐量、更快的 token 生成以及在常见基准测试中更好的性能。可通过reasoning.max_tokens开启思考并控制思维链长度。" + }, + "google/gemini-2.0-flash": { + "maxTokens": 65535, + "contextWindow": 1047576, + "inputPrice": 1000, + "outputPrice": 4000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Gemini 2.0 Flash 是为智能体时代量身打造的下一代模型,具备更强大的功能和卓越的性能。它在继承前代 Flash 模型高速优势的基础上,实现了全方位升级:支持原生工具调用、具备多模态生成能力,并拥有高达 100 万 token 的上下文窗口。相比前代产品,Gemini 2.0 Flash 在保持相似速度的同时,显著提升了输出质量,是一款兼具高效性与先进能力的多场景 AI 模型。" + }, + "meta/llama-4-scout": { + "maxTokens": 100000000, + "contextWindow": 10000000, + "inputPrice": 800, + "outputPrice": 3000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Llama 4 Scout适用于长上下文中的检索任务,以及需要对大量信息进行推理处理的任务,例如总结多个大型文档、分析大量用户互动日志以实现个性化,以及跨大型代码库进行推理。" + }, + "minimax/minimax-m2": { + "maxTokens": 131000, + "contextWindow": 200000, + "inputPrice": 0, + "outputPrice": 0, + "supportsImages": false, + "supportsPromptCache": false, + "description": " MiniMax M2,专为 Agent 和代码而生,仅 Claude Sonnet 8% 价格,2倍速度,限时免费(截止2025年11月7日)!" + }, + "minimax/minimax-m1": { + "maxTokens": 80000, + "contextWindow": 1000000, + "inputPrice": 1125, + "outputPrice": 11256, + "supportsImages": true, + "supportsPromptCache": false, + "description": "MiniMax-M1,世界上第一个开源的大规模混合架构的推理模型,适合在复杂场景中使用。" + }, + "moonshot/kimi-k2": { + "maxTokens": 32000, + "contextWindow": 256000, + "inputPrice": 5628, + "outputPrice": 22513, + "supportsImages": true, + "supportsPromptCache": false, + "description": "( 最新版本 0905) Kimi K2是一款上下文长度256k的模型,具备更强的Agentic Coding能力、更突出的前端代码的美观度和实用性、以及更好的上下文理解能力。" + }, + "moonshot/kimi-latest": { + "maxTokens": 128000, + "contextWindow": 128000, + "inputPrice": 2814, + "outputPrice": 14071, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Kimi-latest是一个最长支持128k上下文的视觉模型,支持图片理解。同时,kimi-latest 模型总是使用Kimi智能助手产品使用最新的Kimi 大模型版本,可能包含尚未稳定的特性。" + }, + "moonshot/kimi-thinking-preview": { + "maxTokens": 128000, + "contextWindow": 128000, + "inputPrice": 281420, + "outputPrice": 281420, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Kimi-thinking-preview是月之暗面提供的具有多模态推理能力和通用推理能力的多模态思考模型,它最长支持128k上下文,擅长深度推理,帮助解决更多更难的事情。" + }, + "openai/gpt-5": { + "maxTokens": 128000, + "contextWindow": 400000, + "inputPrice": 12500, + "outputPrice": 100000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-5是OpenAI推出的最新一代先进模型,在推理能力、代码生成质量和用户体验方面实现显著提升。该模型针对复杂任务进行了专项优化,尤其擅长需要逐步推理、精准遵循指令以及对准确性要求严格的高风险场景。" + }, + "openai/o3": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 20000, + "outputPrice": 80000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "o3是一款全面且强大的跨领域模型,在数学、科学、编程和视觉推理任务中树立了新标杆。它在技术写作和遵循指令方面也表现出色。可用于处理涉及文本、代码和图像分析的多步骤问题。" + }, + "openai/gpt-5-codex": { + "maxTokens": 128000, + "contextWindow": 400000, + "inputPrice": 12500, + "outputPrice": 100000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "GPT-5-Codex 是 GPT-5 的专用版本,针对软件工程和编码工作流程进行了优化。它专为交互式开发会话和复杂工程任务的长时间独立执行而设计。该模型支持从头开始构建项目、功能开发、调试、大规模重构和代码审查。与 GPT-5 相比,Codex 更具可作性,严格遵守开发人员的指令,并生成更干净、更高质量的代码输出。" + }, + "openai/gpt-5-mini": { + "maxTokens": 128000, + "contextWindow": 400000, + "inputPrice": 2500, + "outputPrice": 20000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-5-Mini是GPT-5的轻量级版本,专为高效处理日常推理任务而设计。它继承了 GPT-5的指令跟随能力和安全优化,同时具备更低的延迟和成本优势。" + }, + "openai/gpt-5-nano": { + "maxTokens": 128000, + "contextWindow": 400000, + "inputPrice": 500, + "outputPrice": 4000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-5-Nano是GPT-5系列中最快速的版本,专为开发者工具、即时交互和超低延迟场景优化。尽管在复杂推理能力上略逊于更大的模型,但它保留了核心的指令跟随与安全特性。" + }, + "openai/gpt-oss-20b": { + "maxTokens": 131072, + "contextWindow": 131072, + "inputPrice": 700, + "outputPrice": 3000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT OSS 20B是OpenAI发布的开放权重210亿参数模型,它采用MoE架构,每次前向传递有36亿个有效参数,并针对低延迟推理和在消费级或单GPU硬件上的部署进行了优化。该模型采用OpenAI的Harmony响应格式进行训练,并支持推理级别配置、微调和代理功能,包括函数调用、工具使用和结构化输出。" + }, + "openai/gpt-oss-120b": { + "maxTokens": 131072, + "contextWindow": 131072, + "inputPrice": 1000, + "outputPrice": 5000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT OSS 120B是OpenAI推出的开放权重、包含1170亿个参数的MoE语言模型,专为高推理、代理和通用生产用例而设计。它每次前向传递可激活51亿个参数,并经过优化,可在具有原生MXFP4量化的单个H100 GPU上运行。" + }, + "openai/gpt-4o-2024-11-20": { + "maxTokens": 16384, + "contextWindow": 128000, + "inputPrice": 50000, + "outputPrice": 200000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT 4o是OpenAI智能水平最高、通用性最强的旗舰模型。它支持文本与图像输入,并生成文本输出(包括结构化结果),在大多数任务中表现出色,是目前除o系列专用模型外能力最强的通用模型。" + }, + "openai/gpt-4o-mini": { + "maxTokens": 16384, + "contextWindow": 128000, + "inputPrice": 844, + "outputPrice": 3377, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-4o-mini是一款快速、经济的小型模型,适用于聚焦型任务和微调场景。它支持文本和图像输入,并生成文本输出,在成本和响应速度方面具有显著优势。" + }, + "openai/o3-mini-high": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 11000, + "outputPrice": 44000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "o3-mini-high是 o3-mini 模型在高推理强度设置下的版本,特别擅长STEM领域的推理任务,包括科学、数学和编程。" + }, + "openai/o3-mini": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 11000, + "outputPrice": 44000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "OpenAI o3-mini是OpenAI推出的小型推理模型,在保持与o1-mini 相同的成本与延迟水平下,提供了更高的智能表现。该模型专为复杂推理任务优化,特别适用于科学、数学与编程等领域。同时,o3-mini支持结构化输出、函数调用、Batch API等关键开发功能,为构建高效智能应用提供了强大支持。" + }, + "openai/gpt-4.1": { + "maxTokens": 32768, + "contextWindow": 1047576, + "inputPrice": 20000, + "outputPrice": 80000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-4.1是OpenAI推出的一款面向复杂任务的旗舰模型,具备跨领域的问题解决能力,能够高效应对各种复杂场景和挑战。" + }, + "openai/o1": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 150000, + "outputPrice": 600000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "o1模型,具有强大的推理能力,在科学、编程、数学等领域表现出色。它采用了长思维链和自适应计算,能够处理复杂推理任务。" + }, + "openai/gpt-4.1-mini": { + "maxTokens": 32768, + "contextWindow": 1047576, + "inputPrice": 4000, + "outputPrice": 16000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-4.1-mini是GPT-4.1的小型版本,兼顾文本生成与理解,适合用于语言教学与分析任务。" + }, + "openai/gpt-4.1-nano": { + "maxTokens": 32768, + "contextWindow": 1047576, + "inputPrice": 1000, + "outputPrice": 4000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "GPT-4.1-nano是GPT-4.1系列中速度最快且性价比最高的模型,专为高效、低成本的应用场景设计。" + }, + "openai/o4-mini": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 11000, + "outputPrice": 44000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "OpenAI o4-mini 是 o 系列中的一款紧凑型推理模型,经过优化,能够在保持强大多模态和代理能力的同时,实现快速且成本效益高的性能。它支持工具使用,并在 AIME(使用 Python 达到 99.5% 准确率)和 SWE-bench 等基准测试中表现出色,超越了前代 o3-mini,甚至在某些领域接近 o3 的水平。 尽管体积较小,o4-mini 在 STEM 任务、视觉问题解决(如 MathVista、MMMU)和代码编辑方面表现出高准确率。它特别适用于对延迟或成本敏感的高吞吐量场景。得益于其高效的架构和精细的强化学习训练,o4-mini 能够串联使用工具、生成结构化输出,并以最小延迟解决多步骤任务——通常在一分钟内完成。 此外,o4-mini 与 o3 一样,具备图像推理能力,能够将视觉输入(如草图和白板)直接整合到其思维过程中,并在分析中对图像进行调整,如缩放或旋转。这些增强功能现已向 ChatGPT Plus、Pro 和 Team 用户开放。" + }, + "openai/o4-mini-high": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 11000, + "outputPrice": 44000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "OpenAI o4-mini-high 与 o4-mini 是同一个模型,只是将 推理效果设为高。o4 是 o 系列中的一个紧凑型推理模型,优化目标是实现快速、成本效益高的性能,同时保持强大的多模态能力和自主代理(agentic)能力。它支持工具调用,在多个基准测试中展现出强劲的推理和编程表现,例如在 AIME 中使用 Python 达到 99.5% 的成绩,在 SWE-bench 中也优于其前代 o3-mini,甚至在某些领域接近 o3 模型的表现。尽管体积更小,o4-mini 在 STEM 任务(科学、技术、工程、数学)、视觉问题解决(如 MathVista、MMMU)以及代码编辑方面依然表现出色。它特别适用于对延迟和成本要求较高的大吞吐场景。得益于其高效的架构设计和精细化的强化学习训练,o4-mini 能够链式调用工具、生成结构化输出,并在不到一分钟内完成多步复杂任务。" + }, + "openai/codex-mini-latest": { + "maxTokens": 100000, + "contextWindow": 200000, + "inputPrice": 15000, + "outputPrice": 60000, + "supportsImages": false, + "supportsPromptCache": true, + "description": "codex-mini-latest 是 o4-mini 的微调版本,专门用于 Codex CLI。对于直接在 API 中使用,我们建议从 gpt-4.1 开始。" + }, + "x-ai/grok-4-fast": { + "maxTokens": 30000, + "contextWindow": 2000000, + "inputPrice": 2000, + "outputPrice": 5000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Grok 4 Fast 是 xAI 最新的多模态模型,具有 SOTA 成本效益和 2M 令牌上下文窗口。它有两种类型:非推理和推理。" + }, + "xai/grok-code-fast-1": { + "maxTokens": 10000, + "contextWindow": 256000, + "inputPrice": 2000, + "outputPrice": 15000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Grok Code Fast 1是xAI的首款编程模型,是一款兼具速度、高性价比的推理模型。" + }, + "x-ai/grok-4": { + "maxTokens": 256000, + "contextWindow": 256000, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": false, + "supportsPromptCache": false, + "description": "Grok 4是xAI的多模态大型语言模型,目前支持文本模态,视觉、图像生成等功能即将推出。" + }, + "x-ai/grok-3": { + "maxTokens": 131072, + "contextWindow": 131072, + "inputPrice": 30000, + "outputPrice": 150000, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Grok 3是Grok的第三代版本,在数据提取、编码和文本摘要等企业用例中表现出色。" + }, + "x-ai/grok-3-mini": { + "maxTokens": 0, + "contextWindow": 0, + "inputPrice": 0, + "outputPrice": 0, + "supportsImages": true, + "supportsPromptCache": false, + "description": "Grok 3 Mini是Grok 3的精简版本,该模型在数学、科学及编程领域的基准测试中表现优异,支持自我事实核查和防“蒸馏”技术,可隐藏推理过程的中间步骤。" + } + } "nousResearch": { "Hermes-4-405B": { "maxTokens": 8192, @@ -1491,6 +2034,15 @@ func GetProviderDefinitions() (map[string]ProviderDefinition, error) { SetupInstructions: `Configure Oca API credentials`, } + definitions["shengsuanyun"] = ProviderDefinition{ + ID: "shengsuanyun", + Name: "Oca", + RequiredFields: getFieldsByProvider("shengsuanyun", configFields, true), + OptionalFields: getFieldsByProvider("shengsuanyun", configFields, false), + Models: modelDefinitions["shengsuanyun"], + DefaultModelID: "", + HasDynamicModels: false, + SetupInstructions: `配置胜算云 API Key`, // NousResearch definitions["nousResearch"] = ProviderDefinition{ ID: "nousResearch", @@ -1529,6 +2081,7 @@ func GetProviderDisplayName(providerID string) string { "xai": "X AI (Grok)", "cerebras": "Cerebras", "oca": "Oca", + "shengsuanyun":"SSY", "nousResearch": "NousResearch", } diff --git a/docs/enterprise-solutions/security-concerns.mdx b/docs/enterprise-solutions/security-concerns.mdx new file mode 100644 index 00000000..67e4c6a9 --- /dev/null +++ b/docs/enterprise-solutions/security-concerns.mdx @@ -0,0 +1,61 @@ +--- +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. + + + Cline's relationship to local and remote assets + + +### 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. diff --git a/docs/exploring-clines-tools/checkpoints.mdx b/docs/exploring-clines-tools/checkpoints.mdx new file mode 100644 index 00000000..69cf02f5 --- /dev/null +++ b/docs/exploring-clines-tools/checkpoints.mdx @@ -0,0 +1,113 @@ +--- +title: "Checkpoints and Messages" +description: "When working with AI coding assistants, it's easy to lose control as they make rapid changes to your codebase. That's why we built Checkpoints - your safety net for experimenting confidently." +--- + +Checkpoints automatically save snapshots of your workspace after each step in a task. This powerful feature lets you: + +- Track and review changes made during a task +- Roll back to any previous point if needed +- Experiment confidently with auto-approve mode +- Maintain full control over your workspace + +### ⚙️ 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 to Checkpoint + +After each tool use, you can: + +1. Click the "Compare" button to see modified files +2. Click the "Restore" button to open restore options + + + Checkpoint comparison and restore options + + +#### Rolling Back + +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. + +### 💡 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. + +#### 1. Using Auto-Approve Mode + +- Provides safety net for rapid iterations +- Makes it easy to undo unexpected results + +#### 2. Testing Different Approaches + +- Try multiple solutions confidently +- Compare different implementations +- Quickly revert to working states +- Ideal for exploring different design patterns or architectural approaches + + + Checkpoint restore demo + + +### ✨ 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, reversing changes to files and the task conversation. + - Use "Restore Task Only" to try different prompts, but leave all files as they exist + - Use "Restore Workspace Only" to attempt different implementations, or prune context from the task + +🛟 Checkpoints are your safety net when working with Cline, enabling you to experiment freely while maintaining full control over your codebase. Whether you're refactoring a complex component, trying different implementation approaches, or using auto-approve mode for rapid development, checkpoints ensure you can always review changes and roll back if needed. + +#### 🗑️ 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. + +--- + +## Editing Messages + +Cline allows you to edit chat messages in a task after they've been submitted (with the exception of the message that started the task). + +Perhaps you didn't get the results you wanted, thought of a better way to phrase your request, or need to add more information. Editing your message allows you to re-submit a request without starting over or restoring your files or workspace with checkpoints. There are two Restore options: + +- **"Restore Chat"** restores just the task state and re-submits an API request to your provider with your edited message. + +- **"Restore All"** restores both the task state and workspace state before re-submitting an API request. "Workspace state" refers to the condition of your workspace (files, content, etc.) at different points in the conversation. + +**Interactive Editing:** + +- Messages can be clicked to enter edit mode +- Cline automatically selects all text when entering edit mode + +**Keyboard Shortcuts:** + +- Escape: Exit edit mode +- Enter: Restore just the task +- Cmd/Ctrl + Enter: Restore the task and workspace +- Shift + Enter: Insert new line / line break + + + Message editing interface + diff --git a/docs/exploring-clines-tools/cline-tools-guide.mdx b/docs/exploring-clines-tools/cline-tools-guide.mdx index 45641e70..8d4ed811 100644 --- a/docs/exploring-clines-tools/cline-tools-guide.mdx +++ b/docs/exploring-clines-tools/cline-tools-guide.mdx @@ -6,13 +6,51 @@ title: "Cline Tools Reference Guide" 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 +- 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 +<<<<<<< HEAD +## 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 +======= +>>>>>>> 30af711d5e1d5a075401daebf9b77506df529935 ## Available Tools @@ -21,7 +59,6 @@ For the most up-to-date implementation details, you can view the full source cod 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 @@ -29,12 +66,10 @@ Cline has access to the following tools for various tasks: - `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 @@ -47,7 +82,7 @@ Cline has access to the following tools for various tasks: Each tool has specific parameters and usage patterns. Here are some examples: -- Create a new file (write_to_file): +- Create a new file (write_to_file): ```xml @@ -58,7 +93,7 @@ Each tool has specific parameters and usage patterns. Here are some examples: ``` -- Search for a pattern (search_files): +- Search for a pattern (search_files): ```xml @@ -68,7 +103,7 @@ Each tool has specific parameters and usage patterns. Here are some examples: ``` -- Run a command (execute_command): +- Run a command (execute_command): ```xml npm install axios @@ -79,15 +114,12 @@ Each tool has specific parameters and usage patterns. Here are some examples: ## 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** @@ -95,6 +127,6 @@ Each tool has specific parameters and usage patterns. Here are some examples: ## Getting Help -- [Join the Discord community](https://discord.gg/cline) -- Check the documentation -- Provide feedback to improve Cline +- [Join the Discord community](https://discord.gg/cline) +- Check the documentation +- Provide feedback to improve Cline diff --git a/docs/exploring-clines-tools/new-task-tool.mdx b/docs/exploring-clines-tools/new-task-tool.mdx index 754e3dec..20fb17d2 100644 --- a/docs/exploring-clines-tools/new-task-tool.mdx +++ b/docs/exploring-clines-tools/new-task-tool.mdx @@ -25,9 +25,9 @@ Two fundamental capabilities enable advanced context management: 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. +- **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. For more details on using the `/newtask` slash command, see the [New Task Command](/features/slash-commands/new-task) @@ -38,10 +38,10 @@ As a quick alternative to Cline suggesting the `newtask` tool or defining comple 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 `` 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. +- **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 `` 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 @@ -49,13 +49,13 @@ While the core capabilities exist by default, the true power, automation, and cu 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 `` 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. +- **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 `` 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 @@ -79,22 +79,22 @@ A common workflow, **driven by specific `.clinerules` like the example below**, The effectiveness of rule-driven handoffs depends heavily on how `.clinerules` define the `` 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. +- **`## 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 `` 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. +- **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 `` 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! @@ -135,23 +135,23 @@ Plan Mode is specifically designed for analyzing complex tasks and breaking them ### 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 +- **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 +- **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 +- **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 @@ -165,10 +165,10 @@ 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 +- **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 @@ -176,19 +176,19 @@ When implementing tasks in Act Mode, you **MUST** follow these guidelines for ef ### 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 +- **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) +- 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 @@ -217,27 +217,27 @@ If the user agrees to create a new task, you **MUST** use the `new_task` tool wi ## Completed Work -- [Detailed list of completed items] -- [Include specific files modified/created] -- [Note any important decisions made] +- [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] +- [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] +- [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] +- [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]. @@ -250,60 +250,60 @@ 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 +- **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 +- **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 +- **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 +- **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 +- **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 +- **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 +- **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 +- **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 +- **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 @@ -317,18 +317,18 @@ When creating a new task, you **MUST** always include: ## 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 +- 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 +- 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 @@ -345,10 +345,10 @@ When creating a new task, you **MUST** always include: ## 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 +- 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. @@ -379,8 +379,8 @@ By strictly following these guidelines, you'll ensure smooth transitions between ```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. +- **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. ``` ```` diff --git a/docs/exploring-clines-tools/remote-browser-support.mdx b/docs/exploring-clines-tools/remote-browser-support.mdx index 68c3cd29..b1fff4cf 100644 --- a/docs/exploring-clines-tools/remote-browser-support.mdx +++ b/docs/exploring-clines-tools/remote-browser-support.mdx @@ -5,10 +5,10 @@ description: "Remote browser support allows Cline to utilize a remote Chrome ins 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 +- 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 @@ -16,11 +16,11 @@ The Remote Browser feature in Cline allows the AI assistant to interact with web 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 +- 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 @@ -28,11 +28,11 @@ Remote Browser allows Cline to view and interact with websites directly. This fe 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" +- **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 @@ -60,8 +60,8 @@ Please go to https://example.com/contact, fill out the contact form with some te 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 +- 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 @@ -81,17 +81,17 @@ Cline captures browser console logs, which can be helpful for debugging web appl ### 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 +- **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 +- **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 diff --git a/docs/exploring-clines-tools/slash-commands.mdx b/docs/exploring-clines-tools/slash-commands.mdx new file mode 100644 index 00000000..c1f178f1 --- /dev/null +++ b/docs/exploring-clines-tools/slash-commands.mdx @@ -0,0 +1,57 @@ +--- +title: "Slash Commands" +--- + +#### Overview + +Cline provides slash commands as a quick way to invoke specific tools or actions directly from the chat input, offering shortcuts for common operations. This page details the available slash commands and their usage. + +#### /newtask + +The `/newtask` slash command provides a fast, user-initiated way to leverage the `new_task` tool's functionality for branching explorations or managing long sessions without waiting for Cline to suggest it. + +**Functionality:** + +1. **Initiation:** Typing `/newtask` in the chat input signals Cline to prepare for starting a new task session. +2. **Context Proposal:** Cline proposes creating a new task and typically suggests context to preload based on the current session (summarizing key aspects like current work, technical concepts, relevant files, problems solved, and next steps). +3. **User Confirmation:** You will receive a confirmation prompt (via the `ask_followup_question` tool) displaying the proposed context. You can approve it directly or modify the context before the new task begins. +4. **New Session:** Upon confirmation, Cline ends the current task session and immediately starts a new one, preloaded with the approved context. + +**Benefit:** Allows you to cleanly branch your work or start a new phase while carrying over essential background information ("knowledge transfer") without manual copying or losing the thread of the previous session. + +#### /smol (alias /compact) + +The `/smol` slash command (with `/compact` as an alias) allows you to condense the chat history **within your current task**. This is useful when a conversation becomes very long, potentially impacting performance or making it harder for the model to maintain focus. + +**Functionality:** + +1. **Initiation:** Typing `/smol` or `/compact` tells Cline you want to condense the current chat history. You can optionally add instructions after the command to guide the summarization process (e.g., `/smol focus only on the database changes` or `/smol be concise, use bullet points`). +2. **Summarization:** Cline analyzes the conversation history, considering any additional instructions provided, and generates a summary focusing on key elements: recent discussion points, important decisions, technical concepts, relevant files, problems solved, and planned next steps. Cline determines the appropriate length and detail for the summary. It retains the beginning and very recent parts of the chat while summarizing the middle sections. +3. **User Confirmation:** Cline presents this generated summary to you via a confirmation prompt and asks if it accurately reflects the essential context. +4. **Condensing:** If you approve the summary, Cline replaces the summarized middle portion of the chat history in its active context with the generated summary. This reduces the overall token count for subsequent interactions within the _same task_. +5. **Feedback:** If you reject the summary or provide feedback, Cline will retain the original history and incorporate your feedback for future actions. + +**Benefit:** Helps maintain focus and manage token usage during very long, continuous tasks (like deep debugging or extended feature development) without needing to start an entirely new task session. Allows user guidance on the summarization focus. + +#### When to Use Which? + +Choosing between `/newtask` and `/smol` depends on your goal: + +- Use `/smol` (or `/compact`) when: + - You want to continue the **same task**, but the chat history has become very long or costly. + - You need to reduce token usage for upcoming interactions within the current workflow. + - Example: Deep debugging session where you want to summarize previous steps before continuing. +- Use `/newtask` when: + - You have finished one phase of work and want to start a **fresh, related task**. + - You want to branch your exploration while preserving key context from the previous session. + - Example: Moving from developing Feature A to starting work on Feature B, carrying over relevant architectural decisions. + +#### Why Manage Context? + +While Cline supports large context windows, actively managing context using tools and commands like `/newtask` and `/smol` is often beneficial: + +- **Performance:** Large language models can sometimes experience performance degradation or lose focus when context windows become extremely full (e.g., over 50-75% capacity, depending on the model). Condensing or resetting context can help maintain optimal performance. +- **Relevance:** Summarizing or starting fresh ensures the most relevant information is prioritized in the context window. +- **Cost:** Reducing the number of tokens sent to the model in each turn can help manage costs, especially with more expensive models. + +Using `/newtask` and `/smol` provides you with direct control over the conversation context, allowing for more efficient and effective interaction with Cline. diff --git a/docs/features/at-mentions/terminal-mentions.mdx b/docs/features/at-mentions/terminal-mentions.mdx index d73c32da..baa2d91a 100644 --- a/docs/features/at-mentions/terminal-mentions.mdx +++ b/docs/features/at-mentions/terminal-mentions.mdx @@ -65,9 +65,9 @@ If you're experiencing issues with terminal mentions or terminal integration in Common issues include: -- Terminal mentions not capturing output -- "Shell Integration Unavailable" messages in Cline chat -- Commands executing but output not visible to Cline -- Terminal integration working inconsistently +- Terminal mentions not capturing output +- "Shell Integration Unavailable" messages in Cline chat +- Commands executing but output not visible to Cline +- Terminal integration working inconsistently The troubleshooting guide provides platform-specific solutions and detailed configuration steps to resolve these issues. diff --git a/docs/features/auto-approve.mdx b/docs/features/auto-approve.mdx index 2eff5727..74f10768 100644 --- a/docs/features/auto-approve.mdx +++ b/docs/features/auto-approve.mdx @@ -26,6 +26,31 @@ A few details matter in practice: - **Workspace vs outside your workspace**: “Read all files” and “Edit all files” only extend the base toggle. If the base toggle is off, the “all files” option does nothing. +<<<<<<< HEAD +- **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 +======= - **Terminal commands**: Cline treats terminal commands as either safe or requiring approval. “Execute safe commands” covers the first category. “Execute all commands” extends this to commands flagged as requiring approval. - **Notifications**: If enabled, Cline sends OS-level notifications when approval is required, and when an auto-approved terminal command has been running for 30 seconds and may need attention. @@ -63,6 +88,7 @@ These labels match what you see in the Auto Approve menu. Cline does not use a fixed allowlist of safe or unsafe commands. The model marks each command with a `requires_approval` flag based on the command and its arguments, and Auto Approve uses that flag. These are examples, not guarantees. +>>>>>>> 30af711d5e1d5a075401daebf9b77506df529935 ### Commonly treated as safe @@ -76,6 +102,10 @@ These are examples, not guarantees. ### Commonly requires approval +<<<<<<< HEAD +- Auto-approving read access to project files +- Setting a reasonable maximum request limit (10-20) +======= | Example | Why it often needs approval | |--------|------------------------------| | `npm install ` | Modifies dependencies and lockfiles | @@ -83,6 +113,7 @@ These are examples, not guarantees. | `mv ` | Moves files (can overwrite) | | `sed -i ...` | In-place file edits | | `curl https://...` | Downloads and executes remote code | +>>>>>>> 30af711d5e1d5a075401daebf9b77506df529935 Whether a command is treated as safe depends on the exact command, flags, and the current task. When in doubt, keep command auto-approval off and approve commands manually. diff --git a/docs/features/checkpoints.mdx b/docs/features/checkpoints.mdx index 13aa7d76..0fa53099 100644 --- a/docs/features/checkpoints.mdx +++ b/docs/features/checkpoints.mdx @@ -9,9 +9,9 @@ Checkpoints automatically save snapshots of your workspace after each step in a 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 +- 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. @@ -75,15 +75,15 @@ Checkpoints let you be more experimental with Cline. While human coding is often ### Using Auto-Approve Mode -- Provides safety net for rapid iterations -- Makes it easy to undo unexpected results +- 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 +- Try multiple solutions confidently +- Compare different implementations +- Quickly revert to working states +- Ideal for exploring different design patterns or architectural approaches ## Best Practices diff --git a/docs/features/cline-rules.mdx b/docs/features/cline-rules.mdx index 882d3e77..a0641aa6 100644 --- a/docs/features/cline-rules.mdx +++ b/docs/features/cline-rules.mdx @@ -32,34 +32,34 @@ You can also have Cline create a rule for you by using the [`/newrule` slash com ## Documentation Requirements -- Update relevant documentation in /docs when modifying features -- Keep README.md in sync with new capabilities -- Maintain changelog entries in CHANGELOG.md +- 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 +- 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 +- 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 +- Unit tests required for business logic +- Integration tests for API endpoints +- E2E tests for critical user flows ``` ### Key Benefits @@ -97,9 +97,9 @@ your-project/ ### 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. +- 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 @@ -164,10 +164,10 @@ 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 +- 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. @@ -177,9 +177,9 @@ To make managing both single `.clinerules` files and the folder system even easi 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. +- **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. diff --git a/docs/features/commands-and-shortcuts/code-commands.mdx b/docs/features/commands-and-shortcuts/code-commands.mdx index a11119d7..a45bcaf7 100644 --- a/docs/features/commands-and-shortcuts/code-commands.mdx +++ b/docs/features/commands-and-shortcuts/code-commands.mdx @@ -21,15 +21,15 @@ When you right-click on selected code, you'll see: 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 +- 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 +- The file path (as a file mention) +- The selected code with proper formatting +- The programming language for accurate syntax highlighting ### Lightbulb Menu (Code Actions) @@ -89,9 +89,9 @@ Using Cline's code commands is simple: After using any command, you can: -- Ask follow-up questions -- Request modifications to the solution -- Apply the changes back to your code +- Ask follow-up questions +- Request modifications to the solution +- Apply the changes back to your code ## How It Works Under the Hood @@ -99,14 +99,12 @@ 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 @@ -121,9 +119,9 @@ This seamless integration between your editor and Cline's AI capabilities makes ## 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 +- **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. diff --git a/docs/features/commands-and-shortcuts/git-integration.mdx b/docs/features/commands-and-shortcuts/git-integration.mdx index 6b7903d4..c2101223 100644 --- a/docs/features/commands-and-shortcuts/git-integration.mdx +++ b/docs/features/commands-and-shortcuts/git-integration.mdx @@ -23,10 +23,10 @@ One of the most useful Git integrations is the ability to automatically generate 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 +- 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. @@ -48,13 +48,13 @@ This process uses your current Cline API configuration, so the quality of the ge ## Tips for Effective Use -- **Generate commit messages for complex changes**: The AI excels at summarizing multiple related changes into a coherent message. +- **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. +- **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. +- **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. +- **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 diff --git a/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx b/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx index d0e31531..788713cd 100644 --- a/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx +++ b/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx @@ -1,204 +1,103 @@ --- -title: "Keyboard Shortcuts" -sidebarTitle: "Keyboard Shortcuts" +title: "键盘快捷键" +sidebarTitle: "键盘快捷键" --- -Speed up your workflow by accessing Cline's AI assistance without taking your hands off the keyboard. +Cline 的键盘快捷键让您无需将手从键盘上移开即可访问 AI 辅助。通过使用常用 Cline 操作的热键来加速您的工作流程。 - -**The One Shortcut You Need:** `Ctrl+'` (Windows/Linux) or `Cmd+'` (macOS) +## 默认键盘快捷键 -This context-aware shortcut handles your most common needs: -- **With text selected:** Adds code to Cline chat -- **Without selection:** Focuses the chat input +Cline 配备以下内置键盘快捷键来简化您的工作流程: -Master this one shortcut, and you're 90% there. - +| 操作 | Windows/Linux | macOS | 条件 | 描述 | +| ----------------------- | ------------- | ------- | ---------------------------- | ----------------------------------------- | +| 添加到 Cline | `Ctrl+'` | `Cmd+'` | 当选择文本时 | 将选中的代码添加到 Cline 聊天 | +| 聚焦聊天输入 | `Ctrl+'` | `Cmd+'` | 当没有选择文本时 | 聚焦 Cline 聊天输入字段 | +| 生成提交消息 | (未设置) | (未设置) | 当 Git 是 SCM 提供商时 | 通过源代码控制视图可用 | -## Default Shortcuts +## 自定义快捷键的可用命令 -Cline has minimal default shortcuts by design, so they won't conflict with your existing VSCode setup: +虽然 Cline 只有几个默认键盘快捷键,但您可以为以下任何命令分配自己的快捷键: -| Shortcut | Windows/Linux | macOS | What It Does | -| -------- | ------------- | ----- | ------------ | -| **Add to Chat / Focus Input** | `Ctrl+'` | `Cmd+'` | Context-aware: adds selected code or focuses chat | +| 命令 ID | 描述 | +| ---------------------------------------------------------------------------------------- | --------------------------------------------- | +| [`cline.openInNewTab`](/features/commands-and-shortcuts/overview) | 在新编辑器标签页中打开 Cline | +| [`cline.addToChat`](/features/commands-and-shortcuts/code-commands) | 将选中的代码添加到 Cline 聊天 | +| [`cline.addTerminalOutputToChat`](/features/commands-and-shortcuts/terminal-integration) | 将终端输出添加到 Cline | +| `cline.focusChatInput` | 聚焦 Cline 聊天输入字段 | +| [`cline.generateGitCommitMessage`](/features/commands-and-shortcuts/git-integration) | 为暂存的更改生成提交消息 | +| [`cline.explainCode`](/features/commands-and-shortcuts/code-commands) | 解释选中的代码 | +| [`cline.improveCode`](/features/commands-and-shortcuts/code-commands) | 为选中的代码建议改进 | +| [`cline.fixWithCline`](/features/commands-and-shortcuts/code-commands) | 修复有错误的代码 | +| `claude-dev.SidebarProvider.focus` | 打开并聚焦 Cline 侧边栏 | -That's it! Everything else is available for you to customize. +## 自定义键盘快捷键 -## Quick Workflow Examples +您可以自定义 Cline 的键盘快捷键以匹配您的偏好: -Here's how keyboard shortcuts fit into real coding workflows: +1. 在 VSCode 中打开键盘快捷键编辑器: -### Debug & Fix Workflow + - 按 `Ctrl+K Ctrl+S`(Windows/Linux)或 `Cmd+K Cmd+S`(macOS) + - 或转到文件 > 首选项 > 键盘快捷键 -1. **Find error in code** → VSCode highlights it -2. **Select the problematic code** → `Shift+Arrow` or `Ctrl+L` / `Cmd+L` -3. **Send to Cline** → `Ctrl+'` / `Cmd+'` -4. **Ask for help** → Type your question, hit `Enter` +2. 搜索"Cline"以查看所有可用命令 -### Code Review Workflow +3. 点击任何命令旁边的铅笔图标以更改其快捷键 -1. **Review a function** → Select it with `Ctrl+L` / `Cmd+L` -2. **Get AI review** → `Ctrl+'` / `Cmd+'` then ask "Review this" -3. **Iterate** → Apply suggestions and repeat +4. 按您想要分配给该命令的键 -### Terminal Integration Workflow +5. 按 Enter 保存新快捷键 -1. **Open terminal** → Press `` Ctrl+` `` / `` Cmd+` `` -2. **Run your command** → Execute in terminal -3. **Capture output** → Press `Alt+T` (after assigning shortcut) -4. **Get help** → Ask Cline to interpret errors or output +## 建议的自定义快捷键 - -**Pro Tip:** Assign `Alt+T` to the `cline.addTerminalOutputToChat` command for quick terminal output capture. Without a shortcut, you can still right-click in the terminal and select "Add to Cline" - but the keyboard approach is much faster for frequent debugging workflows. - +以下是一些您可能觉得有用的建议快捷键: -## Customizing Shortcuts +| 操作 | 建议快捷键 | 命令 ID | 描述 | +| --------------------- | ------------------------------ | ----------------------------------------- | ----------------------------- | +| 打开 Cline 侧边栏 | `Ctrl+Shift+C` / `Cmd+Shift+C` | `claude-dev.SidebarProvider.focus` | 打开 Cline 侧边栏面板 | +| 新任务 | `Alt+N` | `cline.plusButtonClicked` | 启动新的 Cline 任务 | +| 将终端添加到 Cline | `Alt+T` | `cline.addTerminalOutputToChat` | 将终端输出添加到 Cline | +| 清除当前任务 | `Alt+C` | (需要自定义键绑定到 UI 操作) | 清除当前任务 | -Want to assign shortcuts to more Cline commands? Here's how: +## 仅键盘工作流程 -**Step 1:** Open VSCode's Keyboard Shortcuts editor -- Press `Ctrl+K Ctrl+S` (Windows/Linux) or `Cmd+K Cmd+S` (macOS) -- Or: **File → Preferences → Keyboard Shortcuts** +使用正确的快捷键,您可以无需触摸鼠标即可使用 Cline: -**Step 2:** Search for "Cline" +1. 使用键盘导航选择代码(`Shift+Arrow` 键) +2. 使用 `Ctrl+'` / `Cmd+'` 发送给 Cline +3. 输入您的问题并按 Enter +4. 审查响应并应用建议 -**Step 3:** Click the ✏️ icon next to any command +## 编辑器集成快捷键 -**Step 4:** Press your desired key combo, then `Enter` +Cline 的键盘快捷键与 VSCode 的内置快捷键无缝集成: - -**Avoid Conflicts:** Check that your shortcut doesn't override important VSCode commands. The shortcuts editor will warn you about conflicts. - +- 在将代码发送给 Cline 之前使用 VSCode 的选择快捷键(`Ctrl+L` / `Cmd+L` 选择行等) +- 与 VSCode 的分割编辑器快捷键结合使用,以并排查看代码和 Cline +- 在捕获终端输出之前使用 VSCode 的终端聚焦快捷键(`` Ctrl+` `` / `` Cmd+` ``) -## Available Commands Reference +## 有效使用技巧 - +- **首先学习默认快捷键**:`Ctrl+'` / `Cmd+'` 快捷键是多功能的 - 当选择文本时它将选中的代码添加到聊天,或当没有选择任何内容时聚焦聊天输入 +- **创建肌肉记忆**:一致地使用键盘快捷键来建立习惯 +- **为工作流程自定义**:为经常使用的命令分配快捷键 +- **考虑人体工程学**:选择对您的键盘布局舒适的快捷键 -These commands help you navigate and manage Cline tasks: +键盘快捷键可能看起来像是一个小优化,但当您经常使用 Cline 时,它们可以显著加速您的工作流程。通过将手放在键盘上,您保持编码流程,同时在需要时仍然获得 AI 辅助。 -| Command ID | Description | Suggested Shortcut | -| ---------- | ----------- | ------------------ | -| `cline.plusButtonClicked` | Start a new task | `Ctrl+Shift+N` / `Cmd+Shift+N` | -| `cline.historyButtonClicked` | Open task history | `Ctrl+Shift+H` / `Cmd+Shift+H` | -| `claude-dev.SidebarProvider.focus` | Open Cline sidebar | `Ctrl+Shift+L` / `Cmd+Shift+L` | +## 如何查找所有可用命令 -**Note:** `claude-dev` prefix is for historical reasons - it works with Cline. +要查看可以分配快捷键的所有 Cline 命令: - - - - -Work directly with your code: - -| Command ID | Description | Suggested Shortcut | -| ---------- | ----------- | ------------------ | -| `cline.addToChat` | Add selected code to chat | `Ctrl+'` / `Cmd+'` ⭐ (default) | -| `cline.focusChatInput` | Focus chat input | `Ctrl+'` / `Cmd+'` ⭐ (default) | -| `cline.explainCode` | Explain selected code | `Ctrl+Shift+E` / `Cmd+Shift+E` | -| `cline.improveCode` | Suggest code improvements | `Ctrl+Shift+I` / `Cmd+Shift+I` | - -⭐ These share the same shortcut - it's context-aware! - - - - - -Connect Cline with your terminal: - -| Command ID | Description | Suggested Shortcut | -| ---------- | ----------- | ------------------ | -| `cline.addTerminalOutputToChat` | Add terminal output to Cline | `Alt+T` | - -**Tip:** Use this after running commands to get help interpreting output or fixing errors. - - - - - -Generate commit messages with AI: - -| Command ID | Description | Suggested Shortcut | -| ---------- | ----------- | ------------------ | -| `cline.generateGitCommitMessage` | Generate commit message | `Ctrl+Shift+G` / `Cmd+Shift+G` | -| `cline.abortGitCommitMessage` | Stop generation | `Ctrl+Shift+Esc` / `Cmd+Shift+Esc` | - - - - - -These commands open Cline's configuration panels. Most users access these via the sidebar buttons, but keyboard shortcuts can be useful for: - -- **Frequent MCP server developers** who constantly adjust server configurations -- **Demo/presentation scenarios** where you need quick, keyboard-only navigation -- **Accessibility workflows** where mouse usage is minimized - -| Command ID | Description | Suggested Shortcut | -| ---------- | ----------- | ------------------ | -| `cline.settingsButtonClicked` | Open Cline settings | `Ctrl+Alt+,` / `Cmd+Opt+,` | -| `cline.mcpButtonClicked` | Open MCP servers config | `Ctrl+Alt+M` / `Cmd+Opt+M` | -| `cline.accountButtonClicked` | Open account settings | `Ctrl+Alt+A` / `Cmd+Opt+A` | -| `cline.openWalkthrough` | Open walkthrough guide | (not recommended) | - -**Our take:** Unless you're constantly tweaking settings or building MCP servers, the sidebar buttons are more convenient. But if you find yourself opening these panels frequently, shortcuts can save time. - - - -## What About "Fix with Cline"? - - -**You CAN'T assign a keyboard shortcut to "Fix with Cline"** - -This command only appears in the **lightbulb menu** (💡) when VSCode detects errors in your code. It needs the error context to work, so it's not available as a standalone command. - -**Workarounds:** -- Click the 💡 lightbulb icon that appears next to errors -- Or select code with errors and use `Ctrl+'` / `Cmd+'` to ask Cline to fix them -- Or right-click and select "Add to Cline" - - -Learn more about code actions in our [Code Commands documentation](/features/commands-and-shortcuts/code-commands). - -## Best Practices - - -**Start Simple** - -Don't try to memorize 20 shortcuts on day one. Start with: -1. `Ctrl+'` / `Cmd+'` (the essential one) -2. Add 1-2 more based on your actual usage patterns -3. Build muscle memory over time - - -**Choose Shortcuts Wisely:** -- **Be ergonomic:** Use comfortable key combinations -- **Create patterns:** Group related commands (e.g., all Cline shortcuts use `Ctrl+Shift+...`) -- **Avoid conflicts:** Don't override VSCode essentials like `Ctrl+C` or `Ctrl+S` -- **Use modifiers:** Combine `Ctrl`/`Cmd` + `Shift` + `Alt` to reduce conflicts - -**Build the Habit:** -- Use shortcuts consistently for a week to build muscle memory -- Keep a note of your custom shortcuts until they're automatic -- Review monthly to see if your workflow has changed - -## Discovering Commands - -Not sure what commands are available? Use VSCode's Command Palette: - -1. Press `Ctrl+Shift+P` / `Cmd+Shift+P` -2. Type "Cline" to filter -3. Browse all available commands -4. Assign shortcuts to your favorites +1. 打开命令面板(`Ctrl+Shift+P` / `Cmd+Shift+P`) +2. 输入"Cline"以过滤列表 +3. 浏览可用命令 Editor Integration Overview ---- - - -**Remember:** The goal isn't to memorize every possible shortcut. Master `Ctrl+'` / `Cmd+'` first, then gradually add shortcuts for commands you use frequently. Quality over quantity! - +这有助于您发现可能不知道的功能,并为最常用的功能分配快捷键。 \ No newline at end of file diff --git a/docs/features/commands-and-shortcuts/overview.mdx b/docs/features/commands-and-shortcuts/overview.mdx index ccc437c7..cca5c9b2 100644 --- a/docs/features/commands-and-shortcuts/overview.mdx +++ b/docs/features/commands-and-shortcuts/overview.mdx @@ -17,11 +17,11 @@ Cline integrates directly into VSCode's interface, letting you access AI assista 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" +- 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 @@ -57,9 +57,9 @@ Cline offers several editor integrations, each designed to enhance different asp 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 +- 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. diff --git a/docs/features/commands-and-shortcuts/terminal-integration.mdx b/docs/features/commands-and-shortcuts/terminal-integration.mdx index bc6bf1aa..95c7bb61 100644 --- a/docs/features/commands-and-shortcuts/terminal-integration.mdx +++ b/docs/features/commands-and-shortcuts/terminal-integration.mdx @@ -22,10 +22,10 @@ When you're working in the VSCode terminal and see output you want to discuss wi This is perfect for: -- Debugging build errors -- Understanding test failures -- Analyzing command output -- Getting help with error messages +- 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. @@ -54,7 +54,6 @@ This gives Cline the full context it needs to provide accurate help with termina 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 @@ -70,13 +69,13 @@ This approach ensures that all terminal output, including colors and formatting, ## 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. +- **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. +- **Select specific output when needed**: By default, the integration captures all terminal content, but you can also select specific lines before right-clicking to focus on just the relevant output. -- **Combine terminal outputs with file mentions**: After sending terminal output to Cline, you can enhance your question by mentioning relevant files using the @ mentions feature. +- **Combine terminal outputs with file mentions**: After sending terminal output to Cline, you can enhance your question by mentioning relevant files using the @ mentions feature. -- **Contextualize build & test outputs with the terminal**: Terminal integration is particularly useful for understanding complex build errors or test failures that span multiple lines. +- **Contextualize build & test outputs with the terminal**: Terminal integration is particularly useful for understanding complex build errors or test failures that span multiple lines. Next time you're staring at a cryptic error message in your terminal, try using Cline's terminal integration instead of copying and pasting. You'll get more accurate help because Cline can see the complete terminal context with proper formatting. @@ -86,11 +85,11 @@ If you're experiencing issues with terminal integration, such as "Shell Integrat The troubleshooting guide covers: -- Common terminal integration issues and quick fixes -- Platform-specific solutions for Windows, macOS, and Linux -- Shell-specific configurations for zsh, bash, PowerShell, and more -- Advanced debugging techniques -- Terminal settings optimization +- Common terminal integration issues and quick fixes +- Platform-specific solutions for Windows, macOS, and Linux +- Shell-specific configurations for zsh, bash, PowerShell, and more +- Advanced debugging techniques +- Terminal settings optimization **Quick Fix**: Most terminal issues can be resolved by switching to bash in the Cline settings and increasing the shell diff --git a/docs/features/editing-messages.mdx b/docs/features/editing-messages.mdx index 8697537d..4f76d383 100644 --- a/docs/features/editing-messages.mdx +++ b/docs/features/editing-messages.mdx @@ -9,10 +9,10 @@ Cline allows you to edit chat messages in a task after they've been submitted. T 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 +- 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 @@ -35,33 +35,33 @@ When you edit a message, you have two options for restoring: 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 +- 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 +- 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 +- **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 +- 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 diff --git a/docs/features/plan-and-act.mdx b/docs/features/plan-and-act.mdx index ef6adf2a..d430d9e2 100644 --- a/docs/features/plan-and-act.mdx +++ b/docs/features/plan-and-act.mdx @@ -19,10 +19,10 @@ Plan & Act modes represent Cline's approach to structured AI development, emphas 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 +- 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 Try [Dictation](/features/dictation) in Plan mode - instead of typing out complex requirements, you can speak naturally and share your complete thought process. It's perfect for rapid back-and-forth planning discussions. @@ -32,10 +32,10 @@ Try [Dictation](/features/dictation) in Plan mode - instead of typing out comple 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 +- 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 Act mode capabilities @@ -61,10 +61,10 @@ In this mode: Plan mode workflow -- Share your requirements -- Let Cline analyze relevant files -- Engage in dialogue to clarify objectives -- Develop implementation strategy +- Share your requirements +- Let Cline analyze relevant files +- Engage in dialogue to clarify objectives +- Develop implementation strategy Mode usage patterns @@ -153,10 +153,10 @@ And Act mode is perfect for: Share your experiences and improvements: -- Join our [Discord community](https://discord.gg/cline) -- Participate in discussions -- Submit feature requests -- Report issues +- Join our [Discord community](https://discord.gg/cline) +- Participate in discussions +- Submit feature requests +- Report issues --- diff --git a/docs/features/slash-commands/deep-planning.mdx b/docs/features/slash-commands/deep-planning.mdx index 47937133..8cc34e72 100644 --- a/docs/features/slash-commands/deep-planning.mdx +++ b/docs/features/slash-commands/deep-planning.mdx @@ -12,6 +12,19 @@ sidebarTitle: "/deep-planning" /> +## Demo Video + +Watch Deep Planning in action as Cline investigates a codebase, asks clarifying questions, and generates a comprehensive implementation plan: + + +