INNER CODE UNIT · Python
on_thinking
VersusControl/devops-ai-guidelines · 03-ai-agent-for-devops/code/10/app.py:47
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
label = TOOL_LABELS.get(tool_name, tool_name)
self.status.update(label=f"{label}...", state="running")
def on_tool_end(self, tool_name: str, result: str, success: bool = True):
label = TOOL_LABELS.get(tool_name, tool_name)
marker = "OK" if success else "FAIL"
preview = _summarize_result(tool_name, result)
self.status.write(f"[{marker}] **{label}** — {preview}")