diff --git a/ai-hub/app/core/orchestration/architect.py b/ai-hub/app/core/orchestration/architect.py index 4e3e596..7f35ddc 100644 --- a/ai-hub/app/core/orchestration/architect.py +++ b/ai-hub/app/core/orchestration/architect.py @@ -194,6 +194,7 @@ continue # Natural Exit + yield {"type": "status", "content": "Finalizing response..."} return # Natural exit # F. Execute Tools diff --git a/ai-hub/app/core/orchestration/stream.py b/ai-hub/app/core/orchestration/stream.py index aae34da..98237c5 100644 --- a/ai-hub/app/core/orchestration/stream.py +++ b/ai-hub/app/core/orchestration/stream.py @@ -18,7 +18,7 @@ async def process_chunk(self, content_chunk: str, turn: int) -> AsyncGenerator[Dict[str, Any], None]: """Processes a raw content chunk, yields UI events (content, reasoning).""" self.tag_buffer += content_chunk - turn_header = f"---\n🛰️ **[Turn {turn}] Thinking...**\n" + turn_header = f"\n\n---\n🛰️ **[Turn {turn}] thinking...**\n\n" while self.tag_buffer: if not self._in_thinking_tag: @@ -148,7 +148,7 @@ return text async def end_stream(self, turn: int) -> AsyncGenerator[Dict[str, Any], None]: """Flushes any remaining buffered text at the very end of the stream.""" - turn_header = f"---\n🛰️ **[Turn {turn}] Thinking...**\n" + turn_header = f"\n\n---\n🛰️ **[Turn {turn}] thinking...**\n\n" # 1. Flush prefix buffer if we haven't sent the header yet if not self.header_sent and self.prefix_buffer: