MCPcopy Create free account
hub / github.com/microsoft/AI-Engineering-Coach / PctBadge

Function PctBadge

src/webview/render.ts:90–95  ·  view source on GitHub ↗
({ pct, label }: { pct: number; label: string })

Source from the content-addressed store, hash-verified

88}
89
90export function PctBadge({ pct, label }: { pct: number; label: string }) {
91 if (pct === 0) return html`<span class="trend-badge trend-stable">${label} 0%</span>`;
92 const cls = pct > 0 ? 'trend-improving' : 'trend-worsening';
93 const sign = pct > 0 ? '+' : '';
94 return html`<span class="trend-badge ${cls}">${sign}${pct}% ${label}</span>`;
95}
96
97export function ErrorMsg({ message }: { message: string }) {
98 return html`<div class="error-boundary">

Callers

nothing calls this directly

Calls 1

htmlFunction · 0.70

Tested by

no test coverage detected