feat(tui): update system message for clarity and conciseness in tool usage instructions

This commit is contained in:
asepharyana
2026-07-20 14:47:55 +07:00
parent fe2e916937
commit 5a373d1031
10 changed files with 130 additions and 21 deletions
@@ -16,6 +16,7 @@ pub mod quit_confirm;
pub mod rewind;
pub mod settings;
pub mod todo;
pub mod plan;
pub mod usage;
use crate::state::{AppStateRest, Overlay};
@@ -95,6 +96,9 @@ pub fn render_overlay(
Overlay::Todo => {
todo::render(frame, overlay_area, block, state);
}
Overlay::Plan => {
plan::render(frame, overlay_area, block, state);
}
Overlay::Rewind => {
rewind::render(frame, overlay_area, block, state);
}
@@ -0,0 +1,32 @@
//! Overlay: Project Plan view — shows the full project plan content.
use ratatui::style::{Modifier, Style};
use ratatui::text::Span;
use ratatui::widgets::{Block, Paragraph, Wrap};
use ratatui::Frame;
use crate::view::theme::Theme;
/// Render the Project Plan overlay.
pub fn render(
frame: &mut Frame,
area: ratatui::layout::Rect,
block: Block<'static>,
state: &crate::state::AppStateRest,
) {
let block = block
.title(Span::styled(
" Project Plan ",
Style::default()
.fg(Theme::ACCENT_TEAL)
.add_modifier(Modifier::BOLD),
))
.border_style(Style::default().fg(Theme::ACCENT_TEAL));
let content = if state.misc.plan_content.is_empty() {
" No active project plan."
} else {
&state.misc.plan_content
};
let paragraph = Paragraph::new(content)
.block(block)
.wrap(Wrap { trim: false });
frame.render_widget(paragraph, area);
}