import { showGptWidget } from "../actions.js";
import { runGpt } from "../commands.js";
import { gptHotKeys } from "../constants.js";
import { gptWidgetPlugin } from "../plugin.js";
export const gptActionName = 'addGptWidget';
export const gptExtension = (builder, options) => {
    builder.addAction(gptActionName, showGptWidget);
    builder.addPlugin(({ serializer, markupParser }) => {
        return gptWidgetPlugin({
            ...options,
            serializer,
            parser: markupParser,
        });
    });
    builder.addKeymap(() => ({
        [gptHotKeys.openGptKey]: runGpt,
    }), builder.Priority.VeryLow);
};
//# sourceMappingURL=gptExtension.js.map
