refactor(cli): drop tmux helpers and update help copy

This commit is contained in:
Peter Steinberger
2025-12-08 12:43:13 +01:00
parent bce84376d3
commit 17fa2f4053
9 changed files with 23 additions and 229 deletions

View File

@@ -6,7 +6,6 @@ const loginWeb = vi.fn();
const monitorWebProvider = vi.fn();
const logWebSelfId = vi.fn();
const waitForever = vi.fn();
const spawnRelayTmux = vi.fn().mockResolvedValue("clawdis-relay");
const monitorTelegramProvider = vi.fn();
const runtime = {
@@ -31,7 +30,6 @@ vi.mock("./deps.js", () => ({
createDefaultDeps: () => ({ waitForever }),
logWebSelfId,
}));
vi.mock("./relay_tmux.js", () => ({ spawnRelayTmux }));
const { buildProgram } = await import("./program.js");
@@ -80,16 +78,6 @@ describe("cli program", () => {
runtime.exit = originalExit;
});
it("runs relay heartbeat tmux helper", async () => {
const program = buildProgram();
await program.parseAsync(["relay:heartbeat:tmux"], { from: "user" });
const shouldAttach = Boolean(process.stdout.isTTY);
expect(spawnRelayTmux).toHaveBeenCalledWith(
"pnpm clawdis relay --verbose --heartbeat-now",
shouldAttach,
);
});
it("runs telegram relay when token set", async () => {
const program = buildProgram();
const prev = process.env.TELEGRAM_BOT_TOKEN;