MCPcopy
hub / github.com/claude-code-best/claude-code / link

Function link

packages/@ant/ink/src/core/termio/osc.ts:429–436  ·  view source on GitHub ↗
(url: string, params?: Record<string, string>)

Source from the content-addressed store, hash-verified

427 * wrapped line is a separate link — inconsistent hover, partial tooltips).
428 * Empty url = close sequence (empty params per spec). */
429export function link(url: string, params?: Record<string, string>): string {
430 if (!url) return LINK_END
431 const p = { id: osc8Id(url), ...params }
432 const paramStr = Object.entries(p)
433 .map(([k, v]) => `${k}=${v}`)
434 .join(':')
435 return osc(OSC.HYPERLINK, paramStr, url)
436}
437
438function osc8Id(url: string): string {
439 let h = 0

Callers 4

writeDiffToTerminalFunction · 0.85
callFunction · 0.85
callFunction · 0.85
copyFileHistoryForResumeFunction · 0.85

Calls 3

osc8IdFunction · 0.85
oscFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected