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

Function formatDefaultClipboardMessage

cli/src/hooks/use-clipboard.ts:12–19  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

10} from '../utils/clipboard'
11
12function formatDefaultClipboardMessage(text: string): string | null {
13 const preview = text.replace(/\s+/g, ' ').trim()
14 if (!preview) {
15 return null
16 }
17 const truncated = preview.length > 40 ? `${preview.slice(0, 37)}…` : preview
18 return `Copied: "${truncated}"`
19}
20
21export const useClipboard = () => {
22 const renderer = useRenderer()

Callers 1

handleSelectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected