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

Method new

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

Source from the content-addressed store, hash-verified

25
26impl ThemeListDialog {
27 pub fn new() -> Self {
28 let mut state = ListState::default();
29 state.select(Some(0));
30 Self {
31 options: Vec::new(),
32 filtered: Vec::new(),
33 query: String::new(),
34 initial_theme: "opencode@dark".to_string(),
35 state,
36 open: false,
37 }
38 }
39
40 pub fn set_options(&mut self, mut options: Vec<ThemeOption>) {
41 options.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase()));

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected