fix(codex): load persisted threads only on explicit send after refusal
This commit is contained in:
@@ -42,7 +42,11 @@ func modelTestChat(t *testing.T, handle func(string, json.RawMessage) any) *Chat
|
||||
return
|
||||
}
|
||||
result := handle(req.Method, req.Params)
|
||||
if err := wsjson.Write(ctx, conn, map[string]any{"id": req.ID, "result": result}); err != nil {
|
||||
response := map[string]any{"id": req.ID, "result": result}
|
||||
if failure, ok := result.(*rpcError); ok {
|
||||
response = map[string]any{"id": req.ID, "error": failure}
|
||||
}
|
||||
if err := wsjson.Write(ctx, conn, response); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user