The open source coding agent.
TypeScript
fix: error logging (#2165)
Aiden Cline4fadbcfb90de
diff --git a/packages/opencode/src/util/log.ts b/packages/opencode/src/util/log.tsindex a5283fd8817..1b321523a14 100644--- a/packages/opencode/src/util/log.ts+++ b/packages/opencode/src/util/log.ts@@ -101,7 +101,12 @@ export namespace Log {...extra,}).filter(([_, value]) => value !== undefined && value !== null)- .map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`)+ .map(([key, value]) => {+ const prefix = `${key}=`+ if (value instanceof Error) return prefix + value.message+ if (typeof value === "object") return prefix + JSON.stringify(value)+ return prefix + value+ }).join(" ")const next = new Date()const diff = next.getTime() - last