3
43
Fork
You've already forked opencode.el
16

Handle message.part.delta events for streaming text/reasoning output #25

Closed
nandajavarma wants to merge 1 commit from nandajavarma/opencode.el:handle-partdelta-event into main
pull from: nandajavarma/opencode.el:handle-partdelta-event
merge into: sczi:main
sczi:main
First-time contributor
Copy link

With opencode release https://github.com/anomalyco/opencode/releases/tag/v1.2.0,
now have message.part.delta events for streaming incremental text and reasoning
content. This client was not handling this and all the streaming text and
reasoning output where getting dropped. Was getting a lot of these errors:
[2026年02月17日 08:01:21] WARNING: unhandled message type

Signed-off-by: Nandaja Varma nandaja.varma@gmail.com

With opencode release https://github.com/anomalyco/opencode/releases/tag/v1.2.0, now have `message.part.delta` events for streaming incremental text and reasoning content. This client was not handling this and all the streaming text and reasoning output where getting dropped. Was getting a lot of these errors: [2026年02月17日 08:01:21] WARNING: unhandled message type Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
With opencode release https://github.com/anomalyco/opencode/releases/tag/v1.2.0,
now have `message.part.delta` events for streaming incremental text and reasoning
content. This client was not handling this and all the streaming text and
reasoning output where getting dropped. Was getting a lot of these errors:
 [2026年02月17日 08:01:21] WARNING: unhandled message type
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Owner
Copy link

thanks a lot for the contribution to keep it working with the latest opencode versions. This should be addressed now in a788d81. For me in the latest version (1.2.10) the value of field is not sometimes reasoning and sometimes text, but always text, even for reasoning blocks. So I need to make a hash table with all the part ids, and remember the type from the message event creating that part. Also I just used the existing opencode-session--update-part function which worked also for this new message type after minimal changes, rather than creating a new opencode-session--handle-part-delta function.

thanks a lot for the contribution to keep it working with the latest opencode versions. This should be addressed now in a788d81. For me in the latest version (1.2.10) the value of `field` is not sometimes `reasoning` and sometimes `text`, but always `text`, even for reasoning blocks. So I need to make a hash table with all the part ids, and remember the type from the message event creating that part. Also I just used the existing `opencode-session--update-part` function which worked also for this new message type after minimal changes, rather than creating a new `opencode-session--handle-part-delta` function.
sczi closed this pull request 2026年02月23日 22:05:57 +01:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sczi/opencode.el!25
Reference in a new issue
sczi/opencode.el
No description provided.
Delete branch "nandajavarma/opencode.el:handle-partdelta-event"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?