fix(telegram): narrow rich table alignment surface

This commit is contained in:
Ayaan Zaidi
2026-06-24 06:24:16 -07:00
parent d2933bbdb9
commit f1e38f2ed6
4 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,6 @@ import {
markdownToIRWithMeta,
type MarkdownLinkSpan,
type MarkdownIR,
type MarkdownTableAlignment,
type MarkdownTableCell,
type MarkdownTableMeta,
renderMarkdownIRChunksWithinLimit,
@@ -347,6 +346,8 @@ type TelegramHtmlTagSupport = {
attrPatterns: ReadonlyMap<string, RegExp>;
};
type TelegramTableAlignment = NonNullable<MarkdownTableMeta["aligns"]>[number];
const TELEGRAM_LEGACY_HTML_TAG_SUPPORT: TelegramHtmlTagSupport = {
simpleTags: TELEGRAM_SIMPLE_HTML_TAGS,
attrPatterns: TELEGRAM_ATTR_HTML_TAG_PATTERNS,
@@ -976,7 +977,7 @@ function renderTelegramRichHtmlTable(table: MarkdownTableMeta): string {
const renderCell = (
tag: "td" | "th",
value: MarkdownTableCell | undefined,
align: MarkdownTableAlignment | undefined,
align: TelegramTableAlignment | undefined,
) => {
const alignAttr = align ? ` align="${align}"` : "";
return `<${tag}${alignAttr}>${renderCellValue(value)}</${tag}>`;

View File

@@ -78,7 +78,7 @@ function createStyleSpan(params: MarkdownStyleSpan): MarkdownStyleSpan {
return span;
}
export type MarkdownTableAlignment = "left" | "center" | "right";
type MarkdownTableAlignment = "left" | "center" | "right";
export type MarkdownTableData = {
headers: string[];

View File

@@ -131,7 +131,7 @@ const defaultPublicDeprecatedExportsByEntrypointBudget = Object.freeze({
"ssrf-policy": 1,
"ssrf-runtime": 1,
"media-runtime": 2,
"text-runtime": 190,
"text-runtime": 189,
"agent-runtime": 7,
"plugin-runtime": 13,
"channel-secret-runtime": 23,
@@ -202,11 +202,11 @@ let publicDeprecatedExportsByEntrypointBudget;
try {
budgets = {
publicEntrypoints: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_ENTRYPOINTS", 322),
publicExports: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_EXPORTS", 10383),
publicExports: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_EXPORTS", 10381),
publicFunctionExports: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_FUNCTION_EXPORTS", 5210),
publicDeprecatedExports: readBudgetEnv(
"OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_DEPRECATED_EXPORTS",
3248,
3247,
),
publicWildcardReexports: readBudgetEnv(
"OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_WILDCARD_REEXPORTS",

View File

@@ -25,7 +25,6 @@ export {
type MarkdownParseOptions,
type MarkdownStyle,
type MarkdownStyleSpan,
type MarkdownTableAlignment,
type MarkdownTableCell,
type MarkdownTableMeta,
} from "../../packages/markdown-core/src/ir.js";