@todoforai/cli 0.1.38 → 0.1.40
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 +13 -5
- package/package.json +1 -1
package/dist/todoforai-cli.js
CHANGED
|
@@ -42837,6 +42837,9 @@ class ApiClient {
|
|
|
42837
42837
|
getTodo(todoId) {
|
|
42838
42838
|
return this.request("GET", `/api/v1/todos/${todoId}`);
|
|
42839
42839
|
}
|
|
42840
|
+
linkBlockSubTodo(todoId, messageId, blockId, subTodoId) {
|
|
42841
|
+
return this.request("POST", `/api/v1/todos/${todoId}/blocks/${blockId}/subtodo`, { messageId, subTodoId });
|
|
42842
|
+
}
|
|
42840
42843
|
updateTodoStatus(todoId, status) {
|
|
42841
42844
|
return this.request("PATCH", `/api/v1/todos/${todoId}/status`, { status });
|
|
42842
42845
|
}
|
|
@@ -43393,9 +43396,9 @@ var mimetypes_default = {
|
|
|
43393
43396
|
image: { icon: "mdi:file-image", color: "yellow", prefixRule: "image/", needsObjectUrl: true },
|
|
43394
43397
|
audio: { icon: "mdi:file-music", color: "grey", prefixRule: "audio/", needsObjectUrl: true },
|
|
43395
43398
|
video: { icon: "mdi:file-video", color: "yellow", prefixRule: "video/", needsObjectUrl: true },
|
|
43396
|
-
pdf: { icon: "
|
|
43397
|
-
document: { icon: "
|
|
43398
|
-
spreadsheet: { icon: "
|
|
43399
|
+
pdf: { icon: "vscode-icons:file-type-pdf2", color: "red", needsObjectUrl: true },
|
|
43400
|
+
document: { icon: "vscode-icons:file-type-word", color: "lightblue" },
|
|
43401
|
+
spreadsheet: { icon: "vscode-icons:file-type-excel", color: "green" },
|
|
43399
43402
|
text: { icon: "mdi:file", color: "white", prefixRule: "text/" },
|
|
43400
43403
|
archive: { icon: "mdi:folder-zip", color: "purple" },
|
|
43401
43404
|
unknown: { icon: "mdi:file", color: "grey" },
|
|
@@ -44323,7 +44326,7 @@ import { parseArgs } from "util";
|
|
|
44323
44326
|
// package.json
|
|
44324
44327
|
var package_default = {
|
|
44325
44328
|
name: "@todoforai/cli",
|
|
44326
|
-
version: "0.1.
|
|
44329
|
+
version: "0.1.40",
|
|
44327
44330
|
type: "module",
|
|
44328
44331
|
bin: {
|
|
44329
44332
|
"todoforai-cli": "bin/todoforai-cli.js",
|
|
@@ -44383,7 +44386,7 @@ Usage:
|
|
|
44383
44386
|
tfa-cli show <file|-> [todo-id] # Show a file in the chat (rendered by mimetype; - reads stdin)
|
|
44384
44387
|
# [--title T] [--alias A] [--mime M] [--card <name>] [--link] [--json]
|
|
44385
44388
|
# --link = compact chip (name+size+download) instead of inline render
|
|
44386
|
-
# The file gets a stable public url:
|
|
44389
|
+
# The file gets a stable public url: show.todofor.ai/<site-id>
|
|
44387
44390
|
# (latest; /<site-id>/<attachment-id> = frozen version). --site <id>
|
|
44388
44391
|
# pushes a new version to an existing url (from any todo).
|
|
44389
44392
|
tfa-cli show rm <site-id> # Take a shown file down (all versions)
|
|
@@ -48154,6 +48157,11 @@ Resumed: ${CYAN}${getFrontendUrl(apiUrl, todoId)}${RESET}
|
|
|
48154
48157
|
}
|
|
48155
48158
|
const actualTodoId = todo.id || crypto.randomUUID();
|
|
48156
48159
|
cfgScope.setLastTodoId(actualTodoId);
|
|
48160
|
+
const { TODOFORAI_TODO_ID: pTodo, TODOFORAI_MESSAGE_ID: pMsg, TODOFORAI_BLOCK_ID: pBlock } = process.env;
|
|
48161
|
+
if (pTodo && pMsg && pBlock && pTodo !== actualTodoId) {
|
|
48162
|
+
await api.linkBlockSubTodo(pTodo, pMsg, pBlock, actualTodoId).catch((e) => process.stderr.write(`${DIM}subtodo link failed: ${e?.message ?? e}${RESET}
|
|
48163
|
+
`));
|
|
48164
|
+
}
|
|
48157
48165
|
const frontendUrl = getFrontendUrl(apiUrl, actualTodoId);
|
|
48158
48166
|
if (args.json) {
|
|
48159
48167
|
console.log(JSON.stringify({ ...todo, frontend_url: frontendUrl }, null, 2));
|