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

Method new

crates/opencode-tui/src/components/thinking.rs:19–28  ·  view source on GitHub ↗
(content: String)

Source from the content-addressed store, hash-verified

17
18impl ThinkingBlock {
19 pub fn new(content: String) -> Self {
20 // Strip [REDACTED] markers from content
21 let cleaned = content.replace("[REDACTED]", "").trim().to_string();
22 Self {
23 content: cleaned,
24 duration_ms: None,
25 collapsed: true,
26 visible: true,
27 }
28 }
29
30 pub fn with_duration(mut self, ms: u64) -> Self {
31 self.duration_ms = Some(ms);

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected