INNER CODE UNIT · Python

StreamlitProgress

VersusControl/devops-ai-guidelines · 03-ai-agent-for-devops/code/10/app.py:39

class StreamlitProgress:
    """Callbacks that render live tool-call progress inside a st.status container."""

    def __init__(self, container):
        self.status = container
        self.tool_count = 0
        self.steps = []                    # saved into message history

    def on_thinking(self):
        self.status.update(label="Thinking...", state="running")

    def on_reasoning(self, text: str):
        if text:
            self.status.write(f"_{text}_")
            self.steps.append({"label": "Reasoning", "detail": text})

    def on_tool_start(self, tool_name: str, tool_args: dict):
        self.tool_count += 1

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…