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

Method new

crates/opencode-tui/src/components/dialogs/skill_list.rs:20–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19impl SkillListDialog {
20 pub fn new() -> Self {
21 let mut state = ListState::default();
22 state.select(Some(0));
23 Self {
24 skills: Vec::new(),
25 filtered: Vec::new(),
26 query: String::new(),
27 state,
28 open: false,
29 }
30 }
31
32 pub fn set_skills(&mut self, mut skills: Vec<String>) {
33 skills.sort_by(|a, b| a.to_ascii_lowercase().cmp(&b.to_ascii_lowercase()));

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected