@ai-setting/roy-agent-cli 1.7.31 → 1.7.33

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.
@@ -9461,7 +9461,7 @@ class CliQuietModeService {
9461
9461
  // package.json
9462
9462
  var package_default = {
9463
9463
  name: "@ai-setting/roy-agent-cli",
9464
- version: "1.7.31",
9464
+ version: "1.7.33",
9465
9465
  type: "module",
9466
9466
  description: "CLI for roy-agent - Non-interactive command execution",
9467
9467
  main: "./dist/index.js",
@@ -11543,7 +11543,6 @@ class EventHandler {
11543
11543
  unsubscribe = null;
11544
11544
  sessionComponent = null;
11545
11545
  activeEventSessionId = null;
11546
- activeEventSessionChatId = null;
11547
11546
  constructor(options) {
11548
11547
  this.env = options.env;
11549
11548
  this.eventTypes = options.eventTypes;
@@ -11648,26 +11647,19 @@ class EventHandler {
11648
11647
  if (!this.sessionComponent)
11649
11648
  return null;
11650
11649
  const queueChatId = this.queue.map((item) => item.chatId).find((id) => !!id);
11651
- if (this.activeEventSessionId) {
11652
- const isChatSwitch = this.activeEventSessionChatId !== null && queueChatId !== undefined && this.activeEventSessionChatId !== queueChatId;
11653
- if (!isChatSwitch) {
11654
- return this.activeEventSessionId;
11655
- }
11656
- this.activeEventSessionId = null;
11657
- this.activeEventSessionChatId = null;
11658
- }
11659
11650
  if (queueChatId) {
11660
11651
  const chatSessionId = await this.ensureChatSession(queueChatId);
11661
11652
  if (chatSessionId) {
11662
11653
  if (this.isStopped) {
11663
11654
  return null;
11664
11655
  }
11665
- this.activeEventSessionId = chatSessionId;
11666
- this.activeEventSessionChatId = queueChatId;
11667
11656
  return chatSessionId;
11668
11657
  }
11669
11658
  console.warn(`[EventHandler] Failed to ensure chat-keyed session (chatId=${queueChatId}), ` + `falling back to trigger_session_id path`);
11670
11659
  }
11660
+ if (this.activeEventSessionId) {
11661
+ return this.activeEventSessionId;
11662
+ }
11671
11663
  const triggerSessionId = this.queue.map((item) => item.triggerSessionId).find((id) => !!id);
11672
11664
  if (triggerSessionId) {
11673
11665
  try {
@@ -11760,7 +11752,6 @@ class EventHandler {
11760
11752
  }
11761
11753
  clearActiveSession() {
11762
11754
  this.activeEventSessionId = null;
11763
- this.activeEventSessionChatId = null;
11764
11755
  }
11765
11756
  getActiveEventSessionId() {
11766
11757
  return this.activeEventSessionId;
package/dist/index.js CHANGED
@@ -9460,7 +9460,7 @@ class CliQuietModeService {
9460
9460
  // package.json
9461
9461
  var package_default = {
9462
9462
  name: "@ai-setting/roy-agent-cli",
9463
- version: "1.7.31",
9463
+ version: "1.7.33",
9464
9464
  type: "module",
9465
9465
  description: "CLI for roy-agent - Non-interactive command execution",
9466
9466
  main: "./dist/index.js",
@@ -11542,7 +11542,6 @@ class EventHandler {
11542
11542
  unsubscribe = null;
11543
11543
  sessionComponent = null;
11544
11544
  activeEventSessionId = null;
11545
- activeEventSessionChatId = null;
11546
11545
  constructor(options) {
11547
11546
  this.env = options.env;
11548
11547
  this.eventTypes = options.eventTypes;
@@ -11647,26 +11646,19 @@ class EventHandler {
11647
11646
  if (!this.sessionComponent)
11648
11647
  return null;
11649
11648
  const queueChatId = this.queue.map((item) => item.chatId).find((id) => !!id);
11650
- if (this.activeEventSessionId) {
11651
- const isChatSwitch = this.activeEventSessionChatId !== null && queueChatId !== undefined && this.activeEventSessionChatId !== queueChatId;
11652
- if (!isChatSwitch) {
11653
- return this.activeEventSessionId;
11654
- }
11655
- this.activeEventSessionId = null;
11656
- this.activeEventSessionChatId = null;
11657
- }
11658
11649
  if (queueChatId) {
11659
11650
  const chatSessionId = await this.ensureChatSession(queueChatId);
11660
11651
  if (chatSessionId) {
11661
11652
  if (this.isStopped) {
11662
11653
  return null;
11663
11654
  }
11664
- this.activeEventSessionId = chatSessionId;
11665
- this.activeEventSessionChatId = queueChatId;
11666
11655
  return chatSessionId;
11667
11656
  }
11668
11657
  console.warn(`[EventHandler] Failed to ensure chat-keyed session (chatId=${queueChatId}), ` + `falling back to trigger_session_id path`);
11669
11658
  }
11659
+ if (this.activeEventSessionId) {
11660
+ return this.activeEventSessionId;
11661
+ }
11670
11662
  const triggerSessionId = this.queue.map((item) => item.triggerSessionId).find((id) => !!id);
11671
11663
  if (triggerSessionId) {
11672
11664
  try {
@@ -11759,7 +11751,6 @@ class EventHandler {
11759
11751
  }
11760
11752
  clearActiveSession() {
11761
11753
  this.activeEventSessionId = null;
11762
- this.activeEventSessionChatId = null;
11763
11754
  }
11764
11755
  getActiveEventSessionId() {
11765
11756
  return this.activeEventSessionId;
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/roy-agent-linux-x64/bin/roy-agent
3
- size: 109561984 bytes
4
- sha256: 7ccfa5a8ee4a5c056d8abb1b33ecfe884172aa1844561b2ce4f5f024e2dfa0db
3
+ size: 109566080 bytes
4
+ sha256: 4eccb0de040f26fc17220555c80562cff7d2215eda5857db7452fd6fd3fa246f
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-cli",
3
- "version": "1.7.31",
3
+ "version": "1.7.33",
4
4
  "type": "module",
5
5
  "description": "CLI for roy-agent - Non-interactive command execution",
6
6
  "main": "./dist/index.js",