added file permissions and fixed a duplicate output bug.

This commit is contained in:
2026-03-11 08:02:21 -05:00
parent adbb442ce5
commit 501bf5c45b
8 changed files with 730 additions and 7 deletions

View File

@@ -4,11 +4,11 @@ from collections.abc import AsyncIterator
from rich.live import Live
from rich.markdown import Markdown
from rich.panel import Panel
from app.models.config import DisplayConfig
from app.models.message import Message
from app.models.tool_call import ToolCall, ToolCallFunction
from app.utils.display import print_assistant_message
from app.utils.logging import console, get_logger
from app.utils.token_counter import TokenUsage
@@ -50,14 +50,19 @@ class StreamHandler:
# Show reasoning while waiting for content
display_text = self._accumulated_content
if not display_text and self._accumulated_reasoning:
display_text = f"*thinking...*"
display_text = "*thinking...*"
if display_text and self._display_config.stream_output:
live.update(Markdown(display_text))
# Final static render
if self._accumulated_content:
print_assistant_message(self._accumulated_content)
# Render inside the same Assistant panel used for final output
# so the live display and final frame are visually consistent
live.update(
Panel(
Markdown(display_text),
title="Assistant",
border_style="green",
expand=True,
)
)
tool_calls = self._build_tool_calls() or None
return Message(