You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/ui/src/features/sessions/components/session-update/UserMessage.test.tsx
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,9 @@ const PROMPT_WITH_CONTEXT =
30
30
constPROMPT_WITH_CANVAS_INSTRUCTIONS=
31
31
"add a retention chart\n\n<canvas_generation_instructions>\nauthoring contract\n</canvas_generation_instructions>";
32
32
33
+
constPROMPT_WITH_PI_SKILL=
34
+
'<skill name="code-review" location="/skills/code-review/SKILL.md">\nReferences are relative to /skills/code-review.\n\n# Review\n\nInspect the diff.\n</skill>\n\nReview this pull request.';
35
+
33
36
describe("UserMessage",()=>{
34
37
// useFeatureFlag falls back to import.meta.env.DEV, which is true under
35
38
// vitest. Pin DEV off in the flag-gating cases so they exercise the flag
it("replaces Pi skill instructions with the command and user request",()=>{
6
+
expect(
7
+
collapsePiSkillInvocation(
8
+
'<skill name="code-review" location="/skills/code-review/SKILL.md">\nReferences are relative to /skills/code-review.\n\n# Review\n\nInspect the diff.\n</skill>\n\nReview this pull request.',
9
+
),
10
+
).toBe("/code-review\n\nReview this pull request.");
11
+
});
12
+
13
+
it("keeps non-skill messages unchanged",()=>{
14
+
expect(collapsePiSkillInvocation("Review this pull request.")).toBe(
0 commit comments