Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion src/main/wrapper/CxConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@ export enum CxConstants {
STATE_CONFIRMED = "confirmed",
CMD_LEARN_MORE = "learn-more",
IDE_SCANS_KEY = " scan.config.plugins.ideScans",
AI_GUIDED_REMEDIATION_KEY = " scan.config.plugins.aiGuidedRemediation"
AI_GUIDED_REMEDIATION_KEY = " scan.config.plugins.aiGuidedRemediation",
AI_MCP_SERVER_KEY = "scan.config.plugins.aiMcpServer"

}
10 changes: 10 additions & 0 deletions src/main/wrapper/CxWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,16 @@ export class CxWrapper {
return output.has(CxConstants.AI_GUIDED_REMEDIATION_KEY) && output.get(CxConstants.AI_GUIDED_REMEDIATION_KEY).toLowerCase() === " true";
}


async aiMcpServerEnabled(): Promise<boolean> {
const commands: string[] = [CxConstants.CMD_UTILS, CxConstants.SUB_CMD_TENANT];
commands.push(...this.initializeCommands(false));
const exec = new ExecutionService();
const output = await exec.executeMapTenantOutputCommands(this.config.pathToExecutable, commands);
return output.has(CxConstants.AI_MCP_SERVER_KEY) &&
output.get(CxConstants.AI_MCP_SERVER_KEY).toLowerCase() === "true";
}

async kicsChat(apikey: string, file: string, line: number, severity: string, vulnerability: string, input: string, conversationId?: string, model?: string): Promise<CxCommandOutput> {
const commands: string[] = [
CxConstants.CMD_CHAT,
Expand Down