Better layout for terminal and chat messages

This commit is contained in:
Utkarsh-Patel-13 2025-07-22 20:36:52 -07:00
parent 6af9805927
commit 7c6437eef6
3 changed files with 57 additions and 47 deletions

View file

@ -43,17 +43,7 @@ class StreamingService:
self.message_annotations[0]["content"].append(message)
# Return only the delta annotation
# annotation = {"type": "TERMINAL_INFO", "content": [message]}
agent_data = {
"agent_name": "Terminal agent",
"events": [
{
"status": message_type,
"result": message.get("text", ""),
}
],
}
annotation = {"type": "agent_events", "data": agent_data}
annotation = {"type": "TERMINAL_INFO", "data": message}
return f"8:[{json.dumps(annotation)}]\n"
def format_sources_delta(self, sources: List[Dict[str, Any]]) -> str: