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

Function buildBaseRows

src/ui/diff/diffSectionRowPlan.ts:35–44  ·  view source on GitHub ↗

Build Pierre rows for one file using the selected terminal diff layout.

(
  file: DiffFile,
  layout: Exclude<LayoutMode, "auto">,
  highlightedDiff: HighlightedDiffCode | null | undefined,
  theme: AppTheme,
)

Source from the content-addressed store, hash-verified

33
34/** Build Pierre rows for one file using the selected terminal diff layout. */
35function buildBaseRows(
36 file: DiffFile,
37 layout: Exclude<LayoutMode, "auto">,
38 highlightedDiff: HighlightedDiffCode | null | undefined,
39 theme: AppTheme,
40) {
41 return layout === "split"
42 ? buildSplitRows(file, highlightedDiff ?? null, theme)
43 : buildStackRows(file, highlightedDiff ?? null, theme);
44}
45
46/** Build the shared file-level diff plan consumed by rendering and geometry measurement. */
47export function buildDiffSectionRowPlan({

Callers 1

buildDiffSectionRowPlanFunction · 0.85

Calls 2

buildSplitRowsFunction · 0.90
buildStackRowsFunction · 0.90

Tested by

no test coverage detected