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,13 @@
|
||||
//! Status bar rendering for the TUI.
|
||||
//!
|
||||
//! Flow: `draw_status_bar` reads live connection/turn state off
|
||||
//! `AppStateRest` every frame and paints a single-line bar at the top
|
||||
//! (or bottom, per layout) of the screen showing agent status, provider,
|
||||
//! and model.
|
||||
//!
|
||||
//! Why: kept as one small, self-contained render function rather than a
|
||||
//! widget struct, matching the other `view/*` modules' functional style.
|
||||
|
||||
use ratatui::layout::Rect;
|
||||
use ratatui::style::{Style, Modifier};
|
||||
use ratatui::text::{Line, Span};
|
||||
@@ -5,6 +15,13 @@ use ratatui::widgets::Block;
|
||||
use ratatui::Frame;
|
||||
use super::theme::Theme;
|
||||
|
||||
/// Render the single-line status bar showing connection state, provider, and model.
|
||||
///
|
||||
/// Flow: derive an agent status label/color from turn-in-flight and API
|
||||
/// connection state → build left ([zesdex] STATUS) and right
|
||||
/// (provider · model) span groups → render as one styled Line.
|
||||
///
|
||||
/// Return: nothing; draws directly into `frame` at `area`.
|
||||
pub fn draw_status_bar(frame: &mut Frame, area: Rect, state: &crate::app::state::rest::AppStateRest) {
|
||||
// Connection status — reflects actual agent readiness:
|
||||
// PROG → turn is in flight
|
||||
|
||||
Reference in New Issue
Block a user