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

Function tryCopyViaRenderer

cli/src/utils/clipboard.ts:180–189  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

178}
179
180function tryCopyViaRenderer(text: string): boolean {
181 if (!registeredRenderer) return false
182 const copyFn = registeredRenderer.copyToClipboardOSC52
183 if (typeof copyFn !== 'function') return false
184 try {
185 return Boolean(copyFn.call(registeredRenderer, text))
186 } catch {
187 return false
188 }
189}
190
191// 32KB is safe for all environments (tmux is the strictest)
192const OSC52_MAX_PAYLOAD = 32_000

Callers 1

copyTextToClipboardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected