@2501-ai/cli
Version:
[](https://www.npmjs.com/package/@2501-ai/cli) [](https://www.2501.ai/research/full-humaneval-benchmark) [); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.configCommand = void 0;
const axios_1 = __importDefault(require("axios"));
const terminal_kit_1 = require("terminal-kit");
const logger_1 = __importDefault(require("../utils/logger"));
const configCommand = () => __awaiter(void 0, void 0, void 0, function* () {
const logger = new logger_1.default();
try {
logger.start('Fetching configurations...');
const response = yield axios_1.default.get('/configurations');
logger.stop('Configurations fetched successfully.');
logger.outro('Configurations :');
terminal_kit_1.terminal.table([
['Key', 'Description'],
...response.data.map((c) => [
c.key,
c.description,
]),
], {
contentHasMarkup: true,
borderChars: 'lightRounded',
borderAttr: { color: 'blue' },
textAttr: { bgColor: 'default' },
firstRowTextAttr: { bgColor: 'blue' },
width: 80,
fit: true,
});
}
catch (error) {
logger.stop('Failed to fetch configurations.', 1);
throw error;
}
});
exports.configCommand = configCommand;