refactor: dedupe extension lowercase helpers

This commit is contained in:
Peter Steinberger
2026-04-07 14:56:14 +01:00
parent 948d139399
commit 9314bb7180
28 changed files with 72 additions and 48 deletions

View File

@@ -12,6 +12,7 @@
*/
import type * as Lark from "@larksuiteoapi/node-sdk";
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
// Feishu text_color values (1-7)
const TEXT_COLOR: Record<string, number> = {
@@ -86,7 +87,7 @@ export function parseColorMarkup(content: string): Segment[] {
}
} else {
// Tagged segment
const tagStr = match[1].toLowerCase().trim();
const tagStr = normalizeLowercaseStringOrEmpty(match[1]);
const text = match[2];
const tags = tagStr.split(/\s+/);