Add status bar and compact summary widgets with context window resolu… (#152)

* Add status bar and compact summary widgets with context window resolution

- Implemented a shared status bar for CLI and TUI frontends, including helpers for managing session metrics and context windows.
- Created a `CompactSummaryWidget` for displaying manual summaries in a collapsible format.
- Introduced a `CompactingWidget` to indicate ongoing compacting processes.
- Added a base class `TimedStatusWidget` for widgets that require a timer.
- Developed context window resolution helpers to retrieve context window sizes from various model attributes.
- Enhanced tests for context window resolution and status bar functionalities, ensuring accurate behavior across different scenarios.
- Updated existing tests to cover new features and maintain code quality.

* refactor(Channel): simplify lambda function in _send_with_retry method

* feat: enhance context editing logic and improve error handling in StreamState

* refactor(Channel): streamline lambda function in _send_with_retry method

* feat: rename auto-approve option to auto-mode for unattended execution; update checkpoint queries to filter by agent name; improve compatibility validation logic

* feat: rename auto-approve option to auto-mode; update related logic and tests for improved unattended execution

* fix: correct formatting of console message for MCP server configuration status

* feat: add check for None summary_message in _apply_summarization_event to prevent errors

* feat: enhance _load_checkpoint_messages to validate message format and apply summarization event
This commit is contained in:
Xi Zhang
2026-04-12 18:47:37 +02:00
committed by GitHub
parent ff15f515cc
commit 65db3a4fcd
55 changed files with 3353 additions and 578 deletions
+39
View File
@@ -4,6 +4,7 @@ from EvoScientist.stream.utils import (
_shorten_path,
count_lines,
format_tool_compact,
format_tool_compact_with_result,
has_args,
is_success,
truncate,
@@ -99,6 +100,14 @@ class TestFormatToolCompact:
result = format_tool_compact("read_file", {"path": "/memory/MEMORY.md"})
assert result == "Reading memory"
def test_read_file_memory_file_path_alias(self):
result = format_tool_compact("read_file", {"file_path": "/memory/MEMORY.md"})
assert result == "Reading memory"
def test_read_file_any_memory_file(self):
result = format_tool_compact("read_file", {"path": "/memory/history.md"})
assert result == "Reading memory"
def test_write_file_memory(self):
result = format_tool_compact("write_file", {"path": "/MEMORY.md"})
assert result == "Updating memory"
@@ -110,6 +119,36 @@ class TestFormatToolCompact:
result = format_tool_compact("edit_file", {"path": "/memory/MEMORY.md"})
assert result == "Updating memory"
def test_write_edit_any_memory_file(self):
write_result = format_tool_compact("write_file", {"path": "/memory/soul.md"})
edit_result = format_tool_compact(
"edit_file", {"path": "/memory/skills-context.md"}
)
assert write_result == "Updating memory"
assert edit_result == "Updating memory"
def test_memory_display_inferred_from_result_when_args_sparse(self):
read_result = format_tool_compact_with_result(
"read_file",
{},
"# EvoScientist Memory\n\nFounder: Zachary",
)
assert read_result == "Reading memory"
edit_result = format_tool_compact_with_result(
"edit_file",
{},
"Successfully replaced 1 instance(s) of the string in '/memory/MEMORY.md'",
)
assert edit_result == "Updating memory"
write_result = format_tool_compact_with_result(
"write_file",
{},
"Wrote updated content to '/memory/history.md'",
)
assert write_result == "Updating memory"
def test_glob(self):
result = format_tool_compact("glob", {"pattern": "*.py"})
assert result == "glob(*.py)"