@freibergergarcia/phone-a-friend 2.6.2 → 2.6.3
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/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +15 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78248,6 +78248,8 @@ var OpenCodeBackendError = class extends BackendError {
|
|
|
78248
78248
|
this.name = "OpenCodeBackendError";
|
|
78249
78249
|
}
|
|
78250
78250
|
};
|
|
78251
|
+
var OPENCODE_NO_OUTPUT_MESSAGE = "opencode produced no text output. The build agent may have terminated mid tool-call without finalizing a reply. Try a more direct prompt, or use codex/gemini/claude for one-shot relays.";
|
|
78252
|
+
var OPENCODE_REVIEW_NO_OUTPUT_MESSAGE = "opencode review produced no text output. The build agent may have terminated mid tool-call without finalizing a reply. Try a different backend (codex, gemini, claude) for this review.";
|
|
78251
78253
|
function normalizeOpenCodeModel(model, provider = "ollama") {
|
|
78252
78254
|
if (!model) return null;
|
|
78253
78255
|
return model.includes("/") ? model : `${provider}/${model}`;
|
|
@@ -78349,7 +78351,7 @@ var OpenCodeBackend = class {
|
|
|
78349
78351
|
throw new OpenCodeBackendError(parsed.error);
|
|
78350
78352
|
}
|
|
78351
78353
|
if (!parsed.text) {
|
|
78352
|
-
throw new OpenCodeBackendError(
|
|
78354
|
+
throw new OpenCodeBackendError(OPENCODE_NO_OUTPUT_MESSAGE);
|
|
78353
78355
|
}
|
|
78354
78356
|
return parsed.text;
|
|
78355
78357
|
} catch (err) {
|
|
@@ -78414,12 +78416,19 @@ var OpenCodeBackend = class {
|
|
|
78414
78416
|
}
|
|
78415
78417
|
});
|
|
78416
78418
|
});
|
|
78419
|
+
let chunkCount = 0;
|
|
78417
78420
|
try {
|
|
78418
|
-
|
|
78421
|
+
for await (const chunk of parseOpenCodeStreamJSON(
|
|
78419
78422
|
child.stdout,
|
|
78420
78423
|
{ onSessionCreated: opts.onSessionCreated }
|
|
78421
|
-
)
|
|
78424
|
+
)) {
|
|
78425
|
+
chunkCount++;
|
|
78426
|
+
yield chunk;
|
|
78427
|
+
}
|
|
78422
78428
|
await closePromise;
|
|
78429
|
+
if (chunkCount === 0) {
|
|
78430
|
+
throw new OpenCodeBackendError(OPENCODE_NO_OUTPUT_MESSAGE);
|
|
78431
|
+
}
|
|
78423
78432
|
} catch (err) {
|
|
78424
78433
|
closePromise.catch(() => {
|
|
78425
78434
|
});
|
|
@@ -78466,7 +78475,9 @@ var OpenCodeBackend = class {
|
|
|
78466
78475
|
});
|
|
78467
78476
|
const parsed = parseOpenCodeTranscript(result.stdout);
|
|
78468
78477
|
if (parsed.error) throw new OpenCodeBackendError(parsed.error);
|
|
78469
|
-
if (!parsed.text)
|
|
78478
|
+
if (!parsed.text) {
|
|
78479
|
+
throw new OpenCodeBackendError(OPENCODE_REVIEW_NO_OUTPUT_MESSAGE);
|
|
78480
|
+
}
|
|
78470
78481
|
return parsed.text;
|
|
78471
78482
|
} catch (err) {
|
|
78472
78483
|
if (err instanceof OpenCodeBackendError) throw err;
|