@ibiz-template/runtime 0.7.41-alpha.150 → 0.7.41-alpha.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +43 -0
- package/dist/index.system.min.js +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +11 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.d.ts +11 -0
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +39 -0
- package/package.json +2 -2
- package/src/interface/service/service/i-app-de.service.ts +18 -0
- package/src/service/service/entity/de.service.ts +50 -0
package/dist/index.esm.js
CHANGED
|
@@ -73069,6 +73069,49 @@ var DEService = class {
|
|
|
73069
73069
|
);
|
|
73070
73070
|
});
|
|
73071
73071
|
}
|
|
73072
|
+
/**
|
|
73073
|
+
* @description 实体级别 AI 恢复会话
|
|
73074
|
+
* @param {(data: IPortalAsyncAction) => void} onmessage
|
|
73075
|
+
* @param {AbortController} controller
|
|
73076
|
+
* @param {IContext} context
|
|
73077
|
+
* @param {IParams} [params={}]
|
|
73078
|
+
* @param {IData} [data={}]
|
|
73079
|
+
* @returns {*} {Promise<void>}
|
|
73080
|
+
* @memberof DEService
|
|
73081
|
+
*/
|
|
73082
|
+
aiResumeSse(onmessage, controller, context, params = {}, data = {}) {
|
|
73083
|
+
const { signal } = controller;
|
|
73084
|
+
const app = ibiz.hub.getApp(this.model.appId);
|
|
73085
|
+
const srfkey = context[this.model.codeName.toLowerCase()];
|
|
73086
|
+
const curPath = "/".concat(this.model.deapicodeName2, "/ssechatcompletion/resume").concat(srfkey ? "/".concat(srfkey) : "");
|
|
73087
|
+
const resPath = calcResPath(context, this.model);
|
|
73088
|
+
const path2 = resPath ? "/".concat(resPath).concat(curPath) : "".concat(curPath);
|
|
73089
|
+
return new Promise((resolve, reject) => {
|
|
73090
|
+
app.net.sse(
|
|
73091
|
+
"".concat(path2),
|
|
73092
|
+
{ srfactag: "AIChat", ...params },
|
|
73093
|
+
{
|
|
73094
|
+
headers: {
|
|
73095
|
+
"Content-Type": "application/json"
|
|
73096
|
+
},
|
|
73097
|
+
body: JSON.stringify(data),
|
|
73098
|
+
onmessage: (e) => {
|
|
73099
|
+
if (e.data) {
|
|
73100
|
+
const json = JSON.parse(e.data);
|
|
73101
|
+
onmessage(json);
|
|
73102
|
+
}
|
|
73103
|
+
},
|
|
73104
|
+
onclose: () => {
|
|
73105
|
+
resolve();
|
|
73106
|
+
},
|
|
73107
|
+
onerror: (e) => {
|
|
73108
|
+
reject(e);
|
|
73109
|
+
},
|
|
73110
|
+
signal
|
|
73111
|
+
}
|
|
73112
|
+
);
|
|
73113
|
+
});
|
|
73114
|
+
}
|
|
73072
73115
|
/**
|
|
73073
73116
|
* 获取 AI 聊天会话推荐提示
|
|
73074
73117
|
*
|