@diegopetrucci/pi-annotate-git-diff 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi-fleet-tested-version +1 -1
- package/git.ts +1 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/prompt.ts +2 -1
package/.pi-fleet-tested-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.80.3
|
package/git.ts
CHANGED
package/index.ts
CHANGED
|
@@ -94,7 +94,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
async function reviewRepository(ctx: ExtensionCommandContext): Promise<void> {
|
|
97
|
-
if (
|
|
97
|
+
if (ctx.mode !== "tui") {
|
|
98
98
|
ctx.ui.notify("annotate-git-diff requires interactive mode.", "error");
|
|
99
99
|
return;
|
|
100
100
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-annotate-git-diff",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A standalone pi extension that adds /annotate-git-diff, a native Glimpse UI for annotating git diffs and sending feedback to the editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
package/prompt.ts
CHANGED
|
@@ -43,6 +43,7 @@ function formatLocation(comment: DiffReviewComment, file: ReviewFile | undefined
|
|
|
43
43
|
|
|
44
44
|
export function composeReviewPrompt(files: ReviewFile[], payload: ReviewSubmitPayload): string {
|
|
45
45
|
const fileMap = new Map(files.map((file) => [file.id, file]));
|
|
46
|
+
const comments = payload.comments.filter((comment) => comment.body.trim().length > 0);
|
|
46
47
|
const lines: string[] = [];
|
|
47
48
|
|
|
48
49
|
lines.push("Please address the following feedback");
|
|
@@ -54,7 +55,7 @@ export function composeReviewPrompt(files: ReviewFile[], payload: ReviewSubmitPa
|
|
|
54
55
|
lines.push("");
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
comments.forEach((comment, index) => {
|
|
58
59
|
const file = fileMap.get(comment.fileId);
|
|
59
60
|
lines.push(`${index + 1}. ${formatLocation(comment, file)}`);
|
|
60
61
|
lines.push(` ${comment.body.trim()}`);
|