@todoforai/cli 0.1.33 → 0.1.35

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.
@@ -44269,7 +44269,7 @@ import { parseArgs } from "util";
44269
44269
  // package.json
44270
44270
  var package_default = {
44271
44271
  name: "@todoforai/cli",
44272
- version: "0.1.33",
44272
+ version: "0.1.35",
44273
44273
  type: "module",
44274
44274
  bin: {
44275
44275
  "todoforai-cli": "bin/todoforai-cli.js",
@@ -44327,7 +44327,8 @@ Usage:
44327
44327
  tfa-cli delete <todo-id> # Permanently delete a todo
44328
44328
  tfa-cli addmessage <todo-id> "text" # Add a message to an existing todo
44329
44329
  tfa-cli show <file|-> [todo-id] # Show a file in the chat (rendered by mimetype; - reads stdin)
44330
- # [--title T] [--alias A] [--mime M] [--card <name>] [--json]
44330
+ # [--title T] [--alias A] [--mime M] [--card <name>] [--link] [--json]
44331
+ # --link = compact chip (name+size+download) instead of inline render
44331
44332
  tfa-cli show list [todo-id] # List show blocks (ref, title, mime/url, card)
44332
44333
  # [--project <id>] [--card <name>] [--json]
44333
44334
  # no todo-id + --project (or $TODOFORAI_PROJECT_ID) = every todo
@@ -44420,6 +44421,7 @@ function parseCliArgs() {
44420
44421
  alias: { type: "string" },
44421
44422
  mime: { type: "string" },
44422
44423
  card: { type: "string" },
44424
+ link: { type: "boolean", default: false },
44423
44425
  direction: { type: "string" },
44424
44426
  "business-context": { type: "string" },
44425
44427
  seed: { type: "string" },
@@ -47599,7 +47601,8 @@ Cancelled by user (Ctrl+C)
47599
47601
  for (const it of items) {
47600
47602
  const kind = it.url ? `url ${it.url}` : it.mime || "";
47601
47603
  const card = it.cardRef ? ` card=${it.cardRef}` : "";
47602
- console.log(`${it.ref} ${it.title || it.filename || ""} ${kind}${card}`);
47604
+ const link = it.display === "link" ? " link" : "";
47605
+ console.log(`${it.ref} ${it.title || it.filename || ""} ${kind}${card}${link}`);
47603
47606
  }
47604
47607
  return;
47605
47608
  }
@@ -47607,7 +47610,7 @@ Cancelled by user (Ctrl+C)
47607
47610
  const [, filePath, todoArg] = positionals;
47608
47611
  const todoId = todoArg || getEnv("TODO_ID") || cfgScope.data.last_todo_id;
47609
47612
  if (!filePath || !todoId) {
47610
- process.stderr.write(`${RED}Usage: tfa-cli show <file|-> [todo-id]${RESET}
47613
+ process.stderr.write(`${RED}Usage: tfa-cli show <file|-> [todo-id] [--title T] [--alias A] [--mime M] [--card <name>] [--link]${RESET}
47611
47614
  `);
47612
47615
  process.exit(2);
47613
47616
  }
@@ -47630,7 +47633,13 @@ Cancelled by user (Ctrl+C)
47630
47633
  blob = file;
47631
47634
  name = path3.basename(filePath);
47632
47635
  }
47633
- const res = await api.showFile(todoId, blob, name, { title: args.title, alias: args.alias, mime: args.mime, card: args.card });
47636
+ const res = await api.showFile(todoId, blob, name, {
47637
+ title: args.title,
47638
+ alias: args.alias,
47639
+ mime: args.mime,
47640
+ card: args.card,
47641
+ display: args.link ? "link" : undefined
47642
+ });
47634
47643
  if (args.json)
47635
47644
  console.log(JSON.stringify(res, null, 2));
47636
47645
  else
@@ -48101,11 +48110,7 @@ ${"\u2500".repeat(40)}
48101
48110
  }
48102
48111
  var finish = (code) => {
48103
48112
  process.exitCode = code;
48104
- const poll = setInterval(() => {
48105
- if (process.stdout.writableLength === 0)
48106
- process.exit(code);
48107
- }, 5);
48108
- poll.unref?.();
48113
+ process.stdout.end(() => process.exit(code));
48109
48114
  };
48110
48115
  main().then(() => finish(process.exitCode ?? 0)).catch((e) => {
48111
48116
  process.stderr.write(`Error: ${e.message}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoforai/cli",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "todoforai-cli": "bin/todoforai-cli.js",