snow-ai 0.6.45 → 0.6.47
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/bundle/cli.mjs +26 -11
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -445453,11 +445453,11 @@ var init_ConnectionManager = __esm({
|
|
|
445453
445453
|
writable: true,
|
|
445454
445454
|
value: 3
|
|
445455
445455
|
});
|
|
445456
|
-
Object.defineProperty(this, "
|
|
445456
|
+
Object.defineProperty(this, "streamingState", {
|
|
445457
445457
|
enumerable: true,
|
|
445458
445458
|
configurable: true,
|
|
445459
445459
|
writable: true,
|
|
445460
|
-
value:
|
|
445460
|
+
value: "idle"
|
|
445461
445461
|
});
|
|
445462
445462
|
Object.defineProperty(this, "pendingToolConfirmations", {
|
|
445463
445463
|
enumerable: true,
|
|
@@ -445478,6 +445478,18 @@ var init_ConnectionManager = __esm({
|
|
|
445478
445478
|
value: null
|
|
445479
445479
|
});
|
|
445480
445480
|
}
|
|
445481
|
+
hasPendingInteractions() {
|
|
445482
|
+
return this.pendingToolConfirmations.size > 0 || this.pendingQuestions.size > 0 || this.pendingRollbackConfirmation !== null;
|
|
445483
|
+
}
|
|
445484
|
+
clearInFlightInteractions() {
|
|
445485
|
+
this.pendingToolConfirmations.clear();
|
|
445486
|
+
this.pendingQuestions.clear();
|
|
445487
|
+
this.pendingRollbackConfirmation = null;
|
|
445488
|
+
}
|
|
445489
|
+
// Set the CLI streaming state - should be called by ChatScreen when streamStatus changes
|
|
445490
|
+
setStreamingState(state) {
|
|
445491
|
+
this.streamingState = state;
|
|
445492
|
+
}
|
|
445481
445493
|
// Subscribe to status changes
|
|
445482
445494
|
onStatusChange(callback) {
|
|
445483
445495
|
this.statusCallbacks.push(callback);
|
|
@@ -445594,6 +445606,7 @@ var init_ConnectionManager = __esm({
|
|
|
445594
445606
|
this.connection.onclose(() => {
|
|
445595
445607
|
this.stopHeartbeat();
|
|
445596
445608
|
this.cleanupMessageListener();
|
|
445609
|
+
this.clearInFlightInteractions();
|
|
445597
445610
|
this.updateState({ status: "disconnected" });
|
|
445598
445611
|
this.notifyMessage("system", {
|
|
445599
445612
|
type: "closed",
|
|
@@ -445641,7 +445654,6 @@ var init_ConnectionManager = __esm({
|
|
|
445641
445654
|
}
|
|
445642
445655
|
});
|
|
445643
445656
|
this.connection.on("receivemessage", (message) => {
|
|
445644
|
-
this.isMessageProcessing = true;
|
|
445645
445657
|
this.notifyMessage("remote_message", {
|
|
445646
445658
|
type: "remote_message",
|
|
445647
445659
|
message,
|
|
@@ -445665,10 +445677,7 @@ var init_ConnectionManager = __esm({
|
|
|
445665
445677
|
});
|
|
445666
445678
|
});
|
|
445667
445679
|
this.connection.on("receivemessageprocessingcompleted", (instanceId) => {
|
|
445668
|
-
this.
|
|
445669
|
-
this.pendingToolConfirmations.clear();
|
|
445670
|
-
this.pendingQuestions.clear();
|
|
445671
|
-
this.pendingRollbackConfirmation = null;
|
|
445680
|
+
this.clearInFlightInteractions();
|
|
445672
445681
|
this.notifyMessage("message_processing_completed", {
|
|
445673
445682
|
type: "message_processing_completed",
|
|
445674
445683
|
instanceId,
|
|
@@ -445676,12 +445685,14 @@ var init_ConnectionManager = __esm({
|
|
|
445676
445685
|
});
|
|
445677
445686
|
});
|
|
445678
445687
|
this.connection.on("receiveinterruptmessageprocessing", () => {
|
|
445688
|
+
this.clearInFlightInteractions();
|
|
445679
445689
|
this.notifyMessage("interrupt_message_processing", {
|
|
445680
445690
|
type: "interrupt_message_processing",
|
|
445681
445691
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
445682
445692
|
});
|
|
445683
445693
|
});
|
|
445684
445694
|
this.connection.on("receiveclearsession", () => {
|
|
445695
|
+
this.clearInFlightInteractions();
|
|
445685
445696
|
this.notifyMessage("clear_session", {
|
|
445686
445697
|
type: "clear_session",
|
|
445687
445698
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -445696,6 +445707,7 @@ var init_ConnectionManager = __esm({
|
|
|
445696
445707
|
await this.disconnect();
|
|
445697
445708
|
});
|
|
445698
445709
|
this.connection.on("receiverollbackmessage", (userMessageOrder) => {
|
|
445710
|
+
this.clearInFlightInteractions();
|
|
445699
445711
|
this.notifyMessage("rollback_message", {
|
|
445700
445712
|
type: "rollback_message",
|
|
445701
445713
|
userMessageOrder,
|
|
@@ -445710,6 +445722,7 @@ var init_ConnectionManager = __esm({
|
|
|
445710
445722
|
});
|
|
445711
445723
|
});
|
|
445712
445724
|
this.connection.on("receiverollbackconfirmationresult", (result2) => {
|
|
445725
|
+
this.pendingRollbackConfirmation = null;
|
|
445713
445726
|
this.notifyMessage("rollback_confirmation_result", {
|
|
445714
445727
|
type: "rollback_confirmation_result",
|
|
445715
445728
|
...result2,
|
|
@@ -445796,6 +445809,7 @@ var init_ConnectionManager = __esm({
|
|
|
445796
445809
|
var _a21;
|
|
445797
445810
|
this.stopHeartbeat();
|
|
445798
445811
|
this.cleanupMessageListener();
|
|
445812
|
+
this.clearInFlightInteractions();
|
|
445799
445813
|
if ((_a21 = this.config) == null ? void 0 : _a21.instanceId) {
|
|
445800
445814
|
this.unlockInstance(this.config.instanceId);
|
|
445801
445815
|
}
|
|
@@ -445998,7 +446012,8 @@ var init_ConnectionManager = __esm({
|
|
|
445998
446012
|
}
|
|
445999
446013
|
getInFlightState() {
|
|
446000
446014
|
return {
|
|
446001
|
-
|
|
446015
|
+
// Use CLI streaming state directly instead of local variable
|
|
446016
|
+
isMessageProcessing: this.streamingState === "streaming" || this.streamingState === "stopping" || this.hasPendingInteractions(),
|
|
446002
446017
|
pendingToolConfirmations: Array.from(this.pendingToolConfirmations.values()),
|
|
446003
446018
|
pendingQuestions: Array.from(this.pendingQuestions.values()),
|
|
446004
446019
|
pendingRollbackConfirmation: this.pendingRollbackConfirmation ? {
|
|
@@ -446023,7 +446038,6 @@ var init_ConnectionManager = __esm({
|
|
|
446023
446038
|
if (!this.isConnected() || !this.connection) {
|
|
446024
446039
|
return;
|
|
446025
446040
|
}
|
|
446026
|
-
this.isMessageProcessing = true;
|
|
446027
446041
|
this.pendingToolConfirmations.set(toolCallId, {
|
|
446028
446042
|
toolName,
|
|
446029
446043
|
toolArguments,
|
|
@@ -446039,7 +446053,6 @@ var init_ConnectionManager = __esm({
|
|
|
446039
446053
|
if (!this.isConnected() || !this.connection) {
|
|
446040
446054
|
return;
|
|
446041
446055
|
}
|
|
446042
|
-
this.isMessageProcessing = true;
|
|
446043
446056
|
this.pendingQuestions.set(toolCallId, {
|
|
446044
446057
|
question,
|
|
446045
446058
|
options: options3,
|
|
@@ -446056,7 +446069,6 @@ var init_ConnectionManager = __esm({
|
|
|
446056
446069
|
if (!this.isConnected() || !this.connection) {
|
|
446057
446070
|
return;
|
|
446058
446071
|
}
|
|
446059
|
-
this.isMessageProcessing = true;
|
|
446060
446072
|
this.pendingRollbackConfirmation = {
|
|
446061
446073
|
filePaths: payload.filePaths || [],
|
|
446062
446074
|
notebookCount: payload.notebookCount ?? 0
|
|
@@ -581226,6 +581238,9 @@ function ChatScreen({ autoResume, enableYolo, enablePlan }) {
|
|
|
581226
581238
|
const codebaseAgentRef = (0, import_react145.useRef)(null);
|
|
581227
581239
|
useCursorHide();
|
|
581228
581240
|
const streamingState = useStreamingState();
|
|
581241
|
+
(0, import_react145.useEffect)(() => {
|
|
581242
|
+
connectionManager.setStreamingState(streamingState.streamStatus);
|
|
581243
|
+
}, [streamingState.streamStatus]);
|
|
581229
581244
|
(0, import_react145.useEffect)(() => {
|
|
581230
581245
|
const hasPanel = !!bashSensitiveCommand;
|
|
581231
581246
|
const hadPanel = hadBashSensitiveCommandRef.current;
|
package/bundle/package.json
CHANGED