Skip to content

Commit

Permalink
Merge branch 'main' into feature/support-critical-severity
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagobcx authored Aug 28, 2024
2 parents b92c0a1 + ffe3ed7 commit 1bf4e16
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 1bf4e16

Please sign in to comment.