Merge remote-tracking branch 'origin/switch_gpt_model' into 93-plugin-support-for-easy-switching-between-gpt35-and-gpt4

This commit is contained in:
Rankin Zheng 2023-08-24 08:24:41 +08:00
commit ec5912cb45
2 changed files with 16 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import { listAllMessages } from './listMessages';
import { regActionList } from './regActionList';
import { applyAction } from './applyAction';
import { doCommand } from './doCommand';
import { updateSetting } from './updateConfig';
// According to the context menu selected by the user, add the corresponding context file
@ -82,3 +83,5 @@ messageHandler.registerHandler('askCode', askCode);
// Execute vscode command
// Response: none
messageHandler.registerHandler('doCommand', doCommand);
messageHandler.registerHandler('updateSetting', updateSetting);

View File

@ -0,0 +1,13 @@
/*
Update config
*/
import * as vscode from 'vscode';
import { regInMessage, regOutMessage } from '../util/reg_messages';
import { logger } from '../util/logger';
import { UiUtilWrapper } from '../util/uiUtil';
regInMessage({command: 'updateSetting', key1: "DevChat", key2: "OpenAI", value:"xxxx"});
export async function updateSetting(message: any, panel: vscode.WebviewPanel|vscode.WebviewView): Promise<void> {
UiUtilWrapper.updateConfiguration(message.key1, message.key2, message.value);
}