- Added tracing instrumentation and improved logging messages in the Pong, Todofinish, and Todowrite tools for better debugging and monitoring. - Enhanced documentation comments for clarity on tool functionalities and workflows. - Implemented tracing in WorkflowRun, NoteFinding, ReadFindings, and HiveMind tools to track execution phases and findings. - Updated TUI overlays (e.g., Bash, Clear Confirm, Editor, Effort Level, Help, Key Input, Learning, Loading, MCP, Model Selector, Plan, Quit Confirm, Rewind, Settings, Todo, Usage) with debug logging to capture rendering details. - Improved the status bar and workflow panel rendering with additional debug information. - Added tracing to various utility functions to facilitate better performance monitoring and error tracking.
40 lines
1.2 KiB
Rust
40 lines
1.2 KiB
Rust
//! Overlay: confirm-before-clear dialog for the chat transcript.
|
|
use ratatui::style::{Modifier, Style};
|
|
use ratatui::text::{Line, Span};
|
|
use ratatui::widgets::{Block, Paragraph};
|
|
use ratatui::Frame;
|
|
use crate::view::theme::Theme;
|
|
use tracing::debug;
|
|
|
|
/// Render the Clear Transcript confirmation dialog.
|
|
#[tracing::instrument(skip_all)]
|
|
pub fn render(
|
|
frame: &mut Frame,
|
|
area: ratatui::layout::Rect,
|
|
block: Block<'static>,
|
|
_state: &crate::state::AppStateRest,
|
|
) {
|
|
debug!("Rendering Clear Transcript confirmation overlay");
|
|
let block = block
|
|
.title(Span::styled(
|
|
" Clear Transcript ",
|
|
Style::default()
|
|
.fg(Theme::WARNING)
|
|
.add_modifier(Modifier::BOLD),
|
|
))
|
|
.border_style(Style::default().fg(Theme::WARNING));
|
|
let lines = vec![
|
|
Line::from(Span::styled(
|
|
" Clear all messages from the transcript?",
|
|
Style::default().fg(Theme::TEXT),
|
|
)),
|
|
Line::from(Span::raw("")),
|
|
Line::from(Span::styled(
|
|
" Enter to confirm · Esc to cancel",
|
|
Style::default().fg(Theme::TEXT_DIM),
|
|
)),
|
|
];
|
|
let paragraph = Paragraph::new(lines).block(block);
|
|
frame.render_widget(paragraph, area);
|
|
}
|