import { TextSelection } from 'prosemirror-state';
import { pluginKey } from "./plugin.js";
export const runGpt = (state, dispatch) => {
    const { selection: sel } = state;
    const meta = { action: 'show', from: sel.from, to: sel.to };
    const tr = state.tr.setMeta(pluginKey, meta);
    dispatch?.(tr.setSelection(TextSelection.create(tr.doc, sel.to)));
    return true;
};
//# sourceMappingURL=commands.js.map
