Skip to content

Commit 56d874f

Browse files
authored
Merge pull request #369 from samhvw8/fix/roo-cline-select-api-config
fix api config profile
2 parents e0e2d2d + 760c4c3 commit 56d874f

File tree

9 files changed

+222
-145
lines changed

9 files changed

+222
-145
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -961,10 +961,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
961961
await this.configManager.SaveConfig(message.text, message.apiConfiguration);
962962
let listApiConfig = await this.configManager.ListConfig();
963963

964-
// Update listApiConfigMeta first to ensure UI has latest data
965-
await this.updateGlobalState("listApiConfigMeta", listApiConfig);
966-
967964
await Promise.all([
965+
this.updateGlobalState("listApiConfigMeta", listApiConfig),
968966
this.updateApiConfiguration(message.apiConfiguration),
969967
this.updateGlobalState("currentApiConfigName", message.text),
970968
])
@@ -1006,12 +1004,9 @@ export class ClineProvider implements vscode.WebviewViewProvider {
10061004
try {
10071005
const apiConfig = await this.configManager.LoadConfig(message.text);
10081006
const listApiConfig = await this.configManager.ListConfig();
1009-
const config = listApiConfig?.find(c => c.name === message.text);
10101007

1011-
// Update listApiConfigMeta first to ensure UI has latest data
1012-
await this.updateGlobalState("listApiConfigMeta", listApiConfig);
1013-
10141008
await Promise.all([
1009+
this.updateGlobalState("listApiConfigMeta", listApiConfig),
10151010
this.updateGlobalState("currentApiConfigName", message.text),
10161011
this.updateApiConfiguration(apiConfig),
10171012
])

webview-ui/config-overrides.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports.jest = function(config) {
1515

1616
// Configure transform ignore patterns for ES modules
1717
config.transformIgnorePatterns = [
18-
'/node_modules/(?!(rehype-highlight|react-remark|unist-util-visit|unist-util-find-after|vfile|unified|bail|is-plain-obj|trough|vfile-message|unist-util-stringify-position|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|character-entities|markdown-table|zwitch|longest-streak|escape-string-regexp|unist-util-is|hast-util-to-text|@vscode/webview-ui-toolkit|@microsoft/fast-react-wrapper|@microsoft/fast-element|@microsoft/fast-foundation|@microsoft/fast-web-utilities|exenv-es6)/)'
18+
'/node_modules/(?!(rehype-highlight|react-remark|unist-util-visit|unist-util-find-after|vfile|unified|bail|is-plain-obj|trough|vfile-message|unist-util-stringify-position|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|character-entities|markdown-table|zwitch|longest-streak|escape-string-regexp|unist-util-is|hast-util-to-text|@vscode/webview-ui-toolkit|@microsoft/fast-react-wrapper|@microsoft/fast-element|@microsoft/fast-foundation|@microsoft/fast-web-utilities|exenv-es6|vscrui)/)'
1919
];
2020

2121
return config;

webview-ui/package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"shell-quote": "^1.8.2",
2727
"styled-components": "^6.1.13",
2828
"typescript": "^4.9.5",
29+
"vscrui": "^0.2.0",
2930
"web-vitals": "^2.1.4"
3031
},
3132
"scripts": {

0 commit comments

Comments
 (0)