perf(runtime): trim hot-path allocations and cache channel plugin lookups

This commit is contained in:
Peter Steinberger
2026-03-02 23:55:33 +00:00
parent dba47f349f
commit d3dc4e54f7
6 changed files with 148 additions and 74 deletions

View File

@@ -96,6 +96,15 @@ export function parseInlineDirectives(
hasReplyTag: false,
};
}
if (!text.includes("[[")) {
return {
text: normalizeDirectiveWhitespace(text),
audioAsVoice: false,
replyToCurrent: false,
hasAudioTag: false,
hasReplyTag: false,
};
}
let cleaned = text;
let audioAsVoice = false;