@ibiz-template/vue3-components 0.7.41-alpha.171 → 0.7.41-alpha.173
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/{chart-D8ak71ob.js → chart-5YvW_6v1.js} +1 -1
- package/dist/{index-3TWmawfm.js → index-Bpc_rJB_.js} +5 -5
- package/dist/{index.es-LxA_BfCY.js → index.es-BGwZae9P.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-Cm91QEYy.js → wang-editor-DPleXNBg.js} +1 -1
- package/dist/{xlsx-util-DSZIziO3.js → xlsx-util-Dkq4LKKo.js} +1 -1
- package/es/common/carousel/carousel.mjs +1 -1
- package/es/control/chart/chart.mjs +4 -4
- package/es/control/data-view/data-view.mjs +9 -3
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/grid/grid/grid.mjs +4 -4
- package/es/control/list/list.mjs +9 -3
- package/es/control/tree-grid/tree-grid.mjs +4 -4
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +4 -4
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +25 -10
- package/es/editor/ai-chat/embed-ai-chat-editor.controller.mjs +17 -8
- package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.mjs +14 -14
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +25 -28
- package/es/util/ai-chat-util/ai-chat-util.mjs +44 -3
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/util/modal-util/modal-util.mjs +7 -0
- package/lib/common/carousel/carousel.cjs +1 -1
- package/lib/control/chart/chart.cjs +4 -4
- package/lib/control/data-view/data-view.cjs +8 -2
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/grid/grid/grid.cjs +4 -4
- package/lib/control/list/list.cjs +8 -2
- package/lib/control/tree-grid/tree-grid.cjs +4 -4
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +4 -4
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +24 -9
- package/lib/editor/ai-chat/embed-ai-chat-editor.controller.cjs +17 -8
- package/lib/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.cjs +14 -14
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +25 -28
- package/lib/util/ai-chat-util/ai-chat-util.cjs +43 -2
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/util/modal-util/modal-util.cjs +7 -0
- package/package.json +6 -6
- package/src/common/carousel/carousel.tsx +1 -1
- package/src/control/chart/chart.tsx +4 -4
- package/src/control/data-view/data-view.tsx +11 -4
- package/src/control/grid/grid/grid.tsx +4 -4
- package/src/control/list/list.tsx +11 -4
- package/src/control/tree-grid/tree-grid.tsx +4 -4
- package/src/control/tree-grid-ex/tree-grid-ex.tsx +4 -4
- package/src/editor/ai-chat/embed-ai-chat/embed-ai-chat.tsx +32 -18
- package/src/editor/ai-chat/embed-ai-chat-editor.controller.ts +25 -13
- package/src/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.tsx +14 -14
- package/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +42 -63
- package/src/util/ai-chat-util/ai-chat-util.ts +49 -3
- package/src/util/modal-util/modal-util.ts +8 -0
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.152_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.161_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.152_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.161_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
watch,
|
|
12
12
|
} from 'vue';
|
|
13
13
|
import { createUUID } from 'qx-util';
|
|
14
|
-
import { ITextArea } from '@ibiz/model-core';
|
|
15
14
|
import {
|
|
16
15
|
convertNavData,
|
|
17
16
|
calcDeCodeNameById,
|
|
@@ -39,6 +38,34 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
39
38
|
// AI聊天框挂载元素
|
|
40
39
|
const aiChatElementRef: Ref<HTMLElement | null> = ref(null);
|
|
41
40
|
let mountedFlag: boolean = false;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description 获取 topicId
|
|
44
|
+
* @returns {*} {string}
|
|
45
|
+
*/
|
|
46
|
+
const getTopicId = (): string => {
|
|
47
|
+
const { appDataEntityId, appDEACModeId } = c.model;
|
|
48
|
+
if (!appDataEntityId || !appDEACModeId) return '';
|
|
49
|
+
const editorParams = { ...c.editorParams };
|
|
50
|
+
const appDataEntityName = calcDeCodeNameById(appDataEntityId!);
|
|
51
|
+
let topicId = `${appDataEntityId}@${c.model.appDEACModeId}@`;
|
|
52
|
+
// srfainewtopic 打开即新建会话,不去寻找历史会话
|
|
53
|
+
topicId += c.context[appDataEntityName]
|
|
54
|
+
? c.context[appDataEntityName]
|
|
55
|
+
: editorParams.srfainewtopic === 'true'
|
|
56
|
+
? createUUID()
|
|
57
|
+
: 'default';
|
|
58
|
+
// 附加会话标记附加至数据主键段,主要解决同一数据多个智能体会话历史数据混乱问题
|
|
59
|
+
if (editorParams.srfattachsessiontag) {
|
|
60
|
+
topicId += `__${editorParams.srfattachsessiontag}`;
|
|
61
|
+
delete editorParams.srfattachsessiontag;
|
|
62
|
+
} else {
|
|
63
|
+
// 每次打开没有明确指定会话附加标识,都应该独立
|
|
64
|
+
topicId += `__${createUUID()}`;
|
|
65
|
+
}
|
|
66
|
+
return topicId;
|
|
67
|
+
};
|
|
68
|
+
|
|
42
69
|
// 挂载AI聊天框
|
|
43
70
|
const mountedAIChat = async () => {
|
|
44
71
|
if (mountedFlag) return;
|
|
@@ -53,7 +80,7 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
53
80
|
);
|
|
54
81
|
Object.assign(editorParams, addParams);
|
|
55
82
|
}
|
|
56
|
-
const appDataEntityId =
|
|
83
|
+
const appDataEntityId = c.model.appDataEntityId;
|
|
57
84
|
const chatInstance = c.chatInstance;
|
|
58
85
|
if (!appDataEntityId || !c.deACMode || !chatInstance) {
|
|
59
86
|
// 条件未就绪时重置标记,允许后续事件触发时重试
|
|
@@ -71,23 +98,10 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
71
98
|
topicId = srfsessionid.substring(firstAtIndex + 1, lastAtIndex);
|
|
72
99
|
}
|
|
73
100
|
sessionid = editorParams.srfsessionid;
|
|
101
|
+
// 分享时重新计算topicId
|
|
102
|
+
if (c.isShare) topicId = getTopicId();
|
|
74
103
|
} else {
|
|
75
|
-
|
|
76
|
-
topicId = `${appDataEntityId}@${(c.model as ITextArea).appDEACModeId}@`;
|
|
77
|
-
// srfainewtopic 打开即新建会话,不去寻找历史会话
|
|
78
|
-
topicId += c.context[appDataEntityName]
|
|
79
|
-
? c.context[appDataEntityName]
|
|
80
|
-
: editorParams.srfainewtopic === 'true'
|
|
81
|
-
? createUUID()
|
|
82
|
-
: 'default';
|
|
83
|
-
// 附加会话标记附加至数据主键段,主要解决同一数据多个智能体会话历史数据混乱问题
|
|
84
|
-
if (editorParams.srfattachsessiontag) {
|
|
85
|
-
topicId += `__${editorParams.srfattachsessiontag}`;
|
|
86
|
-
delete editorParams.srfattachsessiontag;
|
|
87
|
-
} else {
|
|
88
|
-
// 每次打开没有明确指定会话附加标识,都应该独立
|
|
89
|
-
topicId += `__${createUUID()}`;
|
|
90
|
-
}
|
|
104
|
+
topicId = getTopicId();
|
|
91
105
|
sessionid = ibiz.aiChatUtil.getChatSessionId(
|
|
92
106
|
'TOPIC',
|
|
93
107
|
topicId,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from '@ibiz-template/runtime';
|
|
7
7
|
import { Ref, ref } from 'vue';
|
|
8
8
|
import { createUUID } from 'qx-util';
|
|
9
|
-
import { IAppDEACMode, ITextArea
|
|
9
|
+
import { IAppDEACMode, ITextArea } from '@ibiz/model-core';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @description 嵌入式AI聊天编辑器控制器
|
|
@@ -14,9 +14,9 @@ import { IAppDEACMode, ITextArea, ITextBox } from '@ibiz/model-core';
|
|
|
14
14
|
* @date 2026-05-15 11:05:17
|
|
15
15
|
* @export
|
|
16
16
|
* @class EmbedAIChatEditorController
|
|
17
|
-
* @extends {EditorController<
|
|
17
|
+
* @extends {EditorController<ITextArea>}
|
|
18
18
|
*/
|
|
19
|
-
export class EmbedAIChatEditorController extends EditorController<
|
|
19
|
+
export class EmbedAIChatEditorController extends EditorController<ITextArea> {
|
|
20
20
|
/**
|
|
21
21
|
* @description 聊天框实例
|
|
22
22
|
* @author tony001
|
|
@@ -45,12 +45,19 @@ export class EmbedAIChatEditorController extends EditorController<ITextBox> {
|
|
|
45
45
|
deACMode?: IAppDEACMode;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* @description
|
|
48
|
+
* @description 是否为简单模式
|
|
49
49
|
* @type {boolean}
|
|
50
50
|
* @memberof EmbedAIChatEditorController
|
|
51
51
|
*/
|
|
52
52
|
isSimple: boolean = false;
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @description 是否为分享模式
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof EmbedAIChatEditorController
|
|
58
|
+
*/
|
|
59
|
+
isShare: boolean = false;
|
|
60
|
+
|
|
54
61
|
/**
|
|
55
62
|
* @description 编辑器唯一标识
|
|
56
63
|
* @protected
|
|
@@ -69,7 +76,7 @@ export class EmbedAIChatEditorController extends EditorController<ITextBox> {
|
|
|
69
76
|
*/
|
|
70
77
|
protected async onInit(): Promise<void> {
|
|
71
78
|
await super.onInit();
|
|
72
|
-
const model = this.model
|
|
79
|
+
const model = this.model;
|
|
73
80
|
if (model.appDEACModeId) {
|
|
74
81
|
// 1.自填模式
|
|
75
82
|
this.deACMode = await getDeACMode(
|
|
@@ -86,15 +93,20 @@ export class EmbedAIChatEditorController extends EditorController<ITextBox> {
|
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
|
-
|
|
90
|
-
const module = await import('@ibiz-template-plugin/ai-chat');
|
|
91
|
-
if (module && module.createFlatChat) {
|
|
92
|
-
this.chatInstance = module.createFlatChat();
|
|
93
|
-
} else if (module && module.default && module.default.createFlatChat) {
|
|
94
|
-
this.chatInstance = module.default.createFlatChat();
|
|
95
|
-
}
|
|
96
|
-
const { issimple } = this.editorParams;
|
|
96
|
+
const { issimple, share } = this.editorParams;
|
|
97
97
|
if (issimple) this.isSimple = issimple === 'true';
|
|
98
|
+
this.isShare = share === 'true';
|
|
99
|
+
// 3. 创建聊天框实例
|
|
100
|
+
const module = await import('@ibiz-template-plugin/ai-chat');
|
|
101
|
+
if (!module) return;
|
|
102
|
+
|
|
103
|
+
// 统一获取工厂函数(兼容 default 导出)
|
|
104
|
+
const factory = module.default ?? module;
|
|
105
|
+
const createChat = this.isShare
|
|
106
|
+
? factory.createReadonlyChat
|
|
107
|
+
: factory.createFlatChat;
|
|
108
|
+
|
|
109
|
+
if (createChat) this.chatInstance = createChat();
|
|
98
110
|
}
|
|
99
111
|
|
|
100
112
|
/**
|
|
@@ -110,59 +110,59 @@ export const IBizTransferPicker = defineComponent({
|
|
|
110
110
|
// 子类样式透传
|
|
111
111
|
const childStyle = [
|
|
112
112
|
{
|
|
113
|
-
|
|
113
|
+
style: semanticStyle('editor.content'),
|
|
114
114
|
selector: `.ibiz-transfer`,
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
|
|
117
|
+
style: semanticStyle('editor.section'),
|
|
118
118
|
selector: `.ibiz-transfer-panel`,
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
|
-
|
|
121
|
+
style: semanticStyle('editor.actions'),
|
|
122
122
|
selector: '.ibiz-transfer__buttons',
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
|
-
|
|
125
|
+
style: semanticStyle('editor.actions.item'),
|
|
126
126
|
selector: '.ibiz-transfer__button',
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
|
-
|
|
129
|
+
style: semanticStyle('editor.header'),
|
|
130
130
|
selector: `.ibiz-transfer-panel__header`,
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
|
-
|
|
133
|
+
style: semanticStyle('editor.title'),
|
|
134
134
|
selector: `.ibiz-transfer-panel__header--title`,
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
|
-
|
|
137
|
+
style: semanticStyle('editor.count'),
|
|
138
138
|
selector: `.ibiz-transfer-panel__header--count`,
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
|
-
|
|
141
|
+
style: semanticStyle('editor.body'),
|
|
142
142
|
selector: '.ibiz-transfer-panel__body',
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
|
|
145
|
+
style: semanticStyle('editor.search'),
|
|
146
146
|
selector: '.el-input__inner',
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
|
-
|
|
149
|
+
style: semanticStyle('editor.search.prefix'),
|
|
150
150
|
selector: '.el-input__prefix',
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
|
-
|
|
153
|
+
style: semanticStyle('editor.list'),
|
|
154
154
|
selector: '.ibiz-transfer-panel__list',
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
|
-
|
|
157
|
+
style: semanticStyle('editor.item'),
|
|
158
158
|
selector: '.ibiz-transfer-panel__item',
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
|
|
161
|
+
style: semanticStyle('editor.item.checkbox'),
|
|
162
162
|
selector: '.ibiz-transfer-panel__item .el-checkbox__inner',
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
|
-
|
|
165
|
+
style: semanticStyle('editor.item.label'),
|
|
166
166
|
selector: '.ibiz-transfer-panel__item .el-checkbox__label',
|
|
167
167
|
},
|
|
168
168
|
];
|
|
@@ -634,38 +634,45 @@ export const IBizDropdown = defineComponent({
|
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
636
|
|
|
637
|
+
/**
|
|
638
|
+
* @description 获取项样式
|
|
639
|
+
* @param {IData} [item]
|
|
640
|
+
* @returns {*} {Record<string, string>}
|
|
641
|
+
*/
|
|
642
|
+
const getItemStyle = (item?: IData): Record<string, string> => {
|
|
643
|
+
const isRound = c.editorParams.type === 'round';
|
|
644
|
+
return ns.cssVarBlock({
|
|
645
|
+
'select-option-item-color': isRound
|
|
646
|
+
? item?.color || `var(${ns.cssVarName('color-primary-text')})`
|
|
647
|
+
: item?.color,
|
|
648
|
+
'select-option-item-bkcolor': isRound
|
|
649
|
+
? item?.bkcolor || `var(${ns.cssVarName('color-primary')})`
|
|
650
|
+
: item?.bkcolor,
|
|
651
|
+
'select-option-item-padding': isRound
|
|
652
|
+
? `0 var(${ns.cssVarName('spacing-base')})`
|
|
653
|
+
: '',
|
|
654
|
+
});
|
|
655
|
+
};
|
|
656
|
+
|
|
637
657
|
const prefix: { prefix?: () => JSX.Element[] | undefined } = {};
|
|
638
658
|
if (c.editorParams.type === 'round') {
|
|
639
659
|
Object.assign(prefix, {
|
|
640
660
|
prefix: () => {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
codeListItem
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
'spacing-base',
|
|
657
|
-
)})`,
|
|
658
|
-
})
|
|
659
|
-
: ''
|
|
660
|
-
}
|
|
661
|
-
>
|
|
662
|
-
{codeListItem?.sysImage && (
|
|
663
|
-
<iBizIcon icon={codeListItem?.sysImage}></iBizIcon>
|
|
664
|
-
)}
|
|
665
|
-
{text || ''}
|
|
666
|
-
</div>
|
|
667
|
-
);
|
|
668
|
-
});
|
|
661
|
+
if (valueText.value)
|
|
662
|
+
return valueText.value.split(valueSeparator).map(text => {
|
|
663
|
+
const codeListItem = getCodeListItem(text);
|
|
664
|
+
return (
|
|
665
|
+
<div
|
|
666
|
+
class={[ns.b('select-option-text'), codeListItem?.textCls]}
|
|
667
|
+
style={getItemStyle(codeListItem)}
|
|
668
|
+
>
|
|
669
|
+
{codeListItem?.sysImage && (
|
|
670
|
+
<iBizIcon icon={codeListItem?.sysImage}></iBizIcon>
|
|
671
|
+
)}
|
|
672
|
+
{text}
|
|
673
|
+
</div>
|
|
674
|
+
);
|
|
675
|
+
});
|
|
669
676
|
},
|
|
670
677
|
});
|
|
671
678
|
}
|
|
@@ -692,6 +699,7 @@ export const IBizDropdown = defineComponent({
|
|
|
692
699
|
onFocus,
|
|
693
700
|
setEditable,
|
|
694
701
|
handleKeyUp,
|
|
702
|
+
getItemStyle,
|
|
695
703
|
getCodeListItem,
|
|
696
704
|
onVisibleChange,
|
|
697
705
|
customNodeClass,
|
|
@@ -817,11 +825,9 @@ export const IBizDropdown = defineComponent({
|
|
|
817
825
|
label={item.text}
|
|
818
826
|
disabled={item.disableSelect === true}
|
|
819
827
|
style={[
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
})
|
|
824
|
-
: '',
|
|
828
|
+
this.ns.cssVarBlock({
|
|
829
|
+
'select-option-item-bkcolor': item.bkcolor,
|
|
830
|
+
}),
|
|
825
831
|
this.semanticStyle('editor.popup.item', { item }),
|
|
826
832
|
]}
|
|
827
833
|
class={[
|
|
@@ -841,13 +847,7 @@ export const IBizDropdown = defineComponent({
|
|
|
841
847
|
this.ns.b('select-option-content'),
|
|
842
848
|
item.textCls ? item.textCls : null,
|
|
843
849
|
]}
|
|
844
|
-
style={
|
|
845
|
-
item.color
|
|
846
|
-
? this.ns.cssVarBlock({
|
|
847
|
-
'select-option-item-color': `${item.color}`,
|
|
848
|
-
})
|
|
849
|
-
: ''
|
|
850
|
-
}
|
|
850
|
+
style={this.getItemStyle(item)}
|
|
851
851
|
>
|
|
852
852
|
{item.sysImage && (
|
|
853
853
|
<iBizIcon
|
|
@@ -891,17 +891,7 @@ export const IBizDropdown = defineComponent({
|
|
|
891
891
|
this.semanticClass('editor.item', { item: codeListItem }),
|
|
892
892
|
]}
|
|
893
893
|
style={[
|
|
894
|
-
codeListItem
|
|
895
|
-
? this.ns.cssVarBlock({
|
|
896
|
-
'readonly-text-item-color': `${codeListItem.color || ''}`,
|
|
897
|
-
'select-option-item-color': `${codeListItem.color || ''}`,
|
|
898
|
-
'select-option-item-bkcolor': `${
|
|
899
|
-
(this.c.editorParams.type === 'round'
|
|
900
|
-
? codeListItem.bkcolor
|
|
901
|
-
: '') || ''
|
|
902
|
-
}`,
|
|
903
|
-
})
|
|
904
|
-
: '',
|
|
894
|
+
this.getItemStyle(codeListItem),
|
|
905
895
|
this.semanticStyle('editor.item', { item: codeListItem }),
|
|
906
896
|
]}
|
|
907
897
|
v-child-class={this.getItemChildClass({ item: codeListItem })}
|
|
@@ -948,18 +938,7 @@ export const IBizDropdown = defineComponent({
|
|
|
948
938
|
this.semanticClass('editor.item', { item: codeListItem }),
|
|
949
939
|
]}
|
|
950
940
|
style={[
|
|
951
|
-
codeListItem
|
|
952
|
-
? this.ns.cssVarBlock({
|
|
953
|
-
'select-option-item-color': `${
|
|
954
|
-
codeListItem.color || ''
|
|
955
|
-
}`,
|
|
956
|
-
'select-option-item-bkcolor': `${
|
|
957
|
-
(this.c.editorParams.type === 'round'
|
|
958
|
-
? codeListItem.bkcolor
|
|
959
|
-
: '') || ''
|
|
960
|
-
}`,
|
|
961
|
-
})
|
|
962
|
-
: '',
|
|
941
|
+
this.getItemStyle(codeListItem),
|
|
963
942
|
this.semanticStyle('editor.item', { item: codeListItem }),
|
|
964
943
|
]}
|
|
965
944
|
v-child-class={this.getItemChildClass({ item: codeListItem })}
|
|
@@ -481,6 +481,21 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
481
481
|
});
|
|
482
482
|
return result;
|
|
483
483
|
};
|
|
484
|
+
topicOptions.shareTopic = async (realID: string) => {
|
|
485
|
+
if (!ibiz.config.common.aiSessionShareUIActionTag) return;
|
|
486
|
+
await UIActionUtil.execAndResolved(
|
|
487
|
+
ibiz.config.common.aiSessionShareUIActionTag,
|
|
488
|
+
{
|
|
489
|
+
context,
|
|
490
|
+
params,
|
|
491
|
+
data: [{ id: realID }],
|
|
492
|
+
view: args.view,
|
|
493
|
+
ctrl: args.ctrl,
|
|
494
|
+
},
|
|
495
|
+
context.srfappid,
|
|
496
|
+
);
|
|
497
|
+
return true;
|
|
498
|
+
};
|
|
484
499
|
topicOptions.action = async (
|
|
485
500
|
action: string,
|
|
486
501
|
context: IContext,
|
|
@@ -511,8 +526,9 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
511
526
|
editorParams.srfprojectselectplaceholder ||
|
|
512
527
|
ibiz.config.common.aiProjectSelectPlaceholder,
|
|
513
528
|
knowledgeBaseView:
|
|
514
|
-
editorParams.srfaiknowledgebaseview
|
|
515
|
-
|
|
529
|
+
editorParams.srfaiknowledgebaseview !== undefined
|
|
530
|
+
? editorParams.srfaiknowledgebaseview
|
|
531
|
+
: ibiz.config.common.aiKnowledgeBaseView,
|
|
516
532
|
selectAIProjectId: editorParams.srfselectaiprojectid,
|
|
517
533
|
};
|
|
518
534
|
// 编辑器参数srfaiappendcurdata,是否传入对象参数,用于历史查询传参
|
|
@@ -1442,6 +1458,21 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
1442
1458
|
});
|
|
1443
1459
|
return result;
|
|
1444
1460
|
};
|
|
1461
|
+
topicOptions.shareTopic = async (realID: string) => {
|
|
1462
|
+
if (!ibiz.config.common.aiSessionShareUIActionTag) return;
|
|
1463
|
+
await UIActionUtil.execAndResolved(
|
|
1464
|
+
ibiz.config.common.aiSessionShareUIActionTag,
|
|
1465
|
+
{
|
|
1466
|
+
context,
|
|
1467
|
+
params,
|
|
1468
|
+
data: [{ id: realID }],
|
|
1469
|
+
view: args.view,
|
|
1470
|
+
ctrl: args.ctrl,
|
|
1471
|
+
},
|
|
1472
|
+
context.srfappid,
|
|
1473
|
+
);
|
|
1474
|
+
return true;
|
|
1475
|
+
};
|
|
1445
1476
|
topicOptions.action = async (
|
|
1446
1477
|
action: string,
|
|
1447
1478
|
context: IContext,
|
|
@@ -1472,7 +1503,9 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
1472
1503
|
params.srfprojectselectplaceholder ||
|
|
1473
1504
|
ibiz.config.common.aiProjectSelectPlaceholder,
|
|
1474
1505
|
knowledgeBaseView:
|
|
1475
|
-
params.srfaiknowledgebaseview
|
|
1506
|
+
params.srfaiknowledgebaseview !== undefined
|
|
1507
|
+
? params.srfaiknowledgebaseview
|
|
1508
|
+
: ibiz.config.common.aiKnowledgeBaseView,
|
|
1476
1509
|
selectAIProjectId: params.srfselectaiprojectid,
|
|
1477
1510
|
};
|
|
1478
1511
|
if (params.hasOwnProperty('srfaiknowledgebaseview'))
|
|
@@ -2663,6 +2696,19 @@ export class AIChatUtil implements IApiAIChatUtil {
|
|
|
2663
2696
|
);
|
|
2664
2697
|
return result;
|
|
2665
2698
|
};
|
|
2699
|
+
// 拷贝会话
|
|
2700
|
+
resourceOptions.copySession = async (
|
|
2701
|
+
realID: string,
|
|
2702
|
+
data: IData,
|
|
2703
|
+
): Promise<IData> => {
|
|
2704
|
+
const result = await utilService.copySession(
|
|
2705
|
+
context,
|
|
2706
|
+
params,
|
|
2707
|
+
realID,
|
|
2708
|
+
data,
|
|
2709
|
+
);
|
|
2710
|
+
return result;
|
|
2711
|
+
};
|
|
2666
2712
|
return resourceOptions;
|
|
2667
2713
|
}
|
|
2668
2714
|
|
|
@@ -11,6 +11,14 @@ import { ElMessageBox } from 'element-plus';
|
|
|
11
11
|
* @implements {IModalUtil}
|
|
12
12
|
*/
|
|
13
13
|
export class ModalUtil implements IModalUtil {
|
|
14
|
+
async default(params: ModalParams): Promise<void> {
|
|
15
|
+
await ElMessageBox({
|
|
16
|
+
message: params.desc,
|
|
17
|
+
...params,
|
|
18
|
+
...params.options,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
async info(params: ModalParams): Promise<void> {
|
|
15
23
|
await ElMessageBox.alert(params.desc, params.title, {
|
|
16
24
|
...params.options,
|