Unify structured call completion and retain typed failures
This commit is contained in:
@@ -36,14 +36,15 @@ func (c *RoleClient) Coordinate(ctx context.Context, start *structuredoutput.Exc
|
||||
return &pk.RunRequest{}, nil
|
||||
}
|
||||
var output json.RawMessage
|
||||
pending, err = c.prepareCall(ctx, *selected, &output, nil)
|
||||
call, err := c.prepareCall(ctx, *selected, &output, nil)
|
||||
if err != nil {
|
||||
_, domainErr := next(ctx, structuredoutput.Turn{Response: &structuredoutput.Response{}, Err: err})
|
||||
_, domainErr := next(ctx, structuredoutput.Turn{Response: &call.response, Err: err})
|
||||
if domainErr != nil {
|
||||
return nil, domainErr
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
pending = call
|
||||
return &pending.request, nil
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user