fix: subagents list uses command session

This commit is contained in:
Peter Steinberger
2026-01-22 05:32:28 +00:00
parent 5ff4ac7fb7
commit 8580b85f0b
5 changed files with 45 additions and 7 deletions
+7 -1
View File
@@ -1,7 +1,7 @@
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import {
listNativeCommandSpecs,
listNativeCommandSpecsForConfig,
@@ -147,8 +147,11 @@ const getOnHandler = (event: string) => {
return handler as (ctx: Record<string, unknown>) => Promise<void>;
};
const ORIGINAL_TZ = process.env.TZ;
describe("createTelegramBot", () => {
beforeEach(() => {
process.env.TZ = "UTC";
resetInboundDedupe();
loadConfig.mockReturnValue({
channels: {
@@ -167,6 +170,9 @@ describe("createTelegramBot", () => {
botCtorSpy.mockReset();
sequentializeKey = undefined;
});
afterEach(() => {
process.env.TZ = ORIGINAL_TZ;
});
it("installs grammY throttler", () => {
createTelegramBot({ token: "tok" });