@0dai-dev/cli 2.1.0 → 2.1.1
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/bin/0dai.js +14 -21
- package/package.json +1 -1
package/bin/0dai.js
CHANGED
|
@@ -7,7 +7,7 @@ const fs = require("fs");
|
|
|
7
7
|
const path = require("path");
|
|
8
8
|
const os = require("os");
|
|
9
9
|
|
|
10
|
-
const VERSION = "2.1.
|
|
10
|
+
const VERSION = "2.1.1";
|
|
11
11
|
const API_URL = process.env.ODAI_API_URL || "https://api.0dai.dev";
|
|
12
12
|
const T = process.stdout.isTTY ? "\x1b[38;2;45;212;168m" : ""; // teal
|
|
13
13
|
const R = process.stdout.isTTY ? "\x1b[0m" : ""; // reset
|
|
@@ -185,22 +185,16 @@ async function cmdInit(target) {
|
|
|
185
185
|
log(`initialized (${result.file_count || "?"} files)`);
|
|
186
186
|
console.log(" skills: /build /review /status /feedback /bugfix /delegate");
|
|
187
187
|
|
|
188
|
-
//
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
_cli_version: VERSION,
|
|
199
|
-
_files_generated: result.file_count || 0,
|
|
200
|
-
};
|
|
201
|
-
apiCall("/v1/feedback", { report: autoReport }).catch(() => {});
|
|
202
|
-
console.log(` ${D}usage data sent to improve 0dai (disable with Essential+ plan)${R}`);
|
|
203
|
-
}
|
|
188
|
+
// Send anonymous usage ping (stack + file count, no project data)
|
|
189
|
+
apiCall("/v1/feedback", { report: {
|
|
190
|
+
stack_detected: result.stack || "?", _auto: true, _plan: result.plan || "trial",
|
|
191
|
+
_cli_version: VERSION, _files_generated: result.file_count || 0,
|
|
192
|
+
}}).catch(() => {});
|
|
193
|
+
|
|
194
|
+
// Encourage feedback
|
|
195
|
+
console.log(`\n ${T}Tip:${R} Send feedback to earn +5 init/day for 7 days:`);
|
|
196
|
+
console.log(` ${D}0dai feedback log --type positive --detail "what worked"${R}`);
|
|
197
|
+
console.log(` ${D}0dai feedback push${R}`);
|
|
204
198
|
}
|
|
205
199
|
|
|
206
200
|
async function cmdSync(target) {
|
|
@@ -396,10 +390,9 @@ async function cmdFeedbackPush(target) {
|
|
|
396
390
|
for (const report of reports) {
|
|
397
391
|
log(`pushing: ${report.project || "?"} (${report.verdict || "?"})`);
|
|
398
392
|
const result = await apiCall("/v1/feedback", { report });
|
|
399
|
-
if (result.
|
|
400
|
-
log(`issue
|
|
401
|
-
|
|
402
|
-
log("received by server");
|
|
393
|
+
if (result.received) {
|
|
394
|
+
log(`received${result.issue ? `: ${result.issue}` : ""}`);
|
|
395
|
+
if (result.bonus) log(`${T}bonus:${R} ${result.bonus}`);
|
|
403
396
|
} else {
|
|
404
397
|
log(`error: ${result.error || "unknown"}`);
|
|
405
398
|
}
|