supercompat 4.0.2 → 4.0.3

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.
@@ -7048,7 +7048,7 @@ var completionsRunAdapter = function() {
7048
7048
  handleRun: function(param) {
7049
7049
  var client = param.client, run5 = param.run, onEvent3 = param.onEvent, getMessages3 = param.getMessages;
7050
7050
  return _async_to_generator(function() {
7051
- var _message5_toolCalls, opts, _tmp, providerResponse, e, _ref, _ref1, _e_cause, message5, toolCallsRunStep, currentContent, currentToolCalls, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, _chunk_choices, choices, choice, delta, _delta_content, err, messageToolCalls, functionToolCalls, pendingFunctionToolCalls, requiredToolCalls;
7051
+ var _message5_toolCalls, opts, _tmp, providerResponse, e, _ref, _ref1, _ref2, _e_status, _e_cause, message5, toolCallsRunStep, currentContent, currentToolCalls, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, _chunk_choices, choices, choice, delta, _delta_content, err, messageToolCalls, functionToolCalls, pendingFunctionToolCalls, requiredToolCalls;
7052
7052
  return _ts_generator(this, function(_state) {
7053
7053
  switch(_state.label){
7054
7054
  case 0:
@@ -7122,8 +7122,8 @@ var completionsRunAdapter = function() {
7122
7122
  failed_at: (0, import_dayjs.default)().unix(),
7123
7123
  status: "in_progress",
7124
7124
  last_error: {
7125
- code: "server_error",
7126
- message: "".concat((_ref = e === null || e === void 0 ? void 0 : e.message) !== null && _ref !== void 0 ? _ref : "", " ").concat((_ref1 = e === null || e === void 0 ? void 0 : (_e_cause = e.cause) === null || _e_cause === void 0 ? void 0 : _e_cause.message) !== null && _ref1 !== void 0 ? _ref1 : "")
7125
+ code: (_ref = (_ref1 = e === null || e === void 0 ? void 0 : e.code) !== null && _ref1 !== void 0 ? _ref1 : e === null || e === void 0 ? void 0 : (_e_status = e.status) === null || _e_status === void 0 ? void 0 : _e_status.toString()) !== null && _ref !== void 0 ? _ref : "server_error",
7126
+ message: "".concat((_ref2 = e === null || e === void 0 ? void 0 : e.message) !== null && _ref2 !== void 0 ? _ref2 : "Unknown error").concat((e === null || e === void 0 ? void 0 : (_e_cause = e.cause) === null || _e_cause === void 0 ? void 0 : _e_cause.message) ? " (cause: ".concat(e.cause.message, ")") : "").concat((e === null || e === void 0 ? void 0 : e.status) ? " [status: ".concat(e.status, "]") : "")
7127
7127
  }
7128
7128
  })
7129
7129
  })
@@ -15204,7 +15204,7 @@ var post15 = function(param) {
15204
15204
  readableStream = new ReadableStream({
15205
15205
  start: function start(controller) {
15206
15206
  return _async_to_generator(function() {
15207
- var error, _ref, _ref1, _error_cause;
15207
+ var error, _ref, _ref1, _ref2, _error_status, _error_cause;
15208
15208
  return _ts_generator(this, function(_state) {
15209
15209
  switch(_state.label){
15210
15210
  case 0:
@@ -15254,8 +15254,8 @@ var post15 = function(param) {
15254
15254
  id: run5.id,
15255
15255
  failed_at: (0, import_dayjs21.default)().unix(),
15256
15256
  last_error: {
15257
- code: "server_error",
15258
- message: "".concat((_ref = error === null || error === void 0 ? void 0 : error.message) !== null && _ref !== void 0 ? _ref : "", " ").concat((_ref1 = error === null || error === void 0 ? void 0 : (_error_cause = error.cause) === null || _error_cause === void 0 ? void 0 : _error_cause.message) !== null && _ref1 !== void 0 ? _ref1 : "")
15257
+ code: (_ref = (_ref1 = error === null || error === void 0 ? void 0 : error.code) !== null && _ref1 !== void 0 ? _ref1 : error === null || error === void 0 ? void 0 : (_error_status = error.status) === null || _error_status === void 0 ? void 0 : _error_status.toString()) !== null && _ref !== void 0 ? _ref : "server_error",
15258
+ message: "".concat((_ref2 = error === null || error === void 0 ? void 0 : error.message) !== null && _ref2 !== void 0 ? _ref2 : "Unknown error").concat((error === null || error === void 0 ? void 0 : (_error_cause = error.cause) === null || _error_cause === void 0 ? void 0 : _error_cause.message) ? " (cause: ".concat(error.cause.message, ")") : "").concat((error === null || error === void 0 ? void 0 : error.status) ? " [status: ".concat(error.status, "]") : "")
15259
15259
  }
15260
15260
  }
15261
15261
  });
@@ -20716,7 +20716,7 @@ var createRunStream = function(param) {
20716
20716
  readableStream = new ReadableStream({
20717
20717
  start: function start(controller) {
20718
20718
  return _async_to_generator(function() {
20719
- var error, _ref, _ref1, _error_cause;
20719
+ var error, _ref, _ref1, _ref2, _error_status, _error_cause;
20720
20720
  return _ts_generator(this, function(_state) {
20721
20721
  switch(_state.label){
20722
20722
  case 0:
@@ -20766,8 +20766,8 @@ var createRunStream = function(param) {
20766
20766
  id: run5.id,
20767
20767
  failed_at: (0, import_dayjs32.default)().unix(),
20768
20768
  last_error: {
20769
- code: "server_error",
20770
- message: "".concat((_ref = error === null || error === void 0 ? void 0 : error.message) !== null && _ref !== void 0 ? _ref : "", " ").concat((_ref1 = error === null || error === void 0 ? void 0 : (_error_cause = error.cause) === null || _error_cause === void 0 ? void 0 : _error_cause.message) !== null && _ref1 !== void 0 ? _ref1 : "")
20769
+ code: (_ref = (_ref1 = error === null || error === void 0 ? void 0 : error.code) !== null && _ref1 !== void 0 ? _ref1 : error === null || error === void 0 ? void 0 : (_error_status = error.status) === null || _error_status === void 0 ? void 0 : _error_status.toString()) !== null && _ref !== void 0 ? _ref : "server_error",
20770
+ message: "".concat((_ref2 = error === null || error === void 0 ? void 0 : error.message) !== null && _ref2 !== void 0 ? _ref2 : "Unknown error").concat((error === null || error === void 0 ? void 0 : (_error_cause = error.cause) === null || _error_cause === void 0 ? void 0 : _error_cause.message) ? " (cause: ".concat(error.cause.message, ")") : "").concat((error === null || error === void 0 ? void 0 : error.status) ? " [status: ".concat(error.status, "]") : "")
20771
20771
  }
20772
20772
  }
20773
20773
  });