Enhance tool documentation and add new features
- Added module-level documentation for memory tools (`remember`, `recall`, `forget`) to clarify their purpose. - Improved documentation in `recall.rs` and `remember.rs` to describe the functionality and flow of memory entry operations. - Updated `mod.rs` to include descriptions for the tool trait and execution context. - Enhanced `plan.rs` with detailed comments on plan-mode signaling tools. - Documented text search tools in `search.rs` to explain their functionality. - Improved sequential-thinking tool documentation in `seqthink.rs`. - Added safety filter documentation in `shell_filter` for credential and git operations. - Enhanced utility tools documentation, including `cd`, `dir_cache_update`, and `todowrite`. - Improved rendering documentation in view modules (`chat`, `markdown`, `status`, `workflow`) to clarify rendering flows and purposes.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
//! Workflow status panel rendering.
|
||||
//!
|
||||
//! Flow: `draw_workflow_panel` reads `state.session_runtime` and
|
||||
//! `state.workflow_engine` and renders a compact `List` of counters
|
||||
//! (messages, completed/pending tool calls, active bash jobs, agents,
|
||||
//! findings) plus the current auto-run phase.
|
||||
//!
|
||||
//! Why: shows a placeholder panel when there is no active session
|
||||
//! runtime, and only emits rows for counters that are nonzero, to keep
|
||||
//! the panel compact during simple single-turn sessions.
|
||||
|
||||
use ratatui::layout::Rect;
|
||||
use ratatui::style::{Style, Modifier};
|
||||
use ratatui::text::{Line, Span};
|
||||
@@ -5,6 +16,18 @@ use ratatui::widgets::{Block, Borders, List, ListItem};
|
||||
use ratatui::Frame;
|
||||
use super::theme::Theme;
|
||||
|
||||
/// Render the workflow status panel summarizing the active session runtime.
|
||||
///
|
||||
/// Flow: bail out with a "No active session" placeholder if
|
||||
/// `state.session_runtime` is None → otherwise build a list of status
|
||||
/// lines (message count, completed/pending tool calls, active bash jobs,
|
||||
/// agent/finding counts, auto-run phase) → render as a List widget.
|
||||
///
|
||||
/// Why: rows for pending tool queue, bash jobs, agents, and findings are
|
||||
/// only shown when their count is nonzero, to keep the panel compact
|
||||
/// during simple single-turn sessions.
|
||||
///
|
||||
/// Return: nothing; draws directly into `frame` at `area`.
|
||||
pub fn draw_workflow_panel(frame: &mut Frame, area: Rect, state: &crate::app::state::rest::AppStateRest) {
|
||||
let block = Block::default()
|
||||
.borders(Borders::ALL)
|
||||
|
||||
Reference in New Issue
Block a user