kimiflare 0.60.1 → 0.61.0
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 +18 -5
- package/dist/index.js.map +1 -1
- package/dist/sdk/index.js +10 -2
- package/dist/sdk/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3715,9 +3715,17 @@ ${sandboxResult.output}` : sandboxResult.output;
|
|
|
3715
3715
|
loopExhausted = false;
|
|
3716
3716
|
recentToolCalls.length = 0;
|
|
3717
3717
|
continue;
|
|
3718
|
-
} else {
|
|
3719
|
-
return;
|
|
3720
3718
|
}
|
|
3719
|
+
if (decision === "synthesize") {
|
|
3720
|
+
opts2.messages.push({
|
|
3721
|
+
role: "system",
|
|
3722
|
+
content: "You were stuck calling the same tools with identical arguments. Please synthesize and conclude your findings so far. Do not call any more tools."
|
|
3723
|
+
});
|
|
3724
|
+
loopExhausted = false;
|
|
3725
|
+
recentToolCalls.length = 0;
|
|
3726
|
+
continue;
|
|
3727
|
+
}
|
|
3728
|
+
return;
|
|
3721
3729
|
}
|
|
3722
3730
|
throw new AgentLoopError();
|
|
3723
3731
|
}
|
|
@@ -12299,19 +12307,20 @@ var init_permission = __esm({
|
|
|
12299
12307
|
import { Box as Box10, Text as Text11 } from "ink";
|
|
12300
12308
|
import SelectInput from "ink-select-input";
|
|
12301
12309
|
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
12302
|
-
function LimitModal({ limit, onDecide, title, description }) {
|
|
12310
|
+
function LimitModal({ limit, onDecide, title, description, items }) {
|
|
12303
12311
|
const theme = useTheme();
|
|
12304
|
-
const
|
|
12312
|
+
const defaultItems = [
|
|
12305
12313
|
{ label: "Continue", value: "continue" },
|
|
12306
12314
|
{ label: "Stop", value: "stop" }
|
|
12307
12315
|
];
|
|
12316
|
+
const selectItems = items ?? defaultItems;
|
|
12308
12317
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", borderStyle: "round", borderColor: theme.error, paddingX: 1, children: [
|
|
12309
12318
|
/* @__PURE__ */ jsx12(Text11, { color: theme.error, bold: true, children: title ?? `Tool-call limit reached (${limit})` }),
|
|
12310
12319
|
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: description ?? `This session has made ${limit} tool calls. What would you like to do?` }),
|
|
12311
12320
|
/* @__PURE__ */ jsx12(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx12(
|
|
12312
12321
|
SelectInput,
|
|
12313
12322
|
{
|
|
12314
|
-
items,
|
|
12323
|
+
items: selectItems,
|
|
12315
12324
|
onSelect: (item) => onDecide(item.value)
|
|
12316
12325
|
}
|
|
12317
12326
|
) })
|
|
@@ -20987,6 +20996,10 @@ ${lines.join("\n")}` }]);
|
|
|
20987
20996
|
limit: 50,
|
|
20988
20997
|
title: "Agent stuck in a loop",
|
|
20989
20998
|
description: "The agent kept calling the same tools with identical arguments. What would you like to do?",
|
|
20999
|
+
items: [
|
|
21000
|
+
{ label: "Continue", value: "continue" },
|
|
21001
|
+
{ label: "Synthesize", value: "synthesize" }
|
|
21002
|
+
],
|
|
20990
21003
|
onDecide: (d) => {
|
|
20991
21004
|
loopModal.resolve(d);
|
|
20992
21005
|
loopResolveRef.current = null;
|