feat(chat): persist safe Codex next-turn model selection
This commit is contained in:
@@ -166,7 +166,14 @@ func handleChatModelSwitch(ctx context.Context, request protocol.Message, broker
|
||||
_ = write(protocol.Message{Type: protocol.Error, ID: request.ID, Error: err.Error()})
|
||||
return
|
||||
}
|
||||
_ = write(protocol.Message{Type: protocol.ChatModelSelect, ID: request.ID, ModelRequest: body})
|
||||
reply := *body
|
||||
reply.Selection = ""
|
||||
if reporter, ok := broker.(interface {
|
||||
ModelSelectionMode(context.Context, string) string
|
||||
}); ok {
|
||||
reply.Selection = reporter.ModelSelectionMode(ctx, body.SessionID)
|
||||
}
|
||||
_ = write(protocol.Message{Type: protocol.ChatModelSelect, ID: request.ID, ModelRequest: &reply})
|
||||
}
|
||||
|
||||
// handleChatSubscribe attaches one connection to a session's shared stream so it
|
||||
|
||||
Reference in New Issue
Block a user