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

Method new

crates/opencode-tui/src/components/dialogs/mcp.rs:27–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26impl McpDialog {
27 pub fn new() -> Self {
28 let mut state = ListState::default();
29 state.select(Some(0));
30 Self {
31 items: Vec::new(),
32 state,
33 open: false,
34 }
35 }
36
37 pub fn set_items(&mut self, mut items: Vec<McpItem>) {
38 items.sort_by(|a, b| a.name.cmp(&b.name));

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected