feat: 插件管理及域名和智能体对应
This commit is contained in:
1 parent
eb61b332a2
commit
e9e4c181b9
9 files changed
+414
-27
No files matched your search
@@ -1,6 +1,7 @@
|
||||
type ResolveIframeAssistantIdInput = {
|
||||
selectedAgentId: string | null;
|
||||
threadMetadataAgentId: string | null;
|
||||
preferDefaultAssistant?: boolean;
|
||||
};
|
||||
|
||||
function normalizeAgentId(agentId: string | null | undefined): string | undefined {
|
||||
@@ -11,7 +12,11 @@ function normalizeAgentId(agentId: string | null | undefined): string | undefine
|
||||
export function resolveIframeAssistantId({
|
||||
selectedAgentId,
|
||||
threadMetadataAgentId,
|
||||
preferDefaultAssistant = false,
|
||||
}: ResolveIframeAssistantIdInput): string | undefined {
|
||||
if (preferDefaultAssistant) {
|
||||
return normalizeAgentId(selectedAgentId);
|
||||
}
|
||||
return (
|
||||
normalizeAgentId(selectedAgentId) ??
|
||||
normalizeAgentId(threadMetadataAgentId)
|
||||
|
||||
Reference in new issue
Block a user