@gobi-ai/cli 0.6.6 → 0.6.8
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/commands/brain.js
CHANGED
|
@@ -220,10 +220,18 @@ export function registerBrainCommand(program) {
|
|
|
220
220
|
.description("Edit a published brain update. You must be the author.")
|
|
221
221
|
.option("--title <title>", "New title for the update")
|
|
222
222
|
.option("--content <content>", "New content for the update (markdown supported)")
|
|
223
|
+
.option("--vault-slug <vaultSlug>", "Vault slug for attachment uploads (overrides .gobi/settings.yaml)")
|
|
224
|
+
.option("--auto-attachments", "Upload wiki-linked [[files]] to webdrive before editing")
|
|
223
225
|
.action(async (updateId, opts) => {
|
|
224
226
|
if (!opts.title && !opts.content) {
|
|
225
227
|
throw new Error("Provide at least --title or --content to update.");
|
|
226
228
|
}
|
|
229
|
+
if (opts.autoAttachments && opts.content) {
|
|
230
|
+
const vaultSlug = resolveVaultSlug(opts);
|
|
231
|
+
const token = await getValidToken();
|
|
232
|
+
const links = extractWikiLinks(opts.content);
|
|
233
|
+
await uploadAttachments(vaultSlug, links, token, { addToSyncfiles: true });
|
|
234
|
+
}
|
|
227
235
|
const body = {};
|
|
228
236
|
if (opts.title != null)
|
|
229
237
|
body.title = opts.title;
|
package/dist/commands/space.js
CHANGED
|
@@ -176,6 +176,8 @@ export function registerSpaceCommand(program) {
|
|
|
176
176
|
.description("Edit a thread. You must be the author.")
|
|
177
177
|
.option("--title <title>", "New title for the thread")
|
|
178
178
|
.option("--content <content>", "New content for the thread (markdown supported)")
|
|
179
|
+
.option("--auto-attachments", "Upload wiki-linked [[files]] to webdrive before editing")
|
|
180
|
+
.option("--vault-slug <vaultSlug>", "Vault slug for attachment uploads (overrides .gobi/settings.yaml)")
|
|
179
181
|
.action(async (threadId, opts) => {
|
|
180
182
|
if (!opts.title && !opts.content) {
|
|
181
183
|
throw new Error("Provide at least --title or --content to update.");
|
|
@@ -184,8 +186,16 @@ export function registerSpaceCommand(program) {
|
|
|
184
186
|
const body = {};
|
|
185
187
|
if (opts.title != null)
|
|
186
188
|
body.title = opts.title;
|
|
187
|
-
if (opts.content != null)
|
|
188
|
-
|
|
189
|
+
if (opts.content != null) {
|
|
190
|
+
const content = readContent(opts.content);
|
|
191
|
+
if (opts.autoAttachments) {
|
|
192
|
+
const vaultSlug = resolveVaultSlug(opts);
|
|
193
|
+
const token = await getValidToken();
|
|
194
|
+
const links = extractWikiLinks(content);
|
|
195
|
+
await uploadAttachments(vaultSlug, links, token, { addToSyncfiles: true });
|
|
196
|
+
}
|
|
197
|
+
body.content = content;
|
|
198
|
+
}
|
|
189
199
|
const resp = (await apiPatch(`/spaces/${spaceSlug}/threads/${threadId}`, body));
|
|
190
200
|
const thread = unwrapResp(resp);
|
|
191
201
|
if (isJsonMode(space)) {
|
|
@@ -228,9 +238,18 @@ export function registerSpaceCommand(program) {
|
|
|
228
238
|
.command("edit-reply <replyId>")
|
|
229
239
|
.description("Edit a reply. You must be the author.")
|
|
230
240
|
.requiredOption("--content <content>", "New content for the reply (markdown supported)")
|
|
241
|
+
.option("--auto-attachments", "Upload wiki-linked [[files]] to webdrive before editing")
|
|
242
|
+
.option("--vault-slug <vaultSlug>", "Vault slug for attachment uploads (overrides .gobi/settings.yaml)")
|
|
231
243
|
.action(async (replyId, opts) => {
|
|
232
244
|
const spaceSlug = resolveSpaceSlug(space);
|
|
233
|
-
const
|
|
245
|
+
const content = readContent(opts.content);
|
|
246
|
+
if (opts.autoAttachments) {
|
|
247
|
+
const vaultSlug = resolveVaultSlug(opts);
|
|
248
|
+
const token = await getValidToken();
|
|
249
|
+
const links = extractWikiLinks(content);
|
|
250
|
+
await uploadAttachments(vaultSlug, links, token, { addToSyncfiles: true });
|
|
251
|
+
}
|
|
252
|
+
const resp = (await apiPatch(`/spaces/${spaceSlug}/replies/${replyId}`, { content }));
|
|
234
253
|
const msg = unwrapResp(resp);
|
|
235
254
|
if (isJsonMode(space)) {
|
|
236
255
|
jsonOut(msg);
|
package/package.json
CHANGED
package/skills/gobi/SKILL.md
CHANGED
|
@@ -10,12 +10,12 @@ description: >-
|
|
|
10
10
|
allowed-tools: Bash(gobi:*)
|
|
11
11
|
metadata:
|
|
12
12
|
author: gobi-ai
|
|
13
|
-
version: "0.6.
|
|
13
|
+
version: "0.6.8"
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# gobi-cli
|
|
17
17
|
|
|
18
|
-
A CLI client for the Gobi collaborative knowledge platform (v0.6.
|
|
18
|
+
A CLI client for the Gobi collaborative knowledge platform (v0.6.8).
|
|
19
19
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
@@ -109,9 +109,11 @@ Usage: gobi brain edit-update [options] <updateId>
|
|
|
109
109
|
Edit a published brain update. You must be the author.
|
|
110
110
|
|
|
111
111
|
Options:
|
|
112
|
-
--title <title>
|
|
113
|
-
--content <content>
|
|
114
|
-
-
|
|
112
|
+
--title <title> New title for the update
|
|
113
|
+
--content <content> New content for the update (markdown supported)
|
|
114
|
+
--vault-slug <vaultSlug> Vault slug for attachment uploads (overrides .gobi/settings.yaml)
|
|
115
|
+
--auto-attachments Upload wiki-linked [[files]] to webdrive before editing
|
|
116
|
+
-h, --help display help for command
|
|
115
117
|
```
|
|
116
118
|
|
|
117
119
|
## delete-update
|
|
@@ -94,9 +94,11 @@ Usage: gobi space edit-thread [options] <threadId>
|
|
|
94
94
|
Edit a thread. You must be the author.
|
|
95
95
|
|
|
96
96
|
Options:
|
|
97
|
-
--title <title>
|
|
98
|
-
--content <content>
|
|
99
|
-
-
|
|
97
|
+
--title <title> New title for the thread
|
|
98
|
+
--content <content> New content for the thread (markdown supported)
|
|
99
|
+
--auto-attachments Upload wiki-linked [[files]] to webdrive before editing
|
|
100
|
+
--vault-slug <vaultSlug> Vault slug for attachment uploads (overrides .gobi/settings.yaml)
|
|
101
|
+
-h, --help display help for command
|
|
100
102
|
```
|
|
101
103
|
|
|
102
104
|
## delete-thread
|
|
@@ -130,8 +132,10 @@ Usage: gobi space edit-reply [options] <replyId>
|
|
|
130
132
|
Edit a reply. You must be the author.
|
|
131
133
|
|
|
132
134
|
Options:
|
|
133
|
-
--content <content>
|
|
134
|
-
-
|
|
135
|
+
--content <content> New content for the reply (markdown supported)
|
|
136
|
+
--auto-attachments Upload wiki-linked [[files]] to webdrive before editing
|
|
137
|
+
--vault-slug <vaultSlug> Vault slug for attachment uploads (overrides .gobi/settings.yaml)
|
|
138
|
+
-h, --help display help for command
|
|
135
139
|
```
|
|
136
140
|
|
|
137
141
|
## delete-reply
|