fix: iframe页面子智能体不跳出,增加按钮

This commit is contained in:
Rocky Kwok committed 2026-06-23 10:56:51 +08:00
1 parent 1cbc0e2dd6
commit 1c2e524b28
7 files changed
+460 -105

No files matched your search

@@ -0,0 +1,19 @@
type ResolveIframeAssistantIdInput = {
selectedAgentId: string | null;
threadMetadataAgentId: string | null;
};
function normalizeAgentId(agentId: string | null | undefined): string | undefined {
const trimmed = agentId?.trim();
return trimmed ? trimmed : undefined;
}
export function resolveIframeAssistantId({
selectedAgentId,
threadMetadataAgentId,
}: ResolveIframeAssistantIdInput): string | undefined {
return (
normalizeAgentId(selectedAgentId) ??
normalizeAgentId(threadMetadataAgentId)
);
}