From f91b24e8e3de15dec24a1cf9b36c46f8f23e1cbe Mon Sep 17 00:00:00 2001 From: Blair Lee Date: Fri, 27 Dec 2024 16:43:34 +0900 Subject: [PATCH] mod: update default parse mode for telegram client --- docs/api/type-aliases/Character.md | 6 +----- packages/client-telegram/src/messageManager.ts | 6 +----- packages/core/src/types.ts | 3 +-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/api/type-aliases/Character.md b/docs/api/type-aliases/Character.md index b4f2e55a2..b9dc9c987 100644 --- a/docs/api/type-aliases/Character.md +++ b/docs/api/type-aliases/Character.md @@ -428,13 +428,9 @@ Optional client-specific config > `optional` **teamMemberInterestKeywords**: `string`[] -### clientConfig.telegram.disableParseMode? - -> `optional` **disableParseMode**: `boolean` - ### clientConfig.telegram.parseMode? -> `optional` **parseMode**: `"Markdown" | "MarkdownV2" | "HTML"` +> `optional` **parseMode**: `"Markdown" | "MarkdownV2" | "HTML" | null` ### clientConfig.slack? diff --git a/packages/client-telegram/src/messageManager.ts b/packages/client-telegram/src/messageManager.ts index 198a04547..4683c2b3f 100644 --- a/packages/client-telegram/src/messageManager.ts +++ b/packages/client-telegram/src/messageManager.ts @@ -706,11 +706,7 @@ export class MessageManager { i === 0 && replyToMessageId ? { message_id: replyToMessageId } : undefined, - parse_mode: this.runtime.character.clientConfig.telegram - .disableParseMode - ? undefined - : this.runtime.character.clientConfig.telegram - .parseMode || "Markdown", + parse_mode: this.runtime.character.clientConfig.telegram.parseMode || undefined, } )) as Message.TextMessage; diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 1553b81a0..40f48fecf 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -778,8 +778,7 @@ export type Character = { teamAgentIds?: string[]; teamLeaderId?: string; teamMemberInterestKeywords?: string[]; - disableParseMode?: boolean; - parseMode?: "Markdown" | "MarkdownV2" | "HTML"; + parseMode?: "Markdown" | "MarkdownV2" | "HTML" | null; }; slack?: { shouldIgnoreBotMessages?: boolean;