MCPcopy Create free account
hub / github.com/arctic-cli/interface / renderCard

Function renderCard

packages/arctic/src/session/usage-format.ts:104–114  ·  view source on GitHub ↗
(lines: string[])

Source from the content-addressed store, hash-verified

102}
103
104function renderCard(lines: string[]): string {
105 const measuredWidth = Math.max(...lines.map((line) => line.length), 0)
106 const contentWidth = measuredWidth + EXTRA_CARD_SPACE
107 const horizontal = `╭${"─".repeat(contentWidth + CARD_PADDING * 2)}╮`
108 const bottom = `╰${"─".repeat(contentWidth + CARD_PADDING * 2)}╯`
109 const body = lines.map((line) => {
110 const padded = line.padEnd(contentWidth, " ")
111 return `│${" ".repeat(CARD_PADDING)}${padded}${" ".repeat(CARD_PADDING)}│`
112 })
113 return [horizontal, ...body, bottom].join("\n")
114}
115
116function formatAccess(record: UsageRecordSummary): string {
117 if (record.allowed === false) {

Callers 1

formatUsageSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected