Skip to content

Commit a47ea13

Browse files
committed
feat: implement live task progress tracking for CLI
This commit implements the real-time progress tracking system for CLI tasks as specified in AGENT_10_PROGRESS.md. ## Changes ### cortex-core/src/progress/ (new module) - Added enum for task lifecycle events - Implemented and using tokio broadcast - Added and types for todo list tracking - Added and types for results ### cortex-tui/src/widgets/task_progress.rs (new widget) - Implemented for displaying task progress in TUI - Implemented for aggregating progress state - Implemented for status bar display - Implemented that prevents overflow when multiple tasks run in parallel by: - Limiting visible tasks - Using proper vertical spacing - Coordinating spinner animations - Showing overflow indicator ## Features - Spinners with elapsed time display - Live tool call tracking - Todo list with status icons (○ pending, ◐ in progress, ● completed) - Progress bar with percentage - Parallel task overflow prevention
1 parent 8008824 commit a47ea13

File tree

7 files changed

+1461
-0
lines changed

7 files changed

+1461
-0
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cortex-core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ tui-textarea = "0.7"
2121
anyhow = { workspace = true }
2222
futures = { workspace = true }
2323
tracing = { workspace = true }
24+
serde = { workspace = true }
25+
serde_json = { workspace = true }
2426

2527
[target.'cfg(unix)'.dependencies]
2628
libc = "0.2"

cortex-core/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub mod animation;
9696
pub mod events;
9797
pub mod frame_engine;
9898
pub mod markdown;
99+
pub mod progress;
99100
pub mod style;
100101
pub mod widgets;
101102

@@ -109,6 +110,10 @@ pub use frame_engine::{
109110
DEFAULT_CHANNEL_BUFFER, DEFAULT_TICK_RATE_MS, EngineEvent, FrameEngine, FrameEngineBuilder,
110111
create_event_channel, create_event_channel_with_capacity,
111112
};
113+
pub use progress::{
114+
ProgressEmitter, ProgressEvent, ProgressSubscriber, TaskResult, TodoItem, TodoStatus,
115+
ToolResult,
116+
};
112117
pub use style::{
113118
BLUE, BORDER, BORDER_HIGHLIGHT, CortexStyle, GREEN, ORANGE, PINK, PURPLE, RED, SURFACE_0,
114119
SURFACE_1, SURFACE_2, TEXT, TEXT_DIM, TEXT_MUTED, VOID, YELLOW,

0 commit comments

Comments
 (0)