@autohq/cli 0.1.226 → 0.1.227
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/agent-bridge.js +1 -1
- package/dist/index.js +29 -15
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23322,7 +23322,7 @@ Object.assign(lookup, {
|
|
|
23322
23322
|
// package.json
|
|
23323
23323
|
var package_default = {
|
|
23324
23324
|
name: "@autohq/cli",
|
|
23325
|
-
version: "0.1.
|
|
23325
|
+
version: "0.1.227",
|
|
23326
23326
|
license: "SEE LICENSE IN README.md",
|
|
23327
23327
|
publishConfig: {
|
|
23328
23328
|
access: "public"
|
package/dist/index.js
CHANGED
|
@@ -22238,7 +22238,7 @@ var init_package = __esm({
|
|
|
22238
22238
|
"package.json"() {
|
|
22239
22239
|
package_default = {
|
|
22240
22240
|
name: "@autohq/cli",
|
|
22241
|
-
version: "0.1.
|
|
22241
|
+
version: "0.1.227",
|
|
22242
22242
|
license: "SEE LICENSE IN README.md",
|
|
22243
22243
|
publishConfig: {
|
|
22244
22244
|
access: "public"
|
|
@@ -26371,7 +26371,8 @@ function ConversationView({
|
|
|
26371
26371
|
word: pickActivityWord(sessionId)
|
|
26372
26372
|
});
|
|
26373
26373
|
const sawLiveTurnActivity = useRef(false);
|
|
26374
|
-
const pendingLocalCommand = useRef(
|
|
26374
|
+
const pendingLocalCommand = useRef(null);
|
|
26375
|
+
const lastSessionUpdatedAt = useRef(null);
|
|
26375
26376
|
const awaitingReplyRef = useRef(true);
|
|
26376
26377
|
const updateAwaitingReply = useCallback((value) => {
|
|
26377
26378
|
awaitingReplyRef.current = value;
|
|
@@ -26397,10 +26398,13 @@ function ConversationView({
|
|
|
26397
26398
|
status: session.status,
|
|
26398
26399
|
runInput: session.input,
|
|
26399
26400
|
hasConversationActivity: hasConversationActivity.current,
|
|
26400
|
-
|
|
26401
|
+
pendingLocalCommand: pendingLocalCommand.current,
|
|
26402
|
+
sessionUpdatedAt: session.updatedAt
|
|
26401
26403
|
})) {
|
|
26404
|
+
pendingLocalCommand.current = null;
|
|
26402
26405
|
updateAwaitingReply(false);
|
|
26403
26406
|
}
|
|
26407
|
+
lastSessionUpdatedAt.current = session.updatedAt;
|
|
26404
26408
|
},
|
|
26405
26409
|
[updateAwaitingReply]
|
|
26406
26410
|
);
|
|
@@ -26413,12 +26417,12 @@ function ConversationView({
|
|
|
26413
26417
|
return;
|
|
26414
26418
|
}
|
|
26415
26419
|
if (event.kind === "question") {
|
|
26416
|
-
pendingLocalCommand.current =
|
|
26420
|
+
pendingLocalCommand.current = null;
|
|
26417
26421
|
updateAwaitingReply(false);
|
|
26418
26422
|
return;
|
|
26419
26423
|
}
|
|
26420
26424
|
if (isTurnLifecycleStartEntry(event)) {
|
|
26421
|
-
pendingLocalCommand.current =
|
|
26425
|
+
pendingLocalCommand.current = null;
|
|
26422
26426
|
if (!awaitingReplyRef.current) {
|
|
26423
26427
|
turnRef.current = {
|
|
26424
26428
|
startedAt: Date.now(),
|
|
@@ -26435,7 +26439,7 @@ function ConversationView({
|
|
|
26435
26439
|
if (!turnEnd) {
|
|
26436
26440
|
return;
|
|
26437
26441
|
}
|
|
26438
|
-
pendingLocalCommand.current =
|
|
26442
|
+
pendingLocalCommand.current = null;
|
|
26439
26443
|
updateAwaitingReply(false);
|
|
26440
26444
|
if (turnEnd === "completed" && sawLiveTurnActivity.current) {
|
|
26441
26445
|
setCompletedTurn({
|
|
@@ -26588,7 +26592,9 @@ function ConversationView({
|
|
|
26588
26592
|
setInput("");
|
|
26589
26593
|
hasConversationActivity.current = true;
|
|
26590
26594
|
updateAwaitingReply(true);
|
|
26591
|
-
pendingLocalCommand.current =
|
|
26595
|
+
pendingLocalCommand.current = {
|
|
26596
|
+
previousSessionUpdatedAt: lastSessionUpdatedAt.current
|
|
26597
|
+
};
|
|
26592
26598
|
turnRef.current = { startedAt: Date.now(), word: pickActivityWord(text) };
|
|
26593
26599
|
sawLiveTurnActivity.current = false;
|
|
26594
26600
|
setTurnTokenChars(0);
|
|
@@ -26636,7 +26642,7 @@ function ConversationView({
|
|
|
26636
26642
|
return next;
|
|
26637
26643
|
});
|
|
26638
26644
|
}
|
|
26639
|
-
pendingLocalCommand.current =
|
|
26645
|
+
pendingLocalCommand.current = null;
|
|
26640
26646
|
updateAwaitingReply(false);
|
|
26641
26647
|
throw err;
|
|
26642
26648
|
} finally {
|
|
@@ -26661,7 +26667,9 @@ function ConversationView({
|
|
|
26661
26667
|
}
|
|
26662
26668
|
hasConversationActivity.current = true;
|
|
26663
26669
|
updateAwaitingReply(true);
|
|
26664
|
-
pendingLocalCommand.current =
|
|
26670
|
+
pendingLocalCommand.current = {
|
|
26671
|
+
previousSessionUpdatedAt: lastSessionUpdatedAt.current
|
|
26672
|
+
};
|
|
26665
26673
|
turnRef.current = {
|
|
26666
26674
|
startedAt: Date.now(),
|
|
26667
26675
|
word: pickActivityWord(toolCallId)
|
|
@@ -26683,7 +26691,7 @@ function ConversationView({
|
|
|
26683
26691
|
next.delete(toolCallId);
|
|
26684
26692
|
return next;
|
|
26685
26693
|
});
|
|
26686
|
-
pendingLocalCommand.current =
|
|
26694
|
+
pendingLocalCommand.current = null;
|
|
26687
26695
|
updateAwaitingReply(false);
|
|
26688
26696
|
throw err;
|
|
26689
26697
|
} finally {
|
|
@@ -26836,7 +26844,7 @@ function ConversationView({
|
|
|
26836
26844
|
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "esc to go back" }),
|
|
26837
26845
|
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "\xB7" }),
|
|
26838
26846
|
/* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
|
|
26839
|
-
|
|
26847
|
+
footerSessionStatusLabel({ status, awaitingReply }),
|
|
26840
26848
|
debugActive ? " \xB7 debug" : ""
|
|
26841
26849
|
] })
|
|
26842
26850
|
] })
|
|
@@ -26933,14 +26941,20 @@ function elapsedSeconds(startedAt) {
|
|
|
26933
26941
|
return Math.max(0, Math.floor((Date.now() - startedAt) / 1e3));
|
|
26934
26942
|
}
|
|
26935
26943
|
function shouldAcceptUserInputFromRunSnapshot(input) {
|
|
26936
|
-
if (input.hasPendingLocalCommand) {
|
|
26937
|
-
return false;
|
|
26938
|
-
}
|
|
26939
26944
|
if (input.status === "awaiting") {
|
|
26940
|
-
return
|
|
26945
|
+
return input.pendingLocalCommand === null || input.pendingLocalCommand.previousSessionUpdatedAt === null || input.sessionUpdatedAt !== input.pendingLocalCommand.previousSessionUpdatedAt;
|
|
26946
|
+
}
|
|
26947
|
+
if (input.pendingLocalCommand !== null) {
|
|
26948
|
+
return false;
|
|
26941
26949
|
}
|
|
26942
26950
|
return input.status === "running" && !input.hasConversationActivity && isInteractiveRunInputWithoutMessage(input.runInput);
|
|
26943
26951
|
}
|
|
26952
|
+
function footerSessionStatusLabel(input) {
|
|
26953
|
+
if (input.status === "running" && input.awaitingReply) {
|
|
26954
|
+
return "working";
|
|
26955
|
+
}
|
|
26956
|
+
return input.status;
|
|
26957
|
+
}
|
|
26944
26958
|
function isInteractiveRunInputWithoutMessage(input) {
|
|
26945
26959
|
return typeof input === "object" && input !== null && !Array.isArray(input) && "interactive" in input && input.interactive === true && !("message" in input && typeof input.message === "string" && input.message.trim().length > 0);
|
|
26946
26960
|
}
|