ai-project-manage-cli 3.0.12 → 3.0.14
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/index.js +24 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -306,7 +306,6 @@ function runConnect(opts) {
|
|
|
306
306
|
});
|
|
307
307
|
IN_PROGRESS = true;
|
|
308
308
|
}
|
|
309
|
-
data2 = {};
|
|
310
309
|
if (event.type === "assistant") {
|
|
311
310
|
const output = event.message.content[0].text;
|
|
312
311
|
console.log(`[Output]`, output);
|
|
@@ -319,6 +318,7 @@ function runConnect(opts) {
|
|
|
319
318
|
data2.content = "";
|
|
320
319
|
}
|
|
321
320
|
data2.content += output;
|
|
321
|
+
continue;
|
|
322
322
|
}
|
|
323
323
|
if (event.type === "thinking") {
|
|
324
324
|
const thinking = event.text;
|
|
@@ -332,21 +332,27 @@ function runConnect(opts) {
|
|
|
332
332
|
data2.content = "";
|
|
333
333
|
}
|
|
334
334
|
data2.content += thinking;
|
|
335
|
+
continue;
|
|
335
336
|
}
|
|
336
|
-
if (event.type === "tool_call"
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
337
|
+
if (event.type === "tool_call") {
|
|
338
|
+
if (event.status === "completed" || event.status === "error") {
|
|
339
|
+
console.log(`[ToolCall(${event.call_id}) Result]`);
|
|
340
|
+
console.log(JSON.stringify(event.args));
|
|
341
|
+
console.log(JSON.stringify(event.result, null, 2));
|
|
342
|
+
console.log("---------------\u8C03\u7528\u5B8C\u6210-----------------");
|
|
343
|
+
if (data2.type && data2.type !== "tool_call") {
|
|
344
|
+
events.push(data2);
|
|
345
|
+
data2 = {};
|
|
346
|
+
}
|
|
347
|
+
data2.type = "tool_call";
|
|
348
|
+
data2.call_id = event.call_id;
|
|
349
|
+
data2.args = event.args;
|
|
350
|
+
data2.result = event.result;
|
|
351
|
+
data2.status = event.status;
|
|
342
352
|
events.push(data2);
|
|
343
353
|
data2 = {};
|
|
354
|
+
continue;
|
|
344
355
|
}
|
|
345
|
-
data2.type = "tool_call";
|
|
346
|
-
data2.call_id = event.call_id;
|
|
347
|
-
data2.args = event.args;
|
|
348
|
-
data2.result = event.result;
|
|
349
|
-
data2.status = event.status;
|
|
350
356
|
}
|
|
351
357
|
if (event.type === "task") {
|
|
352
358
|
console.log(`[Task:${event.status}]`);
|
|
@@ -360,6 +366,9 @@ function runConnect(opts) {
|
|
|
360
366
|
data2.type = "task";
|
|
361
367
|
data2.status = event.status;
|
|
362
368
|
data2.text = event.text;
|
|
369
|
+
events.push(data2);
|
|
370
|
+
data2 = {};
|
|
371
|
+
continue;
|
|
363
372
|
}
|
|
364
373
|
if (event.type === "request") {
|
|
365
374
|
console.log(JSON.stringify(event, null, 2));
|
|
@@ -368,7 +377,10 @@ function runConnect(opts) {
|
|
|
368
377
|
data2 = {};
|
|
369
378
|
}
|
|
370
379
|
data2 = event;
|
|
380
|
+
continue;
|
|
371
381
|
}
|
|
382
|
+
console.log("\u672A\u77E5\u4E8B\u4EF6:", JSON.stringify(event, null, 2));
|
|
383
|
+
continue;
|
|
372
384
|
}
|
|
373
385
|
if (data2.type) {
|
|
374
386
|
events.push(data2);
|