@ai-setting/roy-agent-cli 1.5.98 → 1.5.99

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.
@@ -7427,7 +7427,7 @@ var require_dist = __commonJS((exports) => {
7427
7427
  var require_package = __commonJS((exports, module) => {
7428
7428
  module.exports = {
7429
7429
  name: "@ai-setting/roy-agent-cli",
7430
- version: "1.5.98",
7430
+ version: "1.5.99",
7431
7431
  type: "module",
7432
7432
  description: "CLI for roy-agent - Non-interactive command execution",
7433
7433
  main: "./dist/index.js",
@@ -9436,6 +9436,11 @@ class EventHandler {
9436
9436
  async processQueue() {
9437
9437
  this.isProcessing = true;
9438
9438
  const sessionId = await this.ensureActiveSession();
9439
+ if (this.isStopped) {
9440
+ this.clearActiveSession();
9441
+ this.isProcessing = false;
9442
+ return;
9443
+ }
9439
9444
  while (!this.isStopped && this.queue.length > 0) {
9440
9445
  await this.waitForIdle();
9441
9446
  if (this.isStopped) {
@@ -9468,8 +9473,12 @@ class EventHandler {
9468
9473
  return this.activeEventSessionId;
9469
9474
  try {
9470
9475
  const session = await this.sessionComponent.create({
9471
- title: `Event Session - ${new Date().toLocaleString("zh-CN")}`
9476
+ title: `Event Session - ${new Date().toLocaleString()}`
9472
9477
  });
9478
+ if (this.isStopped) {
9479
+ this.activeEventSessionId = null;
9480
+ return null;
9481
+ }
9473
9482
  this.activeEventSessionId = session.id;
9474
9483
  return session.id;
9475
9484
  } catch (error) {
@@ -10646,9 +10655,6 @@ function createInteractiveCommand(externalEnvService) {
10646
10655
  formatter: new EventMessageFormatter({ prefix: "[通知]" }),
10647
10656
  isIdle: () => repl.isIdle(),
10648
10657
  sessionComponent,
10649
- onEvent: async (message) => {
10650
- await repl.handleEventMessage(message);
10651
- },
10652
10658
  onEventWithEnv: async (formattedEvent) => {
10653
10659
  await repl.handleEventMessageWithEnv(formattedEvent);
10654
10660
  }
package/dist/index.js CHANGED
@@ -7426,7 +7426,7 @@ var require_dist = __commonJS((exports) => {
7426
7426
  var require_package = __commonJS((exports, module) => {
7427
7427
  module.exports = {
7428
7428
  name: "@ai-setting/roy-agent-cli",
7429
- version: "1.5.98",
7429
+ version: "1.5.99",
7430
7430
  type: "module",
7431
7431
  description: "CLI for roy-agent - Non-interactive command execution",
7432
7432
  main: "./dist/index.js",
@@ -9435,6 +9435,11 @@ class EventHandler {
9435
9435
  async processQueue() {
9436
9436
  this.isProcessing = true;
9437
9437
  const sessionId = await this.ensureActiveSession();
9438
+ if (this.isStopped) {
9439
+ this.clearActiveSession();
9440
+ this.isProcessing = false;
9441
+ return;
9442
+ }
9438
9443
  while (!this.isStopped && this.queue.length > 0) {
9439
9444
  await this.waitForIdle();
9440
9445
  if (this.isStopped) {
@@ -9467,8 +9472,12 @@ class EventHandler {
9467
9472
  return this.activeEventSessionId;
9468
9473
  try {
9469
9474
  const session = await this.sessionComponent.create({
9470
- title: `Event Session - ${new Date().toLocaleString("zh-CN")}`
9475
+ title: `Event Session - ${new Date().toLocaleString()}`
9471
9476
  });
9477
+ if (this.isStopped) {
9478
+ this.activeEventSessionId = null;
9479
+ return null;
9480
+ }
9472
9481
  this.activeEventSessionId = session.id;
9473
9482
  return session.id;
9474
9483
  } catch (error) {
@@ -10645,9 +10654,6 @@ function createInteractiveCommand(externalEnvService) {
10645
10654
  formatter: new EventMessageFormatter({ prefix: "[通知]" }),
10646
10655
  isIdle: () => repl.isIdle(),
10647
10656
  sessionComponent,
10648
- onEvent: async (message) => {
10649
- await repl.handleEventMessage(message);
10650
- },
10651
10657
  onEventWithEnv: async (formattedEvent) => {
10652
10658
  await repl.handleEventMessageWithEnv(formattedEvent);
10653
10659
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-cli",
3
- "version": "1.5.98",
3
+ "version": "1.5.99",
4
4
  "type": "module",
5
5
  "description": "CLI for roy-agent - Non-interactive command execution",
6
6
  "main": "./dist/index.js",