MCPcopy Create free account
hub / github.com/ReviewStage/stage-cli / formatHunkForPrompt

Function formatHunkForPrompt

packages/cli/src/prep.ts:11–15  ·  view source on GitHub ↗
(file: PullRequestFile, hunk: Hunk)

Source from the content-addressed store, hash-verified

9import { type DiffScopeOptions, resolveDiffScope } from "./scope.js";
10
11function formatHunkForPrompt(file: PullRequestFile, hunk: Hunk): string {
12 return `=== File: ${file.path} (${file.status}) | filePath: "${file.path}", oldStart: ${hunk.oldStart} ===
13=== Hunk @${hunk.oldStart}: ${hunk.header} ===
14${formatHunkDiffWithLineNumbers(hunk)}`;
15}
16
17export async function runPrep(options: DiffScopeOptions): Promise<string> {
18 const { scope, rawDiff, mergeBaseSha } = await resolveDiffScope(options);

Callers 1

runPrepFunction · 0.85

Calls 1

Tested by

no test coverage detected