fix(ui): fix missing tags on template parse

This commit is contained in:
psychedelicious 2023-08-19 17:31:21 +10:00
parent adb05cde5b
commit 385765faec
2 changed files with 3 additions and 6 deletions

View File

@ -495,11 +495,8 @@ export type TypeHints = {
export type InvocationSchemaExtra = { export type InvocationSchemaExtra = {
output: OpenAPIV3.ReferenceObject; // the output of the invocation output: OpenAPIV3.ReferenceObject; // the output of the invocation
ui?: {
tags?: string[];
title?: string;
};
title: string; title: string;
tags?: string[];
properties: Omit< properties: Omit<
NonNullable<OpenAPIV3.SchemaObject['properties']> & NonNullable<OpenAPIV3.SchemaObject['properties']> &
(_InputField | _OutputField), (_InputField | _OutputField),

View File

@ -36,8 +36,8 @@ export const parseSchema = (
>((acc, schema) => { >((acc, schema) => {
if (isInvocationSchemaObject(schema)) { if (isInvocationSchemaObject(schema)) {
const type = schema.properties.type.default; const type = schema.properties.type.default;
const title = schema.ui?.title ?? schema.title.replace('Invocation', ''); const title = schema.title.replace('Invocation', '');
const tags = schema.ui?.tags ?? []; const tags = schema.tags ?? [];
const description = schema.description ?? ''; const description = schema.description ?? '';
const inputs = reduce( const inputs = reduce(