MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / formatDiffStats

Function formatDiffStats

apps/kimi-code/src/utils/git/git-status.ts:344–350  ·  view source on GitHub ↗
(status: GitStatus)

Source from the content-addressed store, hash-verified

342}
343
344function formatDiffStats(status: GitStatus): string | null {
345 const parts: string[] = [];
346 if (status.diffAdded > 0) parts.push(`+${String(status.diffAdded)}`);
347 if (status.diffDeleted > 0) parts.push(`-${String(status.diffDeleted)}`);
348 if (parts.length > 0) return parts.join(' ');
349 return status.dirty ? '±' : null;
350}
351
352function toTerminalHyperlink(text: string, url: string): string {
353 if (!isSafeHttpUrl(url)) return text;

Callers 1

formatGitBadgeBaseFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected