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.mjs
CHANGED
|
@@ -7434,7 +7434,7 @@ var init_shell_backend = __esm({
|
|
|
7434
7434
|
* Strategy:
|
|
7435
7435
|
* 1. Try to parse each line as JSON first (for Claude)
|
|
7436
7436
|
* 2. If JSON parsing fails, treat as TEXT streaming (for Codex and other text-based subagents)
|
|
7437
|
-
* 3. Emit all
|
|
7437
|
+
* 3. Emit all text lines (including whitespace-only) as progress events for real-time display
|
|
7438
7438
|
*/
|
|
7439
7439
|
parseAndEmitStreamingEvents(data, sessionId) {
|
|
7440
7440
|
if (!this.jsonBuffer) {
|
|
@@ -7444,14 +7444,35 @@ var init_shell_backend = __esm({
|
|
|
7444
7444
|
const lines = this.jsonBuffer.split("\n");
|
|
7445
7445
|
this.jsonBuffer = lines.pop() || "";
|
|
7446
7446
|
for (const line of lines) {
|
|
7447
|
-
const
|
|
7448
|
-
if (!
|
|
7447
|
+
const rawLine = line.endsWith("\r") ? line.slice(0, -1) : line;
|
|
7448
|
+
if (!rawLine) continue;
|
|
7449
|
+
const hasNonWhitespace = rawLine.trim().length > 0;
|
|
7450
|
+
if (!hasNonWhitespace) {
|
|
7451
|
+
this.emitProgressEvent({
|
|
7452
|
+
sessionId,
|
|
7453
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
7454
|
+
backend: "shell",
|
|
7455
|
+
count: ++this.eventCounter,
|
|
7456
|
+
type: "thinking",
|
|
7457
|
+
content: rawLine,
|
|
7458
|
+
metadata: {
|
|
7459
|
+
format: "text",
|
|
7460
|
+
raw: true
|
|
7461
|
+
}
|
|
7462
|
+
}).catch((error) => {
|
|
7463
|
+
if (this.config?.debug) {
|
|
7464
|
+
engineLogger.warn(`Failed to emit whitespace-only streaming event: ${error instanceof Error ? error.message : String(error)}`);
|
|
7465
|
+
}
|
|
7466
|
+
});
|
|
7467
|
+
continue;
|
|
7468
|
+
}
|
|
7469
|
+
const trimmedLine = rawLine.trim();
|
|
7449
7470
|
let isJsonParsed = false;
|
|
7450
7471
|
try {
|
|
7451
7472
|
const jsonEvent = JSON.parse(trimmedLine);
|
|
7452
7473
|
let progressEvent;
|
|
7453
7474
|
if (this.isClaudeCliEvent(jsonEvent)) {
|
|
7454
|
-
progressEvent = this.convertClaudeEventToProgress(jsonEvent, sessionId,
|
|
7475
|
+
progressEvent = this.convertClaudeEventToProgress(jsonEvent, sessionId, rawLine);
|
|
7455
7476
|
isJsonParsed = true;
|
|
7456
7477
|
} else if (this.isGenericStreamingEvent(jsonEvent)) {
|
|
7457
7478
|
progressEvent = {
|
|
@@ -7486,7 +7507,7 @@ var init_shell_backend = __esm({
|
|
|
7486
7507
|
backend: "shell",
|
|
7487
7508
|
count: ++this.eventCounter,
|
|
7488
7509
|
type: "thinking",
|
|
7489
|
-
content:
|
|
7510
|
+
content: rawLine,
|
|
7490
7511
|
metadata: {
|
|
7491
7512
|
format: "text",
|
|
7492
7513
|
raw: true
|