gsd-pi 2.76.0-dev.707772f58 → 2.76.0-dev.76f9a2dc5
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/dist/resources/extensions/gsd/safety/file-change-validator.js +1 -1
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +15 -15
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +15 -15
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +5 -4
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +7 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +29 -21
- package/packages/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +6 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/skill-invocation-message.ts +36 -22
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/src/resources/extensions/gsd/safety/file-change-validator.ts +1 -1
- package/src/resources/extensions/gsd/tests/file-change-validator.test.ts +20 -0
- /package/dist/web/standalone/.next/static/{7iJDIT41wyL1lOgpDXINh → UMCfv_sVnLXawpUAjvArc}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{7iJDIT41wyL1lOgpDXINh → UMCfv_sVnLXawpUAjvArc}/_ssgManifest.js +0 -0
|
@@ -2,7 +2,7 @@ import { truncateToWidth, visibleWidth } from "@gsd/pi-tui";
|
|
|
2
2
|
import { theme } from "../theme/theme.js";
|
|
3
3
|
import { formatTimestamp, type TimestampFormat } from "./timestamp.js";
|
|
4
4
|
|
|
5
|
-
type FrameTone = "assistant" | "user" | "compaction";
|
|
5
|
+
type FrameTone = "assistant" | "user" | "compaction" | "skill";
|
|
6
6
|
|
|
7
7
|
function trimOuterBlankLines(lines: string[]): string[] {
|
|
8
8
|
let start = 0;
|
|
@@ -25,14 +25,14 @@ export function renderChatFrame(
|
|
|
25
25
|
): string[] {
|
|
26
26
|
const outerWidth = Math.max(20, width);
|
|
27
27
|
const contentWidth = Math.max(1, outerWidth - 2); // "│ " + content
|
|
28
|
+
const isPurple = opts.tone === "compaction" || opts.tone === "skill";
|
|
28
29
|
const borderColor =
|
|
29
30
|
opts.tone === "user"
|
|
30
31
|
? "border"
|
|
31
|
-
:
|
|
32
|
+
: isPurple
|
|
32
33
|
? "customMessageLabel"
|
|
33
34
|
: "borderAccent";
|
|
34
|
-
const borderMuted =
|
|
35
|
-
opts.tone === "compaction" ? "customMessageLabel" : "borderMuted";
|
|
35
|
+
const borderMuted = isPurple ? "customMessageLabel" : "borderMuted";
|
|
36
36
|
const border = (s: string) => theme.fg(borderColor, s);
|
|
37
37
|
const leftRaw = `• ${opts.label}`;
|
|
38
38
|
const rightRaw =
|
|
@@ -47,7 +47,7 @@ export function renderChatFrame(
|
|
|
47
47
|
const labelColor =
|
|
48
48
|
opts.tone === "user"
|
|
49
49
|
? "border"
|
|
50
|
-
:
|
|
50
|
+
: isPurple
|
|
51
51
|
? "customMessageLabel"
|
|
52
52
|
: "borderAccent";
|
|
53
53
|
const dashIdx = left.indexOf(" - ");
|
|
@@ -71,7 +71,7 @@ export function renderChatFrame(
|
|
|
71
71
|
const bodyColor =
|
|
72
72
|
opts.tone === "user"
|
|
73
73
|
? "userMessageText"
|
|
74
|
-
:
|
|
74
|
+
: isPurple
|
|
75
75
|
? "customMessageText"
|
|
76
76
|
: "assistantMessageText";
|
|
77
77
|
const bodyLines = (sourceLines.length > 0 ? sourceLines : [""]).map((line) => {
|
package/packages/pi-coding-agent/src/modes/interactive/components/skill-invocation-message.ts
CHANGED
|
@@ -1,55 +1,69 @@
|
|
|
1
|
-
|
|
1
|
+
// GSD / pi-coding-agent — Skill invocation message component
|
|
2
|
+
import { Container, Markdown, type MarkdownTheme, Text } from "@gsd/pi-tui";
|
|
2
3
|
import type { ParsedSkillBlock } from "../../../core/agent-session.js";
|
|
3
4
|
import { getMarkdownTheme, theme } from "../theme/theme.js";
|
|
5
|
+
import { renderChatFrame } from "./chat-frame.js";
|
|
4
6
|
import { editorKey } from "./keybinding-hints.js";
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* Renders a skill invocation in the shared chat-frame style (top rule,
|
|
10
|
+
* `• skill - <name>` header, `│ ` body margin) with purple border/label
|
|
11
|
+
* matching compaction so it visually aligns with user/assistant messages.
|
|
10
12
|
*/
|
|
11
|
-
export class SkillInvocationMessageComponent extends
|
|
13
|
+
export class SkillInvocationMessageComponent extends Container {
|
|
12
14
|
private expanded = false;
|
|
13
15
|
private skillBlock: ParsedSkillBlock;
|
|
14
16
|
private markdownTheme: MarkdownTheme;
|
|
15
17
|
|
|
16
18
|
constructor(skillBlock: ParsedSkillBlock, markdownTheme: MarkdownTheme = getMarkdownTheme()) {
|
|
17
|
-
super(
|
|
19
|
+
super();
|
|
18
20
|
this.skillBlock = skillBlock;
|
|
19
21
|
this.markdownTheme = markdownTheme;
|
|
20
|
-
this.
|
|
22
|
+
this.rebuild();
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
setExpanded(expanded: boolean): void {
|
|
24
|
-
this.expanded
|
|
25
|
-
|
|
26
|
+
if (this.expanded !== expanded) {
|
|
27
|
+
this.expanded = expanded;
|
|
28
|
+
this.rebuild();
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
override invalidate(): void {
|
|
29
33
|
super.invalidate();
|
|
30
|
-
this.
|
|
34
|
+
this.rebuild();
|
|
31
35
|
}
|
|
32
36
|
|
|
33
|
-
private
|
|
37
|
+
private rebuild(): void {
|
|
34
38
|
this.clear();
|
|
35
39
|
|
|
36
40
|
if (this.expanded) {
|
|
37
|
-
// Expanded: label + skill name header + full content
|
|
38
|
-
const label = theme.fg("customMessageLabel", theme.bold("[skill]"));
|
|
39
|
-
this.addChild(new Text(label, 0, 0));
|
|
40
|
-
const header = `**${this.skillBlock.name}**\n\n`;
|
|
41
41
|
this.addChild(
|
|
42
|
-
new Markdown(
|
|
42
|
+
new Markdown(this.skillBlock.content, 0, 0, this.markdownTheme, {
|
|
43
43
|
color: (text: string) => theme.fg("customMessageText", text),
|
|
44
44
|
}),
|
|
45
45
|
);
|
|
46
46
|
} else {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
this.addChild(
|
|
48
|
+
new Text(
|
|
49
|
+
theme.fg("dim", `(${editorKey("expandTools")} to expand)`),
|
|
50
|
+
0,
|
|
51
|
+
0,
|
|
52
|
+
),
|
|
53
|
+
);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
56
|
+
|
|
57
|
+
override render(width: number): string[] {
|
|
58
|
+
const frameWidth = Math.max(20, width);
|
|
59
|
+
const contentWidth = Math.max(1, frameWidth - 4);
|
|
60
|
+
const lines = super.render(contentWidth);
|
|
61
|
+
const framed = renderChatFrame(lines, frameWidth, {
|
|
62
|
+
label: `skill - ${this.skillBlock.name}`,
|
|
63
|
+
tone: "skill",
|
|
64
|
+
timestampFormat: "date-time-iso",
|
|
65
|
+
showTimestamp: false,
|
|
66
|
+
});
|
|
67
|
+
return framed.length > 0 ? ["", ...framed] : framed;
|
|
68
|
+
}
|
|
55
69
|
}
|