opencode-feishu 0.7.12 → 0.7.13

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.js CHANGED
@@ -99246,12 +99246,19 @@ function extractErrorFields(error) {
99246
99246
  const dataMsg = e.data.message;
99247
99247
  if (typeof dataMsg === "string" && dataMsg.length > 0) fields.push(dataMsg);
99248
99248
  }
99249
+ if (e.data && typeof e.data === "object" && "error" in e.data) {
99250
+ const dataErr = e.data.error;
99251
+ if (dataErr && typeof dataErr === "object") {
99252
+ const errStrings = Object.values(dataErr).filter((v) => typeof v === "string" && v.length > 0);
99253
+ fields.push(...errStrings);
99254
+ }
99255
+ }
99249
99256
  return [...new Set(fields)];
99250
99257
  }
99251
99258
  return [String(error)];
99252
99259
  }
99253
99260
  function isModelError(fields) {
99254
- const patterns = ["model not found", "modelnotfound", "model not supported", "model_not_supported"];
99261
+ const patterns = ["model not found", "modelnotfound", "model not supported", "model_not_supported", "model is not supported"];
99255
99262
  return fields.some((f) => {
99256
99263
  const l = f.toLowerCase();
99257
99264
  return patterns.some((p) => l.includes(p));