fix: iframe页面子智能体不跳出,增加按钮
This commit is contained in:
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)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user