import { SfError } from "@salesforce/core";
import { getEnvVar } from "../../config/index.js";
export class AiProviderRoot {
    token;
    getLabel() {
        throw new SfError("getLabel should be implemented on this call");
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    async promptAi(prompt, template = null) {
        throw new SfError("promptAi should be implemented on this call");
    }
    // Get user defined maximum number of calls during an sfdx-hardis command
    getAiMaxCallsNumber() {
        return parseInt(getEnvVar("AI_MAXIMUM_CALL_NUMBER") || "10000");
    }
    // Increment number of api calls performed
    incrementAiCallsNumber() {
        globalThis.aiCallsNumber = (globalThis.aiCallsNumber || 0) + 1;
    }
    // Check if max number of calls during a sfdx-hardis command has been reached
    checkMaxAiCallsNumber() {
        const maxCalls = globalThis.aiCallsNumber || 0;
        return maxCalls < this.getAiMaxCallsNumber();
    }
}
//# sourceMappingURL=aiProviderRoot.js.map