Skip to content

Commit c673edd

Browse files
committed
Merge remote-tracking branch 'origin/main' into vscode-lm-provider
2 parents 382d467 + 58c5f76 commit c673edd

File tree

103 files changed

+14684
-2167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+14684
-2167
lines changed

.clinerules

Lines changed: 2 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -4,165 +4,12 @@
44
- Before attempting completion, always make sure that any code changes have test coverage
55
- Ensure all tests pass before submitting changes
66

7-
2. Git Commits:
8-
- When finishing a task, always output a git commit command
9-
- Include a descriptive commit message that follows conventional commit format
10-
11-
3. Documentation:
12-
- Update README.md when making significant changes, such as:
13-
* Adding new features or settings
14-
* Changing existing functionality
15-
* Updating system requirements
16-
* Adding new dependencies
17-
- Include clear descriptions of new features and how to use them
18-
- Keep the documentation in sync with the codebase
19-
- Add examples where appropriate
20-
21-
4. Lint Rules:
7+
2. Lint Rules:
228
- Never disable any lint rules without explicit user approval
239
- If a lint rule needs to be disabled, ask the user first and explain why
2410
- Prefer fixing the underlying issue over disabling the lint rule
2511
- Document any approved lint rule disabling with a comment explaining the reason
2612

2713
# Adding a New Setting
2814

29-
To add a new setting that persists its state, follow these steps:
30-
31-
## For All Settings
32-
33-
1. Add the setting to ExtensionMessage.ts:
34-
- Add the setting to the ExtensionState interface
35-
- Make it required if it has a default value, optional if it can be undefined
36-
- Example: `preferredLanguage: string`
37-
38-
2. Add test coverage:
39-
- Add the setting to mockState in ClineProvider.test.ts
40-
- Add test cases for setting persistence and state updates
41-
- Ensure all tests pass before submitting changes
42-
43-
## For Checkbox Settings
44-
45-
1. Add the message type to WebviewMessage.ts:
46-
- Add the setting name to the WebviewMessage type's type union
47-
- Example: `| "multisearchDiffEnabled"`
48-
49-
2. Add the setting to ExtensionStateContext.tsx:
50-
- Add the setting to the ExtensionStateContextType interface
51-
- Add the setter function to the interface
52-
- Add the setting to the initial state in useState
53-
- Add the setting to the contextValue object
54-
- Example:
55-
```typescript
56-
interface ExtensionStateContextType {
57-
multisearchDiffEnabled: boolean;
58-
setMultisearchDiffEnabled: (value: boolean) => void;
59-
}
60-
```
61-
62-
3. Add the setting to ClineProvider.ts:
63-
- Add the setting name to the GlobalStateKey type union
64-
- Add the setting to the Promise.all array in getState
65-
- Add the setting to the return value in getState with a default value
66-
- Add the setting to the destructured variables in getStateToPostToWebview
67-
- Add the setting to the return value in getStateToPostToWebview
68-
- Add a case in setWebviewMessageListener to handle the setting's message type
69-
- Example:
70-
```typescript
71-
case "multisearchDiffEnabled":
72-
await this.updateGlobalState("multisearchDiffEnabled", message.bool)
73-
await this.postStateToWebview()
74-
break
75-
```
76-
77-
4. Add the checkbox UI to SettingsView.tsx:
78-
- Import the setting and its setter from ExtensionStateContext
79-
- Add the VSCodeCheckbox component with the setting's state and onChange handler
80-
- Add appropriate labels and description text
81-
- Example:
82-
```typescript
83-
<VSCodeCheckbox
84-
checked={multisearchDiffEnabled}
85-
onChange={(e: any) => setMultisearchDiffEnabled(e.target.checked)}
86-
>
87-
<span style={{ fontWeight: "500" }}>Enable multi-search diff matching</span>
88-
</VSCodeCheckbox>
89-
```
90-
91-
5. Add the setting to handleSubmit in SettingsView.tsx:
92-
- Add a vscode.postMessage call to send the setting's value when clicking Done
93-
- Example:
94-
```typescript
95-
vscode.postMessage({ type: "multisearchDiffEnabled", bool: multisearchDiffEnabled })
96-
```
97-
98-
## For Select/Dropdown Settings
99-
100-
1. Add the message type to WebviewMessage.ts:
101-
- Add the setting name to the WebviewMessage type's type union
102-
- Example: `| "preferredLanguage"`
103-
104-
2. Add the setting to ExtensionStateContext.tsx:
105-
- Add the setting to the ExtensionStateContextType interface
106-
- Add the setter function to the interface
107-
- Add the setting to the initial state in useState with a default value
108-
- Add the setting to the contextValue object
109-
- Example:
110-
```typescript
111-
interface ExtensionStateContextType {
112-
preferredLanguage: string;
113-
setPreferredLanguage: (value: string) => void;
114-
}
115-
```
116-
117-
3. Add the setting to ClineProvider.ts:
118-
- Add the setting name to the GlobalStateKey type union
119-
- Add the setting to the Promise.all array in getState
120-
- Add the setting to the return value in getState with a default value
121-
- Add the setting to the destructured variables in getStateToPostToWebview
122-
- Add the setting to the return value in getStateToPostToWebview
123-
- Add a case in setWebviewMessageListener to handle the setting's message type
124-
- Example:
125-
```typescript
126-
case "preferredLanguage":
127-
await this.updateGlobalState("preferredLanguage", message.text)
128-
await this.postStateToWebview()
129-
break
130-
```
131-
132-
4. Add the select UI to SettingsView.tsx:
133-
- Import the setting and its setter from ExtensionStateContext
134-
- Add the select element with appropriate styling to match VSCode's theme
135-
- Add options for the dropdown
136-
- Add appropriate labels and description text
137-
- Example:
138-
```typescript
139-
<select
140-
value={preferredLanguage}
141-
onChange={(e) => setPreferredLanguage(e.target.value)}
142-
style={{
143-
width: "100%",
144-
padding: "4px 8px",
145-
backgroundColor: "var(--vscode-input-background)",
146-
color: "var(--vscode-input-foreground)",
147-
border: "1px solid var(--vscode-input-border)",
148-
borderRadius: "2px"
149-
}}>
150-
<option value="English">English</option>
151-
<option value="Spanish">Spanish</option>
152-
...
153-
</select>
154-
```
155-
156-
5. Add the setting to handleSubmit in SettingsView.tsx:
157-
- Add a vscode.postMessage call to send the setting's value when clicking Done
158-
- Example:
159-
```typescript
160-
vscode.postMessage({ type: "preferredLanguage", text: preferredLanguage })
161-
```
162-
163-
These steps ensure that:
164-
- The setting's state is properly typed throughout the application
165-
- The setting persists between sessions
166-
- The setting's value is properly synchronized between the webview and extension
167-
- The setting has a proper UI representation in the settings view
168-
- Test coverage is maintained for the new setting
15+
To add a new setting that persists its state, follow the steps in cline_docs/settings.md

.github/workflows/marketplace-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ jobs:
3636
- name: Package and Publish Extension
3737
env:
3838
VSCE_PAT: ${{ secrets.VSCE_PAT }}
39+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
3940
run: |
4041
current_package_version=$(node -p "require('./package.json').version")
4142
npm run publish:marketplace
4243
echo "Successfully published version $current_package_version to VS Code Marketplace"
44+

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
out
22
dist
33
node_modules
4-
.vscode-test/
4+
coverage/
55

66
.DS_Store
77

@@ -13,4 +13,5 @@ roo-cline-*.vsix
1313
/local-prompts
1414

1515
# Test environment
16-
.test_env
16+
.test_env
17+
.vscode-test/

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Roo Cline Changelog
22

3+
## [3.1.1]
4+
5+
- Visual fixes to chat input and settings for the light+ themes
6+
7+
## [3.1.0]
8+
9+
- You can now customize the role definition and instructions for each chat mode (Code, Architect, and Ask), either through the new Prompts tab in the top menu or mode-specific .clinerules-mode files. Prompt Enhancements have also been revamped: the "Enhance Prompt" button now works with any provider and API configuration, giving you the ability to craft messages with fully customizable prompts for even better results.
10+
- Add a button to copy markdown out of the chat
11+
12+
## [3.0.3]
13+
14+
- Update required vscode engine to ^1.84.0 to match cline
15+
16+
## [3.0.2]
17+
18+
- A couple more tiny tweaks to the button alignment in the chat input
19+
20+
## [3.0.1]
21+
22+
- Fix the reddit link and a small visual glitch in the chat input
23+
24+
## [3.0.0]
25+
26+
- This release adds chat modes! Now you can ask Roo Cline questions about system architecture or the codebase without immediately jumping into writing code. You can even assign different API configuration profiles to each mode if you prefer to use different models for thinking vs coding. Would love feedback in the new Roo Cline Reddit! https://www.reddit.com/r/roocline
27+
28+
## [2.2.46]
29+
30+
- Only parse @-mentions in user input (not in files)
31+
332
## [2.2.45]
433

534
- Save different API configurations to quickly switch between providers and settings (thanks @samhvw8!)

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,47 @@
1-
# Roo-Cline
1+
# Roo Cline
22

33
A fork of Cline, an autonomous coding agent, with some additional experimental features. It’s been mainly writing itself recently, with a light touch of human guidance here and there.
44

5+
## New in 3.1: Chat Mode Prompt Customization & Prompt Enhancements
6+
7+
Hot off the heels of **v3.0** introducing Code, Architect, and Ask chat modes, one of the most requested features has arrived: **customizable prompts for each mode**! 🎉
8+
9+
You can now tailor the **role definition** and **custom instructions** for every chat mode to perfectly fit your workflow. Want to adjust Architect mode to focus more on system scalability? Or tweak Ask mode for deeper research queries? Done. Plus, you can define these via **mode-specific `.clinerules-[mode]` files**. You’ll find all of this in the new **Prompts** tab in the top menu.
10+
11+
The second big feature in this release is a complete revamp of **prompt enhancements**. This feature helps you craft messages to get even better results from Cline. Here’s what’s new:
12+
- Works with **any provider** and API configuration, not just OpenRouter.
13+
- Fully customizable prompts to match your unique needs.
14+
- Same simple workflow: just hit the ✨ **Enhance Prompt** button in the chat input to try it out.
15+
16+
Whether you’re using GPT-4, other APIs, or switching configurations, this gives you total control over how your prompts are optimized.
17+
18+
As always, we’d love to hear your thoughts and ideas! What features do you want to see in **v3.2**? Drop by https://www.reddit.com/r/roocline and join the discussion - we're building Roo Cline together. 🚀
19+
20+
## New in 3.0 - Chat Modes!
21+
22+
You can now choose between different prompts for Roo Cline to better suit your workflow. Here’s what’s available:
23+
24+
- **Code:** (existing behavior): The default mode where Cline helps you write code and execute tasks.
25+
26+
- **Architect:** "You are Cline, a software architecture expert..." Ideal for thinking through high-level technical design and system architecture. Can’t write code or run commands.
27+
28+
- **Ask:** "You are Cline, a knowledgeable technical assistant..." Perfect for asking questions about the codebase or digging into concepts. Also can’t write code or run commands.
29+
30+
**Switching Modes:**
31+
It’s super simple! There’s a dropdown in the bottom left of the chat input to switch modes. Right next to it, you’ll find a way to switch between the API configuration profiles associated with the current mode (configured on the settings screen).
32+
33+
**Why Add This?**
34+
- It keeps Cline from being overly eager to jump into solving problems when you just want to think or ask questions.
35+
- Each mode remembers the API configuration you last used with it. For example, you can use more thoughtful models like OpenAI o1 for Architect and Ask, while sticking with Sonnet or DeepSeek for coding tasks.
36+
- It builds on research suggesting better results when separating "thinking" from "coding," explained well in this very thoughtful [article](https://aider.chat/2024/09/26/architect.html) from aider.
37+
38+
Right now, switching modes is a manual process. In the future, we’d love to give Cline the ability to suggest mode switches based on context. For now, we’d really appreciate your feedback on this feature.
39+
40+
Give it a try and let us know what you think in the reddit: https://www.reddit.com/r/roocline 🚀
41+
542
## Experimental Features
643

44+
- Different chat modes for coding, architecting code, and asking questions about the codebase
745
- Drag and drop images into chats
846
- Delete messages from chats
947
- @-mention Git commits to include their context in the chat
@@ -12,6 +50,7 @@ A fork of Cline, an autonomous coding agent, with some additional experimental f
1250
- Sound effects for feedback
1351
- Option to use browsers of different sizes and adjust screenshot quality
1452
- Quick prompt copying from history
53+
- Copy markdown from chat messages
1554
- OpenRouter compression support
1655
- Includes current time in the system prompt
1756
- Uses a file system watcher to more reliably watch for file system changes
@@ -40,7 +79,7 @@ Here's an example of Roo-Cline autonomously creating a snake game with "Always a
4079
https://github.com/user-attachments/assets/c2bb31dc-e9b2-4d73-885d-17f1471a4987
4180

4281
## Contributing
43-
To contribute to the project, start by exploring [open issues](https://github.com/RooVetGit/Roo-Cline/issues) or checking our [feature request board](https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop). We'd also love to have you join our [Discord](https://discord.gg/cline) to share ideas and connect with other contributors.
82+
To contribute to the project, start by exploring [open issues](https://github.com/RooVetGit/Roo-Cline/issues) or checking our [feature request board](https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop). We'd also love to have you join the [Roo Cline Reddit](https://www.reddit.com/r/roocline/) and the [Cline Discord](https://discord.gg/cline) to share ideas and connect with other contributors.
4483

4584
<details>
4685
<summary>Local Setup</summary>

0 commit comments

Comments
 (0)