@todoforai/cli 0.1.34 → 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.
- package/dist/todoforai-cli.js +14 -5
- package/package.json +1 -1
package/dist/todoforai-cli.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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, {
|
|
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
|