Skip to content

Commit

Permalink
VSCode | Support AzureAI (#898)
Browse files Browse the repository at this point in the history
Co-authored-by: AlvoBen <[email protected]>
  • Loading branch information
AlvoBen and BenAlvo1 authored Aug 28, 2024
1 parent 9b2695a commit ffe3ed7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/cx/cx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ export class Cx implements CxPlatform {
const gptEngine = vscode.workspace
.getConfiguration(constants.gptCommandName)
.get(constants.gptEngineKey) as string;
if (!gptToken) {
throw new Error(messages.gptMissinApiKey);
}
const filePackageObjectList = vscode.workspace.workspaceFolders;
if (filePackageObjectList.length > 0) {
const answer = await cx.sastChat(gptToken, filePath, resultsFilePath, resultId, message, conversationId ? conversationId : "", gptEngine);
Expand All @@ -58,16 +55,13 @@ export class Cx implements CxPlatform {
}

async runGpt(message: string, filePath: string, line: number, severity: string, queryName: string) {
const cx = new CxWrapper(this.getBaseAstConfiguration());
const cx = new CxWrapper(this.getAstConfiguration());
const gptToken = vscode.workspace
.getConfiguration(constants.gptCommandName)
.get(constants.gptSettingsKey) as string;
const gptEngine = vscode.workspace
.getConfiguration(constants.gptCommandName)
.get(constants.gptEngineKey) as string;
if (!gptToken) {
throw new Error(messages.gptMissinApiKey);
}
const filePackageObjectList = vscode.workspace.workspaceFolders;
if (filePackageObjectList.length > 0) {
const answer = await cx.kicsChat(gptToken, filePath, line, severity, queryName, message, null, gptEngine);
Expand Down

0 comments on commit ffe3ed7

Please sign in to comment.