MCPcopy Create free account
hub / github.com/pingdotgg/t3code / resolveFileDiffPath

Function resolveFileDiffPath

apps/web/src/lib/diffRendering.ts:127–133  ·  view source on GitHub ↗
(fileDiff: FileDiffMetadata)

Source from the content-addressed store, hash-verified

125}
126
127export function resolveFileDiffPath(fileDiff: FileDiffMetadata): string {
128 const raw = fileDiff.name ?? fileDiff.prevName ?? "";
129 if (raw.startsWith("a/") || raw.startsWith("b/")) {
130 return raw.slice(2);
131 }
132 return raw;
133}
134
135export function buildFileDiffRenderKey(fileDiff: FileDiffMetadata): string {
136 return fileDiff.cacheKey ?? `${fileDiff.prevName ?? "none"}:${fileDiff.name}`;

Callers 2

DiffPanelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected