@blueking/ai-ui-sdk 0.4.3-beta.24 → 0.4.3-beta.26
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/components/render-agent/agent-type.vue.css +4 -4
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auth/auth-dialog.script.vue.js.js +6 -3
- 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-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/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.script.vue.js +146 -130
- package/dist/components/render-card/base.vue.css +12 -12
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/llm/corner-badge.script.vue.js +33 -27
- 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/code-suffix.script.vue.js +38 -30
- package/dist/components/render-card/mcp/name-suffix.script.vue.js +23 -15
- 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/prefix-info-tool.script.vue.js +84 -41
- 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 +9 -9
- 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.script.vue.js +43 -39
- 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.script.vue.js +37 -27
- 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/dataset-data-level/index.script.vue.js +22 -18
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +26 -22
- 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.script.vue.js +97 -63
- 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/dataset-form.script.vue.js +184 -119
- 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/index.script.vue.js.js +5 -5
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +346 -201
- 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/components/table.script.vue.js +264 -161
- 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.script.vue.js +390 -269
- 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.script.vue.js +210 -149
- 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.script.vue.js +172 -113
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/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 +5 -5
- 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-permission-tag/index.script.vue.js +67 -54
- 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.script.vue.js +254 -203
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-relate-agent/index.script.vue.js +660 -339
- package/dist/components/render-resource-info/index.script.vue.js +45 -41
- 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-search-empty/index.script.vue.js.js +3 -2
- 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/variable-form/index.script.vue.js +74 -47
- package/dist/components/render-t-table/index.script.vue.js +234 -143
- package/dist/components/render-t-table/index.vue.css +32 -32
- 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.script.vue.js +89 -64
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components/render-tree/index.script.vue.js +115 -60
- package/dist/css/g-utilities.css +0 -12
- package/dist/css/g-utilities.manifest.json +0 -5
- package/dist/http/fetch/error-interceptor.ts.js +4 -4
- package/dist/http/fetch/request-error.d.ts +3 -3
- package/dist/http/fetch/request-error.ts.js +3 -3
- package/dist/http/helper/common.d.ts +7 -0
- package/dist/http/helper/common.ts.js +14 -0
- package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
- package/dist/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
- package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
- package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
- package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
- package/dist/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
- package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/typeof.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +9 -0
- package/dist/node_modules/core-js/internals/a-callable.js +11 -0
- package/dist/node_modules/core-js/internals/a-constructor.js +11 -0
- package/dist/node_modules/core-js/internals/a-possible-prototype.js +10 -0
- package/dist/node_modules/core-js/internals/add-to-unscopables.js +21 -0
- package/dist/node_modules/core-js/internals/advance-string-index.js +8 -0
- package/dist/node_modules/core-js/internals/an-instance.js +9 -0
- package/dist/node_modules/core-js/internals/an-object.js +11 -0
- package/dist/node_modules/core-js/internals/array-buffer-non-extensible.js +11 -0
- package/dist/node_modules/core-js/internals/array-for-each.js +12 -0
- package/dist/node_modules/core-js/internals/array-includes.js +34 -0
- package/dist/node_modules/core-js/internals/array-iteration.js +72 -0
- package/dist/node_modules/core-js/internals/array-method-has-species-support.js +20 -0
- package/dist/node_modules/core-js/internals/array-method-is-strict.js +10 -0
- package/dist/node_modules/core-js/internals/array-set-length.js +27 -0
- package/dist/node_modules/core-js/internals/array-slice.js +4 -0
- package/dist/node_modules/core-js/internals/array-species-constructor.js +23 -0
- package/dist/node_modules/core-js/internals/array-species-create.js +8 -0
- package/dist/node_modules/core-js/internals/check-correctness-of-iteration.js +43 -0
- package/dist/node_modules/core-js/internals/classof-raw.js +9 -0
- package/dist/node_modules/core-js/internals/classof.js +30 -0
- package/dist/node_modules/core-js/internals/collection-strong.js +206 -0
- package/dist/node_modules/core-js/internals/collection.js +106 -0
- package/dist/node_modules/core-js/internals/copy-constructor-properties.js +17 -0
- package/dist/node_modules/core-js/internals/correct-is-regexp-logic.js +16 -0
- package/dist/node_modules/core-js/internals/correct-prototype-getter.js +9 -0
- package/dist/node_modules/core-js/internals/create-iter-result-object.js +6 -0
- package/dist/node_modules/core-js/internals/create-non-enumerable-property.js +11 -0
- package/dist/node_modules/core-js/internals/create-property-descriptor.js +9 -0
- package/dist/node_modules/core-js/internals/create-property.js +9 -0
- package/dist/node_modules/core-js/internals/define-built-in-accessor.js +9 -0
- package/dist/node_modules/core-js/internals/define-built-in.js +28 -0
- package/dist/node_modules/core-js/internals/define-built-ins.js +7 -0
- package/dist/node_modules/core-js/internals/define-global-property.js +13 -0
- package/dist/node_modules/core-js/internals/delete-property-or-throw.js +8 -0
- package/dist/node_modules/core-js/internals/descriptors.js +8 -0
- package/dist/node_modules/core-js/internals/document-create-element.js +11 -0
- package/dist/node_modules/core-js/internals/does-not-exceed-safe-integer.js +8 -0
- package/dist/node_modules/core-js/internals/dom-iterables.js +36 -0
- package/dist/node_modules/core-js/internals/dom-token-list-prototype.js +8 -0
- package/dist/node_modules/core-js/internals/enum-bug-keys.js +11 -0
- package/dist/node_modules/core-js/internals/environment-is-ios-pebble.js +4 -0
- package/dist/node_modules/core-js/internals/environment-is-ios.js +4 -0
- package/dist/node_modules/core-js/internals/environment-is-node.js +4 -0
- package/dist/node_modules/core-js/internals/environment-is-webos-webkit.js +4 -0
- package/dist/node_modules/core-js/internals/environment-user-agent.js +7 -0
- package/dist/node_modules/core-js/internals/environment-v8-version.js +28 -0
- package/dist/node_modules/core-js/internals/environment.js +21 -0
- package/dist/node_modules/core-js/internals/export.js +55 -0
- package/dist/node_modules/core-js/internals/fails.js +8 -0
- package/dist/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js +78 -0
- package/dist/node_modules/core-js/internals/freezing.js +7 -0
- package/dist/node_modules/core-js/internals/function-apply.js +11 -0
- package/dist/node_modules/core-js/internals/function-bind-context.js +14 -0
- package/dist/node_modules/core-js/internals/function-bind-native.js +9 -0
- package/dist/node_modules/core-js/internals/function-call.js +8 -0
- package/dist/node_modules/core-js/internals/function-name.js +18 -0
- package/dist/node_modules/core-js/internals/function-uncurry-this-accessor.js +10 -0
- package/dist/node_modules/core-js/internals/function-uncurry-this-clause.js +10 -0
- package/dist/node_modules/core-js/internals/function-uncurry-this.js +13 -0
- package/dist/node_modules/core-js/internals/get-built-in.js +11 -0
- package/dist/node_modules/core-js/internals/get-iterator-internal.js +14 -0
- package/dist/node_modules/core-js/internals/get-iterator-method-internal.js +14 -0
- package/dist/node_modules/core-js/internals/get-method.js +10 -0
- package/dist/node_modules/core-js/internals/global-this.js +16 -0
- package/dist/node_modules/core-js/internals/has-own-property.js +12 -0
- package/dist/node_modules/core-js/internals/hidden-keys.js +2 -0
- package/dist/node_modules/core-js/internals/host-report-errors.js +7 -0
- package/dist/node_modules/core-js/internals/html.js +4 -0
- package/dist/node_modules/core-js/internals/ie8-dom-define.js +12 -0
- package/dist/node_modules/core-js/internals/indexed-object.js +16 -0
- package/dist/node_modules/core-js/internals/inherit-if-required.js +19 -0
- package/dist/node_modules/core-js/internals/inspect-source.js +15 -0
- package/dist/node_modules/core-js/internals/internal-metadata.js +91 -0
- package/dist/node_modules/core-js/internals/internal-state.js +71 -0
- package/dist/node_modules/core-js/internals/is-array-iterator-method.js +11 -0
- package/dist/node_modules/core-js/internals/is-array.js +9 -0
- package/dist/node_modules/core-js/internals/is-callable.js +12 -0
- package/dist/node_modules/core-js/internals/is-constructor.js +52 -0
- package/dist/node_modules/core-js/internals/is-forced.js +23 -0
- package/dist/node_modules/core-js/internals/is-null-or-undefined.js +6 -0
- package/dist/node_modules/core-js/internals/is-object.js +6 -0
- package/dist/node_modules/core-js/internals/is-possible-prototype.js +6 -0
- package/dist/node_modules/core-js/internals/is-pure.js +2 -0
- package/dist/node_modules/core-js/internals/is-raw-json.js +9 -0
- package/dist/node_modules/core-js/internals/is-regexp.js +13 -0
- package/dist/node_modules/core-js/internals/is-symbol.js +14 -0
- package/dist/node_modules/core-js/internals/iterate.js +74 -0
- package/dist/node_modules/core-js/internals/iterator-close.js +24 -0
- package/dist/node_modules/core-js/internals/iterator-create-constructor.js +16 -0
- package/dist/node_modules/core-js/internals/iterator-define.js +102 -0
- package/dist/node_modules/core-js/internals/iterators-core.js +49 -0
- package/dist/node_modules/core-js/internals/iterators.js +2 -0
- package/dist/node_modules/core-js/internals/length-of-array-like.js +8 -0
- package/dist/node_modules/core-js/internals/make-built-in.js +55 -0
- package/dist/node_modules/core-js/internals/math-trunc.js +11 -0
- package/dist/node_modules/core-js/internals/microtask.js +79 -0
- package/dist/node_modules/core-js/internals/native-raw-json.js +11 -0
- package/dist/node_modules/core-js/internals/new-promise-capability.js +21 -0
- package/dist/node_modules/core-js/internals/not-a-regexp.js +10 -0
- package/dist/node_modules/core-js/internals/object-assign.js +58 -0
- package/dist/node_modules/core-js/internals/object-create.js +85 -0
- package/dist/node_modules/core-js/internals/object-define-properties.js +21 -0
- package/dist/node_modules/core-js/internals/object-define-property.js +44 -0
- package/dist/node_modules/core-js/internals/object-get-own-property-descriptor.js +23 -0
- package/dist/node_modules/core-js/internals/object-get-own-property-names-external.js +24 -0
- package/dist/node_modules/core-js/internals/object-get-own-property-names.js +12 -0
- package/dist/node_modules/core-js/internals/object-get-own-property-symbols.js +3 -0
- package/dist/node_modules/core-js/internals/object-get-prototype-of.js +22 -0
- package/dist/node_modules/core-js/internals/object-is-extensible.js +17 -0
- package/dist/node_modules/core-js/internals/object-is-prototype-of.js +4 -0
- package/dist/node_modules/core-js/internals/object-keys-internal.js +21 -0
- package/dist/node_modules/core-js/internals/object-keys.js +10 -0
- package/dist/node_modules/core-js/internals/object-property-is-enumerable.js +14 -0
- package/dist/node_modules/core-js/internals/object-set-prototype-of.js +29 -0
- package/dist/node_modules/core-js/internals/object-to-array.js +49 -0
- package/dist/node_modules/core-js/internals/object-to-string.js +9 -0
- package/dist/node_modules/core-js/internals/ordinary-to-primitive.js +16 -0
- package/dist/node_modules/core-js/internals/own-keys.js +15 -0
- package/dist/node_modules/core-js/internals/parse-json-string.js +56 -0
- package/dist/node_modules/core-js/internals/path.js +4 -0
- package/dist/node_modules/core-js/internals/perform.js +8 -0
- package/dist/node_modules/core-js/internals/promise-constructor-detection.js +47 -0
- package/dist/node_modules/core-js/internals/promise-native-constructor.js +4 -0
- package/dist/node_modules/core-js/internals/promise-resolve.js +13 -0
- package/dist/node_modules/core-js/internals/promise-statics-incorrect-iteration.js +8 -0
- package/dist/node_modules/core-js/internals/queue.js +25 -0
- package/dist/node_modules/core-js/internals/regexp-exec-abstract.js +21 -0
- package/dist/node_modules/core-js/internals/regexp-exec.js +124 -0
- package/dist/node_modules/core-js/internals/regexp-flags-detection.js +47 -0
- package/dist/node_modules/core-js/internals/regexp-flags.js +18 -0
- package/dist/node_modules/core-js/internals/regexp-get-flags.js +16 -0
- package/dist/node_modules/core-js/internals/regexp-sticky-helpers.js +31 -0
- package/dist/node_modules/core-js/internals/regexp-unsupported-dot-all.js +11 -0
- package/dist/node_modules/core-js/internals/regexp-unsupported-ncg.js +12 -0
- package/dist/node_modules/core-js/internals/require-object-coercible.js +11 -0
- package/dist/node_modules/core-js/internals/safe-get-built-in.js +13 -0
- package/dist/node_modules/core-js/internals/same-value.js +8 -0
- package/dist/node_modules/core-js/internals/set-species.js +18 -0
- package/dist/node_modules/core-js/internals/set-to-string-tag.js +13 -0
- package/dist/node_modules/core-js/internals/shared-key.js +9 -0
- package/dist/node_modules/core-js/internals/shared-store.js +15 -0
- package/dist/node_modules/core-js/internals/shared.js +8 -0
- package/dist/node_modules/core-js/internals/species-constructor.js +15 -0
- package/dist/node_modules/core-js/internals/string-multibyte.js +37 -0
- package/dist/node_modules/core-js/internals/symbol-constructor-detection.js +19 -0
- package/dist/node_modules/core-js/internals/symbol-define-to-primitive.js +21 -0
- package/dist/node_modules/core-js/internals/symbol-registry-detection.js +5 -0
- package/dist/node_modules/core-js/internals/task.js +117 -0
- package/dist/node_modules/core-js/internals/this-number-value.js +6 -0
- package/dist/node_modules/core-js/internals/to-absolute-index.js +13 -0
- package/dist/node_modules/core-js/internals/to-indexed-object.js +8 -0
- package/dist/node_modules/core-js/internals/to-integer-or-infinity.js +10 -0
- package/dist/node_modules/core-js/internals/to-length.js +11 -0
- package/dist/node_modules/core-js/internals/to-object.js +10 -0
- package/dist/node_modules/core-js/internals/to-primitive.js +26 -0
- package/dist/node_modules/core-js/internals/to-property-key.js +10 -0
- package/dist/node_modules/core-js/internals/to-string-tag-support.js +9 -0
- package/dist/node_modules/core-js/internals/to-string.js +9 -0
- package/dist/node_modules/core-js/internals/try-to-string.js +10 -0
- package/dist/node_modules/core-js/internals/uid.js +10 -0
- package/dist/node_modules/core-js/internals/use-symbol-as-uid.js +7 -0
- package/dist/node_modules/core-js/internals/v8-prototype-define-bug.js +13 -0
- package/dist/node_modules/core-js/internals/validate-arguments-length.js +7 -0
- package/dist/node_modules/core-js/internals/weak-map-basic-detection.js +7 -0
- package/dist/node_modules/core-js/internals/well-known-symbol-define.js +12 -0
- package/dist/node_modules/core-js/internals/well-known-symbol-wrapped.js +4 -0
- package/dist/node_modules/core-js/internals/well-known-symbol.js +19 -0
- package/dist/node_modules/core-js/modules/es.array.concat.js +59 -0
- package/dist/node_modules/core-js/modules/es.array.filter.js +15 -0
- package/dist/node_modules/core-js/modules/es.array.find-index.js +22 -0
- package/dist/node_modules/core-js/modules/es.array.find.js +22 -0
- package/dist/node_modules/core-js/modules/es.array.includes.js +28 -0
- package/dist/node_modules/core-js/modules/es.array.iterator.js +62 -0
- package/dist/node_modules/core-js/modules/es.array.join.js +19 -0
- package/dist/node_modules/core-js/modules/es.array.map.js +15 -0
- package/dist/node_modules/core-js/modules/es.array.splice.js +67 -0
- package/dist/node_modules/core-js/modules/es.function.name.js +26 -0
- package/dist/node_modules/core-js/modules/es.json.stringify.js +251 -0
- package/dist/node_modules/core-js/modules/es.object.assign.js +10 -0
- package/dist/node_modules/core-js/modules/es.object.entries.js +11 -0
- package/dist/node_modules/core-js/modules/es.object.get-own-property-symbols.js +19 -0
- package/dist/node_modules/core-js/modules/es.object.keys.js +15 -0
- package/dist/node_modules/core-js/modules/es.object.to-string.js +10 -0
- package/dist/node_modules/core-js/modules/es.promise.all.js +39 -0
- package/dist/node_modules/core-js/modules/es.promise.catch.js +26 -0
- package/dist/node_modules/core-js/modules/es.promise.constructor.js +293 -0
- package/dist/node_modules/core-js/modules/es.promise.finally.js +43 -0
- package/dist/node_modules/core-js/modules/es.promise.js +8 -0
- package/dist/node_modules/core-js/modules/es.promise.race.js +26 -0
- package/dist/node_modules/core-js/modules/es.promise.reject.js +15 -0
- package/dist/node_modules/core-js/modules/es.promise.resolve.js +18 -0
- package/dist/node_modules/core-js/modules/es.regexp.exec.js +9 -0
- package/dist/node_modules/core-js/modules/es.regexp.to-string.js +26 -0
- package/dist/node_modules/core-js/modules/es.set.constructor.js +9 -0
- package/dist/node_modules/core-js/modules/es.set.js +3 -0
- package/dist/node_modules/core-js/modules/es.string.includes.js +21 -0
- package/dist/node_modules/core-js/modules/es.string.iterator.js +31 -0
- package/dist/node_modules/core-js/modules/es.string.search.js +40 -0
- package/dist/node_modules/core-js/modules/es.string.split.js +113 -0
- package/dist/node_modules/core-js/modules/es.symbol.constructor.js +264 -0
- package/dist/node_modules/core-js/modules/es.symbol.description.js +69 -0
- package/dist/node_modules/core-js/modules/es.symbol.for.js +23 -0
- package/dist/node_modules/core-js/modules/es.symbol.js +7 -0
- package/dist/node_modules/core-js/modules/es.symbol.key-for.js +18 -0
- package/dist/node_modules/core-js/modules/web.dom-collections.for-each.js +23 -0
- package/dist/node_modules/core-js/modules/web.dom-collections.iterator.js +37 -0
- package/dist/node_modules/regenerator-runtime/runtime.js +761 -0
- package/package.json +1 -1
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var _interopRequireDefault = require('../../node_modules/@babel/runtime/helpers/interopRequireDefault.js');
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require('../../node_modules/regenerator-runtime/runtime.js');
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require('../../node_modules/@babel/runtime/helpers/defineProperty.js'));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require('../../node_modules/@babel/runtime/helpers/toConsumableArray.js'));
|
|
10
|
+
var _vue = require("vue");
|
|
11
|
+
require('../../node_modules/core-js/modules/es.array.concat.js');
|
|
12
|
+
require('../../node_modules/core-js/modules/es.array.filter.js');
|
|
13
|
+
require('../../node_modules/core-js/modules/es.array.find.js');
|
|
14
|
+
require('../../node_modules/core-js/modules/es.array.map.js');
|
|
15
|
+
require('../../node_modules/core-js/modules/es.function.name.js');
|
|
16
|
+
require('../../node_modules/core-js/modules/es.object.assign.js');
|
|
17
|
+
require('../../node_modules/core-js/modules/es.object.to-string.js');
|
|
18
|
+
require('../../node_modules/core-js/modules/es.promise.js');
|
|
19
|
+
require('../../node_modules/core-js/modules/es.promise.finally.js');
|
|
20
|
+
var _constants = require('../../common/constants.ts.js');
|
|
21
|
+
var _util = require('../../common/util.ts.js');
|
|
22
|
+
var _index = _interopRequireDefault(require('../render-select-plus-extension/index.vue.js'));
|
|
23
|
+
var _index2 = _interopRequireDefault(require('../render-skill/variable-form/index.vue.js'));
|
|
24
|
+
var _useAgentHttp2 = require('../../hooks/use-agent-http.ts.js');
|
|
25
|
+
var _useClickoutside4 = require('../../hooks/use-clickoutside.ts.js');
|
|
26
|
+
var _useSpaceHttp2 = require('../../hooks/use-space-http.ts.js');
|
|
27
|
+
var _enum = require('../../types/enum.ts.js');
|
|
28
|
+
var __awaiter = (void 0) && (void 0).__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2
29
|
function adopt(value) {
|
|
3
30
|
return value instanceof P ? value : new P(function(resolve) {
|
|
4
31
|
resolve(value);
|
|
@@ -25,21 +52,10 @@ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, gener
|
|
|
25
52
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
53
|
});
|
|
27
54
|
};
|
|
28
|
-
|
|
29
|
-
import { renderSlot as _renderSlot, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, resolveDirective as _resolveDirective, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, createVNode as _createVNode, unref as _unref } from "vue";
|
|
30
|
-
const _hoisted_1 = {
|
|
55
|
+
var _hoisted_1 = {
|
|
31
56
|
class: "g-flex-row g-justify-end g-mt-16"
|
|
32
57
|
};
|
|
33
|
-
|
|
34
|
-
import { MAX_PAGE_SIZE, MODULE_NAME } from '../../common/constants.ts.js';
|
|
35
|
-
import { isEmpty } from '../../common/util.ts.js';
|
|
36
|
-
import RenderSelectPlusExtension from '../render-select-plus-extension/index.vue.js';
|
|
37
|
-
import VariableForm from '../render-skill/variable-form/index.vue.js';
|
|
38
|
-
import { useAgentHttp } from '../../hooks/use-agent-http.ts.js';
|
|
39
|
-
import { useClickoutside } from '../../hooks/use-clickoutside.ts.js';
|
|
40
|
-
import { useSpaceHttp } from '../../hooks/use-space-http.ts.js';
|
|
41
|
-
import { AgentType, GroupType, Module, PromptSource, ResourceStatus, SdkNavigateActionType } from '../../types/enum.ts.js';
|
|
42
|
-
export default /*@__PURE__*/ _defineComponent({
|
|
58
|
+
var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
43
59
|
props: {
|
|
44
60
|
resourceType: {},
|
|
45
61
|
resource: {},
|
|
@@ -63,34 +79,40 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
63
79
|
emits: [
|
|
64
80
|
"navigate"
|
|
65
81
|
],
|
|
66
|
-
setup (__props,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
setup: function setup(__props, _ref) {
|
|
83
|
+
var _this = this;
|
|
84
|
+
var __emit = _ref.emit;
|
|
85
|
+
var props = __props;
|
|
86
|
+
var emits = __emit;
|
|
87
|
+
var _useAgentHttp = (0, _useAgentHttp2.useAgentHttp)(props.apiPrefix, (0, _vue.toRef)(props, 'spaceId')), getAgent = _useAgentHttp.getAgent, getAgentList = _useAgentHttp.getAgentList, updateAgent = _useAgentHttp.updateAgent, getAgentMcpPermission = _useAgentHttp.getAgentMcpPermission, resourceApply = _useAgentHttp.resourceApply;
|
|
88
|
+
var _useSpaceHttp = (0, _useSpaceHttp2.useSpaceHttp)(props.apiPrefix, (0, _vue.toRef)(props, 'spaceId')), getResourceAuthorizedSpaces = _useSpaceHttp.getResourceAuthorizedSpaces;
|
|
89
|
+
var _useClickoutside = (0, _useClickoutside4.useClickoutside)(), handleInitClickoutside = _useClickoutside.handleInitClickoutside;
|
|
90
|
+
var _useClickoutside2 = (0, _useClickoutside4.useClickoutside)(), handleInitSpaceSelectClickoutside = _useClickoutside2.handleInitClickoutside;
|
|
91
|
+
var _useClickoutside3 = (0, _useClickoutside4.useClickoutside)(), handleInitAgentSelectClickoutside = _useClickoutside3.handleInitClickoutside;
|
|
92
|
+
var formRef = (0, _vue.ref)();
|
|
93
|
+
var spaceSelectRef = (0, _vue.ref)();
|
|
94
|
+
var agentSelectRef = (0, _vue.ref)();
|
|
95
|
+
var variableFormRef = (0, _vue.ref)();
|
|
96
|
+
var agents = (0, _vue.ref)([]);
|
|
97
|
+
var spaces = (0, _vue.ref)([]);
|
|
98
|
+
var isLoadingAgents = (0, _vue.ref)(false);
|
|
99
|
+
var isLoadingSpaces = (0, _vue.ref)(false);
|
|
100
|
+
var isLoadingConfirm = (0, _vue.ref)(false);
|
|
101
|
+
var isShowPopover = (0, _vue.ref)(false);
|
|
102
|
+
var isShowConfirm = (0, _vue.ref)(false);
|
|
103
|
+
var hasMcpPermission = (0, _vue.ref)(undefined);
|
|
104
|
+
var hasUnfilledRequiredEnv = (0, _vue.ref)(false);
|
|
105
|
+
var renderEnvs = (0, _vue.ref)([]);
|
|
106
|
+
var formData = (0, _vue.ref)({
|
|
85
107
|
selectedAgentId: undefined,
|
|
86
108
|
selectedSpaceId: undefined
|
|
87
109
|
});
|
|
88
|
-
|
|
89
|
-
return props.resourceType === Module.Skill ? 600 : 280;
|
|
110
|
+
var getWidth = function getWidth() {
|
|
111
|
+
return props.resourceType === _enum.Module.Skill ? 600 : 280;
|
|
90
112
|
};
|
|
91
|
-
|
|
92
|
-
if (props.resourceType === Module.Skill) {
|
|
93
|
-
return
|
|
113
|
+
var getContent = function getContent() {
|
|
114
|
+
if (props.resourceType === _enum.Module.Skill) {
|
|
115
|
+
return (0, _vue.createVNode)(_index2.default, {
|
|
94
116
|
"ref": variableFormRef,
|
|
95
117
|
"skillEnvs": renderEnvs.value,
|
|
96
118
|
"onUpdate:skillEnvs": handleUpdateEnvs
|
|
@@ -98,63 +120,65 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
98
120
|
}
|
|
99
121
|
return '当前选择的 MCP 暂无使用权限且未经申请,提交后将自动创建申请单';
|
|
100
122
|
};
|
|
101
|
-
|
|
102
|
-
if (props.resourceType === Module.Skill) {
|
|
123
|
+
var getTitle = function getTitle() {
|
|
124
|
+
if (props.resourceType === _enum.Module.Skill) {
|
|
103
125
|
return '配置 Skill 环境变量';
|
|
104
126
|
}
|
|
105
127
|
return '确认提交申请?';
|
|
106
128
|
};
|
|
107
|
-
|
|
129
|
+
var handleGetSpacesAndSetDefaultSpace = function handleGetSpacesAndSetDefaultSpace() {
|
|
108
130
|
isLoadingSpaces.value = true;
|
|
109
|
-
|
|
131
|
+
var params = {
|
|
110
132
|
resourceType: props.resourceType,
|
|
111
133
|
resourceId: props.resource.id
|
|
112
134
|
};
|
|
113
|
-
if (props.resourceType === Module.Mcp) {
|
|
135
|
+
if (props.resourceType === _enum.Module.Mcp) {
|
|
114
136
|
params.mcpType = props.resource.mcpType;
|
|
115
137
|
}
|
|
116
|
-
return getResourceAuthorizedSpaces(params).then((data)
|
|
138
|
+
return getResourceAuthorizedSpaces(params).then(function(data) {
|
|
117
139
|
var _a;
|
|
118
140
|
spaces.value = data;
|
|
119
141
|
formData.value.selectedSpaceId = (_a = data[0]) === null || _a === void 0 ? void 0 : _a.spaceId;
|
|
120
|
-
}).finally(()
|
|
142
|
+
}).finally(function() {
|
|
121
143
|
isLoadingSpaces.value = false;
|
|
122
144
|
});
|
|
123
145
|
};
|
|
124
|
-
|
|
146
|
+
var handleGetAgentsAndSetDefaultAgent = function handleGetAgentsAndSetDefaultAgent() {
|
|
125
147
|
if (!formData.value.selectedSpaceId) return;
|
|
126
148
|
isLoadingAgents.value = true;
|
|
127
|
-
|
|
149
|
+
var params = {
|
|
128
150
|
page: 1,
|
|
129
|
-
pageSize: MAX_PAGE_SIZE,
|
|
151
|
+
pageSize: _constants.MAX_PAGE_SIZE,
|
|
130
152
|
spaceId: formData.value.selectedSpaceId,
|
|
131
|
-
groupType: GroupType.Space,
|
|
132
|
-
agentType: AgentType.Single
|
|
153
|
+
groupType: _enum.GroupType.Space,
|
|
154
|
+
agentType: _enum.AgentType.Single
|
|
133
155
|
};
|
|
134
|
-
getAgentList(params).then((data)
|
|
156
|
+
getAgentList(params).then(function(data) {
|
|
135
157
|
var _a;
|
|
136
|
-
|
|
158
|
+
var list = data.results.filter(function(agent) {
|
|
137
159
|
var _a;
|
|
138
160
|
return (_a = agent.permission) === null || _a === void 0 ? void 0 : _a.manageAgent;
|
|
139
161
|
});
|
|
140
|
-
if (props.resourceType === Module.Agent) {
|
|
141
|
-
list = list.filter((agent)
|
|
162
|
+
if (props.resourceType === _enum.Module.Agent) {
|
|
163
|
+
list = list.filter(function(agent) {
|
|
164
|
+
return agent.id !== props.resource.id;
|
|
165
|
+
});
|
|
142
166
|
}
|
|
143
167
|
agents.value = list;
|
|
144
168
|
formData.value.selectedAgentId = (_a = list[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
145
|
-
}).finally(()
|
|
169
|
+
}).finally(function() {
|
|
146
170
|
isLoadingAgents.value = false;
|
|
147
171
|
});
|
|
148
172
|
};
|
|
149
|
-
|
|
173
|
+
var handleGoCreateAgent = function handleGoCreateAgent() {
|
|
150
174
|
handleClose();
|
|
151
175
|
emits('navigate', {
|
|
152
|
-
type: SdkNavigateActionType.AgentList,
|
|
176
|
+
type: _enum.SdkNavigateActionType.AgentList,
|
|
153
177
|
spaceId: formData.value.selectedSpaceId,
|
|
154
178
|
isShowCreateAgent: 1
|
|
155
179
|
});
|
|
156
180
|
};
|
|
157
|
-
|
|
181
|
+
var handleClose = function handleClose() {
|
|
158
182
|
var _a;
|
|
159
183
|
// 关闭弹窗
|
|
160
184
|
isShowPopover.value = false;
|
|
@@ -171,272 +195,541 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
171
195
|
// 清空表单验证
|
|
172
196
|
(_a = formRef.value) === null || _a === void 0 ? void 0 : _a.clearValidate();
|
|
173
197
|
};
|
|
174
|
-
|
|
198
|
+
var handleClickOutside = function handleClickOutside() {
|
|
175
199
|
handleClose();
|
|
176
200
|
};
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
201
|
+
var handleSpaceSelectClickOutside = function handleSpaceSelectClickOutside() {
|
|
202
|
+
var _a, _b;
|
|
203
|
+
(_a = spaceSelectRef.value) === null || _a === void 0 ? void 0 : _a.hidePopover();
|
|
204
|
+
(_b = spaceSelectRef.value) === null || _b === void 0 ? void 0 : _b.handleBlur();
|
|
181
205
|
};
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
var handleAgentSelectClickOutside = function handleAgentSelectClickOutside() {
|
|
207
|
+
var _a, _b;
|
|
208
|
+
(_a = agentSelectRef.value) === null || _a === void 0 ? void 0 : _a.hidePopover();
|
|
209
|
+
(_b = agentSelectRef.value) === null || _b === void 0 ? void 0 : _b.handleBlur();
|
|
210
|
+
};
|
|
211
|
+
var handleUpdateEnvs = function handleUpdateEnvs(data) {
|
|
212
|
+
renderEnvs.value = (0, _toConsumableArray2.default)(data);
|
|
213
|
+
};
|
|
214
|
+
var handleShow = function handleShow() {
|
|
215
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
|
216
|
+
return regeneratorRuntime.wrap(function(_context) {
|
|
217
|
+
while(1)switch(_context.prev = _context.next){
|
|
218
|
+
case 0:
|
|
219
|
+
if (!isShowPopover.value) {
|
|
220
|
+
_context.next = 1;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
return _context.abrupt("return");
|
|
224
|
+
case 1:
|
|
225
|
+
isShowPopover.value = true;
|
|
226
|
+
_context.next = 2;
|
|
227
|
+
return handleGetSpacesAndSetDefaultSpace();
|
|
228
|
+
case 2:
|
|
229
|
+
handleGetAgentsAndSetDefaultAgent();
|
|
230
|
+
case 3:
|
|
231
|
+
case "end":
|
|
232
|
+
return _context.stop();
|
|
233
|
+
}
|
|
234
|
+
}, _callee);
|
|
235
|
+
}));
|
|
236
|
+
};
|
|
237
|
+
var handleRelateAgentToAgent = function handleRelateAgentToAgent(selectedAgent) {
|
|
238
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee2() {
|
|
239
|
+
var _a, _b, _c, resourceId, currentAgent, selfCommands, relatedAgents;
|
|
240
|
+
return regeneratorRuntime.wrap(function(_context2) {
|
|
241
|
+
while(1)switch(_context2.prev = _context2.next){
|
|
242
|
+
case 0:
|
|
243
|
+
resourceId = props.resource.id;
|
|
244
|
+
if (!((_b = (_a = selectedAgent.relatedAgents) === null || _a === void 0 ? void 0 : _a.agents) === null || _b === void 0 ? void 0 : _b.find(function(agent) {
|
|
245
|
+
return agent.id === resourceId;
|
|
246
|
+
}))) {
|
|
247
|
+
_context2.next = 1;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
return _context2.abrupt("return");
|
|
251
|
+
case 1:
|
|
252
|
+
_context2.next = 2;
|
|
253
|
+
return getAgent(resourceId);
|
|
254
|
+
case 2:
|
|
255
|
+
currentAgent = _context2.sent;
|
|
256
|
+
selfCommands = currentAgent.conversationSettings.commands.filter(function(cmd) {
|
|
257
|
+
return cmd.agentId === currentAgent.id;
|
|
258
|
+
});
|
|
259
|
+
relatedAgents = [].concat((0, _toConsumableArray2.default)((_c = selectedAgent.relatedAgents) === null || _c === void 0 ? void 0 : _c.agents), [
|
|
260
|
+
currentAgent
|
|
261
|
+
]);
|
|
262
|
+
_context2.next = 3;
|
|
263
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
264
|
+
relatedAgents: {
|
|
265
|
+
agents: relatedAgents
|
|
266
|
+
},
|
|
267
|
+
conversationSettings: Object.assign(Object.assign({}, selectedAgent.conversationSettings), {
|
|
268
|
+
commands: [].concat((0, _toConsumableArray2.default)(selectedAgent.conversationSettings.commands), (0, _toConsumableArray2.default)(selfCommands))
|
|
269
|
+
})
|
|
270
|
+
}));
|
|
271
|
+
case 3:
|
|
272
|
+
case "end":
|
|
273
|
+
return _context2.stop();
|
|
274
|
+
}
|
|
275
|
+
}, _callee2);
|
|
276
|
+
}));
|
|
277
|
+
};
|
|
278
|
+
var handleRelateToolToAgent = function handleRelateToolToAgent(selectedAgent) {
|
|
279
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee3() {
|
|
211
280
|
var _a, _b, _c, _d;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
281
|
+
return regeneratorRuntime.wrap(function(_context3) {
|
|
282
|
+
while(1)switch(_context3.prev = _context3.next){
|
|
283
|
+
case 0:
|
|
284
|
+
if (!((_b = (_a = selectedAgent.relatedTools) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.find(function(tool) {
|
|
285
|
+
return tool.id === props.resource.id;
|
|
286
|
+
}))) {
|
|
287
|
+
_context3.next = 1;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
return _context3.abrupt("return");
|
|
291
|
+
case 1:
|
|
292
|
+
_context3.next = 2;
|
|
293
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
294
|
+
relatedTools: {
|
|
295
|
+
tools: [].concat((0, _toConsumableArray2.default)(((_c = selectedAgent.relatedTools) === null || _c === void 0 ? void 0 : _c.tools) || []), [
|
|
296
|
+
props.resource
|
|
297
|
+
]),
|
|
298
|
+
mcps: ((_d = selectedAgent.relatedTools) === null || _d === void 0 ? void 0 : _d.mcps) || []
|
|
299
|
+
}
|
|
300
|
+
}));
|
|
301
|
+
case 2:
|
|
302
|
+
case "end":
|
|
303
|
+
return _context3.stop();
|
|
220
304
|
}
|
|
221
|
-
})
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
305
|
+
}, _callee3);
|
|
306
|
+
}));
|
|
307
|
+
};
|
|
308
|
+
var handleRelateKnowledgebaseToAgent = function handleRelateKnowledgebaseToAgent(selectedAgent) {
|
|
309
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee4() {
|
|
310
|
+
var _a, _b, _c, targetKb, isAlreadyRelated;
|
|
311
|
+
return regeneratorRuntime.wrap(function(_context4) {
|
|
312
|
+
while(1)switch(_context4.prev = _context4.next){
|
|
313
|
+
case 0:
|
|
314
|
+
targetKb = props.resource;
|
|
315
|
+
isAlreadyRelated = (_b = (_a = selectedAgent.knowledgebaseSettings) === null || _a === void 0 ? void 0 : _a.knowledgebases) === null || _b === void 0 ? void 0 : _b.find(function(knowledgebase) {
|
|
316
|
+
return knowledgebase.id === targetKb.id;
|
|
317
|
+
});
|
|
318
|
+
if (!isAlreadyRelated) {
|
|
319
|
+
_context4.next = 1;
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
return _context4.abrupt("return");
|
|
323
|
+
case 1:
|
|
324
|
+
_context4.next = 2;
|
|
325
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
326
|
+
knowledgebaseSettings: Object.assign(Object.assign({}, selectedAgent.knowledgebaseSettings), {
|
|
327
|
+
knowledgebases: [].concat((0, _toConsumableArray2.default)(((_c = selectedAgent.knowledgebaseSettings) === null || _c === void 0 ? void 0 : _c.knowledgebases) || []), [
|
|
328
|
+
targetKb
|
|
329
|
+
])
|
|
330
|
+
})
|
|
331
|
+
}));
|
|
332
|
+
case 2:
|
|
333
|
+
case "end":
|
|
334
|
+
return _context4.stop();
|
|
335
|
+
}
|
|
336
|
+
}, _callee4);
|
|
337
|
+
}));
|
|
338
|
+
};
|
|
339
|
+
var handleRelateMcpToAgent = function handleRelateMcpToAgent(selectedAgent) {
|
|
340
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee5() {
|
|
238
341
|
var _a, _b, _c, _d;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
342
|
+
return regeneratorRuntime.wrap(function(_context5) {
|
|
343
|
+
while(1)switch(_context5.prev = _context5.next){
|
|
344
|
+
case 0:
|
|
345
|
+
if (!((_b = (_a = selectedAgent.relatedTools) === null || _a === void 0 ? void 0 : _a.mcps) === null || _b === void 0 ? void 0 : _b.find(function(mcp) {
|
|
346
|
+
return mcp.id === props.resource.id && mcp.mcpType === props.resource.mcpType;
|
|
347
|
+
}))) {
|
|
348
|
+
_context5.next = 1;
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
return _context5.abrupt("return");
|
|
352
|
+
case 1:
|
|
353
|
+
_context5.next = 2;
|
|
354
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
355
|
+
relatedTools: {
|
|
356
|
+
tools: ((_c = selectedAgent.relatedTools) === null || _c === void 0 ? void 0 : _c.tools) || [],
|
|
357
|
+
mcps: [].concat((0, _toConsumableArray2.default)(((_d = selectedAgent.relatedTools) === null || _d === void 0 ? void 0 : _d.mcps) || []), [
|
|
358
|
+
props.resource
|
|
359
|
+
])
|
|
360
|
+
}
|
|
361
|
+
}));
|
|
362
|
+
case 2:
|
|
363
|
+
case "end":
|
|
364
|
+
return _context5.stop();
|
|
247
365
|
}
|
|
248
|
-
})
|
|
249
|
-
});
|
|
250
|
-
|
|
366
|
+
}, _callee5);
|
|
367
|
+
}));
|
|
368
|
+
};
|
|
369
|
+
var handleRelateSkillToAgent = function handleRelateSkillToAgent(selectedAgent) {
|
|
370
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee6() {
|
|
251
371
|
var _a, _b, _c;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
372
|
+
return regeneratorRuntime.wrap(function(_context6) {
|
|
373
|
+
while(1)switch(_context6.prev = _context6.next){
|
|
374
|
+
case 0:
|
|
375
|
+
if (!((_b = (_a = selectedAgent.relatedSkills) === null || _a === void 0 ? void 0 : _a.skills) === null || _b === void 0 ? void 0 : _b.find(function(skill) {
|
|
376
|
+
return skill.id === props.resource.id;
|
|
377
|
+
}))) {
|
|
378
|
+
_context6.next = 1;
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
return _context6.abrupt("return");
|
|
382
|
+
case 1:
|
|
383
|
+
_context6.next = 2;
|
|
384
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
385
|
+
relatedSkills: {
|
|
386
|
+
skills: [].concat((0, _toConsumableArray2.default)((_c = selectedAgent.relatedSkills) === null || _c === void 0 ? void 0 : _c.skills), [
|
|
387
|
+
Object.assign(Object.assign({}, props.resource), {
|
|
388
|
+
envs: renderEnvs.value
|
|
389
|
+
})
|
|
390
|
+
])
|
|
391
|
+
}
|
|
392
|
+
}));
|
|
393
|
+
case 2:
|
|
394
|
+
case "end":
|
|
395
|
+
return _context6.stop();
|
|
261
396
|
}
|
|
262
|
-
})
|
|
263
|
-
});
|
|
264
|
-
|
|
397
|
+
}, _callee6);
|
|
398
|
+
}));
|
|
399
|
+
};
|
|
400
|
+
var handleRelateLLMToAgent = function handleRelateLLMToAgent(selectedAgent) {
|
|
401
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee7() {
|
|
265
402
|
var _a, _b, _c;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
const collection = props.resource;
|
|
285
|
-
if (((_a = selectedAgent.promptSetting) === null || _a === void 0 ? void 0 : _a.collectionId) === collection.id) return;
|
|
286
|
-
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
287
|
-
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
288
|
-
promptType: PromptSource.Collection,
|
|
289
|
-
collectionId: collection.id,
|
|
290
|
-
collectionName: collection.name,
|
|
291
|
-
collectionVariables: collection.variables,
|
|
292
|
-
collectionContent: collection.content
|
|
293
|
-
})
|
|
294
|
-
}));
|
|
295
|
-
});
|
|
296
|
-
const handleBindAndNavigate = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
297
|
-
var _a;
|
|
298
|
-
const relateMap = {
|
|
299
|
-
[Module.Agent]: handleRelateAgentToAgent,
|
|
300
|
-
[Module.Mcp]: handleRelateMcpToAgent,
|
|
301
|
-
[Module.Tool]: handleRelateToolToAgent,
|
|
302
|
-
[Module.Skill]: handleRelateSkillToAgent,
|
|
303
|
-
[Module.LLM]: handleRelateLLMToAgent,
|
|
304
|
-
[Module.Knowledgebase]: handleRelateKnowledgebaseToAgent,
|
|
305
|
-
[Module.Prompt]: handleRelatePromptToAgent,
|
|
306
|
-
[Module.Collection]: handleRelateCollectionToAgent
|
|
307
|
-
};
|
|
308
|
-
yield (_a = relateMap[props.resourceType]) === null || _a === void 0 ? void 0 : _a.call(relateMap, selectedAgent);
|
|
309
|
-
emits('navigate', {
|
|
310
|
-
type: SdkNavigateActionType.AgentDetailSetting,
|
|
311
|
-
id: formData.value.selectedAgentId,
|
|
312
|
-
spaceId: formData.value.selectedSpaceId,
|
|
313
|
-
isNewTab: true
|
|
314
|
-
});
|
|
315
|
-
handleClose();
|
|
316
|
-
});
|
|
317
|
-
const handleConfirm = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
318
|
-
var _a;
|
|
319
|
-
try {
|
|
320
|
-
yield (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.validate();
|
|
321
|
-
if (hasMcpPermission.value === false || hasUnfilledRequiredEnv.value) {
|
|
322
|
-
// 没有权限或必填环境变量未配置,显示弹窗
|
|
323
|
-
isShowConfirm.value = true;
|
|
324
|
-
} else {
|
|
325
|
-
// 有权限且必填环境变量已配置,绑定并跳转
|
|
326
|
-
isLoadingConfirm.value = true;
|
|
327
|
-
const selectedAgent = yield getAgent(formData.value.selectedAgentId);
|
|
328
|
-
yield handleBindAndNavigate(selectedAgent);
|
|
403
|
+
return regeneratorRuntime.wrap(function(_context7) {
|
|
404
|
+
while(1)switch(_context7.prev = _context7.next){
|
|
405
|
+
case 0:
|
|
406
|
+
if (!(((_a = selectedAgent.promptSetting) === null || _a === void 0 ? void 0 : _a.llmCode) === ((_b = props.resource) === null || _b === void 0 ? void 0 : _b.llmCode))) {
|
|
407
|
+
_context7.next = 1;
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
return _context7.abrupt("return");
|
|
411
|
+
case 1:
|
|
412
|
+
_context7.next = 2;
|
|
413
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
414
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
415
|
+
llmCode: (_c = props.resource) === null || _c === void 0 ? void 0 : _c.llmCode
|
|
416
|
+
})
|
|
417
|
+
}));
|
|
418
|
+
case 2:
|
|
419
|
+
case "end":
|
|
420
|
+
return _context7.stop();
|
|
329
421
|
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
422
|
+
}, _callee7);
|
|
423
|
+
}));
|
|
424
|
+
};
|
|
425
|
+
var handleRelatePromptToAgent = function handleRelatePromptToAgent(selectedAgent) {
|
|
426
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee8() {
|
|
427
|
+
var prompt;
|
|
428
|
+
return regeneratorRuntime.wrap(function(_context8) {
|
|
429
|
+
while(1)switch(_context8.prev = _context8.next){
|
|
430
|
+
case 0:
|
|
431
|
+
prompt = props.resource;
|
|
432
|
+
_context8.next = 1;
|
|
433
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
434
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
435
|
+
promptType: _enum.PromptSource.UserDefine,
|
|
436
|
+
promptContent: prompt.content
|
|
437
|
+
})
|
|
438
|
+
}));
|
|
439
|
+
case 1:
|
|
440
|
+
case "end":
|
|
441
|
+
return _context8.stop();
|
|
442
|
+
}
|
|
443
|
+
}, _callee8);
|
|
444
|
+
}));
|
|
445
|
+
};
|
|
446
|
+
var handleRelateCollectionToAgent = function handleRelateCollectionToAgent(selectedAgent) {
|
|
447
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee9() {
|
|
448
|
+
var _a, collection;
|
|
449
|
+
return regeneratorRuntime.wrap(function(_context9) {
|
|
450
|
+
while(1)switch(_context9.prev = _context9.next){
|
|
451
|
+
case 0:
|
|
452
|
+
collection = props.resource;
|
|
453
|
+
if (!(((_a = selectedAgent.promptSetting) === null || _a === void 0 ? void 0 : _a.collectionId) === collection.id)) {
|
|
454
|
+
_context9.next = 1;
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
return _context9.abrupt("return");
|
|
458
|
+
case 1:
|
|
459
|
+
_context9.next = 2;
|
|
460
|
+
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
461
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
462
|
+
promptType: _enum.PromptSource.Collection,
|
|
463
|
+
collectionId: collection.id,
|
|
464
|
+
collectionName: collection.name,
|
|
465
|
+
collectionVariables: collection.variables,
|
|
466
|
+
collectionContent: collection.content
|
|
467
|
+
})
|
|
468
|
+
}));
|
|
469
|
+
case 2:
|
|
470
|
+
case "end":
|
|
471
|
+
return _context9.stop();
|
|
472
|
+
}
|
|
473
|
+
}, _callee9);
|
|
474
|
+
}));
|
|
475
|
+
};
|
|
476
|
+
var handleBindAndNavigate = function handleBindAndNavigate(selectedAgent) {
|
|
477
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee0() {
|
|
478
|
+
var _a, relateMap;
|
|
479
|
+
return regeneratorRuntime.wrap(function(_context0) {
|
|
480
|
+
while(1)switch(_context0.prev = _context0.next){
|
|
481
|
+
case 0:
|
|
482
|
+
relateMap = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _enum.Module.Agent, handleRelateAgentToAgent), _enum.Module.Mcp, handleRelateMcpToAgent), _enum.Module.Tool, handleRelateToolToAgent), _enum.Module.Skill, handleRelateSkillToAgent), _enum.Module.LLM, handleRelateLLMToAgent), _enum.Module.Knowledgebase, handleRelateKnowledgebaseToAgent), _enum.Module.Prompt, handleRelatePromptToAgent), _enum.Module.Collection, handleRelateCollectionToAgent);
|
|
483
|
+
_context0.next = 1;
|
|
484
|
+
return (_a = relateMap[props.resourceType]) === null || _a === void 0 ? void 0 : _a.call(relateMap, selectedAgent);
|
|
485
|
+
case 1:
|
|
486
|
+
emits('navigate', {
|
|
487
|
+
type: _enum.SdkNavigateActionType.AgentDetailSetting,
|
|
488
|
+
id: formData.value.selectedAgentId,
|
|
489
|
+
spaceId: formData.value.selectedSpaceId,
|
|
490
|
+
isNewTab: true
|
|
491
|
+
});
|
|
492
|
+
handleClose();
|
|
493
|
+
case 2:
|
|
494
|
+
case "end":
|
|
495
|
+
return _context0.stop();
|
|
496
|
+
}
|
|
497
|
+
}, _callee0);
|
|
498
|
+
}));
|
|
499
|
+
};
|
|
500
|
+
var handleConfirm = function handleConfirm() {
|
|
501
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee1() {
|
|
502
|
+
var _a, selectedAgent, _t;
|
|
503
|
+
return regeneratorRuntime.wrap(function(_context1) {
|
|
504
|
+
while(1)switch(_context1.prev = _context1.next){
|
|
505
|
+
case 0:
|
|
506
|
+
_context1.prev = 0;
|
|
507
|
+
_context1.next = 1;
|
|
508
|
+
return (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.validate();
|
|
509
|
+
case 1:
|
|
510
|
+
if (!(hasMcpPermission.value === false || hasUnfilledRequiredEnv.value)) {
|
|
511
|
+
_context1.next = 2;
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
// 没有权限或必填环境变量未配置,显示弹窗
|
|
515
|
+
isShowConfirm.value = true;
|
|
516
|
+
_context1.next = 4;
|
|
517
|
+
break;
|
|
518
|
+
case 2:
|
|
519
|
+
// 有权限且必填环境变量已配置,绑定并跳转
|
|
520
|
+
isLoadingConfirm.value = true;
|
|
521
|
+
_context1.next = 3;
|
|
522
|
+
return getAgent(formData.value.selectedAgentId);
|
|
523
|
+
case 3:
|
|
524
|
+
selectedAgent = _context1.sent;
|
|
525
|
+
_context1.next = 4;
|
|
526
|
+
return handleBindAndNavigate(selectedAgent);
|
|
527
|
+
case 4:
|
|
528
|
+
_context1.next = 6;
|
|
529
|
+
break;
|
|
530
|
+
case 5:
|
|
531
|
+
_context1.prev = 5;
|
|
532
|
+
_t = _context1["catch"](0);
|
|
533
|
+
console.error(_t);
|
|
534
|
+
case 6:
|
|
535
|
+
_context1.prev = 6;
|
|
536
|
+
isLoadingConfirm.value = false;
|
|
537
|
+
return _context1.finish(6);
|
|
538
|
+
case 7:
|
|
539
|
+
case "end":
|
|
540
|
+
return _context1.stop();
|
|
541
|
+
}
|
|
542
|
+
}, _callee1, null, [
|
|
543
|
+
[
|
|
544
|
+
0,
|
|
545
|
+
5,
|
|
546
|
+
6,
|
|
547
|
+
7
|
|
548
|
+
]
|
|
549
|
+
]);
|
|
550
|
+
}));
|
|
551
|
+
};
|
|
552
|
+
var handlePopoverConfirm = function handlePopoverConfirm() {
|
|
553
|
+
if (props.resourceType === _enum.Module.Skill) {
|
|
338
554
|
handleValidateSkillAndConfirm();
|
|
339
555
|
}
|
|
340
|
-
if (props.resourceType === Module.Mcp) {
|
|
556
|
+
if (props.resourceType === _enum.Module.Mcp) {
|
|
341
557
|
handleApplyPermissionAndConfirm();
|
|
342
558
|
}
|
|
343
559
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
560
|
+
var handleValidateSkillAndConfirm = function handleValidateSkillAndConfirm() {
|
|
561
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee10() {
|
|
562
|
+
var _a, selectedAgent, _t2;
|
|
563
|
+
return regeneratorRuntime.wrap(function(_context10) {
|
|
564
|
+
while(1)switch(_context10.prev = _context10.next){
|
|
565
|
+
case 0:
|
|
566
|
+
isLoadingConfirm.value = true;
|
|
567
|
+
_context10.prev = 1;
|
|
568
|
+
_context10.next = 2;
|
|
569
|
+
return (_a = variableFormRef.value) === null || _a === void 0 ? void 0 : _a.validate();
|
|
570
|
+
case 2:
|
|
571
|
+
_context10.next = 3;
|
|
572
|
+
return getAgent(formData.value.selectedAgentId);
|
|
573
|
+
case 3:
|
|
574
|
+
selectedAgent = _context10.sent;
|
|
575
|
+
_context10.next = 4;
|
|
576
|
+
return handleBindAndNavigate(selectedAgent);
|
|
577
|
+
case 4:
|
|
578
|
+
isShowConfirm.value = false;
|
|
579
|
+
_context10.next = 6;
|
|
580
|
+
break;
|
|
581
|
+
case 5:
|
|
582
|
+
_context10.prev = 5;
|
|
583
|
+
_t2 = _context10["catch"](1);
|
|
584
|
+
console.error(_t2);
|
|
585
|
+
case 6:
|
|
586
|
+
_context10.prev = 6;
|
|
587
|
+
isLoadingConfirm.value = false;
|
|
588
|
+
return _context10.finish(6);
|
|
589
|
+
case 7:
|
|
590
|
+
case "end":
|
|
591
|
+
return _context10.stop();
|
|
592
|
+
}
|
|
593
|
+
}, _callee10, null, [
|
|
594
|
+
[
|
|
595
|
+
1,
|
|
596
|
+
5,
|
|
597
|
+
6,
|
|
598
|
+
7
|
|
599
|
+
]
|
|
600
|
+
]);
|
|
601
|
+
}));
|
|
602
|
+
};
|
|
603
|
+
var handleApplyPermissionAndConfirm = function handleApplyPermissionAndConfirm() {
|
|
604
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee11() {
|
|
605
|
+
var selectedAgent, resource, _t3;
|
|
606
|
+
return regeneratorRuntime.wrap(function(_context11) {
|
|
607
|
+
while(1)switch(_context11.prev = _context11.next){
|
|
608
|
+
case 0:
|
|
609
|
+
isLoadingConfirm.value = true;
|
|
610
|
+
_context11.prev = 1;
|
|
611
|
+
_context11.next = 2;
|
|
612
|
+
return getAgent(formData.value.selectedAgentId);
|
|
613
|
+
case 2:
|
|
614
|
+
selectedAgent = _context11.sent;
|
|
615
|
+
resource = [
|
|
616
|
+
{
|
|
617
|
+
resourceType: _enum.Module.Mcp,
|
|
618
|
+
resourceCode: props.resource.mcpCode
|
|
619
|
+
}
|
|
620
|
+
];
|
|
621
|
+
_context11.next = 3;
|
|
622
|
+
return resourceApply(resource, selectedAgent.id);
|
|
623
|
+
case 3:
|
|
624
|
+
_context11.next = 4;
|
|
625
|
+
return handleBindAndNavigate(selectedAgent);
|
|
626
|
+
case 4:
|
|
627
|
+
isShowConfirm.value = false;
|
|
628
|
+
_context11.next = 6;
|
|
629
|
+
break;
|
|
630
|
+
case 5:
|
|
631
|
+
_context11.prev = 5;
|
|
632
|
+
_t3 = _context11["catch"](1);
|
|
633
|
+
console.error(_t3);
|
|
634
|
+
case 6:
|
|
635
|
+
_context11.prev = 6;
|
|
636
|
+
isLoadingConfirm.value = false;
|
|
637
|
+
return _context11.finish(6);
|
|
638
|
+
case 7:
|
|
639
|
+
case "end":
|
|
640
|
+
return _context11.stop();
|
|
641
|
+
}
|
|
642
|
+
}, _callee11, null, [
|
|
643
|
+
[
|
|
644
|
+
1,
|
|
645
|
+
5,
|
|
646
|
+
6,
|
|
647
|
+
7
|
|
648
|
+
]
|
|
649
|
+
]);
|
|
650
|
+
}));
|
|
651
|
+
};
|
|
652
|
+
var handleCheckConfirm = function handleCheckConfirm() {
|
|
653
|
+
if ((0, _util.isEmpty)(formData.value.selectedAgentId)) {
|
|
379
654
|
return;
|
|
380
655
|
}
|
|
381
|
-
if (props.resourceType === Module.Skill) {
|
|
656
|
+
if (props.resourceType === _enum.Module.Skill) {
|
|
382
657
|
handleCheckSkillEnvs();
|
|
383
658
|
}
|
|
384
|
-
if (props.resourceType === Module.Mcp) {
|
|
659
|
+
if (props.resourceType === _enum.Module.Mcp) {
|
|
385
660
|
handleCheckMcpPermission();
|
|
386
661
|
}
|
|
387
662
|
};
|
|
388
663
|
// 检查是否有必填的环境变量
|
|
389
|
-
|
|
664
|
+
var handleCheckSkillEnvs = function handleCheckSkillEnvs() {
|
|
665
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee12() {
|
|
390
666
|
var _a, _b;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
value: env
|
|
395
|
-
|
|
667
|
+
return regeneratorRuntime.wrap(function(_context12) {
|
|
668
|
+
while(1)switch(_context12.prev = _context12.next){
|
|
669
|
+
case 0:
|
|
670
|
+
renderEnvs.value = (_b = (_a = props.resource.bkaiDependencies) === null || _a === void 0 ? void 0 : _a.envs) === null || _b === void 0 ? void 0 : _b.map(function(env) {
|
|
671
|
+
if ((0, _util.isEmpty)(env.value) && !(0, _util.isEmpty)(env.default)) {
|
|
672
|
+
return Object.assign(Object.assign({}, env), {
|
|
673
|
+
value: env.default
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
return env;
|
|
677
|
+
});
|
|
678
|
+
hasUnfilledRequiredEnv.value = renderEnvs.value.some(function(env) {
|
|
679
|
+
return env.required && (0, _util.isEmpty)(env.value);
|
|
680
|
+
});
|
|
681
|
+
if (hasUnfilledRequiredEnv.value) {
|
|
682
|
+
isLoadingConfirm.value = true;
|
|
683
|
+
getAgent(formData.value.selectedAgentId).then(function(agent) {
|
|
684
|
+
var _a;
|
|
685
|
+
var isAlreadyRelated = (_a = agent.relatedSkills) === null || _a === void 0 ? void 0 : _a.skills.find(function(skill) {
|
|
686
|
+
return skill.id === props.resource.id;
|
|
687
|
+
});
|
|
688
|
+
if (isAlreadyRelated) {
|
|
689
|
+
hasUnfilledRequiredEnv.value = false;
|
|
690
|
+
renderEnvs.value = [];
|
|
691
|
+
}
|
|
692
|
+
}).finally(function() {
|
|
693
|
+
isLoadingConfirm.value = false;
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
case 1:
|
|
697
|
+
case "end":
|
|
698
|
+
return _context12.stop();
|
|
396
699
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
if (hasUnfilledRequiredEnv.value) {
|
|
401
|
-
isLoadingConfirm.value = true;
|
|
402
|
-
getAgent(formData.value.selectedAgentId).then((agent)=>{
|
|
403
|
-
var _a;
|
|
404
|
-
const isAlreadyRelated = (_a = agent.relatedSkills) === null || _a === void 0 ? void 0 : _a.skills.find((skill)=>skill.id === props.resource.id);
|
|
405
|
-
if (isAlreadyRelated) {
|
|
406
|
-
hasUnfilledRequiredEnv.value = false;
|
|
407
|
-
renderEnvs.value = [];
|
|
408
|
-
}
|
|
409
|
-
}).finally(()=>{
|
|
410
|
-
isLoadingConfirm.value = false;
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
});
|
|
700
|
+
}, _callee12);
|
|
701
|
+
}));
|
|
702
|
+
};
|
|
414
703
|
// 检查 MCP 权限
|
|
415
|
-
|
|
704
|
+
var handleCheckMcpPermission = function handleCheckMcpPermission() {
|
|
416
705
|
isLoadingConfirm.value = true;
|
|
417
|
-
|
|
418
|
-
getAgentMcpPermission(formData.value.selectedAgentId, mcp.mcpCode, mcp.mcpType).then((res)
|
|
419
|
-
hasMcpPermission.value = res.status !== ResourceStatus.NoPermission;
|
|
420
|
-
}).catch(()
|
|
706
|
+
var mcp = props.resource;
|
|
707
|
+
getAgentMcpPermission(formData.value.selectedAgentId, mcp.mcpCode, mcp.mcpType).then(function(res) {
|
|
708
|
+
hasMcpPermission.value = res.status !== _enum.ResourceStatus.NoPermission;
|
|
709
|
+
}).catch(function() {
|
|
421
710
|
hasMcpPermission.value = undefined;
|
|
422
|
-
}).finally(()
|
|
711
|
+
}).finally(function() {
|
|
423
712
|
isLoadingConfirm.value = false;
|
|
424
713
|
});
|
|
425
714
|
};
|
|
426
|
-
|
|
715
|
+
var handleCancelApply = function handleCancelApply() {
|
|
427
716
|
isShowConfirm.value = false;
|
|
428
717
|
};
|
|
429
718
|
handleInitClickoutside('render-relate-agent-popover', handleClickOutside);
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
719
|
+
handleInitSpaceSelectClickoutside('space-select', handleSpaceSelectClickOutside);
|
|
720
|
+
handleInitAgentSelectClickoutside('agent-select', handleAgentSelectClickOutside);
|
|
721
|
+
(0, _vue.watch)(function() {
|
|
722
|
+
return formData.value.selectedAgentId;
|
|
723
|
+
}, handleCheckConfirm);
|
|
724
|
+
return function(_ctx, _cache) {
|
|
725
|
+
var _component_bk_button = (0, _vue.resolveComponent)("bk-button");
|
|
726
|
+
var _component_bk_select = (0, _vue.resolveComponent)("bk-select");
|
|
727
|
+
var _component_bk_form_item = (0, _vue.resolveComponent)("bk-form-item");
|
|
728
|
+
var _component_bk_form = (0, _vue.resolveComponent)("bk-form");
|
|
729
|
+
var _component_bk_pop_confirm = (0, _vue.resolveComponent)("bk-pop-confirm");
|
|
730
|
+
var _component_bk_popover = (0, _vue.resolveComponent)("bk-popover");
|
|
731
|
+
var _directive_bk_tooltips = (0, _vue.resolveDirective)("bk-tooltips");
|
|
732
|
+
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_bk_popover, {
|
|
440
733
|
placement: props.placement,
|
|
441
734
|
boundary: props.boundary,
|
|
442
735
|
"is-show": isShowPopover.value,
|
|
@@ -445,33 +738,42 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
445
738
|
width: "400",
|
|
446
739
|
"ext-cls": "render-relate-agent-popover"
|
|
447
740
|
}, {
|
|
448
|
-
content:
|
|
449
|
-
|
|
741
|
+
content: (0, _vue.withCtx)(function() {
|
|
742
|
+
return [
|
|
743
|
+
_cache[5] || (_cache[5] = (0, _vue.createElementVNode)("span", {
|
|
450
744
|
class: "g-text-16 g-text-black g-leading-24"
|
|
451
745
|
}, " 关联至智能体 ", -1 /* CACHED */ )),
|
|
452
|
-
|
|
746
|
+
(0, _vue.createVNode)(_component_bk_form, {
|
|
453
747
|
model: formData.value,
|
|
454
748
|
ref_key: "formRef",
|
|
455
749
|
ref: formRef,
|
|
456
750
|
"form-type": "vertical",
|
|
457
751
|
class: "g-small-form g-small-gap-form !g-mt-16"
|
|
458
752
|
}, {
|
|
459
|
-
default:
|
|
460
|
-
|
|
753
|
+
default: (0, _vue.withCtx)(function() {
|
|
754
|
+
return [
|
|
755
|
+
(0, _vue.createVNode)(_component_bk_form_item, {
|
|
461
756
|
label: "空间",
|
|
462
757
|
property: "selectedSpaceId",
|
|
463
758
|
required: ""
|
|
464
759
|
}, {
|
|
465
|
-
default:
|
|
466
|
-
|
|
760
|
+
default: (0, _vue.withCtx)(function() {
|
|
761
|
+
return [
|
|
762
|
+
(0, _vue.createVNode)(_component_bk_select, {
|
|
467
763
|
modelValue: formData.value.selectedSpaceId,
|
|
468
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)
|
|
764
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
|
|
765
|
+
return formData.value.selectedSpaceId = $event;
|
|
766
|
+
}),
|
|
469
767
|
clearable: false,
|
|
470
768
|
loading: isLoadingSpaces.value,
|
|
471
769
|
list: spaces.value,
|
|
472
770
|
"popover-options": {
|
|
473
|
-
boundary: 'parent'
|
|
771
|
+
boundary: 'parent',
|
|
772
|
+
extCls: 'space-select'
|
|
474
773
|
},
|
|
774
|
+
class: "space-select",
|
|
775
|
+
ref_key: "spaceSelectRef",
|
|
776
|
+
ref: spaceSelectRef,
|
|
475
777
|
filterable: "",
|
|
476
778
|
"id-key": "spaceId",
|
|
477
779
|
"display-key": "spaceName",
|
|
@@ -481,35 +783,45 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
481
783
|
"loading",
|
|
482
784
|
"list"
|
|
483
785
|
])
|
|
484
|
-
]
|
|
786
|
+
];
|
|
787
|
+
}),
|
|
485
788
|
_: 1 /* STABLE */
|
|
486
789
|
}),
|
|
487
|
-
|
|
790
|
+
(0, _vue.createVNode)(_component_bk_form_item, {
|
|
488
791
|
label: "智能体",
|
|
489
792
|
property: "selectedAgentId",
|
|
490
793
|
required: ""
|
|
491
794
|
}, {
|
|
492
|
-
default:
|
|
493
|
-
|
|
795
|
+
default: (0, _vue.withCtx)(function() {
|
|
796
|
+
return [
|
|
797
|
+
(0, _vue.createVNode)(_component_bk_select, {
|
|
494
798
|
modelValue: formData.value.selectedAgentId,
|
|
495
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)
|
|
496
|
-
|
|
799
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
|
|
800
|
+
return formData.value.selectedAgentId = $event;
|
|
801
|
+
}),
|
|
802
|
+
"no-data-text": "\u6682\u65E0\u672A\u5173\u8054\u8BE5".concat((0, _vue.unref)(_constants.MODULE_NAME)[props.resourceType], "\u7684\u667A\u80FD\u4F53"),
|
|
497
803
|
clearable: false,
|
|
498
804
|
list: agents.value,
|
|
499
805
|
loading: isLoadingAgents.value,
|
|
500
806
|
"popover-options": {
|
|
501
|
-
boundary: 'parent'
|
|
807
|
+
boundary: 'parent',
|
|
808
|
+
extCls: 'agent-select'
|
|
502
809
|
},
|
|
810
|
+
class: "agent-select",
|
|
811
|
+
ref_key: "agentSelectRef",
|
|
812
|
+
ref: agentSelectRef,
|
|
503
813
|
filterable: "",
|
|
504
814
|
"id-key": "id",
|
|
505
815
|
"display-key": "agentName"
|
|
506
816
|
}, {
|
|
507
|
-
extension:
|
|
508
|
-
|
|
817
|
+
extension: (0, _vue.withCtx)(function() {
|
|
818
|
+
return [
|
|
819
|
+
(0, _vue.createVNode)(_index.default, {
|
|
509
820
|
text: "去新建",
|
|
510
821
|
onClick: handleGoCreateAgent
|
|
511
822
|
})
|
|
512
|
-
]
|
|
823
|
+
];
|
|
824
|
+
}),
|
|
513
825
|
_: 1 /* STABLE */
|
|
514
826
|
}, 8 /* PROPS */ , [
|
|
515
827
|
"modelValue",
|
|
@@ -517,16 +829,18 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
517
829
|
"list",
|
|
518
830
|
"loading"
|
|
519
831
|
])
|
|
520
|
-
]
|
|
832
|
+
];
|
|
833
|
+
}),
|
|
521
834
|
_: 1 /* STABLE */
|
|
522
835
|
})
|
|
523
|
-
]
|
|
836
|
+
];
|
|
837
|
+
}),
|
|
524
838
|
_: 1 /* STABLE */
|
|
525
839
|
}, 8 /* PROPS */ , [
|
|
526
840
|
"model"
|
|
527
841
|
]),
|
|
528
|
-
|
|
529
|
-
|
|
842
|
+
(0, _vue.createElementVNode)("section", _hoisted_1, [
|
|
843
|
+
(0, _vue.createVNode)(_component_bk_pop_confirm, {
|
|
530
844
|
width: getWidth(),
|
|
531
845
|
title: getTitle(),
|
|
532
846
|
content: getContent(),
|
|
@@ -541,22 +855,24 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
541
855
|
onConfirm: handlePopoverConfirm,
|
|
542
856
|
onCancel: handleCancelApply
|
|
543
857
|
}, {
|
|
544
|
-
default:
|
|
545
|
-
|
|
858
|
+
default: (0, _vue.withCtx)(function() {
|
|
859
|
+
return [
|
|
860
|
+
(0, _vue.createVNode)(_component_bk_button, {
|
|
546
861
|
loading: isLoadingConfirm.value,
|
|
547
862
|
theme: "primary",
|
|
548
863
|
onClick: handleConfirm
|
|
549
864
|
}, {
|
|
550
|
-
default:
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
865
|
+
default: (0, _vue.withCtx)(function() {
|
|
866
|
+
return (0, _toConsumableArray2.default)(_cache[3] || (_cache[3] = [
|
|
867
|
+
(0, _vue.createTextVNode)(" 保存并去智能体调试 ", -1 /* CACHED */ )
|
|
868
|
+
]));
|
|
869
|
+
}),
|
|
555
870
|
_: 1 /* STABLE */
|
|
556
871
|
}, 8 /* PROPS */ , [
|
|
557
872
|
"loading"
|
|
558
873
|
])
|
|
559
|
-
]
|
|
874
|
+
];
|
|
875
|
+
}),
|
|
560
876
|
_: 1 /* STABLE */
|
|
561
877
|
}, 8 /* PROPS */ , [
|
|
562
878
|
"width",
|
|
@@ -565,37 +881,40 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
565
881
|
"is-show",
|
|
566
882
|
"confirm-config"
|
|
567
883
|
]),
|
|
568
|
-
|
|
884
|
+
(0, _vue.createVNode)(_component_bk_button, {
|
|
569
885
|
class: "g-ml-8",
|
|
570
886
|
onClick: handleClose
|
|
571
887
|
}, {
|
|
572
|
-
default:
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
888
|
+
default: (0, _vue.withCtx)(function() {
|
|
889
|
+
return (0, _toConsumableArray2.default)(_cache[4] || (_cache[4] = [
|
|
890
|
+
(0, _vue.createTextVNode)(" 取消 ", -1 /* CACHED */ )
|
|
891
|
+
]));
|
|
892
|
+
}),
|
|
577
893
|
_: 1 /* STABLE */
|
|
578
894
|
})
|
|
579
895
|
])
|
|
580
|
-
]
|
|
581
|
-
|
|
582
|
-
|
|
896
|
+
];
|
|
897
|
+
}),
|
|
898
|
+
default: (0, _vue.withCtx)(function() {
|
|
899
|
+
return [
|
|
900
|
+
(0, _vue.renderSlot)(_ctx.$slots, "trigger", {
|
|
583
901
|
handleShow: handleShow
|
|
584
|
-
}, ()
|
|
585
|
-
|
|
902
|
+
}, function() {
|
|
903
|
+
return [
|
|
904
|
+
(0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_bk_button, {
|
|
586
905
|
disabled: props.disabled,
|
|
587
906
|
text: props.isTextButton,
|
|
588
907
|
theme: __props.theme,
|
|
589
908
|
size: "small",
|
|
590
|
-
onClick:
|
|
909
|
+
onClick: (0, _vue.withModifiers)(handleShow, [
|
|
591
910
|
"stop"
|
|
592
911
|
])
|
|
593
912
|
}, {
|
|
594
|
-
default:
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
913
|
+
default: (0, _vue.withCtx)(function() {
|
|
914
|
+
return (0, _toConsumableArray2.default)(_cache[2] || (_cache[2] = [
|
|
915
|
+
(0, _vue.createTextVNode)(" 关联至智能体 ", -1 /* CACHED */ )
|
|
916
|
+
]));
|
|
917
|
+
}),
|
|
599
918
|
_: 1 /* STABLE */
|
|
600
919
|
}, 8 /* PROPS */ , [
|
|
601
920
|
"disabled",
|
|
@@ -612,8 +931,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
612
931
|
}
|
|
613
932
|
]
|
|
614
933
|
])
|
|
615
|
-
]
|
|
616
|
-
|
|
934
|
+
];
|
|
935
|
+
}, true)
|
|
936
|
+
];
|
|
937
|
+
}),
|
|
617
938
|
_: 3 /* FORWARDED */
|
|
618
939
|
}, 8 /* PROPS */ , [
|
|
619
940
|
"placement",
|