Declaratively Building a Coding Agent Frontend with AsyncIterable and a Custom pipe
LTTrack DJapanese
I am building a GUI client that provides an interface for a coding agent, similar to Claude Desktop. Unlike a simple streaming LLM whose output only appends to the end, a coding agent updates earlier messages—for example, when a tool that began earlier finally completes—and emits metadata events unrelated to messages, such as session-title or model changes.
My implementation receives events from SSE in the frontend and converts them into AsyncIterable. AsyncIterable helpers are still at Stage 2, so for-await is the only basic option. However, plain for-await code becomes complex with callbacks and large reducers. I created a custom pipe function and components for AsyncIterable, including map, reduce, take, buffer, and share, to process events declaratively. These abstractions can handle intermediate state without React or another framework. This session demonstrates the implementation and how to connect it to React.

池奥裕太
Joined M3, Inc. as a new graduate in 2024 and works on new product development as a team lead. Core staff member of TSKaigi. Enjoys Figma and type puzzles.
