satoridb 1.2.3 → 1.2.4
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/cli.js +19 -0
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -193,6 +193,25 @@ const commands = {
|
|
|
193
193
|
console.log(r.data);
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
+
set_mindspace: {
|
|
197
|
+
desc: "set_mindspace <config> [mindspace_id]",
|
|
198
|
+
async run([config, mindspace_id]) {
|
|
199
|
+
requireConn();
|
|
200
|
+
if (!config) throw new Error("Usage: set_mindspace <config> [mindspace_id]");
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
const payload = { config };
|
|
204
|
+
if (mindspace_id) payload.mindspace_id = mindspace_id;
|
|
205
|
+
else if (session.mindspace) payload.mindspace_id = session.mindspace;
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
const res = await satori.setMindspace(payload);
|
|
209
|
+
if (payload.mindspace_id) session.mindspace = payload.mindspace_id;
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
console.log(`🧠 Mindspace configured: ${payload.mindspace_id ?? res.data}`);
|
|
213
|
+
}
|
|
214
|
+
},
|
|
196
215
|
};
|
|
197
216
|
|
|
198
217
|
// -------------------------------
|