@blueking/ai-ui-sdk 0.3.0-beta.9 → 0.4.1-beta.1

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.
Files changed (280) hide show
  1. package/dist/common/constants.d.ts +1 -0
  2. package/dist/common/constants.ts.js +1 -0
  3. package/dist/common/util.d.ts +7 -1
  4. package/dist/common/util.ts.js +64 -11
  5. package/dist/components/render-agent/agent-share.script.vue.js.js +1 -1
  6. package/dist/components/render-agent/agent-type.vue.css +3 -3
  7. package/dist/components/render-agent/agent-type.vue.js +1 -1
  8. package/dist/components/render-auth/auth-dialog.script.vue.js.js +1 -1
  9. package/dist/components/render-auto-height-textarea/index.script.vue.js.js +3 -2
  10. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  11. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  12. package/dist/components/render-auto-refresh/index.script.vue.js.js +2 -2
  13. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  14. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  15. package/dist/components/render-card/agent/actions.script.vue.js.js +53 -52
  16. package/dist/components/render-card/agent/actions.vue.d.ts +0 -2
  17. package/dist/components/render-card/agent/index.script.vue.js.js +3 -3
  18. package/dist/components/render-card/agent/index.vue.d.ts +1 -1
  19. package/dist/components/render-card/agent/prefix-info-tool.script.vue.js.js +1 -1
  20. package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
  21. package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
  22. package/dist/components/render-card/agent-command/info-tool.script.vue.js.js +4 -4
  23. package/dist/components/render-card/agent-command/name-suffix.script.vue.js.js +20 -47
  24. package/dist/components/render-card/base/application-base-actions.script.vue.js.js +1 -1
  25. package/dist/components/render-card/base/application-base-actions.vue.d.ts +2 -2
  26. package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +209 -0
  27. package/dist/components/render-card/base/approval-strategy-popover.vue.d.ts +19 -0
  28. package/dist/components/render-card/base/approval-strategy-popover.vue.js +3 -0
  29. package/dist/components/render-card/base/reference-icon.script.vue.js.js +13 -6
  30. package/dist/components/render-card/base.script.vue.js +13 -6
  31. package/dist/components/render-card/base.vue.css +12 -12
  32. package/dist/components/render-card/base.vue.d.ts +4 -2
  33. package/dist/components/render-card/base.vue.js +1 -1
  34. package/dist/components/render-card/knowledge/index.vue.d.ts +1 -1
  35. package/dist/components/render-card/knowledge/info-tool.script.vue.js.js +2 -2
  36. package/dist/components/render-card/knowledgebase/index.vue.d.ts +1 -1
  37. package/dist/components/render-card/knowledgebase/info-tool.script.vue.js.js +1 -1
  38. package/dist/components/render-card/llm/actions.script.vue.js.js +2 -5
  39. package/dist/components/render-card/llm/actions.vue.d.ts +0 -2
  40. package/dist/components/render-card/llm/corner-badge.script.vue.js +1 -1
  41. package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
  42. package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
  43. package/dist/components/render-card/llm/icons.script.vue.js.js +7 -9
  44. package/dist/components/render-card/llm/icons.vue.css +2 -2
  45. package/dist/components/render-card/llm/icons.vue.js +1 -1
  46. package/dist/components/render-card/llm/index.script.vue.js.js +25 -4
  47. package/dist/components/render-card/llm/index.vue.d.ts +4 -1
  48. package/dist/components/render-card/llm/info.script.vue.js.js +4 -3
  49. package/dist/components/render-card/llm/info.vue.css +1 -1
  50. package/dist/components/render-card/llm/info.vue.js +1 -1
  51. package/dist/components/render-card/llm/tag-prefix.vue.css +3 -3
  52. package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
  53. package/dist/components/render-card/mcp/actions.script.vue.js.js +11 -7
  54. package/dist/components/render-card/mcp/actions.vue.d.ts +0 -2
  55. package/dist/components/render-card/mcp/index.script.vue.js.js +24 -5
  56. package/dist/components/render-card/mcp/index.vue.d.ts +6 -3
  57. package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
  58. package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
  59. package/dist/components/render-card/mcp/prefix-info-tool.script.vue.js.js +1 -1
  60. package/dist/components/render-card/mcp/selected-tools-info.script.vue.js.js +156 -0
  61. package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +26 -0
  62. package/dist/components/render-card/mcp/selected-tools-info.vue.js +3 -0
  63. package/dist/components/render-card/prompt/icons.script.vue.js.js +1 -1
  64. package/dist/components/render-card/prompt/icons.vue.css +1 -1
  65. package/dist/components/render-card/prompt/icons.vue.js +1 -1
  66. package/dist/components/render-card/prompt/index.vue.d.ts +1 -1
  67. package/dist/components/render-card/role/index.vue.d.ts +2 -2
  68. package/dist/components/render-card/skill/index.script.vue.js.js +28 -6
  69. package/dist/components/render-card/skill/index.vue.d.ts +4 -2
  70. package/dist/components/render-card/skill/prefix-info-tool.script.vue.js +112 -0
  71. package/dist/components/render-card/skill/prefix-info-tool.vue.d.ts +12 -0
  72. package/dist/components/render-card/skill/prefix-info-tool.vue.js +3 -0
  73. package/dist/components/render-card/skill/tag-prefix.script.vue.js.js +5 -5
  74. package/dist/components/render-card/skill/tag-prefix.vue.css +3 -3
  75. package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
  76. package/dist/components/render-card/tool/actions.script.vue.js.js +2 -5
  77. package/dist/components/render-card/tool/actions.vue.d.ts +0 -2
  78. package/dist/components/render-card/tool/index.script.vue.js.js +15 -8
  79. package/dist/components/render-card/tool/index.vue.d.ts +5 -2
  80. package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +70 -20
  81. package/dist/components/render-card/tool/prefix-info-tool.vue.d.ts +4 -0
  82. package/dist/components/render-checkbox/index.vue.css +9 -9
  83. package/dist/components/render-checkbox/index.vue.js +1 -1
  84. package/dist/components/render-choose-tag/index.script.vue.js.js +7 -2
  85. package/dist/components/render-choose-tag/index.vue.css +7 -7
  86. package/dist/components/render-choose-tag/index.vue.js +1 -1
  87. package/dist/components/render-collapse/index.script.vue.js.js +2 -2
  88. package/dist/components/render-collapse/index.vue.css +2 -2
  89. package/dist/components/render-collapse/index.vue.js +1 -1
  90. package/dist/components/render-collection/actions/index.script.vue.js.js +1 -1
  91. package/dist/components/render-collection/actions/index.vue.d.ts +2 -2
  92. package/dist/components/render-collection/content/index.vue.css +4 -4
  93. package/dist/components/render-collection/content/index.vue.js +1 -1
  94. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
  95. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  96. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
  97. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
  98. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  99. package/dist/components/render-dataset/components/dataset-data-valid/index.script.vue.js.js +1 -1
  100. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
  101. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
  102. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  103. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  104. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  105. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  106. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  107. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  108. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  109. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  110. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +1 -1
  111. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -5
  112. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  113. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  114. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  115. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  116. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  117. package/dist/components/render-dataset/components/plus-dataset-data/form/index.script.vue.js.js +1 -1
  118. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -4
  119. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  120. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  121. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  122. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +1 -1
  123. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  124. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  125. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  126. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  127. package/dist/components/render-dataset-list/index.vue.css +2 -2
  128. package/dist/components/render-dataset-list/index.vue.js +1 -1
  129. package/dist/components/render-dialog/choose-footer.script.vue.js.js +75 -8
  130. package/dist/components/render-dialog/choose-resource.script.vue.js +1 -3
  131. package/dist/components/render-dialog/choose-resource.vue.css +3 -3
  132. package/dist/components/render-dialog/choose-resource.vue.d.ts +3 -2
  133. package/dist/components/render-dialog/choose-resource.vue.js +1 -1
  134. package/dist/components/render-dialog/choose-result.vue.css +14 -14
  135. package/dist/components/render-dialog/choose-result.vue.js +1 -1
  136. package/dist/components/render-dialog/choose-space.script.vue.js.js +81 -102
  137. package/dist/components/render-dialog/choose-space.vue.css +11 -8
  138. package/dist/components/render-dialog/choose-space.vue.d.ts +4 -4
  139. package/dist/components/render-dialog/choose-space.vue.js +1 -1
  140. package/dist/components/render-dialog/index.script.vue.js +63 -45
  141. package/dist/components/render-dialog/index.vue.css +6 -6
  142. package/dist/components/render-dialog/index.vue.js +1 -1
  143. package/dist/components/render-file-card/index.vue.css +11 -11
  144. package/dist/components/render-file-card/index.vue.d.ts +1 -1
  145. package/dist/components/render-file-card/index.vue.js +1 -1
  146. package/dist/components/render-file-type-icon/index.script.vue.js.js +2 -1
  147. package/dist/components/render-file-type-icon/index.vue.css +8 -5
  148. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  149. package/dist/components/render-generate-tag/index.script.vue.js.js +3 -3
  150. package/dist/components/render-generate-tag/index.vue.css +5 -5
  151. package/dist/components/render-generate-tag/index.vue.js +1 -1
  152. package/dist/components/render-header/index.script.vue.js.js +1 -1
  153. package/dist/components/render-header/index.vue.css +3 -3
  154. package/dist/components/render-header/index.vue.js +1 -1
  155. package/dist/components/render-knowledge/icon/index.script.vue.js.js +3 -3
  156. package/dist/components/render-knowledge/icon/index.vue.css +1 -1
  157. package/dist/components/render-knowledge/icon/index.vue.js +1 -1
  158. package/dist/components/render-knowledge/search/index.vue.d.ts +1 -1
  159. package/dist/components/render-knowledgebase/search/index.vue.d.ts +1 -1
  160. package/dist/components/render-like/index.vue.css +5 -5
  161. package/dist/components/render-like/index.vue.js +1 -1
  162. package/dist/components/render-markdown/edit.ts.js +20 -20
  163. package/dist/components/render-markdown/filter-css.d.ts +1 -0
  164. package/dist/components/render-markdown/filter-css.ts.js +96 -0
  165. package/dist/components/render-markdown/view.postcss.css +5 -5
  166. package/dist/components/render-markdown/view.ts.js +5 -91
  167. package/dist/components/render-mcp/install/index.script.vue.js.js +72 -38
  168. package/dist/components/render-mcp/install/index.vue.d.ts +4 -2
  169. package/dist/components/render-mcp/install/install-guide.script.vue.js.js +60 -0
  170. package/dist/components/render-mcp/install/install-guide.vue.d.ts +11 -0
  171. package/dist/components/render-mcp/install/install-guide.vue.js +3 -0
  172. package/dist/components/render-permission-tag/index.script.vue.js +2 -2
  173. package/dist/components/render-prompt/actions/index.script.vue.js.js +1 -1
  174. package/dist/components/render-prompt/content/index.vue.css +1 -1
  175. package/dist/components/render-prompt/content/index.vue.js +1 -1
  176. package/dist/components/render-reference/index.vue.css +2 -2
  177. package/dist/components/render-reference/index.vue.js +1 -1
  178. package/dist/components/render-relate-agent/index.script.vue.js +591 -0
  179. package/dist/components/render-relate-agent/index.vue.d.ts +5 -5
  180. package/dist/components/render-relate-agent/index.vue.js +1 -1
  181. package/dist/components/render-resource-info/index.script.vue.js +7 -2
  182. package/dist/components/render-resource-info/index.vue.d.ts +1 -0
  183. package/dist/components/render-resource-version/index.vue.css +2 -2
  184. package/dist/components/render-resource-version/index.vue.js +1 -1
  185. package/dist/components/render-router-tab/index.vue.css +3 -3
  186. package/dist/components/render-router-tab/index.vue.js +1 -1
  187. package/dist/components/render-search-empty/index.vue.d.ts +1 -1
  188. package/dist/components/render-search-select/index.script.vue.js.js +31 -12
  189. package/dist/components/render-search-select/index.vue.d.ts +3 -1
  190. package/dist/components/render-select-plus-extension/index.script.vue.js.js +1 -1
  191. package/dist/components/render-select-plus-extension/index.vue.css +3 -3
  192. package/dist/components/render-select-plus-extension/index.vue.js +1 -1
  193. package/dist/components/render-skill/actions/index.script.vue.js.js +73 -39
  194. package/dist/components/render-skill/actions/index.vue.d.ts +0 -2
  195. package/dist/components/render-skill/icons/index.script.vue.js.js +1 -1
  196. package/dist/components/render-skill/install/index.script.vue.js.js +290 -30
  197. package/dist/components/render-skill/install/install-guide.script.vue.js.js +58 -0
  198. package/dist/components/render-skill/install/install-guide.vue.d.ts +10 -0
  199. package/dist/components/render-skill/install/install-guide.vue.js +3 -0
  200. package/dist/components/render-skill/install/openclaw-windows-instances.script.vue.js.js +147 -0
  201. package/dist/components/render-skill/install/openclaw-windows-instances.vue.d.ts +14 -0
  202. package/dist/components/render-skill/install/openclaw-windows-instances.vue.js +3 -0
  203. package/dist/components/render-skill/variable-form/index.script.vue.js +114 -0
  204. package/dist/components/render-skill/variable-form/index.vue.d.ts +15 -0
  205. package/dist/components/render-skill/variable-form/index.vue.js +3 -0
  206. package/dist/components/render-t-table/index.script.vue.js +3 -3
  207. package/dist/components/render-t-table/index.vue.css +27 -28
  208. package/dist/components/render-t-table/index.vue.d.ts +1 -1
  209. package/dist/components/render-t-table/index.vue.js +1 -1
  210. package/dist/components/render-tag-tree/index.vue.css +7 -7
  211. package/dist/components/render-tag-tree/index.vue.js +1 -1
  212. package/dist/components/render-tags/index.vue.css +6 -6
  213. package/dist/components/render-tags/index.vue.js +1 -1
  214. package/dist/components/render-tree/index.vue.d.ts +1 -1
  215. package/dist/components.d.ts +3 -1
  216. package/dist/components.ts.js +3 -1
  217. package/dist/css/fonts/iconcool.eot +0 -0
  218. package/dist/css/fonts/iconcool.svg +102 -0
  219. package/dist/css/fonts/iconcool.ttf +0 -0
  220. package/dist/css/fonts/iconcool.woff +0 -0
  221. package/dist/css/g-utilities.css +285 -2
  222. package/dist/css/g-utilities.manifest.json +60 -1
  223. package/dist/css/iconcool.js +1 -1
  224. package/dist/css/style.css +102 -0
  225. package/dist/hooks/use-agent-http.d.ts +7 -2
  226. package/dist/hooks/use-agent-http.ts.js +17 -6
  227. package/dist/hooks/use-chat.d.ts +4 -0
  228. package/dist/hooks/use-click-proxy.ts.js +1 -3
  229. package/dist/hooks/use-clickoutside.d.ts +3 -0
  230. package/dist/hooks/use-clickoutside.ts.js +28 -0
  231. package/dist/hooks/use-collection-http.d.ts +5 -2
  232. package/dist/hooks/use-collection-http.ts.js +4 -3
  233. package/dist/hooks/use-dataset-http.ts.js +2 -2
  234. package/dist/hooks/use-knowledge-http.d.ts +9 -3
  235. package/dist/hooks/use-knowledge-http.ts.js +8 -6
  236. package/dist/hooks/use-mcp-http.d.ts +9 -2
  237. package/dist/hooks/use-mcp-http.ts.js +20 -5
  238. package/dist/hooks/use-prompt-http.d.ts +5 -2
  239. package/dist/hooks/use-prompt-http.ts.js +4 -3
  240. package/dist/hooks/use-scroll-load.d.ts +3 -1
  241. package/dist/hooks/use-scroll-load.ts.js +12 -2
  242. package/dist/hooks/use-skill-http.d.ts +21 -6
  243. package/dist/hooks/use-skill-http.ts.js +53 -6
  244. package/dist/hooks/use-space-http.d.ts +2 -1
  245. package/dist/hooks/use-space-http.ts.js +7 -1
  246. package/dist/hooks/use-tool-http.d.ts +5 -2
  247. package/dist/hooks/use-tool-http.ts.js +4 -3
  248. package/dist/hooks.d.ts +1 -0
  249. package/dist/hooks.ts.js +1 -0
  250. package/dist/http/helper/agent.d.ts +20 -1
  251. package/dist/http/helper/agent.ts.js +47 -6
  252. package/dist/http/helper/collection.ts.js +2 -2
  253. package/dist/http/helper/common.d.ts +17 -4
  254. package/dist/http/helper/common.ts.js +18 -2
  255. package/dist/http/helper/dataset.ts.js +1 -0
  256. package/dist/http/helper/knowledge.ts.js +2 -3
  257. package/dist/http/helper/mcp.d.ts +3 -1
  258. package/dist/http/helper/mcp.ts.js +17 -7
  259. package/dist/http/helper/model.ts.js +4 -1
  260. package/dist/http/helper/prompt.ts.js +2 -2
  261. package/dist/http/helper/skill.d.ts +16 -1
  262. package/dist/http/helper/skill.ts.js +76 -5
  263. package/dist/http/helper/space.d.ts +13 -1
  264. package/dist/http/helper/space.ts.js +24 -0
  265. package/dist/http/helper/tool.ts.js +4 -4
  266. package/dist/types/agent.d.ts +34 -0
  267. package/dist/types/common.d.ts +15 -7
  268. package/dist/types/dataset.d.ts +4 -0
  269. package/dist/types/enum.d.ts +25 -0
  270. package/dist/types/enum.ts.js +29 -0
  271. package/dist/types/mcp.d.ts +24 -4
  272. package/dist/types/model.d.ts +6 -0
  273. package/dist/types/navigate.d.ts +1 -0
  274. package/dist/types/skill.d.ts +106 -5
  275. package/dist/types/space.d.ts +11 -1
  276. package/dist/types/tool.d.ts +3 -3
  277. package/dist/util.d.ts +1 -0
  278. package/dist/util.ts.js +1 -0
  279. package/package.json +3 -2
  280. package/dist/components/render-relate-agent/index.script.vue.js.js +0 -454
@@ -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 { transferMcpApi2Mcp, transferMcpCount2McpCountApi, transferMcpParam2McpParamApi, transferRegisterMcpParam2RegisterMcpParamApi } from '../http/helper/mcp.ts.js';
54
+ import { transferMcpApi2Mcp, transferMcpCount2McpCountApi, transferMcpInstallGuideParam2McpInstallGuideParamApi, transferMcpInstallTargetApi2McpInstallTarget, transferMcpParam2McpParamApi, transferRegisterMcpParam2RegisterMcpParamApi } from '../http/helper/mcp.ts.js';
55
55
  import { transferPaginationResponseApi2PaginationResponse, transferReferringAgentApi2ReferringAgent, transferResourceCountApi2ResourceCount } from '../transforms.ts.js';
56
56
  export const useMcpHttp = (apiPrefix, spaceId)=>{
57
57
  // 获取 MCP 列表 侧边tab切换 搜索栏搜索
@@ -81,23 +81,38 @@ 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
- }).then((data)=>data.map(transferResourceCountApi2ResourceCount));
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: {
92
93
  'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
93
94
  }
94
95
  }).then((data)=>data.map(transferReferringAgentApi2ReferringAgent));
96
+ // 获取 MCP 安装指南
97
+ const getMcpInstallGuide = (param)=>fetch.get(`${apiPrefix}/mcp/v1/mcp/install_guide/`, transferMcpInstallGuideParam2McpInstallGuideParamApi(param), {
98
+ headers: {
99
+ 'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
100
+ }
101
+ });
102
+ // 获取 MCP 安装目标列表
103
+ const getMcpInstallTargets = ()=>fetch.get(`${apiPrefix}/mcp/v1/mcp/install_targets/`, undefined, {
104
+ headers: {
105
+ 'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
106
+ }
107
+ }).then((data)=>data.map(transferMcpInstallTargetApi2McpInstallTarget));
95
108
  return {
96
109
  getMcpList,
97
110
  deleteMcp,
98
111
  getMcpConfig,
99
112
  restoreMcp,
100
113
  getMcpCount,
101
- getMcpReferringAgents
114
+ getMcpReferringAgents,
115
+ getMcpInstallGuide,
116
+ getMcpInstallTargets
102
117
  };
103
118
  };
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { IFetchConfig } from '@/http/fetch';
3
- import type { IPromptApi, IPromptCountParam, IPromptsParams } from '@/types/prompt';
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: (param: IPromptCountParam) => Promise<import("@/types").IResourceCount[]>;
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
- }).then((data)=>data.map(transferResourceCountApi2ResourceCount));
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, ISkillInstallGuide, 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: (param: ISkillCountParam) => Promise<import("@/types").IResourceCount[]>;
10
- getSkillReferringAgents: (skillId: number) => Promise<import("@/types").IReferringAgent[]>;
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
- getSkillInstallGuide: (id: number) => Promise<{
17
+ getSkillInstallGuide: (id: number, param: ISkillInstallGuide) => 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, transferSkillInstallGuide2SkillInstallGuideApi, 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
- }).then((data)=>data.map(transferResourceCountApi2ResourceCount));
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: {
@@ -93,11 +94,51 @@ export const useSkillHttp = (apiPrefix, spaceId)=>{
93
94
  }
94
95
  }).then(transferSkillApi2Skill);
95
96
  // 获取 Skill 安装指南
96
- const getSkillInstallGuide = (id)=>fetch.get(`${apiPrefix}/skill/v1/skill/${id}/install_guide/`, undefined, {
97
+ const getSkillInstallGuide = (id, param)=>fetch.get(`${apiPrefix}/skill/v1/skill/${id}/install_guide/`, transferSkillInstallGuide2SkillInstallGuideApi(param), {
97
98
  headers: {
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,7 +1,8 @@
1
1
  import { Ref } from 'vue';
2
2
  import { IFetchConfig } from '@/http/fetch';
3
- import { IResourcesRemoveApplication, IUsableSpaceParam } from '@/types/space';
3
+ import { IResourceAuthorizedSpacesParam, IResourcesRemoveApplication, IUsableSpaceParam } from '@/types/space';
4
4
  export declare const useSpaceHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
5
+ getResourceAuthorizedSpaces: (data: IResourceAuthorizedSpacesParam) => Promise<import("@/types/space").ISpace[]>;
5
6
  removeApplyResources: (data: IResourcesRemoveApplication) => Promise<unknown>;
6
7
  getUsableSpaces: {
7
8
  (data: IUsableSpaceParam, config?: IFetchConfig): Promise<import("@/types/space").IUsableSpace[]>;
@@ -51,8 +51,13 @@ 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 { transferResourcesRemoveApplication2ResourcesRemoveApplicationApi, transferUsableSpaceApi2UsableSpace, transferUsableSpaceParam2UsableSpaceParamApi } from '../http/helper/space.ts.js';
54
+ import { transferResourceAuthorizedSpacesParam2ResourceAuthorizedSpacesParamApi, transferResourcesRemoveApplication2ResourcesRemoveApplicationApi, transferSpaceApi2Space, transferUsableSpaceApi2UsableSpace, transferUsableSpaceParam2UsableSpaceParamApi } from '../http/helper/space.ts.js';
55
55
  export const useSpaceHttp = (apiPrefix, spaceId)=>{
56
+ const getResourceAuthorizedSpaces = (data)=>fetch.get(`${apiPrefix}/meta/v1/space/authorized_spaces/`, transferResourceAuthorizedSpacesParam2ResourceAuthorizedSpacesParamApi(data), {
57
+ headers: {
58
+ 'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
59
+ }
60
+ }).then((data)=>data.map(transferSpaceApi2Space));
56
61
  // 移除资源权限
57
62
  const removeApplyResources = (data)=>fetch.post(`${apiPrefix}/meta/v1/space_manage/resources/remove/`, transferResourcesRemoveApplication2ResourcesRemoveApplicationApi(data), {
58
63
  headers: {
@@ -68,6 +73,7 @@ export const useSpaceHttp = (apiPrefix, spaceId)=>{
68
73
  signal
69
74
  })).then((data)=>data.map(transferUsableSpaceApi2UsableSpace)));
70
75
  return {
76
+ getResourceAuthorizedSpaces,
71
77
  removeApplyResources,
72
78
  getUsableSpaces
73
79
  };
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { IFetchConfig } from '@/http/fetch';
3
- import type { IToolCountParam, IToolsParam } from '@/types';
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: (param: IToolCountParam) => Promise<import("@/types").IResourceCount[]>;
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
- }).then((data)=>data.map(transferResourceCountApi2ResourceCount));
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
@@ -14,3 +14,4 @@ export * from './hooks/use-common-http';
14
14
  export * from './hooks/use-loading-version';
15
15
  export * from './hooks/use-collection';
16
16
  export * from './hooks/use-scroll-load';
17
+ export * from './hooks/use-clickoutside';
package/dist/hooks.ts.js CHANGED
@@ -14,3 +14,4 @@ export * from './hooks/use-common-http.ts.js';
14
14
  export * from './hooks/use-loading-version.ts.js';
15
15
  export * from './hooks/use-collection.ts.js';
16
16
  export * from './hooks/use-scroll-load.ts.js';
17
+ export * from './hooks/use-clickoutside.ts.js';
@@ -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, IApprovalSetting, IApprovalSettingApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
2
2
  /**
3
3
  * 转换agentapi为agent
4
4
  * @param data IAgentInfoApi
@@ -53,4 +53,23 @@ 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;
64
+ /**
65
+ * ui转换为接口使用(配置审批)
66
+ * @param data IApprovalSetting,
67
+ * @returns IApprovalSettingApi
68
+ */
69
+ export declare const transferIApprovalSetting2IApprovalSettingApi: (data: IApprovalSetting) => IApprovalSettingApi;
70
+ /**
71
+ * 接口转换为ui使用(配置审批)
72
+ * @param data IApprovalSettingApi
73
+ * @returns IApprovalSetting
74
+ */
75
+ export declare const transferIApprovalSettingApi2IApprovalSetting: (data: IApprovalSettingApi) => IApprovalSetting;
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon, transferVariable2VariableApi, transferVariableApi2Variable } from './common.ts.js';
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';
@@ -163,7 +163,7 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
163
163
  * @param data IAgentForm
164
164
  * @returns IAgentFormApi
165
165
  */ export const transferAgentForm2AgentFormApi = (data)=>{
166
- var _data_conversationSettings, _data_conversationSettings1, _data_conversationSettings_commands, _data_conversationSettings2, _data_conversationSettings3, _data_conversationSettings4, _data_promptSetting_collectionVariables, _data_relatedTools_tools, _data_relatedTools_mcps;
166
+ var _data_conversationSettings, _data_conversationSettings1, _data_conversationSettings_commands, _data_conversationSettings2, _data_conversationSettings3, _data_conversationSettings4, _data_promptSetting_collectionVariables, _data_relatedTools_tools, _data_relatedTools_mcps, _data_approvalSettings;
167
167
  var _data_conversationSettings_openingRemark, _data_conversationSettings_predefinedQuestions;
168
168
  return _object_spread_props(_object_spread({}, transferResourceFormCommon2ResourceFormCommonApi(data)), {
169
169
  agent_code: data.agentCode,
@@ -219,7 +219,9 @@ 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
+ approval_settings: (_data_approvalSettings = data.approvalSettings) === null || _data_approvalSettings === void 0 ? void 0 : _data_approvalSettings.map(transferIApprovalSetting2IApprovalSettingApi),
223
+ is_bind_credential: data.isBindCredential,
224
+ business_ids: data.businessIds
223
225
  });
224
226
  };
225
227
  /**
@@ -227,7 +229,7 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
227
229
  * @param data IAgentFormApi
228
230
  * @returns IAgentForm
229
231
  */ export const transferAgentFormApi2AgentForm = (data)=>{
230
- var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting_collection_variables, _data_related_tools_tools, _data_related_tools_mcps, _data_related_skills_skills;
232
+ var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting_collection_variables, _data_related_tools_tools, _data_related_tools_mcps, _data_related_skills_skills, _data_approval_settings;
231
233
  var _data_conversation_settings_opening_remark, _data_conversation_settings_predefined_questions;
232
234
  return _object_spread_props(_object_spread({}, transferResourceFormCommonApi2ResourceFormCommon(data)), {
233
235
  agentCode: data.agent_code,
@@ -283,7 +285,9 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
283
285
  relatedSkills: data.related_skills ? {
284
286
  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
287
  } : undefined,
286
- isBindCredential: data.is_bind_credential
288
+ approvalSettings: (_data_approval_settings = data.approval_settings) === null || _data_approval_settings === void 0 ? void 0 : _data_approval_settings.map(transferIApprovalSettingApi2IApprovalSetting),
289
+ isBindCredential: data.is_bind_credential,
290
+ businessIds: data.business_ids
287
291
  });
288
292
  };
289
293
  /**
@@ -363,10 +367,47 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
363
367
  resource_type: item.resourceType,
364
368
  resource_code: item.resourceCode
365
369
  }));
370
+ export const transferResourceApplyApi2ResourceApply = (data)=>data.map((item)=>({
371
+ resourceType: item.resource_type,
372
+ resourceCode: item.resource_code,
373
+ status: item.status
374
+ }));
366
375
  export const transferAgentCount2AgentCountApi = (data)=>{
367
- return _object_spread_props(_object_spread({}, transferBaseCount2BaseCountApi(data)), {
376
+ return _object_spread_props(_object_spread({}, transferBaseCountParam2BaseCountParamApi(data)), {
368
377
  exclude_agent_id: data.excludeAgentId,
369
378
  agent_type: data.agentType,
370
379
  is_published: data.isPublished
371
380
  });
372
381
  };
382
+ /**
383
+ * 接口转换为ui使用
384
+ * @param data IAgentApigwMcpPermissionApi
385
+ * @returns IAgentApigwMcpPermission
386
+ */ export const transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission = (data)=>({
387
+ status: data.status,
388
+ hasPermission: data.has_permission,
389
+ mcpCode: data.mcp_code,
390
+ mcpName: data.mcp_name,
391
+ url: data.url,
392
+ protocolType: data.protocol_type
393
+ });
394
+ /**
395
+ * ui转换为接口使用(配置审批)
396
+ * @param data IApprovalSetting,
397
+ * @returns IApprovalSettingApi
398
+ */ export const transferIApprovalSetting2IApprovalSettingApi = (data)=>({
399
+ strategy_id: data.strategyId,
400
+ approval_name: data.approvalName,
401
+ approvers: data.approvers,
402
+ is_default: data.isDefault
403
+ });
404
+ /**
405
+ * 接口转换为ui使用(配置审批)
406
+ * @param data IApprovalSettingApi
407
+ * @returns IApprovalSetting
408
+ */ export const transferIApprovalSettingApi2IApprovalSetting = (data)=>({
409
+ strategyId: data.strategy_id,
410
+ approvalName: data.approval_name,
411
+ approvers: data.approvers,
412
+ isDefault: data.is_default
413
+ });
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferVariableApi2Variable } from './common.ts.js';
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 transferBaseCount2BaseCountApi(data);
104
+ return transferBaseCountParam2BaseCountParamApi(data);
105
105
  };
@@ -1,4 +1,5 @@
1
- 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';
1
+ import { ResourceStatus } from '@/enums';
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, IApprovalSettingValue, IApprovalSettingValueApi } from '@/types/common';
2
3
  /**
3
4
  * 接口转换为ui使用
4
5
  * @param data ITagsTreeApi
@@ -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,19 @@ 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 transferBaseCount2BaseCountApi: (data: IBaseCountParam) => IBaseCountParamApi;
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;
64
+ /**
65
+ * ui转换为接口使用(配置审批策略)
66
+ * @param data IApprovalSettingValue,
67
+ * @returns IApprovalSettingValueApi
68
+ */
69
+ export declare const transferIApprovalSettingValue2IApprovalSettingValueApi: (data: IApprovalSettingValue) => IApprovalSettingValueApi;
70
+ /**
71
+ * 接口转换为ui使用(配置审批策略)
72
+ * @param data IApprovalSettingValueApi
73
+ * @returns IApprovalSettingValue
74
+ */
75
+ export declare const transferIApprovalSettingValueApi2IApprovalSettingValue: (data: IApprovalSettingValueApi) => IApprovalSettingValue;
@@ -123,9 +123,8 @@ export const transferResourceCommonSearchParams2ResourceCommonSearchParamsApi =
123
123
  group_type: data.groupType
124
124
  };
125
125
  };
126
- export const transferBaseCount2BaseCountApi = (data)=>{
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
  };
@@ -168,3 +168,19 @@ export const transferIResourceReferenceApi2IResourceReference = (data)=>{
168
168
  spaceId: data.space_id
169
169
  };
170
170
  };
171
+ /**
172
+ * ui转换为接口使用(配置审批策略)
173
+ * @param data IApprovalSettingValue,
174
+ * @returns IApprovalSettingValueApi
175
+ */ export const transferIApprovalSettingValue2IApprovalSettingValueApi = (data)=>({
176
+ approval_enabled: data.approvalEnabled,
177
+ approval_strategy_id: data.approvalStrategyId
178
+ });
179
+ /**
180
+ * 接口转换为ui使用(配置审批策略)
181
+ * @param data IApprovalSettingValueApi
182
+ * @returns IApprovalSettingValue
183
+ */ export const transferIApprovalSettingValueApi2IApprovalSettingValue = (data)=>({
184
+ approvalEnabled: data.approval_enabled,
185
+ approvalStrategyId: data.approval_strategy_id
186
+ });
@@ -312,6 +312,7 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
312
312
  * @returns IOperatRecordParamApi
313
313
  */ export const transferOperatRecordParam2OperatRecordParamApi = (data)=>{
314
314
  return _object_spread_props(_object_spread({}, transferIPaginationParam2IPaginationParamApi(data)), {
315
+ fuzzy: data.fuzzy,
315
316
  id: data.id,
316
317
  instance_id: data.instanceId,
317
318
  resource_type_id: data.resourceTypeId,
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi } from './common.ts.js';
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 transferBaseCount2BaseCountApi(data);
337
+ return transferBaseCountParam2BaseCountParamApi(data);
339
338
  };