MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / collect_run_input

Function collect_run_input

crates/opencode-cli/src/main.rs:1044–1057  ·  view source on GitHub ↗
(message: Vec<String>)

Source from the content-addressed store, hash-verified

1042}
1043
1044fn collect_run_input(message: Vec<String>) -> anyhow::Result<String> {
1045 let mut input = message.join(" ");
1046 if !io::stdin().is_terminal() {
1047 let mut piped = String::new();
1048 io::stdin().read_to_string(&mut piped)?;
1049 if !piped.trim().is_empty() {
1050 if !input.trim().is_empty() {
1051 input.push('\n');
1052 }
1053 input.push_str(piped.trim_end());
1054 }
1055 }
1056 Ok(input)
1057}
1058
1059#[derive(Debug, Deserialize)]
1060struct RemoteSessionInfo {

Callers 1

run_non_interactiveFunction · 0.85

Calls 2

newFunction · 0.85
is_emptyMethod · 0.80

Tested by

no test coverage detected