Skip to content

Commit e33dc67

Browse files
authored
Merge branch 'main' into refactor/extract-focus-logic
2 parents 394bc1b + 2075f26 commit e33dc67

File tree

395 files changed

+17108
-9177
lines changed

Some content is hidden

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

395 files changed

+17108
-9177
lines changed

.changeset/odd-ligers-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": minor
3+
---
4+
5+
Add Reasoning Effort setting for OpenAI Compatible provider

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
}
1616
],
1717
"@typescript-eslint/semi": "off",
18+
"no-unused-vars": "off",
19+
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
1820
"eqeqeq": "warn",
1921
"no-throw-literal": "warn",
2022
"semi": "off"

.roo/rules-translate/001-general-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 1. SUPPORTED LANGUAGES AND LOCATION
22

3-
- Localize all strings into the following locale files: ca, de, en, es, fr, hi, it, ja, ko, pl, pt-BR, tr, vi, zh-CN, zh-TW
3+
- Localize all strings into the following locale files: ca, de, en, es, fr, hi, it, ja, ko, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
44
- The VSCode extension has two main areas that require localization:
55
- Core Extension: src/i18n/locales/ (extension backend)
66
- WebView UI: webview-ui/src/i18n/locales/ (user interface)

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Roo Code Changelog
22

3+
## [3.14.3] - 2025-04-25
4+
5+
- Add Boomerang Orchestrator as a built-in mode
6+
- Improve home screen UI
7+
- Make token count estimation more efficient to reduce gray screens
8+
- Revert change to automatically close files after edit until we figure out how to make it work well with diagnostics
9+
- Clean up settings data model
10+
- Omit reasoning params for non-reasoning models
11+
- Clearer documentation for adding settings (thanks @shariqriazz!)
12+
- Fix word wrapping in Roo message title (thanks @zhangtony239!)
13+
- Update default model id for Unbound from claude 3.5 to 3.7 (thanks @pugazhendhi-m!)
14+
15+
## [3.14.2] - 2025-04-24
16+
17+
- Enable prompt caching for Gemini (with some improvements)
18+
- Allow users to turn prompt caching on / off for Gemini 2.5 on OpenRouter
19+
- Compress terminal output with backspace characters (thanks @KJ7LNW)
20+
- Add Russian language (Спасибо @asychin)
21+
22+
## [3.14.1] - 2025-04-24
23+
24+
- Disable Gemini caching while we investigate issues reported by the community.
25+
326
## [3.14.0] - 2025-04-23
427

528
- Add prompt caching for `gemini-2.5-pro-preview-03-25` in the Gemini provider (Vertex and OpenRouter coming soon!)
@@ -8,7 +31,7 @@
831
- Make the list_files tool more efficient and smarter about excluding directories like .git/
932
- Fix file drag and drop on Windows and when using SSH tunnels (thanks @NyxJae!)
1033
- Correctly revert changes and suggest alternative tools when write_to_file fails on a missing line count
11-
- Allow interpolation of `workspace`, `mode`, `language`, `shell`, and `operatingSystem` into custom system prompt overrides (thanks @daniel-lxs!)
34+
- Allow interpolation of `workspace`, `mode`, `language`, `shell`, and `operatingSystem` into custom system prompt overrides (thanks @daniel-lxs!)
1235
- Fix interpolation bug in the “add to context” code action (thanks @elianiva!)
1336
- Preserve editor state and prevent tab unpinning during diffs (thanks @seedlord!)
1437
- Improvements to icon rendering on Linux (thanks @elianiva!)

README.md

Lines changed: 28 additions & 25 deletions
Large diffs are not rendered by default.

cline_docs/settings.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@
22

33
1. Add the setting to schema definitions:
44

5-
- Add the item to `globalSettingsSchema` in `schemas/index.ts`
6-
- Add the item to `globalSettingsRecord` in `schemas/index.ts`
5+
- Add the item to `globalSettingsSchema` in `src/schemas/index.ts`
6+
- Add the item to `globalSettingsRecord` in `src/schemas/index.ts`
77
- Example: `terminalCommandDelay: z.number().optional(),`
88

99
2. Add the setting to type definitions:
1010

11-
- Add the item to `exports/types.ts`
12-
- Add the item to `exports/roo-code.d.ts`
13-
- Add the setting to `shared/ExtensionMessage.ts`
14-
- Add the setting to the WebviewMessage type in `shared/WebviewMessage.ts`
11+
- Add the item to `src/exports/types.ts`
12+
- Add the item to `src/exports/roo-code.d.ts`
13+
- Add the setting to `src/shared/ExtensionMessage.ts`
14+
- Add the setting to the WebviewMessage type in `src/shared/WebviewMessage.ts`
1515
- Example: `terminalCommandDelay?: number | undefined`
1616

1717
3. Add test coverage:
18-
- Add the setting to mockState in ClineProvider.test.ts
18+
- Add the setting to mockState in src/core/webview/**tests**/ClineProvider.test.ts
1919
- Add test cases for setting persistence and state updates
2020
- Ensure all tests pass before submitting changes
2121

2222
## For Checkbox Settings
2323

24-
1. Add the message type to WebviewMessage.ts:
24+
1. Add the message type to src/shared/WebviewMessage.ts:
2525

2626
- Add the setting name to the WebviewMessage type's type union
2727
- Example: `| "multisearchDiffEnabled"`
2828

29-
2. Add the setting to ExtensionStateContext.tsx:
29+
2. Add the setting to webview-ui/src/context/ExtensionStateContext.tsx:
3030

3131
- Add the setting to the ExtensionStateContextType interface
3232
- Add the setter function to the interface
@@ -40,7 +40,7 @@
4040
}
4141
```
4242

43-
3. Add the setting to ClineProvider.ts:
43+
3. Add the setting to src/core/webview/ClineProvider.ts:
4444

4545
- Add the setting name to the GlobalStateKey type union
4646
- Add the setting to the Promise.all array in getState
@@ -56,7 +56,7 @@
5656
break
5757
```
5858

59-
4. Add the checkbox UI to SettingsView.tsx:
59+
4. Add the checkbox UI to webview-ui/src/components/settings/SettingsView.tsx:
6060

6161
- Import the setting and its setter from ExtensionStateContext
6262
- Add the VSCodeCheckbox component with the setting's state and onChange handler
@@ -71,7 +71,7 @@
7171
</VSCodeCheckbox>
7272
```
7373

74-
5. Add the setting to handleSubmit in SettingsView.tsx:
74+
5. Add the setting to handleSubmit in webview-ui/src/components/settings/SettingsView.tsx:
7575

7676
- Add a vscode.postMessage call to send the setting's value when clicking Save
7777
- This step is critical for persistence - without it, the setting will not be saved when the user clicks Save
@@ -103,12 +103,12 @@
103103

104104
## For Select/Dropdown Settings
105105

106-
1. Add the message type to WebviewMessage.ts:
106+
1. Add the message type to src/shared/WebviewMessage.ts:
107107

108108
- Add the setting name to the WebviewMessage type's type union
109109
- Example: `| "preferredLanguage"`
110110

111-
2. Add the setting to ExtensionStateContext.tsx:
111+
2. Add the setting to webview-ui/src/context/ExtensionStateContext.tsx:
112112

113113
- Add the setting to the ExtensionStateContextType interface
114114
- Add the setter function to the interface
@@ -122,7 +122,7 @@
122122
}
123123
```
124124

125-
3. Add the setting to ClineProvider.ts:
125+
3. Add the setting to src/core/webview/ClineProvider.ts:
126126

127127
- Add the setting name to the GlobalStateKey type union
128128
- Add the setting to the Promise.all array in getState
@@ -139,7 +139,7 @@
139139
break
140140
```
141141

142-
4. Add the select UI to SettingsView.tsx:
142+
4. Add the select UI to webview-ui/src/components/settings/SettingsView.tsx:
143143

144144
- Import the setting and its setter from ExtensionStateContext
145145
- Add the select element with appropriate styling to match VSCode's theme
@@ -164,7 +164,7 @@
164164
</select>
165165
```
166166

167-
5. Add the setting to handleSubmit in SettingsView.tsx:
167+
5. Add the setting to handleSubmit in webview-ui/src/components/settings/SettingsView.tsx:
168168
- Add a vscode.postMessage call to send the setting's value when clicking Done
169169
- Example:
170170
```typescript
@@ -191,21 +191,21 @@ To add a new configuration item to the system, the following changes are necessa
191191

192192
2. **Schema Definition**
193193

194-
- Add the item to globalSettingsSchema in schemas/index.ts
195-
- Add the item to globalSettingsRecord in schemas/index.ts
194+
- Add the item to globalSettingsSchema in src/schemas/index.ts
195+
- Add the item to globalSettingsRecord in src/schemas/index.ts
196196

197197
3. **Type Definitions**
198198

199-
- Add the item to exports/types.ts
200-
- Add the item to exports/roo-code.d.ts
201-
- Add the item to shared/ExtensionMessage.ts
202-
- Add the item to shared/WebviewMessage.ts
199+
- Add the item to src/exports/types.ts
200+
- Add the item to src/exports/roo-code.d.ts
201+
- Add the item to src/shared/ExtensionMessage.ts
202+
- Add the item to src/shared/WebviewMessage.ts
203203

204204
4. **UI Component**
205205

206206
- Create or update a component in webview-ui/src/components/settings/
207207
- Add appropriate slider/input controls with min/max/step values
208-
- Ensure the props are passed correctly to the component in SettingsView.tsx
208+
- Ensure the props are passed correctly to the component in webview-ui/src/components/settings/SettingsView.tsx
209209
- Update the component's props interface to include the new settings
210210

211211
5. **Translations**
@@ -218,14 +218,14 @@ To add a new configuration item to the system, the following changes are necessa
218218
6. **State Management**
219219

220220
- Add the item to the destructuring in SettingsView.tsx
221-
- Add the item to the handleSubmit function in SettingsView.tsx
222-
- Add the item to getStateToPostToWebview in ClineProvider.ts
223-
- Add the item to getState in ClineProvider.ts with appropriate default values
224-
- Add the item to the initialization in resolveWebviewView in ClineProvider.ts
221+
- Add the item to the handleSubmit function in webview-ui/src/components/settings/SettingsView.tsx
222+
- Add the item to getStateToPostToWebview in src/core/webview/ClineProvider.ts
223+
- Add the item to getState in src/core/webview/ClineProvider.ts with appropriate default values
224+
- Add the item to the initialization in resolveWebviewView in src/core/webview/ClineProvider.ts
225225

226226
7. **Message Handling**
227227

228-
- Add a case for the item in webviewMessageHandler.ts
228+
- Add a case for the item in src/core/webview/webviewMessageHandler.ts
229229

230230
8. **Implementation-Specific Logic**
231231

@@ -310,11 +310,11 @@ To add a new configuration item to the system, the following changes are necessa
310310
1. **Complete Chain of Persistence**:
311311

312312
- Verify that the setting is added to all required locations:
313-
- globalSettingsSchema and globalSettingsRecord in schemas/index.ts
314-
- Initial state in ExtensionStateContextProvider
315-
- getState method in ClineProvider.ts
316-
- getStateToPostToWebview method in ClineProvider.ts
317-
- resolveWebviewView method in ClineProvider.ts (if feature-specific)
313+
- globalSettingsSchema and globalSettingsRecord in src/schemas/index.ts
314+
- Initial state in ExtensionStateContextProvider
315+
- getState method in src/core/webview/ClineProvider.ts
316+
- getStateToPostToWebview method in src/core/webview/ClineProvider.ts
317+
- resolveWebviewView method in src/core/webview/ClineProvider.ts (if feature-specific)
318318
- A break in any part of this chain can prevent persistence
319319

320320
2. **Default Values Consistency**:
@@ -324,12 +324,12 @@ To add a new configuration item to the system, the following changes are necessa
324324

325325
3. **Message Handling**:
326326

327-
- Confirm the webviewMessageHandler.ts has a case for the setting
327+
- Confirm the src/core/webview/webviewMessageHandler.ts has a case for the setting
328328
- Verify the message type matches what's sent from the UI
329329

330330
4. **UI Integration**:
331331

332-
- Check that the setting is included in the handleSubmit function in SettingsView.tsx
332+
- Check that the setting is included in the handleSubmit function in webview-ui/src/components/settings/SettingsView.tsx
333333
- Ensure the UI component correctly updates the state
334334

335335
5. **Type Definitions**:
@@ -354,7 +354,7 @@ Settings persistence requires a complete chain of state management across multip
354354
- Example:
355355

356356
```typescript
357-
// In schemas/index.ts
357+
// In src/schemas/index.ts
358358
export const globalSettingsSchema = z.object({
359359
// Existing settings...
360360
commandRiskLevel: z.enum(["readOnly", "reversibleChanges", "complexChanges"]).optional(),
@@ -389,12 +389,12 @@ Settings persistence requires a complete chain of state management across multip
389389

390390
3. **Message Handler (State Saving)**:
391391

392-
- Must use correct message type in `webviewMessageHandler.ts`
392+
- Must use correct message type in `src/core/webview/webviewMessageHandler.ts`
393393
- Must use `updateGlobalState` with properly typed values
394394
- Must call `postStateToWebview` after updates
395395
- Example:
396396
```typescript
397-
// In webviewMessageHandler.ts
397+
// In src/core/webview/webviewMessageHandler.ts
398398
case "commandRiskLevel":
399399
await updateGlobalState(
400400
"commandRiskLevel",
@@ -413,7 +413,7 @@ Settings persistence requires a complete chain of state management across multip
413413
- Example:
414414

415415
```typescript
416-
// In ClineProvider.ts getStateToPostToWebview
416+
// In src/core/webview/ClineProvider.ts getStateToPostToWebview
417417
const {
418418
// Other state properties...
419419
commandRiskLevel,

e2e/src/suite/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ export async function run() {
2424
apiProvider: "openrouter" as const,
2525
openRouterApiKey: process.env.OPENROUTER_API_KEY!,
2626
openRouterModelId: "google/gemini-2.0-flash-001",
27-
openRouterModelInfo: {
28-
maxTokens: 8192,
29-
contextWindow: 1000000,
30-
supportsImages: true,
31-
supportsPromptCache: false,
32-
inputPrice: 0.1,
33-
outputPrice: 0.4,
34-
thinking: false,
35-
},
3627
})
3728

3829
await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus")

e2e/src/suite/subtasks.test.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@ suite("Roo Code Subtasks", () => {
1717
}
1818
})
1919

20-
await api.setConfiguration({
21-
mode: "ask",
22-
alwaysAllowModeSwitch: true,
23-
alwaysAllowSubtasks: true,
24-
autoApprovalEnabled: true,
25-
enableCheckpoints: false,
26-
})
27-
2820
const childPrompt = "You are a calculator. Respond only with numbers. What is the square root of 9?"
2921

3022
// Start a parent task that will create a subtask.
3123
const parentTaskId = await api.startNewTask({
24+
configuration: {
25+
mode: "ask",
26+
alwaysAllowModeSwitch: true,
27+
alwaysAllowSubtasks: true,
28+
autoApprovalEnabled: true,
29+
enableCheckpoints: false,
30+
},
3231
text:
3332
"You are the parent task. " +
3433
`Create a subtask by using the new_task tool with the message '${childPrompt}'.` +

e2e/src/suite/utils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as vscode from "vscode"
2-
31
import type { RooCodeAPI } from "../../../src/exports/roo-code"
42

53
type WaitForOptions = {

esbuild.js

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,30 @@ const copyWasmFiles = {
2929
name: "copy-wasm-files",
3030
setup(build) {
3131
build.onEnd(() => {
32-
// tree sitter
33-
const sourceDir = path.join(__dirname, "node_modules", "web-tree-sitter")
34-
const targetDir = path.join(__dirname, "dist")
32+
const nodeModulesDir = path.join(__dirname, "node_modules")
33+
const distDir = path.join(__dirname, "dist")
3534

36-
// Copy tree-sitter.wasm
37-
fs.copyFileSync(path.join(sourceDir, "tree-sitter.wasm"), path.join(targetDir, "tree-sitter.wasm"))
35+
// tiktoken
36+
fs.copyFileSync(
37+
path.join(nodeModulesDir, "tiktoken", "tiktoken_bg.wasm"),
38+
path.join(distDir, "tiktoken_bg.wasm"),
39+
)
3840

3941
// Copy language-specific WASM files
4042
const languageWasmDir = path.join(__dirname, "node_modules", "tree-sitter-wasms", "out")
41-
const languages = [
42-
"typescript",
43-
"tsx",
44-
"python",
45-
"rust",
46-
"javascript",
47-
"go",
48-
"cpp",
49-
"c",
50-
"c_sharp",
51-
"ruby",
52-
"java",
53-
"php",
54-
"swift",
55-
"kotlin",
56-
]
57-
58-
languages.forEach((lang) => {
59-
const filename = `tree-sitter-${lang}.wasm`
60-
fs.copyFileSync(path.join(languageWasmDir, filename), path.join(targetDir, filename))
61-
})
43+
44+
// Dynamically read all WASM files from the directory instead of using a hardcoded list
45+
if (fs.existsSync(languageWasmDir)) {
46+
const wasmFiles = fs.readdirSync(languageWasmDir).filter((file) => file.endsWith(".wasm"))
47+
48+
console.log(`Copying ${wasmFiles.length} tree-sitter WASM files to dist directory`)
49+
50+
wasmFiles.forEach((filename) => {
51+
fs.copyFileSync(path.join(languageWasmDir, filename), path.join(distDir, filename))
52+
})
53+
} else {
54+
console.warn(`Tree-sitter WASM directory not found: ${languageWasmDir}`)
55+
}
6256
})
6357
},
6458
}

0 commit comments

Comments
 (0)