import { TaskManager } from "graphai";
import { MulmoPresentationStyleMethods } from "../methods/index.js";
import { fileCacheAgentFilter } from "../utils/filters.js";
import { settings2GraphAIConfig } from "../utils/utils.js";
const createGraphOption = (concurrency, cacheNodeIds, settings) => ({
    agentFilters: [
        {
            name: "fileCacheAgentFilter",
            agent: fileCacheAgentFilter,
            nodeIds: cacheNodeIds,
        },
    ],
    taskManager: new TaskManager(concurrency),
    config: settings2GraphAIConfig(settings, process.env),
});
const IMAGE_CACHE_NODE_IDS = ["imageGenerator", "movieGenerator", "htmlImageAgent", "soundEffectGenerator", "lipSyncGenerator", "AudioTrimmer"];
const AUDIO_CACHE_NODE_IDS = ["tts"];
export const imageGraphOption = async (context, settings) => createGraphOption(MulmoPresentationStyleMethods.getImageConcurrency(context.presentationStyle), IMAGE_CACHE_NODE_IDS, settings);
export const audioGraphOption = async (context, settings) => createGraphOption(MulmoPresentationStyleMethods.getAudioConcurrency(context.presentationStyle), AUDIO_CACHE_NODE_IDS, settings);
