autopilot-ai 1.24.0 → 1.24.2
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 +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23361,6 +23361,9 @@ var init_help_menu = __esm({
|
|
|
23361
23361
|
});
|
|
23362
23362
|
|
|
23363
23363
|
// src/agent/queue-batch.ts
|
|
23364
|
+
function canDrainQueue(state) {
|
|
23365
|
+
return !state.busy && !state.queuePlanOpen && state.supervisorIdle && state.hasPendingWork;
|
|
23366
|
+
}
|
|
23364
23367
|
function createQueueBatch(items) {
|
|
23365
23368
|
if (items.length < 2) return null;
|
|
23366
23369
|
if (items.some((item) => isCommand(item.full))) return null;
|
|
@@ -38844,6 +38847,7 @@ function App({
|
|
|
38844
38847
|
hasAnyModal
|
|
38845
38848
|
} = modals;
|
|
38846
38849
|
const [queue2, setQueue] = useState27([]);
|
|
38850
|
+
const [queueDrainRevision, setQueueDrainRevision] = useState27(0);
|
|
38847
38851
|
const runningSubagents = useSubagentList();
|
|
38848
38852
|
const announcedSubagentsRef = useRef9(/* @__PURE__ */ new Set());
|
|
38849
38853
|
const queueRef = useRef9([]);
|
|
@@ -40257,6 +40261,7 @@ ${result2.output ?? "(output not captured)"}`,
|
|
|
40257
40261
|
const asstId = activeAsstIdRef.current;
|
|
40258
40262
|
if (asstId !== null) updateAssistant(asstId, () => ({ streaming: false }));
|
|
40259
40263
|
endTurn();
|
|
40264
|
+
setQueueDrainRevision((revision) => revision + 1);
|
|
40260
40265
|
activeAsstIdRef.current = null;
|
|
40261
40266
|
activeScopeRef.current = null;
|
|
40262
40267
|
clearPermissionResolveRef();
|
|
@@ -40648,7 +40653,12 @@ ${result2.output ?? "(output not captured)"}`,
|
|
|
40648
40653
|
[cfg, handleSlash, updateAssistant, updateTool, saveSessionSafe, updateResponseMeta, setShowPlanCompletePicker, runUserShellCommand, ensureTraceStarted]
|
|
40649
40654
|
);
|
|
40650
40655
|
useEffect11(() => {
|
|
40651
|
-
if (
|
|
40656
|
+
if (canDrainQueue({
|
|
40657
|
+
busy,
|
|
40658
|
+
queuePlanOpen: queuePlanDraft !== null,
|
|
40659
|
+
supervisorIdle: supervisorRef.current.phase === "idle",
|
|
40660
|
+
hasPendingWork: pendingPromptEditRef.current !== null || pendingSteersRef.current.length > 0 || queue2.length > 0
|
|
40661
|
+
})) {
|
|
40652
40662
|
const pendingEdit = pendingPromptEditRef.current;
|
|
40653
40663
|
if (pendingEdit) {
|
|
40654
40664
|
pendingPromptEditRef.current = null;
|
|
@@ -40674,7 +40684,7 @@ ${result2.output ?? "(output not captured)"}`,
|
|
|
40674
40684
|
});
|
|
40675
40685
|
}
|
|
40676
40686
|
}
|
|
40677
|
-
}, [busy, queue2, queuePlanDraft, processMessage]);
|
|
40687
|
+
}, [busy, queue2, queuePlanDraft, processMessage, queueDrainRevision]);
|
|
40678
40688
|
const handleQueuePlanPick = useCallback8(
|
|
40679
40689
|
(choice) => {
|
|
40680
40690
|
if (choice === "group" && queuePlanDraft) {
|