
























@@ -187,7 +187,8 @@ describe("acp translator stable lifecycle handlers", () => {
187187"agent:main:a2",
188188]);
189189expect(first.sessions.map((session) => session.cwd)).toEqual(["/work/a", "/work/a"]);
190-expect(first.nextCursor).toEqual(expect.any(String));
190+expect(first.nextCursor).toBeTypeOf("string");
191+expect(first.nextCursor).not.toBe("");
191192expect(second.sessions.map((session) => session.sessionId)).toEqual([
192193"agent:main:a3",
193194"agent:main:a4",
@@ -254,7 +255,8 @@ describe("acp translator stable lifecycle handlers", () => {
254255});
255256256257const unfiltered = await agent.listSessions(createListSessionsRequest({ limit: 1 }));
257-expect(unfiltered.nextCursor).toEqual(expect.any(String));
258+expect(unfiltered.nextCursor).toBeTypeOf("string");
259+expect(unfiltered.nextCursor).not.toBe("");
258260await expect(
259261agent.listSessions(
260262createListSessionsRequest({ cwd: "/work/a", cursor: unfiltered.nextCursor }),
@@ -264,7 +266,8 @@ describe("acp translator stable lifecycle handlers", () => {
264266const filtered = await agent.listSessions(
265267createListSessionsRequest({ cwd: "/work/a", limit: 1 }),
266268);
267-expect(filtered.nextCursor).toEqual(expect.any(String));
269+expect(filtered.nextCursor).toBeTypeOf("string");
270+expect(filtered.nextCursor).not.toBe("");
268271await expect(
269272agent.listSessions(createListSessionsRequest({ cursor: filtered.nextCursor })),
270273).rejects.toThrow(/cursor does not match the cwd filter/i);
@@ -311,7 +314,14 @@ describe("acp translator stable lifecycle handlers", () => {
311314const result = await agent.resumeSession(createResumeSessionRequest("agent:main:work"));
312315313316expect(result.modes?.currentModeId).toBe("adaptive");
314-expect(result.configOptions).toEqual(expect.any(Array));
317+expect(result.configOptions).toEqual(
318+expect.arrayContaining([
319+expect.objectContaining({
320+id: "thought_level",
321+currentValue: "adaptive",
322+}),
323+]),
324+);
315325expect(sessionStore.getSession("agent:main:work")?.sessionKey).toBe("agent:main:work");
316326expect(request).not.toHaveBeenCalledWith("sessions.get", expect.anything());
317327expect(sessionUpdate).toHaveBeenCalledWith({
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。