Skip to content

fix(session): restore summary body generation#11132

Closed
kynnyhsap wants to merge 6 commits into
anomalyco:devfrom
kynnyhsap:fix/restore-summary-body
Closed

fix(session): restore summary body generation#11132
kynnyhsap wants to merge 6 commits into
anomalyco:devfrom
kynnyhsap:fix/restore-summary-body

Conversation

@kynnyhsap

@kynnyhsap kynnyhsap commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Restores the summary body generation that was accidentally removed in 71a7ad1.

Fixes #11133

What does this PR do?

That commit ("fix model selection in title generation to use user's model instead of assistant's") removed the assistantMsg/small variable and deleted the entire body generation block as collateral damage instead of updating it. The "summary" agent and prompt still exist but are never called.

This means userMsg.summary.body is always undefined since v1.1.15, which breaks downstream consumers that rely on the summary body.

Solution

Re-adds the body generation block after title generation in summarizeMessage(), adapted to the current code:

  • Uses userMsg.model.providerID instead of the removed assistantMsg.providerID
  • Uses MessageV2.toModelMessages() (updated API with model param)
  • Adds if (summaryAgent) null guard consistent with title's if (!agent) return
  • Keeps the diffs.length > 0 optimization from 651a10d

How did you verify your code works?

  • tsgo --noEmit passes for opencode package
  • Full build succeeds (all platforms)

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

opencode and others added 3 commits January 30, 2026 06:48
…ng sent back as assistant message content (anomalyco#11270)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing summary.body generation

2 participants