@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/index.js CHANGED
@@ -3508,7 +3508,8 @@ var Agent = class _Agent {
3508
3508
  bodyStr = void 0;
3509
3509
  }
3510
3510
  if (bodyStr && err instanceof Error && !err.message.includes(bodyStr)) err.detail = bodyStr;
3511
- log4.error(`chat() failed: ${err?.message ?? err}${bodyStr ? ` \u2014 ${bodyStr}` : ""}`, err);
3511
+ const errLog = err instanceof Error ? { message: err.message, ...err.detail ? { detail: err.detail } : {}, stack: err.stack } : err;
3512
+ log4.error(`chat() failed: ${err?.message ?? err}${bodyStr ? ` \u2014 ${bodyStr}` : ""}`, errLog);
3512
3513
  return { text: "", steps, finishReason: "error", messages: this.transcript, usage, usageEstimated, error: err };
3513
3514
  }
3514
3515
  if (o.signal?.aborted) return kill("aborted");