MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / draw_command_bar

Function draw_command_bar

crates/openshell-tui/src/ui/mod.rs:472–485  ·  view source on GitHub ↗
(frame: &mut Frame<'_>, app: &App, area: Rect)

Source from the content-addressed store, hash-verified

470}
471
472fn draw_command_bar(frame: &mut Frame<'_>, app: &App, area: Rect) {
473 let t = &app.theme;
474 let line = match app.input_mode {
475 InputMode::Command => Line::from(vec![
476 Span::styled(" :", t.accent_bold),
477 Span::styled(&app.command_input, t.text),
478 Span::styled("_", t.accent),
479 ]),
480 InputMode::Normal => Line::from(vec![Span::styled("", t.muted)]),
481 };
482
483 let bar = Paragraph::new(line).block(Block::default().borders(Borders::NONE));
484 frame.render_widget(bar, area);
485}
486
487/// Render an empty-state message inside a bordered panel.
488///

Callers 1

drawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected