Dax Raad пре 2 месеци
родитељ
комит
651a10d6db
1 измењених фајлова са 4 додато и 7 уклоњено
  1. 4 7
      packages/opencode/src/session/summary.ts

+ 4 - 7
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)
     }
   }