@sanity/assist 2.0.3 → 2.0.4

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
@@ -5813,6 +5813,26 @@ const prompt = sanity.defineType({
5813
5813
  type: userInput.name,
5814
5814
  }),*/]
5815
5815
  });
5816
+ const outputFieldType = sanity.defineType({
5817
+ type: "object",
5818
+ name: outputFieldTypeName,
5819
+ title: "Output field",
5820
+ fields: [sanity.defineField({
5821
+ type: "string",
5822
+ name: "path",
5823
+ title: "Path"
5824
+ })]
5825
+ });
5826
+ const outputTypeType = sanity.defineType({
5827
+ type: "object",
5828
+ name: outputTypeTypeName,
5829
+ title: "Output type",
5830
+ fields: [sanity.defineField({
5831
+ type: "string",
5832
+ name: "type",
5833
+ title: "Type"
5834
+ })]
5835
+ });
5816
5836
  const instruction = sanity.defineType({
5817
5837
  type: "object",
5818
5838
  name: instructionTypeName,
@@ -5950,23 +5970,9 @@ const instruction = sanity.defineType({
5950
5970
  field: InstructionOutputField
5951
5971
  },
5952
5972
  of: [sanity.defineArrayMember({
5953
- type: "object",
5954
- name: outputFieldTypeName,
5955
- title: "Output field",
5956
- fields: [{
5957
- type: "string",
5958
- name: "path",
5959
- title: "Path"
5960
- }]
5973
+ type: outputFieldType.name
5961
5974
  }), sanity.defineArrayMember({
5962
- type: "object",
5963
- name: outputTypeTypeName,
5964
- title: "Output type",
5965
- fields: [{
5966
- type: "string",
5967
- name: "type",
5968
- title: "Type"
5969
- }]
5975
+ type: outputTypeType.name
5970
5976
  })]
5971
5977
  })]
5972
5978
  });
@@ -6114,7 +6120,7 @@ function excludeComments(type) {
6114
6120
  };
6115
6121
  }
6116
6122
  const instructionForm = [fieldInstructions, instruction, fieldReference, prompt, userInput, promptContext].map(excludeComments);
6117
- const schemaTypes = [...instructionForm, assistDocumentSchema, documentInstructionStatus, instructionTask, contextDocumentSchema];
6123
+ const schemaTypes = [...instructionForm, outputFieldType, outputTypeType, assistDocumentSchema, documentInstructionStatus, instructionTask, contextDocumentSchema];
6118
6124
  function useAssistSupported(path, schemaType) {
6119
6125
  return react.useMemo(() => isAssistSupported(schemaType), [schemaType]);
6120
6126
  }