@livx.cc/agentx 0.96.5 → 0.96.6
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/cli.js +3 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -3545,7 +3545,8 @@ var Agent = class _Agent {
|
|
|
3545
3545
|
bodyStr = void 0;
|
|
3546
3546
|
}
|
|
3547
3547
|
if (bodyStr && err2 instanceof Error && !err2.message.includes(bodyStr)) err2.detail = bodyStr;
|
|
3548
|
-
|
|
3548
|
+
const errLog = err2 instanceof Error ? { message: err2.message, ...err2.detail ? { detail: err2.detail } : {}, stack: err2.stack } : err2;
|
|
3549
|
+
log4.error(`chat() failed: ${err2?.message ?? err2}${bodyStr ? ` \u2014 ${bodyStr}` : ""}`, errLog);
|
|
3549
3550
|
return { text: "", steps, finishReason: "error", messages: this.transcript, usage, usageEstimated, error: err2 };
|
|
3550
3551
|
}
|
|
3551
3552
|
if (o.signal?.aborted) return kill("aborted");
|
|
@@ -7088,7 +7089,7 @@ var Player = class {
|
|
|
7088
7089
|
var nativeDir = () => join6(dirname3(fileURLToPath(import.meta.url)), "native");
|
|
7089
7090
|
function detectFfmpegMic() {
|
|
7090
7091
|
if (process.env.MIC_DEVICE) return process.env.MIC_DEVICE;
|
|
7091
|
-
const out = spawnSync2("ffmpeg", ["-f", "avfoundation", "-list_devices", "true", "-i", ""], { encoding: "utf8" }).stderr;
|
|
7092
|
+
const out = spawnSync2("ffmpeg", ["-f", "avfoundation", "-list_devices", "true", "-i", ""], { encoding: "utf8" }).stderr ?? "";
|
|
7092
7093
|
const audio = out.slice(out.indexOf("audio devices"));
|
|
7093
7094
|
const devices = [...audio.matchAll(/\[(\d+)\] (.+)/g)].map(([, idx, name]) => ({ idx, name: name.trim() }));
|
|
7094
7095
|
const mic = devices.find((d) => /microphone|built-in/i.test(d.name) && !/teams|blackhole|loopback/i.test(d.name)) ?? devices[0];
|