mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-31 01:36:45 +00:00
fix: streaming robustness — OpenAI parsing, error detection, reasoning content
Improves SSE parsing with raw JSON error detection, HTML response detection (for misconfigured endpoints), thinking/reasoning content from provider-specific delta fields, #[serde(default)] on streaming types for lenient deserialization, compact session boundary guard, and /team slash command. Adds install.sh convenience script.
This commit is contained in:
@@ -128,7 +128,7 @@ pub fn compact_session(session: &Session, config: CompactionConfig) -> Compactio
|
||||
// is NOT an assistant message that contains a ToolUse block (i.e. the
|
||||
// pair is actually broken at the boundary).
|
||||
loop {
|
||||
if k == 0 || k <= compacted_prefix_len {
|
||||
if k == 0 || k <= compacted_prefix_len || k >= session.messages.len() {
|
||||
break;
|
||||
}
|
||||
let first_preserved = &session.messages[k];
|
||||
|
||||
Reference in New Issue
Block a user