MCPcopy Create free account
hub / github.com/anomalyco/opencode / writeOsc52

Function writeOsc52

packages/tui/src/clipboard.ts:23–27  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

21}
22
23function writeOsc52(text: string) {
24 if (!process.stdout.isTTY) return
25 const sequence = `\x1b]52;c;${Buffer.from(text).toString("base64")}\x07`
26 process.stdout.write(process.env.TMUX || process.env.STY ? `\x1bPtmux;\x1b${sequence}\x1b\\` : sequence)
27}
28
29export async function read() {
30 if (platform() === "darwin") {

Callers 1

writeFunction · 0.85

Calls 2

writeMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected