@fudanda/workflow 0.0.0-stage → 1.20261015.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 (335) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -2
  3. package/THIRD-PARTY-NOTICES.md +57 -0
  4. package/dist/ai-markdown-esl-I5ck.js +7 -0
  5. package/dist/chrome.d.ts +11 -0
  6. package/dist/chrome.js +358 -0
  7. package/dist/core.d.ts +11 -0
  8. package/dist/core.js +3 -0
  9. package/dist/coze/compat/base.d.ts +116 -0
  10. package/dist/coze/control-icon.d.ts +15 -0
  11. package/dist/coze/execution-panel.d.ts +8 -0
  12. package/dist/coze/schema-tree.d.ts +9 -0
  13. package/dist/coze/side-panel.d.ts +12 -0
  14. package/dist/coze/source/form-extensions/components/output-tree/components/custom-tree-node/constants.d.ts +13 -0
  15. package/dist/coze/source/form-extensions/components/output-tree/components/custom-tree-node/type.d.ts +34 -0
  16. package/dist/coze/start-form.d.ts +9 -0
  17. package/dist/coze/test-input.d.ts +9 -0
  18. package/dist/coze/test-run-button.d.ts +4 -0
  19. package/dist/coze/workflow-header.d.ts +5 -0
  20. package/dist/designer.d.ts +2 -0
  21. package/dist/flowgram-designer.d.ts +62 -0
  22. package/dist/graph-scope.d.ts +147 -0
  23. package/dist/header-shortcuts-BQZuNfpA.js +6 -0
  24. package/dist/index.d.ts +6 -0
  25. package/dist/index.js +8694 -0
  26. package/dist/input-fields.d.ts +4 -0
  27. package/dist/panel-focus.d.ts +3 -0
  28. package/dist/prompt-kit.d.ts +47 -0
  29. package/dist/result-preview.d.ts +5 -0
  30. package/dist/schema-tree-CTM6hEdm.js +309 -0
  31. package/dist/start-form-D_J3UIoE.js +9330 -0
  32. package/dist/styles.css +2 -0
  33. package/dist/templates.d.ts +1 -0
  34. package/dist/test-input-validation-CkORPCfm.js +55 -0
  35. package/dist/test-input-validation.d.ts +11 -0
  36. package/dist/theme.d.ts +17 -0
  37. package/package.json +103 -4
  38. package/vendor/coze/LICENSE-APACHE +177 -0
  39. package/vendor/coze/UPSTREAM.json +2247 -0
  40. package/vendor/coze/original/base-test-button.tsx +22 -0
  41. package/vendor/coze/original/comment-container.tsx +68 -0
  42. package/vendor/coze/original/condition-container.tsx +60 -0
  43. package/vendor/coze/original/condition-tag.tsx +58 -0
  44. package/vendor/coze/original/coze-global.less +234 -0
  45. package/vendor/coze/original/create-loop-function-json.ts +134 -0
  46. package/vendor/coze/original/create-loop-function.ts +56 -0
  47. package/vendor/coze/original/end-registry.ts +41 -0
  48. package/vendor/coze/original/execute-result-panel.less +97 -0
  49. package/vendor/coze/original/execute-result-panel.tsx +171 -0
  50. package/vendor/coze/original/form-item.less +39 -0
  51. package/vendor/coze/original/form-item.tsx +200 -0
  52. package/vendor/coze/original/http-api-field.tsx +42 -0
  53. package/vendor/coze/original/http-form-render.tsx +102 -0
  54. package/vendor/coze/original/icon-add.svg +3 -0
  55. package/vendor/coze/original/icon-arrow-left.svg +3 -0
  56. package/vendor/coze/original/icon-auto-layout.svg +18 -0
  57. package/vendor/coze/original/icon-batch.jpg +0 -0
  58. package/vendor/coze/original/icon-break.jpg +0 -0
  59. package/vendor/coze/original/icon-code.svg +13 -0
  60. package/vendor/coze/original/icon-condition.jpg +0 -0
  61. package/vendor/coze/original/icon-condition.svg +12 -0
  62. package/vendor/coze/original/icon-continue.jpg +0 -0
  63. package/vendor/coze/original/icon-database-query.jpg +0 -0
  64. package/vendor/coze/original/icon-database-update.jpg +0 -0
  65. package/vendor/coze/original/icon-database.svg +18 -0
  66. package/vendor/coze/original/icon-delete.svg +5 -0
  67. package/vendor/coze/original/icon-end.jpg +0 -0
  68. package/vendor/coze/original/icon-fullscreen.svg +9 -0
  69. package/vendor/coze/original/icon-http.jpg +0 -0
  70. package/vendor/coze/original/icon-intent.jpg +0 -0
  71. package/vendor/coze/original/icon-json-parser.jpg +0 -0
  72. package/vendor/coze/original/icon-json-stringify.jpg +0 -0
  73. package/vendor/coze/original/icon-llm.jpg +0 -0
  74. package/vendor/coze/original/icon-loop.jpg +0 -0
  75. package/vendor/coze/original/icon-more.svg +11 -0
  76. package/vendor/coze/original/icon-play-round-outlined.svg +8 -0
  77. package/vendor/coze/original/icon-plugin-tool.svg +6 -0
  78. package/vendor/coze/original/icon-standard-copy.svg +8 -0
  79. package/vendor/coze/original/icon-start.jpg +0 -0
  80. package/vendor/coze/original/icon-text.jpg +0 -0
  81. package/vendor/coze/original/icon-unknown.svg +7 -0
  82. package/vendor/coze/original/icon-var.svg +6 -0
  83. package/vendor/coze/original/icon-variable-assign.jpg +0 -0
  84. package/vendor/coze/original/icon-variable-merge.jpg +0 -0
  85. package/vendor/coze/original/icon-workflow-end.svg +5 -0
  86. package/vendor/coze/original/icon-workflow-start.svg +5 -0
  87. package/vendor/coze/original/icon-workflow.jpg +0 -0
  88. package/vendor/coze/original/icon-workflow.svg +21 -0
  89. package/vendor/coze/original/icon-workflows.svg +5 -0
  90. package/vendor/coze/original/if-form-meta.tsx +88 -0
  91. package/vendor/coze/original/logic-display.tsx +33 -0
  92. package/vendor/coze/original/mouse-icon.tsx +35 -0
  93. package/vendor/coze/original/mouse-pad-selector.tsx +180 -0
  94. package/vendor/coze/original/node-card.tsx +77 -0
  95. package/vendor/coze/original/node-category-panel.less +4 -0
  96. package/vendor/coze/original/node-category-panel.tsx +53 -0
  97. package/vendor/coze/original/node-config-form.tsx +67 -0
  98. package/vendor/coze/original/node-header.less +165 -0
  99. package/vendor/coze/original/node-header.tsx +552 -0
  100. package/vendor/coze/original/node-panel.less +183 -0
  101. package/vendor/coze/original/node-render.less +20 -0
  102. package/vendor/coze/original/node-side-sheet.less +57 -0
  103. package/vendor/coze/original/node-side-sheet.tsx +214 -0
  104. package/vendor/coze/original/node-wrapper.tsx +71 -0
  105. package/vendor/coze/original/pad-icon.tsx +45 -0
  106. package/vendor/coze/original/resizable-side-panel-constants.ts +18 -0
  107. package/vendor/coze/original/resizable-side-panel.tsx +42 -0
  108. package/vendor/coze/original/start-registry.ts +53 -0
  109. package/vendor/coze/original/sub-canvas-background.less +4 -0
  110. package/vendor/coze/original/sub-canvas-background.tsx +48 -0
  111. package/vendor/coze/original/sub-canvas-container.less +16 -0
  112. package/vendor/coze/original/sub-canvas-container.tsx +97 -0
  113. package/vendor/coze/original/sub-canvas-header.less +75 -0
  114. package/vendor/coze/original/sub-canvas-header.tsx +95 -0
  115. package/vendor/coze/original/test-form-sheet-header.tsx +82 -0
  116. package/vendor/coze/original/test-form-sheet.less +178 -0
  117. package/vendor/coze/original/toolbar-add-node.tsx +68 -0
  118. package/vendor/coze/original/toolbar-auto-layout.tsx +61 -0
  119. package/vendor/coze/original/toolbar-comment.tsx +121 -0
  120. package/vendor/coze/original/toolbar-container.tsx +42 -0
  121. package/vendor/coze/original/toolbar-interactive.tsx +98 -0
  122. package/vendor/coze/original/toolbar-minimap-switch.tsx +41 -0
  123. package/vendor/coze/original/toolbar-tools.less +46 -0
  124. package/vendor/coze/original/toolbar-tools.tsx +89 -0
  125. package/vendor/coze/original/toolbar-zoom.tsx +134 -0
  126. package/vendor/coze/original/tree-variable-selector.less +292 -0
  127. package/vendor/coze/original/tree-variable-selector.tsx +298 -0
  128. package/vendor/coze/original/workflow-document-custom-options.ts +151 -0
  129. package/vendor/coze/original/workflow-header.less +65 -0
  130. package/vendor/coze/original/workflow-header.tsx +85 -0
  131. package/vendor/coze/source/agent-models/model-option/index.module.less +19 -0
  132. package/vendor/coze/source/agent-models/model-option/index.tsx +321 -0
  133. package/vendor/coze/source/agent-models/model-option-avatar/index.tsx +175 -0
  134. package/vendor/coze/source/agent-models/model-option-group/index.tsx +87 -0
  135. package/vendor/coze/source/agent-models/model-option-thumb/index.tsx +41 -0
  136. package/vendor/coze/source/agent-models/model-select-ui/index.tsx +238 -0
  137. package/vendor/coze/source/agent-models/popover-model-list-view/index.tsx +146 -0
  138. package/vendor/coze/source/components/code-editor/text-editor.tsx +71 -0
  139. package/vendor/coze/source/components/comment/components/editor/block.tsx +117 -0
  140. package/vendor/coze/source/components/comment/components/editor/leaf.tsx +64 -0
  141. package/vendor/coze/source/components/comment/components/toolbar.tsx +366 -0
  142. package/vendor/coze/source/components/comment/constant.ts +94 -0
  143. package/vendor/coze/source/components/editor-container/expand-editor/index.module.less +107 -0
  144. package/vendor/coze/source/components/editor-container/expand-editor/index.tsx +117 -0
  145. package/vendor/coze/source/components/model-select/components/model-setting.tsx +300 -0
  146. package/vendor/coze/source/components/model-select/components/settings.tsx +144 -0
  147. package/vendor/coze/source/components/model-select/index.module.less +34 -0
  148. package/vendor/coze/source/components/model-select/utils/index.tsx +100 -0
  149. package/vendor/coze/source/components/node-render/node-render-new/fields/constants.tsx +79 -0
  150. package/vendor/coze/source/components/node-render/node-render-new/fields/field-empty.module.less +12 -0
  151. package/vendor/coze/source/components/node-render/node-render-new/fields/field-empty.tsx +37 -0
  152. package/vendor/coze/source/components/node-render/node-render-new/fields/field.module.less +19 -0
  153. package/vendor/coze/source/components/node-render/node-render-new/fields/field.tsx +52 -0
  154. package/vendor/coze/source/components/node-render/node-render-new/fields/http-api-field/index.tsx +42 -0
  155. package/vendor/coze/source/components/node-render/node-render-new/fields/overflow-tag-list.module.less +47 -0
  156. package/vendor/coze/source/components/node-render/node-render-new/fields/overflow-tag-list.tsx +162 -0
  157. package/vendor/coze/source/components/node-render/node-render-new/fields/variable-tag-list.module.less +48 -0
  158. package/vendor/coze/source/components/node-render/node-render-new/fields/variable-tag-list.tsx +126 -0
  159. package/vendor/coze/source/components/node-wrapper/execute-result-panel/index.module.less +97 -0
  160. package/vendor/coze/source/components/node-wrapper/execute-result-panel/index.tsx +171 -0
  161. package/vendor/coze/source/components/sub-canvas/components/background/index.module.less +4 -0
  162. package/vendor/coze/source/components/sub-canvas/components/header/index.module.less +75 -0
  163. package/vendor/coze/source/components/test-run/test-run-button/single-node.tsx +158 -0
  164. package/vendor/coze/source/execution-panel/panel.module.less +48 -0
  165. package/vendor/coze/source/execution-panel/panel.tsx +99 -0
  166. package/vendor/coze/source/execution-panel/use-resize.ts +79 -0
  167. package/vendor/coze/source/external/features/log/components/data-viewer/constants.ts +28 -0
  168. package/vendor/coze/source/external/features/log/components/data-viewer/context/context.ts +21 -0
  169. package/vendor/coze/source/external/features/log/components/data-viewer/context/create-store.ts +48 -0
  170. package/vendor/coze/source/external/features/log/components/data-viewer/context/index.ts +19 -0
  171. package/vendor/coze/source/external/features/log/components/data-viewer/context/provider.tsx +50 -0
  172. package/vendor/coze/source/external/features/log/components/data-viewer/data-viewer.module.less +26 -0
  173. package/vendor/coze/source/external/features/log/components/data-viewer/data-viewer.tsx +79 -0
  174. package/vendor/coze/source/external/features/log/components/data-viewer/hooks/index.ts +18 -0
  175. package/vendor/coze/source/external/features/log/components/data-viewer/hooks/use-data-viewer-store.ts +29 -0
  176. package/vendor/coze/source/external/features/log/components/data-viewer/hooks/use-expand.ts +35 -0
  177. package/vendor/coze/source/external/features/log/components/data-viewer/hooks/use-value.tsx +66 -0
  178. package/vendor/coze/source/external/features/log/components/data-viewer/index.tsx +21 -0
  179. package/vendor/coze/source/external/features/log/components/data-viewer/json-field/index.tsx +186 -0
  180. package/vendor/coze/source/external/features/log/components/data-viewer/json-field/json-field.module.less +79 -0
  181. package/vendor/coze/source/external/features/log/components/data-viewer/types.ts +50 -0
  182. package/vendor/coze/source/external/features/log/components/data-viewer/utils/big-number.ts +35 -0
  183. package/vendor/coze/source/external/features/log/components/data-viewer/utils/generate-field.ts +104 -0
  184. package/vendor/coze/source/external/features/log/components/log-parser/log-wrap.module.less +27 -0
  185. package/vendor/coze/source/external/features/log/components/log-parser/log-wrap.tsx +109 -0
  186. package/vendor/coze/source/external/features/log/components/node-status-bar/node-status-bar.module.less +52 -0
  187. package/vendor/coze/source/external/features/log/components/node-status-bar/node-status-bar.tsx +113 -0
  188. package/vendor/coze/source/form/components/field-empty.tsx +45 -0
  189. package/vendor/coze/source/form/components/section.tsx +91 -0
  190. package/vendor/coze/source/form-extensions/components/add-item-button/index.tsx +64 -0
  191. package/vendor/coze/source/form-extensions/components/form-card/index.module.less +131 -0
  192. package/vendor/coze/source/form-extensions/components/form-card/index.tsx +309 -0
  193. package/vendor/coze/source/form-extensions/components/form-item/index.module.less +39 -0
  194. package/vendor/coze/source/form-extensions/components/form-item/index.tsx +200 -0
  195. package/vendor/coze/source/form-extensions/components/form-item-feedback/index.module.less +7 -0
  196. package/vendor/coze/source/form-extensions/components/form-item-feedback/index.tsx +39 -0
  197. package/vendor/coze/source/form-extensions/components/level-line/index.module.less +346 -0
  198. package/vendor/coze/source/form-extensions/components/level-line/index.ts +17 -0
  199. package/vendor/coze/source/form-extensions/components/level-line/level-line.tsx +460 -0
  200. package/vendor/coze/source/form-extensions/components/level-line/types.ts +38 -0
  201. package/vendor/coze/source/form-extensions/components/level-line/utils.ts +60 -0
  202. package/vendor/coze/source/form-extensions/components/literal-value-input/constants.ts +61 -0
  203. package/vendor/coze/source/form-extensions/components/literal-value-input/input-boolean.tsx +80 -0
  204. package/vendor/coze/source/form-extensions/components/literal-value-input/input-integer.tsx +68 -0
  205. package/vendor/coze/source/form-extensions/components/literal-value-input/input-number.tsx +62 -0
  206. package/vendor/coze/source/form-extensions/components/literal-value-input/input-select.tsx +59 -0
  207. package/vendor/coze/source/form-extensions/components/literal-value-input/input-string.tsx +55 -0
  208. package/vendor/coze/source/form-extensions/components/literal-value-input/literal-value-input.tsx +35 -0
  209. package/vendor/coze/source/form-extensions/components/literal-value-input/styles.module.less +46 -0
  210. package/vendor/coze/source/form-extensions/components/literal-value-input/type.ts +61 -0
  211. package/vendor/coze/source/form-extensions/components/literal-value-input/utils.tsx +117 -0
  212. package/vendor/coze/source/form-extensions/components/node-header/components/close-button.tsx +44 -0
  213. package/vendor/coze/source/form-extensions/components/node-header/description-display.tsx +52 -0
  214. package/vendor/coze/source/form-extensions/components/node-header/description.tsx +131 -0
  215. package/vendor/coze/source/form-extensions/components/node-header/index.module.less +165 -0
  216. package/vendor/coze/source/form-extensions/components/node-header/index.tsx +552 -0
  217. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-btn/index.tsx +43 -0
  218. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/default-value-input.tsx +276 -0
  219. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/index.module.less +124 -0
  220. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/index.tsx +131 -0
  221. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/types.ts +32 -0
  222. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-name/index.module.less +38 -0
  223. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-name/index.tsx +101 -0
  224. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-operator/index.module.less +51 -0
  225. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-operator/index.tsx +107 -0
  226. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-required/index.module.less +17 -0
  227. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-required/index.tsx +53 -0
  228. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-type/constants.tsx +77 -0
  229. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-type/index.module.less +97 -0
  230. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-type/index.tsx +155 -0
  231. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/constants.ts +38 -0
  232. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/index.module.less +138 -0
  233. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/index.tsx +360 -0
  234. package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/type.ts +88 -0
  235. package/vendor/coze/source/form-extensions/components/output-tree/components/header/index.module.less +36 -0
  236. package/vendor/coze/source/form-extensions/components/output-tree/components/header/index.tsx +104 -0
  237. package/vendor/coze/source/form-extensions/components/output-tree/constants.ts +22 -0
  238. package/vendor/coze/source/form-extensions/components/output-tree/context.ts +28 -0
  239. package/vendor/coze/source/form-extensions/components/output-tree/hooks/use-columns-style.ts +39 -0
  240. package/vendor/coze/source/form-extensions/components/output-tree/index.module.less +83 -0
  241. package/vendor/coze/source/form-extensions/components/output-tree/index.tsx +692 -0
  242. package/vendor/coze/source/form-extensions/components/output-tree/utils.ts +185 -0
  243. package/vendor/coze/source/form-extensions/components/setting-on-error/components/process-type/index.tsx +97 -0
  244. package/vendor/coze/source/form-extensions/components/setting-on-error/components/process-type/option-item.tsx +30 -0
  245. package/vendor/coze/source/form-extensions/components/setting-on-error/components/process-type/types.ts +23 -0
  246. package/vendor/coze/source/form-extensions/components/setting-on-error/components/retry-times/index.tsx +45 -0
  247. package/vendor/coze/source/form-extensions/components/setting-on-error/components/timeout/index.tsx +102 -0
  248. package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select-option.tsx +167 -0
  249. package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select-tree-panel.tsx +165 -0
  250. package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select.module.less +96 -0
  251. package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select.tsx +265 -0
  252. package/vendor/coze/source/form-extensions/components/tree-variable-selector/context.tsx +42 -0
  253. package/vendor/coze/source/form-extensions/components/tree-variable-selector/expand-icon.tsx +30 -0
  254. package/vendor/coze/source/form-extensions/components/tree-variable-selector/index.module.less +292 -0
  255. package/vendor/coze/source/form-extensions/components/tree-variable-selector/node-variable-tree.module.less +49 -0
  256. package/vendor/coze/source/form-extensions/components/tree-variable-selector/node-variable-tree.tsx +149 -0
  257. package/vendor/coze/source/form-extensions/components/tree-variable-selector/utils.tsx +500 -0
  258. package/vendor/coze/source/form-extensions/components/tree-variable-selector/value-display.tsx +130 -0
  259. package/vendor/coze/source/form-extensions/components/value-expression-input/const.ts +68 -0
  260. package/vendor/coze/source/form-extensions/components/value-expression-input/context.ts +27 -0
  261. package/vendor/coze/source/form-extensions/components/value-expression-input/index.module.less +144 -0
  262. package/vendor/coze/source/form-extensions/components/value-expression-input/value-expression-input.tsx +418 -0
  263. package/vendor/coze/source/form-extensions/components/variable-type-selector/constants.tsx +77 -0
  264. package/vendor/coze/source/form-extensions/components/variable-type-selector/index.module.less +31 -0
  265. package/vendor/coze/source/form-extensions/components/variable-type-selector/index.tsx +17 -0
  266. package/vendor/coze/source/form-extensions/components/variable-type-selector/utils.tsx +298 -0
  267. package/vendor/coze/source/form-extensions/components/variable-type-selector/variable-type-selector.tsx +235 -0
  268. package/vendor/coze/source/form-extensions/components/variable-type-tag/index.tsx +54 -0
  269. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-branch.module.less +9 -0
  270. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-branch.tsx +249 -0
  271. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-header.tsx +50 -0
  272. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-item-logic.module.less +13 -0
  273. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-item-logic.tsx +73 -0
  274. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/delete/index.module.less +10 -0
  275. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/delete/index.tsx +42 -0
  276. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/index.module.less +9 -0
  277. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/index.tsx +254 -0
  278. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/operator/index.module.less +7 -0
  279. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/operator/index.tsx +144 -0
  280. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/value-expression-with-state/index.tsx +69 -0
  281. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/context.ts +36 -0
  282. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/condition-branch-preview.tsx +44 -0
  283. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/condition-branch.tsx +152 -0
  284. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/container.tsx +19 -0
  285. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/custom-drag-layer.tsx +117 -0
  286. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/types.ts +18 -0
  287. package/vendor/coze/source/form-extensions/setters/condition/multi-condition/types.ts +58 -0
  288. package/vendor/coze/source/node-registries/end/components/terminate-plan-field.tsx +29 -0
  289. package/vendor/coze/source/node-registries/end/constants.ts +34 -0
  290. package/vendor/coze/source/node-registries/end/form.tsx +66 -0
  291. package/vendor/coze/source/node-registries/end/types.ts +45 -0
  292. package/vendor/coze/source/node-registries/http/components/base-editor/raw-text-editor.tsx +80 -0
  293. package/vendor/coze/source/node-registries/http/constants.ts +80 -0
  294. package/vendor/coze/source/node-registries/http/fields/json-import-editor/index.module.less +191 -0
  295. package/vendor/coze/source/node-registries/http/fields/json-import-editor/json-import-components/json-expand-editor.tsx +141 -0
  296. package/vendor/coze/source/node-registries/http/fields/json-import-editor/json-import-components/json-import.tsx +99 -0
  297. package/vendor/coze/source/node-registries/http/form-render.tsx +102 -0
  298. package/vendor/coze/source/node-registries/http/setters/api/curl-expand-editor.tsx +161 -0
  299. package/vendor/coze/source/node-registries/http/setters/api/curl-import.tsx +96 -0
  300. package/vendor/coze/source/node-registries/http/setters/api/index.module.less +199 -0
  301. package/vendor/coze/source/node-registries/http/setters/api/index.tsx +149 -0
  302. package/vendor/coze/source/node-registries/http/setters/api/utils.ts +41 -0
  303. package/vendor/coze/source/node-registries/http/setters/body/index.tsx +201 -0
  304. package/vendor/coze/source/node-registries/http/setters/constants.ts +83 -0
  305. package/vendor/coze/source/node-registries/if/components/else/index.tsx +41 -0
  306. package/vendor/coze/source/node-registries/intent/components/intents/index.module.less +15 -0
  307. package/vendor/coze/source/node-registries/intent/components/intents/option-item/index.tsx +189 -0
  308. package/vendor/coze/source/node-registries/json-stringify/constants.ts +32 -0
  309. package/vendor/coze/source/node-registries/json-stringify/form.tsx +46 -0
  310. package/vendor/coze/source/node-registries/loop/constants.ts +43 -0
  311. package/vendor/coze/source/node-registries/loop/loop-fields/loop-settings-section/index.tsx +48 -0
  312. package/vendor/coze/source/node-registries/loop/loop-fields/loop-type/index.tsx +81 -0
  313. package/vendor/coze/source/node-registries/loop/loop-fields/loop-type/options.ts +34 -0
  314. package/vendor/coze/source/node-registries/start/form.tsx +209 -0
  315. package/vendor/coze/source/node-registries/text-process/components/method-selector/index.tsx +46 -0
  316. package/vendor/coze/source/node-registries/text-process/constants.ts +132 -0
  317. package/vendor/coze/source/nodes-v2/components/form-item-feedback/index.module.less +7 -0
  318. package/vendor/coze/source/nodes-v2/components/form-item-feedback/index.tsx +47 -0
  319. package/vendor/coze/source/nodes-v2/components/system-prompt/index.module.less +66 -0
  320. package/vendor/coze/source/nodes-v2/components/system-prompt/prompt-kit-bar.tsx +129 -0
  321. package/vendor/coze/source/nodes-v2/components/system-prompt/system-prompt-editor.tsx +110 -0
  322. package/vendor/coze/source/nodes-v2/llm/user-prompt/index.tsx +64 -0
  323. package/vendor/coze/source/prompt-kit/input-config-popover/index.tsx +80 -0
  324. package/vendor/coze/source/prompt-kit/input-slot-widget/index.css +34 -0
  325. package/vendor/coze/source/prompt-kit/input-slot-widget/index.ts +169 -0
  326. package/vendor/coze/source/prompt-kit/library-item.tsx +141 -0
  327. package/vendor/coze/source/prompt-kit/prompt-info-input.tsx +90 -0
  328. package/vendor/coze/source/ui-components/add-operation/index.module.less +19 -0
  329. package/vendor/coze/source/ui-components/add-operation/index.tsx +67 -0
  330. package/vendor/coze/source/ui-components/auto-size-tooltip/index.module.less +39 -0
  331. package/vendor/coze/source/ui-components/auto-size-tooltip/index.tsx +74 -0
  332. package/vendor/coze/source/ui-components/workflow-sl-input/index.module.less +36 -0
  333. package/vendor/coze/source/ui-components/workflow-sl-input/index.tsx +194 -0
  334. package/vendor/coze/source/utils/create-slots/index.tsx +126 -0
  335. package/vendor/coze/source/utils/create-slots/use-force-update.ts +23 -0
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Copyright 2025 coze-dev Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { inject, injectable } from 'inversify';
18
+ import { FlowNodeBaseType } from '@flowgram-adapter/free-layout-editor';
19
+ import {
20
+ type WorkflowDocumentOptions,
21
+ type WorkflowLineEntity,
22
+ type WorkflowPortEntity,
23
+ } from '@flowgram-adapter/free-layout-editor';
24
+ import { StandardNodeType } from '@coze-workflow/base/types';
25
+
26
+ import {
27
+ WorkflowLinesServiceProvider,
28
+ type WorkflowLinesService,
29
+ } from '../services/workflow-line-service';
30
+
31
+ @injectable()
32
+ export class WorkflowDocumentCustomOptions implements WorkflowDocumentOptions {
33
+ @inject(WorkflowLinesServiceProvider)
34
+ linesServiceProvider: () => WorkflowLinesService;
35
+
36
+ // copy form packages/workflow-sdk/core/src/workflow-document-container-module.ts
37
+ cursors: {
38
+ grab: 'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMCAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2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C4wMDMxIDguMDA5ODEgMTQuMDAzMSA4LjAxOTgzTDE0LjAwMzQgOS42MDEzNkwxNC4wMDI1IDYuNzExNUMxNC4wMDI1IDYuNDQ5NzQgMTMuOTIwOSA2LjIwNzA1IDEzLjc4MTggNi4wMDc0OEMxMy41NjIgNS42OTI0MiAxMy4xOTg5IDUuNDg0ODMgMTIuNzg3IDUuNDc5MzdMMTIuNzcwMyA1LjQ3OTI2QzEyLjY1ODggNS40NzkyNiAxMi41NTA3IDUuNDk0MDggMTIuNDQ3OSA1LjUyMTg2WiIgZmlsbD0iIzFEMUMyMyIvPgo8L3N2Zz4="), auto';
40
+ };
41
+
42
+ /** Is there an error in the connection? */
43
+ isErrorLine(
44
+ fromPort?: WorkflowPortEntity,
45
+ toPort?: WorkflowPortEntity,
46
+ ): boolean {
47
+ const linesService = this.linesServiceProvider();
48
+ return linesService.isError(fromPort?.node?.id, toPort?.node?.id);
49
+ }
50
+
51
+ /** Are the lines vertical? */
52
+ isVerticalLine(line: WorkflowLineEntity): boolean {
53
+ return this.isSubCanvasLinkLine(line);
54
+ }
55
+
56
+ /** Does the line hide the arrow? */
57
+ isHideArrowLine(line: WorkflowLineEntity): boolean {
58
+ return this.isSubCanvasLinkLine(line);
59
+ }
60
+
61
+ /** Is the line disabled? */
62
+ isDisabledLine(line: WorkflowLineEntity): boolean {
63
+ return this.isSubCanvasLinkLine(line);
64
+ }
65
+
66
+ /** Can lines be deleted? */
67
+ canDeleteLine(line: WorkflowLineEntity): boolean {
68
+ if (
69
+ line.from?.flowNodeType === StandardNodeType.Loop &&
70
+ line.to?.flowNodeType === FlowNodeBaseType.SUB_CANVAS
71
+ ) {
72
+ return false;
73
+ }
74
+ if (
75
+ line.from?.flowNodeType === StandardNodeType.Batch &&
76
+ line.to?.flowNodeType === FlowNodeBaseType.SUB_CANVAS
77
+ ) {
78
+ return false;
79
+ }
80
+ return true;
81
+ }
82
+
83
+ /** Are the two ports allowed to connect? */
84
+ // eslint-disable-next-line complexity -- TODO configuration move to node
85
+ canAddLine(
86
+ fromPort: WorkflowPortEntity,
87
+ toPort: WorkflowPortEntity,
88
+ ): boolean {
89
+ // Cannot be the same node self-looping
90
+ if (fromPort.node === toPort.node) {
91
+ return false;
92
+ }
93
+ if (toPort.node.flowNodeType === StandardNodeType.Comment) {
94
+ return false;
95
+ }
96
+ // Child canvas nodes connect to sub-nodes
97
+ if (
98
+ (fromPort.node.flowNodeType === FlowNodeBaseType.SUB_CANVAS &&
99
+ fromPort.node === toPort.node.parent) ||
100
+ (toPort.node.flowNodeType === FlowNodeBaseType.SUB_CANVAS &&
101
+ toPort.node === fromPort.node.parent)
102
+ ) {
103
+ return true;
104
+ }
105
+ // Loop and loopFunction connections cannot be changed
106
+ if (
107
+ toPort.portID === 'loop-function-inline-input' ||
108
+ fromPort.portID === 'loop-function-inline-output' ||
109
+ fromPort.portID === 'loop-output-to-function'
110
+ ) {
111
+ return false;
112
+ }
113
+ if (
114
+ toPort.portID === 'batch-function-inline-input' ||
115
+ fromPort.portID === 'batch-function-inline-output' ||
116
+ fromPort.portID === 'batch-output-to-function'
117
+ ) {
118
+ return false;
119
+ }
120
+ // Not in different containers
121
+ if (fromPort.node.parent?.id !== toPort.node.parent?.id) {
122
+ return false;
123
+ }
124
+ // Unable to connect to wrong port
125
+ if (
126
+ fromPort.node.flowNodeType === 'error' ||
127
+ toPort.node.flowNodeType === 'error'
128
+ ) {
129
+ return false;
130
+ }
131
+ return true;
132
+ }
133
+
134
+ private isSubCanvasLinkLine(line: WorkflowLineEntity): boolean {
135
+ if (
136
+ line.fromPort.portID === 'loop-output-to-function' &&
137
+ line.toPort?.portID === 'loop-function-input'
138
+ ) {
139
+ return true;
140
+ }
141
+ if (
142
+ line.fromPort.portID === 'batch-output-to-function' &&
143
+ line.toPort?.portID === 'batch-function-input'
144
+ ) {
145
+ return true;
146
+ }
147
+ return false;
148
+ }
149
+
150
+ allNodesDefaultExpanded = false;
151
+ }
@@ -0,0 +1,65 @@
1
+ .container {
2
+ display: flex;
3
+ flex-direction: row;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+
7
+ // coze 2.0 css
8
+ height: 64px;
9
+ padding: 0 16px;
10
+
11
+ background: var(--coz-bg-primary);
12
+ border-bottom: 1px solid var(--coz-stroke-primary);
13
+
14
+ .left {
15
+ display: flex;
16
+ flex-direction: row;
17
+ flex-shrink: 0;
18
+ column-gap: 4px;
19
+ align-items: center;
20
+ }
21
+
22
+
23
+ .right {
24
+ display: flex;
25
+ flex-direction: row;
26
+ flex-shrink: 0;
27
+ column-gap: 12px;
28
+ align-items: center;
29
+
30
+ .spin-container {
31
+ display: flex;
32
+
33
+ svg {
34
+ margin-top: 0;
35
+ }
36
+
37
+ :global {
38
+ .semi-spin-wrapper {
39
+ top: 76%;
40
+ display: flex;
41
+ }
42
+ }
43
+ }
44
+
45
+ .icon-copy {
46
+ padding: 6px 7px;
47
+ color: #6B6B75;
48
+ }
49
+
50
+ .show-info {
51
+ display: inline-flex;
52
+ align-items: center;
53
+
54
+ font-size: 12px;
55
+ font-weight: 500;
56
+ font-style: normal;
57
+ line-height: 16px;
58
+ }
59
+
60
+ .last-run-btn {
61
+ color: #1D1C2399;
62
+ }
63
+ }
64
+ }
65
+
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Copyright 2025 coze-dev Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React from 'react';
18
+
19
+ import { IconCozArrowLeft } from '@coze-arch/coze-design/icons';
20
+ import { IconButton, CozAvatar } from '@coze-arch/coze-design';
21
+
22
+ import { WorkflowInfo } from '../workflow-header-info';
23
+ import { useGlobalState } from '../../hooks';
24
+ import { getWorkflowHeaderTestId } from './utils';
25
+ import { PublishButton } from './components/publish-button-v2';
26
+ import {
27
+ CollaboratorsButton,
28
+ SubmitButton,
29
+ DuplicateButton,
30
+ HistoryButton,
31
+ CreditButton,
32
+ ReferenceButton,
33
+ } from './components';
34
+
35
+ import styles from './index.module.less';
36
+
37
+ const WorkFlowHeader: React.FC = () => {
38
+ const globalState = useGlobalState();
39
+ const { readonly, info, playgroundProps, workflowId } = globalState;
40
+
41
+ return (
42
+ <div className={styles.container}>
43
+ <div
44
+ className={styles.left}
45
+ data-testid={getWorkflowHeaderTestId('info')}
46
+ >
47
+ <IconButton
48
+ icon={<IconCozArrowLeft />}
49
+ color="secondary"
50
+ data-testid={getWorkflowHeaderTestId('back')}
51
+ onClick={() => {
52
+ playgroundProps.onBackClick?.(globalState);
53
+ }}
54
+ />
55
+
56
+ <CozAvatar src={info.url || ''} type="platform" alt="Avatar" />
57
+
58
+ <WorkflowInfo />
59
+ </div>
60
+
61
+ <div className={styles.right}>
62
+ {/* will support soon */}
63
+ {IS_OPEN_SOURCE ? null : <ReferenceButton workflowId={workflowId} />}
64
+
65
+ {IS_OPEN_SOURCE ? null : (
66
+ <>
67
+ {!readonly && <CreditButton />}
68
+
69
+ <HistoryButton />
70
+
71
+ <CollaboratorsButton />
72
+
73
+ <SubmitButton />
74
+ </>
75
+ )}
76
+
77
+ <PublishButton />
78
+
79
+ <DuplicateButton mode={readonly ? 'button' : 'icon'} />
80
+ </div>
81
+ </div>
82
+ );
83
+ };
84
+
85
+ export default React.memo(WorkFlowHeader);
@@ -0,0 +1,19 @@
1
+
2
+ .model-option {
3
+ &:last-of-type,
4
+ &.model-option_selected,
5
+ &:hover,
6
+ &:has(+ &.model-option_selected),
7
+ &:has(+ &:hover) {
8
+ .model-info-border {
9
+ border-color: transparent;
10
+ }
11
+ }
12
+
13
+ // UI 要改 coze design 默认样式,无奈
14
+ :global(.coz-tag.coz-tag-mini) {
15
+ padding-right: 3px;
16
+ padding-left: 3px;
17
+ font-weight: 500;
18
+ }
19
+ }
@@ -0,0 +1,321 @@
1
+ /*
2
+ * Copyright 2025 coze-dev Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /* eslint-disable complexity -- ignore */
18
+ import { type PropsWithChildren, useRef } from 'react';
19
+
20
+ import cls from 'classnames';
21
+ import { useHover } from 'ahooks';
22
+ import {
23
+ useBenefitAvailable,
24
+ PremiumPaywallScene,
25
+ usePremiumPaywallModal,
26
+ } from '@coze-studio/premium-components-adapter';
27
+ import { I18n } from '@coze-arch/i18n';
28
+ import { type Model, ModelTagClass } from '@coze-arch/bot-api/developer_api';
29
+ import {
30
+ useBotCreatorContext,
31
+ BotCreatorScene,
32
+ } from '@coze-agent-ide/bot-creator-context';
33
+ import {
34
+ IconCozLongArrowTopRight,
35
+ IconCozSetting,
36
+ IconCozLongArrowUpCircle,
37
+ IconCozDiamondFill,
38
+ } from '@coze-arch/coze-design/icons';
39
+ import { IconButton, Tag, Tooltip, Typography } from '@coze-arch/coze-design';
40
+ import { OverflowList } from '@blueprintjs/core';
41
+
42
+ import { ModelOptionAvatar } from '../model-option-avatar';
43
+
44
+ import styles from './index.module.less';
45
+
46
+ export type ModelOptionProps = {
47
+ model: Model;
48
+ selected?: boolean;
49
+ disabled?: boolean;
50
+ /** Return whether the switch was successful */
51
+ onClick: () => boolean;
52
+ } & (
53
+ | {
54
+ enableConfig?: false;
55
+ }
56
+ | {
57
+ enableConfig: true;
58
+ onConfigClick: () => void;
59
+ }
60
+ ) &
61
+ (
62
+ | {
63
+ enableJumpDetail?: false;
64
+ }
65
+ | {
66
+ enableJumpDetail: true;
67
+ /**
68
+ * Click to jump to the model management page
69
+ *
70
+ * Because the component positioning is a pure UI component, and the way to obtain the space id of different modules is different, the splicing of jump behavior and url is not built-in
71
+ */
72
+ onDetailClick: (modelId: string) => void;
73
+ }
74
+ );
75
+
76
+ // eslint-disable-next-line @coze-arch/max-line-per-function
77
+ export function ModelOption({
78
+ model,
79
+ selected,
80
+ disabled,
81
+ onClick,
82
+ ...props
83
+ }: ModelOptionProps) {
84
+ /** This ref is purely for judging whether to hover or not. */
85
+ const ref = useRef<HTMLElement>(null);
86
+ const isHovering = useHover(ref);
87
+ const { scene } = useBotCreatorContext();
88
+
89
+ const featureTags = model.model_tag_list
90
+ ?.filter(t => t.tag_class === ModelTagClass.ModelFeature && t.tag_name)
91
+ .map(t => t.tag_name);
92
+ const functionTags = model.model_tag_list
93
+ ?.filter(t => t.tag_class === ModelTagClass.ModelFunction && t.tag_name)
94
+ .map(t => t.tag_name);
95
+
96
+ // Paywall, open source version does not support this feature
97
+ const isProModel =
98
+ model.model_status_details?.is_new_model ||
99
+ model.model_status_details?.is_advanced_model;
100
+ const isNewModelAvailable = useBenefitAvailable({
101
+ scene: PremiumPaywallScene.NewModel,
102
+ });
103
+ const { node: premiumPaywallModal, open: openPremiumPaywallModal } =
104
+ usePremiumPaywallModal({ scene: PremiumPaywallScene.NewModel });
105
+
106
+ return (
107
+ <>
108
+ <article
109
+ ref={ref}
110
+ className={cls(
111
+ 'pl-[16px] pr-[12px] w-full relative',
112
+ 'flex gap-[16px] items-center rounded-[12px]',
113
+ selected
114
+ ? 'coz-mg-hglt hover:coz-mg-hglt-hovered'
115
+ : 'hover:coz-mg-secondary-hovered active:coz-mg-secondary-pressed',
116
+ disabled ? 'cursor-not-allowed' : 'cursor-pointer',
117
+ // The following cls only hide the upper and lower dividing lines when implementing hover, active, and last (note that the dividing lines are in model-info-border, the designer's careful thought)
118
+ styles['model-option'],
119
+ // @ts-expect-error -- I don't know why the error is reported.
120
+ { [styles['model-option_selected']]: selected },
121
+ )}
122
+ onClick={() => {
123
+ if (disabled) {
124
+ return;
125
+ }
126
+ if (isProModel && !isNewModelAvailable) {
127
+ openPremiumPaywallModal();
128
+ return;
129
+ }
130
+ onClick();
131
+ }}
132
+ >
133
+ <ModelOptionAvatar model={model} />
134
+ <div
135
+ className={cls(
136
+ 'h-[80px] py-[12px] w-full',
137
+ 'flex flex-col overflow-hidden',
138
+ 'border-0 border-b border-solid coz-stroke-primary',
139
+ styles['model-info-border'],
140
+ )}
141
+ style={
142
+ isHovering
143
+ ? {
144
+ mask: calcMaskStyle([
145
+ props.enableConfig,
146
+ props.enableJumpDetail,
147
+ ]),
148
+ }
149
+ : undefined
150
+ }
151
+ >
152
+ <div className="w-full flex items-center gap-[6px] overflow-hidden">
153
+ <Typography.Title fontSize="14px" ellipsis={{ showTooltip: true }}>
154
+ {model.name}
155
+ </Typography.Title>
156
+ <div className="shrink-0 flex gap-[6px]">
157
+ {model.model_status_details?.is_free_model &&
158
+ scene !== BotCreatorScene.DouyinBot ? (
159
+ <Tag size="mini" color="primary" className="!coz-mg-plus">
160
+ {I18n.t('model_list_free')}
161
+ </Tag>
162
+ ) : null}
163
+ {isProModel && !isNewModelAvailable ? (
164
+ <IconCozDiamondFill className="coz-fg-hglt" />
165
+ ) : null}
166
+ {featureTags?.length
167
+ ? featureTags.map(feature => (
168
+ <Tag
169
+ key={feature}
170
+ size="mini"
171
+ color="primary"
172
+ className="!bg-transparent !border border-solid coz-stroke-plus"
173
+ >
174
+ {feature}
175
+ </Tag>
176
+ ))
177
+ : null}
178
+ </div>
179
+ </div>
180
+ <div className="flex items-center text-[12px] leading-[16px] coz-fg-dim overflow-hidden">
181
+ <ModelTag isFirst>
182
+ {((model.model_quota?.token_limit || 0) / 1024).toFixed(0)}K
183
+ </ModelTag>
184
+ <ModelTag
185
+ isLast={!functionTags?.length}
186
+ className="flex items-center gap-[4px]"
187
+ >
188
+ <span>{model.model_name}</span>
189
+ {model.model_status_details?.update_info ? (
190
+ <Tooltip content={model.model_status_details.update_info}>
191
+ <IconCozLongArrowUpCircle className="ml-[2px] coz-fg-hglt-green" />
192
+ </Tooltip>
193
+ ) : null}
194
+ </ModelTag>
195
+ {functionTags?.length ? (
196
+ <Tooltip content={functionTags.join(IS_OVERSEA ? ', ' : '、')}>
197
+ <span className="overflow-hidden">
198
+ <OverflowList
199
+ items={functionTags}
200
+ visibleItemRenderer={(item, idx) => (
201
+ <ModelTag
202
+ key={idx}
203
+ isLast={idx === functionTags.length - 1}
204
+ >
205
+ {item}
206
+ </ModelTag>
207
+ )}
208
+ overflowRenderer={restItems => (
209
+ <span className="pl-[6px] flex items-center">{`+${restItems.length}`}</span>
210
+ )}
211
+ collapseFrom="end"
212
+ />
213
+ </span>
214
+ </Tooltip>
215
+ ) : null}
216
+ </div>
217
+ <Typography.Text
218
+ className="mt-[4px] text-[12px] leading-[16px] coz-fg-secondary"
219
+ ellipsis={{ showTooltip: true }}
220
+ >
221
+ {model.model_brief_desc}
222
+ </Typography.Text>
223
+ </div>
224
+ {isHovering ? (
225
+ <div className="absolute right-[12px] h-full flex items-center gap-[3px]">
226
+ {props.enableConfig ? (
227
+ <IconButton
228
+ icon={<IconCozSetting />}
229
+ color="secondary"
230
+ size="default"
231
+ data-testid="model_select_option.config_btn"
232
+ onClick={e => {
233
+ e.stopPropagation();
234
+
235
+ // paywall blocking
236
+ if (isProModel && !isNewModelAvailable) {
237
+ openPremiumPaywallModal();
238
+ return;
239
+ }
240
+
241
+ if (selected) {
242
+ props.onConfigClick();
243
+ return;
244
+ }
245
+ const success = onClick();
246
+ if (success) {
247
+ setTimeout(() => props.onConfigClick());
248
+ }
249
+ }}
250
+ />
251
+ ) : null}
252
+ {props.enableJumpDetail ? (
253
+ <IconButton
254
+ icon={<IconCozLongArrowTopRight />}
255
+ color="secondary"
256
+ size="default"
257
+ data-testid="model_select_option.detail_btn"
258
+ onClick={e => {
259
+ e.stopPropagation();
260
+ props.onDetailClick(String(model.model_type));
261
+ }}
262
+ />
263
+ ) : null}
264
+ </div>
265
+ ) : null}
266
+ </article>
267
+ {premiumPaywallModal}
268
+ </>
269
+ );
270
+ }
271
+
272
+ function ModelTag({
273
+ isFirst,
274
+ isLast,
275
+ className,
276
+ children,
277
+ }: PropsWithChildren<{
278
+ isFirst?: boolean;
279
+ isLast?: boolean;
280
+ className?: string;
281
+ }>) {
282
+ return (
283
+ <div
284
+ className={cls(
285
+ { 'pl-[6px]': !isFirst },
286
+ 'shrink-0 flex items-center gap-[6px]',
287
+ )}
288
+ >
289
+ <span className={className}>{children}</span>
290
+ {isLast ? null : (
291
+ <span className="h-[9px] border-0 border-r border-solid coz-stroke-primary" />
292
+ )}
293
+ </div>
294
+ );
295
+ }
296
+
297
+ /**
298
+ * When hovering to display several icons (such as jumping to the model details page and detailed configuration), there should be a gradual change mask effect on the content under the icon
299
+ * This method is used to calculate the mask style
300
+ */
301
+ function calcMaskStyle(buttonVisible: Array<boolean | undefined>) {
302
+ const btnNum = buttonVisible.reduce(
303
+ (prevNum, showBtn) => prevNum + (showBtn ? 1 : 0),
304
+ 0,
305
+ );
306
+ if (btnNum === 0) {
307
+ return 'none';
308
+ }
309
+
310
+ const BTN_WIDTH = 32;
311
+ const BTN_GAP = 3;
312
+ /** Fixed width of mask that does not vary with the number of buttons */
313
+ const PRESET_PADDING = 16;
314
+ /** A gradual change in the width of the mask */
315
+ const MASK_WIDTH = 24;
316
+
317
+ const gradientStart =
318
+ btnNum * BTN_WIDTH + (btnNum - 1) * BTN_GAP + PRESET_PADDING;
319
+ const gradientEnd = gradientStart + MASK_WIDTH;
320
+ return `linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0) ${gradientStart}px, #fff ${gradientEnd}px)`;
321
+ }