MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / padRight

Function padRight

cli/src/components/chat-history-screen.tsx:94–99  ·  view source on GitHub ↗
(text: string, width: number)

Source from the content-addressed store, hash-verified

92
93 // Pad text to fixed width (right-pad with spaces)
94 const padRight = (text: string, width: number): string => {
95 // Use Array.from to count code points so emoji/wide chars don't break padding
96 const len = Array.from(text).length
97 if (len >= width) return text
98 return text + ' '.repeat(width - len)
99 }
100
101 // Convert chats to SelectableListItem format with aligned columns
102 // Order: time | message count | prompt

Callers 1

ChatHistoryScreenFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected