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

Method clear

crates/opencode-tui/src/components/prompt.rs:529–538  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

527 }
528
529 pub fn clear(&mut self) {
530 self.input.clear();
531 self.cursor_position = 0;
532 self.history_index = None;
533 self.history_draft = None;
534 self.suggestions.clear();
535 self.suggestion_index = None;
536 self.mode = PromptMode::Normal;
537 self.reset_interrupt_confirmation();
538 }
539
540 pub fn set_focused(&mut self, focused: bool) {
541 self.focused = focused;

Callers 15

reset_hiddenMethod · 0.45
render_messagesMethod · 0.45
take_inputMethod · 0.45
stash_currentMethod · 0.45
recompute_suggestionsMethod · 0.45
askMethod · 0.45
closeMethod · 0.45
confirmMethod · 0.45
closeMethod · 0.45
closeMethod · 0.45
parse_markdownFunction · 0.45
parse_inlineFunction · 0.45

Calls 1

Tested by

no test coverage detected