Changesets · Branches · Tags · Compare
| Changeset | b7c96fb1b25be39a4a9386127f5efe61f2ba70dff5e7a1be62352eb199250e4c |
|---|---|
| Author | Nate <sestinj@gmail.com> · 2025-09-09 21:59 -07:00 |
| Committer | Nate <sestinj@gmail.com> · 2025-09-09 21:59 -07:00 |
| Parents | 6faf04861205 |
1 file changed
modified extensions/vscode/src/diff/vertical/manager.ts +3 −0
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | import { ApplyAbortManager } from "core/edit/applyAbortManager"; |
| 14 | 14 | import { EDIT_MODE_STREAM_ID } from "core/edit/constants"; |
| 15 | 15 | import { stripImages } from "core/util/messageContent"; |
| 16 | +import { getLastNPathParts } from "core/util/uri"; | |
| 16 | 17 | import { editOutcomeTracker } from "../../extension/EditOutcomeTracker"; |
| 17 | 18 | import { VerticalDiffHandler, VerticalDiffHandlerOptions } from "./handler"; |
| 18 | 19 | |
| @@ -432,9 +433,11 @@ | ||
| 432 | 433 | |
| 433 | 434 | let overridePrompt: ChatMessage[] | undefined; |
| 434 | 435 | if (llm.promptTemplates?.apply) { |
| 436 | + const filepath = getLastNPathParts(fileUri, 1); | |
| 435 | 437 | const rendered = llm.renderPromptTemplate(llm.promptTemplates.apply, [], { |
| 436 | 438 | original_code: rangeContent, |
| 437 | 439 | new_code: newCode ?? "", |
| 440 | + filepath, | |
| 438 | 441 | }); |
| 439 | 442 | overridePrompt = |
| 440 | 443 | typeof rendered === "string" |