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

Function parse_string_array

crates/opencode-session/src/llm.rs:1019–1026  ·  view source on GitHub ↗
(value: &serde_json::Value)

Source from the content-addressed store, hash-verified

1017}
1018
1019fn parse_string_array(value: &serde_json::Value) -> Option<Vec<String>> {
1020 value.as_array().map(|items| {
1021 items
1022 .iter()
1023 .filter_map(|item| item.as_str().map(|s| s.to_string()))
1024 .collect()
1025 })
1026}
1027
1028fn apply_chat_system_hook_outputs(
1029 system_prompt: &mut Vec<String>,

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected