pub fn extract_response_text(response: &Value) -> Option<String>Expand description
Extract text from various response formats.
Handles three formats:
- New array format (VS Code Copilot Chat 0.37+): response is a JSON array of
response parts, each with an optional
kindfield. Markdown content parts havekind: ""(or absent) and avaluefield containing the text. - Legacy object format: response is
{"value": [{"value": "text"}, ...]}. - Simple formats: response has
"text"or"content"string fields.