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

Method ask

crates/opencode-tui/src/components/question.rs:56–63  ·  view source on GitHub ↗
(&mut self, question: QuestionRequest)

Source from the content-addressed store, hash-verified

54 }
55
56 pub fn ask(&mut self, question: QuestionRequest) {
57 let option_count = question.options.len();
58 self.current_question = Some(question);
59 self.is_open = true;
60 self.selected_index = 0;
61 self.selected_options = vec![false; option_count];
62 self.text_input.clear();
63 }
64
65 pub fn current(&self) -> Option<&QuestionRequest> {
66 self.current_question.as_ref()

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected