feat(tmux): add a per-host mouse toggle and preserve remote configuration (#1513)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-30 09:53:17 -05:00
1 parent 99cffc9ba6
commit 9801cc7fc7
10 files changed
+183 -44

No files matched your search

@@ -65,6 +65,27 @@ describe("createTmuxSessionsService", () => {
expect(writes[0]).toContain("main");
});
it("uses the host's saved mouse setting when attaching", async () => {
const { ctx } = createFakeContext({ pluginId: "tmux-monitor" });
await ctx.settings.setHost(7, "mouseEnabled", false);
const writes: string[] = [];
const service = createTmuxSessionsService(ctx);
await service.attachOrCreate(
{ write: (value: string) => writes.push(value) },
"main",
undefined,
7,
);
await service.attachOrCreate(
{ write: (value: string) => writes.push(value) },
"other",
undefined,
8,
);
expect(writes[0]).toContain("mouse off");
expect(writes[1]).toContain("mouse on");
});
it("waitForSession() falls back to the requested name on timeout", async () => {
vi.useFakeTimers();
try {