Skip to main content

Module app

Module app 

Source

Structs§

App
Main application state.
AppConfig
Configuration for the UI app.

Functions§

chat_add
Add a Component to chat_container with a spacer before it if chat_container is not empty. Mirrors pi’s addMessageToChat() which adds new Spacer(1) before each message when this.chatContainer.children.length > 0.
handle_follow_up
Queue a follow-up message (Alt+Enter) during streaming. Uses yoagent’s native follow_up() — the agent loop’s outer loop picks it up naturally after the current inner loop finishes.
rebuild_chat_from_messages
Rebuild the chat container from a slice of AgentMessages (pi’s renderSessionContext). Clears the container and re-adds all message components with spacers between them. Adjacent tool calls and tool results are paired into single ToolExecComponent.
run
Run the interactive UI.