Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/core/config/importExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@ export const importSettings = async ({ providerSettingsManager, contextProxy }:
}

await providerSettingsManager.import(newProviderProfiles)

await contextProxy.setValues(globalSettings)

// Roo uses providerSettingsManager to manage api configs, but Cline uses ContextProxy, and to due to some legacy
// code from it, we need to set the the provider setttings here as well.
// For the future we should remove the provider from the proxy and keep providerSettingsManager as source of truth for apiConfig.
const firstApiConfig = Object.values(providerProfiles.apiConfigs)[0]
if (firstApiConfig) {
contextProxy.setProviderSettings(firstApiConfig)
}

contextProxy.setValue("currentApiConfigName", providerProfiles.currentApiConfigName)
contextProxy.setValue("listApiConfigMeta", await providerSettingsManager.listConfig())

Expand Down
10 changes: 9 additions & 1 deletion webview-ui/src/components/welcome/WelcomeView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useState } from "react"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { useExtensionState } from "@src/context/ExtensionStateContext"
import { validateApiConfiguration } from "@src/utils/validate"
import { vscode } from "@src/utils/vscode"
Expand Down Expand Up @@ -113,6 +113,14 @@ const WelcomeView = () => {
</TabContent>
<div className="sticky bottom-0 bg-vscode-sideBar-background p-5">
<div className="flex flex-col gap-1">
<div className="flex justify-end">
<VSCodeLink
href="#"
onClick={() => vscode.postMessage({ type: "importSettings" })}
className="text-sm">
{t("welcome:importSettings")}
</VSCodeLink>
</div>
<VSCodeButton onClick={handleSubmit} appearance="primary">
{t("welcome:start")}
</VSCodeButton>
Expand Down
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/ca/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Permetre",
"deny": "Denegar"
},
"or": "o"
"or": "o",
"importSettings": "Importar configuració"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/de/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Erlauben",
"deny": "Ablehnen"
},
"or": "oder"
"or": "oder",
"importSettings": "Einstellungen importieren"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/en/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Allow",
"deny": "Deny"
},
"or": "or"
"or": "or",
"importSettings": "Import Settings"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/es/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Permitir",
"deny": "Denegar"
},
"or": "o"
"or": "o",
"importSettings": "Importar configuración"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/fr/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Autoriser",
"deny": "Refuser"
},
"or": "ou"
"or": "ou",
"importSettings": "Importer les paramètres"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/hi/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "अनुमति दें",
"deny": "अस्वीकार करें"
},
"or": "या"
"or": "या",
"importSettings": "सेटिंग्स आयात करें"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/it/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Consenti",
"deny": "Nega"
},
"or": "o"
"or": "o",
"importSettings": "Importa impostazioni"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/pl/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Zezwól",
"deny": "Odmów"
},
"or": "lub"
"or": "lub",
"importSettings": "Importuj ustawienia"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/pt-BR/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Permitir",
"deny": "Negar"
},
"or": "ou"
"or": "ou",
"importSettings": "Importar configurações"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/vi/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "Cho phép",
"deny": "Từ chối"
},
"or": "hoặc"
"or": "hoặc",
"importSettings": "Nhập cài đặt"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/zh-CN/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "允许",
"deny": "拒绝"
},
"or": "或"
"or": "或",
"importSettings": "导入设置"
}
3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/zh-TW/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"allow": "允許",
"deny": "拒絕"
},
"or": "或是"
"or": "或是",
"importSettings": "匯入設定"
}
Loading