@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.esm.js CHANGED
@@ -5800,6 +5800,26 @@ const prompt = defineType({
5800
5800
  type: userInput.name,
5801
5801
  }),*/]
5802
5802
  });
5803
+ const outputFieldType = defineType({
5804
+ type: "object",
5805
+ name: outputFieldTypeName,
5806
+ title: "Output field",
5807
+ fields: [defineField({
5808
+ type: "string",
5809
+ name: "path",
5810
+ title: "Path"
5811
+ })]
5812
+ });
5813
+ const outputTypeType = defineType({
5814
+ type: "object",
5815
+ name: outputTypeTypeName,
5816
+ title: "Output type",
5817
+ fields: [defineField({
5818
+ type: "string",
5819
+ name: "type",
5820
+ title: "Type"
5821
+ })]
5822
+ });
5803
5823
  const instruction = defineType({
5804
5824
  type: "object",
5805
5825
  name: instructionTypeName,
@@ -5937,23 +5957,9 @@ const instruction = defineType({
5937
5957
  field: InstructionOutputField
5938
5958
  },
5939
5959
  of: [defineArrayMember({
5940
- type: "object",
5941
- name: outputFieldTypeName,
5942
- title: "Output field",
5943
- fields: [{
5944
- type: "string",
5945
- name: "path",
5946
- title: "Path"
5947
- }]
5960
+ type: outputFieldType.name
5948
5961
  }), defineArrayMember({
5949
- type: "object",
5950
- name: outputTypeTypeName,
5951
- title: "Output type",
5952
- fields: [{
5953
- type: "string",
5954
- name: "type",
5955
- title: "Type"
5956
- }]
5962
+ type: outputTypeType.name
5957
5963
  })]
5958
5964
  })]
5959
5965
  });
@@ -6101,7 +6107,7 @@ function excludeComments(type) {
6101
6107
  };
6102
6108
  }
6103
6109
  const instructionForm = [fieldInstructions, instruction, fieldReference, prompt, userInput, promptContext].map(excludeComments);
6104
- const schemaTypes = [...instructionForm, assistDocumentSchema, documentInstructionStatus, instructionTask, contextDocumentSchema];
6110
+ const schemaTypes = [...instructionForm, outputFieldType, outputTypeType, assistDocumentSchema, documentInstructionStatus, instructionTask, contextDocumentSchema];
6105
6111
  function useAssistSupported(path, schemaType) {
6106
6112
  return useMemo(() => isAssistSupported(schemaType), [schemaType]);
6107
6113
  }