fix(openai): avoid developer transcript resets

- Narrow websocket transcript replacement detection to assistant outputs and function calls
- Preserve existing merge behavior for follow-up developer messages without previous_response_id
- Add a regression test covering mid-session developer message updates
This commit is contained in:
apparition
2026-03-30 23:33:16 +08:00
parent c1d7599829
commit a3e21df814
2 changed files with 27 additions and 1 deletions
@@ -374,7 +374,7 @@ func shouldReplaceWebsocketTranscript(rawJSON []byte, nextInput gjson.Result) bo
return true
case "message":
role := strings.TrimSpace(item.Get("role").String())
if role == "assistant" || role == "developer" {
if role == "assistant" {
return true
}
}