feat: iframe增加智能体显示

This commit is contained in:
Rocky Kwok committed 2026-06-29 16:42:38 +08:00
1 parent be4b180d92
commit 1ab4216ccb
3 files changed
+107 -56

No files matched your search

@@ -166,3 +166,25 @@ test("mapped domain overrides the user's manual selection for that incoming mess
},
);
});
test("unmapped incoming url resets auto-selected agent back to default when there is no manual selection", () => {
assert.deepEqual(
resolveIncomingIframeSelection({
pageUrl: "https://another-unknown.example.com/article",
mappings: [
{
id: "m1",
domain: "foo.example.com",
agentId: "agent-1",
enabled: true,
},
],
availableAgentIds: ["agent-1", "agent-2"],
manualSelectedAgentId: null,
}),
{
selectedAgentId: null,
forceDefaultAssistant: true,
},
);
});