package com.yaoai.agent.dto;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class AgentRunCommand {

    private String goal;
    private String runIntent = "auto";
    private Boolean forceRegenerate = false;
    private List<String> selectedSteps = new ArrayList<>();
    private ContextOptions contextOptions = new ContextOptions();
    private String idempotencyKey;

    public boolean shouldForceRegenerate() {
        return Boolean.TRUE.equals(forceRegenerate);
    }

    @Data
    public static class ContextOptions {
        private Boolean useScriptAsset = true;
        private Boolean useExistingOutline = true;
        private Boolean useExistingEpisodes = true;
        private Boolean useExistingAssets = true;
        private Boolean useExistingStoryboards = true;

        public boolean useScriptAsset() {
            return !Boolean.FALSE.equals(useScriptAsset);
        }

        public boolean useExistingOutline() {
            return !Boolean.FALSE.equals(useExistingOutline);
        }

        public boolean useExistingEpisodes() {
            return !Boolean.FALSE.equals(useExistingEpisodes);
        }

        public boolean useExistingAssets() {
            return !Boolean.FALSE.equals(useExistingAssets);
        }

        public boolean useExistingStoryboards() {
            return !Boolean.FALSE.equals(useExistingStoryboards);
        }
    }
}
