chatroom-cli 1.49.0 → 1.49.1
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 +10 -13
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27494,9 +27494,6 @@ class CursorSdkStreamAdapter {
|
|
|
27494
27494
|
case "status":
|
|
27495
27495
|
process.stdout.write(`${this.logPrefix} status: ${message.status}]
|
|
27496
27496
|
`);
|
|
27497
|
-
if (TERMINAL_STATUS.has(message.status)) {
|
|
27498
|
-
this.emitAgentEnd();
|
|
27499
|
-
}
|
|
27500
27497
|
break;
|
|
27501
27498
|
case "thinking":
|
|
27502
27499
|
process.stdout.write(`${this.logPrefix} thinking] ${message.text}
|
|
@@ -27512,6 +27509,9 @@ class CursorSdkStreamAdapter {
|
|
|
27512
27509
|
break;
|
|
27513
27510
|
}
|
|
27514
27511
|
}
|
|
27512
|
+
flushPendingOutput() {
|
|
27513
|
+
this.flushText();
|
|
27514
|
+
}
|
|
27515
27515
|
finish() {
|
|
27516
27516
|
this.flushText();
|
|
27517
27517
|
this.emitAgentEnd();
|
|
@@ -27553,10 +27553,6 @@ class CursorSdkStreamAdapter {
|
|
|
27553
27553
|
cb();
|
|
27554
27554
|
}
|
|
27555
27555
|
}
|
|
27556
|
-
var TERMINAL_STATUS;
|
|
27557
|
-
var init_cursor_sdk_stream_adapter = __esm(() => {
|
|
27558
|
-
TERMINAL_STATUS = new Set(["FINISHED", "ERROR", "CANCELLED"]);
|
|
27559
|
-
});
|
|
27560
27556
|
|
|
27561
27557
|
// src/infrastructure/services/remote-agents/cursor-sdk/cursor-sdk-agent-service.ts
|
|
27562
27558
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
@@ -27634,7 +27630,6 @@ var init_cursor_sdk_agent_service = __esm(() => {
|
|
|
27634
27630
|
init_base_cli_agent_service();
|
|
27635
27631
|
init_detection_result();
|
|
27636
27632
|
init_cursor_models();
|
|
27637
|
-
init_cursor_sdk_stream_adapter();
|
|
27638
27633
|
CursorSdkAgentService = class CursorSdkAgentService extends BaseCLIAgentService {
|
|
27639
27634
|
id = "cursor-sdk";
|
|
27640
27635
|
displayName = "Cursor (SDK)";
|
|
@@ -27790,6 +27785,10 @@ ${options.prompt}` : options.prompt;
|
|
|
27790
27785
|
for (const cb of outputCallbacks)
|
|
27791
27786
|
cb();
|
|
27792
27787
|
});
|
|
27788
|
+
adapter.onAgentEnd(() => {
|
|
27789
|
+
for (const cb of agentEndCallbacks)
|
|
27790
|
+
cb();
|
|
27791
|
+
});
|
|
27793
27792
|
for await (const message of run3.stream()) {
|
|
27794
27793
|
if (session.aborted)
|
|
27795
27794
|
break;
|
|
@@ -27801,15 +27800,14 @@ ${options.prompt}` : options.prompt;
|
|
|
27801
27800
|
break;
|
|
27802
27801
|
}
|
|
27803
27802
|
const result = await withTimeout(run3.wait(), RUN_WAIT_TIMEOUT_MS, "run.wait");
|
|
27804
|
-
adapter.
|
|
27803
|
+
adapter.flushPendingOutput();
|
|
27805
27804
|
if (result.status === "error") {
|
|
27806
27805
|
exitCode = 2;
|
|
27807
27806
|
process.stderr.write(`${logPrefix} run-error] run ${result.id} failed
|
|
27808
27807
|
`);
|
|
27809
27808
|
break;
|
|
27810
27809
|
}
|
|
27811
|
-
|
|
27812
|
-
cb();
|
|
27810
|
+
adapter.finish();
|
|
27813
27811
|
const resumePrompt = await waitForResumeOrAbort(session);
|
|
27814
27812
|
if (resumePrompt === null || session.aborted) {
|
|
27815
27813
|
if (session.aborted) {
|
|
@@ -27857,7 +27855,6 @@ ${options.prompt}` : options.prompt;
|
|
|
27857
27855
|
// src/infrastructure/services/remote-agents/cursor-sdk/index.ts
|
|
27858
27856
|
var init_cursor_sdk = __esm(() => {
|
|
27859
27857
|
init_cursor_sdk_agent_service();
|
|
27860
|
-
init_cursor_sdk_stream_adapter();
|
|
27861
27858
|
});
|
|
27862
27859
|
|
|
27863
27860
|
// ../../node_modules/.pnpm/@opencode-ai+sdk@1.15.11/node_modules/@opencode-ai/sdk/dist/gen/types.gen.js
|
|
@@ -86507,4 +86504,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
86507
86504
|
});
|
|
86508
86505
|
program2.parse();
|
|
86509
86506
|
|
|
86510
|
-
//# debugId=
|
|
86507
|
+
//# debugId=1017D812F7A83DCE64756E2164756E21
|