@blueking/ai-ui-sdk 0.3.0-beta.2 → 0.3.0-beta.21
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/assets/svg/lock.svg +43 -0
- package/dist/common/constants.d.ts +1 -0
- package/dist/common/constants.ts.js +1 -0
- package/dist/components/render-agent/agent-search.script.vue.js.js +1 -1
- package/dist/components/render-agent/agent-share.script.vue.js.js +2 -2
- package/dist/components/render-agent/agent-type.vue.css +3 -3
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.script.vue.js.js +3 -2
- 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/actions.script.vue.js.js +74 -71
- package/dist/components/render-card/agent/actions.vue.d.ts +3 -0
- package/dist/components/render-card/agent/index.script.vue.js.js +26 -7
- package/dist/components/render-card/agent/index.vue.d.ts +8 -1
- package/dist/components/render-card/agent/prefix-info-tool.script.vue.js.js +15 -12
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.d.ts +1 -0
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/agent-command/index.script.vue.js.js +16 -5
- package/dist/components/render-card/agent-command/index.vue.d.ts +13 -1
- package/dist/components/render-card/agent-command/info-tool.script.vue.js.js +9 -9
- package/dist/components/render-card/base/application-base-actions.vue.d.ts +2 -2
- package/dist/components/render-card/base/reference-icon.script.vue.js.js +12 -4
- package/dist/components/render-card/base/reference-icon.vue.d.ts +6 -1
- package/dist/components/render-card/base/tag-suffix.script.vue.js.js +1 -1
- package/dist/components/render-card/base.script.vue.js +37 -23
- package/dist/components/render-card/base.vue.css +12 -12
- package/dist/components/render-card/base.vue.d.ts +10 -4
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/knowledge/index.script.vue.js.js +20 -7
- package/dist/components/render-card/knowledge/index.vue.d.ts +10 -2
- package/dist/components/render-card/knowledge/info-tool.script.vue.js.js +16 -14
- package/dist/components/render-card/knowledge/info-tool.vue.d.ts +6 -1
- package/dist/components/render-card/knowledgebase/actions.script.vue.js.js +38 -18
- package/dist/components/render-card/knowledgebase/actions.vue.d.ts +3 -0
- package/dist/components/render-card/knowledgebase/index.script.vue.js.js +22 -8
- package/dist/components/render-card/knowledgebase/index.vue.d.ts +7 -1
- package/dist/components/render-card/knowledgebase/info-tool.script.vue.js.js +15 -13
- package/dist/components/render-card/knowledgebase/info-tool.vue.d.ts +6 -1
- package/dist/components/render-card/llm/actions.script.vue.js.js +11 -3
- package/dist/components/render-card/llm/actions.vue.d.ts +6 -1
- package/dist/components/render-card/llm/corner-badge.script.vue.js +4 -4
- 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.script.vue.js.js +4 -4
- 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/index.script.vue.js.js +13 -5
- package/dist/components/render-card/llm/index.vue.d.ts +4 -1
- package/dist/components/render-card/llm/info.script.vue.js.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 +3 -3
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/actions.script.vue.js.js +15 -17
- package/dist/components/render-card/mcp/actions.vue.d.ts +3 -0
- package/dist/components/render-card/mcp/code-suffix.script.vue.js +2 -2
- package/dist/components/render-card/mcp/index.script.vue.js.js +23 -6
- package/dist/components/render-card/mcp/index.vue.d.ts +8 -1
- package/dist/components/render-card/mcp/name-suffix.script.vue.js +2 -2
- 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/mcp/prefix-info-tool.script.vue.js.js +3 -3
- package/dist/components/render-card/prompt/icons.script.vue.js.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/prompt/index.script.vue.js.js +22 -9
- package/dist/components/render-card/prompt/index.vue.d.ts +7 -1
- package/dist/components/render-card/role/index.script.vue.js.js +22 -8
- package/dist/components/render-card/role/index.vue.d.ts +7 -1
- package/dist/components/render-card/skill/index.script.vue.js.js +51 -10
- package/dist/components/render-card/skill/index.vue.d.ts +18 -1
- package/dist/components/render-card/skill/prefix-info-tool.script.vue.js +185 -0
- package/dist/components/render-card/skill/prefix-info-tool.vue.d.ts +12 -0
- package/dist/components/render-card/skill/prefix-info-tool.vue.js +3 -0
- package/dist/components/render-card/skill/tag-prefix.script.vue.js.js +7 -7
- package/dist/components/render-card/skill/tag-prefix.vue.css +3 -3
- package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/tool/actions.script.vue.js.js +11 -6
- package/dist/components/render-card/tool/actions.vue.d.ts +3 -0
- package/dist/components/render-card/tool/index.script.vue.js.js +21 -7
- package/dist/components/render-card/tool/index.vue.d.ts +7 -1
- package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +3 -3
- package/dist/components/render-checkbox/index.script.vue.js.js +2 -2
- 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.script.vue.js.js +9 -3
- 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.script.vue.js.js +4 -4
- 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/actions/index.script.vue.js.js +15 -16
- package/dist/components/render-collection/actions/index.vue.d.ts +3 -0
- package/dist/components/render-collection/content/index.script.vue.js +5 -5
- 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-collection/search/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.script.vue.js +3 -3
- 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/batch-edit-valid-dataset-data/index.script.vue.js.js +5 -5
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-review-dataset-data/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-level/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-status/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +3 -3
- package/dist/components/render-dataset/components/dataset-data-valid/index.script.vue.js.js +8 -8
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +8 -8
- 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 +4 -4
- 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.script.vue.js.js +2 -2
- 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-footer.script.vue.js.js +2 -2
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +4 -4
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.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/file.script.vue.js.js +2 -2
- 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 +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js.js +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.script.vue.js.js +6 -6
- 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/components/header.script.vue.js.js +10 -8
- package/dist/components/render-dataset-detail/components/header.vue.d.ts +6 -1
- package/dist/components/render-dataset-detail/index.script.vue.js.js +17 -11
- package/dist/components/render-dataset-detail/index.vue.d.ts +6 -1
- package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +2 -2
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +7 -7
- package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.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.script.vue.js.js +8 -3
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.d.ts +3 -0
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/components/table.script.vue.js +13 -16
- package/dist/components/render-dataset-list/components/table.vue.d.ts +3 -0
- package/dist/components/render-dataset-list/index.script.vue.js.js +12 -3
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.d.ts +6 -1
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-footer.script.vue.js.js +86 -27
- package/dist/components/render-dialog/choose-footer.vue.d.ts +3 -0
- package/dist/components/render-dialog/choose-resource.script.vue.js +75 -27
- package/dist/components/render-dialog/choose-resource.vue.css +5 -3
- package/dist/components/render-dialog/choose-resource.vue.d.ts +9 -2
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.script.vue.js +3 -3
- 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.script.vue.js.js +80 -103
- package/dist/components/render-dialog/choose-space.vue.css +8 -8
- package/dist/components/render-dialog/choose-space.vue.d.ts +4 -4
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/{index.script.vue.js.js → index.script.vue.js} +84 -74
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/index.vue.d.ts +6 -0
- package/dist/components/render-dialog/index.vue.js +2 -2
- package/dist/components/render-file-card/index.script.vue.js.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.script.vue.js.js +2 -1
- package/dist/components/render-file-type-icon/index.vue.css +8 -5
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.script.vue.js.js +4 -4
- 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-header/index.script.vue.js.js +4 -4
- package/dist/components/render-header/index.vue.css +3 -3
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-image/index.script.vue.js.js +9 -4
- package/dist/components/render-image/index.vue.d.ts +1 -0
- package/dist/components/render-knowledge/icon/index.script.vue.js.js +3 -3
- 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-knowledge/search/index.script.vue.js.js +1 -1
- package/dist/components/render-knowledge/search/index.vue.d.ts +1 -1
- package/dist/components/render-knowledgebase/search/index.script.vue.js.js +1 -1
- package/dist/components/render-knowledgebase/search/index.vue.d.ts +1 -1
- package/dist/components/render-like/index.script.vue.js.js +8 -8
- package/dist/components/render-like/index.vue.css +5 -5
- package/dist/components/render-like/index.vue.js +1 -1
- package/dist/components/render-markdown/edit.ts.js +5 -5
- package/dist/components/render-markdown/filter-css.d.ts +1 -0
- package/dist/components/render-markdown/filter-css.ts.js +86 -0
- package/dist/components/render-markdown/view.ts.js +3 -92
- package/dist/components/render-mcp/search/index.script.vue.js.js +1 -1
- package/dist/components/render-permission-tag/index.script.vue.js +4 -4
- package/dist/components/render-prompt/actions/index.script.vue.js.js +15 -16
- package/dist/components/render-prompt/actions/index.vue.d.ts +3 -0
- package/dist/components/render-prompt/content/index.script.vue.js.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-prompt/search/index.script.vue.js.js +1 -1
- package/dist/components/render-reference/index.script.vue.js +42 -43
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.d.ts +3 -0
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-relate-agent/index.script.vue.js.js +215 -60
- package/dist/components/render-relate-agent/index.vue.d.ts +13 -6
- package/dist/components/render-resource-info/index.script.vue.js +8 -3
- package/dist/components/render-resource-info/index.vue.d.ts +1 -0
- 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.script.vue.js.js +5 -3
- 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 -3
- package/dist/components/render-search-select/index.script.vue.js.js +1 -1
- package/dist/components/render-select-plus-extension/index.script.vue.js.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/actions/index.script.vue.js.js +83 -48
- package/dist/components/render-skill/actions/index.vue.d.ts +3 -0
- package/dist/components/render-skill/icons/index.script.vue.js.js +2 -2
- package/dist/components/render-skill/install/index.script.vue.js.js +266 -30
- package/dist/components/render-skill/install/openclaw-linux-guide.script.vue.js.js +52 -0
- package/dist/components/{render-card/base/application-code-suffix.vue.d.ts → render-skill/install/openclaw-linux-guide.vue.d.ts} +3 -8
- package/dist/components/render-skill/install/openclaw-linux-guide.vue.js +3 -0
- package/dist/components/render-skill/install/openclaw-windows-instances.script.vue.js.js +134 -0
- package/dist/components/render-skill/install/openclaw-windows-instances.vue.d.ts +14 -0
- package/dist/components/render-skill/install/openclaw-windows-instances.vue.js +3 -0
- package/dist/components/render-skill/search/index.script.vue.js.js +1 -1
- package/dist/components/render-t-table/index.script.vue.js +20 -9
- package/dist/components/render-t-table/index.vue.css +27 -27
- package/dist/components/render-t-table/index.vue.d.ts +3 -1
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.script.vue.js.js +3 -3
- 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 +3 -3
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components/render-tool/search/index.script.vue.js.js +1 -1
- package/dist/components/render-tree/index.script.vue.js +1 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +102 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/g-utilities.css +1018 -0
- package/dist/css/g-utilities.manifest.json +183 -0
- package/dist/css/iconcool.js +1 -1
- package/dist/css/style.css +102 -0
- package/dist/hooks/use-agent-http.d.ts +7 -2
- package/dist/hooks/use-agent-http.ts.js +17 -6
- package/dist/hooks/use-clickoutside.d.ts +3 -0
- package/dist/hooks/use-clickoutside.ts.js +28 -0
- package/dist/hooks/use-collection-http.d.ts +5 -2
- package/dist/hooks/use-collection-http.ts.js +4 -3
- package/dist/hooks/use-knowledge-http.d.ts +9 -3
- package/dist/hooks/use-knowledge-http.ts.js +8 -6
- package/dist/hooks/use-mcp-http.d.ts +4 -1
- package/dist/hooks/use-mcp-http.ts.js +4 -3
- package/dist/hooks/use-prompt-http.d.ts +5 -2
- package/dist/hooks/use-prompt-http.ts.js +4 -3
- package/dist/hooks/use-scroll-load.d.ts +3 -1
- package/dist/hooks/use-scroll-load.ts.js +12 -2
- package/dist/hooks/use-skill-http.d.ts +20 -5
- package/dist/hooks/use-skill-http.ts.js +52 -5
- package/dist/hooks/use-style.d.ts +1 -1
- package/dist/hooks/use-style.ts.js +1 -1
- package/dist/hooks/use-tool-http.d.ts +5 -2
- package/dist/hooks/use-tool-http.ts.js +4 -3
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.ts.js +1 -0
- package/dist/http/helper/agent.d.ts +8 -1
- package/dist/http/helper/agent.ts.js +22 -4
- package/dist/http/helper/collection.ts.js +2 -2
- package/dist/http/helper/common.d.ts +4 -3
- package/dist/http/helper/common.ts.js +2 -2
- package/dist/http/helper/knowledge.ts.js +2 -3
- package/dist/http/helper/mcp.ts.js +2 -2
- package/dist/http/helper/prompt.ts.js +2 -2
- package/dist/http/helper/skill.d.ts +15 -1
- package/dist/http/helper/skill.ts.js +73 -5
- package/dist/http/helper/tool.ts.js +2 -2
- package/dist/types/agent.d.ts +18 -0
- package/dist/types/common.d.ts +7 -7
- package/dist/types/enum.d.ts +43 -0
- package/dist/types/enum.ts.js +47 -0
- package/dist/types/navigate.d.ts +82 -0
- package/dist/types/navigate.ts.js +1 -0
- package/dist/types/skill.d.ts +100 -5
- package/dist/types.d.ts +1 -0
- package/dist/types.ts.js +1 -0
- package/dist/util.d.ts +1 -0
- package/dist/util.ts.js +1 -0
- package/package.json +6 -4
- package/dist/components/render-card/base/base-info.vue.d.ts +0 -26
- package/dist/css/tailwind.css +0 -1115
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { IFetchConfig } from '@/http/fetch';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IKnowledgebaseListParam, IKnowledgeCountParam, IKnowledgeListParam } from '@/types';
|
|
4
4
|
export declare const useKnowledgeHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
|
|
5
5
|
getKnowledgebases: {
|
|
6
6
|
(params: IKnowledgebaseListParam, config?: IFetchConfig): Promise<import("@/types").IPaginationResponse<import("@/types").IKnowledgebase>>;
|
|
@@ -10,7 +10,13 @@ export declare const useKnowledgeHttp: (apiPrefix: string, spaceId?: Ref<string>
|
|
|
10
10
|
(params: IKnowledgeListParam, config?: IFetchConfig): Promise<import("@/types").IPaginationResponse<import("@/types").IKnowledge>>;
|
|
11
11
|
abort(): void;
|
|
12
12
|
};
|
|
13
|
-
getKnowledgebaseCount:
|
|
14
|
-
|
|
13
|
+
getKnowledgebaseCount: {
|
|
14
|
+
(param: import("@/types").IBaseCountParam): Promise<import("@/types").IResourceCount[]>;
|
|
15
|
+
abort(): void;
|
|
16
|
+
};
|
|
17
|
+
getKnowledgeCount: {
|
|
18
|
+
(param: IKnowledgeCountParam): Promise<import("@/types").IResourceCount[]>;
|
|
19
|
+
abort(): void;
|
|
20
|
+
};
|
|
15
21
|
getKnowledgebaseReferringAgents: (id: number) => Promise<import("@/types").IReferringAgent[]>;
|
|
16
22
|
};
|
|
@@ -70,17 +70,19 @@ export const useKnowledgeHttp = (apiPrefix, spaceId)=>{
|
|
|
70
70
|
signal
|
|
71
71
|
})).then(transferPaginationResponseApi2PaginationResponse(transferKnowledgebaseApi)));
|
|
72
72
|
// 批量获取知识数量
|
|
73
|
-
const getKnowledgeCount = (param)=>fetch.post(`${apiPrefix}/knowledgebase/v1/knowledge/count/`, transferKnowledgeCount2KnowledgeCountApi(param), {
|
|
73
|
+
const getKnowledgeCount = withAbort((signal, param)=>fetch.post(`${apiPrefix}/knowledgebase/v1/knowledge/count/`, transferKnowledgeCount2KnowledgeCountApi(param), {
|
|
74
74
|
headers: {
|
|
75
75
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
76
|
-
}
|
|
77
|
-
|
|
76
|
+
},
|
|
77
|
+
signal
|
|
78
|
+
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
78
79
|
// 批量获取知识库数量
|
|
79
|
-
const getKnowledgebaseCount = (param)=>fetch.post(`${apiPrefix}/knowledgebase/v1/knowledgebase/count/`, transferKnowledgebaseCount2KnowledgebaseCountApi(param), {
|
|
80
|
+
const getKnowledgebaseCount = withAbort((signal, param)=>fetch.post(`${apiPrefix}/knowledgebase/v1/knowledgebase/count/`, transferKnowledgebaseCount2KnowledgebaseCountApi(param), {
|
|
80
81
|
headers: {
|
|
81
82
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
82
|
-
}
|
|
83
|
-
|
|
83
|
+
},
|
|
84
|
+
signal
|
|
85
|
+
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
84
86
|
// 获取引用该知识库的智能体列表
|
|
85
87
|
const getKnowledgebaseReferringAgents = (id)=>fetch.get(`${apiPrefix}/knowledgebase/v1/knowledgebase/${id}/referring_agents/`, undefined, {
|
|
86
88
|
headers: {
|
|
@@ -9,6 +9,9 @@ export declare const useMcpHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
|
|
|
9
9
|
deleteMcp: (id: number) => Promise<IMcpApi>;
|
|
10
10
|
getMcpConfig: (param: IRegisterMcpParam) => Promise<string>;
|
|
11
11
|
restoreMcp: (id: number) => Promise<unknown>;
|
|
12
|
-
getMcpCount:
|
|
12
|
+
getMcpCount: {
|
|
13
|
+
(param: IMcpCountParam): Promise<import("@/types").IResourceCount[]>;
|
|
14
|
+
abort(): void;
|
|
15
|
+
};
|
|
13
16
|
getMcpReferringAgents: (mcpId: number) => Promise<import("@/types").IReferringAgent[]>;
|
|
14
17
|
};
|
|
@@ -81,11 +81,12 @@ export const useMcpHttp = (apiPrefix, spaceId)=>{
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
// 获取指定空间下 MCP 的数量
|
|
84
|
-
const getMcpCount = (param)=>fetch.post(`${apiPrefix}/mcp/v1/mcp/count/`, transferMcpCount2McpCountApi(param), {
|
|
84
|
+
const getMcpCount = withAbort((signal, param)=>fetch.post(`${apiPrefix}/mcp/v1/mcp/count/`, transferMcpCount2McpCountApi(param), {
|
|
85
85
|
headers: {
|
|
86
86
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
87
|
-
}
|
|
88
|
-
|
|
87
|
+
},
|
|
88
|
+
signal
|
|
89
|
+
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
89
90
|
// 获取引用该 MCP 的智能体列表
|
|
90
91
|
const getMcpReferringAgents = (mcpId)=>fetch.get(`${apiPrefix}/mcp/v1/mcp/${mcpId}/referring_agents/`, undefined, {
|
|
91
92
|
headers: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { IFetchConfig } from '@/http/fetch';
|
|
3
|
-
import type { IPromptApi,
|
|
3
|
+
import type { IPromptApi, IPromptsParams } from '@/types/prompt';
|
|
4
4
|
export declare const usePromptHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
|
|
5
5
|
getPrompts: {
|
|
6
6
|
(param: IPromptsParams, config?: IFetchConfig): Promise<import("@/types").IPaginationResponse<import("@/types").IPrompt>>;
|
|
@@ -9,5 +9,8 @@ export declare const usePromptHttp: (apiPrefix: string, spaceId?: Ref<string>) =
|
|
|
9
9
|
togglePromptLike: (id: number) => Promise<IPromptApi>;
|
|
10
10
|
deletePrompt: (id: number) => Promise<IPromptApi>;
|
|
11
11
|
restorePrompt: (id: number) => Promise<unknown>;
|
|
12
|
-
getPromptCount:
|
|
12
|
+
getPromptCount: {
|
|
13
|
+
(param: import("@/types").IBaseCountParam): Promise<import("@/types").IResourceCount[]>;
|
|
14
|
+
abort(): void;
|
|
15
|
+
};
|
|
13
16
|
};
|
|
@@ -81,11 +81,12 @@ export const usePromptHttp = (apiPrefix, spaceId)=>{
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
// // 获取指定空间下 prompt 的数量
|
|
84
|
-
const getPromptCount = (param)=>fetch.post(`${apiPrefix}/prompt/v1/prompt/count/`, transferPromptCount2PromptCountApi(param), {
|
|
84
|
+
const getPromptCount = withAbort((signal, param)=>fetch.post(`${apiPrefix}/prompt/v1/prompt/count/`, transferPromptCount2PromptCountApi(param), {
|
|
85
85
|
headers: {
|
|
86
86
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
87
|
-
}
|
|
88
|
-
|
|
87
|
+
},
|
|
88
|
+
signal
|
|
89
|
+
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
89
90
|
return {
|
|
90
91
|
getPrompts,
|
|
91
92
|
togglePromptLike,
|
|
@@ -8,13 +8,15 @@ interface IUseScrollLoadOptions<T> {
|
|
|
8
8
|
pageSize: number;
|
|
9
9
|
}) => Promise<IPaginationResponse<T>>;
|
|
10
10
|
handleDataLoaded?: (results: T[], append: boolean) => void;
|
|
11
|
+
handleDataUpdated?: (results: T[]) => void;
|
|
11
12
|
abort?: () => void;
|
|
12
13
|
}
|
|
13
|
-
export declare const useScrollLoad: <T>({ targetCls, defaultPageSize, triggerApi, abort, handleDataLoaded, }: IUseScrollLoadOptions<T>) => {
|
|
14
|
+
export declare const useScrollLoad: <T>({ targetCls, defaultPageSize, triggerApi, abort, handleDataLoaded, handleDataUpdated, }: IUseScrollLoadOptions<T>) => {
|
|
14
15
|
isLoading: Ref<boolean, boolean>;
|
|
15
16
|
datas: Ref<T[], T[]>;
|
|
16
17
|
handleInitData: () => void;
|
|
17
18
|
handleInitDataImmediately: () => Promise<void>;
|
|
18
19
|
handleRefreshData: () => void;
|
|
20
|
+
handleRefreshDataWithoutLoading: () => void;
|
|
19
21
|
};
|
|
20
22
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance, onBeforeUnmount, onMounted, ref } from 'vue';
|
|
2
2
|
import { debounce } from '../common/util.ts.js';
|
|
3
3
|
import { useLoadingVersion } from './use-loading-version.ts.js';
|
|
4
|
-
export const useScrollLoad = ({ targetCls, defaultPageSize = 100, triggerApi, abort, handleDataLoaded })=>{
|
|
4
|
+
export const useScrollLoad = ({ targetCls, defaultPageSize = 100, triggerApi, abort, handleDataLoaded, handleDataUpdated })=>{
|
|
5
5
|
// 解决abort后loading重置的问题
|
|
6
6
|
const { loading: isLoading, startLoading } = useLoadingVersion();
|
|
7
7
|
const instance = getCurrentInstance();
|
|
@@ -24,6 +24,7 @@ export const useScrollLoad = ({ targetCls, defaultPageSize = 100, triggerApi, ab
|
|
|
24
24
|
pageSize
|
|
25
25
|
}).then((res)=>{
|
|
26
26
|
onDataLoaded(res.results, append);
|
|
27
|
+
handleDataUpdated === null || handleDataUpdated === void 0 ? void 0 : handleDataUpdated(datas.value);
|
|
27
28
|
isLoadEnd.value = res.count <= page * pageSize;
|
|
28
29
|
}).finally(()=>{
|
|
29
30
|
isLoadingMore.value = false;
|
|
@@ -36,6 +37,11 @@ export const useScrollLoad = ({ targetCls, defaultPageSize = 100, triggerApi, ab
|
|
|
36
37
|
const endLoading = startLoading();
|
|
37
38
|
return handleGetData(append, page, pageSize).finally(endLoading);
|
|
38
39
|
};
|
|
40
|
+
const handleGetDataWithAbort = (append, page, pageSize)=>{
|
|
41
|
+
// 关闭上一次请求
|
|
42
|
+
abort === null || abort === void 0 ? void 0 : abort();
|
|
43
|
+
return handleGetData(append, page, pageSize);
|
|
44
|
+
};
|
|
39
45
|
const handleInitDataImmediately = ()=>{
|
|
40
46
|
// 重置页码
|
|
41
47
|
page.value = 1;
|
|
@@ -48,6 +54,9 @@ export const useScrollLoad = ({ targetCls, defaultPageSize = 100, triggerApi, ab
|
|
|
48
54
|
const handleRefreshData = debounce(()=>{
|
|
49
55
|
handleGetDataWithLoadingAndAbort(false, 1, (page.value - 1) * pageSize.value);
|
|
50
56
|
});
|
|
57
|
+
const handleRefreshDataWithoutLoading = debounce(()=>{
|
|
58
|
+
handleGetDataWithAbort(false, 1, (page.value - 1) * pageSize.value);
|
|
59
|
+
});
|
|
51
60
|
const scrollLoadMore = (event)=>{
|
|
52
61
|
const target = event.target;
|
|
53
62
|
const bottomDis = target.scrollHeight - target.clientHeight - target.scrollTop;
|
|
@@ -85,6 +94,7 @@ export const useScrollLoad = ({ targetCls, defaultPageSize = 100, triggerApi, ab
|
|
|
85
94
|
datas,
|
|
86
95
|
handleInitData,
|
|
87
96
|
handleInitDataImmediately,
|
|
88
|
-
handleRefreshData
|
|
97
|
+
handleRefreshData,
|
|
98
|
+
handleRefreshDataWithoutLoading
|
|
89
99
|
};
|
|
90
100
|
};
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { IFetchConfig } from '@/http/fetch';
|
|
3
|
-
import type { ISkillApi, ISkillCountParam, ISkillListParam } from '@/types/skill';
|
|
3
|
+
import type { ISkillApi, ISkillCountParam, ISkillListParam, ISkillOpenclawWindowsInstallParam, ISkillOpenclawWindowsInstallTaskStatusMapApi, ISkillOpenclawWindowsInstallTaskStatusParam, ISkillOpenclawWindowsInstanceStatusParam } from '@/types/skill';
|
|
4
4
|
export declare const useSkillHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
|
|
5
5
|
getSkillList: {
|
|
6
|
-
(param: ISkillListParam, config?: IFetchConfig): Promise<import("@/types").IPaginationResponse<import("@/types").ISkill>>;
|
|
6
|
+
(param: ISkillListParam, config?: IFetchConfig): Promise<import("@/types/common").IPaginationResponse<import("@/types/skill").ISkill>>;
|
|
7
7
|
abort(): void;
|
|
8
8
|
};
|
|
9
|
-
getSkillCount:
|
|
10
|
-
|
|
9
|
+
getSkillCount: {
|
|
10
|
+
(param: ISkillCountParam): Promise<import("@/types/common").IResourceCount[]>;
|
|
11
|
+
abort(): void;
|
|
12
|
+
};
|
|
13
|
+
getSkillReferringAgents: (skillId: number) => Promise<import("@/types/common").IReferringAgent[]>;
|
|
11
14
|
deleteSkill: (id: number) => Promise<ISkillApi>;
|
|
12
|
-
downloadSkill: (id: number) => Promise<import("@/types").ISkill>;
|
|
15
|
+
downloadSkill: (id: number) => Promise<import("@/types/skill").ISkill>;
|
|
13
16
|
restoreSkill: (id: number) => Promise<unknown>;
|
|
14
17
|
getSkillInstallGuide: (id: number) => Promise<{
|
|
15
18
|
markdown: string;
|
|
16
19
|
}>;
|
|
20
|
+
getSkillInstallTargets: () => Promise<import("@/types/skill").ISkillInstallTarget[]>;
|
|
21
|
+
getSkillOpenclawWindowsInstances: () => Promise<import("@/types/skill").ISkillOpenclawWindowsInstance[]>;
|
|
22
|
+
getSkillOpenclawWindowsInstancesStatus: (data: ISkillOpenclawWindowsInstanceStatusParam) => Promise<import("@/types/skill").ISkillOpenclawWindowsInstanceStatusMap>;
|
|
23
|
+
installSkillToOpenclawWindows: (data: ISkillOpenclawWindowsInstallParam) => Promise<import("@/types/skill").ISkillOpenclawWindowsInstallTasks>;
|
|
24
|
+
getSkillOpenclawWindowsInstallTasksStatus: {
|
|
25
|
+
(data: ISkillOpenclawWindowsInstallTaskStatusParam): Promise<ISkillOpenclawWindowsInstallTaskStatusMapApi>;
|
|
26
|
+
abort(): void;
|
|
27
|
+
};
|
|
28
|
+
getSkillBuildLog: {
|
|
29
|
+
(id: number, version: string): Promise<import("@/types/skill").ISkillBuildLog>;
|
|
30
|
+
abort(): void;
|
|
31
|
+
};
|
|
17
32
|
};
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import fetch, { withAbort } from '../http/fetch/index.ts.js';
|
|
54
|
-
import { transferSkillApi2Skill, transferSkillCount2SkillCountApi } from '../http/helper/skill.ts.js';
|
|
54
|
+
import { transferSkillApi2Skill, transferSkillBuildLogApi2SkillBuildLog, transferSkillCount2SkillCountApi, transferSkillInstallTargetApi2SkillInstallTarget, transferSkillOpenclawWindowsInstallParam2SkillOpenclawWindowsInstallParamApi, transferSkillOpenclawWindowsInstallTasksApi2SkillOpenclawWindowsInstallTasks, transferSkillOpenclawWindowsInstallTaskStatusParam2SkillOpenclawWindowsInstallTaskStatusParamApi, transferSkillOpenclawWindowsInstanceApi2SkillOpenclawWindowsInstance, transferSkillOpenclawWindowsInstanceStatusMapApi2SkillOpenclawWindowsInstanceStatusMap, transferSkillOpenclawWindowsInstanceStatusParam2SkillOpenclawWindowsInstanceStatusParamApi } from '../http/helper/skill.ts.js';
|
|
55
55
|
import { transferPaginationResponseApi2PaginationResponse, transferReferringAgentApi2ReferringAgent, transferResourceCountApi2ResourceCount, transferSkillParam2SkillParamApi } from '../transforms.ts.js';
|
|
56
56
|
export const useSkillHttp = (apiPrefix, spaceId)=>{
|
|
57
57
|
// 获取 Skill 列表
|
|
@@ -63,11 +63,12 @@ export const useSkillHttp = (apiPrefix, spaceId)=>{
|
|
|
63
63
|
signal
|
|
64
64
|
})).then(transferPaginationResponseApi2PaginationResponse(transferSkillApi2Skill)));
|
|
65
65
|
// 获取指定空间下 Skill 的数量
|
|
66
|
-
const getSkillCount = (param)=>fetch.post(`${apiPrefix}/skill/v1/skill/count/`, transferSkillCount2SkillCountApi(param), {
|
|
66
|
+
const getSkillCount = withAbort((signal, param)=>fetch.post(`${apiPrefix}/skill/v1/skill/count/`, transferSkillCount2SkillCountApi(param), {
|
|
67
67
|
headers: {
|
|
68
68
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
69
|
-
}
|
|
70
|
-
|
|
69
|
+
},
|
|
70
|
+
signal
|
|
71
|
+
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
71
72
|
// 获取引用该 Skill 的智能体列表
|
|
72
73
|
const getSkillReferringAgents = (skillId)=>fetch.get(`${apiPrefix}/skill/v1/skill/${skillId}/referring_agents/`, undefined, {
|
|
73
74
|
headers: {
|
|
@@ -98,6 +99,46 @@ export const useSkillHttp = (apiPrefix, spaceId)=>{
|
|
|
98
99
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
99
100
|
}
|
|
100
101
|
});
|
|
102
|
+
// 获取 Skill 安装目标列表
|
|
103
|
+
const getSkillInstallTargets = ()=>fetch.get(`${apiPrefix}/skill/v1/skill/install_targets/`, undefined, {
|
|
104
|
+
headers: {
|
|
105
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
106
|
+
}
|
|
107
|
+
}).then((data)=>data.map(transferSkillInstallTargetApi2SkillInstallTarget));
|
|
108
|
+
// 获取 Windows 云桌面实例列表
|
|
109
|
+
const getSkillOpenclawWindowsInstances = ()=>fetch.get(`${apiPrefix}/skill/v1/openclaw_windows/instances/`, undefined, {
|
|
110
|
+
headers: {
|
|
111
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
112
|
+
}
|
|
113
|
+
}).then((data)=>data.map(transferSkillOpenclawWindowsInstanceApi2SkillOpenclawWindowsInstance));
|
|
114
|
+
// 查询 Windows 云桌面实例安装状态
|
|
115
|
+
const getSkillOpenclawWindowsInstancesStatus = (data)=>fetch.post(`${apiPrefix}/skill/v1/openclaw_windows/check_install_on_instances/`, transferSkillOpenclawWindowsInstanceStatusParam2SkillOpenclawWindowsInstanceStatusParamApi(data), {
|
|
116
|
+
headers: {
|
|
117
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
118
|
+
}
|
|
119
|
+
}).then(transferSkillOpenclawWindowsInstanceStatusMapApi2SkillOpenclawWindowsInstanceStatusMap);
|
|
120
|
+
// 发起 Skill Windows 云桌面安装任务
|
|
121
|
+
const installSkillToOpenclawWindows = (data)=>fetch.post(`${apiPrefix}/skill/v1/openclaw_windows/install/`, transferSkillOpenclawWindowsInstallParam2SkillOpenclawWindowsInstallParamApi(data), {
|
|
122
|
+
headers: {
|
|
123
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
124
|
+
}
|
|
125
|
+
}).then(transferSkillOpenclawWindowsInstallTasksApi2SkillOpenclawWindowsInstallTasks);
|
|
126
|
+
// 查询 Skill Windows 云桌面安装任务状态
|
|
127
|
+
const getSkillOpenclawWindowsInstallTasksStatus = withAbort((signal, data)=>fetch.post(`${apiPrefix}/skill/v1/openclaw_windows/install_tasks_status/`, transferSkillOpenclawWindowsInstallTaskStatusParam2SkillOpenclawWindowsInstallTaskStatusParamApi(data), {
|
|
128
|
+
headers: {
|
|
129
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
130
|
+
},
|
|
131
|
+
signal
|
|
132
|
+
}));
|
|
133
|
+
// 获取 Skill 构建日志
|
|
134
|
+
const getSkillBuildLog = withAbort((signal, id, version)=>fetch.get(`${apiPrefix}/skill/v1/skill/${id}/build_log/`, {
|
|
135
|
+
version
|
|
136
|
+
}, {
|
|
137
|
+
headers: {
|
|
138
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
139
|
+
},
|
|
140
|
+
signal
|
|
141
|
+
}).then(transferSkillBuildLogApi2SkillBuildLog));
|
|
101
142
|
return {
|
|
102
143
|
getSkillList,
|
|
103
144
|
getSkillCount,
|
|
@@ -105,6 +146,12 @@ export const useSkillHttp = (apiPrefix, spaceId)=>{
|
|
|
105
146
|
deleteSkill,
|
|
106
147
|
downloadSkill,
|
|
107
148
|
restoreSkill,
|
|
108
|
-
getSkillInstallGuide
|
|
149
|
+
getSkillInstallGuide,
|
|
150
|
+
getSkillInstallTargets,
|
|
151
|
+
getSkillOpenclawWindowsInstances,
|
|
152
|
+
getSkillOpenclawWindowsInstancesStatus,
|
|
153
|
+
installSkillToOpenclawWindows,
|
|
154
|
+
getSkillOpenclawWindowsInstallTasksStatus,
|
|
155
|
+
getSkillBuildLog
|
|
109
156
|
};
|
|
110
157
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useReferenceDoc } from './use-reference-doc.ts.js';
|
|
2
2
|
import { useThink } from './use-think.ts.js';
|
|
3
|
-
import '../css/
|
|
3
|
+
import '../css/g-utilities.css';
|
|
4
4
|
import '../css/style.css';
|
|
5
5
|
import '../css/iconcool.js';
|
|
6
6
|
import 'tippy.js/dist/tippy.css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { IFetchConfig } from '@/http/fetch';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IToolsParam } from '@/types';
|
|
4
4
|
export declare const useToolHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
|
|
5
5
|
deleteTool: (id: number) => Promise<null>;
|
|
6
6
|
restoreTool: (id: number) => Promise<unknown>;
|
|
@@ -8,6 +8,9 @@ export declare const useToolHttp: (apiPrefix: string, spaceId?: Ref<string>) =>
|
|
|
8
8
|
(param: IToolsParam, config?: IFetchConfig): Promise<import("@/types").IPaginationResponse<import("@/types").ITool>>;
|
|
9
9
|
abort(): void;
|
|
10
10
|
};
|
|
11
|
-
getToolCount:
|
|
11
|
+
getToolCount: {
|
|
12
|
+
(param: import("@/types").IBaseCountParam): Promise<import("@/types").IResourceCount[]>;
|
|
13
|
+
abort(): void;
|
|
14
|
+
};
|
|
12
15
|
getToolReferringAgents: (toolId: number) => Promise<import("@/types").IReferringAgent[]>;
|
|
13
16
|
};
|
|
@@ -74,11 +74,12 @@ export const useToolHttp = (apiPrefix, spaceId)=>{
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
// 获取 tool 数量
|
|
77
|
-
const getToolCount = (param)=>fetch.post(`${apiPrefix}/tool/v1/tool/count/`, transferToolCount2ToolCountApi(param), {
|
|
77
|
+
const getToolCount = withAbort((signal, param)=>fetch.post(`${apiPrefix}/tool/v1/tool/count/`, transferToolCount2ToolCountApi(param), {
|
|
78
78
|
headers: {
|
|
79
79
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
80
|
-
}
|
|
81
|
-
|
|
80
|
+
},
|
|
81
|
+
signal
|
|
82
|
+
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
82
83
|
// 获取引用该工具的智能体列表
|
|
83
84
|
const getToolReferringAgents = (toolId)=>fetch.get(`${apiPrefix}/tool/v1/tool/${toolId}/referring_agents/`, undefined, {
|
|
84
85
|
headers: {
|
package/dist/hooks.d.ts
CHANGED
package/dist/hooks.ts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAgent, IAgentApi, IAgentCommand, IAgentCommandApi, IAgentCountParam, IAgentCountParamApi, IAgentForm, IAgentFormApi, IAgentInfo, IAgentInfoApi, IAgentListParam, IAgentListParamApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
|
|
1
|
+
import type { IAgent, IAgentApi, IAgentApigwMcpPermission, IAgentApigwMcpPermissionApi, IAgentCommand, IAgentCommandApi, IAgentCountParam, IAgentCountParamApi, IAgentForm, IAgentFormApi, IAgentInfo, IAgentInfoApi, IAgentListParam, IAgentListParamApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
|
|
2
2
|
/**
|
|
3
3
|
* 转换agentapi为agent
|
|
4
4
|
* @param data IAgentInfoApi
|
|
@@ -53,4 +53,11 @@ export declare const transferAgentListParam2AgentListParamApi: (data: IAgentList
|
|
|
53
53
|
* @returns IResourceApplyApi[]
|
|
54
54
|
*/
|
|
55
55
|
export declare const transferResourceApply2ResourceApplyApi: (data: IResourceApply[]) => IResourceApplyApi[];
|
|
56
|
+
export declare const transferResourceApplyApi2ResourceApply: (data: IResourceApplyApi[]) => IResourceApply[];
|
|
56
57
|
export declare const transferAgentCount2AgentCountApi: (data: IAgentCountParam) => IAgentCountParamApi;
|
|
58
|
+
/**
|
|
59
|
+
* 接口转换为ui使用
|
|
60
|
+
* @param data IAgentApigwMcpPermissionApi
|
|
61
|
+
* @returns IAgentApigwMcpPermission
|
|
62
|
+
*/
|
|
63
|
+
export declare const transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission: (data: IAgentApigwMcpPermissionApi) => IAgentApigwMcpPermission;
|
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import {
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon, transferVariable2VariableApi, transferVariableApi2Variable } from './common.ts.js';
|
|
54
54
|
import { transferKnowledge, transferKnowledgeApi, transferKnowledgebase, transferKnowledgebaseApi, transferKnowledgeQuerySetting, transferKnowledgeQuerySettingApi } from './knowledge.ts.js';
|
|
55
55
|
import { transferMcp2McpApi, transferMcpApi2Mcp } from './mcp.ts.js';
|
|
56
56
|
import { transferSkill2SkillApi, transferSkillApi2Skill } from './skill.ts.js';
|
|
@@ -219,7 +219,8 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
219
219
|
related_skills: data.relatedSkills ? {
|
|
220
220
|
skills: data.relatedSkills.skills.map(transferSkill2SkillApi)
|
|
221
221
|
} : undefined,
|
|
222
|
-
is_bind_credential: data.isBindCredential
|
|
222
|
+
is_bind_credential: data.isBindCredential,
|
|
223
|
+
business_ids: data.businessIds
|
|
223
224
|
});
|
|
224
225
|
};
|
|
225
226
|
/**
|
|
@@ -283,7 +284,8 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
283
284
|
relatedSkills: data.related_skills ? {
|
|
284
285
|
skills: (_data_related_skills_skills = data.related_skills.skills) === null || _data_related_skills_skills === void 0 ? void 0 : _data_related_skills_skills.map(transferSkillApi2Skill)
|
|
285
286
|
} : undefined,
|
|
286
|
-
isBindCredential: data.is_bind_credential
|
|
287
|
+
isBindCredential: data.is_bind_credential,
|
|
288
|
+
businessIds: data.business_ids
|
|
287
289
|
});
|
|
288
290
|
};
|
|
289
291
|
/**
|
|
@@ -363,10 +365,26 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
363
365
|
resource_type: item.resourceType,
|
|
364
366
|
resource_code: item.resourceCode
|
|
365
367
|
}));
|
|
368
|
+
export const transferResourceApplyApi2ResourceApply = (data)=>data.map((item)=>({
|
|
369
|
+
resourceType: item.resource_type,
|
|
370
|
+
resourceCode: item.resource_code,
|
|
371
|
+
status: item.status
|
|
372
|
+
}));
|
|
366
373
|
export const transferAgentCount2AgentCountApi = (data)=>{
|
|
367
|
-
return _object_spread_props(_object_spread({},
|
|
374
|
+
return _object_spread_props(_object_spread({}, transferBaseCountParam2BaseCountParamApi(data)), {
|
|
368
375
|
exclude_agent_id: data.excludeAgentId,
|
|
369
376
|
agent_type: data.agentType,
|
|
370
377
|
is_published: data.isPublished
|
|
371
378
|
});
|
|
372
379
|
};
|
|
380
|
+
/**
|
|
381
|
+
* 接口转换为ui使用
|
|
382
|
+
* @param data IAgentApigwMcpPermissionApi
|
|
383
|
+
* @returns IAgentApigwMcpPermission
|
|
384
|
+
*/ export const transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission = (data)=>({
|
|
385
|
+
hasPermission: data.has_permission,
|
|
386
|
+
mcpCode: data.mcp_code,
|
|
387
|
+
mcpName: data.mcp_name,
|
|
388
|
+
url: data.url,
|
|
389
|
+
protocolType: data.protocol_type
|
|
390
|
+
});
|
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import {
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferVariableApi2Variable } from './common.ts.js';
|
|
54
54
|
/**
|
|
55
55
|
* ui转换为接口使用
|
|
56
56
|
* @param data ICollectionListParam
|
|
@@ -101,5 +101,5 @@ import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationPar
|
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
103
|
export const transferCollectionCount2CollectionCountApi = (data)=>{
|
|
104
|
-
return
|
|
104
|
+
return transferBaseCountParam2BaseCountParamApi(data);
|
|
105
105
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ResourceStatus } from '@/enums';
|
|
1
2
|
import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IPaginationResponse, IPaginationResponseApi, IReferringAgent, IReferringAgentApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceCount, IResourceCountApi, IResourceFormCommon, IResourceFormCommonApi, IResourceReference, IResourceReferenceApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi, IVariable, IVariableApi } from '@/types/common';
|
|
2
3
|
/**
|
|
3
4
|
* 接口转换为ui使用
|
|
@@ -40,13 +41,13 @@ export declare const transferResourceFormCommon2ResourceFormCommonApi: (data: IR
|
|
|
40
41
|
* @param data IResourceCommonApi
|
|
41
42
|
* @returns IResourceCommon
|
|
42
43
|
*/
|
|
43
|
-
export declare const transferResourceCommonApi2ResourceCommon: (data: IResourceCommonApi) => IResourceCommon
|
|
44
|
+
export declare const transferResourceCommonApi2ResourceCommon: <T = ResourceStatus>(data: IResourceCommonApi<T>) => IResourceCommon<T>;
|
|
44
45
|
/**
|
|
45
46
|
* ui转换为接口使用(完整资源)
|
|
46
47
|
* @param data IResourceCommon
|
|
47
48
|
* @returns IResourceCommonApi
|
|
48
49
|
*/
|
|
49
|
-
export declare const transferResourceCommon2ResourceCommonApi: (data: IResourceCommon) => IResourceCommonApi
|
|
50
|
+
export declare const transferResourceCommon2ResourceCommonApi: <T = ResourceStatus>(data: IResourceCommon<T>) => IResourceCommonApi<T>;
|
|
50
51
|
/**
|
|
51
52
|
* 分页接口响应转换为ui使用,通过传入的转换函数逐项转换列表数据
|
|
52
53
|
* @param transferItem 单项转换函数,将接口类型 A 转换为ui类型 U
|
|
@@ -56,7 +57,7 @@ export declare const transferPaginationResponseApi2PaginationResponse: <A, U>(tr
|
|
|
56
57
|
export declare const transferVariableApi2Variable: (data: IVariableApi) => IVariable;
|
|
57
58
|
export declare const transferVariable2VariableApi: (data: IVariable) => IVariableApi;
|
|
58
59
|
export declare const transferResourceCommonSearchParams2ResourceCommonSearchParamsApi: (data: IResourceCommonSearchParams) => IResourceCommonSearchParamsApi;
|
|
59
|
-
export declare const
|
|
60
|
+
export declare const transferBaseCountParam2BaseCountParamApi: (data: IBaseCountParam) => IBaseCountParamApi;
|
|
60
61
|
export declare const transferResourceCountApi2ResourceCount: (data: IResourceCountApi) => IResourceCount;
|
|
61
62
|
export declare const transferReferringAgentApi2ReferringAgent: (data: IReferringAgentApi) => IReferringAgent;
|
|
62
63
|
export declare const transferIResourceReferenceApi2IResourceReference: (data: IResourceReferenceApi) => IResourceReference;
|
|
@@ -123,9 +123,8 @@ export const transferResourceCommonSearchParams2ResourceCommonSearchParamsApi =
|
|
|
123
123
|
group_type: data.groupType
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
|
-
export const
|
|
126
|
+
export const transferBaseCountParam2BaseCountParamApi = (data)=>{
|
|
127
127
|
return {
|
|
128
|
-
space_ids: data.spaceIds,
|
|
129
128
|
with_private: data.withPrivate,
|
|
130
129
|
can_apply: data.canApply,
|
|
131
130
|
space_name: data.spaceName,
|
|
@@ -136,6 +135,7 @@ export const transferBaseCount2BaseCountApi = (data)=>{
|
|
|
136
135
|
export const transferResourceCountApi2ResourceCount = (data)=>{
|
|
137
136
|
return {
|
|
138
137
|
spaceId: data.space_id,
|
|
138
|
+
spaceName: data.space_name,
|
|
139
139
|
count: data.count
|
|
140
140
|
};
|
|
141
141
|
};
|
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import {
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi } from './common.ts.js';
|
|
54
54
|
import { mergeStringWithoutLastSlash, mergeStringWithoutLeadingSlash } from '../../common/util.ts.js';
|
|
55
55
|
import { transferResourcePermissionApi2ResourcePermission } from './permission.ts.js';
|
|
56
56
|
/**
|
|
@@ -327,7 +327,6 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
327
327
|
});
|
|
328
328
|
export const transferKnowledgeCount2KnowledgeCountApi = (data)=>{
|
|
329
329
|
return {
|
|
330
|
-
space_ids: data.spaceIds,
|
|
331
330
|
with_private: data.withPrivate,
|
|
332
331
|
space_name: data.spaceName,
|
|
333
332
|
group_type: data.groupType,
|
|
@@ -335,5 +334,5 @@ export const transferKnowledgeCount2KnowledgeCountApi = (data)=>{
|
|
|
335
334
|
};
|
|
336
335
|
};
|
|
337
336
|
export const transferKnowledgebaseCount2KnowledgebaseCountApi = (data)=>{
|
|
338
|
-
return
|
|
337
|
+
return transferBaseCountParam2BaseCountParamApi(data);
|
|
339
338
|
};
|
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import {
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon } from './common.ts.js';
|
|
54
54
|
/**
|
|
55
55
|
* ui转换为接口使用
|
|
56
56
|
* @param data IMcpListParam
|
|
@@ -217,7 +217,7 @@ import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationPar
|
|
|
217
217
|
}))
|
|
218
218
|
});
|
|
219
219
|
export const transferMcpCount2McpCountApi = (data)=>{
|
|
220
|
-
return _object_spread_props(_object_spread({},
|
|
220
|
+
return _object_spread_props(_object_spread({}, transferBaseCountParam2BaseCountParamApi(data)), {
|
|
221
221
|
with_apigw_mcp: data.withApigwMcp
|
|
222
222
|
});
|
|
223
223
|
};
|
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import {
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommonApi2ResourceFormCommon, transferVariableApi2Variable } from './common.ts.js';
|
|
54
54
|
/**
|
|
55
55
|
* 接口转换为ui使用(表单字段)
|
|
56
56
|
* @param data IPromptFormApi
|
|
@@ -100,5 +100,5 @@ import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationPar
|
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
102
|
export const transferPromptCount2PromptCountApi = (data)=>{
|
|
103
|
-
return
|
|
103
|
+
return transferBaseCountParam2BaseCountParamApi(data);
|
|
104
104
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ISkill, ISkillApi, ISkillCountParam, ISkillCountParamApi, ISkillForm, ISkillFormApi, ISkillListParam, ISkillListParamApi } from '@/types/skill';
|
|
1
|
+
import type { ISkill, ISkillApi, ISkillBuildLog, ISkillBuildLogApi, ISkillCountParam, ISkillCountParamApi, ISkillForm, ISkillFormApi, ISkillInstallTarget, ISkillInstallTargetApi, ISkillListParam, ISkillListParamApi, ISkillOpenclawWindowsInstallParam, ISkillOpenclawWindowsInstallParamApi, ISkillOpenclawWindowsInstallTasks, ISkillOpenclawWindowsInstallTasksApi, ISkillOpenclawWindowsInstallTaskStatusParam, ISkillOpenclawWindowsInstallTaskStatusParamApi, ISkillOpenclawWindowsInstance, ISkillOpenclawWindowsInstanceApi, ISkillOpenclawWindowsInstanceStatusMap, ISkillOpenclawWindowsInstanceStatusMapApi, ISkillOpenclawWindowsInstanceStatusParam, ISkillOpenclawWindowsInstanceStatusParamApi } from '@/types/skill';
|
|
2
2
|
/**
|
|
3
3
|
* ui转换为接口使用(表单字段)
|
|
4
4
|
* @param data ISkillForm
|
|
@@ -24,9 +24,23 @@ export declare const transferSkillApi2Skill: (data: ISkillApi) => ISkill;
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const transferSkill2SkillApi: (data: ISkill) => ISkillApi;
|
|
26
26
|
export declare const transferSkillCount2SkillCountApi: (data: ISkillCountParam) => ISkillCountParamApi;
|
|
27
|
+
/**
|
|
28
|
+
* 接口转换为ui使用(构建日志)
|
|
29
|
+
* @param data ISkillBuildLogApi
|
|
30
|
+
* @returns ISkillBuildLog
|
|
31
|
+
*/
|
|
32
|
+
export declare const transferSkillBuildLogApi2SkillBuildLog: (data: ISkillBuildLogApi) => ISkillBuildLog;
|
|
27
33
|
/**
|
|
28
34
|
* ui转换为接口使用
|
|
29
35
|
* @param data ISkillListParam
|
|
30
36
|
* @returns ISkillListParamApi
|
|
31
37
|
*/
|
|
32
38
|
export declare const transferSkillParam2SkillParamApi: (data: ISkillListParam) => ISkillListParamApi;
|
|
39
|
+
export declare const transferSkillInstallTargetApi2SkillInstallTarget: (data: ISkillInstallTargetApi) => ISkillInstallTarget;
|
|
40
|
+
export declare const transferSkillOpenclawWindowsInstanceApi2SkillOpenclawWindowsInstance: (data: ISkillOpenclawWindowsInstanceApi) => ISkillOpenclawWindowsInstance;
|
|
41
|
+
export declare const transferSkillOpenclawWindowsInstance2SkillOpenclawWindowsInstanceApi: (data: ISkillOpenclawWindowsInstance) => ISkillOpenclawWindowsInstanceApi;
|
|
42
|
+
export declare const transferSkillOpenclawWindowsInstallParam2SkillOpenclawWindowsInstallParamApi: (data: ISkillOpenclawWindowsInstallParam) => ISkillOpenclawWindowsInstallParamApi;
|
|
43
|
+
export declare const transferSkillOpenclawWindowsInstallTasksApi2SkillOpenclawWindowsInstallTasks: (data: ISkillOpenclawWindowsInstallTasksApi) => ISkillOpenclawWindowsInstallTasks;
|
|
44
|
+
export declare const transferSkillOpenclawWindowsInstallTaskStatusParam2SkillOpenclawWindowsInstallTaskStatusParamApi: (data: ISkillOpenclawWindowsInstallTaskStatusParam) => ISkillOpenclawWindowsInstallTaskStatusParamApi;
|
|
45
|
+
export declare const transferSkillOpenclawWindowsInstanceStatusParam2SkillOpenclawWindowsInstanceStatusParamApi: (data: ISkillOpenclawWindowsInstanceStatusParam) => ISkillOpenclawWindowsInstanceStatusParamApi;
|
|
46
|
+
export declare const transferSkillOpenclawWindowsInstanceStatusMapApi2SkillOpenclawWindowsInstanceStatusMap: (data: ISkillOpenclawWindowsInstanceStatusMapApi) => ISkillOpenclawWindowsInstanceStatusMap;
|