Skip to content

Commit 4bf00dd

Browse files
fix(active-memory): skip colon-containing session-store channels
1 parent 68631cf commit 4bf00dd

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

extensions/active-memory/index.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,6 +2753,33 @@ describe("active-memory plugin", () => {
27532753
});
27542754
});
27552755

2756+
it("skips colon-containing session-store channels for embedded recall (#77396)", async () => {
2757+
hoisted.sessionStore["agent:main:qqbot:direct:12345"] = {
2758+
sessionId: "session-a",
2759+
updatedAt: 25,
2760+
channel: "c2c:10D4F7C2",
2761+
origin: {
2762+
provider: "qqbot",
2763+
},
2764+
};
2765+
2766+
await hooks.before_prompt_build(
2767+
{ prompt: "what wings should i order? scoped stored channel", messages: [] },
2768+
{
2769+
agentId: "main",
2770+
trigger: "user",
2771+
sessionKey: "agent:main:qqbot:direct:12345",
2772+
messageProvider: "qqbot",
2773+
channelId: "qqbot",
2774+
},
2775+
);
2776+
2777+
expect(runEmbeddedPiAgent.mock.calls.at(-1)?.[0]).toMatchObject({
2778+
messageChannel: "qqbot",
2779+
messageProvider: "qqbot",
2780+
});
2781+
});
2782+
27562783
it("preserves an explicit real channel hint over a stale stored wrapper channel", async () => {
27572784
hoisted.sessionStore["agent:main:telegram:direct:12345"] = {
27582785
sessionId: "session-a",

0 commit comments

Comments
 (0)