@pluno/product-agent-web 0.1.86 → 0.1.88

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.
@@ -772,11 +772,11 @@ class qt {
772
772
  });
773
773
  }
774
774
  stop() {
775
- this.state.sessionId && (this.send({ type: "run.stop", sessionId: this.state.sessionId }), this.setState({ isThinking: !1 }), this.clearThinkingWatchdog());
775
+ this.state.sessionId && (this.send({ type: "run.stop", sessionId: this.state.sessionId, reason: "user_requested" }), this.setState({ isThinking: !1 }), this.clearThinkingWatchdog());
776
776
  }
777
777
  startNewSession(t = {}) {
778
778
  const s = t.notifyTransport !== !1;
779
- !this.options.keepRunsActiveOnSessionNavigation && s && this.state.sessionId && this.state.isThinking && this.sendNow({ type: "run.stop", sessionId: this.state.sessionId }), this.cleanupSessionUserFilesApi(), this.queuedClientEvents = this.queuedClientEvents.filter((n) => n.type !== "chat.user_message"), this.clearThinkingWatchdog(), this.retryableClientMessageId = null, this.retryAttemptsByClientMessageId = {}, this.thinkingWatchdogResyncAttemptsByClientMessageId = {}, s && this.send({
779
+ !this.options.keepRunsActiveOnSessionNavigation && s && this.state.sessionId && this.state.isThinking && this.send({ type: "run.stop", sessionId: this.state.sessionId, reason: "new_chat" }), this.cleanupSessionUserFilesApi(), this.queuedClientEvents = this.queuedClientEvents.filter((n) => n.type !== "chat.user_message"), this.clearThinkingWatchdog(), this.retryableClientMessageId = null, this.retryAttemptsByClientMessageId = {}, this.thinkingWatchdogResyncAttemptsByClientMessageId = {}, s && this.send({
780
780
  type: "session.reset",
781
781
  sessionId: this.state.sessionId ?? void 0,
782
782
  page: A()
@@ -811,7 +811,7 @@ class qt {
811
811
  return n;
812
812
  }
813
813
  loadSession(t) {
814
- !this.options.keepRunsActiveOnSessionNavigation && this.state.sessionId && this.state.isThinking && this.sendNow({ type: "run.stop", sessionId: this.state.sessionId }), this.clearThinkingWatchdog(), this.setState({
814
+ !this.options.keepRunsActiveOnSessionNavigation && this.state.sessionId && this.state.isThinking && this.send({ type: "run.stop", sessionId: this.state.sessionId, reason: "session_switch" }), this.clearThinkingWatchdog(), this.setState({
815
815
  sessionId: t,
816
816
  assistantDraft: "",
817
817
  assistantDraftRespondsToUserMessageId: null,
@@ -2445,7 +2445,7 @@ function gt(e) {
2445
2445
  if (!e || typeof e != "object")
2446
2446
  return !1;
2447
2447
  const t = e;
2448
- return t.type === "chat.user_message" ? typeof t.content == "string" && _t(t.page) : t.type === "page.upsert" || t.type === "session.reset" || t.type === "network.batch" ? _t(t.page) : t.type === "tool.result" ? typeof t.sessionId == "string" && typeof t.callId == "string" && t.toolName === "execute_code" : t.type === "chat.retry_last_user_message" ? typeof t.sessionId == "string" && typeof t.clientMessageId == "string" : t.type === "run.stop" ? typeof t.sessionId == "string" : !1;
2448
+ return t.type === "chat.user_message" ? typeof t.content == "string" && _t(t.page) : t.type === "page.upsert" || t.type === "session.reset" || t.type === "network.batch" ? _t(t.page) : t.type === "tool.result" ? typeof t.sessionId == "string" && typeof t.callId == "string" && t.toolName === "execute_code" : t.type === "chat.retry_last_user_message" ? typeof t.sessionId == "string" && typeof t.clientMessageId == "string" : t.type === "run.stop" ? typeof t.sessionId == "string" && (t.reason === "user_requested" || t.reason === "new_chat" || t.reason === "session_switch") : !1;
2449
2449
  }
2450
2450
  function _t(e) {
2451
2451
  if (!e || typeof e != "object")