@ibiz-template/vue3-components 0.7.41-alpha.121 → 0.7.41-alpha.122
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-YGY0RKUR.js → index-BXO4Omap.js} +3 -3
- package/dist/{index.es-AEZP6Fvy.js → index.es-i_3v13Rd.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-zpJYuJGU.js → wang-editor-CgYOgqC_.js} +1 -1
- package/dist/{xlsx-util-Crzb5rtS.js → xlsx-util-B2yu2RZe.js} +1 -1
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +3 -2
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +3 -2
- package/package.json +2 -2
- package/src/editor/ai-chat/embed-ai-chat/embed-ai-chat.tsx +7 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode, ref, watch, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { createUUID } from 'qx-util';
|
|
2
3
|
import { convertNavData, calcDeCodeNameById, FormDetailEventName } from '@ibiz-template/runtime';
|
|
3
4
|
import { useNamespace, getEditorEmits, getInputProps } from '@ibiz-template/vue3-util';
|
|
4
5
|
import './embed-ai-chat.css';
|
|
@@ -45,7 +46,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ defineComponent({
|
|
|
45
46
|
} else {
|
|
46
47
|
const appDataEntityName = calcDeCodeNameById(appDataEntityId);
|
|
47
48
|
topicId = "".concat(appDataEntityId, "@").concat(c.model.appDEACModeId, "@");
|
|
48
|
-
topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : "default";
|
|
49
|
+
topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : editorParams.srfainewtopic === "true" ? createUUID() : "default";
|
|
49
50
|
if (editorParams.srfattachsessiontag) {
|
|
50
51
|
topicId += "__".concat(editorParams.srfattachsessiontag);
|
|
51
52
|
delete editorParams.srfattachsessiontag;
|
|
@@ -76,7 +77,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ defineComponent({
|
|
|
76
77
|
chatCaption = ibiz.appUtil.resolveI18nText(editorParams.srfaichatcaption);
|
|
77
78
|
}
|
|
78
79
|
const chatInstanceOptions = {
|
|
79
|
-
mode: "TOPIC",
|
|
80
|
+
mode: editorParams.srfaimode || "TOPIC",
|
|
80
81
|
placeholder: c.placeHolder,
|
|
81
82
|
resourceOptions,
|
|
82
83
|
containerOptions: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
|
+
var qxUtil = require('qx-util');
|
|
4
5
|
var runtime = require('@ibiz-template/runtime');
|
|
5
6
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
7
|
require('./embed-ai-chat.css');
|
|
@@ -47,7 +48,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
48
|
} else {
|
|
48
49
|
const appDataEntityName = runtime.calcDeCodeNameById(appDataEntityId);
|
|
49
50
|
topicId = "".concat(appDataEntityId, "@").concat(c.model.appDEACModeId, "@");
|
|
50
|
-
topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : "default";
|
|
51
|
+
topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : editorParams.srfainewtopic === "true" ? qxUtil.createUUID() : "default";
|
|
51
52
|
if (editorParams.srfattachsessiontag) {
|
|
52
53
|
topicId += "__".concat(editorParams.srfattachsessiontag);
|
|
53
54
|
delete editorParams.srfattachsessiontag;
|
|
@@ -78,7 +79,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
79
|
chatCaption = ibiz.appUtil.resolveI18nText(editorParams.srfaichatcaption);
|
|
79
80
|
}
|
|
80
81
|
const chatInstanceOptions = {
|
|
81
|
-
mode: "TOPIC",
|
|
82
|
+
mode: editorParams.srfaimode || "TOPIC",
|
|
82
83
|
placeholder: c.placeHolder,
|
|
83
84
|
resourceOptions,
|
|
84
85
|
containerOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.122",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
33
33
|
"@floating-ui/dom": "^1.5.3",
|
|
34
|
-
"@ibiz-template-plugin/ai-chat": "^0.0.
|
|
34
|
+
"@ibiz-template-plugin/ai-chat": "^0.0.94",
|
|
35
35
|
"@ibiz-template-plugin/gantt": "0.1.8-alpha.468",
|
|
36
36
|
"@ibiz-template-plugin/bi-report": "0.0.32",
|
|
37
37
|
"@ibiz-template-plugin/data-view": "0.0.8",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable no-nested-ternary */
|
|
1
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
3
|
import { defineComponent, onMounted, onUnmounted, Ref, ref, watch } from 'vue';
|
|
4
|
+
import { createUUID } from 'qx-util';
|
|
3
5
|
import { ITextArea } from '@ibiz/model-core';
|
|
4
6
|
import {
|
|
5
7
|
convertNavData,
|
|
@@ -62,9 +64,12 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
62
64
|
} else {
|
|
63
65
|
const appDataEntityName = calcDeCodeNameById(appDataEntityId!);
|
|
64
66
|
topicId = `${appDataEntityId}@${(c.model as ITextArea).appDEACModeId}@`;
|
|
67
|
+
// srfainewtopic 打开即新建会话,不去寻找历史会话
|
|
65
68
|
topicId += c.context[appDataEntityName]
|
|
66
69
|
? c.context[appDataEntityName]
|
|
67
|
-
: '
|
|
70
|
+
: editorParams.srfainewtopic === 'true'
|
|
71
|
+
? createUUID()
|
|
72
|
+
: 'default';
|
|
68
73
|
// 附加会话标记附加至数据主键段,主要解决同一数据多个智能体会话历史数据混乱问题
|
|
69
74
|
if (editorParams.srfattachsessiontag) {
|
|
70
75
|
topicId += `__${editorParams.srfattachsessiontag}`;
|
|
@@ -106,7 +111,7 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
106
111
|
);
|
|
107
112
|
}
|
|
108
113
|
const chatInstanceOptions: IData = {
|
|
109
|
-
mode: 'TOPIC',
|
|
114
|
+
mode: editorParams.srfaimode || 'TOPIC',
|
|
110
115
|
placeholder: c.placeHolder,
|
|
111
116
|
resourceOptions,
|
|
112
117
|
containerOptions: {
|