fix: change provider not update without done, update chatbox change provider from MrUbens

This commit is contained in:
sam hoang
2025-01-07 20:16:44 +07:00
committed by Matt Rubens
parent c3fa10b367
commit 3346844584
7 changed files with 121 additions and 33 deletions

View File

@@ -183,7 +183,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
onRenameConfig={(oldName: string, newName: string) => {
vscode.postMessage({
type: "renameApiConfiguration",
values: {oldName, newName},
values: { oldName, newName },
apiConfiguration
})
}}
@@ -199,6 +199,16 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
showModelOptions={true}
apiErrorMessage={apiErrorMessage}
modelIdErrorMessage={modelIdErrorMessage}
onSelectProvider={(apiProvider: any) => {
vscode.postMessage({
type: "upsertApiConfiguration",
text: currentApiConfigName,
apiConfiguration: {
...apiConfiguration,
apiProvider: apiProvider,
}
})
}}
/>
</div>