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

Function formatThreadTitle

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

Source from the content-addressed store, hash-verified

17127}
17128
17129function formatThreadTitle(title, preview, i18n: Translator) {
17130 const resolved = compactWhitespace(title || '');
17131 if (resolved) {
17132 return truncateText(resolved, 48);
17133 }
17134 const fallback = compactWhitespace(preview || '');
17135 if (fallback) {
17136 return truncateText(fallback, 48);
17137 }
17138 return i18n.t('coordinator.thread.untitled');
17139}
17140
17141function normalizeThreadPreview(preview, i18n: Translator) {
17142 const normalized = compactWhitespace(preview || '');

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