@jasondark/proompt
Version:
CLI tool for running AI prompts with structure and repeatability
23 lines • 847 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupCompletion = void 0;
const omelette_1 = __importDefault(require("omelette"));
const commands_1 = require("@/commands");
/**
* Set up shell completion for proompt commands
*/
const setupCompletion = () => {
const complete = (0, omelette_1.default)('proompt <command>');
const commandModules = (0, commands_1.getCommandModules)();
const commandNames = commandModules.map((module) => module.config.name);
complete.on('command', ({ reply }) => {
reply(commandNames);
});
complete.init();
return complete;
};
exports.setupCompletion = setupCompletion;
//# sourceMappingURL=shell.js.map