@apaas-ai/aily-cui-sdk
Advanced tools
Comparing version 1.5.0 to 1.6.0
{ | ||
"nonCachedDurationMs": 72200.03481292725 | ||
"nonCachedDurationMs": 72497.62390899658 | ||
} |
@@ -5,2 +5,41 @@ { | ||
{ | ||
"version": "1.6.0", | ||
"tag": "@apaas-ai/aily-cui-sdk@1.6.0", | ||
"date": "Thu, 20 Jun 2024 11:36:47 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "del console" | ||
}, | ||
{ | ||
"comment": "initAilyChat msg key" | ||
}, | ||
{ | ||
"comment": "支持多次 initAilyChat" | ||
}, | ||
{ | ||
"comment": "log" | ||
}, | ||
{ | ||
"comment": "add log again" | ||
}, | ||
{ | ||
"comment": "add log" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.5.1", | ||
"tag": "@apaas-ai/aily-cui-sdk@1.5.1", | ||
"date": "Thu, 13 Jun 2024 11:34:48 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "支持locale配置" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.5.0", | ||
@@ -7,0 +46,0 @@ "tag": "@apaas-ai/aily-cui-sdk@1.5.0", |
# @apaas-ai/aily-cui-sdk | ||
This log was last generated on Wed, 15 May 2024 06:36:03 GMT and should not be manually modified. | ||
This log was last generated on Thu, 20 Jun 2024 11:36:47 GMT and should not be manually modified. | ||
## 1.6.0 | ||
Thu, 20 Jun 2024 11:36:47 GMT | ||
### Minor changes | ||
- del console | ||
- initAilyChat msg key | ||
- 支持多次 initAilyChat | ||
- log | ||
- add log again | ||
- add log | ||
## 1.5.1 | ||
Thu, 13 Jun 2024 11:34:48 GMT | ||
### Patches | ||
- 支持locale配置 | ||
## 1.5.0 | ||
@@ -6,0 +25,0 @@ Wed, 15 May 2024 06:36:03 GMT |
@@ -73,2 +73,3 @@ /// <reference types="react" resolution-mode="require"/> | ||
apaasAppInfo?: ApaasAppInfo; | ||
locale?: 'zh_CN' | 'en_US'; | ||
} | ||
@@ -75,0 +76,0 @@ export interface CUITransitionConfig { |
{ | ||
"name": "@apaas-ai/aily-cui-sdk", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "aily-cui-sdk 对外接入包", | ||
@@ -36,10 +36,11 @@ "author": "xiaoziyang.tcpip@bytedance.com", | ||
"@apaas-ai/api": "0.0.0", | ||
"@apaas-ai/error-handler": "0.0.0", | ||
"@apaas-ai/api-client": "0.0.0", | ||
"@apaas-ai/global-states": "0.0.1", | ||
"@apaas-ai/logger-web": "1.0.0", | ||
"@apaas-infra/config": "1.0.0", | ||
"@apaas-ai/error-handler": "0.0.0" | ||
"@apaas-infra/config": "1.0.0" | ||
}, | ||
"scripts": { | ||
"build": "edenx build --tsconfig tsconfig.build.json", | ||
"build:ci": "edenx build --tsconfig tsconfig.build.json", | ||
"check-type": "rush check-type", | ||
@@ -46,0 +47,0 @@ "lint": "eslint . --quiet", |
@@ -36,2 +36,4 @@ /* eslint-disable @infra/no-document-query */ | ||
const { appKey, ...restConfig } = props; | ||
const prefix = 'From_Aily_'; | ||
const rootKey = root.outerHTML; | ||
@@ -43,9 +45,12 @@ const iframeHtmlDomain = isBoe(props) ? 'https://ae.feishu-boe.cn' : 'https://ae.feishu.cn'; | ||
// 1. create iframe | ||
let iframeDom = document.querySelector(`#aily_${appKey}`) as HTMLIFrameElement; | ||
let iframeDom = root.querySelector(`.aily_${appKey}`) as HTMLIFrameElement; | ||
if (!iframeDom) { | ||
iframeDom = document.createElement('iframe'); | ||
iframeDom.src = `${iframeHtmlDomain}${iframeHtmlPath}`; | ||
iframeDom.id = `aily_${appKey}`; | ||
iframeDom.className = `aily_${appKey}`; | ||
iframeDom.style.width = '100%'; | ||
iframeDom.style.height = '100%'; | ||
iframeDom.onload = function () { | ||
iframeDom?.contentWindow?.postMessage(`${prefix}${rootKey}${appKey}`, iframeHtmlDomain); | ||
}; | ||
await root.appendChild(iframeDom); | ||
@@ -90,3 +95,3 @@ } | ||
// 3. receiveMessage To props.event | ||
window.onmessage = function listenIframeMessage(e) { | ||
window.addEventListener('message', (e) => { | ||
try { | ||
@@ -98,3 +103,5 @@ if (e.origin !== iframeHtmlDomain) { | ||
const data = JSON.parse(e?.data || '{}'); | ||
handleReceiveMessage(data.eventName, data.data); | ||
if (data?.from === `${prefix}${rootKey}${appKey}`) { | ||
handleReceiveMessage(data.eventName, data.data); | ||
} | ||
} | ||
@@ -107,3 +114,3 @@ } catch (error) { | ||
} | ||
}; | ||
}); | ||
@@ -110,0 +117,0 @@ const returnHooks: ChatPanel = { |
@@ -61,2 +61,3 @@ /* eslint-disable no-case-declarations */ | ||
} | ||
return resources; | ||
@@ -63,0 +64,0 @@ } |
@@ -81,2 +81,3 @@ export enum CUILayoutMode { | ||
apaasAppInfo?: ApaasAppInfo; | ||
locale?: 'zh_CN' | 'en_US'; | ||
} | ||
@@ -138,4 +139,4 @@ | ||
updateConfig(config: UpdateConfigProps): Promise<void>; | ||
observeSkill:(skillId: string, name: string, skillType: 'qna' | 'bi' | 'dataCreate') => Promise<void>; | ||
observeSkill: (skillId: string, name: string, skillType: 'qna' | 'bi' | 'dataCreate') => Promise<void>; | ||
setCurrentSkill: (skill: SkillBaseInfo) => Promise<void>; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3814110
103441