MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / render

Method render

crates/opencode-tui/src/components/tool_views.rs:27–41  ·  view source on GitHub ↗
(&self, frame: &mut Frame, area: Rect, theme: &Theme)

Source from the content-addressed store, hash-verified

25 }
26
27 pub fn render(&self, frame: &mut Frame, area: Rect, theme: &Theme) {
28 let count = self.matches.as_ref().map(|m| m.len()).unwrap_or(0);
29
30 let line = Line::from(vec![
31 Span::styled("glob ", Style::default().fg(theme.primary)),
32 Span::styled(&self.pattern, Style::default().fg(theme.text)),
33 Span::styled(
34 format!(" ({} matches)", count),
35 Style::default().fg(theme.text_muted),
36 ),
37 ]);
38
39 let paragraph = Paragraph::new(line);
40 frame.render_widget(paragraph, area);
41 }
42}
43
44pub struct GrepToolView {

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
countMethod · 0.80
is_emptyMethod · 0.80
with_contentMethod · 0.80
cloneMethod · 0.45
to_linesMethod · 0.45

Tested by

no test coverage detected