"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.runGpt = void 0;
const prosemirror_state_1 = require("prosemirror-state");
const plugin_1 = require("./plugin.js");
const runGpt = (state, dispatch) => {
    const { selection: sel } = state;
    const meta = { action: 'show', from: sel.from, to: sel.to };
    const tr = state.tr.setMeta(plugin_1.pluginKey, meta);
    dispatch?.(tr.setSelection(prosemirror_state_1.TextSelection.create(tr.doc, sel.to)));
    return true;
};
exports.runGpt = runGpt;
//# sourceMappingURL=commands.js.map
