












@@ -578,16 +578,16 @@ describe("main-session-restart-recovery", () => {
578578it("sends a visible notice before failing an unresumable chat-bound main session", async () => {
579579const sessionsDir = await makeSessionsDir();
580580await writeStore(sessionsDir, {
581-"agent:main:telegram:group:12345": {
581+"agent:main:demo-channel:room-1": {
582582sessionId: "main-session",
583583updatedAt: Date.now() - 10_000,
584584status: "running",
585585abortedLastRun: true,
586586deliveryContext: {
587-channel: "telegram",
588-to: "group:12345",
587+channel: "demo-channel",
588+to: "room-1",
589589accountId: "default",
590-threadId: "topic-1",
590+threadId: "thread-1",
591591},
592592},
593593});
@@ -605,23 +605,23 @@ describe("main-session-restart-recovery", () => {
605605| undefined;
606606expect(gatewayCall?.method).toBe("message.action");
607607expect(gatewayCall?.params).toMatchObject({
608-channel: "telegram",
608+channel: "demo-channel",
609609action: "send",
610610accountId: "default",
611-sessionKey: "agent:main:telegram:group:12345",
611+sessionKey: "agent:main:demo-channel:room-1",
612612sessionId: "main-session",
613613});
614614expect(gatewayCall?.params?.params).toMatchObject({
615-to: "group:12345",
616-threadId: "topic-1",
615+to: "room-1",
616+threadId: "thread-1",
617617bestEffort: true,
618618});
619619expect(String((gatewayCall?.params?.params as Record<string, unknown>)?.message)).toContain(
620620"couldn't safely resume",
621621);
622622623623const store = loadSessionStore(path.join(sessionsDir, "sessions.json"));
624-expect(store["agent:main:telegram:group:12345"]?.status).toBe("failed");
625-expect(store["agent:main:telegram:group:12345"]?.abortedLastRun).toBe(true);
624+expect(store["agent:main:demo-channel:room-1"]?.status).toBe("failed");
625+expect(store["agent:main:demo-channel:room-1"]?.abortedLastRun).toBe(true);
626626});
627627});
此內容由慣性聚合(RSS閱讀器)自動聚合整理,僅供閱讀參考。 原文來自 — 版權歸原作者所有。