MCPcopy
hub / github.com/upstash/context7 / terminalLink

Function terminalLink

packages/cli/src/utils/prompts.ts:11–14  ·  view source on GitHub ↗
(text: string, url: string, color?: (s: string) => string)

Source from the content-addressed store, hash-verified

9 * Creates a clickable terminal hyperlink using OSC 8 escape sequence.
10 */
11export function terminalLink(text: string, url: string, color?: (s: string) => string): string {
12 const colorFn = color ?? ((s: string) => s);
13 return `\x1b]8;;${url}\x07${colorFn(text)}\x1b]8;;\x07 ${pc.white("↗")}`;
14}
15
16/**
17 * Formats install count into a popularity star rating (4 stars).

Callers 4

generateCommandFunction · 0.85
installCommandFunction · 0.85
searchCommandFunction · 0.85
suggestCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected