@hasna/assistants 1.1.90 → 1.1.91

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 CHANGED
@@ -112152,7 +112152,7 @@ ${defs.length} agent(s) total. Use /agents show <name> for details.
112152
112152
  };
112153
112153
  }
112154
112154
  }
112155
- var VERSION2 = "1.1.90";
112155
+ var VERSION2 = "1.1.91";
112156
112156
  var init_builtin = __esm(async () => {
112157
112157
  init_src2();
112158
112158
  init_context3();
@@ -203738,6 +203738,7 @@ class SessionRegistry {
203738
203738
  chunkBuffers = new Map;
203739
203739
  chunkCallbacks = [];
203740
203740
  errorCallbacks = [];
203741
+ labelChangeCallbacks = [];
203741
203742
  clientFactory;
203742
203743
  maxBufferedChunks = 2000;
203743
203744
  store;
@@ -203772,6 +203773,9 @@ class SessionRegistry {
203772
203773
  session.label = label;
203773
203774
  session.updatedAt = Date.now();
203774
203775
  this.persistSession(session);
203776
+ for (const callback of this.labelChangeCallbacks) {
203777
+ callback(sessionId, label);
203778
+ }
203775
203779
  }
203776
203780
  }
203777
203781
  };
@@ -203827,6 +203831,9 @@ class SessionRegistry {
203827
203831
  session.label = label;
203828
203832
  session.updatedAt = Date.now();
203829
203833
  this.persistSession(session);
203834
+ for (const callback of this.labelChangeCallbacks) {
203835
+ callback(sessionId, label);
203836
+ }
203830
203837
  }
203831
203838
  persistSession(session) {
203832
203839
  this.store.save({
@@ -203992,6 +203999,9 @@ class SessionRegistry {
203992
203999
  onError(callback) {
203993
204000
  this.errorCallbacks.push(callback);
203994
204001
  }
204002
+ onLabelChange(callback) {
204003
+ this.labelChangeCallbacks.push(callback);
204004
+ }
203995
204005
  setProcessing(id, isProcessing) {
203996
204006
  const session = this.sessions.get(id);
203997
204007
  if (session) {
@@ -215894,9 +215904,11 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
215894
215904
  if (!this.sessionAutoNamed && this.onSessionLabel && source === "user") {
215895
215905
  this.sessionAutoNamed = true;
215896
215906
  const bgModel = this.config?.backgroundModel;
215907
+ const sessionId = this.sessionId;
215908
+ const labelCallback = this.onSessionLabel;
215897
215909
  generateSessionName(userMessage, { model: bgModel }).then((label) => {
215898
- this.onSessionLabel?.(this.sessionId, label);
215899
- }).catch(() => {});
215910
+ labelCallback?.(sessionId, label);
215911
+ }).catch((err) => {});
215900
215912
  }
215901
215913
  return { ok: true, summary: summary ? summary.slice(0, 200) : undefined };
215902
215914
  } catch (error4) {
@@ -264872,7 +264884,7 @@ function Status({
264872
264884
  const total = inputCost + outputCost + cacheReadCost + cacheWriteCost;
264873
264885
  return total < 0.01 ? `$${total.toFixed(3)}` : `$${total.toFixed(2)}`;
264874
264886
  }, [tokenUsage, modelId]);
264875
- const sessionInfo = sessionCount && sessionCount > 1 && sessionIndex !== undefined ? `${sessionIndex + 1}/${sessionCount}` : "";
264887
+ const sessionInfo = sessionCount && sessionCount > 1 && sessionIndex !== undefined ? `${sessionIndex}/${sessionCount}` : "";
264876
264888
  const bgIndicator = backgroundProcessingCount > 0 ? ` +${backgroundProcessingCount}` : "";
264877
264889
  const voiceLabel = voiceState?.enabled ? voiceState.isTalking ? "talk" : voiceState.isListening ? "mic" : voiceState.isSpeaking ? "spk" : "voice" : "";
264878
264890
  const heartbeatLabel = heartbeatState?.enabled ? heartbeatState.isStale ? "hb!" : "hb" : "";
@@ -292844,6 +292856,7 @@ function App2({ cwd: cwd3, version: version4, permissionMode: initialPermissionM
292844
292856
  const [activeSessionId, setActiveSessionId] = import_react86.useState(null);
292845
292857
  const [isInitializing, setIsInitializing] = import_react86.useState(true);
292846
292858
  const [showSessionSelector, setShowSessionSelector] = import_react86.useState(false);
292859
+ const [sessionVersion, setSessionVersion] = import_react86.useState(0);
292847
292860
  const [recoverableSessions, setRecoverableSessions] = import_react86.useState([]);
292848
292861
  const [showRecoveryPanel, setShowRecoveryPanel] = import_react86.useState(false);
292849
292862
  const [showConnectorsPanel, setShowConnectorsPanel] = import_react86.useState(false);
@@ -294427,6 +294440,9 @@ function App2({ cwd: cwd3, version: version4, permissionMode: initialPermissionM
294427
294440
  }
294428
294441
  setQueueFlushTrigger((prev) => prev + 1);
294429
294442
  });
294443
+ registry3.onLabelChange(() => {
294444
+ setSessionVersion((prev) => prev + 1);
294445
+ });
294430
294446
  }
294431
294447
  let initialMessages;
294432
294448
  let sessionId;
@@ -297877,7 +297893,7 @@ process.on("unhandledRejection", (reason) => {
297877
297893
  cleanup();
297878
297894
  process.exit(1);
297879
297895
  });
297880
- var VERSION4 = "1.1.90";
297896
+ var VERSION4 = "1.1.91";
297881
297897
  var SYNC_START = "\x1B[?2026h";
297882
297898
  var SYNC_END = "\x1B[?2026l";
297883
297899
  function enableSynchronizedOutput() {
@@ -298051,4 +298067,4 @@ export {
298051
298067
  main
298052
298068
  };
298053
298069
 
298054
- //# debugId=EE26EDB19ADBEA5764756E2164756E21
298070
+ //# debugId=D4CEEF3343A33BAE64756E2164756E21