You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Plugin hook for streaming text transformation (e.g. text.delta) #39526
I have verified this feature I'm about to request hasn't been suggested before.
Currently, plugins can hook into the AI's response via the experimental.text.complete event, which fires after the full message has been generated.
For plugins that format or transform text (such as the opencode-rtl plugin which adds Unicode BiDi isolates to make right-to-left text readable), this means the text streams in "broken" (scrambled) and only fixes itself once the entire response is finished.
Proposed Solution
Add a streaming hook, such as experimental.text.delta or experimental.text.partial, that allows plugins to intercept and transform text chunks as they arrive from the LLM, before they are rendered to the UI (CLI or Desktop).
Example hook signature:
interfaceTextDeltaEvent{delta: string;// The new chunk of textfullText: string;// The accumulated text so fartransform: (newDelta: string)=>void;}
Or simpler, just allow a synchronous map function over the stream:
This is critical for any plugin attempting to do real-time formatting, translating, or text manipulation where the user experience suffers if they have to watch raw, unformatted text stream in for 30 seconds before it snaps into the correct format.
Activity
github-actions commentedon Jul 29, 2026
This issue might be a duplicate of existing issues. Please check:
opencode-rtlplugin approachPlease review these to see if your request is already covered or if you can add context there instead.
github-actions commentedon Sep 29, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.