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

Function showClipboardMessage

cli/src/utils/clipboard.ts:50–68  ·  view source on GitHub ↗
(
  message: string | null,
  options: ShowMessageOptions = {},
)

Source from the content-addressed store, hash-verified

48}
49
50export function showClipboardMessage(
51 message: string | null,
52 options: ShowMessageOptions = {},
53) {
54 if (clearTimer) {
55 clearTimeout(clearTimer)
56 clearTimer = null
57 }
58
59 emitClipboardMessage(message)
60
61 const duration = options.durationMs ?? 3000
62 if (message && duration > 0) {
63 clearTimer = setTimeout(() => {
64 emitClipboardMessage(null)
65 clearTimer = null
66 }, duration)
67 }
68}
69
70function getDefaultSuccessMessage(text: string): string | null {
71 const preview = text.replace(/\s+/g, ' ').trim()

Callers 7

handleFollowupClickFunction · 0.90
ChatFunction · 0.90
FeedbackContainerFunction · 0.90
clipboard.test.tsFile · 0.90
routeUserPromptFunction · 0.90
useUpdatePreferenceFunction · 0.90
copyTextToClipboardFunction · 0.85

Calls 2

emitClipboardMessageFunction · 0.85
setTimeoutFunction · 0.85

Tested by

no test coverage detected