@blueking/ai-ui-sdk 0.4.3-beta.13 → 0.4.3-beta.15
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/README.md +2258 -2258
- package/dist/assets/svg/lock.svg +43 -43
- package/dist/common/util.ts.js +103 -103
- package/dist/components/render-agent/agent-download.vue.css +2 -2
- package/dist/components/render-agent/agent-type.vue.css +9 -9
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auth/auth-dialog.script.vue.js.js +3 -6
- package/dist/components/render-auth/auth-dialog.vue.css +2 -2
- package/dist/components/render-auto-height-textarea/index.vue.css +26 -26
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +30 -30
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/corner-badge.script.vue.js.js +50 -0
- package/dist/components/render-card/agent/corner-badge.vue.css +9 -0
- package/dist/components/render-card/agent/corner-badge.vue.d.ts +14 -0
- package/dist/components/render-card/agent/corner-badge.vue.js +5 -0
- package/dist/components/render-card/agent/index.script.vue.js.js +12 -1
- package/dist/components/render-card/agent/index.vue.d.ts +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +18 -18
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/base/collection-icon.script.vue.js.js +3 -16
- package/dist/components/render-card/base/collection-icon.vue.d.ts +0 -1
- package/dist/components/render-card/base.vue.css +30 -30
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/knowledge/index.vue.d.ts +1 -1
- package/dist/components/render-card/knowledgebase/index.vue.d.ts +1 -1
- package/dist/components/render-card/llm/corner-badge.vue.css +12 -12
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +3 -3
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/index.vue.d.ts +1 -1
- package/dist/components/render-card/llm/info.vue.css +8 -8
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +5 -5
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/index.script.vue.js.js +1 -1
- package/dist/components/render-card/mcp/index.vue.d.ts +1 -1
- package/dist/components/render-card/mcp/name-suffix.vue.css +7 -7
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +2 -2
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/prompt/index.script.vue.js.js +7 -2
- package/dist/components/render-card/prompt/index.vue.d.ts +2 -1
- package/dist/components/render-card/role/index.script.vue.js.js +7 -2
- package/dist/components/render-card/role/index.vue.d.ts +2 -1
- package/dist/components/render-card/skill/index.script.vue.js.js +1 -1
- package/dist/components/render-card/skill/scanner.vue.css +7 -7
- package/dist/components/render-card/skill/scanner.vue.js +1 -1
- package/dist/components/render-card/tool/index.script.vue.js.js +7 -2
- package/dist/components/render-card/tool/index.vue.d.ts +2 -1
- package/dist/components/render-checkbox/index.vue.css +41 -41
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +29 -29
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +6 -6
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/content/index.vue.css +15 -15
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +9 -9
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +10 -10
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +8 -8
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +8 -8
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +6 -6
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +3 -3
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.css +4 -4
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +21 -21
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +9 -9
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +9 -9
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/index.vue.css +4 -4
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.vue.css +4 -4
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +31 -31
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +18 -18
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +12 -12
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-dropdown/index.vue.css +15 -15
- package/dist/components/render-file-card/index.vue.css +28 -28
- package/dist/components/render-file-card/index.vue.d.ts +1 -1
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +7 -7
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +12 -12
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-knowledge/icon/index.vue.css +2 -2
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-markdown/edit.postcss.css +92 -92
- package/dist/components/render-markdown/katex.ts.js +8 -8
- package/dist/components/render-markdown/prism-atom-one-dark.postcss.css +192 -192
- package/dist/components/render-markdown/view.postcss.css +99 -99
- package/dist/components/render-permission-tag/index.vue.css +2 -2
- package/dist/components/render-prompt/content/index.vue.css +5 -5
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +4 -4
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-resource-version/index.vue.css +7 -7
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +15 -15
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-search-empty/index.script.vue.js.js +2 -3
- package/dist/components/render-search-empty/index.vue.d.ts +1 -1
- package/dist/components/render-search-select/index.vue.d.ts +1 -1
- package/dist/components/render-select-plus-extension/index.vue.css +11 -11
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-t-table/index.script.vue.js +5 -8
- package/dist/components/render-t-table/index.vue.css +117 -117
- package/dist/components/render-t-table/index.vue.d.ts +1 -1
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +17 -17
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +12 -12
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components/render-tree/index.vue.css +12 -12
- package/dist/components/render-tree/index.vue.d.ts +1 -1
- package/dist/css/fonts/iconcool.svg +268 -268
- package/dist/css/g-utilities.css +40 -10
- package/dist/css/g-utilities.manifest.json +6 -0
- package/dist/css/style.css +259 -259
- package/dist/hooks/use-agent-http.d.ts +1 -0
- package/dist/hooks/use-agent-http.ts.js +9 -2
- package/dist/hooks/use-ellipsis-tooltip.ts.js +28 -28
- package/dist/hooks/use-loading-version.ts.js +4 -4
- package/dist/http/helper/agent.d.ts +7 -1
- package/dist/http/helper/agent.ts.js +60 -44
- package/dist/http/helper/collection.ts.js +13 -12
- package/dist/http/helper/common.ts.js +44 -44
- package/dist/http/helper/dataset.ts.js +76 -76
- package/dist/http/helper/knowledge.ts.js +45 -45
- package/dist/http/helper/mcp.ts.js +36 -36
- package/dist/http/helper/permission.ts.js +12 -12
- package/dist/http/helper/prompt.ts.js +13 -12
- package/dist/http/helper/skill.ts.js +24 -24
- package/dist/http/helper/space.ts.js +24 -24
- package/dist/http/helper/tool.ts.js +22 -20
- package/dist/types/agent.d.ts +18 -0
- package/dist/types/collection.d.ts +2 -0
- package/dist/types/prompt.d.ts +2 -0
- package/dist/types/tool.d.ts +2 -0
- package/package.json +112 -112
package/dist/assets/svg/lock.svg
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<path fill="currentColor"
|
|
4
|
-
d="
|
|
5
|
-
M10.875,8
|
|
6
|
-
L11.454545,8
|
|
7
|
-
C11.75625,8 12,8.25025 12,8.56
|
|
8
|
-
L12,15.44
|
|
9
|
-
C12,15.74975 11.75625,16 11.454545,16
|
|
10
|
-
L0.545455,16
|
|
11
|
-
C0.24375,16 0,15.74975 0,15.44
|
|
12
|
-
L0,8.56
|
|
13
|
-
C0,8.25025 0.24375,8 0.545455,8
|
|
14
|
-
">
|
|
15
|
-
</path>
|
|
16
|
-
<path fill="currentColor"
|
|
17
|
-
d="
|
|
18
|
-
M1.704545,8
|
|
19
|
-
L1.704545,2.24
|
|
20
|
-
C1.704545,1.00275 2.68125,0 3.886364,0
|
|
21
|
-
L8.113636,0
|
|
22
|
-
C9.31875,0 10.295455,1.00275 10.295455,2.24
|
|
23
|
-
L10.295455,6
|
|
24
|
-
L9.068182,6
|
|
25
|
-
L9.068182,2.24
|
|
26
|
-
C9.068182,1.69925 8.640341,1.26 8.113636,1.26
|
|
27
|
-
L3.886364,1.26
|
|
28
|
-
C3.359659,1.26 2.931818,1.69925 2.931818,2.24
|
|
29
|
-
L2.931818,8
|
|
30
|
-
L9,8
|
|
31
|
-
L10.875,8 Z
|
|
32
|
-
">
|
|
33
|
-
<animateTransform id="lock"
|
|
34
|
-
attributeName="transform"
|
|
35
|
-
attributeType="XML"
|
|
36
|
-
type="translate"
|
|
37
|
-
values="0 2; 0 0; 0 0"
|
|
38
|
-
keyTimes="0; .5; 1"
|
|
39
|
-
dur="1s"
|
|
40
|
-
repeatCount="indefinite">
|
|
41
|
-
</animateTransform>
|
|
42
|
-
</path>
|
|
43
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<path fill="currentColor"
|
|
4
|
+
d="
|
|
5
|
+
M10.875,8
|
|
6
|
+
L11.454545,8
|
|
7
|
+
C11.75625,8 12,8.25025 12,8.56
|
|
8
|
+
L12,15.44
|
|
9
|
+
C12,15.74975 11.75625,16 11.454545,16
|
|
10
|
+
L0.545455,16
|
|
11
|
+
C0.24375,16 0,15.74975 0,15.44
|
|
12
|
+
L0,8.56
|
|
13
|
+
C0,8.25025 0.24375,8 0.545455,8
|
|
14
|
+
">
|
|
15
|
+
</path>
|
|
16
|
+
<path fill="currentColor"
|
|
17
|
+
d="
|
|
18
|
+
M1.704545,8
|
|
19
|
+
L1.704545,2.24
|
|
20
|
+
C1.704545,1.00275 2.68125,0 3.886364,0
|
|
21
|
+
L8.113636,0
|
|
22
|
+
C9.31875,0 10.295455,1.00275 10.295455,2.24
|
|
23
|
+
L10.295455,6
|
|
24
|
+
L9.068182,6
|
|
25
|
+
L9.068182,2.24
|
|
26
|
+
C9.068182,1.69925 8.640341,1.26 8.113636,1.26
|
|
27
|
+
L3.886364,1.26
|
|
28
|
+
C3.359659,1.26 2.931818,1.69925 2.931818,2.24
|
|
29
|
+
L2.931818,8
|
|
30
|
+
L9,8
|
|
31
|
+
L10.875,8 Z
|
|
32
|
+
">
|
|
33
|
+
<animateTransform id="lock"
|
|
34
|
+
attributeName="transform"
|
|
35
|
+
attributeType="XML"
|
|
36
|
+
type="translate"
|
|
37
|
+
values="0 2; 0 0; 0 0"
|
|
38
|
+
keyTimes="0; .5; 1"
|
|
39
|
+
dur="1s"
|
|
40
|
+
repeatCount="indefinite">
|
|
41
|
+
</animateTransform>
|
|
42
|
+
</path>
|
|
43
|
+
</svg>
|
package/dist/common/util.ts.js
CHANGED
|
@@ -29,14 +29,14 @@ function _async_to_generator(fn) {
|
|
|
29
29
|
}
|
|
30
30
|
import { Message } from 'bkui-vue';
|
|
31
31
|
import dayjs from 'dayjs';
|
|
32
|
-
/**
|
|
33
|
-
* 选择要上传的文件
|
|
34
|
-
* @param accept 可接受的类型
|
|
35
|
-
* @param size 大小限制
|
|
36
|
-
* @param multiple 是否多选
|
|
37
|
-
* @param number 限制数量
|
|
38
|
-
* @param allowFolder 是否允许选择文件夹
|
|
39
|
-
* @returns Promise
|
|
32
|
+
/**
|
|
33
|
+
* 选择要上传的文件
|
|
34
|
+
* @param accept 可接受的类型
|
|
35
|
+
* @param size 大小限制
|
|
36
|
+
* @param multiple 是否多选
|
|
37
|
+
* @param number 限制数量
|
|
38
|
+
* @param allowFolder 是否允许选择文件夹
|
|
39
|
+
* @returns Promise
|
|
40
40
|
*/ export function chooseFile(accept = '.json', size, multiple, allowFolder) {
|
|
41
41
|
return new Promise((resolve, reject)=>{
|
|
42
42
|
const uploadEl = document.createElement('input');
|
|
@@ -65,18 +65,18 @@ import dayjs from 'dayjs';
|
|
|
65
65
|
document.body.removeChild(uploadEl);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
/**
|
|
69
|
-
* 是否匹配
|
|
70
|
-
* @param value 数据
|
|
71
|
-
* @param search 搜索
|
|
72
|
-
* @returns 是否匹配
|
|
68
|
+
/**
|
|
69
|
+
* 是否匹配
|
|
70
|
+
* @param value 数据
|
|
71
|
+
* @param search 搜索
|
|
72
|
+
* @returns 是否匹配
|
|
73
73
|
*/ export const isMatchSearch = (value, search)=>{
|
|
74
74
|
return value.toLocaleLowerCase().includes(search.toLocaleLowerCase());
|
|
75
75
|
};
|
|
76
|
-
/**
|
|
77
|
-
* 将大小转换成需要展示的文本
|
|
78
|
-
* @param size 大小
|
|
79
|
-
* @returns 展示的文本
|
|
76
|
+
/**
|
|
77
|
+
* 将大小转换成需要展示的文本
|
|
78
|
+
* @param size 大小
|
|
79
|
+
* @returns 展示的文本
|
|
80
80
|
*/ export const getFileSizeTxt = (size)=>{
|
|
81
81
|
let result = `${numberFormatter(size)} B`;
|
|
82
82
|
if (size > 1024) {
|
|
@@ -90,12 +90,12 @@ import dayjs from 'dayjs';
|
|
|
90
90
|
}
|
|
91
91
|
return result;
|
|
92
92
|
};
|
|
93
|
-
/**
|
|
94
|
-
* 数据格式转换
|
|
95
|
-
* @param val 值
|
|
96
|
-
* @param fixed 位数
|
|
97
|
-
* @param locales 语言
|
|
98
|
-
* @returns 格式化后的字符串
|
|
93
|
+
/**
|
|
94
|
+
* 数据格式转换
|
|
95
|
+
* @param val 值
|
|
96
|
+
* @param fixed 位数
|
|
97
|
+
* @param locales 语言
|
|
98
|
+
* @returns 格式化后的字符串
|
|
99
99
|
*/ export const numberFormatter = (val = 0, fixed = 1, locales = 'en-US')=>{
|
|
100
100
|
const options = {
|
|
101
101
|
minimumFractionDigits: fixed,
|
|
@@ -104,10 +104,10 @@ import dayjs from 'dayjs';
|
|
|
104
104
|
};
|
|
105
105
|
return new Intl.NumberFormat(locales, options).format(val);
|
|
106
106
|
};
|
|
107
|
-
/**
|
|
108
|
-
* 数值转换成 k m g 等单位
|
|
109
|
-
* @param val 数值
|
|
110
|
-
* @returns 转换后的数值
|
|
107
|
+
/**
|
|
108
|
+
* 数值转换成 k m g 等单位
|
|
109
|
+
* @param val 数值
|
|
110
|
+
* @returns 转换后的数值
|
|
111
111
|
*/ export const numberUnitFormatter = (val = 0, fixed = 1)=>{
|
|
112
112
|
if (val < 1000 || isEmpty(val)) {
|
|
113
113
|
return val;
|
|
@@ -120,11 +120,11 @@ import dayjs from 'dayjs';
|
|
|
120
120
|
}
|
|
121
121
|
return `${numberFormatter(val / 1000000000, fixed)}G`;
|
|
122
122
|
};
|
|
123
|
-
/**
|
|
124
|
-
* 节流,每隔一段时间执行
|
|
125
|
-
* @param {*} fn 需要执行的函数
|
|
126
|
-
* @param {*} delay 延迟时间,默认200
|
|
127
|
-
* @returns
|
|
123
|
+
/**
|
|
124
|
+
* 节流,每隔一段时间执行
|
|
125
|
+
* @param {*} fn 需要执行的函数
|
|
126
|
+
* @param {*} delay 延迟时间,默认200
|
|
127
|
+
* @returns
|
|
128
128
|
*/ export const throttle = (fn, delay = 200)=>{
|
|
129
129
|
let valid = true;
|
|
130
130
|
return function(p1, p2) {
|
|
@@ -138,10 +138,10 @@ import dayjs from 'dayjs';
|
|
|
138
138
|
}, delay);
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
|
-
/**
|
|
142
|
-
* 判断是否是 JSON 字符串
|
|
143
|
-
* @param str 字符串
|
|
144
|
-
* @returns 是否是 JSON 字符串
|
|
141
|
+
/**
|
|
142
|
+
* 判断是否是 JSON 字符串
|
|
143
|
+
* @param str 字符串
|
|
144
|
+
* @returns 是否是 JSON 字符串
|
|
145
145
|
*/ export const isJSON = (str)=>{
|
|
146
146
|
try {
|
|
147
147
|
JSON.parse(str);
|
|
@@ -150,17 +150,17 @@ import dayjs from 'dayjs';
|
|
|
150
150
|
return false;
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
|
-
/**
|
|
154
|
-
* 检查是不是 object 类型
|
|
155
|
-
* @param item
|
|
156
|
-
* @returns {boolean}
|
|
153
|
+
/**
|
|
154
|
+
* 检查是不是 object 类型
|
|
155
|
+
* @param item
|
|
156
|
+
* @returns {boolean}
|
|
157
157
|
*/ export function isObject(item) {
|
|
158
158
|
return Object.prototype.toString.apply(item) === '[object Object]';
|
|
159
159
|
}
|
|
160
|
-
/**
|
|
161
|
-
* 获取 cookie
|
|
162
|
-
* @param key cookie key
|
|
163
|
-
* @returns cookie value
|
|
160
|
+
/**
|
|
161
|
+
* 获取 cookie
|
|
162
|
+
* @param key cookie key
|
|
163
|
+
* @returns cookie value
|
|
164
164
|
*/ export function getCookies(key) {
|
|
165
165
|
const arrCookie = document.cookie.split('; '); // 分割
|
|
166
166
|
const cookiesObj = {};
|
|
@@ -173,10 +173,10 @@ import dayjs from 'dayjs';
|
|
|
173
173
|
});
|
|
174
174
|
return cookiesObj[key];
|
|
175
175
|
}
|
|
176
|
-
/**
|
|
177
|
-
* 深度合并多个对象
|
|
178
|
-
* @param objectArray 待合并列表
|
|
179
|
-
* @returns {object} 合并后的对象
|
|
176
|
+
/**
|
|
177
|
+
* 深度合并多个对象
|
|
178
|
+
* @param objectArray 待合并列表
|
|
179
|
+
* @returns {object} 合并后的对象
|
|
180
180
|
*/ export function deepMerge(...objectArray) {
|
|
181
181
|
return objectArray.reduce((acc, obj)=>{
|
|
182
182
|
Object.keys(obj || {}).forEach((key)=>{
|
|
@@ -207,10 +207,10 @@ export const mergeStringWithoutLastSlash = (str1 = '', str2 = '')=>{
|
|
|
207
207
|
}
|
|
208
208
|
return result;
|
|
209
209
|
};
|
|
210
|
-
/**
|
|
211
|
-
* 响应时间格式化
|
|
212
|
-
* @param val 待格式化时间,xxms
|
|
213
|
-
* @returns 格式化后的时间,xx小时xx分钟xx秒
|
|
210
|
+
/**
|
|
211
|
+
* 响应时间格式化
|
|
212
|
+
* @param val 待格式化时间,xxms
|
|
213
|
+
* @returns 格式化后的时间,xx小时xx分钟xx秒
|
|
214
214
|
*/ export function durationFormatter(val) {
|
|
215
215
|
const hours = Math.floor(val / 3600000);
|
|
216
216
|
const minutes = Math.floor(val % 3600000 / 60000);
|
|
@@ -231,10 +231,10 @@ export const mergeStringWithoutLastSlash = (str1 = '', str2 = '')=>{
|
|
|
231
231
|
}
|
|
232
232
|
return parts.join(' ');
|
|
233
233
|
}
|
|
234
|
-
/**
|
|
235
|
-
* 前端下载文件
|
|
236
|
-
* @param {*} source 文件内容
|
|
237
|
-
* @param {*} filename 文件名
|
|
234
|
+
/**
|
|
235
|
+
* 前端下载文件
|
|
236
|
+
* @param {*} source 文件内容
|
|
237
|
+
* @param {*} filename 文件名
|
|
238
238
|
*/ export function handleDownLoad(source, filename = 'ai.txt') {
|
|
239
239
|
const downloadEl = document.createElement('a');
|
|
240
240
|
const blob = new Blob([
|
|
@@ -267,26 +267,26 @@ export const handleCopy = function() {
|
|
|
267
267
|
return _ref.apply(this, arguments);
|
|
268
268
|
};
|
|
269
269
|
}();
|
|
270
|
-
/**
|
|
271
|
-
* 时间格式化
|
|
272
|
-
* @param val 待格式化时间
|
|
273
|
-
* @param format 格式
|
|
274
|
-
* @returns 格式化后的时间
|
|
270
|
+
/**
|
|
271
|
+
* 时间格式化
|
|
272
|
+
* @param val 待格式化时间
|
|
273
|
+
* @param format 格式
|
|
274
|
+
* @returns 格式化后的时间
|
|
275
275
|
*/ export function timeFormatter(val, format = 'YYYY-MM-DD HH:mm:ss') {
|
|
276
276
|
return val ? dayjs(val).format(format) : '--';
|
|
277
277
|
}
|
|
278
|
-
/**
|
|
279
|
-
* 处理提示词模板,替换模板中的变量
|
|
280
|
-
* @param prompt 提示词模板
|
|
281
|
-
* @param selectedText 选中的文本
|
|
282
|
-
* @returns 处理后的提示词
|
|
278
|
+
/**
|
|
279
|
+
* 处理提示词模板,替换模板中的变量
|
|
280
|
+
* @param prompt 提示词模板
|
|
281
|
+
* @param selectedText 选中的文本
|
|
282
|
+
* @returns 处理后的提示词
|
|
283
283
|
*/ export const processPromptTemplate = (prompt, selectedText)=>{
|
|
284
284
|
return prompt.replace(/\{\{\s*SELECTED_TEXT\s*\}\}/g, selectedText || '');
|
|
285
285
|
};
|
|
286
|
-
/**
|
|
287
|
-
* 获取全屏的父元素
|
|
288
|
-
* @param target 全屏按钮
|
|
289
|
-
* @returns 全屏的父元素
|
|
286
|
+
/**
|
|
287
|
+
* 获取全屏的父元素
|
|
288
|
+
* @param target 全屏按钮
|
|
289
|
+
* @returns 全屏的父元素
|
|
290
290
|
*/ export const getFullScreenWrap = (target)=>{
|
|
291
291
|
let parentElement = target.parentElement;
|
|
292
292
|
while(parentElement && !(parentElement === null || parentElement === void 0 ? void 0 : parentElement.classList.contains('full-screen-wrap'))){
|
|
@@ -294,11 +294,11 @@ export const handleCopy = function() {
|
|
|
294
294
|
}
|
|
295
295
|
return parentElement;
|
|
296
296
|
};
|
|
297
|
-
/**
|
|
298
|
-
* 判断元素的父节点们有没有某个class
|
|
299
|
-
* @param ele 当前元素
|
|
300
|
-
* @param cls class名
|
|
301
|
-
* @returns 是否有
|
|
297
|
+
/**
|
|
298
|
+
* 判断元素的父节点们有没有某个class
|
|
299
|
+
* @param ele 当前元素
|
|
300
|
+
* @param cls class名
|
|
301
|
+
* @returns 是否有
|
|
302
302
|
*/ export const isParentHasClass = (ele, cls)=>{
|
|
303
303
|
let result = false;
|
|
304
304
|
let current = ele;
|
|
@@ -312,10 +312,10 @@ export const handleCopy = function() {
|
|
|
312
312
|
}
|
|
313
313
|
return result;
|
|
314
314
|
};
|
|
315
|
-
/**
|
|
316
|
-
* 判断值是否为空
|
|
317
|
-
* @param { string | array | object | null | undefined } value 值
|
|
318
|
-
* @returns boolean
|
|
315
|
+
/**
|
|
316
|
+
* 判断值是否为空
|
|
317
|
+
* @param { string | array | object | null | undefined } value 值
|
|
318
|
+
* @returns boolean
|
|
319
319
|
*/ export function isEmpty(value) {
|
|
320
320
|
if (value === '' || value === null || value === undefined) {
|
|
321
321
|
return true;
|
|
@@ -328,10 +328,10 @@ export const handleCopy = function() {
|
|
|
328
328
|
}
|
|
329
329
|
return false;
|
|
330
330
|
}
|
|
331
|
-
/**
|
|
332
|
-
* 生成随机数
|
|
333
|
-
* @param {Number} n
|
|
334
|
-
* @param str,默认26位字母及数字
|
|
331
|
+
/**
|
|
332
|
+
* 生成随机数
|
|
333
|
+
* @param {Number} n
|
|
334
|
+
* @param str,默认26位字母及数字
|
|
335
335
|
*/ export const random = (n = 8, str = 'abcdefghijklmnopqrstuvwxyz0123456789')=>{
|
|
336
336
|
let result = '';
|
|
337
337
|
for(let i = 0; i < n; i++){
|
|
@@ -339,27 +339,27 @@ export const handleCopy = function() {
|
|
|
339
339
|
}
|
|
340
340
|
return result;
|
|
341
341
|
};
|
|
342
|
-
/**
|
|
343
|
-
* 获取 traceparent
|
|
344
|
-
* @returns traceparent
|
|
342
|
+
/**
|
|
343
|
+
* 获取 traceparent
|
|
344
|
+
* @returns traceparent
|
|
345
345
|
*/ export const getTraceparent = ()=>{
|
|
346
346
|
return `00-${random(32, 'abcdef0123456789')}-${random(16, 'abcdef0123456789')}-01`;
|
|
347
347
|
};
|
|
348
|
-
/**
|
|
349
|
-
* 判断搜索文本是否匹配
|
|
350
|
-
* @param text 文本
|
|
351
|
-
* @param search 搜索内容
|
|
352
|
-
* @returns 是否匹配
|
|
348
|
+
/**
|
|
349
|
+
* 判断搜索文本是否匹配
|
|
350
|
+
* @param text 文本
|
|
351
|
+
* @param search 搜索内容
|
|
352
|
+
* @returns 是否匹配
|
|
353
353
|
*/ export function isSearchMatch(text, search) {
|
|
354
354
|
return !search || text.toLowerCase().includes(search.toLowerCase());
|
|
355
355
|
}
|
|
356
|
-
/**
|
|
357
|
-
* 生成 uuid
|
|
358
|
-
*
|
|
359
|
-
* @param {Number} len 长度
|
|
360
|
-
* @param {Number} radix 基数
|
|
361
|
-
*
|
|
362
|
-
* @return {string} uuid
|
|
356
|
+
/**
|
|
357
|
+
* 生成 uuid
|
|
358
|
+
*
|
|
359
|
+
* @param {Number} len 长度
|
|
360
|
+
* @param {Number} radix 基数
|
|
361
|
+
*
|
|
362
|
+
* @return {string} uuid
|
|
363
363
|
*/ export function uuid(len = 5, radix = 16) {
|
|
364
364
|
const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
|
|
365
365
|
const uuid = [];
|
|
@@ -390,11 +390,11 @@ export const handleCopy = function() {
|
|
|
390
390
|
}
|
|
391
391
|
return uuid.join('');
|
|
392
392
|
}
|
|
393
|
-
/**
|
|
394
|
-
* 防抖,延迟一段时间执行
|
|
395
|
-
* @param {*} fn 需要执行的函数
|
|
396
|
-
* @param {*} delay 延迟时间,默认200
|
|
397
|
-
* @returns
|
|
393
|
+
/**
|
|
394
|
+
* 防抖,延迟一段时间执行
|
|
395
|
+
* @param {*} fn 需要执行的函数
|
|
396
|
+
* @param {*} delay 延迟时间,默认200
|
|
397
|
+
* @returns
|
|
398
398
|
*/ export const debounce = (fn, delay = 200)=>{
|
|
399
399
|
let timer;
|
|
400
400
|
return function(...params) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
.agent-type[data-v-
|
|
3
|
-
display: inline-block;
|
|
4
|
-
border-radius: 2px;
|
|
5
|
-
text-align: left;
|
|
2
|
+
.agent-type[data-v-tonlvpox] {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
border-radius: 2px;
|
|
5
|
+
text-align: left;
|
|
6
6
|
white-space: nowrap;
|
|
7
7
|
}
|
|
8
|
-
.agent-type.single[data-v-
|
|
9
|
-
color: #1768EF;
|
|
8
|
+
.agent-type.single[data-v-tonlvpox] {
|
|
9
|
+
color: #1768EF;
|
|
10
10
|
background-color: #E1ECFF;
|
|
11
11
|
}
|
|
12
|
-
.agent-type.flow[data-v-
|
|
13
|
-
color: #E38B02;
|
|
12
|
+
.agent-type.flow[data-v-tonlvpox] {
|
|
13
|
+
color: #E38B02;
|
|
14
14
|
background: #FDEED8;
|
|
15
|
-
}
|
|
15
|
+
}
|
|
@@ -74,19 +74,18 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
74
74
|
}, {
|
|
75
75
|
default: _withCtx(()=>[
|
|
76
76
|
..._cache[0] || (_cache[0] = [
|
|
77
|
-
_createTextVNode("
|
|
77
|
+
_createTextVNode(" 去申请 ", -1 /* CACHED */ )
|
|
78
78
|
])
|
|
79
79
|
]),
|
|
80
80
|
_: 1 /* STABLE */
|
|
81
81
|
}),
|
|
82
|
-
_cache[2] || (_cache[2] = _createTextVNode()),
|
|
83
82
|
_createVNode(_component_bk_button, {
|
|
84
83
|
class: "g-ml-8",
|
|
85
84
|
onClick: handleClosed
|
|
86
85
|
}, {
|
|
87
86
|
default: _withCtx(()=>[
|
|
88
87
|
..._cache[1] || (_cache[1] = [
|
|
89
|
-
_createTextVNode("
|
|
88
|
+
_createTextVNode(" 取消 ", -1 /* CACHED */ )
|
|
90
89
|
])
|
|
91
90
|
]),
|
|
92
91
|
_: 1 /* STABLE */
|
|
@@ -94,7 +93,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
94
93
|
])
|
|
95
94
|
]),
|
|
96
95
|
default: _withCtx(()=>[
|
|
97
|
-
_cache[3] || (_cache[3] = _createTextVNode()),
|
|
98
96
|
_createVNode(RenderTTable, {
|
|
99
97
|
"row-key": "system_name",
|
|
100
98
|
class: "g-mb-20",
|
|
@@ -103,8 +101,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
103
101
|
}, null, 8 /* PROPS */ , [
|
|
104
102
|
"columns",
|
|
105
103
|
"table-data"
|
|
106
|
-
])
|
|
107
|
-
_cache[4] || (_cache[4] = _createTextVNode())
|
|
104
|
+
])
|
|
108
105
|
]),
|
|
109
106
|
_: 1 /* STABLE */
|
|
110
107
|
}, 8 /* PROPS */ , [
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
|
|
2
|
-
.send-container[data-v-
|
|
2
|
+
.send-container[data-v-qt62tcyn] {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
5
|
-
.send-container[data-v-
|
|
5
|
+
.send-container[data-v-qt62tcyn]:has(textarea:focus) {
|
|
6
6
|
z-index: 2;
|
|
7
7
|
}
|
|
8
|
-
.send-container:hover .send-clear[data-v-
|
|
8
|
+
.send-container:hover .send-clear[data-v-qt62tcyn] {
|
|
9
9
|
display: inline-flex !important;
|
|
10
10
|
}
|
|
11
|
-
.send-input[data-v-
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex-direction: row;
|
|
11
|
+
.send-input[data-v-qt62tcyn] {
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex-direction: row;
|
|
14
14
|
height: var(--origin-height);
|
|
15
15
|
}
|
|
16
|
-
.send-input[data-v-
|
|
16
|
+
.send-input[data-v-qt62tcyn]:has(textarea:focus) {
|
|
17
17
|
height: var(--text-height);
|
|
18
18
|
}
|
|
19
|
-
.send-input[data-v-
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
line-height: 16px;
|
|
22
|
-
padding: 7px;
|
|
19
|
+
.send-input[data-v-qt62tcyn] textarea {
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
line-height: 16px;
|
|
22
|
+
padding: 7px;
|
|
23
23
|
resize: none !important;
|
|
24
24
|
}
|
|
25
|
-
.send-input[data-v-
|
|
26
|
-
width: 4px;
|
|
25
|
+
.send-input[data-v-qt62tcyn] textarea::-webkit-scrollbar {
|
|
26
|
+
width: 4px;
|
|
27
27
|
height: 4px;
|
|
28
28
|
}
|
|
29
|
-
.send-input[data-v-
|
|
30
|
-
height: 5px;
|
|
31
|
-
border-radius: 3px;
|
|
29
|
+
.send-input[data-v-qt62tcyn] textarea::-webkit-scrollbar-thumb {
|
|
30
|
+
height: 5px;
|
|
31
|
+
border-radius: 3px;
|
|
32
32
|
background-color: #dcdee5;
|
|
33
33
|
}
|
|
34
|
-
.send-input[data-v-
|
|
34
|
+
.send-input[data-v-qt62tcyn] textarea::placeholder {
|
|
35
35
|
line-height: 16px;
|
|
36
36
|
}
|
|
37
|
-
.send-clear[data-v-
|
|
38
|
-
display: none !important;
|
|
39
|
-
position: absolute;
|
|
40
|
-
right: 10px;
|
|
41
|
-
bottom: 10px;
|
|
42
|
-
color: #979ba5;
|
|
43
|
-
font-size: 14px;
|
|
37
|
+
.send-clear[data-v-qt62tcyn] {
|
|
38
|
+
display: none !important;
|
|
39
|
+
position: absolute;
|
|
40
|
+
right: 10px;
|
|
41
|
+
bottom: 10px;
|
|
42
|
+
color: #979ba5;
|
|
43
|
+
font-size: 14px;
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
}
|
|
46
|
-
.send-clear[data-v-
|
|
46
|
+
.send-clear[data-v-qt62tcyn]:hover {
|
|
47
47
|
color: #313238;
|
|
48
|
-
}
|
|
48
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
|
|
2
|
-
.auto-refresh[data-v-
|
|
3
|
-
position: relative;
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
line-height: 26px;
|
|
6
|
-
padding: 0 4px;
|
|
2
|
+
.auto-refresh[data-v-s996cijx] {
|
|
3
|
+
position: relative;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
line-height: 26px;
|
|
6
|
+
padding: 0 4px;
|
|
7
7
|
white-space: nowrap;
|
|
8
8
|
}
|
|
9
|
-
.auto-refresh[data-v-
|
|
10
|
-
content: '';
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 5px;
|
|
13
|
-
right: -5px;
|
|
14
|
-
width: 1px;
|
|
15
|
-
height: 16px;
|
|
16
|
-
background-color: #dcdee5;
|
|
9
|
+
.auto-refresh[data-v-s996cijx]:after {
|
|
10
|
+
content: '';
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 5px;
|
|
13
|
+
right: -5px;
|
|
14
|
+
width: 1px;
|
|
15
|
+
height: 16px;
|
|
16
|
+
background-color: #dcdee5;
|
|
17
17
|
z-index: 1;
|
|
18
18
|
}
|
|
19
|
-
.auto-refresh[data-v-
|
|
20
|
-
color: #3A84FF;
|
|
19
|
+
.auto-refresh[data-v-s996cijx]:hover {
|
|
20
|
+
color: #3A84FF;
|
|
21
21
|
background-color: #E1ECFF;
|
|
22
22
|
}
|
|
23
|
-
.refresh[data-v-
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
line-height: 26px;
|
|
23
|
+
.refresh[data-v-s996cijx] {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
line-height: 26px;
|
|
26
26
|
padding: 0 4px;
|
|
27
27
|
}
|
|
28
|
-
.refresh[data-v-
|
|
29
|
-
color: #3A84FF;
|
|
28
|
+
.refresh[data-v-s996cijx]:hover {
|
|
29
|
+
color: #3A84FF;
|
|
30
30
|
background-color: #E1ECFF;
|
|
31
31
|
}
|
|
32
|
-
.textarea-list[data-v-
|
|
33
|
-
padding: 4px 0;
|
|
34
|
-
line-height: 32px;
|
|
35
|
-
max-height: 300px;
|
|
36
|
-
position: relative;
|
|
32
|
+
.textarea-list[data-v-s996cijx] {
|
|
33
|
+
padding: 4px 0;
|
|
34
|
+
line-height: 32px;
|
|
35
|
+
max-height: 300px;
|
|
36
|
+
position: relative;
|
|
37
37
|
z-index: 2;
|
|
38
38
|
}
|
|
39
|
-
.textarea-list .textarea-item[data-v-
|
|
40
|
-
padding: 0 12px;
|
|
39
|
+
.textarea-list .textarea-item[data-v-s996cijx] {
|
|
40
|
+
padding: 0 12px;
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
}
|
|
43
|
-
.textarea-list .textarea-item[data-v-
|
|
44
|
-
background: #E1ECFF;
|
|
43
|
+
.textarea-list .textarea-item[data-v-s996cijx]:hover {
|
|
44
|
+
background: #E1ECFF;
|
|
45
45
|
color: #3A84FF;
|
|
46
|
-
}
|
|
46
|
+
}
|