Merge remote-tracking branch 'origin/master' into ji-dev

This commit is contained in:
Administrator committed 2026-06-29 16:43:45 +08:00
commit 0c663f5f7c
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,
},
);
});