mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 15:15:02 +00:00
parent
8a4f7fe0e8
commit
914efb6fcc
21 changed files with 95 additions and 41 deletions
|
@ -286,8 +286,10 @@ export type StrictMessageContent = {
|
|||
};
|
||||
|
||||
export type MessageContent = string | StrictMessageContent;
|
||||
export const zMessageContent = z.union([zBoundedCharacters(0, 4000), zStrictMessageContent]) as z.ZodType<MessageContent>;
|
||||
|
||||
export const zMessageContent = z.union([
|
||||
zBoundedCharacters(0, 4000),
|
||||
zStrictMessageContent,
|
||||
]) as z.ZodType<MessageContent>;
|
||||
|
||||
export function validateAndParseMessageContent(input: unknown): StrictMessageContent {
|
||||
if (input == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue