@getpochi/cli 0.5.47 → 0.5.49
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/cli.js +7 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -368449,7 +368449,7 @@ var {
|
|
|
368449
368449
|
// package.json
|
|
368450
368450
|
var package_default = {
|
|
368451
368451
|
name: "@getpochi/cli",
|
|
368452
|
-
version: "0.5.
|
|
368452
|
+
version: "0.5.49",
|
|
368453
368453
|
type: "module",
|
|
368454
368454
|
bin: {
|
|
368455
368455
|
pochi: "src/cli.ts"
|
|
@@ -409317,7 +409317,7 @@ class OutputRenderer {
|
|
|
409317
409317
|
} else {
|
|
409318
409318
|
const { text: text20, stop: stop3, error: error46 } = renderToolPart(part);
|
|
409319
409319
|
this.spinner.prefixText = text20;
|
|
409320
|
-
if (part.state === "output-available" || part.state === "output-error") {
|
|
409320
|
+
if ((isUserInputToolPart(part) || isAutoApproveTool(part)) && part.state === "input-available" || part.state === "output-available" || part.state === "output-error") {
|
|
409321
409321
|
if (error46) {
|
|
409322
409322
|
this.spinner.fail(source_default.dim(JSON.stringify(error46)));
|
|
409323
409323
|
} else {
|
|
@@ -409714,14 +409714,18 @@ function toTaskStatus(message, finishReason) {
|
|
|
409714
409714
|
}
|
|
409715
409715
|
if (!finishReason)
|
|
409716
409716
|
return "failed";
|
|
409717
|
+
let hasToolCall = false;
|
|
409717
409718
|
for (const part of message.parts.slice(lastStepStart + 1)) {
|
|
409718
409719
|
if (part.type === "tool-askFollowupQuestion" || part.type === "tool-attemptCompletion") {
|
|
409719
409720
|
return "completed";
|
|
409720
409721
|
}
|
|
409721
409722
|
if (isToolUIPart(part)) {
|
|
409722
|
-
|
|
409723
|
+
hasToolCall = true;
|
|
409723
409724
|
}
|
|
409724
409725
|
}
|
|
409726
|
+
if (hasToolCall) {
|
|
409727
|
+
return "pending-tool";
|
|
409728
|
+
}
|
|
409725
409729
|
if (finishReason !== "error") {
|
|
409726
409730
|
return "pending-input";
|
|
409727
409731
|
}
|