codetether_agent/tui/
lsp.rs1use ratatui::{
2 Frame,
3 layout::{Constraint, Direction, Layout, Rect},
4 text::Line,
5 widgets::{Block, Borders, Paragraph, Wrap},
6};
7
8use crate::tui::input::render_input_preview;
9
10pub fn render_lsp(f: &mut Frame, area: Rect, cwd: &str, status: &str) {
11 let chunks = Layout::default()
12 .direction(Direction::Vertical)
13 .constraints([Constraint::Min(8), Constraint::Length(3)])
14 .split(area);
15
16 let lines = vec![
17 Line::from("LSP Workspace View"),
18 Line::from(""),
19 Line::from(format!("Workspace: {cwd}")),
20 Line::from(format!("Status: {status}")),
21 Line::from(""),
22 Line::from("Integrated shell for LSP-centric workflows."),
23 Line::from("Planned next step: connect symbol search and diagnostics navigation."),
24 Line::from("For now, use this view as a dedicated workspace/introspection panel."),
25 Line::from(""),
26 Line::from("Use /help for commands and Esc or /chat to return to chat."),
27 ];
28
29 let widget = Paragraph::new(lines)
30 .block(Block::default().borders(Borders::ALL).title("LSP"))
31 .wrap(Wrap { trim: false });
32 f.render_widget(widget, chunks[0]);
33 render_input_preview(f, chunks[1], "Symbol search / diagnostics command preview");
34}