MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / normalizeThreadPreview

Function normalizeThreadPreview

src/core/bridge_coordinator.ts:17141–17144  ·  view source on GitHub ↗
(preview, i18n: Translator)

Source from the content-addressed store, hash-verified

17139}
17140
17141function normalizeThreadPreview(preview, i18n: Translator) {
17142 const normalized = compactWhitespace(preview || '');
17143 return normalized ? truncateText(normalized, THREAD_PREVIEW_LIMIT) : i18n.t('coordinator.thread.emptyPreview');
17144}
17145
17146function compactWhitespace(value) {
17147 return String(value ?? '').replace(/\s+/gu, ' ').trim();

Callers 2

renderThreadsPageMessageFunction · 0.85
renderThreadPeekFunction · 0.85

Calls 3

compactWhitespaceFunction · 0.70
truncateTextFunction · 0.70
tMethod · 0.65

Tested by

no test coverage detected