-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(ui): add live status updates during agent execution #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1238,14 +1238,19 @@ def keymap_styled(keys: list[tuple[str, str]]) -> Text: | |||||||||||||||||||||
| return (Text(" "), keymap, False) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if status == "running": | ||||||||||||||||||||||
| sys_msg = agent_data.get("system_message", "") | ||||||||||||||||||||||
| if self._agent_has_real_activity(agent_id): | ||||||||||||||||||||||
| animated_text = Text() | ||||||||||||||||||||||
| animated_text.append_text(self._get_sweep_animation(self._sweep_colors)) | ||||||||||||||||||||||
| if sys_msg: | ||||||||||||||||||||||
| animated_text.append(sys_msg, style="dim italic") | ||||||||||||||||||||||
| animated_text.append(" ", style="dim") | ||||||||||||||||||||||
| animated_text.append("esc", style="white") | ||||||||||||||||||||||
| animated_text.append(" ", style="dim") | ||||||||||||||||||||||
| animated_text.append("stop", style="dim") | ||||||||||||||||||||||
| return (animated_text, keymap_styled([("ctrl-q", "quit")]), True) | ||||||||||||||||||||||
| animated_text = self._get_animated_verb_text(agent_id, "Initializing") | ||||||||||||||||||||||
| msg = sys_msg or "Initializing..." | ||||||||||||||||||||||
| animated_text = self._get_animated_verb_text(agent_id, msg) | ||||||||||||||||||||||
| return (animated_text, keymap_styled([("ctrl-q", "quit")]), True) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| return (None, Text(), False) | ||||||||||||||||||||||
|
|
@@ -1678,21 +1683,46 @@ def _render_chat_content(self, msg_data: dict[str, Any]) -> Any: | |||||||||||||||||||||
| content = msg_data.get("content", "") | ||||||||||||||||||||||
| metadata = msg_data.get("metadata", {}) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if not content: | ||||||||||||||||||||||
| return None | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if role == "user": | ||||||||||||||||||||||
| if not content: | ||||||||||||||||||||||
| return None | ||||||||||||||||||||||
| return UserMessageRenderer.render_simple(content) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| renderables = [] | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if "thinking_blocks" in metadata and metadata["thinking_blocks"]: | ||||||||||||||||||||||
| from strix.interface.tool_components.thinking_renderer import ThinkRenderer | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| for block in metadata["thinking_blocks"]: | ||||||||||||||||||||||
|
Comment on lines
+1693
to
+1696
|
||||||||||||||||||||||
| if "thinking_blocks" in metadata and metadata["thinking_blocks"]: | |
| from strix.interface.tool_components.thinking_renderer import ThinkRenderer | |
| for block in metadata["thinking_blocks"]: | |
| # Prefer thinking_blocks from metadata, but fall back to root-level key | |
| thinking_blocks = metadata.get("thinking_blocks") or msg_data.get("thinking_blocks") | |
| if thinking_blocks: | |
| from strix.interface.tool_components.thinking_renderer import ThinkRenderer | |
| for block in thinking_blocks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought.split("\n")won’t handle Windows newlines (\r\n) cleanly and can leave stray\rcharacters in the output. Usingthought.splitlines()would normalize newline handling and match patterns used elsewhere in the interface renderers.