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

Method parse_legacy_sse_line

crates/opencode-provider/src/openai.rs:472–482  ·  view source on GitHub ↗
(line: &str, state: &mut LegacySseParserState)

Source from the content-addressed store, hash-verified

470 }
471
472 fn parse_legacy_sse_line(line: &str, state: &mut LegacySseParserState) -> Vec<StreamEvent> {
473 let line = line.trim();
474 if !line.starts_with("data:") {
475 return Vec::new();
476 }
477 let data = line.trim_start_matches("data:").trim();
478 if data.is_empty() {
479 return Vec::new();
480 }
481 Self::parse_legacy_sse_data(data, state)
482 }
483
484 fn drain_legacy_sse_events(
485 buffer: &mut String,

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
is_emptyMethod · 0.80

Tested by

no test coverage detected