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

Method new

crates/opencode-tui/src/components/question.rs:45–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44impl QuestionPrompt {
45 pub fn new() -> Self {
46 Self {
47 current_question: None,
48 is_open: false,
49 selected_index: 0,
50 selected_options: Vec::new(),
51 text_input: String::new(),
52 last_rendered_area: Cell::new(None),
53 }
54 }
55
56 pub fn ask(&mut self, question: QuestionRequest) {
57 let option_count = question.options.len();

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected