@sanity/assist 2.0.3 → 2.0.4-canary.0
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 +23 -17
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/schemas/assistDocumentSchema.tsx +28 -24
- package/src/schemas/index.ts +4 -0
package/package.json
CHANGED
|
@@ -218,6 +218,32 @@ export const prompt = defineType({
|
|
|
218
218
|
],
|
|
219
219
|
})
|
|
220
220
|
|
|
221
|
+
export const outputFieldType = defineType({
|
|
222
|
+
type: 'object',
|
|
223
|
+
name: outputFieldTypeName,
|
|
224
|
+
title: 'Output field',
|
|
225
|
+
fields: [
|
|
226
|
+
defineField({
|
|
227
|
+
type: 'string',
|
|
228
|
+
name: 'path',
|
|
229
|
+
title: 'Path',
|
|
230
|
+
}),
|
|
231
|
+
],
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
export const outputTypeType = defineType({
|
|
235
|
+
type: 'object',
|
|
236
|
+
name: outputTypeTypeName,
|
|
237
|
+
title: 'Output type',
|
|
238
|
+
fields: [
|
|
239
|
+
defineField({
|
|
240
|
+
type: 'string',
|
|
241
|
+
name: 'type',
|
|
242
|
+
title: 'Type',
|
|
243
|
+
}),
|
|
244
|
+
],
|
|
245
|
+
})
|
|
246
|
+
|
|
221
247
|
export const instruction = defineType({
|
|
222
248
|
type: 'object',
|
|
223
249
|
name: instructionTypeName,
|
|
@@ -342,30 +368,8 @@ export const instruction = defineType({
|
|
|
342
368
|
field: InstructionOutputField,
|
|
343
369
|
},
|
|
344
370
|
of: [
|
|
345
|
-
defineArrayMember({
|
|
346
|
-
|
|
347
|
-
name: outputFieldTypeName,
|
|
348
|
-
title: 'Output field',
|
|
349
|
-
fields: [
|
|
350
|
-
{
|
|
351
|
-
type: 'string',
|
|
352
|
-
name: 'path',
|
|
353
|
-
title: 'Path',
|
|
354
|
-
},
|
|
355
|
-
],
|
|
356
|
-
}),
|
|
357
|
-
defineArrayMember({
|
|
358
|
-
type: 'object' as const,
|
|
359
|
-
name: outputTypeTypeName,
|
|
360
|
-
title: 'Output type',
|
|
361
|
-
fields: [
|
|
362
|
-
{
|
|
363
|
-
type: 'string',
|
|
364
|
-
name: 'type',
|
|
365
|
-
title: 'Type',
|
|
366
|
-
},
|
|
367
|
-
],
|
|
368
|
-
}),
|
|
371
|
+
defineArrayMember({type: outputFieldType.name}),
|
|
372
|
+
defineArrayMember({type: outputTypeType.name}),
|
|
369
373
|
],
|
|
370
374
|
}),
|
|
371
375
|
],
|
package/src/schemas/index.ts
CHANGED
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
fieldReference,
|
|
7
7
|
instruction,
|
|
8
8
|
instructionTask,
|
|
9
|
+
outputFieldType,
|
|
10
|
+
outputTypeType,
|
|
9
11
|
prompt,
|
|
10
12
|
promptContext,
|
|
11
13
|
userInput,
|
|
@@ -57,6 +59,8 @@ const instructionForm = [
|
|
|
57
59
|
|
|
58
60
|
export const schemaTypes = [
|
|
59
61
|
...instructionForm,
|
|
62
|
+
outputFieldType,
|
|
63
|
+
outputTypeType,
|
|
60
64
|
assistDocumentSchema,
|
|
61
65
|
documentInstructionStatus,
|
|
62
66
|
instructionTask,
|