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

Function text_from_parts

crates/opencode-server/src/routes.rs:1977–1989  ·  view source on GitHub ↗
(parts: &[TextPartInput])

Source from the content-addressed store, hash-verified

1975}
1976
1977fn text_from_parts(parts: &[TextPartInput]) -> String {
1978 parts
1979 .iter()
1980 .filter_map(|p| {
1981 if p.part_type.as_deref() == Some("text") {
1982 p.text.as_deref()
1983 } else {
1984 None
1985 }
1986 })
1987 .collect::<Vec<_>>()
1988 .join(" ")
1989}
1990
1991async fn prompt_async(
1992 State(state): State<Arc<ServerState>>,

Callers 1

prompt_asyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected