@blueking/ai-ui-sdk 0.6.0-beta.14 → 0.6.0-beta.16
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 +2 -1
- package/dist/components/render-agent/agent-type.vue.css +4 -4
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/agent/upgrade.vue.css +2 -2
- package/dist/components/render-card/agent/upgrade.vue.js +1 -1
- package/dist/components/render-card/base.vue.css +13 -13
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +2 -2
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/info.vue.css +1 -1
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +2 -2
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/skill/scanner.vue.css +3 -3
- package/dist/components/render-card/skill/scanner.vue.js +1 -1
- package/dist/components/render-checkbox/index.vue.css +4 -4
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/content/index.vue.css +4 -4
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- 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 +4 -4
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- 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 +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.vue.css +3 -3
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +14 -14
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +9 -9
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-exception/index.vue.css +9 -9
- package/dist/components/render-exception/index.vue.js +1 -1
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +6 -6
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +7 -7
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-knowledge/icon/index.vue.css +1 -1
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-prompt/content/index.vue.css +1 -1
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-select-plus-extension/index.vue.css +3 -3
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-skill/install/index.script.vue.js.js +34 -26
- package/dist/components/render-skill/install/{openclaw-windows-instances.script.vue.js.js → openclaw-instances.script.vue.js.js} +23 -21
- package/dist/components/render-skill/install/{openclaw-windows-instances.vue.d.ts → openclaw-instances.vue.d.ts} +6 -4
- package/dist/components/render-skill/install/openclaw-instances.vue.js +3 -0
- package/dist/components/render-t-table/index.vue.css +30 -30
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/hooks/use-form-rule.d.ts +31 -2
- package/dist/hooks/use-form-rule.ts.js +65 -26
- package/dist/hooks/use-meta-http.d.ts +6 -2
- package/dist/hooks/use-meta-http.ts.js +19 -5
- package/dist/hooks/use-skill-http.d.ts +7 -6
- package/dist/hooks/use-skill-http.ts.js +19 -17
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.ts.js +1 -0
- package/dist/http/helper/agent.ts.js +4 -2
- package/dist/http/helper/model.ts.js +5 -1
- package/dist/http/helper/skill.d.ts +9 -9
- package/dist/http/helper/skill.ts.js +12 -10
- package/dist/i18n/en-US.d.ts +3 -0
- package/dist/i18n/en-US.ts.js +3 -0
- package/dist/i18n/zh-CN.d.ts +3 -0
- package/dist/i18n/zh-CN.ts.js +3 -0
- package/dist/types/agent.d.ts +2 -0
- package/dist/types/model.d.ts +13 -0
- package/dist/types/skill.d.ts +26 -22
- package/package.json +1 -1
- package/dist/components/render-skill/install/openclaw-windows-instances.vue.js +0 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
.resource-version[data-v-
|
|
2
|
+
.resource-version[data-v-j4vassma] {
|
|
3
3
|
border-radius: var(--aidev-radius-s);
|
|
4
4
|
text-align: left;
|
|
5
5
|
color: var(--aidev-tag-color);
|
|
6
6
|
background-color: var(--aidev-tag-background);
|
|
7
7
|
white-space: nowrap;
|
|
8
8
|
}
|
|
9
|
-
.resource-version .bkaidev-rizhifenxi[data-v-
|
|
9
|
+
.resource-version .bkaidev-rizhifenxi[data-v-j4vassma] {
|
|
10
10
|
color: var(--aidev-clickable-color);
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.router-tab[data-v-
|
|
2
|
+
.router-tab[data-v-u9w73wqb] {
|
|
3
3
|
margin-top: 2px;
|
|
4
4
|
height: 42px;
|
|
5
5
|
background: #FFFFFF;
|
|
6
6
|
box-shadow: 0 2px 4px 0 #1919290d;
|
|
7
7
|
padding: 0 24px;
|
|
8
8
|
}
|
|
9
|
-
.router-tab a[data-v-
|
|
9
|
+
.router-tab a[data-v-u9w73wqb] {
|
|
10
10
|
padding: 0 8px;
|
|
11
11
|
margin-right: 24px;
|
|
12
12
|
font-size: 14px;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
color: var(--aidev-main-color);
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
}
|
|
18
|
-
.router-tab a.router-link-exact-active[data-v-
|
|
18
|
+
.router-tab a.router-link-exact-active[data-v-u9w73wqb] {
|
|
19
19
|
color: var(--aidev-clickable-color);
|
|
20
20
|
border-bottom: 2px solid var(--aidev-clickable-color);
|
|
21
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.select-plus-extension[data-v-
|
|
2
|
+
.select-plus-extension[data-v-eum6q93c] {
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
width: 100%;
|
|
5
5
|
display: flex;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
font-size: 12px;
|
|
9
9
|
line-height: 20px;
|
|
10
10
|
}
|
|
11
|
-
.select-plus-extension .ai-ui-sdk-icon[data-v-
|
|
11
|
+
.select-plus-extension .ai-ui-sdk-icon[data-v-eum6q93c] {
|
|
12
12
|
font-size: 14px;
|
|
13
13
|
margin-right: 6px;
|
|
14
14
|
}
|
|
15
|
-
.select-plus-extension[data-v-
|
|
15
|
+
.select-plus-extension[data-v-eum6q93c]:hover {
|
|
16
16
|
color: var(--aidev-clickable-color);
|
|
17
17
|
}
|
|
@@ -93,7 +93,7 @@ const _hoisted_3 = {
|
|
|
93
93
|
import { Message } from 'bkui-vue';
|
|
94
94
|
import { onBeforeUnmount, ref, toRef, useTemplateRef, watch } from 'vue';
|
|
95
95
|
import RenderInstallGuide from './install-guide.vue.js';
|
|
96
|
-
import
|
|
96
|
+
import RenderOpenclawInstances from './openclaw-instances.vue.js';
|
|
97
97
|
import { TEN_SECONDS } from '../../../common/constants.ts.js';
|
|
98
98
|
import { useSkillHttp } from '../../../hooks/use-skill-http.ts.js';
|
|
99
99
|
import { t } from '../../../i18n/index.ts.js';
|
|
@@ -113,48 +113,53 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
113
113
|
setup (__props, { emit: __emit }) {
|
|
114
114
|
const props = __props;
|
|
115
115
|
const emits = __emit;
|
|
116
|
-
const { getSkillInstallTargets,
|
|
116
|
+
const { getSkillInstallTargets, installSkillToOpenclaw, getSkillOpenclawInstallTasksStatus } = useSkillHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
117
117
|
const formRef = useTemplateRef('formRef');
|
|
118
118
|
const isLoadingInstallTargets = ref(false);
|
|
119
119
|
const isConfirming = ref(false);
|
|
120
120
|
const installTargets = ref([]);
|
|
121
121
|
const selectedInstallTargetType = ref();
|
|
122
|
-
const
|
|
122
|
+
const selectedOpenclawInstances = ref([]);
|
|
123
123
|
let isPollingStopped = false;
|
|
124
|
+
const getIsShowInstances = ()=>[
|
|
125
|
+
SkillInstallTargetType.OpenclawWindows,
|
|
126
|
+
SkillInstallTargetType.OpenclawLinux
|
|
127
|
+
].includes(selectedInstallTargetType.value);
|
|
124
128
|
const handleClose = ()=>{
|
|
125
129
|
emits('update:isShow', false);
|
|
126
130
|
};
|
|
127
131
|
const handleConfirm = ()=>{
|
|
128
132
|
switch(selectedInstallTargetType.value){
|
|
129
|
-
case SkillInstallTargetType.OpenclawLinux:
|
|
130
133
|
case SkillInstallTargetType.Cursor:
|
|
131
134
|
handleClose();
|
|
132
135
|
break;
|
|
136
|
+
case SkillInstallTargetType.OpenclawLinux:
|
|
133
137
|
case SkillInstallTargetType.OpenclawWindows:
|
|
134
|
-
|
|
138
|
+
handleInstallOpenclaw();
|
|
135
139
|
break;
|
|
136
140
|
default:
|
|
137
141
|
break;
|
|
138
142
|
}
|
|
139
143
|
};
|
|
140
|
-
const
|
|
144
|
+
const handleInstallOpenclaw = function() {
|
|
141
145
|
var _ref = _async_to_generator(function*() {
|
|
142
146
|
try {
|
|
143
147
|
var _formRef_value;
|
|
144
148
|
yield (_formRef_value = formRef.value) === null || _formRef_value === void 0 ? void 0 : _formRef_value.validate();
|
|
145
149
|
isConfirming.value = true;
|
|
146
150
|
isPollingStopped = false;
|
|
147
|
-
const installTasks = yield
|
|
151
|
+
const installTasks = yield installSkillToOpenclaw({
|
|
148
152
|
skillId: props.selectedSkill.id,
|
|
149
|
-
workspaces:
|
|
153
|
+
workspaces: selectedOpenclawInstances.value,
|
|
154
|
+
targetType: selectedInstallTargetType.value
|
|
150
155
|
});
|
|
151
156
|
const taskIds = Object.values(installTasks).map((task)=>task.taskId);
|
|
152
157
|
const taskHostMap = Object.entries(installTasks).reduce((result, [hostName, task])=>_object_spread_props(_object_spread({}, result), {
|
|
153
158
|
[String(task.taskId)]: hostName
|
|
154
159
|
}), {});
|
|
155
|
-
const
|
|
160
|
+
const loopGetSkillOpenclawInstallTask = function() {
|
|
156
161
|
var _ref = _async_to_generator(function*() {
|
|
157
|
-
const taskStatusMap = yield
|
|
162
|
+
const taskStatusMap = yield getSkillOpenclawInstallTasksStatus({
|
|
158
163
|
taskIds
|
|
159
164
|
});
|
|
160
165
|
let isRunning = false;
|
|
@@ -189,7 +194,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
189
194
|
});
|
|
190
195
|
// 如果未停止轮询,则继续轮询
|
|
191
196
|
if (!isPollingStopped) {
|
|
192
|
-
yield
|
|
197
|
+
yield loopGetSkillOpenclawInstallTask();
|
|
193
198
|
}
|
|
194
199
|
return;
|
|
195
200
|
}
|
|
@@ -208,24 +213,24 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
208
213
|
});
|
|
209
214
|
handleClose();
|
|
210
215
|
});
|
|
211
|
-
return function
|
|
216
|
+
return function loopGetSkillOpenclawInstallTask() {
|
|
212
217
|
return _ref.apply(this, arguments);
|
|
213
218
|
};
|
|
214
219
|
}();
|
|
215
|
-
yield
|
|
220
|
+
yield loopGetSkillOpenclawInstallTask();
|
|
216
221
|
} catch (error) {
|
|
217
222
|
console.error(error);
|
|
218
223
|
} finally{
|
|
219
224
|
isConfirming.value = false;
|
|
220
225
|
}
|
|
221
226
|
});
|
|
222
|
-
return function
|
|
227
|
+
return function handleInstallOpenclaw() {
|
|
223
228
|
return _ref.apply(this, arguments);
|
|
224
229
|
};
|
|
225
230
|
}();
|
|
226
231
|
const handleClearTimer = ()=>{
|
|
227
232
|
isPollingStopped = true;
|
|
228
|
-
|
|
233
|
+
getSkillOpenclawInstallTasksStatus.abort();
|
|
229
234
|
};
|
|
230
235
|
const handleGetInstallTargets = ()=>{
|
|
231
236
|
isLoadingInstallTargets.value = true;
|
|
@@ -238,11 +243,11 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
238
243
|
});
|
|
239
244
|
};
|
|
240
245
|
const handleChangeInstallTargetType = ()=>{
|
|
241
|
-
|
|
246
|
+
selectedOpenclawInstances.value = [];
|
|
242
247
|
};
|
|
243
248
|
const handleClearChoosen = ()=>{
|
|
244
249
|
selectedInstallTargetType.value = undefined;
|
|
245
|
-
|
|
250
|
+
selectedOpenclawInstances.value = [];
|
|
246
251
|
};
|
|
247
252
|
watch(()=>props.isShow, (val)=>{
|
|
248
253
|
if (val) {
|
|
@@ -277,7 +282,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
277
282
|
_createVNode(_component_bk_form, {
|
|
278
283
|
model: {
|
|
279
284
|
selectedInstallTargetType: selectedInstallTargetType.value,
|
|
280
|
-
|
|
285
|
+
selectedOpenclawInstances: selectedOpenclawInstances.value
|
|
281
286
|
},
|
|
282
287
|
ref_key: "formRef",
|
|
283
288
|
ref: formRef,
|
|
@@ -334,25 +339,28 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
334
339
|
"space-id",
|
|
335
340
|
"id"
|
|
336
341
|
])) : _createCommentVNode("v-if", true),
|
|
337
|
-
|
|
342
|
+
getIsShowInstances() ? (_openBlock(), _createBlock(_component_bk_form_item, {
|
|
338
343
|
key: 1,
|
|
339
344
|
label: _unref(t)('Openclaw 实例'),
|
|
340
|
-
property: "
|
|
345
|
+
property: "selectedOpenclawInstances",
|
|
341
346
|
required: ""
|
|
342
347
|
}, {
|
|
343
348
|
default: _withCtx(()=>[
|
|
344
|
-
|
|
345
|
-
"selected-openclaw-
|
|
346
|
-
"onUpdate:
|
|
349
|
+
(_openBlock(), _createBlock(RenderOpenclawInstances, {
|
|
350
|
+
"selected-openclaw-instances": selectedOpenclawInstances.value,
|
|
351
|
+
"onUpdate:selectedOpenclawInstances": _cache[1] || (_cache[1] = ($event)=>selectedOpenclawInstances.value = $event),
|
|
352
|
+
"target-type": selectedInstallTargetType.value,
|
|
347
353
|
"skill-id": props.selectedSkill.id,
|
|
348
354
|
"api-prefix": props.apiPrefix,
|
|
349
|
-
"space-id": props.spaceId
|
|
355
|
+
"space-id": props.spaceId,
|
|
356
|
+
key: selectedInstallTargetType.value
|
|
350
357
|
}, null, 8 /* PROPS */ , [
|
|
351
|
-
"selected-openclaw-
|
|
358
|
+
"selected-openclaw-instances",
|
|
359
|
+
"target-type",
|
|
352
360
|
"skill-id",
|
|
353
361
|
"api-prefix",
|
|
354
362
|
"space-id"
|
|
355
|
-
])
|
|
363
|
+
]))
|
|
356
364
|
]),
|
|
357
365
|
_: 1 /* STABLE */
|
|
358
366
|
}, 8 /* PROPS */ , [
|
|
@@ -26,24 +26,25 @@ import { useSkillHttp } from '../../../hooks/use-skill-http.ts.js';
|
|
|
26
26
|
import { t } from '../../../i18n/index.ts.js';
|
|
27
27
|
export default /*@__PURE__*/ _defineComponent({
|
|
28
28
|
props: {
|
|
29
|
-
|
|
29
|
+
selectedOpenclawInstances: {},
|
|
30
|
+
targetType: {},
|
|
30
31
|
skillId: {},
|
|
31
32
|
apiPrefix: {},
|
|
32
33
|
spaceId: {}
|
|
33
34
|
},
|
|
34
35
|
emits: [
|
|
35
|
-
"update:
|
|
36
|
+
"update:selectedOpenclawInstances"
|
|
36
37
|
],
|
|
37
38
|
setup (__props, { emit: __emit }) {
|
|
38
39
|
const props = __props;
|
|
39
40
|
const emits = __emit;
|
|
40
|
-
const {
|
|
41
|
+
const { getSkillOpenclawInstances, getSkillOpenclawInstancesStatus } = useSkillHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
41
42
|
const isLoadingInstances = ref(false);
|
|
42
43
|
const isLoadingInstanceStatus = ref(false);
|
|
43
|
-
const
|
|
44
|
+
const openclawInstances = ref([]);
|
|
44
45
|
const instanceStatusMap = ref({});
|
|
45
46
|
const getIsInstanceChecked = (instance)=>{
|
|
46
|
-
const isSelected = props.
|
|
47
|
+
const isSelected = props.selectedOpenclawInstances.some((item)=>item.hostName === instance.hostName);
|
|
47
48
|
const isInstalled = getIsInstanceInstalled(instance);
|
|
48
49
|
return isSelected || isInstalled;
|
|
49
50
|
};
|
|
@@ -51,39 +52,40 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
51
52
|
var _instanceStatusMap_value_instance_hostName;
|
|
52
53
|
return (_instanceStatusMap_value_instance_hostName = instanceStatusMap.value[instance.hostName]) === null || _instanceStatusMap_value_instance_hostName === void 0 ? void 0 : _instanceStatusMap_value_instance_hostName.isInstalled;
|
|
53
54
|
};
|
|
54
|
-
const
|
|
55
|
+
const handleSelectOpenclawInstance = (instance)=>{
|
|
55
56
|
if (isLoadingInstanceStatus.value || getIsInstanceInstalled(instance)) return;
|
|
56
|
-
if (props.
|
|
57
|
-
emits('update:
|
|
57
|
+
if (props.selectedOpenclawInstances.some((item)=>item.hostName === instance.hostName)) {
|
|
58
|
+
emits('update:selectedOpenclawInstances', props.selectedOpenclawInstances.filter((item)=>item.hostName !== instance.hostName));
|
|
58
59
|
} else {
|
|
59
|
-
emits('update:
|
|
60
|
-
...props.
|
|
60
|
+
emits('update:selectedOpenclawInstances', [
|
|
61
|
+
...props.selectedOpenclawInstances,
|
|
61
62
|
instance
|
|
62
63
|
]);
|
|
63
64
|
}
|
|
64
65
|
};
|
|
65
|
-
const
|
|
66
|
+
const handleGetOpenclawInstanceStatus = (workspaces)=>{
|
|
66
67
|
if (workspaces.length <= 0) return;
|
|
67
68
|
isLoadingInstanceStatus.value = true;
|
|
68
|
-
|
|
69
|
+
getSkillOpenclawInstancesStatus({
|
|
69
70
|
skillId: props.skillId,
|
|
70
|
-
workspaces
|
|
71
|
+
workspaces,
|
|
72
|
+
targetType: props.targetType
|
|
71
73
|
}).then((res)=>{
|
|
72
74
|
instanceStatusMap.value = res;
|
|
73
75
|
}).finally(()=>{
|
|
74
76
|
isLoadingInstanceStatus.value = false;
|
|
75
77
|
});
|
|
76
78
|
};
|
|
77
|
-
const
|
|
79
|
+
const handleGetOpenclawInstances = ()=>{
|
|
78
80
|
isLoadingInstances.value = true;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
getSkillOpenclawInstances(props.targetType).then((res)=>{
|
|
82
|
+
openclawInstances.value = res;
|
|
83
|
+
handleGetOpenclawInstanceStatus(res);
|
|
82
84
|
}).finally(()=>{
|
|
83
85
|
isLoadingInstances.value = false;
|
|
84
86
|
});
|
|
85
87
|
};
|
|
86
|
-
onBeforeMount(
|
|
88
|
+
onBeforeMount(handleGetOpenclawInstances);
|
|
87
89
|
return (_ctx, _cache)=>{
|
|
88
90
|
const _component_bk_loading = _resolveComponent("bk-loading");
|
|
89
91
|
return _openBlock(), _createBlock(_component_bk_loading, {
|
|
@@ -91,7 +93,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
91
93
|
class: "g-max-h-400 g-scrollbar g-min-h-98"
|
|
92
94
|
}, {
|
|
93
95
|
default: _withCtx(()=>[
|
|
94
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(
|
|
96
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(openclawInstances.value, (instance, index)=>{
|
|
95
97
|
return _openBlock(), _createElementBlock("section", {
|
|
96
98
|
class: _normalizeClass([
|
|
97
99
|
'g-flex-row g-rounded-[var(--aidev-radius)]',
|
|
@@ -101,7 +103,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
101
103
|
isLoadingInstanceStatus.value ? 'g-disabled' : 'g-cursor-pointer'
|
|
102
104
|
]),
|
|
103
105
|
key: instance.hostName,
|
|
104
|
-
onClick: ($event)=>
|
|
106
|
+
onClick: ($event)=>handleSelectOpenclawInstance(instance)
|
|
105
107
|
}, [
|
|
106
108
|
_createElementVNode("section", _hoisted_2, [
|
|
107
109
|
_createElementVNode("h3", _hoisted_3, _toDisplayString(instance.displayName), 1 /* TEXT */ ),
|
|
@@ -135,7 +137,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
135
137
|
])
|
|
136
138
|
], 10 /* CLASS, PROPS */ , _hoisted_1);
|
|
137
139
|
}), 128 /* KEYED_FRAGMENT */ )),
|
|
138
|
-
_unref(isEmpty)(
|
|
140
|
+
_unref(isEmpty)(openclawInstances.value) ? (_openBlock(), _createBlock(RenderException, {
|
|
139
141
|
key: 0,
|
|
140
142
|
description: _unref(t)('暂无 Openclaw 实例'),
|
|
141
143
|
class: "agent-empty",
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SkillInstallTargetType } from '@/types/enum';
|
|
2
|
+
import { ISkillOpenclawInstance } from '@/types/skill';
|
|
2
3
|
interface IProps {
|
|
3
|
-
|
|
4
|
+
selectedOpenclawInstances: ISkillOpenclawInstance[];
|
|
5
|
+
targetType: SkillInstallTargetType;
|
|
4
6
|
skillId?: number;
|
|
5
7
|
apiPrefix: string;
|
|
6
8
|
spaceId?: string;
|
|
7
9
|
}
|
|
8
10
|
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
-
"update:
|
|
11
|
+
"update:selectedOpenclawInstances": (value: ISkillOpenclawInstance[]) => any;
|
|
10
12
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
11
|
-
"onUpdate:
|
|
13
|
+
"onUpdate:selectedOpenclawInstances"?: (value: ISkillOpenclawInstance[]) => any;
|
|
12
14
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
15
|
declare const _default: typeof __VLS_export;
|
|
14
16
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.t-table[data-v-
|
|
2
|
+
.t-table[data-v-00urukqi] {
|
|
3
3
|
--td-font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC',
|
|
4
4
|
'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
|
|
5
5
|
--td-component-border: var(--aidev-line-medium-color);
|
|
@@ -9,31 +9,31 @@
|
|
|
9
9
|
font-family: var(--td-font-family);
|
|
10
10
|
font-size: 12px;
|
|
11
11
|
}
|
|
12
|
-
[data-v-
|
|
12
|
+
[data-v-00urukqi] .t-loading__gradient {
|
|
13
13
|
display: none;
|
|
14
14
|
}
|
|
15
|
-
[data-v-
|
|
15
|
+
[data-v-00urukqi] .t-loading__text {
|
|
16
16
|
margin-left: 0;
|
|
17
17
|
}
|
|
18
|
-
[data-v-
|
|
18
|
+
[data-v-00urukqi] .t-table__content {
|
|
19
19
|
flex: 1 1 auto;
|
|
20
20
|
min-height: 0;
|
|
21
21
|
overflow: auto;
|
|
22
22
|
}
|
|
23
|
-
[data-v-
|
|
23
|
+
[data-v-00urukqi] .t-table__content > table {
|
|
24
24
|
border-collapse: separate;
|
|
25
25
|
}
|
|
26
|
-
.t-table[data-v-
|
|
26
|
+
.t-table[data-v-00urukqi] {
|
|
27
27
|
--loading-bottom: 0px;
|
|
28
28
|
}
|
|
29
|
-
.t-table.is-paginated[data-v-
|
|
29
|
+
.t-table.is-paginated[data-v-00urukqi] {
|
|
30
30
|
--loading-bottom: 60px;
|
|
31
31
|
}
|
|
32
|
-
[data-v-
|
|
32
|
+
[data-v-00urukqi] .t-loading--full {
|
|
33
33
|
top: 42px;
|
|
34
34
|
height: calc(100% - 42px - var(--loading-bottom));
|
|
35
35
|
}
|
|
36
|
-
[data-v-
|
|
36
|
+
[data-v-00urukqi] .t-table__top-content {
|
|
37
37
|
position: absolute;
|
|
38
38
|
top: 0;
|
|
39
39
|
right: 0;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
border-left: 1px solid var(--aidev-line-medium-color);
|
|
51
51
|
border-bottom: 1px solid var(--aidev-line-medium-color);
|
|
52
52
|
}
|
|
53
|
-
.t-table-setting-trigger[data-v-
|
|
53
|
+
.t-table-setting-trigger[data-v-00urukqi] {
|
|
54
54
|
display: inline-flex;
|
|
55
55
|
align-items: center;
|
|
56
56
|
justify-content: center;
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
color: var(--aidev-disabled-color);
|
|
59
59
|
cursor: pointer;
|
|
60
60
|
}
|
|
61
|
-
.t-table-setting-trigger[data-v-
|
|
61
|
+
.t-table-setting-trigger[data-v-00urukqi]:hover {
|
|
62
62
|
color: var(--aidev-clickable-color);
|
|
63
63
|
}
|
|
64
|
-
[data-v-
|
|
64
|
+
[data-v-00urukqi] .t-table__header th:last-child {
|
|
65
65
|
padding-right: 42px !important;
|
|
66
66
|
}
|
|
67
|
-
[data-v-
|
|
67
|
+
[data-v-00urukqi] .t-table__header th {
|
|
68
68
|
height: 42px;
|
|
69
69
|
padding-top: 0;
|
|
70
70
|
padding-bottom: 0;
|
|
@@ -74,25 +74,25 @@
|
|
|
74
74
|
font-family: inherit;
|
|
75
75
|
font-size: 12px;
|
|
76
76
|
}
|
|
77
|
-
[data-v-
|
|
77
|
+
[data-v-00urukqi] .t-table__th-cell-inner {
|
|
78
78
|
color: var(--aidev-title-color);
|
|
79
79
|
}
|
|
80
|
-
[data-v-
|
|
80
|
+
[data-v-00urukqi] .t-table__cell--sort-trigger.t-table__double-icons {
|
|
81
81
|
gap: 2px;
|
|
82
82
|
}
|
|
83
|
-
[data-v-
|
|
83
|
+
[data-v-00urukqi] .t-table__sort-icon--active > i {
|
|
84
84
|
color: var(--aidev-clickable-color) !important;
|
|
85
85
|
}
|
|
86
|
-
[data-v-
|
|
86
|
+
[data-v-00urukqi] .t-table__header th:hover {
|
|
87
87
|
background-color: var(--aidev-inner-background) !important;
|
|
88
88
|
}
|
|
89
|
-
.t-table--column-resizable[data-v-
|
|
89
|
+
.t-table--column-resizable[data-v-00urukqi]:not(.t-table--bordered) thead.t-table__header th {
|
|
90
90
|
border-top-color: var(--aidev-list-item-hover-background) !important;
|
|
91
91
|
}
|
|
92
|
-
.t-table--column-resizable[data-v-
|
|
92
|
+
.t-table--column-resizable[data-v-00urukqi]:not(.t-table--bordered) thead.t-table__header th:not(:last-child) {
|
|
93
93
|
border-right-color: var(--aidev-list-item-hover-background) !important;
|
|
94
94
|
}
|
|
95
|
-
[data-v-
|
|
95
|
+
[data-v-00urukqi] .t-table__body td {
|
|
96
96
|
height: 42px;
|
|
97
97
|
padding-top: 0;
|
|
98
98
|
padding-bottom: 0;
|
|
@@ -100,16 +100,16 @@
|
|
|
100
100
|
font-family: inherit;
|
|
101
101
|
font-size: 12px;
|
|
102
102
|
}
|
|
103
|
-
[data-v-
|
|
103
|
+
[data-v-00urukqi] .t-table__body tr:not(.t-table__empty-row):hover,[data-v-00urukqi] .t-table__body tr.t-table__row--hover {
|
|
104
104
|
background-color: var(--aidev-list-item-hover-background);
|
|
105
105
|
}
|
|
106
|
-
[data-v-
|
|
106
|
+
[data-v-00urukqi] .t-table__body tr:not(.t-table__empty-row):not(.t-table__row--active):hover > td,[data-v-00urukqi] .t-table__body tr.t-table__row--hover:not(.t-table__row--active) > td {
|
|
107
107
|
background-color: var(--aidev-list-item-hover-background);
|
|
108
108
|
}
|
|
109
|
-
[data-v-
|
|
109
|
+
[data-v-00urukqi] .t-table__body tr.t-table__empty-row,[data-v-00urukqi] .t-table__body tr.t-table__empty-row:hover,[data-v-00urukqi] .t-table__body tr.t-table__empty-row:hover > td {
|
|
110
110
|
background-color: transparent !important;
|
|
111
111
|
}
|
|
112
|
-
[data-v-
|
|
112
|
+
[data-v-00urukqi] .t-table__pagination {
|
|
113
113
|
box-sizing: border-box;
|
|
114
114
|
display: flex;
|
|
115
115
|
flex-shrink: 0;
|
|
@@ -120,25 +120,25 @@
|
|
|
120
120
|
font-family: inherit;
|
|
121
121
|
font-size: 12px;
|
|
122
122
|
}
|
|
123
|
-
[data-v-
|
|
123
|
+
[data-v-00urukqi] .t-pagination {
|
|
124
124
|
font-family: inherit;
|
|
125
125
|
font-size: 12px;
|
|
126
126
|
}
|
|
127
|
-
[data-v-
|
|
127
|
+
[data-v-00urukqi] .t-pagination__total,[data-v-00urukqi] .t-pagination__select,[data-v-00urukqi] .t-pagination__number,[data-v-00urukqi] .t-pagination__jump {
|
|
128
128
|
font-family: inherit;
|
|
129
129
|
font-size: 12px;
|
|
130
130
|
}
|
|
131
|
-
[data-v-
|
|
131
|
+
[data-v-00urukqi] .t-pagination__select,[data-v-00urukqi] .t-pagination__select .t-input,[data-v-00urukqi] .t-pagination__select .t-input__inner,[data-v-00urukqi] .t-pagination__select .t-select-input,[data-v-00urukqi] .t-pagination__select .t-select__single {
|
|
132
132
|
font-size: 12px;
|
|
133
133
|
color: var(--aidev-main-color);
|
|
134
134
|
}
|
|
135
|
-
[data-v-
|
|
135
|
+
[data-v-00urukqi] .t-pagination__select .t-input--focused {
|
|
136
136
|
border-color: var(--aidev-clickable-color) !important;
|
|
137
137
|
}
|
|
138
|
-
.t-table--loading[data-v-
|
|
138
|
+
.t-table--loading[data-v-00urukqi] .t-table__content {
|
|
139
139
|
min-height: 126px !important;
|
|
140
140
|
}
|
|
141
|
-
[data-v-
|
|
141
|
+
[data-v-00urukqi] .t-pagination__number.t-is-current,[data-v-00urukqi] .t-pagination__number.t-is-current:hover,[data-v-00urukqi] .t-pagination__number.t-is-current:active,[data-v-00urukqi] .t-pagination__number:active {
|
|
142
142
|
background-color: #e1ecff;
|
|
143
143
|
border-color: #e1ecff;
|
|
144
144
|
color: var(--aidev-clickable-color);
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-tree[data-v-
|
|
2
|
+
.tag-tree[data-v-jw0zklkb] {
|
|
3
3
|
font-size: 12px;
|
|
4
4
|
height: auto;
|
|
5
5
|
max-height: calc(100% - 44px);
|
|
6
6
|
}
|
|
7
|
-
.tag-tree .manage-tree-item[data-v-
|
|
7
|
+
.tag-tree .manage-tree-item[data-v-jw0zklkb] {
|
|
8
8
|
height: 32px;
|
|
9
9
|
flex: 1;
|
|
10
10
|
}
|
|
11
|
-
.tag-tree .quick-icon[data-v-
|
|
11
|
+
.tag-tree .quick-icon[data-v-jw0zklkb] {
|
|
12
12
|
margin-left: -24px;
|
|
13
13
|
padding-left: 8px;
|
|
14
14
|
}
|
|
15
|
-
.tag-tree[data-v-
|
|
15
|
+
.tag-tree[data-v-jw0zklkb] .tree-item:has(.bottom-line) {
|
|
16
16
|
border-bottom: 1px solid var(--aidev-line-strong-color);
|
|
17
17
|
}
|
|
18
|
-
.tag-tree[data-v-
|
|
18
|
+
.tag-tree[data-v-jw0zklkb] .tree-item.active .quick-icon {
|
|
19
19
|
color: var(--aidev-clickable-color);
|
|
20
20
|
}
|
|
21
|
-
.tag-tree[data-v-
|
|
21
|
+
.tag-tree[data-v-jw0zklkb] .tree-item.active .tag-number {
|
|
22
22
|
background: var(--aidev-list-item-active-count-background);
|
|
23
23
|
color: #fff;
|
|
24
24
|
}
|
|
25
|
-
.tag-number[data-v-
|
|
25
|
+
.tag-number[data-v-jw0zklkb] {
|
|
26
26
|
line-height: 16px;
|
|
27
27
|
padding: 0 4px;
|
|
28
28
|
background-color: var(--aidev-tag-background);
|