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

Method new

crates/opencode-tui/src/components/message.rs:48–58  ·  view source on GitHub ↗
(role: MessageRole)

Source from the content-addressed store, hash-verified

46
47impl MessageView {
48 pub fn new(role: MessageRole) -> Self {
49 Self {
50 role,
51 parts: Vec::new(),
52 model_id: None,
53 duration_ms: None,
54 error: None,
55 show_thinking: true,
56 concealed: false,
57 }
58 }
59
60 pub fn render(&self, frame: &mut Frame, area: Rect, theme: &Theme) {
61 let mut lines: Vec<Line> = Vec::new();

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected