@diegopetrucci/pi-annotate-last-message 0.1.13 → 0.1.15
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/glimpseui.d.ts +3 -0
- package/package.json +1 -1
- package/prompt.ts +2 -8
- package/quiet-glimpse.ts +3 -0
package/glimpseui.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Generated copy of shared/glimpse/glimpseui.d.ts.
|
|
2
|
+
// Edit the canonical source, then run `npm run sync:shared`.
|
|
3
|
+
// Do not edit this package-local copy directly.
|
|
1
4
|
declare module "glimpseui" {
|
|
2
5
|
export type FollowMode = "snap" | "spring";
|
|
3
6
|
export type CursorAnchor =
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-annotate-last-message",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "A standalone pi extension that adds /annotate-last-message, a native Glimpse UI for annotating the latest assistant reply.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
package/prompt.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AnnotateLastMessageInlineComment,
|
|
3
|
-
AnnotateLastMessageSectionComment,
|
|
4
3
|
AnnotateLastMessageSubmitPayload,
|
|
5
4
|
LastAssistantMessageData,
|
|
6
5
|
LastAssistantMessageLine,
|
|
@@ -34,10 +33,7 @@ function formatSectionLineRange(section: LastAssistantMessageSection): string {
|
|
|
34
33
|
: `lines ${section.startLine}-${section.endLine}`;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
function formatSectionComment(
|
|
38
|
-
comment: AnnotateLastMessageSectionComment,
|
|
39
|
-
section: LastAssistantMessageSection | undefined,
|
|
40
|
-
): string {
|
|
36
|
+
function formatSectionComment(section: LastAssistantMessageSection | undefined): string {
|
|
41
37
|
if (section == null) {
|
|
42
38
|
return "Unknown section";
|
|
43
39
|
}
|
|
@@ -90,9 +86,7 @@ export function composeAnnotateLastMessagePrompt(
|
|
|
90
86
|
if (sectionComments.length > 0) {
|
|
91
87
|
lines.push("## Section comments");
|
|
92
88
|
sectionComments.forEach((comment, index) => {
|
|
93
|
-
lines.push(
|
|
94
|
-
`${index + 1}. ${formatSectionComment(comment, sectionMap.get(comment.sectionId))}`,
|
|
95
|
-
);
|
|
89
|
+
lines.push(`${index + 1}. ${formatSectionComment(sectionMap.get(comment.sectionId))}`);
|
|
96
90
|
lines.push(` ${comment.body.trim()}`);
|
|
97
91
|
lines.push("");
|
|
98
92
|
});
|
package/quiet-glimpse.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Generated copy of shared/glimpse/quiet-glimpse.ts.
|
|
2
|
+
// Edit the canonical source, then run `npm run sync:shared`.
|
|
3
|
+
// Do not edit this package-local copy directly.
|
|
1
4
|
/// <reference path="./glimpseui.d.ts" />
|
|
2
5
|
|
|
3
6
|
import { type ChildProcessWithoutNullStreams, spawn } from "node:child_process";
|