MCPcopy Index your code
hub / github.com/codeaashu/claude-code / normalizeAndTruncateToWidth

Function normalizeAndTruncateToWidth

src/components/LogSelector.tsx:62–65  ·  view source on GitHub ↗
(text: string, maxWidth: number)

Source from the content-addressed store, hash-verified

60 indexInFiltered: number;
61}>;
62function normalizeAndTruncateToWidth(text: string, maxWidth: number): string {
63 const normalized = text.replace(/\s+/g, ' ').trim();
64 return truncateToWidth(normalized, maxWidth);
65}
66
67// Width of prefixes that TreeSelect will add
68const PARENT_PREFIX_WIDTH = 2; // '▼ ' or '▶ '

Callers 2

buildLogLabelFunction · 0.85
LogSelectorFunction · 0.85

Calls 1

truncateToWidthFunction · 0.85

Tested by

no test coverage detected