snow-ai 0.6.46 → 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 CHANGED
@@ -445453,11 +445453,11 @@ var init_ConnectionManager = __esm({
445453
445453
  writable: true,
445454
445454
  value: 3
445455
445455
  });
445456
- Object.defineProperty(this, "isMessageProcessing", {
445456
+ Object.defineProperty(this, "streamingState", {
445457
445457
  enumerable: true,
445458
445458
  configurable: true,
445459
445459
  writable: true,
445460
- value: false
445460
+ value: "idle"
445461
445461
  });
445462
445462
  Object.defineProperty(this, "pendingToolConfirmations", {
445463
445463
  enumerable: true,
@@ -445481,11 +445481,14 @@ var init_ConnectionManager = __esm({
445481
445481
  hasPendingInteractions() {
445482
445482
  return this.pendingToolConfirmations.size > 0 || this.pendingQuestions.size > 0 || this.pendingRollbackConfirmation !== null;
445483
445483
  }
445484
- clearInFlightInteractions(markProcessing = false) {
445484
+ clearInFlightInteractions() {
445485
445485
  this.pendingToolConfirmations.clear();
445486
445486
  this.pendingQuestions.clear();
445487
445487
  this.pendingRollbackConfirmation = null;
445488
- this.isMessageProcessing = markProcessing;
445488
+ }
445489
+ // Set the CLI streaming state - should be called by ChatScreen when streamStatus changes
445490
+ setStreamingState(state) {
445491
+ this.streamingState = state;
445489
445492
  }
445490
445493
  // Subscribe to status changes
445491
445494
  onStatusChange(callback) {
@@ -445603,7 +445606,7 @@ var init_ConnectionManager = __esm({
445603
445606
  this.connection.onclose(() => {
445604
445607
  this.stopHeartbeat();
445605
445608
  this.cleanupMessageListener();
445606
- this.clearInFlightInteractions(false);
445609
+ this.clearInFlightInteractions();
445607
445610
  this.updateState({ status: "disconnected" });
445608
445611
  this.notifyMessage("system", {
445609
445612
  type: "closed",
@@ -445651,7 +445654,6 @@ var init_ConnectionManager = __esm({
445651
445654
  }
445652
445655
  });
445653
445656
  this.connection.on("receivemessage", (message) => {
445654
- this.isMessageProcessing = true;
445655
445657
  this.notifyMessage("remote_message", {
445656
445658
  type: "remote_message",
445657
445659
  message,
@@ -445660,7 +445662,6 @@ var init_ConnectionManager = __esm({
445660
445662
  });
445661
445663
  this.connection.on("receivetoolconfirmationresult", (result2) => {
445662
445664
  this.pendingToolConfirmations.delete(result2.toolCallId);
445663
- this.isMessageProcessing = this.hasPendingInteractions();
445664
445665
  this.notifyMessage("tool_confirmation_result", {
445665
445666
  type: "tool_confirmation_result",
445666
445667
  ...result2,
@@ -445669,7 +445670,6 @@ var init_ConnectionManager = __esm({
445669
445670
  });
445670
445671
  this.connection.on("receiveuserquestionresult", (result2) => {
445671
445672
  this.pendingQuestions.delete(result2.toolCallId);
445672
- this.isMessageProcessing = this.hasPendingInteractions();
445673
445673
  this.notifyMessage("user_question_result", {
445674
445674
  type: "user_question_result",
445675
445675
  ...result2,
@@ -445677,7 +445677,7 @@ var init_ConnectionManager = __esm({
445677
445677
  });
445678
445678
  });
445679
445679
  this.connection.on("receivemessageprocessingcompleted", (instanceId) => {
445680
- this.clearInFlightInteractions(false);
445680
+ this.clearInFlightInteractions();
445681
445681
  this.notifyMessage("message_processing_completed", {
445682
445682
  type: "message_processing_completed",
445683
445683
  instanceId,
@@ -445685,14 +445685,14 @@ var init_ConnectionManager = __esm({
445685
445685
  });
445686
445686
  });
445687
445687
  this.connection.on("receiveinterruptmessageprocessing", () => {
445688
- this.clearInFlightInteractions(false);
445688
+ this.clearInFlightInteractions();
445689
445689
  this.notifyMessage("interrupt_message_processing", {
445690
445690
  type: "interrupt_message_processing",
445691
445691
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
445692
445692
  });
445693
445693
  });
445694
445694
  this.connection.on("receiveclearsession", () => {
445695
- this.clearInFlightInteractions(false);
445695
+ this.clearInFlightInteractions();
445696
445696
  this.notifyMessage("clear_session", {
445697
445697
  type: "clear_session",
445698
445698
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
@@ -445707,7 +445707,7 @@ var init_ConnectionManager = __esm({
445707
445707
  await this.disconnect();
445708
445708
  });
445709
445709
  this.connection.on("receiverollbackmessage", (userMessageOrder) => {
445710
- this.clearInFlightInteractions(true);
445710
+ this.clearInFlightInteractions();
445711
445711
  this.notifyMessage("rollback_message", {
445712
445712
  type: "rollback_message",
445713
445713
  userMessageOrder,
@@ -445723,7 +445723,6 @@ var init_ConnectionManager = __esm({
445723
445723
  });
445724
445724
  this.connection.on("receiverollbackconfirmationresult", (result2) => {
445725
445725
  this.pendingRollbackConfirmation = null;
445726
- this.isMessageProcessing = this.hasPendingInteractions();
445727
445726
  this.notifyMessage("rollback_confirmation_result", {
445728
445727
  type: "rollback_confirmation_result",
445729
445728
  ...result2,
@@ -445810,7 +445809,7 @@ var init_ConnectionManager = __esm({
445810
445809
  var _a21;
445811
445810
  this.stopHeartbeat();
445812
445811
  this.cleanupMessageListener();
445813
- this.clearInFlightInteractions(false);
445812
+ this.clearInFlightInteractions();
445814
445813
  if ((_a21 = this.config) == null ? void 0 : _a21.instanceId) {
445815
445814
  this.unlockInstance(this.config.instanceId);
445816
445815
  }
@@ -446013,7 +446012,8 @@ var init_ConnectionManager = __esm({
446013
446012
  }
446014
446013
  getInFlightState() {
446015
446014
  return {
446016
- isMessageProcessing: this.isMessageProcessing || this.hasPendingInteractions(),
446015
+ // Use CLI streaming state directly instead of local variable
446016
+ isMessageProcessing: this.streamingState === "streaming" || this.streamingState === "stopping" || this.hasPendingInteractions(),
446017
446017
  pendingToolConfirmations: Array.from(this.pendingToolConfirmations.values()),
446018
446018
  pendingQuestions: Array.from(this.pendingQuestions.values()),
446019
446019
  pendingRollbackConfirmation: this.pendingRollbackConfirmation ? {
@@ -446038,7 +446038,6 @@ var init_ConnectionManager = __esm({
446038
446038
  if (!this.isConnected() || !this.connection) {
446039
446039
  return;
446040
446040
  }
446041
- this.isMessageProcessing = true;
446042
446041
  this.pendingToolConfirmations.set(toolCallId, {
446043
446042
  toolName,
446044
446043
  toolArguments,
@@ -446054,7 +446053,6 @@ var init_ConnectionManager = __esm({
446054
446053
  if (!this.isConnected() || !this.connection) {
446055
446054
  return;
446056
446055
  }
446057
- this.isMessageProcessing = true;
446058
446056
  this.pendingQuestions.set(toolCallId, {
446059
446057
  question,
446060
446058
  options: options3,
@@ -446071,7 +446069,6 @@ var init_ConnectionManager = __esm({
446071
446069
  if (!this.isConnected() || !this.connection) {
446072
446070
  return;
446073
446071
  }
446074
- this.isMessageProcessing = true;
446075
446072
  this.pendingRollbackConfirmation = {
446076
446073
  filePaths: payload.filePaths || [],
446077
446074
  notebookCount: payload.notebookCount ?? 0
@@ -581241,6 +581238,9 @@ function ChatScreen({ autoResume, enableYolo, enablePlan }) {
581241
581238
  const codebaseAgentRef = (0, import_react145.useRef)(null);
581242
581239
  useCursorHide();
581243
581240
  const streamingState = useStreamingState();
581241
+ (0, import_react145.useEffect)(() => {
581242
+ connectionManager.setStreamingState(streamingState.streamStatus);
581243
+ }, [streamingState.streamStatus]);
581244
581244
  (0, import_react145.useEffect)(() => {
581245
581245
  const hasPanel = !!bashSensitiveCommand;
581246
581246
  const hadPanel = hadBashSensitiveCommandRef.current;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.6.46",
3
+ "version": "0.6.47",
4
4
  "description": "Agentic coding in your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.6.46",
3
+ "version": "0.6.47",
4
4
  "description": "Agentic coding in your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {