mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
test: remove duplicate agent reset e2e
This commit is contained in:
@@ -373,38 +373,6 @@ describe("gateway server agent", () => {
|
||||
expectAgentRoutingCall({ channel: "webchat", deliver: false });
|
||||
});
|
||||
|
||||
test(
|
||||
"agent routes bare /new through session reset before running greeting prompt",
|
||||
{
|
||||
timeout: 45_000,
|
||||
},
|
||||
async () => {
|
||||
await writeMainSessionEntry({ sessionId: "sess-main-before-reset" });
|
||||
const spy = vi.mocked(agentCommand);
|
||||
const calls = spy.mock.calls;
|
||||
const callsBefore = calls.length;
|
||||
const res = await rpcReq(
|
||||
ws,
|
||||
"agent",
|
||||
{
|
||||
message: "/new",
|
||||
sessionKey: "main",
|
||||
idempotencyKey: "idem-agent-new",
|
||||
},
|
||||
30_000,
|
||||
);
|
||||
expect(res.ok).toBe(true);
|
||||
|
||||
await vi.waitFor(() => expect(calls.length).toBeGreaterThan(callsBefore));
|
||||
const call = (calls.at(-1)?.[0] ?? {}) as Record<string, unknown>;
|
||||
expect(call.message).toBeTypeOf("string");
|
||||
expect(call.message).toContain("Run your Session Startup sequence");
|
||||
expect(call.message).toContain("Current time:");
|
||||
expect(typeof call.sessionId).toBe("string");
|
||||
expect(call.sessionId).not.toBe("sess-main-before-reset");
|
||||
},
|
||||
);
|
||||
|
||||
test("write-scoped callers cannot reset conversations via agent", async () => {
|
||||
await withGatewayServer(async ({ port }) => {
|
||||
await useTempSessionStorePath();
|
||||
|
||||
Reference in New Issue
Block a user