@listdoing/core 0.1.3 → 0.1.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/dist/index.js +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2611,12 +2611,17 @@ var Ldoing = class {
|
|
|
2611
2611
|
turn--;
|
|
2612
2612
|
continue;
|
|
2613
2613
|
}
|
|
2614
|
-
if (err.code === ACPErrorCodes.LLM_EMPTY_RESPONSE
|
|
2614
|
+
if (err.code === ACPErrorCodes.LLM_EMPTY_RESPONSE) {
|
|
2615
|
+
if (!retried) {
|
|
2616
|
+
this.sessionManager.addMessage(sessionId, { role: "assistant", content: "." });
|
|
2617
|
+
this.sessionManager.addMessage(sessionId, { role: "user", content: "System: \u521A\u521A\u8FD4\u56DE\u4E86\u7A7A\u5185\u5BB9\uFF0C\u8BF7\u751F\u6210\u6709\u6548\u56DE\u590D\u3002" });
|
|
2618
|
+
retried = true;
|
|
2619
|
+
turn--;
|
|
2620
|
+
continue;
|
|
2621
|
+
}
|
|
2615
2622
|
this.sessionManager.addMessage(sessionId, { role: "assistant", content: "." });
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
turn--;
|
|
2619
|
-
continue;
|
|
2623
|
+
continueLoop = false;
|
|
2624
|
+
break;
|
|
2620
2625
|
}
|
|
2621
2626
|
throw new ACPError(ACPErrorCodes.LLM_CALL_FAILED, `LLM call failed: ${err.message}`, { turn });
|
|
2622
2627
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2551,12 +2551,17 @@ var Ldoing = class {
|
|
|
2551
2551
|
turn--;
|
|
2552
2552
|
continue;
|
|
2553
2553
|
}
|
|
2554
|
-
if (err.code === ACPErrorCodes.LLM_EMPTY_RESPONSE
|
|
2554
|
+
if (err.code === ACPErrorCodes.LLM_EMPTY_RESPONSE) {
|
|
2555
|
+
if (!retried) {
|
|
2556
|
+
this.sessionManager.addMessage(sessionId, { role: "assistant", content: "." });
|
|
2557
|
+
this.sessionManager.addMessage(sessionId, { role: "user", content: "System: \u521A\u521A\u8FD4\u56DE\u4E86\u7A7A\u5185\u5BB9\uFF0C\u8BF7\u751F\u6210\u6709\u6548\u56DE\u590D\u3002" });
|
|
2558
|
+
retried = true;
|
|
2559
|
+
turn--;
|
|
2560
|
+
continue;
|
|
2561
|
+
}
|
|
2555
2562
|
this.sessionManager.addMessage(sessionId, { role: "assistant", content: "." });
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
turn--;
|
|
2559
|
-
continue;
|
|
2563
|
+
continueLoop = false;
|
|
2564
|
+
break;
|
|
2560
2565
|
}
|
|
2561
2566
|
throw new ACPError(ACPErrorCodes.LLM_CALL_FAILED, `LLM call failed: ${err.message}`, { turn });
|
|
2562
2567
|
}
|