fix(plugins): return bare Kitty delete sequences from legacy pi-tui shim

Upstream Pi's deleteKittyImage/deleteAllKittyImages return unwrapped control
sequences; legacy callers such as pi-sprite wrap tmux passthrough themselves.
Aliasing OMP's auto-wrapping encodeKittyDeleteImage (and hand-wrapping
deleteAllKittyImages) double-wrapped under tmux, so the outer terminal dropped
the delete command. Match the upstream bare-sequence contract and pin it in
the regression test.
This commit is contained in:
omp-eval
2026-07-26 15:31:38 +02:00
committed by can1357
parent 5905ec0430
commit c8b37c8d2e
2 changed files with 20 additions and 11 deletions
@@ -280,8 +280,10 @@ describe("legacy pi package root remaps (issue #1474)", () => {
deleteAll: string;
capabilities: { images: "kitty" | "iterm2" | null; trueColor: boolean; hyperlinks: boolean };
};
expect(loaded.deleteOne).toContain("a=d,d=I,i=42,q=2");
expect(loaded.deleteAll).toContain("a=d,d=A,q=2");
// Bare sequences, exactly like upstream Pi: legacy callers (pi-sprite)
// apply their own tmux passthrough wrapping.
expect(loaded.deleteOne).toBe("\x1b_Ga=d,d=I,i=42,q=2\x1b\\");
expect(loaded.deleteAll).toBe("\x1b_Ga=d,d=A,q=2\x1b\\");
expect(["kitty", "iterm2", null]).toContain(loaded.capabilities.images);
expect(typeof loaded.capabilities.trueColor).toBe("boolean");
expect(typeof loaded.capabilities.hyperlinks).toBe("boolean");