mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-10 22:34:39 +00:00
Better layout for terminal and chat messages
This commit is contained in:
parent
6af9805927
commit
7c6437eef6
3 changed files with 57 additions and 47 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue