MCPcopy Create free account
hub / github.com/modem-dev/hunk / fileDisplayPath

Function fileDisplayPath

src/ui/staticDiffPager.ts:279–284  ·  view source on GitHub ↗

Use an arrow label for renamed files so static output keeps important path metadata.

(file: DiffFile)

Source from the content-addressed store, hash-verified

277
278/** Use an arrow label for renamed files so static output keeps important path metadata. */
279function fileDisplayPath(file: DiffFile) {
280 const previousPath = file.previousPath ?? file.metadata.prevName;
281 return previousPath && previousPath !== file.path
282 ? `${sanitizeTerminalLine(previousPath)} → ${sanitizeTerminalLine(file.path)}`
283 : sanitizeTerminalLine(file.path);
284}
285
286function fileModeText(file: DiffFile) {
287 if (

Callers 1

renderStaticFileFunction · 0.85

Calls 1

sanitizeTerminalLineFunction · 0.90

Tested by

no test coverage detected