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

Method open

crates/opencode-tui/src/components/dialogs/fork.rs:36–45  ·  view source on GitHub ↗
(&mut self, session_id: String, entries: Vec<ForkEntry>)

Source from the content-addressed store, hash-verified

34 }
35
36 pub fn open(&mut self, session_id: String, entries: Vec<ForkEntry>) {
37 self.session_id = Some(session_id);
38 self.entries = entries;
39 self.state.select(if self.entries.is_empty() {
40 None
41 } else {
42 Some(0)
43 });
44 self.open = true;
45 }
46
47 pub fn close(&mut self) {
48 self.open = false;

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected