import { useEffect } from "react";
export function useAgentSessionCommandBindings(input) {
    const { bindCommands, loadAgent, handleSubmit, sendQuickMessage, handleStop, cancelActiveInlineDialog, handleClaimBrowser, handleReleaseBrowser, } = input;
    useEffect(() => {
        const commands = {
            reload: loadAgent,
            submitPrompt: async (input) => {
                await handleSubmit(input.resolveComposerPlaceholders ? undefined : input.text);
            },
            sendQuickMessage: async (text) => {
                await sendQuickMessage(text);
            },
            stopRun: handleStop,
            cancelInlineDialog: cancelActiveInlineDialog,
            claimBrowser: handleClaimBrowser,
            releaseBrowser: handleReleaseBrowser,
        };
        bindCommands(commands);
    }, [
        bindCommands,
        cancelActiveInlineDialog,
        handleClaimBrowser,
        handleReleaseBrowser,
        handleStop,
        handleSubmit,
        loadAgent,
        sendQuickMessage,
    ]);
}
//# sourceMappingURL=useAgentSessionCommandBindings.js.map