@sanity/assist 4.4.0 → 4.4.1

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/README.md CHANGED
@@ -1000,7 +1000,7 @@ prop can be used to parameterize Agent Actions on sanity client.
1000
1000
  #### Agent Action examples
1001
1001
 
1002
1002
  Below are some examples of agent action integration.
1003
- For more, see [HOW-TO_USE](../studio/examples/agentActions/HOW-TO-USE.md)
1003
+ For more, see [HOW-TO-USE](../studio/examples/agentActions/HOW-TO-USE.md)
1004
1004
 
1005
1005
  ##### Fix spelling
1006
1006
 
package/dist/index.esm.js 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);