cliskill 1.0.2 → 1.0.3
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/bootstrap/cli.js
CHANGED
|
@@ -5607,40 +5607,36 @@ ${result.summary}` }]
|
|
|
5607
5607
|
break;
|
|
5608
5608
|
}
|
|
5609
5609
|
if (parser.stopReason === "max_tokens") {
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
state.messages[state.messages.length - 1] = {
|
|
5623
|
-
role: "assistant",
|
|
5624
|
-
content: textOnly.length > 0 ? textOnly : [{ type: "text", text: "[Response truncated \u2014 output token limit]" }]
|
|
5625
|
-
};
|
|
5626
|
-
state.messages.push({
|
|
5627
|
-
role: "user",
|
|
5628
|
-
content: [{
|
|
5629
|
-
type: "text",
|
|
5630
|
-
text: "Output token limit hit. Resume directly \u2014 no apology, no recap. Pick up mid-thought if that is where the cut happened. Break remaining work into smaller pieces."
|
|
5631
|
-
}]
|
|
5632
|
-
});
|
|
5633
|
-
maxOutputTokensRecoveryCount++;
|
|
5634
|
-
maxOutputTokensOverride = void 0;
|
|
5635
|
-
yield { type: "assistant_text", text: " [truncated \u2014 requesting continuation...]" };
|
|
5636
|
-
continue;
|
|
5637
|
-
}
|
|
5638
|
-
yield {
|
|
5639
|
-
type: "error",
|
|
5640
|
-
error: new Error("Output token limit reached after multiple recovery attempts. Consider splitting your request into smaller tasks.")
|
|
5610
|
+
if (maxOutputTokensRecoveryCount === 0 && maxOutputTokensOverride === void 0) {
|
|
5611
|
+
maxOutputTokensOverride = ESCALATED_MAX_TOKENS;
|
|
5612
|
+
maxOutputTokensRecoveryCount++;
|
|
5613
|
+
state.messages.pop();
|
|
5614
|
+
yield { type: "assistant_text", text: " [escalating token limit...]" };
|
|
5615
|
+
continue;
|
|
5616
|
+
}
|
|
5617
|
+
if (maxOutputTokensRecoveryCount < MAX_OUTPUT_TOKENS_RECOVERY_LIMIT) {
|
|
5618
|
+
const textOnly = parser.assistantContent.filter((b) => b.type === "text");
|
|
5619
|
+
state.messages[state.messages.length - 1] = {
|
|
5620
|
+
role: "assistant",
|
|
5621
|
+
content: textOnly.length > 0 ? textOnly : [{ type: "text", text: "[Response truncated \u2014 output token limit]" }]
|
|
5641
5622
|
};
|
|
5642
|
-
|
|
5623
|
+
state.messages.push({
|
|
5624
|
+
role: "user",
|
|
5625
|
+
content: [{
|
|
5626
|
+
type: "text",
|
|
5627
|
+
text: "Output token limit hit. Resume directly \u2014 no apology, no recap. Pick up mid-thought if that is where the cut happened. IMPORTANT: Break remaining work into smaller pieces \u2014 write files in multiple smaller writes instead of one huge write."
|
|
5628
|
+
}]
|
|
5629
|
+
});
|
|
5630
|
+
maxOutputTokensRecoveryCount++;
|
|
5631
|
+
maxOutputTokensOverride = void 0;
|
|
5632
|
+
yield { type: "assistant_text", text: " [truncated \u2014 requesting continuation...]" };
|
|
5633
|
+
continue;
|
|
5643
5634
|
}
|
|
5635
|
+
yield {
|
|
5636
|
+
type: "error",
|
|
5637
|
+
error: new Error("Output token limit reached after multiple recovery attempts. Consider splitting your request into smaller tasks.")
|
|
5638
|
+
};
|
|
5639
|
+
break;
|
|
5644
5640
|
} else {
|
|
5645
5641
|
maxOutputTokensRecoveryCount = 0;
|
|
5646
5642
|
maxOutputTokensOverride = void 0;
|
|
@@ -10034,4 +10030,4 @@ export {
|
|
|
10034
10030
|
MessageList,
|
|
10035
10031
|
runCli
|
|
10036
10032
|
};
|
|
10037
|
-
//# sourceMappingURL=chunk-
|
|
10033
|
+
//# sourceMappingURL=chunk-PBLJ6557.js.map
|