supercompat 2.31.0 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3910,14 +3910,14 @@ var post11 = function(param) {
3910
3910
  var prisma = param.prisma;
3911
3911
  return /*#__PURE__*/ function() {
3912
3912
  var _ref = _async_to_generator(function(urlString, options) {
3913
- var url, _url_pathname_match, threadId, body, role, content, message;
3913
+ var url, _url_pathname_match, threadId, body, role, content, metadata, message;
3914
3914
  return _ts_generator(this, function(_state) {
3915
3915
  switch(_state.label){
3916
3916
  case 0:
3917
3917
  url = new URL(urlString);
3918
3918
  _url_pathname_match = _sliced_to_array(url.pathname.match(new RegExp(messagesRegexp)), 2), threadId = _url_pathname_match[1];
3919
3919
  body = JSON.parse(options.body);
3920
- role = body.role, content = body.content;
3920
+ role = body.role, content = body.content, metadata = body.metadata;
3921
3921
  return [
3922
3922
  4,
3923
3923
  prisma.message.create({
@@ -3926,7 +3926,8 @@ var post11 = function(param) {
3926
3926
  content: messageContentBlocks({
3927
3927
  content: content
3928
3928
  }),
3929
- role: role === "user" ? "USER" : "ASSISTANT"
3929
+ role: role === "user" ? "USER" : "ASSISTANT",
3930
+ metadata: metadata || {}
3930
3931
  }
3931
3932
  })
3932
3933
  ];