kimiflare 0.96.0 → 0.96.1
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 -12
- package/dist/index.js.map +1 -1
- package/dist/sdk/index.js +2 -1
- package/dist/sdk/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7974,7 +7974,8 @@ var init_plan_options = __esm({
|
|
|
7974
7974
|
"Present a list of plan options to the user and let them pick one.",
|
|
7975
7975
|
"Use this when you have multiple viable approaches and want the user to choose",
|
|
7976
7976
|
"which plan to pursue. Each option needs a short label and the full plan text.",
|
|
7977
|
-
"After the user selects an option,
|
|
7977
|
+
"After the user selects an option, they choose an execution mode and the",
|
|
7978
|
+
"session starts fresh seeded with the chosen plan."
|
|
7978
7979
|
].join(" "),
|
|
7979
7980
|
parameters: {
|
|
7980
7981
|
type: "object",
|
|
@@ -32432,6 +32433,7 @@ ${wcagWarnings.join("\n")}` }
|
|
|
32432
32433
|
const sessionStartRecallRef = useRef7(null);
|
|
32433
32434
|
const kimiMdStaleNudgedRef = useRef7(false);
|
|
32434
32435
|
const sessionPlanRef = useRef7(null);
|
|
32436
|
+
const planCompletePlanRef = useRef7(null);
|
|
32435
32437
|
const sessionMgr = useSessionManager({
|
|
32436
32438
|
cfg,
|
|
32437
32439
|
mode,
|
|
@@ -33495,8 +33497,10 @@ ${wcagWarnings.join("\n")}` }
|
|
|
33495
33497
|
const handlePlanCompletePick = useCallback10(
|
|
33496
33498
|
(picked) => {
|
|
33497
33499
|
setShowPlanCompletePicker(false);
|
|
33500
|
+
const boundPlan = planCompletePlanRef.current;
|
|
33501
|
+
planCompletePlanRef.current = null;
|
|
33498
33502
|
if (!picked || picked === "continue") return;
|
|
33499
|
-
const plan = resolvePlanForFresh({
|
|
33503
|
+
const plan = boundPlan ?? resolvePlanForFresh({
|
|
33500
33504
|
mode: "plan",
|
|
33501
33505
|
messages: messagesRef.current,
|
|
33502
33506
|
sessionPlan: sessionPlanRef.current,
|
|
@@ -34351,7 +34355,10 @@ ${conflicts.join("\n")}` }
|
|
|
34351
34355
|
void memoryManagerRef.current.rememberPlan(plan, process.cwd(), sessionIdRef.current).catch(() => {
|
|
34352
34356
|
});
|
|
34353
34357
|
}
|
|
34354
|
-
|
|
34358
|
+
if (!planOptionsRef.current) {
|
|
34359
|
+
planCompletePlanRef.current = plan;
|
|
34360
|
+
setShowPlanCompletePicker(true);
|
|
34361
|
+
}
|
|
34355
34362
|
}
|
|
34356
34363
|
}
|
|
34357
34364
|
if (planOptionsRef.current) {
|
|
@@ -34508,22 +34515,21 @@ ${conflicts.join("\n")}` }
|
|
|
34508
34515
|
setPlanOptions(null);
|
|
34509
34516
|
planOptionsRef.current = null;
|
|
34510
34517
|
if (option) {
|
|
34511
|
-
|
|
34512
|
-
|
|
34518
|
+
sessionPlanRef.current = option.plan;
|
|
34519
|
+
if (cfg?.memoryEnabled && memoryManagerRef.current && sessionIdRef.current) {
|
|
34520
|
+
void memoryManagerRef.current.rememberPlan(option.plan, process.cwd(), sessionIdRef.current).catch(() => {
|
|
34521
|
+
});
|
|
34522
|
+
}
|
|
34523
|
+
planCompletePlanRef.current = option.plan;
|
|
34524
|
+
setShowPlanCompletePicker(true);
|
|
34513
34525
|
setEvents((e) => [
|
|
34514
34526
|
...e,
|
|
34515
34527
|
{
|
|
34516
34528
|
kind: "info",
|
|
34517
34529
|
key: mkKey(),
|
|
34518
|
-
text:
|
|
34530
|
+
text: `Selected plan "${option.label}" \u2014 choose how to execute.`
|
|
34519
34531
|
}
|
|
34520
34532
|
]);
|
|
34521
|
-
if (!clipResult.success) {
|
|
34522
|
-
setEvents((e) => [
|
|
34523
|
-
...e,
|
|
34524
|
-
{ kind: "info", key: mkKey(), text: "--- Plan ---\n" + option.plan }
|
|
34525
|
-
]);
|
|
34526
|
-
}
|
|
34527
34533
|
}
|
|
34528
34534
|
}
|
|
34529
34535
|
}
|