mirror of https://github.com/buster-so/buster.git
Make a Base Asset and extend off of it
This commit is contained in:
parent
9e0ff140cd
commit
d5f43fbcf4
|
@ -1,11 +1,9 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
export const AssetTypeSchema = z.enum([
|
||||
'chat',
|
||||
'metric_file',
|
||||
'dashboard_file',
|
||||
'report_file',
|
||||
'collection',
|
||||
]);
|
||||
export const BaseAssetTypeSchema = z.enum(['metric_file', 'dashboard_file', 'report_file']);
|
||||
|
||||
export type BaseAssetType = z.infer<typeof BaseAssetTypeSchema>;
|
||||
|
||||
export const AssetTypeSchema = z.enum([...BaseAssetTypeSchema.options, 'chat', 'collection']);
|
||||
|
||||
export type AssetType = z.infer<typeof AssetTypeSchema>;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { ChatMessageReasoningMessage, ChatMessageResponseMessage } from '@buster/database';
|
||||
import { z } from 'zod';
|
||||
import { AssetTypeSchema, BaseAssetTypeSchema } from '../assets/asset-types.types';
|
||||
import { PostProcessingMessageSchema } from '../message';
|
||||
|
||||
// Re-create the schemas locally to avoid ESM/CommonJS issues
|
||||
|
@ -56,9 +56,7 @@ const ReasoningMessage_TextSchema = z.object({
|
|||
});
|
||||
|
||||
const ReasoningFileTypeSchema = z.enum([
|
||||
'metric_file',
|
||||
'dashboard_file',
|
||||
'report_file',
|
||||
...BaseAssetTypeSchema.options,
|
||||
'reasoning',
|
||||
'agent-action',
|
||||
'todo',
|
||||
|
|
Loading…
Reference in New Issue