const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
const require_logger_index = require('../../../logger/index.cjs');
let ai = require("ai");
ai = require_rolldown_runtime.__toESM(ai);

//#region src/utils/AI/customQuery/index.ts
const aiDefaultOptions = { model: "gpt-4o-mini" };
/**
* CustomQuerys a content declaration file by constructing a prompt for AI models.
* The prompt includes details about the project's locales, file paths of content declarations,
* and requests for identifying issues or inconsistencies.
*/
const customQuery = async ({ messages, aiConfig }) => {
	const { text: newContent, usage } = await (0, ai.generateText)({
		...aiConfig,
		messages
	});
	require_logger_index.logger.info(`${usage?.totalTokens ?? 0} tokens used in the request`);
	return {
		fileContent: newContent,
		tokenUsed: usage?.totalTokens ?? 0
	};
};

//#endregion
exports.aiDefaultOptions = aiDefaultOptions;
exports.customQuery = customQuery;
//# sourceMappingURL=index.cjs.map