Skip to content

Commit

Permalink
Do not prompt for AI API TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Jan 13, 2025
1 parent c7e8d43 commit 9af1abc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta`

## [5.15.2] 2025-01-13

- Add AI security considerations in documentation
- Do not prompt for AI API TOKEN

## [5.15.1] 2025-01-12

Expand Down
4 changes: 2 additions & 2 deletions src/common/utils/mermaidUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ export function removeMermaidLinks(messageBody: string) {
}

async function completeWithAiDescription(flowMarkdownDoc: string, flowXml: string): Promise<string> {
if (await AiProvider.isAiAvailableWithUserPrompt()) {
if (AiProvider.isAiAvailable()) {
// Invoke AI Service
const prompt = AiProvider.buildPrompt("PROMPT_DESCRIBE_FLOW", { "FLOW_XML": flowXml });
const aiResponse = await AiProvider.promptAi(prompt);
Expand All @@ -664,7 +664,7 @@ async function completeWithAiDescription(flowMarkdownDoc: string, flowXml: strin

/* jscpd:ignore-start */
async function completeWithDiffAiDescription(flowMarkdownDoc: string, flowXmlNew: string, flowXmlPrevious: string): Promise<string> {
if (await AiProvider.isAiAvailableWithUserPrompt()) {
if (AiProvider.isAiAvailable()) {
// Invoke AI Service
const prompt = AiProvider.buildPrompt("PROMPT_DESCRIBE_FLOW_DIFF", { "FLOW_XML_NEW": flowXmlNew, "FLOW_XML_PREVIOUS": flowXmlPrevious });
const aiResponse = await AiProvider.promptAi(prompt);
Expand Down

0 comments on commit 9af1abc

Please sign in to comment.