Fix OpenCode event session routing #2634
main fromrefs/pull/2634/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/provider/Layers/OpenCodeAdapter.ts line 743OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -723,4 +735,9 @@723735 const messageRole = messageRoleForPart(context, part);724736725737 if (messageRole === "assistant") {726- yield* emitAssistantTextDelta(context, part, turnId, event);738+ const delta =739+ "delta" in event.properties && typeof event.properties.delta === "string"740+ ? event.properties.delta741+ : undefined;742+ const assistantPart =743+ delta && delta.length > 0 && (part.type === "text" || part.type === "reasoning")
samjandris(GitHub profile, opens in a new tab) changed the title
- apps/server/src/provider/Layers/OpenCodeAdapter.ts line 908OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -905,3 +917,21 @@905917 break;906918 }907919920+ case "session.idle": {921+ if (turnId) {922+ context.activeTurnId = undefined;923+ yield* updateProviderSession(context, { status: "ready" }, { clearActiveTurnId: true });924+ yield* emit({925+ ...(yield* buildEventBase({926+ threadId: context.session.threadId,927+ turnId,928+ raw: event,929+ })),930+ type: "turn.completed",931+ payload: {932+ state: "completed",933+ },934+ });935+ }936+ break;937+ }
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
samjandris(GitHub profile, opens in a new tab) changed the title
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
samjandris(GitHub profile, opens in a new tab) changed the title
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
samjandris(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
55b9fcd7-0c11-4402-8a03-ba38fa940586You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip
💬 Introducing Slack Agent: The best way for teams to turn conversations into code.
Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack.
👉 Get started
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share