diff options
| author | Dax Raad <[email protected]> | 2025-12-12 16:24:26 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-12-12 16:24:26 -0500 |
| commit | 651a10d6dbfbcf5112a8072459907463b7e3c577 (patch) | |
| tree | 3694b853a20490decabef6b864b7dc1c66e22ff0 /packages | |
| parent | f9674793af62fa6fce52a1dec558ec211a60b8cb (diff) | |
| download | opencode-651a10d6dbfbcf5112a8072459907463b7e3c577.tar.gz opencode-651a10d6dbfbcf5112a8072459907463b7e3c577.zip | |
only gen summary if diffs
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/session/summary.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/packages/opencode/src/session/summary.ts b/packages/opencode/src/session/summary.ts index ab6a98686..4761c9d2f 100644 --- a/packages/opencode/src/session/summary.ts +++ b/packages/opencode/src/session/summary.ts @@ -130,10 +130,7 @@ export namespace SessionSummary { m.info.role === "assistant" && m.parts.some((p) => p.type === "step-finish" && p.reason !== "tool-calls"), ) ) { - let summary = messages - .findLast((m) => m.info.role === "assistant") - ?.parts.findLast((p) => p.type === "text")?.text - if (!summary || diffs.length > 0) { + if (diffs.length > 0) { for (const msg of messages) { for (const part of msg.parts) { if (part.type === "tool" && part.state.status === "completed") { @@ -167,10 +164,10 @@ export namespace SessionSummary { }, }, }).catch(() => {}) - if (result) summary = result.text + if (result) { + userMsg.summary.body = result.text + } } - userMsg.summary.body = summary - log.info("body", { body: summary }) await Session.updateMessage(userMsg) } } |
