Skip to content

Commit e898fbc

Browse files
chore: tidy #98 follow-ups (Pi import alias + test description)
Post-merge cleanup of PR #98: - Pi's strip-tag-prefix.ts and temporal-awareness-pi.ts imported the shared tag-content-primitives via a raw cross-package path (../../plugin/src/...). Switch to the `@magic-context/core/...` workspace alias used everywhere else in Pi (the only two ../../plugin/src imports in the package). - Fix a garbled test description: "transform ? ? notation only" → the intended "transform §N§ notation only" (the § chars were mangled on the way in). No behavior change. Plugin 1796/0, Pi 403/0, tsc + biome clean. Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>
1 parent ffcb666 commit e898fbc

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/pi-plugin/src/strip-tag-prefix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Only `assistant` messages are stripped. User/tool messages keep intentional tags.
1313
*/
1414

15-
import { stripPersistedAssistantText } from "../../plugin/src/hooks/magic-context/tag-content-primitives";
15+
import { stripPersistedAssistantText } from "@magic-context/core/hooks/magic-context/tag-content-primitives";
1616

1717
/**
1818
* Mutate the given assistant message's text parts in place to strip MC tag notation.

packages/pi-plugin/src/temporal-awareness-pi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
* every pass (intentional — same as OpenCode, see transform.ts:648).
2424
*/
2525

26+
import {
27+
peelLeadingMcTagNotation,
28+
stripTagPrefix,
29+
} from "@magic-context/core/hooks/magic-context/tag-content-primitives";
2630
import {
2731
TEMPORAL_MARKER_PATTERN,
2832
temporalMarkerPrefix,
2933
} from "@magic-context/core/hooks/magic-context/temporal-awareness";
30-
import {
31-
peelLeadingMcTagNotation,
32-
stripTagPrefix,
33-
} from "../../plugin/src/hooks/magic-context/tag-content-primitives";
3434

3535
type PiTextContent = { type: "text"; text: string; textSignature?: string };
3636
type PiImageContent = { type: "image"; data: string; mimeType: string };

packages/plugin/src/hooks/magic-context/tag-content-primitives.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const SECTION = "\u00a7";
1515

1616
const DEGREE = "\u00b0";
1717

18-
describe("stripTagPrefix (transform ? ? notation only)", () => {
18+
describe("stripTagPrefix (transform §N§ notation only)", () => {
1919
it("#given well-formed leading prefix #when stripTagPrefix runs #then removes it", () => {
2020
expect(stripTagPrefix(`${SECTION}42${SECTION} Hello`)).toBe("Hello");
2121
});

0 commit comments

Comments
 (0)