Skip to content

Commit 2fe2405

Browse files
celestial-vaultElephant Lumps
andauthored
Migrate tools section new docs (RooCodeInc#3255)
* migrate cline tools section * changeset --------- Co-authored-by: Elephant Lumps <[email protected]>
1 parent e4d26be commit 2fe2405

File tree

9 files changed

+953
-5
lines changed

9 files changed

+953
-5
lines changed

.changeset/mean-nails-teach.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": minor
3+
---
4+
5+
Migrate Cline Tools Section to new docs

docs/docs.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,19 @@
5353
}
5454
},
5555
"navigation": {
56-
"pages": ["introduction"]
56+
"groups": [
57+
{
58+
"group": "Exploring Cline's Tools",
59+
"pages": [
60+
"exploring-clines-tools/cline-tools-guide",
61+
"exploring-clines-tools/plan-and-act-modes-a-guide-to-effective-ai-development",
62+
"exploring-clines-tools/checkpoints",
63+
"exploring-clines-tools/new-task-tool",
64+
"exploring-clines-tools/remote-browser-support",
65+
"exploring-clines-tools/slash-commands"
66+
]
67+
}
68+
]
5769
},
5870
"footer": {
5971
"socials": {
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: "Checkpoints and Messages"
3+
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."
4+
---
5+
6+
Checkpoints automatically save snapshots of your workspace after each step in a task. This powerful feature lets you:
7+
8+
- Track and review changes made during a task
9+
- Roll back to any previous point if needed
10+
- Experiment confidently with auto-approve mode
11+
- Maintain full control over your workspace
12+
13+
### ⚙️ How Checkpoints Work
14+
15+
Cline creates a checkpoint after each tool use (file edits, commands, etc.). These checkpoints:
16+
17+
- Work alongside your Git workflow without interference
18+
- Maintain context between restores
19+
- Use a shadow Git repository to track changes
20+
21+
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.
22+
23+
#### Viewing Changes & Restoring to Checkpoint
24+
25+
After each tool use, you can:
26+
27+
1. Click the "Compare" button to see modified files
28+
2. Click the "Restore" button to open restore options
29+
30+
<Frame>
31+
<img src="/assets/robot_panel_dark.png" alt="Checkpoint comparison and restore options" />
32+
</Frame>
33+
34+
#### Rolling Back
35+
36+
To restore to a previous point:
37+
38+
1. Click the "Restore" button next to any step
39+
2. Choose from three options:
40+
- **Restore Task and Workspace**: Reset both codebase and task to that point
41+
- **Restore Task Only**: Keep codebase changes but revert task context
42+
- **Restore Workspace Only**: Reset codebase while preserving task context
43+
44+
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.
45+
46+
### 💡 Use Cases
47+
48+
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.
49+
50+
#### 1. Using Auto-Approve Mode
51+
52+
- Provides safety net for rapid iterations
53+
- Makes it easy to undo unexpected results
54+
55+
#### 2. Testing Different Approaches
56+
57+
- Try multiple solutions confidently
58+
- Compare different implementations
59+
- Quickly revert to working states
60+
- Ideal for exploring different design patterns or architectural approaches
61+
62+
<Frame caption="In this case, I didn't like the changes Cline made to my robot dog-walking website (still working on the robots) and I wanted to revert both the codebase and the task to before any changes were made so I could start fresh.">
63+
<img src="/assets/robot_panel_dark.png" alt="Checkpoint restore demo" />
64+
</Frame>
65+
66+
### ✨ Best Practices
67+
68+
1. Use checkpoints as safety nets when experimenting
69+
2. Leverage auto-approve mode more confidently, knowing you can always roll back
70+
3. Restore selectively based on needs:
71+
72+
- Use "Restore Task and Workspace" for a fresh start, reversing changes to files and the task conversation.
73+
- Use "Restore Task Only" to try different prompts, but leave all files as they exist
74+
- Use "Restore Workspace Only" to attempt different implementations, or prune context from the task
75+
76+
🛟 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.
77+
78+
#### 🗑️ Deleting Checkpoints
79+
80+
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.
81+
82+
---
83+
84+
## Editing Messages
85+
86+
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).
87+
88+
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:
89+
90+
- **"Restore Chat"** restores just the task state and re-submits an API request to your provider with your edited message.
91+
92+
- **"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.
93+
94+
**Interactive Editing:**
95+
96+
- Messages can be clicked to enter edit mode
97+
- Cline automatically selects all text when entering edit mode
98+
99+
**Keyboard Shortcuts:**
100+
101+
- Escape: Exit edit mode
102+
- Enter: Restore just the task
103+
- Cmd/Ctrl + Enter: Restore the task and workspace
104+
- Shift + Enter: Insert new line / line break
105+
106+
<Frame>
107+
<img src="/assets/robot_panel_dark.png" alt="Message editing interface" />
108+
</Frame>
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: "Cline Tools Reference Guide"
3+
---
4+
5+
## What Can Cline Do?
6+
7+
Cline is your AI assistant that can:
8+
9+
- Edit and create files in your project
10+
- Run terminal commands
11+
- Search and analyze your code
12+
- Help debug and fix issues
13+
- Automate repetitive tasks
14+
- Integrate with external tools
15+
16+
## First Steps
17+
18+
1. **Start a Task**
19+
20+
- Type your request in the chat
21+
- Example: "Create a new React component called Header"
22+
23+
2. **Provide Context**
24+
25+
- Use @ mentions to add files, folders, or URLs
26+
- Example: "@file:src/components/App.tsx"
27+
28+
3. **Review Changes**
29+
- Cline will show diffs before making changes
30+
- You can edit or reject changes
31+
32+
## Key Features
33+
34+
1. **File Editing**
35+
36+
- Create new files
37+
- Modify existing code
38+
- Search and replace across files
39+
40+
2. **Terminal Commands**
41+
42+
- Run npm commands
43+
- Start development servers
44+
- Install dependencies
45+
46+
3. **Code Analysis**
47+
48+
- Find and fix errors
49+
- Refactor code
50+
- Add documentation
51+
52+
4. **Browser Integration**
53+
- Test web pages
54+
- Capture screenshots
55+
- Inspect console logs
56+
57+
## Available Tools
58+
59+
For the most up-to-date implementation details, you can view the full source code in the [Cline repository](https://github.com/cline/cline/blob/main/src/core/Cline.ts).
60+
61+
Cline has access to the following tools for various tasks:
62+
63+
1. **File Operations**
64+
65+
- `write_to_file`: Create or overwrite files
66+
- `read_file`: Read file contents
67+
- `replace_in_file`: Make targeted edits to files
68+
- `search_files`: Search files using regex
69+
- `list_files`: List directory contents
70+
71+
2. **Terminal Operations**
72+
73+
- `execute_command`: Run CLI commands
74+
- `list_code_definition_names`: List code definitions
75+
76+
3. **MCP Tools**
77+
78+
- `use_mcp_tool`: Use tools from MCP servers
79+
- `access_mcp_resource`: Access MCP server resources
80+
- Users can create custom MCP tools that Cline can then access
81+
- Example: Create a weather API tool that Cline can use to fetch forecasts
82+
83+
4. **Interaction Tools**
84+
- `ask_followup_question`: Ask user for clarification
85+
- `attempt_completion`: Present final results
86+
87+
Each tool has specific parameters and usage patterns. Here are some examples:
88+
89+
- Create a new file (write_to_file):
90+
91+
```xml
92+
<write_to_file>
93+
<path>src/components/Header.tsx</path>
94+
<content>
95+
// Header component code
96+
</content>
97+
</write_to_file>
98+
```
99+
100+
- Search for a pattern (search_files):
101+
102+
```xml
103+
<search_files>
104+
<path>src</path>
105+
<regex>function\s+\w+\(</regex>
106+
<file_pattern>*.ts</file_pattern>
107+
</search_files>
108+
```
109+
110+
- Run a command (execute_command):
111+
```xml
112+
<execute_command>
113+
<command>npm install axios</command>
114+
<requires_approval>false</requires_approval>
115+
</execute_command>
116+
```
117+
118+
## Common Tasks
119+
120+
1. **Create a New Component**
121+
122+
- "Create a new React component called Footer"
123+
124+
2. **Fix a Bug**
125+
126+
- "Fix the error in src/utils/format.ts"
127+
128+
3. **Refactor Code**
129+
130+
- "Refactor the Button component to use TypeScript"
131+
132+
4. **Run Commands**
133+
- "Run npm install to add axios"
134+
135+
## Getting Help
136+
137+
- [Join the Discord community](https://discord.gg/cline)
138+
- Check the documentation
139+
- Provide feedback to improve Cline

0 commit comments

Comments
 (0)