import { jsx as _jsx } from "react/jsx-runtime";
import { Wand2 } from "lucide-react";
export const createAgentCommand = {
    id: "createAgent",
    label: "Start Agent",
    icon: _jsx(Wand2, { strokeWidth: 1, className: "text-highlight-100" }),
    execute: async (context) => {
        const edit = context.editContext;
        try {
            edit.setShowAgentsPanel?.(true);
            const { profileName, profileId, contextFactory, initialPrompt, additionalData, } = context.data || {};
            const metadata = {
                profile: profileName,
                additionalData: {
                    ...(additionalData || {}),
                    profileName,
                    profileId,
                    contextFactory,
                    initialPrompt,
                },
            };
            window.dispatchEvent(new CustomEvent("editor:addNewAgent", { detail: { metadata } }));
        }
        catch (e) {
            console.error("Failed to start agent", e);
        }
    },
    disabled: () => false,
};
//# sourceMappingURL=agentCommands.js.map