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

Method copy_prompt_to_clipboard

crates/opencode-tui/src/app/app.rs:1791–1801  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1789 }
1790
1791 fn copy_prompt_to_clipboard(&mut self) {
1792 let content = self.prompt.get_input().trim();
1793 if content.is_empty() {
1794 return;
1795 }
1796 if let Err(err) = Clipboard::write_text(content) {
1797 self.alert_dialog
1798 .set_message(&format!("Failed to write clipboard:\n{}", err));
1799 self.alert_dialog.open();
1800 }
1801 }
1802
1803 fn cut_prompt_to_clipboard(&mut self) {
1804 let content = self.prompt.get_input().trim();

Callers 2

handle_eventMethod · 0.80

Calls 4

get_inputMethod · 0.80
is_emptyMethod · 0.80
set_messageMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected