create-expert 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/cli.js CHANGED
@@ -34171,9 +34171,7 @@ var UI_CONSTANTS = {
34171
34171
  TRUNCATE_TEXT_DEFAULT: 100};
34172
34172
  var RENDER_CONSTANTS = {
34173
34173
  EXEC_OUTPUT_MAX_LINES: 4,
34174
- NEW_TODO_MAX_PREVIEW: 3,
34175
- LIST_DIR_MAX_ITEMS: 4
34176
- };
34174
+ NEW_TODO_MAX_PREVIEW: 3};
34177
34175
  var INDICATOR = {
34178
34176
  BULLET: "\u25CF",
34179
34177
  TREE: "\u2514",
@@ -35374,26 +35372,6 @@ function renderAction(action) {
35374
35372
  return renderWriteTextFile(action, color);
35375
35373
  case "editTextFile":
35376
35374
  return renderEditTextFile(action, color);
35377
- case "appendTextFile":
35378
- return renderAppendTextFile(action, color);
35379
- case "deleteFile":
35380
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "Delete", summary: shortenPath(action.path), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "Removed" }) });
35381
- case "deleteDirectory":
35382
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "Delete Dir", summary: shortenPath(action.path), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { dimColor: true, children: [
35383
- "Removed",
35384
- action.recursive ? " (recursive)" : ""
35385
- ] }) });
35386
- case "moveFile":
35387
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "Move", summary: shortenPath(action.source), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { dimColor: true, children: [
35388
- "\u2192 ",
35389
- shortenPath(action.destination, 30)
35390
- ] }) });
35391
- case "createDirectory":
35392
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "Mkdir", summary: shortenPath(action.path), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "Created" }) });
35393
- case "listDirectory":
35394
- return renderListDirectory(action, color);
35395
- case "getFileInfo":
35396
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "Info", summary: shortenPath(action.path), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "Fetched" }) });
35397
35375
  case "readPdfFile":
35398
35376
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "PDF", summary: shortenPath(action.path), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "Read" }) });
35399
35377
  case "readImageFile":
@@ -35506,27 +35484,6 @@ function renderEditTextFile(action, color) {
35506
35484
  ] }, `new-${idx}`))
35507
35485
  ] }) });
35508
35486
  }
35509
- function renderAppendTextFile(action, color) {
35510
- const { path: path5, text } = action;
35511
- const lines = text.split("\n");
35512
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "Append Text File", summary: shortenPath(path5), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", children: lines.map((line, idx) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "row", gap: 1, children: [
35513
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: "green", dimColor: true, children: "+" }),
35514
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: "white", dimColor: true, children: line })
35515
- ] }, `append-${idx}`)) }) });
35516
- }
35517
- function renderListDirectory(action, color) {
35518
- const { path: path5, items } = action;
35519
- const itemLines = items?.map((item) => `${item.type === "directory" ? "\u{1F4C1}" : "\u{1F4C4}"} ${item.name}`) ?? [];
35520
- const { visible, remaining } = summarizeOutput(itemLines, RENDER_CONSTANTS.LIST_DIR_MAX_ITEMS);
35521
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ActionRow, { indicatorColor: color, label: "List", summary: shortenPath(path5), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", children: [
35522
- visible.map((line, idx) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: truncateText(line, UI_CONSTANTS.TRUNCATE_TEXT_DEFAULT) }, `dir-${idx}`)),
35523
- remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { dimColor: true, children: [
35524
- "... +",
35525
- remaining,
35526
- " more"
35527
- ] })
35528
- ] }) });
35529
- }
35530
35487
  function renderExec(action, color) {
35531
35488
  const { command, args, cwd: cwd2, output } = action;
35532
35489
  const cwdPart = cwd2 ? ` ${shortenPath(cwd2, 40)}` : "";
@@ -36311,7 +36268,7 @@ async function startHandler(expertKey, query, options, handlerOptions) {
36311
36268
  // package.json
36312
36269
  var package_default = {
36313
36270
  name: "create-expert",
36314
- version: "0.0.28",
36271
+ version: "0.0.30",
36315
36272
  description: "Create and modify Perstack expert definitions"};
36316
36273
 
36317
36274
  // bin/cli.ts