@sanity/assist 4.4.0 → 4.4.2

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.mjs CHANGED
@@ -242,7 +242,8 @@ function isSchemaAssistEnabled(type) {
242
242
  return !type.options?.aiAssist?.exclude;
243
243
  }
244
244
  function isAssistSupported(type) {
245
- return !isSchemaAssistEnabled(type) || isDisabled(type) ? !1 : type.jsonType === "array" ? !type.of.every((t) => isDisabled(t)) : type.jsonType === "object" ? !type.fields.every((field) => isDisabled(field.type)) : !0;
245
+ return !isSchemaAssistEnabled(type) || isDisabled(type) ? !1 : type.jsonType === "array" ? !type.of.every((t) => isDisabled(t)) : type.jsonType === "object" ? !type.fields.every((field) => isDisabled(field.type)) || /* to allow attaching custom actions on fieldless images */
246
+ isType(type, "image") : !0;
246
247
  }
247
248
  function isDisabled(type) {
248
249
  return !isSchemaAssistEnabled(type) || isUnsupportedType(type);