Skip to content

Commit 1366ba0

Browse files
authored
Preserve model settings when selecting a specific OpenRouter provider (#3915)
1 parent 2cfb966 commit 1366ba0

File tree

11 files changed

+407
-14
lines changed

11 files changed

+407
-14
lines changed

.changeset/twelve-pigs-reply.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Preserve model settings when selecting a specific OpenRouter provider

src/extension.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,19 @@ export async function activate(context: vscode.ExtensionContext) {
145145
const socketPath = process.env.ROO_CODE_IPC_SOCKET_PATH
146146
const enableLogging = typeof socketPath === "string"
147147

148-
// Watch the core files and automatically reload the extension host
149-
const enableCoreAutoReload = process.env?.NODE_ENV === "development"
150-
if (enableCoreAutoReload) {
151-
console.log(`♻️♻️♻️ Core auto-reloading is ENABLED!`)
148+
// Watch the core files and automatically reload the extension host.
149+
if (process.env.NODE_ENV === "development") {
150+
console.log(`♻️♻️♻️ Core auto-reloading is ENABLED! Watching for changes in ${context.extensionPath}/**/*.ts`)
151+
152152
const watcher = vscode.workspace.createFileSystemWatcher(
153-
new vscode.RelativePattern(context.extensionPath, "src/**/*.ts"),
153+
new vscode.RelativePattern(context.extensionPath, "**/*.ts"),
154154
)
155+
155156
watcher.onDidChange((uri) => {
156157
console.log(`♻️ File changed: ${uri.fsPath}. Reloading host…`)
157158
vscode.commands.executeCommand("workbench.action.reloadWindow")
158159
})
160+
159161
context.subscriptions.push(watcher)
160162
}
161163

webview-ui/eslint.config.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ export default [
55
...reactConfig,
66
{
77
rules: {
8-
"@typescript-eslint/no-unused-vars": "off",
8+
"@typescript-eslint/no-unused-vars": [
9+
"error",
10+
{
11+
args: "all",
12+
ignoreRestSiblings: true,
13+
varsIgnorePattern: "^_",
14+
argsIgnorePattern: "^_",
15+
caughtErrorsIgnorePattern: "^_",
16+
},
17+
],
918
"@typescript-eslint/no-explicit-any": "off",
1019
"react/prop-types": "off",
1120
"react/display-name": "off",

webview-ui/src/components/common/__tests__/CodeBlock.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jest.mock("lucide-react", () => {
3333
return new Proxy(
3434
{},
3535
{
36-
get: function (obj, prop) {
36+
get: function (_obj, prop) {
3737
// Return a component factory for any icon that's requested
3838
if (prop === "__esModule") {
3939
return true

webview-ui/src/components/prompts/__tests__/PromptsView.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jest.mock("lucide-react", () => {
1717
return new Proxy(
1818
{},
1919
{
20-
get: function (obj, prop) {
20+
get: function (_obj, prop) {
2121
// Return a component factory for any icon that's requested
2222
if (prop === "__esModule") {
2323
return true

webview-ui/src/components/settings/CodeIndexSettings.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
} from "@/components/ui/alert-dialog"
1818

1919
import { vscode } from "@/utils/vscode"
20-
import { ExtensionStateContextType } from "@/context/ExtensionStateContext"
2120
import { CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "../../../../src/schemas"
2221
import { EmbedderProvider } from "../../../../src/shared/embeddingModels"
2322
import { z } from "zod"

webview-ui/src/components/settings/__tests__/SettingsView.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jest.mock("lucide-react", () => {
1515
return new Proxy(
1616
{},
1717
{
18-
get: function (obj, prop) {
18+
get: function (_obj, prop) {
1919
// Return a component factory for any icon that's requested
2020
if (prop === "__esModule") {
2121
return true

0 commit comments

Comments
 (0)