GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(ai): simplify response stream state by rekram1-node · Pull Request #45835 · anomalyco/opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Aug 28, 2026

Copy link
Copy Markdown
Member

Before

The Responses adapter tracked its single current message with a set of item IDs and a separate phase map. Reasoning completion was encoded by marking every summary part concluded, then scanning those parts to decide whether late events could reopen an item.

messageItems + messagePhases
reasoning closed = every summary part is concluded

After

The current message is one optional { id, phase } slot. Reasoning items have an explicit open flag, separate from their summary-part boundaries. The reasoning delta handler uses named intermediate state and events instead of repeatedly indexing a result tuple.

message = { id, phase } | undefined
reasoning.open = false at item completion

Tool accumulation and completed call IDs remain separate: item IDs may be omitted or reused, while call IDs control deduplication. Existing boundary handling, completion ordering, and metadata emission are preserved.

This is a state cleanup following #45789, not authoritative final-value support. No common event schemas, Core code, or client code change.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rekram1-node added 2 commits August 27, 2026 23:46
@rekram1-node
test(ai): pin response item lifecycles
b69fc7e
@rekram1-node
refactor(ai): simplify response stream state
24ce670
@rekram1-node
rekram1-node merged commit 18e22cd into v2 Aug 28, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node deleted the responses-state branch August 28, 2026 04:56
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
@rekram1-node
refactor(ai): simplify response stream state (anomalyco#45835)
1800cde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rekram1-node
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.