juno-code 1.0.34 → 1.0.35
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/bin/cli.js +26 -5
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +26 -5
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/templates/services/__pycache__/codex.cpython-38.pyc +0 -0
- package/dist/templates/services/codex.py +64 -10
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -7470,7 +7470,7 @@ var init_shell_backend = __esm({
|
|
|
7470
7470
|
* Strategy:
|
|
7471
7471
|
* 1. Try to parse each line as JSON first (for Claude)
|
|
7472
7472
|
* 2. If JSON parsing fails, treat as TEXT streaming (for Codex and other text-based subagents)
|
|
7473
|
-
* 3. Emit all
|
|
7473
|
+
* 3. Emit all text lines (including whitespace-only) as progress events for real-time display
|
|
7474
7474
|
*/
|
|
7475
7475
|
parseAndEmitStreamingEvents(data, sessionId) {
|
|
7476
7476
|
if (!this.jsonBuffer) {
|
|
@@ -7480,14 +7480,35 @@ var init_shell_backend = __esm({
|
|
|
7480
7480
|
const lines = this.jsonBuffer.split("\n");
|
|
7481
7481
|
this.jsonBuffer = lines.pop() || "";
|
|
7482
7482
|
for (const line of lines) {
|
|
7483
|
-
const
|
|
7484
|
-
if (!
|
|
7483
|
+
const rawLine = line.endsWith("\r") ? line.slice(0, -1) : line;
|
|
7484
|
+
if (!rawLine) continue;
|
|
7485
|
+
const hasNonWhitespace = rawLine.trim().length > 0;
|
|
7486
|
+
if (!hasNonWhitespace) {
|
|
7487
|
+
this.emitProgressEvent({
|
|
7488
|
+
sessionId,
|
|
7489
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
7490
|
+
backend: "shell",
|
|
7491
|
+
count: ++this.eventCounter,
|
|
7492
|
+
type: "thinking",
|
|
7493
|
+
content: rawLine,
|
|
7494
|
+
metadata: {
|
|
7495
|
+
format: "text",
|
|
7496
|
+
raw: true
|
|
7497
|
+
}
|
|
7498
|
+
}).catch((error) => {
|
|
7499
|
+
if (this.config?.debug) {
|
|
7500
|
+
engineLogger.warn(`Failed to emit whitespace-only streaming event: ${error instanceof Error ? error.message : String(error)}`);
|
|
7501
|
+
}
|
|
7502
|
+
});
|
|
7503
|
+
continue;
|
|
7504
|
+
}
|
|
7505
|
+
const trimmedLine = rawLine.trim();
|
|
7485
7506
|
let isJsonParsed = false;
|
|
7486
7507
|
try {
|
|
7487
7508
|
const jsonEvent = JSON.parse(trimmedLine);
|
|
7488
7509
|
let progressEvent;
|
|
7489
7510
|
if (this.isClaudeCliEvent(jsonEvent)) {
|
|
7490
|
-
progressEvent = this.convertClaudeEventToProgress(jsonEvent, sessionId,
|
|
7511
|
+
progressEvent = this.convertClaudeEventToProgress(jsonEvent, sessionId, rawLine);
|
|
7491
7512
|
isJsonParsed = true;
|
|
7492
7513
|
} else if (this.isGenericStreamingEvent(jsonEvent)) {
|
|
7493
7514
|
progressEvent = {
|
|
@@ -7522,7 +7543,7 @@ var init_shell_backend = __esm({
|
|
|
7522
7543
|
backend: "shell",
|
|
7523
7544
|
count: ++this.eventCounter,
|
|
7524
7545
|
type: "thinking",
|
|
7525
|
-
content:
|
|
7546
|
+
content: rawLine,
|
|
7526
7547
|
metadata: {
|
|
7527
7548
|
format: "text",
|
|
7528
7549
|
raw: true
|