The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { expect, it } from "@effect/vitest"; |
| 2 | |
| 3 | import { parsePiDiscoveredCommands } from "./commands.ts"; |
| 4 | |
| 5 | it("maps current Pi skill metadata to T3's user and project skill scopes", () => { |
| 6 | expect( |
| 7 | parsePiDiscoveredCommands({ |
| 8 | commands: [ |
| 9 | { |
| 10 | name: "skill:global-review", |
| 11 | description: "Review changes.", |
| 12 | source: "skill", |
| 13 | sourceInfo: { |
| 14 | path: "/home/test/.agents/skills/global-review/SKILL.md", |
| 15 | scope: "user", |
| 16 | }, |
| 17 | }, |
| 18 | { |
| 19 | name: "skill:project-deploy", |
| 20 | description: "Deploy this project.", |
| 21 | source: "skill", |
| 22 | sourceInfo: { |
| 23 | path: "/workspace/.agents/skills/project-deploy/SKILL.md", |
| 24 | scope: "project", |
| 25 | }, |
| 26 | }, |
| 27 | { name: "hello", description: "Say hello.", source: "extension" }, |
| 28 | ], |
| 29 | }), |
| 30 | ).toEqual({ |
| 31 | skills: [ |
| 32 | { |
| 33 | name: "global-review", |
| 34 | description: "Review changes.", |
| 35 | path: "/home/test/.agents/skills/global-review/SKILL.md", |
| 36 | scope: "user", |
| 37 | enabled: true, |
| 38 | }, |
| 39 | { |
| 40 | name: "project-deploy", |
| 41 | description: "Deploy this project.", |
| 42 | path: "/workspace/.agents/skills/project-deploy/SKILL.md", |
| 43 | scope: "project", |
| 44 | enabled: true, |
| 45 | }, |
| 46 | ], |
| 47 | slashCommands: [{ name: "hello", description: "Say hello." }], |
| 48 | }); |
| 49 | }); |