Skip to content

Commit 9fa766c

Browse files
committed
Merge branch 'main' into cte/openrouter-reasoning-effort
2 parents c091ba1 + 6ab9aa9 commit 9fa766c

File tree

102 files changed

+3059
-685
lines changed

Some content is hidden

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

102 files changed

+3059
-685
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ body:
2424
- OpenAI
2525
- OpenAI Compatible
2626
- GCP Vertex AI
27-
- AWS Bedrock
27+
- Amazon Bedrock
2828
- Requesty
2929
- Glama
3030
- VS Code LM API

.vscodeignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ vsc-extension-quickstart.md
2020
**/.vscode-test.*
2121

2222
# Custom
23-
demo.gif
2423
.nvmrc
2524
.gitattributes
2625
.prettierignore
@@ -51,6 +50,8 @@ webview-ui/node_modules/**
5150
# Include default themes JSON files used in getTheme
5251
!src/integrations/theme/default-themes/**
5352

53+
# Ignore doc assets
54+
assets/docs/**
5455
# Include icons and images
5556
!assets/icons/**
5657
!assets/images/**

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Roo Code Changelog
22

3+
## [3.11.14] - 2025-04-11
4+
5+
- Support symbolic links in rules folders to directories and other symbolic links (thanks @taisukeoe!)
6+
- Stronger enforcement of the setting to always read full files instead of doing partial reads
7+
8+
## [3.11.13] - 2025-04-11
9+
10+
- Loads of terminal improvements: command delay, PowerShell counter, and ZSH EOL mark (thanks @KJ7LNW!)
11+
- Add file context tracking system (thanks @samhvw8 and @canvrno!)
12+
- Improved display of diff errors + easy copying for investigation
13+
- Fixes to .vscodeignore (thanks @franekp!)
14+
- Fix a zh-CN translation for model capabilities (thanks @zhangtony239!)
15+
- Rename AWS Bedrock to Amazon Bedrock (thanks @ronyblum!)
16+
- Update extension title and description (thanks @StevenTCramer!)
17+
318
## [3.11.12] - 2025-04-09
419

520
- Make Grok3 streaming work with OpenAI Compatible (thanks @amittell!)

README.md

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

assets/docs/demo.gif

Lines changed: 2 additions & 2 deletions
Loading

cline_docs/bedrock/bedrock-cache-strategy-documentation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cache Strategy Documentation
22

3-
This document provides an overview of the cache strategy implementation for AWS Bedrock in the Roo-Code project, including class relationships and sequence diagrams.
3+
This document provides an overview of the cache strategy implementation for Amazon Bedrock in the Roo-Code project, including class relationships and sequence diagrams.
44

55
## Class Relationship Diagram
66

@@ -89,7 +89,7 @@ sequenceDiagram
8989
participant Client as Client Code
9090
participant Bedrock as AwsBedrockHandler
9191
participant Strategy as MultiPointStrategy
92-
participant AWS as AWS Bedrock Service
92+
participant AWS as Amazon Bedrock Service
9393
9494
Client->>Bedrock: createMessage(systemPrompt, messages)
9595
Note over Bedrock: Generate conversationId to track cache points
@@ -143,7 +143,7 @@ sequenceDiagram
143143

144144
### Cache Strategy
145145

146-
The cache strategy system is designed to optimize the placement of cache points in AWS Bedrock API requests. Cache points allow the service to reuse previously processed parts of the prompt, reducing token usage and improving response times.
146+
The cache strategy system is designed to optimize the placement of cache points in Amazon Bedrock API requests. Cache points allow the service to reuse previously processed parts of the prompt, reducing token usage and improving response times.
147147

148148
- **MultiPointStrategy**: Upon first MR of Bedrock caching, this strategy is used for all cache point placement scenarios. It distributes cache points throughout the conversation to maximize caching efficiency, whether the model supports one or multiple cache points.
149149

@@ -180,14 +180,14 @@ The simplified approach ensures that:
180180

181181
The examples in this document reflect this optimized implementation.
182182

183-
### Integration with AWS Bedrock
183+
### Integration with Amazon Bedrock
184184

185185
The AwsBedrockHandler class integrates with the cache strategies by:
186186

187187
1. Determining if the model supports prompt caching
188188
2. Creating the appropriate strategy based on model capabilities
189189
3. Applying the strategy to format messages with optimal cache points
190-
4. Sending the formatted request to AWS Bedrock
190+
4. Sending the formatted request to Amazon Bedrock
191191
5. Processing and returning the response
192192

193193
## Usage Considerations

cline_docs/bedrock/model-identification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bedrock Model Identification
22

3-
This document explains how model information is identified and managed in the AWS Bedrock provider implementation (`bedrock.ts`). It focuses on the sequence of operations that determine the `costModelConfig` property, which is crucial for token counting, pricing, and other features.
3+
This document explains how model information is identified and managed in the Amazon Bedrock provider implementation (`bedrock.ts`). It focuses on the sequence of operations that determine the `costModelConfig` property, which is crucial for token counting, pricing, and other features.
44

55
## Model Identification Flow
66

cline_docs/settings.md

Lines changed: 202 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
## For All Settings
22

3-
1. Add the setting to ExtensionMessage.ts:
3+
1. Add the setting to schema definitions:
44

5-
- Add the setting to the ExtensionState interface
6-
- Make it required if it has a default value, optional if it can be undefined
7-
- Example: `preferredLanguage: string`
5+
- Add the item to `globalSettingsSchema` in `schemas/index.ts`
6+
- Add the item to `globalSettingsRecord` in `schemas/index.ts`
7+
- Example: `terminalCommandDelay: z.number().optional(),`
88

9-
2. Add test coverage:
9+
2. Add the setting to type definitions:
10+
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`
15+
- Example: `terminalCommandDelay?: number | undefined`
16+
17+
3. Add test coverage:
1018
- Add the setting to mockState in ClineProvider.test.ts
1119
- Add test cases for setting persistence and state updates
1220
- Ensure all tests pass before submitting changes
@@ -64,12 +72,35 @@
6472
```
6573

6674
5. Add the setting to handleSubmit in SettingsView.tsx:
67-
- Add a vscode.postMessage call to send the setting's value when clicking Done
75+
76+
- Add a vscode.postMessage call to send the setting's value when clicking Save
77+
- This step is critical for persistence - without it, the setting will not be saved when the user clicks Save
6878
- Example:
6979
```typescript
7080
vscode.postMessage({ type: "multisearchDiffEnabled", bool: multisearchDiffEnabled })
7181
```
7282

83+
6. Style Considerations:
84+
- Use the VSCodeCheckbox component from @vscode/webview-ui-toolkit/react instead of HTML input elements
85+
- Wrap each checkbox in a div element for proper spacing
86+
- Use a span with className="font-medium" for the checkbox label inside the VSCodeCheckbox component
87+
- Place the description in a separate div with className="text-vscode-descriptionForeground text-sm mt-1"
88+
- Maintain consistent spacing between configuration options
89+
- Example:
90+
```typescript
91+
<div>
92+
<VSCodeCheckbox
93+
checked={terminalPowershellCounter ?? true}
94+
onChange={(e: any) => setCachedStateField("terminalPowershellCounter", e.target.checked)}
95+
data-testid="terminal-powershell-counter-checkbox">
96+
<span className="font-medium">{t("settings:terminal.powershellCounter.label")}</span>
97+
</VSCodeCheckbox>
98+
<div className="text-vscode-descriptionForeground text-sm mt-1">
99+
{t("settings:terminal.powershellCounter.description")}
100+
</div>
101+
</div>
102+
```
103+
73104
## For Select/Dropdown Settings
74105

75106
1. Add the message type to WebviewMessage.ts:
@@ -98,6 +129,7 @@
98129
- Add the setting to the return value in getState with a default value
99130
- Add the setting to the destructured variables in getStateToPostToWebview
100131
- Add the setting to the return value in getStateToPostToWebview
132+
- This step is critical for UI display - without it, the setting will not be displayed in the UI
101133
- Add a case in setWebviewMessageListener to handle the setting's message type
102134
- Example:
103135
```typescript
@@ -146,3 +178,167 @@ These steps ensure that:
146178
- The setting's value is properly synchronized between the webview and extension
147179
- The setting has a proper UI representation in the settings view
148180
- Test coverage is maintained for the new setting
181+
182+
## Adding a New Configuration Item: Summary of Required Changes
183+
184+
To add a new configuration item to the system, the following changes are necessary:
185+
186+
1. **Feature-Specific Class** (if applicable)
187+
188+
- For settings that affect specific features (e.g., Terminal, Browser, etc.)
189+
- Add a static property to store the value
190+
- Add getter/setter methods to access and modify the value
191+
192+
2. **Schema Definition**
193+
194+
- Add the item to globalSettingsSchema in schemas/index.ts
195+
- Add the item to globalSettingsRecord in schemas/index.ts
196+
197+
3. **Type Definitions**
198+
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
203+
204+
4. **UI Component**
205+
206+
- Create or update a component in webview-ui/src/components/settings/
207+
- Add appropriate slider/input controls with min/max/step values
208+
- Ensure the props are passed correctly to the component in SettingsView.tsx
209+
- Update the component's props interface to include the new settings
210+
211+
5. **Translations**
212+
213+
- Add label and description in webview-ui/src/i18n/locales/en/settings.json
214+
- Update all other languages
215+
- If any language content is changed, synchronize all other languages with that change
216+
- Translations must be performed within "translation" mode so change modes for that purpose
217+
218+
6. **State Management**
219+
220+
- 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
225+
226+
7. **Message Handling**
227+
228+
- Add a case for the item in webviewMessageHandler.ts
229+
230+
8. **Implementation-Specific Logic**
231+
232+
- Implement any feature-specific behavior triggered by the setting
233+
- Examples:
234+
- Environment variables for terminal settings
235+
- API configuration changes for provider settings
236+
- UI behavior modifications for display settings
237+
238+
9. **Testing**
239+
240+
- Add test cases for the new settings in appropriate test files
241+
- Verify settings persistence and state updates
242+
243+
10. **Ensuring Settings Persistence Across Reload**
244+
245+
To ensure settings persist across application reload, several key components must be properly configured:
246+
247+
1. **Initial State in ExtensionStateContextProvider**:
248+
249+
- Add the setting to the initial state in the useState call
250+
- Example:
251+
```typescript
252+
const [state, setState] = useState<ExtensionState>({
253+
// existing settings...
254+
newSetting: false, // Default value for the new setting
255+
})
256+
```
257+
258+
2. **State Loading in ClineProvider**:
259+
260+
- Add the setting to the getState method to load it from storage
261+
- Example:
262+
```typescript
263+
return {
264+
// existing settings...
265+
newSetting: stateValues.newSetting ?? false,
266+
}
267+
```
268+
269+
3. **State Initialization in resolveWebviewView**:
270+
271+
- Add the setting to the initialization in resolveWebviewView
272+
- Example:
273+
```typescript
274+
this.getState().then(
275+
({
276+
// existing settings...
277+
newSetting,
278+
}) => {
279+
// Initialize the setting with its stored value or default
280+
FeatureClass.setNewSetting(newSetting ?? false)
281+
},
282+
)
283+
```
284+
285+
4. **State Transmission to Webview**:
286+
287+
- Add the setting to the getStateToPostToWebview method
288+
- Example:
289+
```typescript
290+
return {
291+
// existing settings...
292+
newSetting: newSetting ?? false,
293+
}
294+
```
295+
296+
5. **Setter Method in ExtensionStateContext**:
297+
- Add the setter method to the contextValue object
298+
- Example:
299+
```typescript
300+
const contextValue: ExtensionStateContextType = {
301+
// existing properties and methods...
302+
setNewSetting: (value) => setState((prevState) => ({ ...prevState, newSetting: value })),
303+
}
304+
```
305+
306+
11. **Debugging Settings Persistence Issues**
307+
308+
If a setting is not persisting across reload, check the following:
309+
310+
1. **Complete Chain of Persistence**:
311+
312+
- 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)
318+
- A break in any part of this chain can prevent persistence
319+
320+
2. **Default Values Consistency**:
321+
322+
- Ensure default values are consistent across all locations
323+
- Inconsistent defaults can cause unexpected behavior
324+
325+
3. **Message Handling**:
326+
327+
- Confirm the webviewMessageHandler.ts has a case for the setting
328+
- Verify the message type matches what's sent from the UI
329+
330+
4. **UI Integration**:
331+
332+
- Check that the setting is included in the handleSubmit function in SettingsView.tsx
333+
- Ensure the UI component correctly updates the state
334+
335+
5. **Type Definitions**:
336+
337+
- Verify the setting is properly typed in all relevant interfaces
338+
- Check for typos in property names across different files
339+
340+
6. **Storage Mechanism**:
341+
- For complex settings, ensure proper serialization/deserialization
342+
- Check that the setting is being correctly stored in VSCode's globalState
343+
344+
These checks help identify and resolve common issues with settings persistence.

0 commit comments

Comments
 (0)