@next-bricks/ai-portal 0.70.0 → 0.70.2

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 (148) hide show
  1. package/dist/bricks.json +42 -42
  2. package/dist/chunks/7202.a893b0e6.js.map +1 -1
  3. package/dist/chunks/action-buttons.68666920.js.map +1 -1
  4. package/dist/chunks/activity-timeline.96e7aaea.js.map +1 -1
  5. package/dist/chunks/ai-agents.cffd08a0.js.map +1 -1
  6. package/dist/chunks/ai-employees.267c3626.js.map +1 -1
  7. package/dist/chunks/blank-state.648eea95.js.map +1 -1
  8. package/dist/chunks/chat-input.444c80bb.js.map +1 -1
  9. package/dist/chunks/chat-panel-welcome.2f7c6c8b.js.map +1 -1
  10. package/dist/chunks/chat-panel.3160f2e8.js.map +1 -1
  11. package/dist/chunks/chat-stream.393c8241.js.map +1 -1
  12. package/dist/chunks/cruise-canvas.bfae3138.js.map +1 -1
  13. package/dist/chunks/dropdown-select.336442ba.js.map +1 -1
  14. package/dist/chunks/elevo-card.49b42ed0.js.map +1 -1
  15. package/dist/chunks/elevo-logo.25e3b889.js.map +1 -1
  16. package/dist/chunks/elevo-sidebar.a197a77f.js.map +1 -1
  17. package/dist/chunks/flow-tabs.ee1290c2.js.map +1 -1
  18. package/dist/chunks/goal-card-list.74ab5767.js.map +1 -1
  19. package/dist/chunks/home-container.f1829834.js.map +1 -1
  20. package/dist/chunks/icon-button.545ffb24.js.map +1 -1
  21. package/dist/chunks/mcp-tools.f132c502.js.map +1 -1
  22. package/dist/chunks/notice-dropdown.63cb2415.js.map +1 -1
  23. package/dist/chunks/page-container.2185f2e0.js.map +1 -1
  24. package/dist/chunks/preview-container.a0ca6e2f.js.map +1 -1
  25. package/dist/chunks/project-knowledges.51731410.js.map +1 -1
  26. package/dist/chunks/running-flow.37a428cf.js.map +1 -1
  27. package/dist/chunks/show-case.44e995fc.js.map +1 -1
  28. package/dist/chunks/show-cases.c3921ea0.js.map +1 -1
  29. package/dist/chunks/space-chat-guide.84f4a1e7.js.map +1 -1
  30. package/dist/chunks/space-logo.994f7a25.js.map +1 -1
  31. package/dist/chunks/space-workbench.8c064898.js.map +1 -1
  32. package/dist/chunks/stage-flow.9b6fad93.js.map +1 -1
  33. package/dist/chunks/stat-with-mini-chart.1509cf8c.js.map +1 -1
  34. package/dist/chunks/sticky-container.d3f7054e.js.map +1 -1
  35. package/dist/chunks/tab-list.ee97567f.js.map +1 -1
  36. package/dist/examples.json +52 -40
  37. package/dist/{index.8e0adc27.js → index.94998c36.js} +2 -2
  38. package/dist/{index.8e0adc27.js.map → index.94998c36.js.map} +1 -1
  39. package/dist/manifest.json +594 -313
  40. package/dist/types.json +796 -796
  41. package/dist-types/action-buttons/index.d.ts +10 -1
  42. package/dist-types/activity-timeline/index.d.ts +10 -1
  43. package/dist-types/ai-agents/index.d.ts +10 -1
  44. package/dist-types/ai-employees/index.d.ts +16 -1
  45. package/dist-types/blank-state/index.d.ts +10 -1
  46. package/dist-types/chat-input/index.d.ts +37 -1
  47. package/dist-types/chat-panel/index.d.ts +45 -3
  48. package/dist-types/chat-stream/index.d.ts +62 -1
  49. package/dist-types/cruise-canvas/index.d.ts +71 -1
  50. package/dist-types/dropdown-select/index.d.ts +3 -1
  51. package/dist-types/elevo-card/index.d.ts +5 -1
  52. package/dist-types/elevo-logo/index.d.ts +3 -1
  53. package/dist-types/elevo-sidebar/index.d.ts +19 -2
  54. package/dist-types/flow-tabs/index.d.ts +5 -1
  55. package/dist-types/gantt-chart/index.d.ts +3 -1
  56. package/dist-types/goal-card-list/index.d.ts +8 -1
  57. package/dist-types/home-container/index.d.ts +4 -1
  58. package/dist-types/icon-button/index.d.ts +4 -1
  59. package/dist-types/mcp-tools/index.d.ts +3 -1
  60. package/dist-types/page-container/index.d.ts +7 -0
  61. package/dist-types/preview-container/index.d.ts +4 -0
  62. package/dist-types/project-knowledges/index.d.ts +5 -0
  63. package/dist-types/running-flow/index.d.ts +3 -0
  64. package/dist-types/show-case/index.d.ts +5 -0
  65. package/dist-types/show-cases/index.d.ts +4 -0
  66. package/dist-types/space-workbench/chat-panel-welcome/index.d.ts +3 -0
  67. package/dist-types/space-workbench/index.d.ts +7 -0
  68. package/dist-types/space-workbench/space-chat-guide/index.d.ts +3 -0
  69. package/dist-types/space-workbench/space-logo/index.d.ts +1 -0
  70. package/dist-types/stage-flow/index.d.ts +21 -0
  71. package/dist-types/stat-with-mini-chart/index.d.ts +10 -0
  72. package/dist-types/sticky-container/index.d.ts +3 -0
  73. package/dist-types/tab-list/index.d.ts +4 -0
  74. package/docs/action-buttons.md +59 -10
  75. package/docs/action-buttons.react.md +80 -0
  76. package/docs/activity-timeline.md +51 -7
  77. package/docs/activity-timeline.react.md +109 -0
  78. package/docs/ai-agents.md +62 -2
  79. package/docs/ai-agents.react.md +73 -0
  80. package/docs/ai-employees.md +76 -2
  81. package/docs/ai-employees.react.md +106 -0
  82. package/docs/blank-state.md +62 -2
  83. package/docs/blank-state.react.md +77 -0
  84. package/docs/chat-box.md +134 -52
  85. package/docs/chat-box.react.md +142 -0
  86. package/docs/chat-input.md +117 -1
  87. package/docs/chat-input.react.md +117 -0
  88. package/docs/chat-panel-welcome.md +39 -0
  89. package/docs/chat-panel-welcome.react.md +41 -0
  90. package/docs/chat-panel.md +86 -3
  91. package/docs/chat-panel.react.md +109 -0
  92. package/docs/chat-stream.md +149 -2
  93. package/docs/chat-stream.react.md +155 -0
  94. package/docs/cruise-canvas.md +159 -0
  95. package/docs/cruise-canvas.react.md +159 -0
  96. package/docs/dropdown-select.md +37 -8
  97. package/docs/dropdown-select.react.md +144 -0
  98. package/docs/elevo-card.md +75 -1
  99. package/docs/elevo-card.react.md +104 -0
  100. package/docs/elevo-logo.md +13 -1
  101. package/docs/elevo-logo.react.md +27 -0
  102. package/docs/elevo-sidebar.md +150 -1
  103. package/docs/elevo-sidebar.react.md +149 -0
  104. package/docs/flow-tabs.md +97 -2
  105. package/docs/flow-tabs.react.md +102 -0
  106. package/docs/gantt-chart.md +101 -0
  107. package/docs/gantt-chart.react.md +125 -0
  108. package/docs/goal-card-list.md +149 -13
  109. package/docs/goal-card-list.react.md +185 -0
  110. package/docs/home-container.md +48 -2
  111. package/docs/home-container.react.md +51 -0
  112. package/docs/icon-button.md +128 -2
  113. package/docs/icon-button.react.md +120 -0
  114. package/docs/mcp-tools.md +105 -2
  115. package/docs/mcp-tools.react.md +117 -0
  116. package/docs/notice-dropdown.md +53 -10
  117. package/docs/notice-dropdown.react.md +167 -0
  118. package/docs/notice-list.md +53 -5
  119. package/docs/notice-list.react.md +121 -0
  120. package/docs/page-container.md +80 -3
  121. package/docs/page-container.react.md +83 -0
  122. package/docs/preview-container.md +22 -32
  123. package/docs/preview-container.react.md +71 -0
  124. package/docs/project-conversations.md +85 -4
  125. package/docs/project-conversations.react.md +110 -0
  126. package/docs/project-knowledges.md +73 -8
  127. package/docs/project-knowledges.react.md +85 -0
  128. package/docs/running-flow.md +57 -2
  129. package/docs/running-flow.react.md +90 -0
  130. package/docs/show-case.md +48 -3
  131. package/docs/show-case.react.md +60 -0
  132. package/docs/show-cases.md +52 -2
  133. package/docs/show-cases.react.md +92 -0
  134. package/docs/space-chat-guide.md +32 -0
  135. package/docs/space-chat-guide.react.md +39 -0
  136. package/docs/space-logo.md +53 -0
  137. package/docs/space-logo.react.md +46 -0
  138. package/docs/space-workbench.md +45 -2
  139. package/docs/space-workbench.react.md +102 -0
  140. package/docs/stage-flow.md +122 -26
  141. package/docs/stage-flow.react.md +112 -0
  142. package/docs/stat-with-mini-chart.md +64 -159
  143. package/docs/stat-with-mini-chart.react.md +113 -0
  144. package/docs/sticky-container.md +56 -3
  145. package/docs/sticky-container.react.md +60 -0
  146. package/docs/tab-list.md +74 -3
  147. package/docs/tab-list.react.md +73 -0
  148. package/package.json +2 -2
@@ -1,98 +1,110 @@
1
1
  {
2
- "ai-portal.elevo-sidebar": {
3
- "doc": "构件 `ai-portal.elevo-sidebar`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.elevo-sidebar\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-sidebar></ai-portal.elevo-sidebar>\n# \n```\n"
2
+ "ai-portal.cruise-canvas": {
3
+ "doc": "---\ntagName: ai-portal.cruise-canvas\ndisplayName: WrappedAiPortalCruiseCanvas\ndescription: AI 任务执行画布,以节点图形式展示任务的执行过程,支持任务回放、反馈及 UI 切换等功能。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.cruise-canvas\n\n> AI 任务执行画布,以节点图形式展示任务的执行过程,支持任务回放、反馈及 UI 切换等功能。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------------------- | -------------------------------------- | ---- | ------ | -------------------------------------------------------- |\n| conversationId | `string \\| undefined` | 否 | - | 对话 ID |\n| initialRequest | `RequestStore \\| undefined \\| null` | 否 | - | 初始请求数据。仅初始设置有效。 |\n| replay | `boolean \\| undefined` | 否 | - | 是否启用回放。仅初始设置有效。 |\n| replayDelay | `number \\| undefined` | 否 | `2` | 设置回放时消息之间的时间间隔,单位为秒。仅初始设置有效。 |\n| supports | `Record<string, boolean> \\| undefined` | 否 | - | 功能开关配置,键为功能名,值为是否启用 |\n| showHiddenJobs | `boolean \\| undefined` | 否 | - | 是否显示隐藏的 Job 节点 |\n| showHumanActions | `boolean \\| undefined` | 否 | - | 是否显示 Human-in-the-loop 操作按钮 |\n| showFeedback | `boolean \\| undefined` | 否 | - | 是否显示反馈按钮 |\n| showFeedbackAfterFailed | `boolean \\| undefined` | 否 | - | 是否在任务失败时也显示反馈按钮 |\n| showFeedbackOnView | `boolean \\| undefined` | 否 | - | 是否在查看生成视图时显示反馈按钮 |\n| showUiSwitch | `boolean \\| undefined` | 否 | - | 是否显示切换到对话流视图的按钮 |\n| hideMermaid | `boolean \\| undefined` | 否 | - | 是否隐藏 Mermaid 图表渲染,通过 CSS 属性选择器控制样式 |\n| showJsxEditor | `boolean \\| undefined` | 否 | - | 是否显示 JSX 编辑器按钮 |\n| previewUrlTemplate | `string \\| undefined` | 否 | - | 生成视图预览页的 URL 模板,支持 {viewId} 等字段插值 |\n| showCases | `ShowCaseType[] \\| undefined` | 否 | - | 示例场景列表,用于在空对话时展示快速入口 |\n| exampleProjects | `ExampleProject[] \\| undefined` | 否 | - | 示例项目列表,用于展示可参考的已有项目 |\n| tryItOutUrl | `string \\| undefined` | 否 | - | \"试一试\"跳转 URL |\n| separateInstructions | `boolean \\| undefined` | 否 | - | 是否将任务说明独立展示,而非内联在节点中 |\n| aiEmployees | `AIEmployee[] \\| undefined` | 否 | - | 可 @ 提及的数字人列表 |\n| commands | `Command[] \\| undefined` | 否 | - | 命令列表,支持通过 / 或搜索触发联想 |\n| uploadOptions | `UploadOptions \\| undefined` | 否 | - | 文件上传配置 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ---------------- | ------------------------------------------------------------------------------- | ---------------------------------- |\n| share | `void` | 用户点击分享时触发 |\n| terminate | `void` | 用户点击终止任务时触发 |\n| feedback.submit | `FeedbackDetail` — { plan: 计划步骤列表, result: 结果列表, feedback: 反馈文本 } | 用户提交反馈时触发 |\n| feedback.on.view | `string` — 生成视图的 viewId | 用户查看生成视图时的反馈事件触发 |\n| ui.switch | `\"chat\"` — 切换目标 UI 模式,值为 \"chat\" | 用户点击切换到对话流视图按钮时触发 |\n| detail.change | `ConversationDetail` — { projectId: 关联的项目 ID } | 对话详情信息变化时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| -------------------- | -------------------------- | ------ | -------------------------------------- |\n| resumed | `() => void` | `void` | 通知组件任务已恢复,用于继续中断的对话 |\n| feedbackSubmitDone | `() => void` | `void` | 通知组件反馈提交成功 |\n| feedbackSubmitFailed | `() => void` | `void` | 通知组件反馈提交失败 |\n| feedbackOnViewDone | `(viewId: string) => void` | `void` | 通知组件查看视图的反馈处理完成 |\n\n## Examples\n\n### Basic\n\n展示 AI 任务画布的基本用法,通过 conversationId 加载已有对话的执行过程。\n\n```yaml preview\nbrick: ai-portal.cruise-canvas\nproperties:\n conversationId: conv-001\nevents:\n share:\n action: console.log\n terminate:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.cruise-canvas\n# conversation-id=\"conv-001\"\n# id=\"brick-1\"\n# ></ai-portal.cruise-canvas>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"share\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"terminate\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Feedback\n\n开启反馈功能,在任务完成后收集用户反馈。\n\n```yaml preview\n- brick: ai-portal.cruise-canvas\n properties:\n id: cruiseCanvas\n conversationId: conv-001\n showFeedback: true\n showFeedbackAfterFailed: true\n showFeedbackOnView: true\n events:\n feedback.submit:\n useProvider: my-feedback-provider\n args:\n - <% EVENT.detail %>\n callback:\n success:\n target: \"#cruiseCanvas\"\n method: feedbackSubmitDone\n error:\n target: \"#cruiseCanvas\"\n method: feedbackSubmitFailed\n detail.change:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.cruise-canvas\n# conversation-id=\"conv-001\"\n# show-feedback\n# show-feedback-after-failed\n# show-feedback-on-view\n# id=\"cruiseCanvas\"\n# ></ai-portal.cruise-canvas>\n# \n# <script>\n# const cruiseCanvas = document.getElementById(\"cruiseCanvas\");\n# cruiseCanvas.addEventListener(\"feedback.submit\", (e) => {\n# const provider = document.createElement(\"my-feedback-provider\");\n# const promise = Promise.resolve(provider.resolve(e.detail));\n# promise.then((r) => {\n# const brick = document.querySelector(\"#cruiseCanvas\");\n# brick.feedbackSubmitDone();\n# });\n# promise.catch((r) => {\n# const brick = document.querySelector(\"#cruiseCanvas\");\n# brick.feedbackSubmitFailed();\n# });\n# });\n# cruiseCanvas.addEventListener(\"detail.change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With UI Switch and Canvas Options\n\n启用 UI 切换按钮,并展示隐藏节点和独立说明。\n\n```yaml preview\nbrick: ai-portal.cruise-canvas\nproperties:\n conversationId: conv-001\n showUiSwitch: true\n showHiddenJobs: true\n showHumanActions: true\n separateInstructions: true\n showJsxEditor: true\nevents:\n ui.switch:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.cruise-canvas\n# conversation-id=\"conv-001\"\n# show-ui-switch\n# show-hidden-jobs\n# show-human-actions\n# separate-instructions\n# show-jsx-editor\n# id=\"brick-1\"\n# ></ai-portal.cruise-canvas>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"ui.switch\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Replay Mode\n\n使用回放模式展示历史任务的执行过程。\n\n```yaml preview\nbrick: ai-portal.cruise-canvas\nproperties:\n conversationId: conv-001\n replay: true\n replayDelay: 2\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.cruise-canvas\n# conversation-id=\"conv-001\"\n# replay\n# replay-delay=\"2\"\n# ></ai-portal.cruise-canvas>\n# \n```\n\n### With Upload and Show Cases\n\n配置文件上传及示例场景,丰富画布的入口展示。\n\n```yaml preview\nbrick: ai-portal.cruise-canvas\nproperties:\n conversationId: conv-001\n uploadOptions:\n enabled: true\n accept: image/*,.pdf\n maxFiles: 3\n showCases:\n - conversationId: show-001\n title: 自动化部署流程\n summary: 通过 AI 自动完成服务部署\n scenario: devops\n exampleProjects:\n - instanceId: proj-001\n name: 示例项目\n tryItOutUrl: /try-it-out\n previewUrlTemplate: /preview/{viewId}\nevents:\n share:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.cruise-canvas\n# conversation-id=\"conv-001\"\n# try-it-out-url=\"/try-it-out\"\n# preview-url-template=\"/preview/{viewId}\"\n# id=\"brick-1\"\n# ></ai-portal.cruise-canvas>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.uploadOptions = {\n# enabled: true,\n# accept: \"image/*,.pdf\",\n# maxFiles: 3,\n# };\n# brick_1.showCases = [\n# {\n# conversationId: \"show-001\",\n# title: \"自动化部署流程\",\n# summary: \"通过 AI 自动完成服务部署\",\n# scenario: \"devops\",\n# },\n# ];\n# brick_1.exampleProjects = [\n# {\n# instanceId: \"proj-001\",\n# name: \"示例项目\",\n# },\n# ];\n# brick_1.addEventListener(\"share\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
4
+ },
5
+ "ai-portal.chat-box": {
6
+ "doc": "---\ntagName: ai-portal.chat-box\ndisplayName: WrappedAiPortalChatBox\ndescription: 大型聊天输入框,用于首页,支持命令联想、@提及数字人、文件上传等功能。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.chat-box\n\n> 大型聊天输入框,用于首页,支持命令联想、@提及数字人、文件上传等功能。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------------- | ---------------------------- | ---- | ------ | ----------------------------------- |\n| disabled | `boolean \\| undefined` | 否 | - | 是否禁用输入框 |\n| placeholder | `string \\| undefined` | 否 | - | 输入框占位文字 |\n| autoFocus | `boolean \\| undefined` | 否 | - | 是否自动聚焦 |\n| aiEmployees | `AIEmployee[] \\| undefined` | 否 | - | 可 @ 提及的数字人列表 |\n| commands | `Command[] \\| undefined` | 否 | - | 命令列表,支持通过 / 或搜索触发联想 |\n| uploadOptions | `UploadOptions \\| undefined` | 否 | - | 文件上传配置 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| -------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |\n| message.submit | `string` — 用户输入的消息文本内容 | 用户提交消息时触发(已废弃,请使用 chat.submit 事件) |\n| chat.submit | `ChatPayload` — { content: 消息内容, files: 上传的文件列表, cmd: 命令载荷, aiEmployeeId: @提及的数字人 ID } | 用户提交聊天消息时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| ------------ | ------------------------- | ------ | ------------------ |\n| setValue | `(value: string) => void` | `void` | 设置输入框的值 |\n| getValue | `() => void` | `void` | 获取输入框当前的值 |\n| focusOnInput | `() => void` | `void` | 使输入框获得焦点 |\n\n## Slots\n\n| 名称 | 说明 |\n| ------- | -------------------------------------------- |\n| actions | 操作栏左侧插槽,用于放置动作按钮等自定义内容 |\n\n## Examples\n\n### Basic\n\n展示大型聊天输入框的基本用法,配置占位文字和提交事件监听。\n\n```yaml preview\nbrick: ai-portal.chat-box\nproperties:\n placeholder: 请输入您的问题,按 Enter 发送\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box\n# placeholder=\"请输入您的问题,按 Enter 发送\"\n# id=\"brick-1\"\n# ></ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Action Buttons\n\n通过 actions 插槽添加动作按钮,实现深度思考和联网搜索等功能入口。\n\n```yaml preview\nbrick: ai-portal.chat-box\nproperties:\n placeholder: 请输入您的问题\nchildren:\n - brick: ai-portal.action-buttons\n slot: actions\n properties:\n items:\n - key: think\n text: 深度思考\n icon:\n lib: antd\n theme: outlined\n icon: reddit\n - key: networking\n text: 联网搜索\n icon:\n lib: antd\n theme: outlined\n icon: global\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box placeholder=\"请输入您的问题\" id=\"brick-1\">\n# <ai-portal.action-buttons\n# slot=\"actions\"\n# id=\"brick-2\"\n# ></ai-portal.action-buttons>\n# </ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# \n# const brick_2 = document.getElementById(\"brick-2\");\n# brick_2.items = [\n# {\n# key: \"think\",\n# text: \"深度思考\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"reddit\",\n# },\n# },\n# {\n# key: \"networking\",\n# text: \"联网搜索\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"global\",\n# },\n# },\n# ];\n# </script>\n# \n```\n\n### With File Upload\n\n配置 uploadOptions 属性,启用文件上传功能。\n\n```yaml preview\nbrick: ai-portal.chat-box\nproperties:\n placeholder: 请输入您的问题,或拖入文件\n uploadOptions:\n enabled: true\n accept: image/*,.pdf\n maxFiles: 5\n maxSize: 10485760\n readableAccept: 图片或 PDF\n readableMaxSize: 10MB\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box\n# placeholder=\"请输入您的问题,或拖入文件\"\n# id=\"brick-1\"\n# ></ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.uploadOptions = {\n# enabled: true,\n# accept: \"image/*,.pdf\",\n# maxFiles: 5,\n# maxSize: 10485760,\n# readableAccept: \"图片或 PDF\",\n# readableMaxSize: \"10MB\",\n# };\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With AI Employees\n\n配置 aiEmployees 属性,支持在输入时 @ 提及数字人。\n\n```yaml preview\nbrick: ai-portal.chat-box\nproperties:\n placeholder: 输入 @ 可提及数字人\n aiEmployees:\n - employeeId: emp001\n name: 运维工程师小李\n - employeeId: emp002\n name: 数据分析师小张\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box\n# placeholder=\"输入 @ 可提及数字人\"\n# id=\"brick-1\"\n# ></ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.aiEmployees = [\n# {\n# employeeId: \"emp001\",\n# name: \"运维工程师小李\",\n# },\n# {\n# employeeId: \"emp002\",\n# name: \"数据分析师小张\",\n# },\n# ];\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Programmatic Control\n\n通过方法调用控制输入框,实现预填内容和焦点管理。\n\n```yaml preview\n- brick: eo-button\n properties:\n textContent: 填写示例问题\n events:\n click:\n target: \"#chatBox\"\n method: setValue\n args:\n - 如何优化服务器性能?\n- brick: ai-portal.chat-box\n properties:\n id: chatBox\n placeholder: 请输入您的问题\n events:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <eo-button id=\"brick-1\">填写示例问题</eo-button>\n# <ai-portal.chat-box\n# placeholder=\"请输入您的问题\"\n# id=\"chatBox\"\n# ></ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"click\", (e) => {\n# const brick = document.querySelector(\"#chatBox\");\n# brick.setValue(\"如何优化服务器性能?\");\n# });\n# \n# const chatBox = document.getElementById(\"chatBox\");\n# chatBox.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
4
7
  },
5
8
  "ai-portal.home-container": {
6
- "doc": "构件 `ai-portal.home-container`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.home-container\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>Hello world</ai-portal.home-container>\n# \n```\n"
9
+ "doc": "---\ntagName: ai-portal.home-container\ndisplayName: WrappedAiPortalHomeContainer\ndescription: AI Portal 首页容器,通过 sticky 属性控制顶部吸附行为,内容通过默认插槽传入。\ncategory: layout-component\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.home-container\n\n> AI Portal 首页容器,通过 sticky 属性控制顶部吸附行为,内容通过默认插槽传入。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------ | --------- | ---- | ------ | ----------------------------------------------------------------- |\n| sticky | `boolean` | 否 | - | 是否启用顶部吸附样式,通过 CSS 属性选择器控制布局,不触发重新渲染 |\n\n## Slots\n\n| 名称 | 说明 |\n| ------- | ------------ |\n| default | 页面内容区域 |\n\n## Examples\n\n### Basic\n\n作为页面内容的包裹容器,传入子构件。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: span\n properties:\n textContent: Hello world\n style:\n padding: 16px\n display: block\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <span style=\"padding: 16px; display: block\">Hello world</span>\n# </ai-portal.home-container>\n# \n```\n\n### With Sticky\n\n启用 sticky 吸附样式的首页容器。\n\n```yaml preview\nbrick: ai-portal.home-container\nproperties:\n sticky: true\nchildren:\n - brick: span\n properties:\n textContent: 吸附布局内容\n style:\n padding: 16px\n display: block\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container sticky>\n# <span style=\"padding: 16px; display: block\">吸附布局内容</span>\n# </ai-portal.home-container>\n# \n```\n"
7
10
  },
8
- "ai-portal.chat-box": {
9
- "doc": "构件 `ai-portal.chat-box`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.chat-box\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box>Hello world</ai-portal.chat-box>\n# \n```\n\n### With cruise canvas\n\n```yaml preview minHeight=\"600px\"\nbrick: div\nproperties:\n style:\n width: 100vw\n height: 100vh\n position: fixed\n top: 0\n left: 0\ncontext:\n - name: task\nchildren:\n - brick: ai-portal.chat-box\n if: <%= !CTX.task %>\n properties:\n style:\n position: absolute\n width: 500px\n maxWidth: 90vw\n maxHeight: 90vh\n top: 50%\n left: 50%\n transform: translate(-50%, -50%)\n events:\n message.submit:\n useProvider: basic.http-request\n args:\n - \"<% `${BASE_URL}/api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create` %>\"\n # - /api/mocks/task/send\n # - \"http://localhost:8888/.netlify/functions/task-send\"\n # - \"https://serverless-mocks.netlify.app/.netlify/functions/task-send\"\n - method: POST\n body: |\n <%\n JSON.stringify({\n input: EVENT.detail\n })\n %>\n headers:\n Content-Type: application/json\n callback:\n error:\n action: handleHttpError\n success:\n action: context.replace\n args:\n - task\n - <% EVENT.detail %>\n - brick: ai-portal.cruise-canvas\n if: <%= !!CTX.task %>\n properties:\n taskId: <% CTX.task.id %>\n# -- YAML DELIMITER (1nbbm8) --\n# <div style=\"width: 100vw; height: 100vh; position: fixed; top: 0; left: 0\">\n# <ai-portal.chat-box\n# style=\"\n# position: absolute;\n# width: 500px;\n# max-width: 90vw;\n# max-height: 90vh;\n# top: 50%;\n# left: 50%;\n# transform: translate(-50%, -50%);\n# \"\n# id=\"brick-1\"\n# ></ai-portal.chat-box>\n# <ai-portal.cruise-canvas\n# task-id=\"&lt;% CTX.task.id %&gt;\"\n# ></ai-portal.cruise-canvas>\n# </div>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"message.submit\", (e) => {\n# const provider = document.createElement(\"basic.http-request\");\n# const promise = Promise.resolve(\n# provider.resolve(\n# /* WARN: incompatible expressions in HTML, please try YAML: */\n# \"<% `${BASE_URL}/api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create` %>\",\n# {\n# method: \"POST\",\n# body: \"<%\\n JSON.stringify({\\n input: EVENT.detail\\n })\\n%>\\n\",\n# headers: { \"Content-Type\": \"application/json\" },\n# }\n# )\n# );\n# promise.then((r) => {\n# // WARN: encountered incompatible event handlers in HTML mode, please try YAML.\n# });\n# promise.catch((r) => {\n# // WARN: encountered incompatible event handlers in HTML mode, please try YAML.\n# });\n# });\n# </script>\n# \n```\n"
11
+ "ai-portal.stat-with-mini-chart": {
12
+ "doc": "---\ntagName: ai-portal.stat-with-mini-chart\ndisplayName: WrappedAiPortalStatWithMiniChart\ndescription: 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.stat-with-mini-chart\n\n> 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | -------------------------- | ---- | ---------------------- | --------------------------------------------------- |\n| label | `string` | 否 | - | 统计指标标签名称 |\n| value | `string` | 否 | - | 统计数值文本 |\n| size | `\"medium\" \\| \"small\"` | 否 | `\"medium\"` | 展示尺寸,medium 时图表高度为 92px,small 时为 55px |\n| lineColor | `string` | 否 | `\"var(--color-brand)\"` | 折线颜色 |\n| showArea | `boolean` | 否 | - | 是否在折线下方显示渐变填充区域 |\n| min | `number` | 否 | - | 指定 y 轴最小值,未指定时从数据中计算 |\n| max | `number` | 否 | - | 指定 y 轴最大值,未指定时从数据中计算 |\n| xField | `string` | 否 | `\"0\"` | x 轴字段名(数据中时间字段的 key) |\n| yField | `string` | 否 | `\"1\"` | y 轴字段名(数据中数值字段的 key) |\n| data | `Record<string, number>[]` | 否 | - | 图表数据源,每项为包含 xField 和 yField 字段的对象 |\n\n## Examples\n\n### 基础使用(medium 尺寸)\n\n展示带标签、数值和迷你折线图的统计卡片,默认 medium 尺寸。\n\n```yaml preview\nbrick: ai-portal.stat-with-mini-chart\nproperties:\n label: 请求数\n value: \"563.5\"\n xField: time\n yField: request_total\n lineColor: \"#295DFF\"\n data:\n - request_total: 642.2\n time: 1730597995.403\n - request_total: 621.3\n time: 1730599200\n - request_total: 600.2\n time: 1730601000\n - request_total: 601.9666666666667\n time: 1730602800\n - request_total: 592.4\n time: 1730604600\n - request_total: 567.8666666666667\n time: 1730606400\n - request_total: 651.3333333333334\n time: 1730608200\n - request_total: 571.9677419354839\n time: 1730610000\n - request_total: 550.2\n time: 1730611800\n - request_total: 563.5\n time: 1730683800\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stat-with-mini-chart\n# label=\"请求数\"\n# value=\"563.5\"\n# x-field=\"time\"\n# y-field=\"request_total\"\n# line-color=\"#295DFF\"\n# id=\"brick-1\"\n# ></ai-portal.stat-with-mini-chart>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.data = [\n# {\n# request_total: 642.2,\n# time: 1730597995.403,\n# },\n# {\n# request_total: 621.3,\n# time: 1730599200,\n# },\n# {\n# request_total: 600.2,\n# time: 1730601000,\n# },\n# {\n# request_total: 601.9666666666667,\n# time: 1730602800,\n# },\n# {\n# request_total: 592.4,\n# time: 1730604600,\n# },\n# {\n# request_total: 567.8666666666667,\n# time: 1730606400,\n# },\n# {\n# request_total: 651.3333333333334,\n# time: 1730608200,\n# },\n# {\n# request_total: 571.9677419354839,\n# time: 1730610000,\n# },\n# {\n# request_total: 550.2,\n# time: 1730611800,\n# },\n# {\n# request_total: 563.5,\n# time: 1730683800,\n# },\n# ];\n# </script>\n# \n```\n\n### Small 尺寸\n\nsmall 尺寸时图表高度为 55px,标签和数值紧凑排列在图表左侧。\n\n```yaml preview\nbrick: ai-portal.stat-with-mini-chart\nproperties:\n label: 请求数\n value: \"563.5\"\n size: small\n xField: time\n yField: request_total\n lineColor: \"#295DFF\"\n data:\n - request_total: 642.2\n time: 1730597995.403\n - request_total: 621.3\n time: 1730599200\n - request_total: 600.2\n time: 1730601000\n - request_total: 601.9666666666667\n time: 1730602800\n - request_total: 592.4\n time: 1730604600\n - request_total: 567.8666666666667\n time: 1730606400\n - request_total: 651.3333333333334\n time: 1730608200\n - request_total: 571.9677419354839\n time: 1730610000\n - request_total: 550.2\n time: 1730611800\n - request_total: 563.5\n time: 1730683800\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stat-with-mini-chart\n# label=\"请求数\"\n# value=\"563.5\"\n# size=\"small\"\n# x-field=\"time\"\n# y-field=\"request_total\"\n# line-color=\"#295DFF\"\n# id=\"brick-1\"\n# ></ai-portal.stat-with-mini-chart>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.data = [\n# {\n# request_total: 642.2,\n# time: 1730597995.403,\n# },\n# {\n# request_total: 621.3,\n# time: 1730599200,\n# },\n# {\n# request_total: 600.2,\n# time: 1730601000,\n# },\n# {\n# request_total: 601.9666666666667,\n# time: 1730602800,\n# },\n# {\n# request_total: 592.4,\n# time: 1730604600,\n# },\n# {\n# request_total: 567.8666666666667,\n# time: 1730606400,\n# },\n# {\n# request_total: 651.3333333333334,\n# time: 1730608200,\n# },\n# {\n# request_total: 571.9677419354839,\n# time: 1730610000,\n# },\n# {\n# request_total: 550.2,\n# time: 1730611800,\n# },\n# {\n# request_total: 563.5,\n# time: 1730683800,\n# },\n# ];\n# </script>\n# \n```\n\n### 带填充区域和 y 轴范围\n\n开启 showArea 并指定 min/max 固定 y 轴范围。\n\n```yaml preview\nbrick: ai-portal.stat-with-mini-chart\nproperties:\n label: CPU 使用率\n value: \"78.5%\"\n xField: time\n yField: cpu\n lineColor: \"#FF6B6B\"\n showArea: true\n min: 0\n max: 100\n data:\n - cpu: 65.2\n time: 1730597995\n - cpu: 72.1\n time: 1730599200\n - cpu: 78.5\n time: 1730601000\n - cpu: 80.3\n time: 1730602800\n - cpu: 75.6\n time: 1730604600\n - cpu: 70.2\n time: 1730606400\n - cpu: 78.5\n time: 1730608200\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stat-with-mini-chart\n# label=\"CPU 使用率\"\n# value=\"78.5%\"\n# x-field=\"time\"\n# y-field=\"cpu\"\n# line-color=\"#FF6B6B\"\n# show-area\n# min=\"0\"\n# max=\"100\"\n# id=\"brick-1\"\n# ></ai-portal.stat-with-mini-chart>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.data = [\n# {\n# cpu: 65.2,\n# time: 1730597995,\n# },\n# {\n# cpu: 72.1,\n# time: 1730599200,\n# },\n# {\n# cpu: 78.5,\n# time: 1730601000,\n# },\n# {\n# cpu: 80.3,\n# time: 1730602800,\n# },\n# {\n# cpu: 75.6,\n# time: 1730604600,\n# },\n# {\n# cpu: 70.2,\n# time: 1730606400,\n# },\n# {\n# cpu: 78.5,\n# time: 1730608200,\n# },\n# ];\n# </script>\n# \n```\n"
13
+ },
14
+ "ai-portal.elevo-sidebar": {
15
+ "doc": "---\ntagName: ai-portal.elevo-sidebar\ndisplayName: WrappedAiPortalElevoSidebar\ndescription: Elevo AI 侧边栏,包含 Logo 导航、新建对话、历史记录、项目列表及个人账户操作,支持折叠和抽屉两种行为模式。\ncategory: layout-component\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.elevo-sidebar\n\n> Elevo AI 侧边栏,包含 Logo 导航、新建对话、历史记录、项目列表及个人账户操作,支持折叠和抽屉两种行为模式。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------------------------ | ----------------------- | ---- | ----------- | ---------------------------------------------------------------------- |\n| userInstanceId | `string` | 否 | - | 当前用户的实例 ID,用于显示头像和用户名 |\n| behavior | `\"default\" \\| \"drawer\"` | 否 | - | 侧边栏行为模式,`\"default\"` 为常驻展开/折叠,`\"drawer\"` 为抽屉覆盖模式 |\n| logoUrl | `string` | 否 | - | Logo 区域的跳转链接 |\n| newChatUrl | `string` | 否 | - | 新建对话按钮的跳转链接 |\n| newChatLinkWhenCollapsed | `boolean` | 否 | - | 侧边栏折叠时是否仍显示新建对话快捷入口 |\n| historyUrlTemplate | `string` | 否 | - | 对话历史记录条目的链接模板,支持 `{{conversationId}}` 等占位符 |\n| historyActions | `ActionType[]` | 否 | - | 对话历史记录条目的操作按钮列表 |\n| showProjects | `boolean` | 否 | - | 是否显示项目列表区块 |\n| projectUrlTemplate | `string` | 否 | - | 项目条目的链接模板,支持 `{{instanceId}}` 等占位符 |\n| projectActions | `ActionType[]` | 否 | - | 项目条目的操作按钮列表 |\n| personalActions | `ActionType[]` | 否 | - | 个人账户区域的自定义操作列表,未设置时显示默认的退出登录和切换语言选项 |\n| links | `SidebarLink[]` | 否 | - | 侧边栏顶部的自定义链接列表,显示在新建对话按钮下方 |\n| canAddProject | `boolean` | 否 | `true` | 是否显示新建项目按钮 |\n| myLinks | `SidebarLink[]` | 否 | - | 历史区域顶部的\"我的\"快捷链接列表 |\n| scope | `\"default\" \\| \"space\"` | 否 | `\"default\"` | 视图模式,`\"space\"` 时显示空间导航(SpaceNav)替换历史记录 |\n| spaceNav | `SpaceNavProps` | 否 | - | scope 为 `\"space\"` 时的空间导航配置 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |\n| logout | `void` | 点击退出登录时触发 |\n| action.click | `ActionClickDetail` — { action: 点击的操作项(含 project 等扩展字段), item: 当前对话历史记录项, project: 关联的项目(可选) } | 点击对话历史操作按钮时触发 |\n| project.action.click | `ProjectActionClickDetail` — { action: 点击的操作项, project: 当前项目对象 } | 点击项目操作按钮时触发 |\n| add.project | `void` | 点击新建项目按钮时触发 |\n| add.serviceflow | `void` | 点击新建服务流按钮时触发(scope 为 space 时有效) |\n| personal.action.click | `PersonalActionClickDetail` — { action: 点击的操作项 } | 点击个人操作按钮时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| ---------------- | ---------------------------------- | ------ | -------------------------------------------- |\n| pullHistory | `(delay: number) => void` | `void` | 延迟一段时间后拉取最新对话历史 |\n| open | `() => void` | `void` | 展开侧边栏(behavior 为 drawer 时有效) |\n| close | `() => void` | `void` | 折叠侧边栏(behavior 为 drawer 时有效) |\n| removeProject | `(projectId: string) => void` | `void` | 从历史列表中移除指定项目及其对话 |\n| addProject | `(project: Project) => void` | `void` | 向项目列表中追加一个新项目 |\n| moveConversation | `(conversationId: string) => void` | `void` | 将指定对话标记为已移入项目,从历史列表中隐藏 |\n\n## Examples\n\n### Basic\n\n基础用法,展示默认侧边栏。\n\n```yaml preview\nbrick: ai-portal.elevo-sidebar\nproperties:\n userInstanceId: \"user-001\"\n logoUrl: \"/\"\n newChatUrl: \"/chat/new\"\n historyUrlTemplate: \"/chat/{{conversationId}}\"\nevents:\n logout:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-sidebar\n# user-instance-id=\"user-001\"\n# logo-url=\"/\"\n# new-chat-url=\"/chat/new\"\n# history-url-template=\"/chat/{{conversationId}}\"\n# id=\"brick-1\"\n# ></ai-portal.elevo-sidebar>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"logout\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Projects\n\n启用项目列表,并配置项目操作按钮。\n\n```yaml preview\nbrick: ai-portal.elevo-sidebar\nproperties:\n userInstanceId: \"user-001\"\n logoUrl: \"/\"\n newChatUrl: \"/chat/new\"\n historyUrlTemplate: \"/chat/{{conversationId}}\"\n showProjects: true\n canAddProject: true\n projectUrlTemplate: \"/project/{{instanceId}}\"\n projectActions:\n - key: delete\n text: 删除\n icon:\n lib: antd\n icon: delete\n danger: true\nevents:\n logout:\n action: \"console.log\"\n add.project:\n action: \"console.log\"\n project.action.click:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-sidebar\n# user-instance-id=\"user-001\"\n# logo-url=\"/\"\n# new-chat-url=\"/chat/new\"\n# history-url-template=\"/chat/{{conversationId}}\"\n# show-projects\n# can-add-project\n# project-url-template=\"/project/{{instanceId}}\"\n# id=\"brick-1\"\n# ></ai-portal.elevo-sidebar>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.projectActions = [\n# {\n# key: \"delete\",\n# text: \"删除\",\n# icon: {\n# lib: \"antd\",\n# icon: \"delete\",\n# },\n# danger: true,\n# },\n# ];\n# brick_1.addEventListener(\"logout\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"add.project\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"project.action.click\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Drawer Mode\n\n抽屉模式下,点击折叠按钮后侧边栏以覆盖层形式展开。\n\n```yaml preview\nbrick: ai-portal.elevo-sidebar\nproperties:\n userInstanceId: \"user-001\"\n behavior: drawer\n logoUrl: \"/\"\n newChatUrl: \"/chat/new\"\n historyUrlTemplate: \"/chat/{{conversationId}}\"\nevents:\n logout:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-sidebar\n# user-instance-id=\"user-001\"\n# behavior=\"drawer\"\n# logo-url=\"/\"\n# new-chat-url=\"/chat/new\"\n# history-url-template=\"/chat/{{conversationId}}\"\n# id=\"brick-1\"\n# ></ai-portal.elevo-sidebar>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"logout\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Custom Links and Personal Actions\n\n配置顶部自定义链接和个人账户自定义操作。\n\n```yaml preview\nbrick: ai-portal.elevo-sidebar\nproperties:\n userInstanceId: \"user-001\"\n logoUrl: \"/\"\n newChatUrl: \"/chat/new\"\n historyUrlTemplate: \"/chat/{{conversationId}}\"\n links:\n - title: 工作台\n url: /workbench\n icon:\n lib: antd\n icon: appstore\n myLinks:\n - title: 我的收藏\n url: /favorites\n personalActions:\n - key: profile\n text: 个人资料\n icon:\n lib: antd\n icon: user\n - key: logout\n text: 退出登录\n icon:\n lib: fa\n prefix: fas\n icon: arrow-right-from-bracket\nevents:\n personal.action.click:\n action: \"console.log\"\n action.click:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-sidebar\n# user-instance-id=\"user-001\"\n# logo-url=\"/\"\n# new-chat-url=\"/chat/new\"\n# history-url-template=\"/chat/{{conversationId}}\"\n# id=\"brick-1\"\n# ></ai-portal.elevo-sidebar>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.links = [\n# {\n# title: \"工作台\",\n# url: \"/workbench\",\n# icon: {\n# lib: \"antd\",\n# icon: \"appstore\",\n# },\n# },\n# ];\n# brick_1.myLinks = [\n# {\n# title: \"我的收藏\",\n# url: \"/favorites\",\n# },\n# ];\n# brick_1.personalActions = [\n# {\n# key: \"profile\",\n# text: \"个人资料\",\n# icon: {\n# lib: \"antd\",\n# icon: \"user\",\n# },\n# },\n# {\n# key: \"logout\",\n# text: \"退出登录\",\n# icon: {\n# lib: \"fa\",\n# prefix: \"fas\",\n# icon: \"arrow-right-from-bracket\",\n# },\n# },\n# ];\n# brick_1.addEventListener(\"personal.action.click\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"action.click\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
10
16
  },
11
17
  "ai-portal.icon-button": {
12
- "doc": "构件 `ai-portal.icon-button`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.icon-button\nproperties:\n icon:\n lib: antd\n icon: download\n tooltip: Go to homepage\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.icon-button\n# tooltip=\"Go to homepage\"\n# id=\"brick-1\"\n# ></ai-portal.icon-button>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"download\",\n# };\n# </script>\n# \n```\n"
18
+ "doc": "---\ntagName: ai-portal.icon-button\ndisplayName: WrappedAiPortalIconButton\ndescription: 图标按钮,支持多种视觉变体、禁用状态、Tooltip 提示及文字插槽。\ncategory: interact-basic\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.icon-button\n\n> 图标按钮,支持多种视觉变体、禁用状态、Tooltip 提示及文字插槽。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| -------------- | -------------------------------------------------------------- | ---- | ------ | -------------------------------------------------------------------------------------- |\n| icon | `GeneralIconProps` | 否 | - | 按钮图标配置 |\n| tooltip | `string` | 否 | - | 悬停时显示的 Tooltip 文本 |\n| tooltipHoist | `boolean` | 否 | - | 是否将 Tooltip 挂载到顶层,避免被父容器裁剪 |\n| active | `boolean` | 否 | - | 是否为激活状态,通过 CSS 属性选择器控制样式,不触发重新渲染 |\n| disabled | `boolean` | 否 | - | 是否禁用按钮 |\n| variant | `\"default\" \\| \"light\" \\| \"mini\" \\| \"mini-light\" \\| \"bordered\"` | 否 | - | 按钮视觉变体,通过 CSS 属性选择器控制样式,不触发重新渲染 |\n| reduceIconSize | `boolean` | 否 | - | 是否缩小图标尺寸(部分 easyops 图标过大),通过 CSS 属性选择器控制样式,不触发重新渲染 |\n\n## Slots\n\n| 名称 | 说明 |\n| ------- | -------------------------- |\n| default | 图标旁边的文字内容(可选) |\n\n## Examples\n\n### Basic\n\n基础图标按钮,配置图标和 Tooltip 提示。\n\n```yaml preview\nbrick: ai-portal.icon-button\nproperties:\n icon:\n lib: antd\n icon: download\n tooltip: 下载\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.icon-button tooltip=\"下载\" id=\"brick-1\"></ai-portal.icon-button>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"download\",\n# };\n# </script>\n# \n```\n\n### Variants\n\n展示不同视觉变体的图标按钮。\n\n```yaml preview\nbrick: div\nproperties:\n style:\n display: flex\n gap: 8px\n alignItems: center\n padding: 8px\nchildren:\n - brick: ai-portal.icon-button\n properties:\n variant: default\n icon:\n lib: antd\n icon: setting\n tooltip: 默认样式\n - brick: ai-portal.icon-button\n properties:\n variant: light\n icon:\n lib: antd\n icon: heart\n tooltip: 轻量样式\n - brick: ai-portal.icon-button\n properties:\n variant: mini\n icon:\n lib: antd\n icon: star\n tooltip: 迷你样式\n - brick: ai-portal.icon-button\n properties:\n variant: mini-light\n icon:\n lib: antd\n icon: bell\n tooltip: 迷你轻量\n - brick: ai-portal.icon-button\n properties:\n variant: bordered\n icon:\n lib: antd\n icon: plus\n tooltip: 边框样式\n# -- YAML DELIMITER (1nbbm8) --\n# <div style=\"display: flex; gap: 8px; align-items: center; padding: 8px\">\n# <ai-portal.icon-button\n# variant=\"default\"\n# tooltip=\"默认样式\"\n# id=\"brick-1\"\n# ></ai-portal.icon-button>\n# <ai-portal.icon-button\n# variant=\"light\"\n# tooltip=\"轻量样式\"\n# id=\"brick-2\"\n# ></ai-portal.icon-button>\n# <ai-portal.icon-button\n# variant=\"mini\"\n# tooltip=\"迷你样式\"\n# id=\"brick-3\"\n# ></ai-portal.icon-button>\n# <ai-portal.icon-button\n# variant=\"mini-light\"\n# tooltip=\"迷你轻量\"\n# id=\"brick-4\"\n# ></ai-portal.icon-button>\n# <ai-portal.icon-button\n# variant=\"bordered\"\n# tooltip=\"边框样式\"\n# id=\"brick-5\"\n# ></ai-portal.icon-button>\n# </div>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"setting\",\n# };\n# \n# const brick_2 = document.getElementById(\"brick-2\");\n# brick_2.icon = {\n# lib: \"antd\",\n# icon: \"heart\",\n# };\n# \n# const brick_3 = document.getElementById(\"brick-3\");\n# brick_3.icon = {\n# lib: \"antd\",\n# icon: \"star\",\n# };\n# \n# const brick_4 = document.getElementById(\"brick-4\");\n# brick_4.icon = {\n# lib: \"antd\",\n# icon: \"bell\",\n# };\n# \n# const brick_5 = document.getElementById(\"brick-5\");\n# brick_5.icon = {\n# lib: \"antd\",\n# icon: \"plus\",\n# };\n# </script>\n# \n```\n\n### Disabled State\n\n展示禁用状态的图标按钮。\n\n```yaml preview\nbrick: ai-portal.icon-button\nproperties:\n icon:\n lib: antd\n icon: delete\n tooltip: 无法删除\n disabled: true\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.icon-button\n# tooltip=\"无法删除\"\n# disabled\n# id=\"brick-1\"\n# ></ai-portal.icon-button>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"delete\",\n# };\n# </script>\n# \n```\n\n### With Text Slot\n\n图标按钮配合文字内容插槽。\n\n```yaml preview\nbrick: ai-portal.icon-button\nproperties:\n icon:\n lib: easyops\n icon: new-chat\n active: true\n reduceIconSize: true\nchildren:\n - brick: span\n properties:\n textContent: 新建对话\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.icon-button active reduce-icon-size id=\"brick-1\">\n# <span>新建对话</span>\n# </ai-portal.icon-button>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"easyops\",\n# icon: \"new-chat\",\n# };\n# </script>\n# \n```\n\n### With Tooltip Hoist\n\n配置 tooltipHoist 防止 Tooltip 被父容器裁剪。\n\n```yaml preview\nbrick: ai-portal.icon-button\nproperties:\n icon:\n lib: antd\n icon: info-circle\n tooltip: 这是一条提示信息\n tooltipHoist: true\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.icon-button\n# tooltip=\"这是一条提示信息\"\n# tooltip-hoist\n# id=\"brick-1\"\n# ></ai-portal.icon-button>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"info-circle\",\n# };\n# </script>\n# \n```\n"
13
19
  },
14
20
  "ai-portal.show-cases": {
15
- "doc": "构件 `ai-portal.show-cases`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.show-cases\nproperties:\n list:\n - conversationId: c-1\n title: 故障排查-操作系统内存高\n summary: 服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\n scenario: 主机故障排查\n - conversationId: c-2\n title: Hi\n summary: There\n scenario: 主机巡检\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.show-cases id=\"brick-1\"></ai-portal.show-cases>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# conversationId: \"c-1\",\n# title: \"故障排查-操作系统内存高\",\n# summary:\n# \"服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\",\n# scenario: \"主机故障排查\",\n# },\n# {\n# conversationId: \"c-2\",\n# title: \"Hi\",\n# summary: \"There\",\n# scenario: \"主机巡检\",\n# },\n# ];\n# </script>\n# \n```\n"
21
+ "doc": "---\ntagName: ai-portal.show-cases\ndisplayName: WrappedAiPortalShowCases\ndescription: 案例列表展示构件,支持按场景分组筛选,展示多个优秀案例卡片。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.show-cases\n\n> 案例列表展示构件,支持按场景分组筛选,展示多个优秀案例卡片。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----- | ---------------- | ---- | ------ | -------------------------------------------------- |\n| list | `ShowCaseType[]` | 否 | - | 案例数据列表,每项可包含 scenario 字段用于分组筛选 |\n| limit | `number` | 否 | - | 每个场景分组下最多显示的案例数量 |\n\n## Examples\n\n### 基础使用\n\n展示案例列表,自动按 scenario 字段生成分组筛选标签。\n\n```yaml preview\nbrick: ai-portal.show-cases\nproperties:\n list:\n - conversationId: c-1\n title: 故障排查-操作系统内存高\n summary: 服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\n scenario: 主机故障排查\n - conversationId: c-2\n title: Hi\n summary: There\n scenario: 主机巡检\n - conversationId: c-3\n title: 磁盘空间不足处理\n summary: 磁盘使用率超过阈值的清理步骤\n scenario: 主机故障排查\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.show-cases id=\"brick-1\"></ai-portal.show-cases>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# conversationId: \"c-1\",\n# title: \"故障排查-操作系统内存高\",\n# summary:\n# \"服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\",\n# scenario: \"主机故障排查\",\n# },\n# {\n# conversationId: \"c-2\",\n# title: \"Hi\",\n# summary: \"There\",\n# scenario: \"主机巡检\",\n# },\n# {\n# conversationId: \"c-3\",\n# title: \"磁盘空间不足处理\",\n# summary: \"磁盘使用率超过阈值的清理步骤\",\n# scenario: \"主机故障排查\",\n# },\n# ];\n# </script>\n# \n```\n\n### 限制显示数量\n\n通过 limit 限制每个分组下最多显示的条数。\n\n```yaml preview\nbrick: ai-portal.show-cases\nproperties:\n limit: 2\n list:\n - conversationId: c-1\n title: 案例一\n summary: 摘要一\n scenario: 场景A\n - conversationId: c-2\n title: 案例二\n summary: 摘要二\n scenario: 场景A\n - conversationId: c-3\n title: 案例三\n summary: 摘要三\n scenario: 场景A\n - conversationId: c-4\n title: 案例四\n summary: 摘要四\n scenario: 场景B\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.show-cases limit=\"2\" id=\"brick-1\"></ai-portal.show-cases>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# conversationId: \"c-1\",\n# title: \"案例一\",\n# summary: \"摘要一\",\n# scenario: \"场景A\",\n# },\n# {\n# conversationId: \"c-2\",\n# title: \"案例二\",\n# summary: \"摘要二\",\n# scenario: \"场景A\",\n# },\n# {\n# conversationId: \"c-3\",\n# title: \"案例三\",\n# summary: \"摘要三\",\n# scenario: \"场景A\",\n# },\n# {\n# conversationId: \"c-4\",\n# title: \"案例四\",\n# summary: \"摘要四\",\n# scenario: \"场景B\",\n# },\n# ];\n# </script>\n# \n```\n"
16
22
  },
17
23
  "ai-portal.mcp-tools": {
18
- "doc": "构件 `ai-portal.mcp-tools`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.mcp-tools\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.mcp-tools>Hello world</ai-portal.mcp-tools>\n# \n```\n"
24
+ "doc": "---\ntagName: ai-portal.mcp-tools\ndisplayName: WrappedAiPortalMcpTools\ndescription: MCP 工具列表组件,按服务分组展示工具信息,支持按平台分类过滤和吸顶标签栏。\ncategory: display-component\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.mcp-tools\n\n> MCP 工具列表组件,按服务分组展示工具信息,支持按平台分类过滤和吸顶标签栏。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | ----------- | ---- | ------ | -------------------------------------------------------------------------- |\n| list | `McpTool[]` | 否 | - | MCP 工具列表数据,按 server.id 自动分组并归属平台分类 |\n| stickyTop | `number` | 否 | - | 平台过滤标签栏的吸顶偏移量(px),设置后标签栏使用吸顶容器,未设置则不吸顶 |\n\n## Examples\n\n### Basic\n\n展示基础 MCP 工具列表,按服务分组展示。\n\n```yaml preview\nbrick: ai-portal.mcp-tools\nproperties:\n list:\n - name: list_hosts\n title: 查询主机列表\n description: 查询 CMDB 中的主机资源列表,支持按条件过滤。\n server:\n id: cmdb\n name: CMDB\n - name: get_host_detail\n title: 获取主机详情\n description: 根据主机实例 ID 获取主机的详细信息,包括配置、状态等。\n server:\n id: cmdb\n name: CMDB\n - name: list_alerts\n title: 查询告警列表\n description: 获取当前活跃告警列表,支持按严重性筛选。\n server:\n id: alert\n name: 监控事件\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.mcp-tools id=\"brick-1\"></ai-portal.mcp-tools>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"list_hosts\",\n# title: \"查询主机列表\",\n# description: \"查询 CMDB 中的主机资源列表,支持按条件过滤。\",\n# server: {\n# id: \"cmdb\",\n# name: \"CMDB\",\n# },\n# },\n# {\n# name: \"get_host_detail\",\n# title: \"获取主机详情\",\n# description: \"根据主机实例 ID 获取主机的详细信息,包括配置、状态等。\",\n# server: {\n# id: \"cmdb\",\n# name: \"CMDB\",\n# },\n# },\n# {\n# name: \"list_alerts\",\n# title: \"查询告警列表\",\n# description: \"获取当前活跃告警列表,支持按严重性筛选。\",\n# server: {\n# id: \"alert\",\n# name: \"监控事件\",\n# },\n# },\n# ];\n# </script>\n# \n```\n\n### With Custom Icons\n\n为工具配置自定义图标,增强视觉区分。\n\n```yaml preview\nbrick: ai-portal.mcp-tools\nproperties:\n list:\n - name: deploy_app\n title: 部署应用\n description: 向 Kubernetes 集群部署应用,支持指定命名空间和镜像版本。\n icon:\n lib: antd\n icon: cloud-upload\n server:\n id: kubernetes\n name: Kubernetes\n - name: scale_deployment\n title: 弹性伸缩\n description: 调整 Kubernetes Deployment 的副本数量。\n icon:\n lib: antd\n icon: apartment\n server:\n id: kubernetes\n name: Kubernetes\n - name: execute_llm\n title: 调用大模型\n description: 向大模型发送请求并获取响应。\n icon:\n lib: antd\n icon: robot\n server:\n id: llm\n name: 大模型\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.mcp-tools id=\"brick-1\"></ai-portal.mcp-tools>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"deploy_app\",\n# title: \"部署应用\",\n# description: \"向 Kubernetes 集群部署应用,支持指定命名空间和镜像版本。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"cloud-upload\",\n# },\n# server: {\n# id: \"kubernetes\",\n# name: \"Kubernetes\",\n# },\n# },\n# {\n# name: \"scale_deployment\",\n# title: \"弹性伸缩\",\n# description: \"调整 Kubernetes Deployment 的副本数量。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"apartment\",\n# },\n# server: {\n# id: \"kubernetes\",\n# name: \"Kubernetes\",\n# },\n# },\n# {\n# name: \"execute_llm\",\n# title: \"调用大模型\",\n# description: \"向大模型发送请求并获取响应。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"robot\",\n# },\n# server: {\n# id: \"llm\",\n# name: \"大模型\",\n# },\n# },\n# ];\n# </script>\n# \n```\n\n### With Sticky Tabs\n\n启用吸顶平台过滤标签栏,适合内容较多的场景。\n\n```yaml preview\nbrick: ai-portal.mcp-tools\nproperties:\n stickyTop: 0\n list:\n - name: list_hosts\n title: 查询主机列表\n description: 查询 CMDB 中的主机资源列表,支持按条件过滤。\n server:\n id: cmdb\n name: CMDB\n - name: create_page\n title: 创建页面\n description: 在低代码平台中创建一个新的页面。\n server:\n id: web-builder\n name: 低代码\n - name: list_dashboards\n title: 查询仪表盘\n description: 获取 Grafana 中所有仪表盘列表。\n server:\n id: grafana\n name: Grafana\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.mcp-tools sticky-top=\"0\" id=\"brick-1\"></ai-portal.mcp-tools>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"list_hosts\",\n# title: \"查询主机列表\",\n# description: \"查询 CMDB 中的主机资源列表,支持按条件过滤。\",\n# server: {\n# id: \"cmdb\",\n# name: \"CMDB\",\n# },\n# },\n# {\n# name: \"create_page\",\n# title: \"创建页面\",\n# description: \"在低代码平台中创建一个新的页面。\",\n# server: {\n# id: \"web-builder\",\n# name: \"低代码\",\n# },\n# },\n# {\n# name: \"list_dashboards\",\n# title: \"查询仪表盘\",\n# description: \"获取 Grafana 中所有仪表盘列表。\",\n# server: {\n# id: \"grafana\",\n# name: \"Grafana\",\n# },\n# },\n# ];\n# </script>\n# \n```\n"
25
+ },
26
+ "ai-portal.chat-stream": {
27
+ "doc": "---\ntagName: ai-portal.chat-stream\ndisplayName: WrappedAiPortalChatStream\ndescription: AI 对话流视图,以聊天气泡形式展示对话过程,支持文件上传、命令联想、回放及用户反馈等功能。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.chat-stream\n\n> AI 对话流视图,以聊天气泡形式展示对话过程,支持文件上传、命令联想、回放及用户反馈等功能。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------------------- | -------------------------------------- | ---- | ------ | -------------------------------------------------------- |\n| conversationId | `string \\| undefined` | 否 | - | 对话 ID |\n| initialRequest | `RequestStore \\| undefined \\| null` | 否 | - | 初始请求数据。仅初始设置有效。 |\n| replay | `boolean \\| undefined` | 否 | - | 是否启用回放。仅初始设置有效。 |\n| replayDelay | `number \\| undefined` | 否 | `2` | 设置回放时消息之间的时间间隔,单位为秒。仅初始设置有效。 |\n| supports | `Record<string, boolean> \\| undefined` | 否 | - | 功能开关配置,键为功能名,值为是否启用 |\n| showHumanActions | `boolean \\| undefined` | 否 | - | 是否显示 Human-in-the-loop 操作按钮 |\n| showFeedback | `boolean \\| undefined` | 否 | - | 是否显示反馈按钮 |\n| showFeedbackAfterFailed | `boolean \\| undefined` | 否 | - | 是否在任务失败时也显示反馈按钮 |\n| showFeedbackOnView | `boolean \\| undefined` | 否 | - | 是否在查看生成视图时显示反馈按钮 |\n| showUiSwitch | `boolean \\| undefined` | 否 | - | 是否显示切换到画布视图的按钮 |\n| hideMermaid | `boolean \\| undefined` | 否 | - | 是否隐藏 Mermaid 图表渲染,通过 CSS 属性选择器控制样式 |\n| previewUrlTemplate | `string \\| undefined` | 否 | - | 生成视图预览页的 URL 模板,支持 {viewId} 等字段插值 |\n| showCases | `ShowCaseType[] \\| undefined` | 否 | - | 示例场景列表,用于在空对话时展示快速入口 |\n| exampleProjects | `ExampleProject[] \\| undefined` | 否 | - | 示例项目列表,用于展示可参考的已有项目 |\n| tryItOutUrl | `string \\| undefined` | 否 | - | \"试一试\"跳转 URL |\n| aiEmployees | `AIEmployee[] \\| undefined` | 否 | - | 可 @ 提及的数字人列表 |\n| commands | `Command[] \\| undefined` | 否 | - | 命令列表,支持通过 / 或搜索触发联想 |\n| uploadOptions | `UploadOptions \\| undefined` | 否 | - | 文件上传配置 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ---------------- | ------------------------------------------------------------------------------- | -------------------------------- |\n| share | `void` | 用户点击分享时触发 |\n| terminate | `void` | 用户点击终止任务时触发 |\n| feedback.submit | `FeedbackDetail` — { plan: 计划步骤列表, result: 结果列表, feedback: 反馈文本 } | 用户提交反馈时触发 |\n| feedback.on.view | `string` — 生成视图的 viewId | 用户查看生成视图时的反馈事件触发 |\n| ui.switch | `\"canvas\"` — 切换目标 UI 模式,值为 \"canvas\" | 用户点击切换到画布视图按钮时触发 |\n| detail.change | `ConversationDetail` — { projectId: 关联的项目 ID } | 对话详情信息变化时触发 |\n| split.change | `boolean` — 是否已切换到分屏模式 | 分屏状态切换时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| -------------------- | -------------------------- | ------ | -------------------------------------- |\n| resumed | `() => void` | `void` | 通知组件任务已恢复,用于继续中断的对话 |\n| feedbackSubmitDone | `() => void` | `void` | 通知组件反馈提交成功 |\n| feedbackSubmitFailed | `() => void` | `void` | 通知组件反馈提交失败 |\n| feedbackOnViewDone | `(viewId: string) => void` | `void` | 通知组件查看视图的反馈处理完成 |\n\n## Examples\n\n### Basic\n\n展示 AI 对话流视图的基本用法,通过 conversationId 加载已有对话。\n\n```yaml preview\nbrick: ai-portal.chat-stream\nproperties:\n conversationId: conv-001\n showFeedback: true\nevents:\n share:\n action: console.log\n terminate:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-stream\n# conversation-id=\"conv-001\"\n# show-feedback\n# id=\"brick-1\"\n# ></ai-portal.chat-stream>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"share\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"terminate\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Feedback\n\n开启反馈功能,并在反馈提交后通知组件结果。\n\n```yaml preview\n- brick: ai-portal.chat-stream\n properties:\n id: chatStream\n conversationId: conv-001\n showFeedback: true\n showFeedbackAfterFailed: true\n showFeedbackOnView: true\n events:\n feedback.submit:\n useProvider: my-feedback-provider\n args:\n - <% EVENT.detail %>\n callback:\n success:\n target: \"#chatStream\"\n method: feedbackSubmitDone\n error:\n target: \"#chatStream\"\n method: feedbackSubmitFailed\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-stream\n# conversation-id=\"conv-001\"\n# show-feedback\n# show-feedback-after-failed\n# show-feedback-on-view\n# id=\"chatStream\"\n# ></ai-portal.chat-stream>\n# \n# <script>\n# const chatStream = document.getElementById(\"chatStream\");\n# chatStream.addEventListener(\"feedback.submit\", (e) => {\n# const provider = document.createElement(\"my-feedback-provider\");\n# const promise = Promise.resolve(provider.resolve(e.detail));\n# promise.then((r) => {\n# const brick = document.querySelector(\"#chatStream\");\n# brick.feedbackSubmitDone();\n# });\n# promise.catch((r) => {\n# const brick = document.querySelector(\"#chatStream\");\n# brick.feedbackSubmitFailed();\n# });\n# });\n# </script>\n# \n```\n\n### With UI Switch\n\n显示切换到画布视图的按钮,并监听切换事件。\n\n```yaml preview\nbrick: ai-portal.chat-stream\nproperties:\n conversationId: conv-001\n showUiSwitch: true\nevents:\n ui.switch:\n action: console.log\n detail.change:\n action: console.log\n split.change:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-stream\n# conversation-id=\"conv-001\"\n# show-ui-switch\n# id=\"brick-1\"\n# ></ai-portal.chat-stream>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"ui.switch\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"detail.change\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"split.change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Replay Mode\n\n使用回放模式展示历史对话过程。\n\n```yaml preview\nbrick: ai-portal.chat-stream\nproperties:\n conversationId: conv-001\n replay: true\n replayDelay: 1\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-stream\n# conversation-id=\"conv-001\"\n# replay\n# replay-delay=\"1\"\n# ></ai-portal.chat-stream>\n# \n```\n\n### With File Upload and Employees\n\n配置文件上传与数字人提及功能。\n\n```yaml preview\nbrick: ai-portal.chat-stream\nproperties:\n conversationId: conv-001\n uploadOptions:\n enabled: true\n accept: image/*,.pdf\n maxFiles: 3\n aiEmployees:\n - employeeId: emp001\n name: 运维工程师小李\n showCases:\n - conversationId: show-001\n title: 服务器故障排查\n summary: 通过 AI 快速定位服务器异常\n scenario: ops\n exampleProjects:\n - instanceId: proj-001\n name: 示例项目\n tryItOutUrl: /try-it-out\nevents:\n share:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-stream\n# conversation-id=\"conv-001\"\n# try-it-out-url=\"/try-it-out\"\n# id=\"brick-1\"\n# ></ai-portal.chat-stream>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.uploadOptions = {\n# enabled: true,\n# accept: \"image/*,.pdf\",\n# maxFiles: 3,\n# };\n# brick_1.aiEmployees = [\n# {\n# employeeId: \"emp001\",\n# name: \"运维工程师小李\",\n# },\n# ];\n# brick_1.showCases = [\n# {\n# conversationId: \"show-001\",\n# title: \"服务器故障排查\",\n# summary: \"通过 AI 快速定位服务器异常\",\n# scenario: \"ops\",\n# },\n# ];\n# brick_1.exampleProjects = [\n# {\n# instanceId: \"proj-001\",\n# name: \"示例项目\",\n# },\n# ];\n# brick_1.addEventListener(\"share\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
19
28
  },
20
29
  "ai-portal.ai-employees": {
21
- "doc": "构件 `ai-portal.ai-employees`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.ai-employees\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-employees>Hello world</ai-portal.ai-employees>\n# \n```\n"
30
+ "doc": "---\ntagName: ai-portal.ai-employees\ndisplayName: WrappedAiPortalAiEmployees\ndescription: AI 数字人卡片列表,按行业和角色分组展示,支持 Tab 切换行业和点击跳转。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.ai-employees\n\n> AI 数字人卡片列表,按行业和角色分组展示,支持 Tab 切换行业和点击跳转。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | ------------------------- | ---- | ------ | ----------------------------------------------------------------------- |\n| list | `Employee[] \\| undefined` | 否 | - | 数字人列表数据 |\n| industries | `string[] \\| undefined` | 否 | - | 行业列表,用于指定 Tab 的顺序,未在此列表中的行业将按出现顺序附加在末尾 |\n| urlTemplate | `string \\| undefined` | 否 | - | 跳转到数字人详情页的 URL 模板,支持 {name} 等数字人字段插值 |\n| stickyTop | `number \\| undefined` | 否 | - | 行业 Tab 栏吸顶时距顶部的距离(px),不设置则不吸顶 |\n\n## Examples\n\n### Basic\n\n展示 AI 数字人卡片列表,按行业 Tab 分组浏览。\n\n```yaml preview\nbrick: ai-portal.ai-employees\nproperties:\n list:\n - name: 运维工程师小李\n industry: IT\n role: 运维专家\n description: 专注于服务器运维和故障处理。\n - name: 开发工程师小王\n industry: IT\n role: 开发专家\n description: 擅长全栈开发和架构设计。\n - name: 数据分析师小张\n industry: 金融\n role: 数据分析\n description: 专注于金融数据分析和风险评估。\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-employees id=\"brick-1\"></ai-portal.ai-employees>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"运维工程师小李\",\n# industry: \"IT\",\n# role: \"运维专家\",\n# description: \"专注于服务器运维和故障处理。\",\n# },\n# {\n# name: \"开发工程师小王\",\n# industry: \"IT\",\n# role: \"开发专家\",\n# description: \"擅长全栈开发和架构设计。\",\n# },\n# {\n# name: \"数据分析师小张\",\n# industry: \"金融\",\n# role: \"数据分析\",\n# description: \"专注于金融数据分析和风险评估。\",\n# },\n# ];\n# </script>\n# \n```\n\n### With URL Template\n\n配置 urlTemplate 属性,使每个数字人卡片点击后跳转到对应详情页。\n\n```yaml preview\nbrick: ai-portal.ai-employees\nproperties:\n urlTemplate: /employees/{name}\n list:\n - name: 运维工程师小李\n industry: IT\n role: 运维专家\n description: 专注于服务器运维和故障处理。\n - name: 开发工程师小王\n industry: IT\n role: 开发专家\n description: 擅长全栈开发和架构设计。\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-employees\n# url-template=\"/employees/{name}\"\n# id=\"brick-1\"\n# ></ai-portal.ai-employees>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"运维工程师小李\",\n# industry: \"IT\",\n# role: \"运维专家\",\n# description: \"专注于服务器运维和故障处理。\",\n# },\n# {\n# name: \"开发工程师小王\",\n# industry: \"IT\",\n# role: \"开发专家\",\n# description: \"擅长全栈开发和架构设计。\",\n# },\n# ];\n# </script>\n# \n```\n\n### With Industries and Sticky Tab\n\n配置 industries 和 stickyTop 属性,控制行业 Tab 顺序及吸顶效果。\n\n```yaml preview\nbrick: ai-portal.ai-employees\nproperties:\n industries:\n - 金融\n - IT\n stickyTop: 0\n list:\n - name: 数据分析师小张\n industry: 金融\n role: 数据分析\n description: 专注于金融数据分析和风险评估。\n - name: 运维工程师小李\n industry: IT\n role: 运维专家\n description: 专注于服务器运维和故障处理。\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-employees sticky-top=\"0\" id=\"brick-1\"></ai-portal.ai-employees>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.industries = [\"金融\", \"IT\"];\n# brick_1.list = [\n# {\n# name: \"数据分析师小张\",\n# industry: \"金融\",\n# role: \"数据分析\",\n# description: \"专注于金融数据分析和风险评估。\",\n# },\n# {\n# name: \"运维工程师小李\",\n# industry: \"IT\",\n# role: \"运维专家\",\n# description: \"专注于服务器运维和故障处理。\",\n# },\n# ];\n# </script>\n# \n```\n"
22
31
  },
23
32
  "ai-portal.ai-agents": {
24
- "doc": "构件 `ai-portal.ai-agents`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.ai-agents\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-agents>Hello world</ai-portal.ai-agents>\n# \n```\n"
25
- },
26
- "ai-portal.chat-stream": {
27
- "doc": "构件 `ai-portal.chat-stream`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.chat-stream\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-stream>Hello world</ai-portal.chat-stream>\n# \n```\n"
33
+ "doc": "---\ntagName: ai-portal.ai-agents\ndisplayName: WrappedAiPortalAiAgents\ndescription: AI Agents 卡片列表,展示可用的 AI 智能体,支持点击跳转到对应详情页。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.ai-agents\n\n> AI Agents 卡片列表,展示可用的 AI 智能体,支持点击跳转到对应详情页。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | ---------------------- | ---- | ------ | ------------------------------------------------------------- |\n| list | `Agent[] \\| undefined` | 否 | - | AI Agent 列表数据 |\n| urlTemplate | `string \\| undefined` | 否 | - | 跳转到 Agent 详情页的 URL 模板,支持 {name} 等 Agent 字段插值 |\n\n## Examples\n\n### Basic\n\n展示 AI Agents 卡片列表的基本用法。\n\n```yaml preview\nbrick: ai-portal.ai-agents\nproperties:\n list:\n - name: 运维专家\n description: 擅长处理服务器运维、故障排查和性能优化等问题。\n icon:\n lib: antd\n icon: tool\n tags:\n - 运维\n - 故障排查\n - name: 数据分析师\n description: 专注于数据处理、报表生成和趋势分析。\n icon:\n lib: antd\n icon: bar-chart\n tags:\n - 数据\n - 分析\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-agents id=\"brick-1\"></ai-portal.ai-agents>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"运维专家\",\n# description: \"擅长处理服务器运维、故障排查和性能优化等问题。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"tool\",\n# },\n# tags: [\"运维\", \"故障排查\"],\n# },\n# {\n# name: \"数据分析师\",\n# description: \"专注于数据处理、报表生成和趋势分析。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"bar-chart\",\n# },\n# tags: [\"数据\", \"分析\"],\n# },\n# ];\n# </script>\n# \n```\n\n### With URL Template\n\n配置 urlTemplate 属性,使每个 Agent 卡片点击后跳转到对应详情页。\n\n```yaml preview\nbrick: ai-portal.ai-agents\nproperties:\n urlTemplate: /agents/{name}\n list:\n - name: 运维专家\n description: 擅长处理服务器运维、故障排查和性能优化等问题。\n icon:\n lib: antd\n icon: tool\n tags:\n - 运维\n - name: 数据分析师\n description: 专注于数据处理、报表生成和趋势分析。\n icon:\n lib: antd\n icon: bar-chart\n tags:\n - 数据\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.ai-agents\n# url-template=\"/agents/{name}\"\n# id=\"brick-1\"\n# ></ai-portal.ai-agents>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# name: \"运维专家\",\n# description: \"擅长处理服务器运维、故障排查和性能优化等问题。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"tool\",\n# },\n# tags: [\"运维\"],\n# },\n# {\n# name: \"数据分析师\",\n# description: \"专注于数据处理、报表生成和趋势分析。\",\n# icon: {\n# lib: \"antd\",\n# icon: \"bar-chart\",\n# },\n# tags: [\"数据\"],\n# },\n# ];\n# </script>\n# \n```\n"
28
34
  },
29
35
  "ai-portal.page-container": {
30
- "doc": "构件 `ai-portal.page-container`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.page-container\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.page-container>Hello world</ai-portal.page-container>\n# \n```\n"
36
+ "doc": "---\ntagName: ai-portal.page-container\ndisplayName: WrappedAiPortalPageContainer\ndescription: 页面容器构件,提供统一的页面布局,包含面包屑导航、页面标题和内容区域。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.page-container\n\n> 页面容器构件,提供统一的页面布局,包含面包屑导航、页面标题和内容区域。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | ------------------------------- | ---- | ------ | ---------------------------------------------------------------------- |\n| pageTitle | `string` | 否 | - | 页面标题,同时会调用 applyPageTitle 更新浏览器标签页标题 |\n| breadcrumbs | `Breadcrumb[]` | 否 | - | 面包屑导航配置,每项包含 text 和 url |\n| size | `\"medium\" \\| \"small\" \\| \"full\"` | 否 | - | 内容区域宽度模式,通过 CSS attribute selector 控制样式,不触发重新渲染 |\n| variant | `\"default\" \\| \"form\"` | 否 | - | 页面变体,通过 CSS attribute selector 控制样式,不触发重新渲染 |\n| sticky | `boolean` | 否 | - | 是否固定头部(含面包屑和标题)到页面顶部 |\n\n## Slots\n\n| 名称 | 说明 |\n| --------- | ------ |\n| (default) | 内容 |\n| toolbar | 工具栏 |\n\n## Examples\n\n### 基础使用\n\n展示带页面标题和面包屑导航的页面容器。\n\n```yaml preview\nbrick: ai-portal.page-container\nproperties:\n pageTitle: \"页面标题\"\n breadcrumbs:\n - text: \"首页\"\n url: \"/\"\n - text: \"子页面\"\n url: \"/sub\"\nchildren:\n - brick: div\n properties:\n textContent: \"页面内容区域\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.page-container page-title=\"页面标题\" id=\"brick-1\">\n# <div>页面内容区域</div>\n# </ai-portal.page-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.breadcrumbs = [\n# {\n# text: \"首页\",\n# url: \"/\",\n# },\n# {\n# text: \"子页面\",\n# url: \"/sub\",\n# },\n# ];\n# </script>\n# \n```\n\n### 带工具栏\n\n在标题区右侧放置操作按钮。\n\n```yaml preview\nbrick: ai-portal.page-container\nproperties:\n pageTitle: \"资源管理\"\n breadcrumbs:\n - text: \"首页\"\n url: \"/\"\nchildren:\n - brick: eo-button\n slot: toolbar\n properties:\n type: primary\n textContent: \"新建\"\n - brick: div\n properties:\n textContent: \"内容区域\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.page-container page-title=\"资源管理\" id=\"brick-1\">\n# <eo-button slot=\"toolbar\" type=\"primary\">新建</eo-button>\n# <div>内容区域</div>\n# </ai-portal.page-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.breadcrumbs = [\n# {\n# text: \"首页\",\n# url: \"/\",\n# },\n# ];\n# </script>\n# \n```\n\n### 固定头部\n\n启用 sticky 将面包屑和标题区域固定在顶部。\n\n```yaml preview\nbrick: ai-portal.page-container\nproperties:\n pageTitle: \"固定头部示例\"\n sticky: true\n size: medium\n variant: default\nchildren:\n - brick: div\n properties:\n textContent: \"内容滚动时头部保持固定\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.page-container\n# page-title=\"固定头部示例\"\n# sticky\n# size=\"medium\"\n# variant=\"default\"\n# >\n# <div>内容滚动时头部保持固定</div>\n# </ai-portal.page-container>\n# \n```\n"
31
37
  },
32
38
  "ai-portal.tab-list": {
33
- "doc": "构件 `ai-portal.tab-list`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.tab-list\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.tab-list>Hello world</ai-portal.tab-list>\n# \n```\n"
39
+ "doc": "---\ntagName: ai-portal.tab-list\ndisplayName: WrappedAiPortalTabList\ndescription: 标签页列表构件,展示可切换的标签页,点击后触发事件并自动更新选中状态。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.tab-list\n\n> 标签页列表构件,展示可切换的标签页,点击后触发事件并自动更新选中状态。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | -------- | ---- | ------ | ------------------------------------ |\n| tabs | `Tab[]` | 否 | - | 标签页配置列表,每项包含 id 和 label |\n| activeTab | `string` | 否 | - | 当前激活的标签页 id |\n\n## Events\n\n| 事件 | detail | 说明 |\n| --------- | ------------------------------------------- | ---------------------------------------- |\n| tab.click | `Tab` — { id: 标签页ID, label: 标签页标题 } | 点击标签页时触发,同时自动更新 activeTab |\n\n## CSS Parts\n\n| 名称 | 说明 |\n| ---- | ---------------------- |\n| tabs | The tab list container |\n| tab | The individual tab |\n\n## Examples\n\n### 基础使用\n\n展示可切换的标签页列表,点击后自动切换选中状态。\n\n```yaml preview\nbrick: ai-portal.tab-list\nproperties:\n tabs:\n - id: \"all\"\n label: \"全部\"\n - id: \"host\"\n label: \"主机故障排查\"\n - id: \"inspect\"\n label: \"主机巡检\"\n activeTab: \"all\"\nevents:\n tab.click:\n action: console.log\n args:\n - \"标签点击:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.tab-list id=\"brick-1\"></ai-portal.tab-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"all\",\n# label: \"全部\",\n# },\n# {\n# id: \"host\",\n# label: \"主机故障排查\",\n# },\n# {\n# id: \"inspect\",\n# label: \"主机巡检\",\n# },\n# ];\n# brick_1.activeTab = \"all\";\n# brick_1.addEventListener(\"tab.click\", (e) => {\n# console.log(\"标签点击:\", e.detail);\n# });\n# </script>\n# \n```\n\n### 与内容联动\n\n结合事件监听,点击标签页时切换显示对应内容(通过 target 更新属性)。\n\n```yaml preview\n- brick: ai-portal.tab-list\n properties:\n tabs:\n - id: \"tab1\"\n label: \"Tab 1\"\n - id: \"tab2\"\n label: \"Tab 2\"\n activeTab: \"tab1\"\n events:\n tab.click:\n target: \"#content\"\n properties:\n textContent: \"<% '当前 Tab: ' + EVENT.detail.label %>\"\n- brick: div\n id: content\n properties:\n textContent: \"当前 Tab: Tab 1\"\n style:\n padding: \"16px\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.tab-list id=\"brick-1\"></ai-portal.tab-list>\n# <div style=\"padding: 16px\">当前 Tab: Tab 1</div>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"tab1\",\n# label: \"Tab 1\",\n# },\n# {\n# id: \"tab2\",\n# label: \"Tab 2\",\n# },\n# ];\n# brick_1.activeTab = \"tab1\";\n# brick_1.addEventListener(\"tab.click\", (e) => {\n# const brick = document.querySelector(\"#content\");\n# brick.textContent = \"<% '当前 Tab: ' + EVENT.detail.label %>\";\n# });\n# </script>\n# \n```\n"
34
40
  },
35
41
  "ai-portal.dropdown-select": {
36
- "doc": "构件 `ai-portal.dropdown-select`\n\n下拉选择器组件,提供选项列表供用户选择,支持搜索过滤功能。\n\n## Examples\n\n### Basic\n\n基础用法,提供选项列表:\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n options:\n - label: \"选项1\"\n value: \"option1\"\n - label: \"选项2\"\n value: \"option2\"\n - label: \"选项3\"\n value: \"option3\"\n value: \"option1\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select\n# value=\"option1\"\n# id=\"brick-1\"\n# ></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.options = [\n# {\n# label: \"选项1\",\n# value: \"option1\",\n# },\n# {\n# label: \"选项2\",\n# value: \"option2\",\n# },\n# {\n# label: \"选项3\",\n# value: \"option3\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Search\n\n启用搜索功能:\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n showSearch: true\n searchPlaceholder: \"请输入关键词搜索\"\n options:\n - label: \"北京市\"\n value: \"beijing\"\n - label: \"上海市\"\n value: \"shanghai\"\n - label: \"广州市\"\n value: \"guangzhou\"\n - label: \"深圳市\"\n value: \"shenzhen\"\n - label: \"杭州市\"\n value: \"hangzhou\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select show-search id=\"brick-1\"></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.searchPlaceholder = \"请输入关键词搜索\";\n# brick_1.options = [\n# {\n# label: \"北京市\",\n# value: \"beijing\",\n# },\n# {\n# label: \"上海市\",\n# value: \"shanghai\",\n# },\n# {\n# label: \"广州市\",\n# value: \"guangzhou\",\n# },\n# {\n# label: \"深圳市\",\n# value: \"shenzhen\",\n# },\n# {\n# label: \"杭州市\",\n# value: \"hangzhou\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Loading State\n\n加载状态显示:\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n loading: true\n options:\n - label: \"加载中...\"\n value: \"loading\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select loading id=\"brick-1\"></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.options = [\n# {\n# label: \"加载中...\",\n# value: \"loading\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Custom Width\n\n自定义标签和下拉框宽度:\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n labelMaxWidth: \"150px\"\n dropdownMaxWidth: \"300px\"\n options:\n - label: \"这是一个很长的选项标签文本\"\n value: \"long-option\"\n - label: \"短选项\"\n value: \"short\"\n - label: \"中等长度的选项\"\n value: \"medium\"\n value: \"long-option\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select\n# value=\"long-option\"\n# id=\"brick-1\"\n# ></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.labelMaxWidth = \"150px\";\n# brick_1.dropdownMaxWidth = \"300px\";\n# brick_1.options = [\n# {\n# label: \"这是一个很长的选项标签文本\",\n# value: \"long-option\",\n# },\n# {\n# label: \"短选项\",\n# value: \"short\",\n# },\n# {\n# label: \"中等长度的选项\",\n# value: \"medium\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Disabled Options\n\n包含禁用选项:\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n options:\n - label: \"可用选项1\"\n value: \"enabled1\"\n - label: \"禁用选项\"\n value: \"disabled1\"\n disabled: true\n - label: \"可用选项2\"\n value: \"enabled2\"\n - label: \"禁用选项2\"\n value: \"disabled2\"\n disabled: true\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select id=\"brick-1\"></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.options = [\n# {\n# label: \"可用选项1\",\n# value: \"enabled1\",\n# },\n# {\n# label: \"禁用选项\",\n# value: \"disabled1\",\n# disabled: true,\n# },\n# {\n# label: \"可用选项2\",\n# value: \"enabled2\",\n# },\n# {\n# label: \"禁用选项2\",\n# value: \"disabled2\",\n# disabled: true,\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Complex Example\n\n综合示例,包含所有功能:\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n value: \"frontend\"\n showSearch: true\n searchPlaceholder: \"搜索技术栈\"\n labelMaxWidth: \"200px\"\n dropdownMaxWidth: \"400px\"\n options:\n - label: \"前端开发 - React\"\n value: \"frontend\"\n - label: \"后端开发 - Node.js\"\n value: \"backend\"\n - label: \"移动开发 - React Native\"\n value: \"mobile\"\n - label: \"数据库 - MongoDB\"\n value: \"database\"\n - label: \"DevOps - Docker\"\n value: \"devops\"\n disabled: true\n - label: \"机器学习 - Python\"\n value: \"ml\"\n - label: \"云计算 - AWS\"\n value: \"cloud\"\nevents:\n change:\n - action: \"console.log\"\n args:\n - \"选择了:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select\n# value=\"frontend\"\n# show-search\n# id=\"brick-1\"\n# ></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.searchPlaceholder = \"搜索技术栈\";\n# brick_1.labelMaxWidth = \"200px\";\n# brick_1.dropdownMaxWidth = \"400px\";\n# brick_1.options = [\n# {\n# label: \"前端开发 - React\",\n# value: \"frontend\",\n# },\n# {\n# label: \"后端开发 - Node.js\",\n# value: \"backend\",\n# },\n# {\n# label: \"移动开发 - React Native\",\n# value: \"mobile\",\n# },\n# {\n# label: \"数据库 - MongoDB\",\n# value: \"database\",\n# },\n# {\n# label: \"DevOps - Docker\",\n# value: \"devops\",\n# disabled: true,\n# },\n# {\n# label: \"机器学习 - Python\",\n# value: \"ml\",\n# },\n# {\n# label: \"云计算 - AWS\",\n# value: \"cloud\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(\"选择了:\", e.detail);\n# });\n# </script>\n# \n```\n"
42
+ "doc": "---\ntagName: ai-portal.dropdown-select\ndisplayName: WrappedAiPortalDropdownSelect\ndescription: 下拉选择器,提供选项列表供用户选择,支持搜索过滤功能。\ncategory: interact-basic\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.dropdown-select\n\n> 下拉选择器,提供选项列表供用户选择,支持搜索过滤功能。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| -------------------- | --------------------- | ---- | --------- | ------------------------ |\n| value | `string` | 否 | - | 当前选中项的值 |\n| options | `DropdownOptions[]` | 否 | - | 可选项数据源 |\n| labelMaxWidth | `string \\| number` | 否 | - | 触发器标签的最大宽度 |\n| loading | `boolean` | 否 | - | 是否显示加载状态 |\n| searchPlaceholder | `string` | 否 | - | 搜索框的占位文本 |\n| dropdownContentStyle | `React.CSSProperties` | 否 | - | 下拉内容区域的自定义样式 |\n| dropdownMaxWidth | `string \\| number` | 否 | `\"500px\"` | 下拉框的最大宽度 |\n| showSearch | `boolean` | 否 | - | 是否展示搜索框 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------ | ------------------------------------------------------ | -------------- |\n| change | `DropdownOptions` — { label: 选项标签, value: 选项值 } | 选项选中时触发 |\n\n## Examples\n\n### Basic\n\n基础用法,提供选项列表供用户选择。\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n options:\n - label: \"选项1\"\n value: \"option1\"\n - label: \"选项2\"\n value: \"option2\"\n - label: \"选项3\"\n value: \"option3\"\n value: \"option1\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select\n# value=\"option1\"\n# id=\"brick-1\"\n# ></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.options = [\n# {\n# label: \"选项1\",\n# value: \"option1\",\n# },\n# {\n# label: \"选项2\",\n# value: \"option2\",\n# },\n# {\n# label: \"选项3\",\n# value: \"option3\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Search\n\n启用搜索功能,允许用户通过关键词过滤选项。\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n showSearch: true\n searchPlaceholder: \"请输入关键词搜索\"\n options:\n - label: \"北京市\"\n value: \"beijing\"\n - label: \"上海市\"\n value: \"shanghai\"\n - label: \"广州市\"\n value: \"guangzhou\"\n - label: \"深圳市\"\n value: \"shenzhen\"\n - label: \"杭州市\"\n value: \"hangzhou\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select show-search id=\"brick-1\"></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.searchPlaceholder = \"请输入关键词搜索\";\n# brick_1.options = [\n# {\n# label: \"北京市\",\n# value: \"beijing\",\n# },\n# {\n# label: \"上海市\",\n# value: \"shanghai\",\n# },\n# {\n# label: \"广州市\",\n# value: \"guangzhou\",\n# },\n# {\n# label: \"深圳市\",\n# value: \"shenzhen\",\n# },\n# {\n# label: \"杭州市\",\n# value: \"hangzhou\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Loading State\n\n展示加载状态,适用于选项数据异步获取的场景。\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n loading: true\n options:\n - label: \"加载中...\"\n value: \"loading\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select loading id=\"brick-1\"></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.options = [\n# {\n# label: \"加载中...\",\n# value: \"loading\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Custom Width\n\n自定义标签和下拉框宽度,适合长文本选项场景。\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n labelMaxWidth: \"150px\"\n dropdownMaxWidth: \"300px\"\n dropdownContentStyle:\n padding: \"8px 0\"\n options:\n - label: \"这是一个很长的选项标签文本\"\n value: \"long-option\"\n - label: \"短选项\"\n value: \"short\"\n - label: \"中等长度的选项\"\n value: \"medium\"\n value: \"long-option\"\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select\n# value=\"long-option\"\n# id=\"brick-1\"\n# ></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.labelMaxWidth = \"150px\";\n# brick_1.dropdownMaxWidth = \"300px\";\n# brick_1.dropdownContentStyle = {\n# padding: \"8px 0\",\n# };\n# brick_1.options = [\n# {\n# label: \"这是一个很长的选项标签文本\",\n# value: \"long-option\",\n# },\n# {\n# label: \"短选项\",\n# value: \"short\",\n# },\n# {\n# label: \"中等长度的选项\",\n# value: \"medium\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Disabled Options\n\n包含禁用选项的下拉列表。\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n options:\n - label: \"可用选项1\"\n value: \"enabled1\"\n - label: \"禁用选项\"\n value: \"disabled1\"\n disabled: true\n - label: \"可用选项2\"\n value: \"enabled2\"\n - label: \"禁用选项2\"\n value: \"disabled2\"\n disabled: true\nevents:\n change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select id=\"brick-1\"></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.options = [\n# {\n# label: \"可用选项1\",\n# value: \"enabled1\",\n# },\n# {\n# label: \"禁用选项\",\n# value: \"disabled1\",\n# disabled: true,\n# },\n# {\n# label: \"可用选项2\",\n# value: \"enabled2\",\n# },\n# {\n# label: \"禁用选项2\",\n# value: \"disabled2\",\n# disabled: true,\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Complex Example\n\n综合示例,包含搜索、宽度自定义和禁用选项。\n\n```yaml preview\nbrick: ai-portal.dropdown-select\nproperties:\n value: \"frontend\"\n showSearch: true\n searchPlaceholder: \"搜索技术栈\"\n labelMaxWidth: \"200px\"\n dropdownMaxWidth: \"400px\"\n options:\n - label: \"前端开发 - React\"\n value: \"frontend\"\n - label: \"后端开发 - Node.js\"\n value: \"backend\"\n - label: \"移动开发 - React Native\"\n value: \"mobile\"\n - label: \"数据库 - MongoDB\"\n value: \"database\"\n - label: \"DevOps - Docker\"\n value: \"devops\"\n disabled: true\n - label: \"机器学习 - Python\"\n value: \"ml\"\n - label: \"云计算 - AWS\"\n value: \"cloud\"\nevents:\n change:\n - action: \"console.log\"\n args:\n - \"选择了:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.dropdown-select\n# value=\"frontend\"\n# show-search\n# id=\"brick-1\"\n# ></ai-portal.dropdown-select>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.searchPlaceholder = \"搜索技术栈\";\n# brick_1.labelMaxWidth = \"200px\";\n# brick_1.dropdownMaxWidth = \"400px\";\n# brick_1.options = [\n# {\n# label: \"前端开发 - React\",\n# value: \"frontend\",\n# },\n# {\n# label: \"后端开发 - Node.js\",\n# value: \"backend\",\n# },\n# {\n# label: \"移动开发 - React Native\",\n# value: \"mobile\",\n# },\n# {\n# label: \"数据库 - MongoDB\",\n# value: \"database\",\n# },\n# {\n# label: \"DevOps - Docker\",\n# value: \"devops\",\n# disabled: true,\n# },\n# {\n# label: \"机器学习 - Python\",\n# value: \"ml\",\n# },\n# {\n# label: \"云计算 - AWS\",\n# value: \"cloud\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(\"选择了:\", e.detail);\n# });\n# </script>\n# \n```\n"
37
43
  },
38
44
  "ai-portal.preview-container": {
39
- "doc": "构件 `ai-portal.preview-container`\n\n## Examples\n\n### Basic\n\n```yaml preview minHeight=\"600px\"\nbrick: ai-portal.preview-container\nproperties:\n style:\n position: fixed\n inset: 0\n overflowY: auto\n source: |\n const RESPONSE = {\n \"list\": [\n {\n \"inode_usage\": [\n {\n \"total_inodes\": 21162000,\n \"used_inodes\": 1385716,\n \"free_inodes\": 19776284,\n \"percent\": \"7%\",\n \"device\": \"/dev/sda1\",\n \"mount_point\": \"/\"\n },\n {\n \"mount_point\": \"/boot\",\n \"total_inodes\": 524288,\n \"used_inodes\": 333,\n \"free_inodes\": 523955,\n \"percent\": \"1%\",\n \"device\": \"/dev/vda1\"\n }\n ],\n \"ip\": \"172.30.0.134\",\n \"disk_usage\": [\n {\n \"total\": \"95.00GB\",\n \"used\": \"85.00GB\",\n \"free\": \"9.00GB\",\n \"percent\": \"91%\",\n \"rw_status\": \"rw\",\n \"large_files\": [\n {\n \"size\": \"1.00GB\",\n \"path\": \"/temp/1\"\n },\n {\n \"path\": \"/temp/2\",\n \"size\": \"759.00MB\"\n },\n {\n \"size\": \"360.00MB\",\n \"path\": \"/temp/3\"\n }\n ],\n \"device\": \"/dev/sda1\",\n \"mount_point\": \"/\"\n },\n {\n \"rw_status\": \"rw\",\n \"device\": \"/dev/vda1\",\n \"mount_point\": \"/boot\",\n \"total\": \"1014.00MB\",\n \"used\": \"181.00MB\",\n \"free\": \"834.00MB\",\n \"percent\": \"18%\"\n }\n ]\n }\n ]\n };\n\n export default (\n <View title=\"磁盘使用情况\">\n {RESPONSE.list.map((item) => (\n <Card title={item.ip}>\n {/* 磁盘空间使用情况 */}\n <Plaintext>磁盘空间使用</Plaintext>\n <Table\n dataSource={{ list: item.disk_usage }}\n columns={[\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\n { dataIndex: \"total\", key: \"total\", title: \"总大小\" },\n { dataIndex: \"used\", key: \"used\", title: \"已用空间\" },\n { dataIndex: \"free\", key: \"free\", title: \"可用空间\" },\n { dataIndex: \"percent\", key: \"percent\", title: \"使用率\" },\n { dataIndex: \"rw_status\", key: \"rw_status\", title: \"读写状态\" }\n ]}\n rowKey=\"device\"\n pagination={false}\n />\n\n {/* Inode 使用情况 */}\n <Plaintext>Inode 使用情况</Plaintext>\n <Table\n dataSource={{ list: item.inode_usage }}\n columns={[\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\n { dataIndex: \"total_inodes\", key: \"total_inodes\", title: \"Inode 总数\" },\n { dataIndex: \"used_inodes\", key: \"used_inodes\", title: \"已用 Inode\" },\n { dataIndex: \"free_inodes\", key: \"free_inodes\", title: \"空闲 Inode\" },\n {\n dataIndex: \"percent\", key: \"percent\", title: \"使用率\",\n render: (cell, record) => (\n // <Plaintext>{record.percent}%</Plaintext>\n `~${record.percent}`\n )\n }\n ]}\n rowKey=\"device\"\n pagination={false}\n />\n\n {/* 大文件列表(仅当存在 large_files 且有内容时) */}\n {item.disk_usage\n .filter(disk => disk.large_files && disk.large_files.length > 0)\n .map(disk =>\n disk.large_files ? (\n <Fragment key={disk.device}>\n <Plaintext>{`大文件列表 (${disk.mount_point})`}</Plaintext>\n <Table\n dataSource={{ list: disk.large_files }}\n columns={[\n { dataIndex: \"path\", key: \"path\", title: \"路径\" },\n { dataIndex: \"size\", key: \"size\", title: \"大小\" }\n ]}\n rowKey=\"path\"\n pagination={false}\n />\n </Fragment>\n ) : null\n )}\n </Card>\n ))}\n </View>\n );\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.preview-container\n# style=\"position: fixed; inset: 0; overflow-y: auto\"\n# id=\"brick-1\"\n# ></ai-portal.preview-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.source =\n# 'const RESPONSE = {\\n \"list\": [\\n {\\n \"inode_usage\": [\\n {\\n \"total_inodes\": 21162000,\\n \"used_inodes\": 1385716,\\n \"free_inodes\": 19776284,\\n \"percent\": \"7%\",\\n \"device\": \"/dev/sda1\",\\n \"mount_point\": \"/\"\\n },\\n {\\n \"mount_point\": \"/boot\",\\n \"total_inodes\": 524288,\\n \"used_inodes\": 333,\\n \"free_inodes\": 523955,\\n \"percent\": \"1%\",\\n \"device\": \"/dev/vda1\"\\n }\\n ],\\n \"ip\": \"172.30.0.134\",\\n \"disk_usage\": [\\n {\\n \"total\": \"95.00GB\",\\n \"used\": \"85.00GB\",\\n \"free\": \"9.00GB\",\\n \"percent\": \"91%\",\\n \"rw_status\": \"rw\",\\n \"large_files\": [\\n {\\n \"size\": \"1.00GB\",\\n \"path\": \"/temp/1\"\\n },\\n {\\n \"path\": \"/temp/2\",\\n \"size\": \"759.00MB\"\\n },\\n {\\n \"size\": \"360.00MB\",\\n \"path\": \"/temp/3\"\\n }\\n ],\\n \"device\": \"/dev/sda1\",\\n \"mount_point\": \"/\"\\n },\\n {\\n \"rw_status\": \"rw\",\\n \"device\": \"/dev/vda1\",\\n \"mount_point\": \"/boot\",\\n \"total\": \"1014.00MB\",\\n \"used\": \"181.00MB\",\\n \"free\": \"834.00MB\",\\n \"percent\": \"18%\"\\n }\\n ]\\n }\\n ]\\n};\\n\\nexport default (\\n <View title=\"磁盘使用情况\">\\n {RESPONSE.list.map((item) => (\\n <Card title={item.ip}>\\n {/* 磁盘空间使用情况 */}\\n <Plaintext>磁盘空间使用</Plaintext>\\n <Table\\n dataSource={{ list: item.disk_usage }}\\n columns={[\\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\\n { dataIndex: \"total\", key: \"total\", title: \"总大小\" },\\n { dataIndex: \"used\", key: \"used\", title: \"已用空间\" },\\n { dataIndex: \"free\", key: \"free\", title: \"可用空间\" },\\n { dataIndex: \"percent\", key: \"percent\", title: \"使用率\" },\\n { dataIndex: \"rw_status\", key: \"rw_status\", title: \"读写状态\" }\\n ]}\\n rowKey=\"device\"\\n pagination={false}\\n />\\n\\n {/* Inode 使用情况 */}\\n <Plaintext>Inode 使用情况</Plaintext>\\n <Table\\n dataSource={{ list: item.inode_usage }}\\n columns={[\\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\\n { dataIndex: \"total_inodes\", key: \"total_inodes\", title: \"Inode 总数\" },\\n { dataIndex: \"used_inodes\", key: \"used_inodes\", title: \"已用 Inode\" },\\n { dataIndex: \"free_inodes\", key: \"free_inodes\", title: \"空闲 Inode\" },\\n {\\n dataIndex: \"percent\", key: \"percent\", title: \"使用率\",\\n render: (cell, record) => (\\n // <Plaintext>{record.percent}%</Plaintext>\\n `~${record.percent}`\\n )\\n }\\n ]}\\n rowKey=\"device\"\\n pagination={false}\\n />\\n\\n {/* 大文件列表(仅当存在 large_files 且有内容时) */}\\n {item.disk_usage\\n .filter(disk => disk.large_files && disk.large_files.length > 0)\\n .map(disk =>\\n disk.large_files ? (\\n <Fragment key={disk.device}>\\n <Plaintext>{`大文件列表 (${disk.mount_point})`}</Plaintext>\\n <Table\\n dataSource={{ list: disk.large_files }}\\n columns={[\\n { dataIndex: \"path\", key: \"path\", title: \"路径\" },\\n { dataIndex: \"size\", key: \"size\", title: \"大小\" }\\n ]}\\n rowKey=\"path\"\\n pagination={false}\\n />\\n </Fragment>\\n ) : null\\n )}\\n </Card>\\n ))}\\n </View>\\n);\\n';\n# </script>\n# \n```\n"
40
- },
41
- "ai-portal.stat-with-mini-chart": {
42
- "doc": "构件 `ai-portal.stat-with-mini-chart`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.stat-with-mini-chart\nproperties:\n label: 请求数\n value: \"563.5\"\n xField: time\n yField: request_total\n lineColor: \"#295DFF\"\n data:\n - request_total: 642.2\n time: 1730597995.403\n - request_total: 621.3\n time: 1730599200\n - request_total: 600.2\n time: 1730601000\n - request_total: 601.9666666666667\n time: 1730602800\n - request_total: 592.4\n time: 1730604600\n - request_total: 567.8666666666667\n time: 1730606400\n - request_total: 651.3333333333334\n time: 1730608200\n - request_total: 571.9677419354839\n time: 1730610000\n - request_total: 550.2\n time: 1730611800\n - request_total: 556.5666666666667\n time: 1730613600\n - request_total: 565.6333333333333\n time: 1730615400\n - request_total: 586.5666666666667\n time: 1730617200\n - request_total: 611.7\n time: 1730619000\n - request_total: 540.0645161290323\n time: 1730620800\n - request_total: 595.9333333333333\n time: 1730622600\n - request_total: 560.0333333333333\n time: 1730624400\n - request_total: 565.2333333333333\n time: 1730626200\n - request_total: 609.5806451612904\n time: 1730628000\n - request_total: 598.8\n time: 1730629800\n - request_total: 594.5333333333333\n time: 1730631600\n - request_total: 525.7\n time: 1730633400\n - request_total: 602.3666666666667\n time: 1730635200\n - request_total: 557.7333333333333\n time: 1730637000\n - request_total: 595.8666666666667\n time: 1730638800\n - request_total: 638.7\n time: 1730640600\n - request_total: 635.8333333333334\n time: 1730642400\n - request_total: 563.9\n time: 1730644200\n - request_total: 606.4516129032259\n time: 1730646000\n - request_total: 660.1\n time: 1730647800\n - request_total: 606.2666666666667\n time: 1730649600\n - request_total: 504.43333333333334\n time: 1730651400\n - request_total: 651.7333333333333\n time: 1730653200\n - request_total: 583.5\n time: 1730655000\n - request_total: 566.2333333333333\n time: 1730656800\n - request_total: 519.2333333333333\n time: 1730658600\n - request_total: 621.6333333333333\n time: 1730660400\n - request_total: 530.9333333333333\n time: 1730662200\n - request_total: 685.3\n time: 1730664000\n - request_total: 616.3333333333334\n time: 1730665800\n - request_total: 580.3333333333334\n time: 1730667600\n - request_total: 568.5666666666667\n time: 1730669400\n - request_total: 619.3\n time: 1730671200\n - request_total: 636.2333333333333\n time: 1730673000\n - request_total: 630.4666666666667\n time: 1730674800\n - request_total: 621.4666666666667\n time: 1730676600\n - request_total: 587.5333333333333\n time: 1730678400\n - request_total: 542.8666666666667\n time: 1730680200\n - request_total: 579\n time: 1730682000\n - request_total: 563.5\n time: 1730683800\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stat-with-mini-chart\n# label=\"请求数\"\n# value=\"563.5\"\n# x-field=\"time\"\n# y-field=\"request_total\"\n# line-color=\"#295DFF\"\n# id=\"brick-1\"\n# ></ai-portal.stat-with-mini-chart>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.data = [\n# {\n# request_total: 642.2,\n# time: 1730597995.403,\n# },\n# {\n# request_total: 621.3,\n# time: 1730599200,\n# },\n# {\n# request_total: 600.2,\n# time: 1730601000,\n# },\n# {\n# request_total: 601.9666666666667,\n# time: 1730602800,\n# },\n# {\n# request_total: 592.4,\n# time: 1730604600,\n# },\n# {\n# request_total: 567.8666666666667,\n# time: 1730606400,\n# },\n# {\n# request_total: 651.3333333333334,\n# time: 1730608200,\n# },\n# {\n# request_total: 571.9677419354839,\n# time: 1730610000,\n# },\n# {\n# request_total: 550.2,\n# time: 1730611800,\n# },\n# {\n# request_total: 556.5666666666667,\n# time: 1730613600,\n# },\n# {\n# request_total: 565.6333333333333,\n# time: 1730615400,\n# },\n# {\n# request_total: 586.5666666666667,\n# time: 1730617200,\n# },\n# {\n# request_total: 611.7,\n# time: 1730619000,\n# },\n# {\n# request_total: 540.0645161290323,\n# time: 1730620800,\n# },\n# {\n# request_total: 595.9333333333333,\n# time: 1730622600,\n# },\n# {\n# request_total: 560.0333333333333,\n# time: 1730624400,\n# },\n# {\n# request_total: 565.2333333333333,\n# time: 1730626200,\n# },\n# {\n# request_total: 609.5806451612904,\n# time: 1730628000,\n# },\n# {\n# request_total: 598.8,\n# time: 1730629800,\n# },\n# {\n# request_total: 594.5333333333333,\n# time: 1730631600,\n# },\n# {\n# request_total: 525.7,\n# time: 1730633400,\n# },\n# {\n# request_total: 602.3666666666667,\n# time: 1730635200,\n# },\n# {\n# request_total: 557.7333333333333,\n# time: 1730637000,\n# },\n# {\n# request_total: 595.8666666666667,\n# time: 1730638800,\n# },\n# {\n# request_total: 638.7,\n# time: 1730640600,\n# },\n# {\n# request_total: 635.8333333333334,\n# time: 1730642400,\n# },\n# {\n# request_total: 563.9,\n# time: 1730644200,\n# },\n# {\n# request_total: 606.4516129032259,\n# time: 1730646000,\n# },\n# {\n# request_total: 660.1,\n# time: 1730647800,\n# },\n# {\n# request_total: 606.2666666666667,\n# time: 1730649600,\n# },\n# {\n# request_total: 504.43333333333334,\n# time: 1730651400,\n# },\n# {\n# request_total: 651.7333333333333,\n# time: 1730653200,\n# },\n# {\n# request_total: 583.5,\n# time: 1730655000,\n# },\n# {\n# request_total: 566.2333333333333,\n# time: 1730656800,\n# },\n# {\n# request_total: 519.2333333333333,\n# time: 1730658600,\n# },\n# {\n# request_total: 621.6333333333333,\n# time: 1730660400,\n# },\n# {\n# request_total: 530.9333333333333,\n# time: 1730662200,\n# },\n# {\n# request_total: 685.3,\n# time: 1730664000,\n# },\n# {\n# request_total: 616.3333333333334,\n# time: 1730665800,\n# },\n# {\n# request_total: 580.3333333333334,\n# time: 1730667600,\n# },\n# {\n# request_total: 568.5666666666667,\n# time: 1730669400,\n# },\n# {\n# request_total: 619.3,\n# time: 1730671200,\n# },\n# {\n# request_total: 636.2333333333333,\n# time: 1730673000,\n# },\n# {\n# request_total: 630.4666666666667,\n# time: 1730674800,\n# },\n# {\n# request_total: 621.4666666666667,\n# time: 1730676600,\n# },\n# {\n# request_total: 587.5333333333333,\n# time: 1730678400,\n# },\n# {\n# request_total: 542.8666666666667,\n# time: 1730680200,\n# },\n# {\n# request_total: 579,\n# time: 1730682000,\n# },\n# {\n# request_total: 563.5,\n# time: 1730683800,\n# },\n# ];\n# </script>\n# \n```\n\n### Size\n\n```yaml preview\nbrick: ai-portal.stat-with-mini-chart\nproperties:\n label: 请求数\n value: \"563.5\"\n size: small\n xField: time\n yField: request_total\n lineColor: \"#295DFF\"\n data:\n - request_total: 642.2\n time: 1730597995.403\n - request_total: 621.3\n time: 1730599200\n - request_total: 600.2\n time: 1730601000\n - request_total: 601.9666666666667\n time: 1730602800\n - request_total: 592.4\n time: 1730604600\n - request_total: 567.8666666666667\n time: 1730606400\n - request_total: 651.3333333333334\n time: 1730608200\n - request_total: 571.9677419354839\n time: 1730610000\n - request_total: 550.2\n time: 1730611800\n - request_total: 556.5666666666667\n time: 1730613600\n - request_total: 565.6333333333333\n time: 1730615400\n - request_total: 586.5666666666667\n time: 1730617200\n - request_total: 611.7\n time: 1730619000\n - request_total: 540.0645161290323\n time: 1730620800\n - request_total: 595.9333333333333\n time: 1730622600\n - request_total: 560.0333333333333\n time: 1730624400\n - request_total: 565.2333333333333\n time: 1730626200\n - request_total: 609.5806451612904\n time: 1730628000\n - request_total: 598.8\n time: 1730629800\n - request_total: 594.5333333333333\n time: 1730631600\n - request_total: 525.7\n time: 1730633400\n - request_total: 602.3666666666667\n time: 1730635200\n - request_total: 557.7333333333333\n time: 1730637000\n - request_total: 595.8666666666667\n time: 1730638800\n - request_total: 638.7\n time: 1730640600\n - request_total: 635.8333333333334\n time: 1730642400\n - request_total: 563.9\n time: 1730644200\n - request_total: 606.4516129032259\n time: 1730646000\n - request_total: 660.1\n time: 1730647800\n - request_total: 606.2666666666667\n time: 1730649600\n - request_total: 504.43333333333334\n time: 1730651400\n - request_total: 651.7333333333333\n time: 1730653200\n - request_total: 583.5\n time: 1730655000\n - request_total: 566.2333333333333\n time: 1730656800\n - request_total: 519.2333333333333\n time: 1730658600\n - request_total: 621.6333333333333\n time: 1730660400\n - request_total: 530.9333333333333\n time: 1730662200\n - request_total: 685.3\n time: 1730664000\n - request_total: 616.3333333333334\n time: 1730665800\n - request_total: 580.3333333333334\n time: 1730667600\n - request_total: 568.5666666666667\n time: 1730669400\n - request_total: 619.3\n time: 1730671200\n - request_total: 636.2333333333333\n time: 1730673000\n - request_total: 630.4666666666667\n time: 1730674800\n - request_total: 621.4666666666667\n time: 1730676600\n - request_total: 587.5333333333333\n time: 1730678400\n - request_total: 542.8666666666667\n time: 1730680200\n - request_total: 579\n time: 1730682000\n - request_total: 563.5\n time: 1730683800\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stat-with-mini-chart\n# label=\"请求数\"\n# value=\"563.5\"\n# size=\"small\"\n# x-field=\"time\"\n# y-field=\"request_total\"\n# line-color=\"#295DFF\"\n# id=\"brick-1\"\n# ></ai-portal.stat-with-mini-chart>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.data = [\n# {\n# request_total: 642.2,\n# time: 1730597995.403,\n# },\n# {\n# request_total: 621.3,\n# time: 1730599200,\n# },\n# {\n# request_total: 600.2,\n# time: 1730601000,\n# },\n# {\n# request_total: 601.9666666666667,\n# time: 1730602800,\n# },\n# {\n# request_total: 592.4,\n# time: 1730604600,\n# },\n# {\n# request_total: 567.8666666666667,\n# time: 1730606400,\n# },\n# {\n# request_total: 651.3333333333334,\n# time: 1730608200,\n# },\n# {\n# request_total: 571.9677419354839,\n# time: 1730610000,\n# },\n# {\n# request_total: 550.2,\n# time: 1730611800,\n# },\n# {\n# request_total: 556.5666666666667,\n# time: 1730613600,\n# },\n# {\n# request_total: 565.6333333333333,\n# time: 1730615400,\n# },\n# {\n# request_total: 586.5666666666667,\n# time: 1730617200,\n# },\n# {\n# request_total: 611.7,\n# time: 1730619000,\n# },\n# {\n# request_total: 540.0645161290323,\n# time: 1730620800,\n# },\n# {\n# request_total: 595.9333333333333,\n# time: 1730622600,\n# },\n# {\n# request_total: 560.0333333333333,\n# time: 1730624400,\n# },\n# {\n# request_total: 565.2333333333333,\n# time: 1730626200,\n# },\n# {\n# request_total: 609.5806451612904,\n# time: 1730628000,\n# },\n# {\n# request_total: 598.8,\n# time: 1730629800,\n# },\n# {\n# request_total: 594.5333333333333,\n# time: 1730631600,\n# },\n# {\n# request_total: 525.7,\n# time: 1730633400,\n# },\n# {\n# request_total: 602.3666666666667,\n# time: 1730635200,\n# },\n# {\n# request_total: 557.7333333333333,\n# time: 1730637000,\n# },\n# {\n# request_total: 595.8666666666667,\n# time: 1730638800,\n# },\n# {\n# request_total: 638.7,\n# time: 1730640600,\n# },\n# {\n# request_total: 635.8333333333334,\n# time: 1730642400,\n# },\n# {\n# request_total: 563.9,\n# time: 1730644200,\n# },\n# {\n# request_total: 606.4516129032259,\n# time: 1730646000,\n# },\n# {\n# request_total: 660.1,\n# time: 1730647800,\n# },\n# {\n# request_total: 606.2666666666667,\n# time: 1730649600,\n# },\n# {\n# request_total: 504.43333333333334,\n# time: 1730651400,\n# },\n# {\n# request_total: 651.7333333333333,\n# time: 1730653200,\n# },\n# {\n# request_total: 583.5,\n# time: 1730655000,\n# },\n# {\n# request_total: 566.2333333333333,\n# time: 1730656800,\n# },\n# {\n# request_total: 519.2333333333333,\n# time: 1730658600,\n# },\n# {\n# request_total: 621.6333333333333,\n# time: 1730660400,\n# },\n# {\n# request_total: 530.9333333333333,\n# time: 1730662200,\n# },\n# {\n# request_total: 685.3,\n# time: 1730664000,\n# },\n# {\n# request_total: 616.3333333333334,\n# time: 1730665800,\n# },\n# {\n# request_total: 580.3333333333334,\n# time: 1730667600,\n# },\n# {\n# request_total: 568.5666666666667,\n# time: 1730669400,\n# },\n# {\n# request_total: 619.3,\n# time: 1730671200,\n# },\n# {\n# request_total: 636.2333333333333,\n# time: 1730673000,\n# },\n# {\n# request_total: 630.4666666666667,\n# time: 1730674800,\n# },\n# {\n# request_total: 621.4666666666667,\n# time: 1730676600,\n# },\n# {\n# request_total: 587.5333333333333,\n# time: 1730678400,\n# },\n# {\n# request_total: 542.8666666666667,\n# time: 1730680200,\n# },\n# {\n# request_total: 579,\n# time: 1730682000,\n# },\n# {\n# request_total: 563.5,\n# time: 1730683800,\n# },\n# ];\n# </script>\n# \n```\n"
45
+ "doc": "---\ntagName: ai-portal.preview-container\ndisplayName: WrappedAiPortalPreviewContainer\ndescription: TSX 源码预览容器,将 TSX 源码字符串解析并渲染为完整的页面视图。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.preview-container\n\n> TSX 源码预览容器,将 TSX 源码字符串解析并渲染为完整的页面视图。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------ | -------- | ---- | ------ | --------------------------------------------------------------- |\n| source | `string` | 否 | - | TSX 源码字符串,将被解析并渲染为页面视图 |\n| url | `string` | 否 | - | 渲染上下文中可访问的 URL,传入后可在视图内通过路由相关 API 使用 |\n\n## Examples\n\n### 基础使用\n\n将 TSX 源码字符串解析并渲染为磁盘使用情况报告视图。\n\n```yaml preview minHeight=\"600px\"\nbrick: ai-portal.preview-container\nproperties:\n style:\n position: fixed\n inset: 0\n overflowY: auto\n source: |\n const RESPONSE = {\n \"list\": [\n {\n \"inode_usage\": [\n {\n \"total_inodes\": 21162000,\n \"used_inodes\": 1385716,\n \"free_inodes\": 19776284,\n \"percent\": \"7%\",\n \"device\": \"/dev/sda1\",\n \"mount_point\": \"/\"\n },\n {\n \"mount_point\": \"/boot\",\n \"total_inodes\": 524288,\n \"used_inodes\": 333,\n \"free_inodes\": 523955,\n \"percent\": \"1%\",\n \"device\": \"/dev/vda1\"\n }\n ],\n \"ip\": \"172.30.0.134\",\n \"disk_usage\": [\n {\n \"total\": \"95.00GB\",\n \"used\": \"85.00GB\",\n \"free\": \"9.00GB\",\n \"percent\": \"91%\",\n \"rw_status\": \"rw\",\n \"large_files\": [\n {\n \"size\": \"1.00GB\",\n \"path\": \"/temp/1\"\n },\n {\n \"path\": \"/temp/2\",\n \"size\": \"759.00MB\"\n },\n {\n \"size\": \"360.00MB\",\n \"path\": \"/temp/3\"\n }\n ],\n \"device\": \"/dev/sda1\",\n \"mount_point\": \"/\"\n },\n {\n \"rw_status\": \"rw\",\n \"device\": \"/dev/vda1\",\n \"mount_point\": \"/boot\",\n \"total\": \"1014.00MB\",\n \"used\": \"181.00MB\",\n \"free\": \"834.00MB\",\n \"percent\": \"18%\"\n }\n ]\n }\n ]\n };\n\n export default (\n <View title=\"磁盘使用情况\">\n {RESPONSE.list.map((item) => (\n <Card title={item.ip}>\n <Plaintext>磁盘空间使用</Plaintext>\n <Table\n dataSource={{ list: item.disk_usage }}\n columns={[\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\n { dataIndex: \"total\", key: \"total\", title: \"总大小\" },\n { dataIndex: \"used\", key: \"used\", title: \"已用空间\" },\n { dataIndex: \"free\", key: \"free\", title: \"可用空间\" },\n { dataIndex: \"percent\", key: \"percent\", title: \"使用率\" },\n { dataIndex: \"rw_status\", key: \"rw_status\", title: \"读写状态\" }\n ]}\n rowKey=\"device\"\n pagination={false}\n />\n <Plaintext>Inode 使用情况</Plaintext>\n <Table\n dataSource={{ list: item.inode_usage }}\n columns={[\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\n { dataIndex: \"total_inodes\", key: \"total_inodes\", title: \"Inode 总数\" },\n { dataIndex: \"used_inodes\", key: \"used_inodes\", title: \"已用 Inode\" },\n { dataIndex: \"free_inodes\", key: \"free_inodes\", title: \"空闲 Inode\" },\n { dataIndex: \"percent\", key: \"percent\", title: \"使用率\" }\n ]}\n rowKey=\"device\"\n pagination={false}\n />\n </Card>\n ))}\n </View>\n );\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.preview-container\n# style=\"position: fixed; inset: 0; overflow-y: auto\"\n# id=\"brick-1\"\n# ></ai-portal.preview-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.source =\n# 'const RESPONSE = {\\n \"list\": [\\n {\\n \"inode_usage\": [\\n {\\n \"total_inodes\": 21162000,\\n \"used_inodes\": 1385716,\\n \"free_inodes\": 19776284,\\n \"percent\": \"7%\",\\n \"device\": \"/dev/sda1\",\\n \"mount_point\": \"/\"\\n },\\n {\\n \"mount_point\": \"/boot\",\\n \"total_inodes\": 524288,\\n \"used_inodes\": 333,\\n \"free_inodes\": 523955,\\n \"percent\": \"1%\",\\n \"device\": \"/dev/vda1\"\\n }\\n ],\\n \"ip\": \"172.30.0.134\",\\n \"disk_usage\": [\\n {\\n \"total\": \"95.00GB\",\\n \"used\": \"85.00GB\",\\n \"free\": \"9.00GB\",\\n \"percent\": \"91%\",\\n \"rw_status\": \"rw\",\\n \"large_files\": [\\n {\\n \"size\": \"1.00GB\",\\n \"path\": \"/temp/1\"\\n },\\n {\\n \"path\": \"/temp/2\",\\n \"size\": \"759.00MB\"\\n },\\n {\\n \"size\": \"360.00MB\",\\n \"path\": \"/temp/3\"\\n }\\n ],\\n \"device\": \"/dev/sda1\",\\n \"mount_point\": \"/\"\\n },\\n {\\n \"rw_status\": \"rw\",\\n \"device\": \"/dev/vda1\",\\n \"mount_point\": \"/boot\",\\n \"total\": \"1014.00MB\",\\n \"used\": \"181.00MB\",\\n \"free\": \"834.00MB\",\\n \"percent\": \"18%\"\\n }\\n ]\\n }\\n ]\\n};\\n\\nexport default (\\n <View title=\"磁盘使用情况\">\\n {RESPONSE.list.map((item) => (\\n <Card title={item.ip}>\\n <Plaintext>磁盘空间使用</Plaintext>\\n <Table\\n dataSource={{ list: item.disk_usage }}\\n columns={[\\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\\n { dataIndex: \"total\", key: \"total\", title: \"总大小\" },\\n { dataIndex: \"used\", key: \"used\", title: \"已用空间\" },\\n { dataIndex: \"free\", key: \"free\", title: \"可用空间\" },\\n { dataIndex: \"percent\", key: \"percent\", title: \"使用率\" },\\n { dataIndex: \"rw_status\", key: \"rw_status\", title: \"读写状态\" }\\n ]}\\n rowKey=\"device\"\\n pagination={false}\\n />\\n <Plaintext>Inode 使用情况</Plaintext>\\n <Table\\n dataSource={{ list: item.inode_usage }}\\n columns={[\\n { dataIndex: \"device\", key: \"device\", title: \"设备\" },\\n { dataIndex: \"mount_point\", key: \"mount_point\", title: \"挂载点\" },\\n { dataIndex: \"total_inodes\", key: \"total_inodes\", title: \"Inode 总数\" },\\n { dataIndex: \"used_inodes\", key: \"used_inodes\", title: \"已用 Inode\" },\\n { dataIndex: \"free_inodes\", key: \"free_inodes\", title: \"空闲 Inode\" },\\n { dataIndex: \"percent\", key: \"percent\", title: \"使用率\" }\\n ]}\\n rowKey=\"device\"\\n pagination={false}\\n />\\n </Card>\\n ))}\\n </View>\\n);\\n';\n# </script>\n# \n```\n"
43
46
  },
44
47
  "ai-portal.action-buttons": {
45
- "doc": "构件 `ai-portal.action-buttons`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.chat-box\nchildren:\n - brick: ai-portal.action-buttons\n properties:\n items:\n - event: think\n text: 深度思考\n icon:\n - lib: antd\n theme: outlined\n icon: reddit\n - event: networking\n text: 联网搜索\n icon:\n lib: antd\n theme: outlined\n icon: global\n events:\n think:\n action: console.log\n networking:\n action: console.log\n slot: actions\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box>\n# <ai-portal.action-buttons\n# slot=\"actions\"\n# id=\"brick-1\"\n# ></ai-portal.action-buttons>\n# </ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.items = [\n# {\n# event: \"think\",\n# text: \"深度思考\",\n# icon: [\n# {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"reddit\",\n# },\n# ],\n# },\n# {\n# event: \"networking\",\n# text: \"联网搜索\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"global\",\n# },\n# },\n# ];\n# brick_1.addEventListener(\"think\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"networking\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
48
+ "doc": "---\ntagName: ai-portal.action-buttons\ndisplayName: WrappedAiPortalActionButtons\ndescription: 动作按钮组,支持选中状态切换,用于聊天框的功能入口。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.action-buttons\n\n> 动作按钮组,支持选中状态切换,用于聊天框的功能入口。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | ----------------------------- | ---- | ------ | ---------------------------------------------------------- |\n| items | `ActionItem[] \\| undefined` | 否 | - | 按钮列表配置,每项包含文本、唯一键值及可选图标 |\n| activeKey | `string \\| null \\| undefined` | 否 | - | 当前选中按钮的键值,选中后显示删除图标,再次点击可取消选中 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------ | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |\n| change | `ActionItem \\| null` — { key: 按钮键值, text: 按钮文本, icon: 按钮图标 } \\| null — 选中时为选中的 ActionItem,取消选中时为 null | 选中或取消选中动作按钮时触发 |\n\n## Examples\n\n### Basic\n\n展示动作按钮组的基本用法,点击按钮切换选中状态。\n\n```yaml preview\nbrick: ai-portal.chat-box\nchildren:\n - brick: ai-portal.action-buttons\n slot: actions\n properties:\n items:\n - key: think\n text: 深度思考\n icon:\n lib: antd\n theme: outlined\n icon: reddit\n - key: networking\n text: 联网搜索\n icon:\n lib: antd\n theme: outlined\n icon: global\n events:\n change:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-box>\n# <ai-portal.action-buttons\n# slot=\"actions\"\n# id=\"brick-1\"\n# ></ai-portal.action-buttons>\n# </ai-portal.chat-box>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.items = [\n# {\n# key: \"think\",\n# text: \"深度思考\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"reddit\",\n# },\n# },\n# {\n# key: \"networking\",\n# text: \"联网搜索\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"global\",\n# },\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With activeKey\n\n通过 `activeKey` 属性预设选中的按钮。\n\n```yaml preview\nbrick: ai-portal.action-buttons\nproperties:\n activeKey: think\n items:\n - key: think\n text: 深度思考\n icon:\n lib: antd\n theme: outlined\n icon: reddit\n - key: networking\n text: 联网搜索\n icon:\n lib: antd\n theme: outlined\n icon: global\nevents:\n change:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.action-buttons\n# active-key=\"think\"\n# id=\"brick-1\"\n# ></ai-portal.action-buttons>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.items = [\n# {\n# key: \"think\",\n# text: \"深度思考\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"reddit\",\n# },\n# },\n# {\n# key: \"networking\",\n# text: \"联网搜索\",\n# icon: {\n# lib: \"antd\",\n# theme: \"outlined\",\n# icon: \"global\",\n# },\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
46
49
  },
47
50
  "ai-portal.goal-card-list": {
48
- "doc": "构件 `ai-portal.goal-card-list`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.goal-card-list\nproperties:\n style:\n width: 600px\n goalList:\n - title: 页面流程绘制\n index: 100124\n state: ready\n instanceId: abc1\n conversations:\n - 会话1\n - 会话2\n - 会话3\n - title: 原型与设计绘制\n index: 100125\n state: working\n instanceId: bdc9\n conversations:\n - 会话4\n - title: 设计稿绘制\n index: 100126\n state: completed\n instanceId: d76a\n conversations:\n - 会话5\n - 会话6\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.goal-card-list\n# style=\"width: 600px\"\n# id=\"brick-1\"\n# ></ai-portal.goal-card-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.goalList = [\n# {\n# title: \"页面流程绘制\",\n# index: 100124,\n# state: \"ready\",\n# instanceId: \"abc1\",\n# conversations: [\"会话1\", \"会话2\", \"会话3\"],\n# },\n# {\n# title: \"原型与设计绘制\",\n# index: 100125,\n# state: \"working\",\n# instanceId: \"bdc9\",\n# conversations: [\"会话4\"],\n# },\n# {\n# title: \"设计稿绘制\",\n# index: 100126,\n# state: \"completed\",\n# instanceId: \"d76a\",\n# conversations: [\"会话5\", \"会话6\"],\n# },\n# ];\n# </script>\n# \n```\n"
51
+ "doc": "---\ntagName: ai-portal.goal-card-list\ndisplayName: WrappedAiPortalGoalCardList\ndescription: 目标卡片列表,以分层卡片形式展示目标项,支持内联编辑标题、状态切换、新建对话及追加子目标。\ncategory: display-component\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.goal-card-list\n\n> 目标卡片列表,以分层卡片形式展示目标项,支持内联编辑标题、状态切换、新建对话及追加子目标。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | --------------------- | ---- | ------ | --------------------------------------------------------- |\n| goalList | `GoalItem[]` | 否 | - | 目标列表数据,支持多层级(通过 `level` 字段区分父子层级) |\n| cardStyle | `React.CSSProperties` | 否 | - | 卡片的自定义样式 |\n| activeKey | `string` | 否 | - | 当前激活卡片的 instanceId,匹配的卡片会高亮显示 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------------------ | ---------------------------------------------------------------------------------------------------- | -------------------------------- |\n| item.click | `GoalItem` — { title: 目标标题, state: 目标状态, id: 序号, instanceId: 实例ID, level: 层级 } | 点击目标卡片时触发 |\n| item.status.change | `GoalItem` — { title: 目标标题, state: 更新后的目标状态, id: 序号, instanceId: 实例ID, level: 层级 } | 目标状态切换时触发 |\n| item.title.change | `GoalItem` — { title: 更新后的标题, state: 目标状态, id: 序号, instanceId: 实例ID, level: 层级 } | 目标标题内联编辑完成时触发 |\n| item.new.chat | `GoalItem` — { title: 目标标题, state: 目标状态, id: 序号, instanceId: 实例ID, level: 层级 } | 点击目标卡片的新建对话按钮时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| --------------- | ------------------------------------------------ | ------ | ---------------------------- |\n| appendChildDone | `(pendingId: string, newItem: GoalItem) => void` | `void` | 将待定子目标提交为正式目标项 |\n\n## Examples\n\n### Basic\n\n展示基础目标卡片列表,包含多种状态的目标项。\n\n```yaml preview\nbrick: ai-portal.goal-card-list\nproperties:\n style:\n width: 600px\n goalList:\n - title: 页面流程绘制\n id: 100124\n state: ready\n instanceId: abc1\n level: 0\n - title: 原型与设计绘制\n id: 100125\n state: working\n instanceId: bdc9\n level: 0\n - title: 设计稿绘制\n id: 100126\n state: completed\n instanceId: d76a\n level: 0\nevents:\n item.click:\n action: \"console.log\"\n item.status.change:\n action: \"console.log\"\n item.title.change:\n action: \"console.log\"\n item.new.chat:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.goal-card-list\n# style=\"width: 600px\"\n# id=\"brick-1\"\n# ></ai-portal.goal-card-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.goalList = [\n# {\n# title: \"页面流程绘制\",\n# id: 100124,\n# state: \"ready\",\n# instanceId: \"abc1\",\n# level: 0,\n# },\n# {\n# title: \"原型与设计绘制\",\n# id: 100125,\n# state: \"working\",\n# instanceId: \"bdc9\",\n# level: 0,\n# },\n# {\n# title: \"设计稿绘制\",\n# id: 100126,\n# state: \"completed\",\n# instanceId: \"d76a\",\n# level: 0,\n# },\n# ];\n# brick_1.addEventListener(\"item.click\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"item.status.change\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"item.title.change\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"item.new.chat\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Active Item\n\n配置 activeKey 高亮激活当前选中的目标卡片。\n\n```yaml preview\nbrick: ai-portal.goal-card-list\nproperties:\n style:\n width: 600px\n activeKey: bdc9\n goalList:\n - title: 页面流程绘制\n id: 100124\n state: ready\n instanceId: abc1\n level: 0\n - title: 原型与设计绘制\n id: 100125\n state: working\n instanceId: bdc9\n level: 0\n - title: 设计稿绘制\n id: 100126\n state: completed\n instanceId: d76a\n level: 0\nevents:\n item.click:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.goal-card-list\n# style=\"width: 600px\"\n# active-key=\"bdc9\"\n# id=\"brick-1\"\n# ></ai-portal.goal-card-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.goalList = [\n# {\n# title: \"页面流程绘制\",\n# id: 100124,\n# state: \"ready\",\n# instanceId: \"abc1\",\n# level: 0,\n# },\n# {\n# title: \"原型与设计绘制\",\n# id: 100125,\n# state: \"working\",\n# instanceId: \"bdc9\",\n# level: 0,\n# },\n# {\n# title: \"设计稿绘制\",\n# id: 100126,\n# state: \"completed\",\n# instanceId: \"d76a\",\n# level: 0,\n# },\n# ];\n# brick_1.addEventListener(\"item.click\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Hierarchical Goals\n\n展示多层级目标,子目标通过 level 字段缩进显示。\n\n```yaml preview\nbrick: ai-portal.goal-card-list\nproperties:\n style:\n width: 600px\n goalList:\n - title: 产品研发\n id: 1001\n state: working\n instanceId: parent1\n level: 0\n - title: 需求分析\n id: 1002\n state: completed\n instanceId: child1\n level: 1\n - title: UI 设计\n id: 1003\n state: working\n instanceId: child2\n level: 1\n - title: 数据架构\n id: 1004\n state: ready\n instanceId: parent2\n level: 0\nevents:\n item.click:\n action: \"console.log\"\n item.status.change:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.goal-card-list\n# style=\"width: 600px\"\n# id=\"brick-1\"\n# ></ai-portal.goal-card-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.goalList = [\n# {\n# title: \"产品研发\",\n# id: 1001,\n# state: \"working\",\n# instanceId: \"parent1\",\n# level: 0,\n# },\n# {\n# title: \"需求分析\",\n# id: 1002,\n# state: \"completed\",\n# instanceId: \"child1\",\n# level: 1,\n# },\n# {\n# title: \"UI 设计\",\n# id: 1003,\n# state: \"working\",\n# instanceId: \"child2\",\n# level: 1,\n# },\n# {\n# title: \"数据架构\",\n# id: 1004,\n# state: \"ready\",\n# instanceId: \"parent2\",\n# level: 0,\n# },\n# ];\n# brick_1.addEventListener(\"item.click\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"item.status.change\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### Custom Card Style\n\n为卡片配置自定义样式。\n\n```yaml preview\nbrick: ai-portal.goal-card-list\nproperties:\n cardStyle:\n borderRadius: 8px\n marginBottom: 8px\n style:\n width: 600px\n goalList:\n - title: 前端架构升级\n id: 2001\n state: ready\n instanceId: item1\n level: 0\n - title: 性能优化\n id: 2002\n state: working\n instanceId: item2\n level: 0\nevents:\n item.click:\n action: \"console.log\"\n item.new.chat:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.goal-card-list\n# style=\"width: 600px\"\n# id=\"brick-1\"\n# ></ai-portal.goal-card-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.cardStyle = {\n# borderRadius: \"8px\",\n# marginBottom: \"8px\",\n# };\n# brick_1.goalList = [\n# {\n# title: \"前端架构升级\",\n# id: 2001,\n# state: \"ready\",\n# instanceId: \"item1\",\n# level: 0,\n# },\n# {\n# title: \"性能优化\",\n# id: 2002,\n# state: \"working\",\n# instanceId: \"item2\",\n# level: 0,\n# },\n# ];\n# brick_1.addEventListener(\"item.click\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"item.new.chat\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
49
52
  },
50
53
  "ai-portal.project-conversations": {
51
- "doc": "构件 `ai-portal.project-conversations`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.project-conversations\nproperties:\n list:\n - conversationId: \"conv-a\"\n title: 标题一\n description: 这是一段描述\n startTime: 1757904096\n goal: GOAL0005\n - conversationId: \"conv-b\"\n title: 标题二\n startTime: 1757863597\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-conversations id=\"brick-1\"></ai-portal.project-conversations>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# conversationId: \"conv-a\",\n# title: \"标题一\",\n# description: \"这是一段描述\",\n# startTime: 1757904096,\n# goal: \"GOAL0005\",\n# },\n# {\n# conversationId: \"conv-b\",\n# title: \"标题二\",\n# startTime: 1757863597,\n# },\n# ];\n# </script>\n# \n```\n\n### Loading\n\n```yaml preview\nbrick: ai-portal.project-conversations\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-conversations></ai-portal.project-conversations>\n# \n```\n"
54
+ "doc": "---\ntagName: ai-portal.project-conversations\ndisplayName: WrappedAiPortalProjectConversations\ndescription: 项目会话列表构件,展示项目中的会话记录,支持目标分类、操作菜单。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.project-conversations\n\n> 项目会话列表构件,展示项目中的会话记录,支持目标分类、操作菜单。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | ---------------- | ---- | ------ | ---------------------------------------------------------------------------- |\n| list | `Conversation[]` | 否 | - | 会话列表数据,为 undefined 时显示加载状态 |\n| urlTemplate | `string` | 否 | - | 会话详情链接模板,支持使用会话字段插值,如 /conversations/{{conversationId}} |\n| actions | `ActionType[]` | 否 | - | 操作菜单配置,每项会话行尾显示可操作的菜单项 |\n| goals | `Goal[]` | 否 | - | 目标列表,用于显示会话关联的目标名称 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------- |\n| goal.click | `Conversation` — { conversationId: 会话ID, title: 会话标题, startTime: 开始时间, goalInstanceId: 目标实例ID } | 点击会话关联的目标标签时触发 |\n| action.click | `ActionClickDetail` — { action: 操作项配置, item: 所属会话数据 } | 点击操作菜单项时触发 |\n\n## Examples\n\n### 基础使用\n\n展示会话列表,当 list 为 undefined 时显示加载态。\n\n```yaml preview\nbrick: ai-portal.project-conversations\nproperties:\n list:\n - conversationId: \"conv-a\"\n title: 标题一\n description: 这是一段描述\n startTime: 1757904096\n - conversationId: \"conv-b\"\n title: 标题二\n startTime: 1757863597\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-conversations id=\"brick-1\"></ai-portal.project-conversations>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# conversationId: \"conv-a\",\n# title: \"标题一\",\n# description: \"这是一段描述\",\n# startTime: 1757904096,\n# },\n# {\n# conversationId: \"conv-b\",\n# title: \"标题二\",\n# startTime: 1757863597,\n# },\n# ];\n# </script>\n# \n```\n\n### 带目标分类\n\n配置 goals 后会话卡片会显示关联的目标名称标签。\n\n```yaml preview\nbrick: ai-portal.project-conversations\nproperties:\n goals:\n - instanceId: \"GOAL0001\"\n title: \"提升研发效率\"\n - instanceId: \"GOAL0002\"\n title: \"降低故障率\"\n list:\n - conversationId: \"conv-a\"\n title: 关联目标的会话\n startTime: 1757904096\n goalInstanceId: \"GOAL0001\"\n - conversationId: \"conv-b\"\n title: 全局会话(无目标)\n startTime: 1757863597\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-conversations id=\"brick-1\"></ai-portal.project-conversations>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.goals = [\n# {\n# instanceId: \"GOAL0001\",\n# title: \"提升研发效率\",\n# },\n# {\n# instanceId: \"GOAL0002\",\n# title: \"降低故障率\",\n# },\n# ];\n# brick_1.list = [\n# {\n# conversationId: \"conv-a\",\n# title: \"关联目标的会话\",\n# startTime: 1757904096,\n# goalInstanceId: \"GOAL0001\",\n# },\n# {\n# conversationId: \"conv-b\",\n# title: \"全局会话(无目标)\",\n# startTime: 1757863597,\n# },\n# ];\n# </script>\n# \n```\n\n### 带操作菜单\n\n配置 actions 后每行显示可操作的菜单项。\n\n```yaml preview\nbrick: ai-portal.project-conversations\nproperties:\n actions:\n - text: \"删除\"\n event: \"delete\"\n icon:\n lib: \"antd\"\n icon: \"delete\"\n list:\n - conversationId: \"conv-a\"\n title: 会话标题一\n description: 这是一段描述\n startTime: 1757904096\n username: \"alice\"\n - conversationId: \"conv-b\"\n title: 会话标题二\n startTime: 1757863597\nevents:\n action.click:\n action: console.log\n args:\n - \"操作点击:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-conversations id=\"brick-1\"></ai-portal.project-conversations>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.actions = [\n# {\n# text: \"删除\",\n# event: \"delete\",\n# icon: {\n# lib: \"antd\",\n# icon: \"delete\",\n# },\n# },\n# ];\n# brick_1.list = [\n# {\n# conversationId: \"conv-a\",\n# title: \"会话标题一\",\n# description: \"这是一段描述\",\n# startTime: 1757904096,\n# username: \"alice\",\n# },\n# {\n# conversationId: \"conv-b\",\n# title: \"会话标题二\",\n# startTime: 1757863597,\n# },\n# ];\n# brick_1.addEventListener(\"action.click\", (e) => {\n# console.log(\"操作点击:\", e.detail);\n# });\n# </script>\n# \n```\n\n### 加载状态\n\nlist 为 undefined 时显示加载中状态。\n\n```yaml preview\nbrick: ai-portal.project-conversations\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-conversations></ai-portal.project-conversations>\n# \n```\n"
52
55
  },
53
56
  "ai-portal.project-knowledges": {
54
- "doc": "构件 `ai-portal.project-knowledges`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.project-knowledges\nproperties:\n list:\n - knowledgeId: \"knowledge-a\"\n title: 标题一\n description: 这是一段描述\n time: 1757904096\n - knowledgeId: \"knowledge-b\"\n title: 标题二\n time: 1757863597\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-knowledges id=\"brick-1\"></ai-portal.project-knowledges>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# knowledgeId: \"knowledge-a\",\n# title: \"标题一\",\n# description: \"这是一段描述\",\n# time: 1757904096,\n# },\n# {\n# knowledgeId: \"knowledge-b\",\n# title: \"标题二\",\n# time: 1757863597,\n# },\n# ];\n# </script>\n# \n```\n\n### Loading\n\n```yaml preview\nbrick: ai-portal.project-knowledges\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-knowledges></ai-portal.project-knowledges>\n# \n```\n"
57
+ "doc": "---\ntagName: ai-portal.project-knowledges\ndisplayName: WrappedAiPortalProjectKnowledges\ndescription: 项目知识库列表构件,展示项目中的知识条目,支持操作菜单和点击跳转。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.project-knowledges\n\n> 项目知识库列表构件,展示项目中的知识条目,支持操作菜单和点击跳转。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | -------------- | ---- | ------ | -------------------------------------------- |\n| list | `Knowledge[]` | 否 | - | 知识列表数据,为 undefined 时显示加载状态 |\n| urlTemplate | `string` | 否 | - | 知识详情链接模板,支持使用知识字段插值 |\n| actions | `ActionType[]` | 否 | - | 操作菜单配置,每条知识行尾显示可操作的菜单项 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------------ | --------------------------------------------------------------------------------------------------- | -------------------- |\n| action.click | `ActionClickDetail` — { action: 操作项配置, item: 所属知识数据 } | 点击操作菜单项时触发 |\n| item.click | `Knowledge` — { instanceId: 知识ID, name: 知识名称, description: 描述, time: 时间戳, user: 创建人 } | 点击知识条目时触发 |\n\n## Examples\n\n### 基础使用\n\n展示知识库列表,当 list 为 undefined 时显示加载态。\n\n```yaml preview\nbrick: ai-portal.project-knowledges\nproperties:\n list:\n - instanceId: \"knowledge-a\"\n name: \"服务器排查手册\"\n description: \"包含常见服务器故障的排查步骤\"\n time: 1757904096\n user: \"alice\"\n - instanceId: \"knowledge-b\"\n name: \"数据库优化指南\"\n time: 1757863597\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-knowledges id=\"brick-1\"></ai-portal.project-knowledges>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# instanceId: \"knowledge-a\",\n# name: \"服务器排查手册\",\n# description: \"包含常见服务器故障的排查步骤\",\n# time: 1757904096,\n# user: \"alice\",\n# },\n# {\n# instanceId: \"knowledge-b\",\n# name: \"数据库优化指南\",\n# time: 1757863597,\n# },\n# ];\n# </script>\n# \n```\n\n### 带操作菜单\n\n配置 actions 后每条知识行尾显示可操作的菜单项。\n\n```yaml preview\nbrick: ai-portal.project-knowledges\nproperties:\n actions:\n - text: \"删除\"\n event: \"delete\"\n icon:\n lib: \"antd\"\n icon: \"delete\"\n list:\n - instanceId: \"knowledge-a\"\n name: \"服务器排查手册\"\n description: \"包含常见服务器故障的排查步骤\"\n time: 1757904096\n user: \"alice\"\n - instanceId: \"knowledge-b\"\n name: \"数据库优化指南\"\n time: 1757863597\nevents:\n action.click:\n action: console.log\n args:\n - \"操作点击:\"\n - \"<% EVENT.detail %>\"\n item.click:\n action: console.log\n args:\n - \"知识点击:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-knowledges id=\"brick-1\"></ai-portal.project-knowledges>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.actions = [\n# {\n# text: \"删除\",\n# event: \"delete\",\n# icon: {\n# lib: \"antd\",\n# icon: \"delete\",\n# },\n# },\n# ];\n# brick_1.list = [\n# {\n# instanceId: \"knowledge-a\",\n# name: \"服务器排查手册\",\n# description: \"包含常见服务器故障的排查步骤\",\n# time: 1757904096,\n# user: \"alice\",\n# },\n# {\n# instanceId: \"knowledge-b\",\n# name: \"数据库优化指南\",\n# time: 1757863597,\n# },\n# ];\n# brick_1.addEventListener(\"action.click\", (e) => {\n# console.log(\"操作点击:\", e.detail);\n# });\n# brick_1.addEventListener(\"item.click\", (e) => {\n# console.log(\"知识点击:\", e.detail);\n# });\n# </script>\n# \n```\n\n### 加载状态\n\nlist 为 undefined 时显示加载中状态。\n\n```yaml preview\nbrick: ai-portal.project-knowledges\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.project-knowledges></ai-portal.project-knowledges>\n# \n```\n"
55
58
  },
56
59
  "ai-portal.activity-timeline": {
57
- "doc": "构件 `ai-portal.activity-timeline`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.activity-timeline\nproperties:\n list:\n - user_id: u001\n user_name: Tom\n action_type: create_goal\n time: 1757853597\n - user_id: u001\n user_name: Tom\n action_type: alter_owner\n time: 1757863597\n metadata:\n after:\n user_name: Lucy\n - user_id: u002\n user_name: Lucy\n action_type: start_conversation\n time: 1757904096\n metadata:\n conversation_id: c001\n conversation_title: 项目规划\n - user_id: u002\n user_name: Lucy\n action_type: decompose_goals\n time: 1757904096\n metadata:\n sub_goals_count: 2\n sub_goals:\n - title: \"先计划\"\n - title: \"再执行\"\n - user_id: u002\n user_name: Lucy\n action_type: alter_user\n time: 1757904096\n metadata:\n before:\n - user_name: Jim\n after:\n - user_name: Joy\n - user_name: Green\n - user_id: u001\n user_name: Tom\n action_type: add_comment\n time: 1757904096\n metadata:\n comment_content: Good!\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.activity-timeline id=\"brick-1\"></ai-portal.activity-timeline>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"create_goal\",\n# time: 1757853597,\n# },\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"alter_owner\",\n# time: 1757863597,\n# metadata: {\n# after: {\n# user_name: \"Lucy\",\n# },\n# },\n# },\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"start_conversation\",\n# time: 1757904096,\n# metadata: {\n# conversation_id: \"c001\",\n# conversation_title: \"项目规划\",\n# },\n# },\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"decompose_goals\",\n# time: 1757904096,\n# metadata: {\n# sub_goals_count: 2,\n# sub_goals: [\n# {\n# title: \"先计划\",\n# },\n# {\n# title: \"再执行\",\n# },\n# ],\n# },\n# },\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"alter_user\",\n# time: 1757904096,\n# metadata: {\n# before: [\n# {\n# user_name: \"Jim\",\n# },\n# ],\n# after: [\n# {\n# user_name: \"Joy\",\n# },\n# {\n# user_name: \"Green\",\n# },\n# ],\n# },\n# },\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"add_comment\",\n# time: 1757904096,\n# metadata: {\n# comment_content: \"Good!\",\n# },\n# },\n# ];\n# </script>\n# \n```\n"
60
+ "doc": "---\ntagName: ai-portal.activity-timeline\ndisplayName: WrappedAiPortalActivityTimeline\ndescription: 活动时间线,展示目标的操作历史记录,支持多种动作类型的可视化展示。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.activity-timeline\n\n> 活动时间线,展示目标的操作历史记录,支持多种动作类型的可视化展示。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------------- | ------------------------- | ---- | ------ | ---------------------------------------------------------------------- |\n| list | `Activity[] \\| undefined` | 否 | - | 活动记录列表 |\n| chatUrlTemplate | `string \\| undefined` | 否 | - | 跳转到对话详情页的 URL 模板,支持 {conversation_id} 等活动记录字段插值 |\n\n## Examples\n\n### Basic\n\n展示活动时间线的基本用法,渲染包含多种动作类型的操作历史记录。\n\n```yaml preview\nbrick: ai-portal.activity-timeline\nproperties:\n list:\n - user_id: u001\n user_name: Tom\n action_type: create_goal\n time: 1757853597\n - user_id: u001\n user_name: Tom\n action_type: alter_owner\n time: 1757863597\n metadata:\n after:\n owner:\n user_name: Lucy\n - user_id: u002\n user_name: Lucy\n action_type: start_conversation\n time: 1757904096\n metadata:\n conversation_id: c001\n conversation_title: 项目规划\n - user_id: u002\n user_name: Lucy\n action_type: decompose_goals\n time: 1757904096\n metadata:\n sub_goals_count: 2\n sub_goals:\n - title: 先计划\n - title: 再执行\n - user_id: u002\n user_name: Lucy\n action_type: alter_user\n time: 1757904096\n metadata:\n before:\n users:\n - user_name: Jim\n after:\n users:\n - user_name: Joy\n - user_name: Green\n - user_id: u001\n user_name: Tom\n action_type: add_comment\n time: 1757904096\n metadata:\n comment_content: Good!\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.activity-timeline id=\"brick-1\"></ai-portal.activity-timeline>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"create_goal\",\n# time: 1757853597,\n# },\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"alter_owner\",\n# time: 1757863597,\n# metadata: {\n# after: {\n# owner: {\n# user_name: \"Lucy\",\n# },\n# },\n# },\n# },\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"start_conversation\",\n# time: 1757904096,\n# metadata: {\n# conversation_id: \"c001\",\n# conversation_title: \"项目规划\",\n# },\n# },\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"decompose_goals\",\n# time: 1757904096,\n# metadata: {\n# sub_goals_count: 2,\n# sub_goals: [\n# {\n# title: \"先计划\",\n# },\n# {\n# title: \"再执行\",\n# },\n# ],\n# },\n# },\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"alter_user\",\n# time: 1757904096,\n# metadata: {\n# before: {\n# users: [\n# {\n# user_name: \"Jim\",\n# },\n# ],\n# },\n# after: {\n# users: [\n# {\n# user_name: \"Joy\",\n# },\n# {\n# user_name: \"Green\",\n# },\n# ],\n# },\n# },\n# },\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"add_comment\",\n# time: 1757904096,\n# metadata: {\n# comment_content: \"Good!\",\n# },\n# },\n# ];\n# </script>\n# \n```\n\n### With Chat URL Template\n\n配置 chatUrlTemplate 属性,使对话链接可点击跳转。\n\n```yaml preview\nbrick: ai-portal.activity-timeline\nproperties:\n chatUrlTemplate: /chat/{conversation_id}\n list:\n - user_id: u002\n user_name: Lucy\n action_type: start_conversation\n time: 1757904096\n metadata:\n conversation_id: c001\n conversation_title: 项目规划\n - user_id: u001\n user_name: Tom\n action_type: create_goal\n time: 1757853597\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.activity-timeline\n# chat-url-template=\"/chat/{conversation_id}\"\n# id=\"brick-1\"\n# ></ai-portal.activity-timeline>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.list = [\n# {\n# user_id: \"u002\",\n# user_name: \"Lucy\",\n# action_type: \"start_conversation\",\n# time: 1757904096,\n# metadata: {\n# conversation_id: \"c001\",\n# conversation_title: \"项目规划\",\n# },\n# },\n# {\n# user_id: \"u001\",\n# user_name: \"Tom\",\n# action_type: \"create_goal\",\n# time: 1757853597,\n# },\n# ];\n# </script>\n# \n```\n"
58
61
  },
59
62
  "ai-portal.chat-input": {
60
- "doc": "构件 `ai-portal.chat-input`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.chat-input\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-input></ai-portal.chat-input>\n# \n```\n"
63
+ "doc": "---\ntagName: ai-portal.chat-input\ndisplayName: WrappedAiPortalChatInput\ndescription: 小型聊天输入框,用于对话等页面,支持命令联想、@提及数字人、文件上传及终止任务等功能。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.chat-input\n\n> 小型聊天输入框,用于对话等页面,支持命令联想、@提及数字人、文件上传及终止任务等功能。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| -------------------- | -------------------------------- | ---- | ---------- | ------------------------------------------------------- |\n| placeholder | `string \\| undefined` | 否 | - | 输入框占位文字 |\n| autoFocus | `boolean \\| undefined` | 否 | - | 是否自动聚焦 |\n| submitDisabled | `boolean \\| undefined` | 否 | - | 是否禁用发送按钮,通常在 AI 正在处理时设为 true |\n| supportsTerminate | `boolean \\| undefined` | 否 | - | 是否显示终止任务按钮,需与 submitDisabled 配合使用 |\n| terminating | `boolean \\| undefined` | 否 | - | 是否正在终止任务,为 true 时显示加载状态 |\n| autoFade | `boolean \\| undefined` | 否 | - | 是否在输入框为空时自动淡出,通过 CSS 属性选择器控制样式 |\n| uploadOptions | `UploadOptions \\| undefined` | 否 | - | 文件上传配置 |\n| aiEmployees | `AIEmployee[] \\| undefined` | 否 | - | 可 @ 提及的数字人列表 |\n| commands | `Command[] \\| undefined` | 否 | - | 命令列表,支持通过 / 或搜索触发联想 |\n| suggestionsPlacement | `\"top\" \\| \"bottom\" \\| undefined` | 否 | `\"bottom\"` | 命令/提及联想弹出层的显示位置 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| -------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |\n| message.submit | `string` — 用户输入的消息文本内容 | 用户提交消息时触发(已废弃,请使用 chat.submit 事件) |\n| chat.submit | `ChatPayload` — { content: 消息内容, files: 上传的文件列表, cmd: 命令载荷, aiEmployeeId: @提及的数字人 ID } | 用户提交聊天消息时触发 |\n| terminate | `void` | 点击终止按钮时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| -------- | ------------------------- | ------ | -------------------- |\n| setValue | `(value: string) => void` | `void` | 设置输入框的值并聚焦 |\n\n## Examples\n\n### Basic\n\n展示小型聊天输入框的基本用法。\n\n```yaml preview\nbrick: ai-portal.chat-input\nproperties:\n placeholder: 请输入您的问题\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-input\n# placeholder=\"请输入您的问题\"\n# id=\"brick-1\"\n# ></ai-portal.chat-input>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Terminate Support\n\n配置终止任务按钮,在 AI 处理时显示停止操作。\n\n```yaml preview\nbrick: ai-portal.chat-input\nproperties:\n placeholder: 请输入您的问题\n submitDisabled: true\n supportsTerminate: true\n terminating: false\nevents:\n chat.submit:\n action: console.log\n terminate:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-input\n# placeholder=\"请输入您的问题\"\n# submit-disabled\n# supports-terminate\n# id=\"brick-1\"\n# ></ai-portal.chat-input>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# brick_1.addEventListener(\"terminate\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With File Upload\n\n配置 uploadOptions 属性,启用文件上传功能。\n\n```yaml preview\nbrick: ai-portal.chat-input\nproperties:\n placeholder: 请输入您的问题,或拖入文件\n uploadOptions:\n enabled: true\n accept: image/*,.pdf\n maxFiles: 3\n readableAccept: 图片或 PDF\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-input\n# placeholder=\"请输入您的问题,或拖入文件\"\n# id=\"brick-1\"\n# ></ai-portal.chat-input>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.uploadOptions = {\n# enabled: true,\n# accept: \"image/*,.pdf\",\n# maxFiles: 3,\n# readableAccept: \"图片或 PDF\",\n# };\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With AI Employees and Commands\n\n同时配置 aiEmployees 和 commands,支持 @ 提及和 / 命令联想。\n\n```yaml preview\nbrick: ai-portal.chat-input\nproperties:\n placeholder: 输入 / 或 @ 触发联想\n suggestionsPlacement: top\n aiEmployees:\n - employeeId: emp001\n name: 运维工程师小李\n commands:\n - command: analyze\n description: 分析数据\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-input\n# placeholder=\"输入 / 或 @ 触发联想\"\n# suggestions-placement=\"top\"\n# id=\"brick-1\"\n# ></ai-portal.chat-input>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.aiEmployees = [\n# {\n# employeeId: \"emp001\",\n# name: \"运维工程师小李\",\n# },\n# ];\n# brick_1.commands = [\n# {\n# command: \"analyze\",\n# description: \"分析数据\",\n# },\n# ];\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Auto Fade\n\n启用 autoFade 属性,使输入框在空内容时通过 CSS 淡出。\n\n```yaml preview\nbrick: ai-portal.chat-input\nproperties:\n placeholder: 请输入您的问题\n autoFade: true\nevents:\n chat.submit:\n action: console.log\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-input\n# placeholder=\"请输入您的问题\"\n# auto-fade\n# id=\"brick-1\"\n# ></ai-portal.chat-input>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"chat.submit\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
61
64
  },
62
65
  "ai-portal.elevo-logo": {
63
- "doc": "构件 `ai-portal.elevo-logo`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.elevo-logo\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-logo></ai-portal.elevo-logo>\n# \n```\n"
66
+ "doc": "---\ntagName: ai-portal.elevo-logo\ndisplayName: WrappedAiPortalElevoLogo\ndescription: Elevo 品牌 Logo 图片组件,固定展示 Elevo logo(95×28px)。\ncategory: display-component\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.elevo-logo\n\n> Elevo 品牌 Logo 图片组件,固定展示 Elevo logo(95×28px)。\n\n## Examples\n\n### Basic\n\n展示 Elevo 品牌 Logo。\n\n```yaml preview\nbrick: ai-portal.elevo-logo\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.elevo-logo></ai-portal.elevo-logo>\n# \n```\n"
64
67
  },
65
68
  "ai-portal.show-case": {
66
- "doc": "构件 `ai-portal.show-case`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.show-case\nproperties:\n conversationId: c-1\n caseTitle: 故障排查-操作系统内存高\n summary: 服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.show-case\n# conversation-id=\"c-1\"\n# case-title=\"故障排查-操作系统内存高\"\n# summary=\"服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\"\n# ></ai-portal.show-case>\n# \n```\n"
69
+ "doc": "---\ntagName: ai-portal.show-case\ndisplayName: WrappedAiPortalShowCase\ndescription: 案例展示卡片构件,以彩色背景卡片展示单个优秀案例,点击可跳转到案例详情。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.show-case\n\n> 案例展示卡片构件,以彩色背景卡片展示单个优秀案例,点击可跳转到案例详情。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | -------- | ---- | ------ | -------------------------------- |\n| caseTitle | `string` | 否 | - | 案例标题,同时用于计算卡片背景色 |\n| summary | `string` | 否 | - | 案例摘要描述 |\n| url | `string` | 否 | - | 点击卡片跳转的目标链接 |\n\n## Examples\n\n### 基础使用\n\n展示带标题、描述和跳转链接的案例卡片,背景色由标题内容决定。\n\n```yaml preview\nbrick: ai-portal.show-case\nproperties:\n caseTitle: 故障排查-操作系统内存高\n summary: 服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\n url: \"/cases/memory-issue\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.show-case\n# case-title=\"故障排查-操作系统内存高\"\n# summary=\"服务已经正常启动,正常运行,但用户在外部访问失败服务已经正常启动,正常运行但用户正常运行\"\n# url=\"/cases/memory-issue\"\n# ></ai-portal.show-case>\n# \n```\n\n### 多个卡片对比\n\n不同标题产生不同背景色。\n\n```yaml preview\nbrick: div\nproperties:\n style:\n display: flex\n gap: 16px\nchildren:\n - brick: ai-portal.show-case\n properties:\n caseTitle: 故障排查-操作系统内存高\n summary: 内存使用率持续居高不下的排查与处理过程\n - brick: ai-portal.show-case\n properties:\n caseTitle: 主机磁盘空间不足\n summary: 磁盘使用率超过90%的清理与扩容方案\n - brick: ai-portal.show-case\n properties:\n caseTitle: 网络连通性异常分析\n summary: 服务间网络不通的问题定位与解决步骤\n# -- YAML DELIMITER (1nbbm8) --\n# <div style=\"display: flex; gap: 16px\">\n# <ai-portal.show-case\n# case-title=\"故障排查-操作系统内存高\"\n# summary=\"内存使用率持续居高不下的排查与处理过程\"\n# ></ai-portal.show-case>\n# <ai-portal.show-case\n# case-title=\"主机磁盘空间不足\"\n# summary=\"磁盘使用率超过90%的清理与扩容方案\"\n# ></ai-portal.show-case>\n# <ai-portal.show-case\n# case-title=\"网络连通性异常分析\"\n# summary=\"服务间网络不通的问题定位与解决步骤\"\n# ></ai-portal.show-case>\n# </div>\n# \n```\n"
67
70
  },
68
71
  "ai-portal.blank-state": {
69
- "doc": "构件 `ai-portal.blank-state`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.blank-state\nproperties:\n illustration: goals\n description: No goals\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.blank-state\n# illustration=\"goals\"\n# description=\"No goals\"\n# ></ai-portal.blank-state>\n# \n```\n"
72
+ "doc": "---\ntagName: ai-portal.blank-state\ndisplayName: WrappedAiPortalBlankState\ndescription: 空状态展示组件,提供预置插画和描述文字,并支持通过默认插槽插入自定义内容。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.blank-state\n\n> 空状态展示组件,提供预置插画和描述文字,并支持通过默认插槽插入自定义内容。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------------ | ------------------------------------- | ---- | ------ | ------------------------------------------------------------------------------------------------------ |\n| illustration | `BlankStateIllustration \\| undefined` | 否 | - | 插画类型,可选 \"goals\"、\"activities\"、\"collaboration-spaces\"、\"serviceflows\",默认使用 activities 插画 |\n| description | `string \\| undefined` | 否 | - | 描述文字 |\n\n## Slots\n\n| 名称 | 说明 |\n| --------- | ---------------------------------------------- |\n| (default) | 默认插槽,用于插入自定义内容(如按钮等操作项) |\n\n## Examples\n\n### Basic\n\n展示空状态组件的基本用法,使用 goals 插画和描述文字。\n\n```yaml preview\nbrick: ai-portal.blank-state\nproperties:\n illustration: goals\n description: 暂无目标,快来创建第一个吧\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.blank-state\n# illustration=\"goals\"\n# description=\"暂无目标,快来创建第一个吧\"\n# ></ai-portal.blank-state>\n# \n```\n\n### Different Illustrations\n\n展示不同插画类型的空状态效果。\n\n```yaml preview\n- brick: ai-portal.blank-state\n properties:\n illustration: activities\n description: 暂无活动记录\n- brick: ai-portal.blank-state\n properties:\n illustration: collaboration-spaces\n description: 暂无协作空间\n- brick: ai-portal.blank-state\n properties:\n illustration: serviceflows\n description: 暂无服务流\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.blank-state\n# illustration=\"activities\"\n# description=\"暂无活动记录\"\n# ></ai-portal.blank-state>\n# <ai-portal.blank-state\n# illustration=\"collaboration-spaces\"\n# description=\"暂无协作空间\"\n# ></ai-portal.blank-state>\n# <ai-portal.blank-state\n# illustration=\"serviceflows\"\n# description=\"暂无服务流\"\n# ></ai-portal.blank-state>\n# \n```\n\n### With Slot Content\n\n通过默认插槽插入操作按钮。\n\n```yaml preview\nbrick: ai-portal.blank-state\nproperties:\n illustration: goals\n description: 暂无目标,快来创建第一个吧\nchildren:\n - brick: eo-button\n properties:\n type: primary\n textContent: 创建目标\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.blank-state\n# illustration=\"goals\"\n# description=\"暂无目标,快来创建第一个吧\"\n# >\n# <eo-button type=\"primary\">创建目标</eo-button>\n# </ai-portal.blank-state>\n# \n```\n"
70
73
  },
71
74
  "ai-portal.sticky-container": {
72
- "doc": "构件 `ai-portal.sticky-container`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.sticky-container\nproperties:\n textContent: Hello world\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.sticky-container>Hello world</ai-portal.sticky-container>\n# \n```\n"
75
+ "doc": "---\ntagName: ai-portal.sticky-container\ndisplayName: WrappedAiPortalStickyContainer\ndescription: 粘性容器构件,使内容在页面滚动时固定在顶部。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.sticky-container\n\n> 粘性容器构件,使内容在页面滚动时固定在顶部。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------- | --------------------- | ---- | ----------- | -------------------------------------------------------------- |\n| variant | `\"default\" \\| \"home\"` | 否 | `\"default\"` | 变体风格,通过 CSS attribute selector 控制样式,不触发重新渲染 |\n\n## Slots\n\n| 名称 | 说明 |\n| --------- | ------ |\n| (default) | 内容 |\n| header | 头部 |\n| toolbar | 工具栏 |\n\n## Examples\n\n### 基础使用\n\n将内容放入粘性容器,页面滚动时内容固定在顶部。\n\n```yaml preview\nbrick: ai-portal.sticky-container\nchildren:\n - brick: div\n properties:\n textContent: \"这段内容会在滚动时保持固定\"\n style:\n padding: \"16px\"\n background: \"var(--antd-color-bg-container)\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.sticky-container>\n# <div style=\"padding: 16px; background: var(--antd-color-bg-container)\">\n# 这段内容会在滚动时保持固定\n# </div>\n# </ai-portal.sticky-container>\n# \n```\n\n### Home 变体\n\n使用 home 变体风格,适用于首页场景。\n\n```yaml preview\nbrick: ai-portal.sticky-container\nproperties:\n variant: home\nchildren:\n - brick: div\n slot: header\n properties:\n textContent: \"头部内容\"\n style:\n padding: \"8px 16px\"\n - brick: div\n properties:\n textContent: \"主体内容\"\n style:\n padding: \"16px\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.sticky-container variant=\"home\">\n# <div slot=\"header\" style=\"padding: 8px 16px\">头部内容</div>\n# <div style=\"padding: 16px\">主体内容</div>\n# </ai-portal.sticky-container>\n# \n```\n"
73
76
  },
74
77
  "ai-portal.elevo-card": {
75
- "doc": "构件 `ai-portal.elevo-card`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.elevo-card\n properties:\n cardTitle: HR\n description: Provide standard HR workflows. e.g. leave applications, office supply requistion, purchase requistion, etc.\n style:\n maxWidth: 400px\n children:\n - brick: eo-dropdown-actions\n slot: actions\n properties:\n themeVariant: elevo\n actions:\n - text: Edit\n event: edit\n - text: Delete\n event: delete\n danger: true\n children:\n - brick: ai-portal.icon-button\n properties:\n variant: mini\n icon:\n lib: antd\n icon: setting\n - brick: eo-button\n slot: footer\n properties:\n themeVariant: elevo\n textContent: Chat\n type: flat\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.elevo-card\n# card-title=\"HR\"\n# description=\"Provide standard HR workflows. e.g. leave applications, office supply requistion, purchase requistion, etc.\"\n# style=\"max-width: 400px\"\n# >\n# <eo-dropdown-actions\n# slot=\"actions\"\n# theme-variant=\"elevo\"\n# actions=\"[object Object],[object Object]\"\n# >\n# <ai-portal.icon-button\n# variant=\"mini\"\n# id=\"brick-1\"\n# ></ai-portal.icon-button>\n# </eo-dropdown-actions>\n# <eo-button slot=\"footer\" theme-variant=\"elevo\" type=\"flat\">Chat</eo-button>\n# </ai-portal.elevo-card>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"setting\",\n# };\n# </script>\n# \n```\n"
78
+ "doc": "---\ntagName: ai-portal.elevo-card\ndisplayName: WrappedAiPortalElevoCard\ndescription: Elevo 风格的卡片组件,支持图标或图片头像、标题、描述、操作按钮及底部插槽。\ncategory: display-component\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.elevo-card\n\n> Elevo 风格的卡片组件,支持图标或图片头像、标题、描述、操作按钮及底部插槽。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | ---------------------------- | ---- | ------ | ------------------------------------------------------ |\n| cardTitle | `string` | 否 | - | 卡片标题 |\n| description | `string` | 否 | - | 卡片描述文字 |\n| url | `string` | 否 | - | 点击卡片跳转的链接地址,设置后卡片呈现可点击样式 |\n| avatar | `string \\| GeneralIconProps` | 否 | - | 卡片头像,可为图片 URL 或图标配置对象(含 color 字段) |\n| avatarType | `\"icon\" \\| \"image\"` | 否 | - | 头像类型,`\"icon\"` 时渲染图标,`\"image\"` 时渲染图片 |\n\n## Slots\n\n| 名称 | 说明 |\n| ------- | ------------------ |\n| actions | 卡片右上角操作区域 |\n| footer | 卡片底部操作区域 |\n\n## Examples\n\n### Basic\n\n基础卡片,展示标题和描述。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.elevo-card\n properties:\n cardTitle: HR\n description: Provide standard HR workflows. e.g. leave applications, office supply requistion, purchase requistion, etc.\n style:\n maxWidth: 400px\n children:\n - brick: eo-dropdown-actions\n slot: actions\n properties:\n themeVariant: elevo\n actions:\n - text: Edit\n event: edit\n - text: Delete\n event: delete\n danger: true\n children:\n - brick: ai-portal.icon-button\n properties:\n variant: mini\n icon:\n lib: antd\n icon: setting\n - brick: eo-button\n slot: footer\n properties:\n themeVariant: elevo\n textContent: Chat\n type: flat\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.elevo-card\n# card-title=\"HR\"\n# description=\"Provide standard HR workflows. e.g. leave applications, office supply requistion, purchase requistion, etc.\"\n# style=\"max-width: 400px\"\n# >\n# <eo-dropdown-actions\n# slot=\"actions\"\n# theme-variant=\"elevo\"\n# actions=\"[object Object],[object Object]\"\n# >\n# <ai-portal.icon-button\n# variant=\"mini\"\n# id=\"brick-1\"\n# ></ai-portal.icon-button>\n# </eo-dropdown-actions>\n# <eo-button slot=\"footer\" theme-variant=\"elevo\" type=\"flat\">Chat</eo-button>\n# </ai-portal.elevo-card>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.icon = {\n# lib: \"antd\",\n# icon: \"setting\",\n# };\n# </script>\n# \n```\n\n### With Icon Avatar\n\n使用图标作为头像,并配置主题色。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.elevo-card\n properties:\n cardTitle: 运维监控\n description: 提供系统监控、告警及故障排查标准流程。\n avatarType: icon\n avatar:\n lib: antd\n icon: monitor\n color: blue\n url: \"/monitor\"\n style:\n maxWidth: 400px\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.elevo-card\n# card-title=\"运维监控\"\n# description=\"提供系统监控、告警及故障排查标准流程。\"\n# avatar-type=\"icon\"\n# url=\"/monitor\"\n# style=\"max-width: 400px\"\n# id=\"brick-1\"\n# ></ai-portal.elevo-card>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.avatar = {\n# lib: \"antd\",\n# icon: \"monitor\",\n# color: \"blue\",\n# };\n# </script>\n# \n```\n\n### With Image Avatar\n\n使用图片作为头像的卡片。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.elevo-card\n properties:\n cardTitle: 数据分析\n description: 提供数据报表、可视化分析及数据导出功能。\n avatarType: image\n avatar: \"https://example.com/avatar.png\"\n style:\n maxWidth: 400px\n children:\n - brick: eo-button\n slot: footer\n properties:\n themeVariant: elevo\n textContent: 进入\n type: flat\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.elevo-card\n# card-title=\"数据分析\"\n# description=\"提供数据报表、可视化分析及数据导出功能。\"\n# avatar-type=\"image\"\n# style=\"max-width: 400px\"\n# id=\"brick-1\"\n# >\n# <eo-button slot=\"footer\" theme-variant=\"elevo\" type=\"flat\">进入</eo-button>\n# </ai-portal.elevo-card>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.avatar = \"https://example.com/avatar.png\";\n# </script>\n# \n```\n"
76
79
  },
77
80
  "ai-portal.flow-tabs": {
78
- "doc": "构件 `ai-portal.flow-tabs`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.flow-tabs\n properties:\n textContent: Hello world\n tabs:\n - id: foo\n label: Fooooo\n - id: bar\n label: Baaaaar\n - id: baz\n label: Baaaaaz\n activeTab: foo\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.flow-tabs id=\"brick-1\">Hello world</ai-portal.flow-tabs>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"foo\",\n# label: \"Fooooo\",\n# },\n# {\n# id: \"bar\",\n# label: \"Baaaaar\",\n# },\n# {\n# id: \"baz\",\n# label: \"Baaaaaz\",\n# },\n# ];\n# brick_1.activeTab = \"foo\";\n# </script>\n# \n```\n"
81
+ "doc": "---\ntagName: ai-portal.flow-tabs\ndisplayName: WrappedAiPortalFlowTabs\ndescription: 流程标签页组件,提供带背景画布动效的标签导航,支持工具栏插槽和默认内容插槽。\ncategory: navigate\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.flow-tabs\n\n> 流程标签页组件,提供带背景画布动效的标签导航,支持工具栏插槽和默认内容插槽。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------- | -------- | ---- | ------ | ------------------------------------- |\n| tabs | `Tab[]` | 否 | - | 标签列表,每项包含 `id` 和 `label` |\n| activeTab | `string` | 否 | - | 当前激活的标签 ID,点击标签时自动更新 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| --------- | -------------------------------------------- | ----------------------------------------- |\n| tab.click | `Tab` — { id: 标签 ID, label: 标签显示文本 } | 点击标签项时触发,同时更新 activeTab 属性 |\n\n## Slots\n\n| 名称 | 说明 |\n| ------- | -------------------- |\n| toolbar | 标签栏右侧工具栏区域 |\n| default | 标签页内容区域 |\n\n## Examples\n\n### Basic\n\n基础标签页,展示多个流程步骤标签。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.flow-tabs\n properties:\n tabs:\n - id: foo\n label: Fooooo\n - id: bar\n label: Baaaaar\n - id: baz\n label: Baaaaaz\n activeTab: foo\n events:\n tab.click:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.flow-tabs id=\"brick-1\"></ai-portal.flow-tabs>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"foo\",\n# label: \"Fooooo\",\n# },\n# {\n# id: \"bar\",\n# label: \"Baaaaar\",\n# },\n# {\n# id: \"baz\",\n# label: \"Baaaaaz\",\n# },\n# ];\n# brick_1.activeTab = \"foo\";\n# brick_1.addEventListener(\"tab.click\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n\n### With Toolbar Slot\n\n在标签栏右侧添加工具栏操作按钮。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.flow-tabs\n properties:\n tabs:\n - id: design\n label: 设计阶段\n - id: develop\n label: 开发阶段\n - id: test\n label: 测试阶段\n - id: deploy\n label: 部署阶段\n activeTab: design\n children:\n - brick: ai-portal.icon-button\n slot: toolbar\n properties:\n icon:\n lib: antd\n icon: filter\n tooltip: 筛选\n events:\n tab.click:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.flow-tabs id=\"brick-1\">\n# <ai-portal.icon-button\n# slot=\"toolbar\"\n# tooltip=\"筛选\"\n# id=\"brick-2\"\n# ></ai-portal.icon-button>\n# </ai-portal.flow-tabs>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"design\",\n# label: \"设计阶段\",\n# },\n# {\n# id: \"develop\",\n# label: \"开发阶段\",\n# },\n# {\n# id: \"test\",\n# label: \"测试阶段\",\n# },\n# {\n# id: \"deploy\",\n# label: \"部署阶段\",\n# },\n# ];\n# brick_1.activeTab = \"design\";\n# brick_1.addEventListener(\"tab.click\", (e) => {\n# console.log(e.detail);\n# });\n# \n# const brick_2 = document.getElementById(\"brick-2\");\n# brick_2.icon = {\n# lib: \"antd\",\n# icon: \"filter\",\n# };\n# </script>\n# \n```\n\n### With Content\n\n标签页带内容区域,点击标签切换展示不同内容。\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.flow-tabs\n properties:\n tabs:\n - id: overview\n label: 概览\n - id: detail\n label: 详情\n - id: history\n label: 历史\n activeTab: overview\n children:\n - brick: span\n properties:\n textContent: 这里是内容区域\n style:\n padding: 16px\n display: block\n events:\n tab.click:\n action: \"console.log\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.flow-tabs id=\"brick-1\">\n# <span style=\"padding: 16px; display: block\">这里是内容区域</span>\n# </ai-portal.flow-tabs>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"overview\",\n# label: \"概览\",\n# },\n# {\n# id: \"detail\",\n# label: \"详情\",\n# },\n# {\n# id: \"history\",\n# label: \"历史\",\n# },\n# ];\n# brick_1.activeTab = \"overview\";\n# brick_1.addEventListener(\"tab.click\", (e) => {\n# console.log(e.detail);\n# });\n# </script>\n# \n```\n"
79
82
  },
80
83
  "ai-portal.stage-flow": {
81
- "doc": "构件 `ai-portal.stage-flow`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.home-container\nchildren:\n - brick: ai-portal.flow-tabs\n properties:\n tabs:\n - id: foo\n label: Fooooo\n - id: bar\n label: Baaaaar\n - id: baz\n label: Baaaaaz\n activeTab: foo\n children:\n - brick: ai-portal.stage-flow\n properties:\n spec:\n - name: Requirement\n serviceFlowActivities:\n - name: Requirement collects\n aiEmployeeId: Samuel\n - name: Requirement documents\n aiEmployeeId: Samuel\n - name: Sprint Planning\n # - name: Development\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.home-container>\n# <ai-portal.flow-tabs id=\"brick-1\">\n# <ai-portal.stage-flow id=\"brick-2\"></ai-portal.stage-flow>\n# </ai-portal.flow-tabs>\n# </ai-portal.home-container>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.tabs = [\n# {\n# id: \"foo\",\n# label: \"Fooooo\",\n# },\n# {\n# id: \"bar\",\n# label: \"Baaaaar\",\n# },\n# {\n# id: \"baz\",\n# label: \"Baaaaaz\",\n# },\n# ];\n# brick_1.activeTab = \"foo\";\n# \n# const brick_2 = document.getElementById(\"brick-2\");\n# brick_2.spec = [\n# {\n# name: \"Requirement\",\n# serviceFlowActivities: [\n# {\n# name: \"Requirement collects\",\n# aiEmployeeId: \"Samuel\",\n# },\n# {\n# name: \"Requirement documents\",\n# aiEmployeeId: \"Samuel\",\n# },\n# ],\n# },\n# {\n# name: \"Sprint Planning\",\n# },\n# ];\n# </script>\n# \n```\n"
84
+ "doc": "---\ntagName: ai-portal.stage-flow\ndisplayName: WrappedAiPortalStageFlow\ndescription: 阶段流程编辑器构件,支持以泳道方式展示和编辑服务流的阶段与活动。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.stage-flow\n\n> 阶段流程编辑器构件,支持以泳道方式展示和编辑服务流的阶段与活动。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | -------------- | ---- | ------ | ------------------------------------------------ |\n| spec | `Stage[]` | 否 | - | 阶段流程配置数据,每个阶段包含名称和活动列表 |\n| aiEmployees | `AIEmployee[]` | 否 | - | AI 员工列表,用于在活动中显示分配的员工名称 |\n| readOnly | `boolean` | 否 | - | 是否为只读模式,只读时不显示编辑、添加、删除操作 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------------- | --------------------------------------------------------------------------------------- | -------------------------- |\n| change | `Stage[]` — 更新后的阶段列表 | 流程阶段数据发生变化时触发 |\n| add.activity | `{ stage: Stage }` — { stage: 所属阶段数据 } | 点击添加活动按钮时触发 |\n| edit.activity | `EditActivityDetail` — { stage: 所属阶段, activity: 活动数据, activityIndex: 活动索引 } | 点击活动进行编辑时触发 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| -------------- | ----------------------------------------------------------------------- | ------ | ------------------------ |\n| addActivity | `(stage: Stage, activity: FlowActivity) => void` | `void` | 向指定阶段添加活动 |\n| editActivity | `(stage: Stage, activity: FlowActivity, activityIndex: number) => void` | `void` | 编辑指定阶段中的某个活动 |\n| deleteActivity | `(stage: Stage, activityIndex: number) => void` | `void` | 删除指定阶段中的某个活动 |\n\n## Examples\n\n### 基础使用\n\n以泳道方式展示服务流的阶段和活动,支持分配 AI 员工。\n\n```yaml preview\nbrick: ai-portal.stage-flow\nproperties:\n spec:\n - name: Requirement\n serviceFlowActivities:\n - name: Requirement collects\n aiEmployeeId: \"employee-001\"\n - name: Requirement documents\n aiEmployeeId: \"employee-001\"\n - name: Sprint Planning\n aiEmployees:\n - employeeId: \"employee-001\"\n name: \"Samuel\"\nevents:\n change:\n action: console.log\n args:\n - \"流程变更:\"\n - \"<% EVENT.detail %>\"\n add.activity:\n action: console.log\n args:\n - \"添加活动:\"\n - \"<% EVENT.detail %>\"\n edit.activity:\n action: console.log\n args:\n - \"编辑活动:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stage-flow id=\"brick-1\"></ai-portal.stage-flow>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spec = [\n# {\n# name: \"Requirement\",\n# serviceFlowActivities: [\n# {\n# name: \"Requirement collects\",\n# aiEmployeeId: \"employee-001\",\n# },\n# {\n# name: \"Requirement documents\",\n# aiEmployeeId: \"employee-001\",\n# },\n# ],\n# },\n# {\n# name: \"Sprint Planning\",\n# },\n# ];\n# brick_1.aiEmployees = [\n# {\n# employeeId: \"employee-001\",\n# name: \"Samuel\",\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(\"流程变更:\", e.detail);\n# });\n# brick_1.addEventListener(\"add.activity\", (e) => {\n# console.log(\"添加活动:\", e.detail);\n# });\n# brick_1.addEventListener(\"edit.activity\", (e) => {\n# console.log(\"编辑活动:\", e.detail);\n# });\n# </script>\n# \n```\n\n### 只读模式\n\n设置 readOnly 后不显示编辑、添加、删除操作。\n\n```yaml preview\nbrick: ai-portal.stage-flow\nproperties:\n readOnly: true\n spec:\n - name: 需求阶段\n serviceFlowActivities:\n - name: 需求收集\n aiEmployeeId: \"employee-001\"\n - name: 需求评审\n aiEmployeeId: \"employee-002\"\n - name: 开发阶段\n serviceFlowActivities:\n - name: 编码实现\n aiEmployeeId: \"employee-001\"\n aiEmployees:\n - employeeId: \"employee-001\"\n name: \"Alice\"\n - employeeId: \"employee-002\"\n name: \"Bob\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stage-flow read-only id=\"brick-1\"></ai-portal.stage-flow>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spec = [\n# {\n# name: \"需求阶段\",\n# serviceFlowActivities: [\n# {\n# name: \"需求收集\",\n# aiEmployeeId: \"employee-001\",\n# },\n# {\n# name: \"需求评审\",\n# aiEmployeeId: \"employee-002\",\n# },\n# ],\n# },\n# {\n# name: \"开发阶段\",\n# serviceFlowActivities: [\n# {\n# name: \"编码实现\",\n# aiEmployeeId: \"employee-001\",\n# },\n# ],\n# },\n# ];\n# brick_1.aiEmployees = [\n# {\n# employeeId: \"employee-001\",\n# name: \"Alice\",\n# },\n# {\n# employeeId: \"employee-002\",\n# name: \"Bob\",\n# },\n# ];\n# </script>\n# \n```\n\n### 使用方法调用\n\n通过方法调用动态添加、编辑、删除活动。\n\n```yaml preview\n- brick: ai-portal.stage-flow\n ref: stageFlow\n properties:\n spec:\n - name: 阶段一\n serviceFlowActivities:\n - name: 活动A\n events:\n change:\n action: console.log\n args:\n - \"<% EVENT.detail %>\"\n- brick: eo-button\n properties:\n textContent: 添加活动\n events:\n click:\n method: addActivity\n ref: stageFlow\n args:\n - name: 阶段一\n - name: 新活动B\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.stage-flow id=\"brick-1\"></ai-portal.stage-flow>\n# <eo-button id=\"brick-2\">添加活动</eo-button>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spec = [\n# {\n# name: \"阶段一\",\n# serviceFlowActivities: [\n# {\n# name: \"活动A\",\n# },\n# ],\n# },\n# ];\n# brick_1.addEventListener(\"change\", (e) => {\n# console.log(e.detail);\n# });\n# \n# const brick_2 = document.getElementById(\"brick-2\");\n# brick_2.addEventListener(\"click\", (e) => {\n# // WARN: encountered incompatible event handlers in HTML mode, please try YAML.\n# });\n# </script>\n# \n```\n"
82
85
  },
83
86
  "ai-portal.running-flow": {
84
- "doc": "构件 `ai-portal.running-flow`\n\n## Examples\n\n### Basic\n\n```yaml preview\nbrick: ai-portal.running-flow\nproperties:\n spec:\n - name: Requirement\n serviceFlowActivities:\n - name: Requirement collects\n state: completed\n - name: Requirement documents\n state: input-required\n - name: Sprint Planning\n serviceFlowActivities:\n - name: planning\n state: working\n - name: sprinting\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.running-flow id=\"brick-1\"></ai-portal.running-flow>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spec = [\n# {\n# name: \"Requirement\",\n# serviceFlowActivities: [\n# {\n# name: \"Requirement collects\",\n# state: \"completed\",\n# },\n# {\n# name: \"Requirement documents\",\n# state: \"input-required\",\n# },\n# ],\n# },\n# {\n# name: \"Sprint Planning\",\n# serviceFlowActivities: [\n# {\n# name: \"planning\",\n# state: \"working\",\n# },\n# {\n# name: \"sprinting\",\n# },\n# ],\n# },\n# ];\n# </script>\n# \n```\n"
85
- },
86
- "ai-portal.notice-list": {
87
- "doc": "构件 `ai-portal.notice-list`\n\n消息通知列表构件,支持批量操作功能。\n\n## Examples\n\n### Basic\n\n基础用法,展示消息列表。\n\n```yaml preview\nbrick: ai-portal.notice-list\nproperties:\n dataSource:\n - id: \"1\"\n type: \"project\"\n isRead: true\n title: \"协作流【研发设计】已完成\"\n time: 1761207261887\n - id: \"2\"\n type: \"account\"\n isRead: true\n title: \"您的账户资源配额即将达到限制\"\n time: 1761812267887\n - id: \"3\"\n type: \"system\"\n isRead: false\n title: \"服务通知:服务维护\"\n time: 1761818247887\n - id: \"4\"\n type: \"space\"\n isRead: false\n title: \"Luna 在项目【系统资源收集】中@了你\"\n time: 1761820851887\n - id: \"5\"\n type: \"project\"\n isRead: false\n title: \"协作流【设计规范】已完成\"\n time: 1761821891887\nevents:\n notice.click:\n - action: console.log\n args:\n - \"消息点击:\"\n - <% EVENT.detail %>\n mark.items.read:\n - action: console.log\n args:\n - \"消息已读:\"\n - <% EVENT.detail %>\n mark.all.read:\n - action: console.log\n args:\n - \"全部已读\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-list id=\"brick-1\"></ai-portal.notice-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"1\",\n# type: \"project\",\n# isRead: true,\n# title: \"协作流【研发设计】已完成\",\n# time: 1761207261887,\n# },\n# {\n# id: \"2\",\n# type: \"account\",\n# isRead: true,\n# title: \"您的账户资源配额即将达到限制\",\n# time: 1761812267887,\n# },\n# {\n# id: \"3\",\n# type: \"system\",\n# isRead: false,\n# title: \"服务通知:服务维护\",\n# time: 1761818247887,\n# },\n# {\n# id: \"4\",\n# type: \"space\",\n# isRead: false,\n# title: \"Luna 在项目【系统资源收集】中@了你\",\n# time: 1761820851887,\n# },\n# {\n# id: \"5\",\n# type: \"project\",\n# isRead: false,\n# title: \"协作流【设计规范】已完成\",\n# time: 1761821891887,\n# },\n# ];\n# brick_1.addEventListener(\"notice.click\", (e) => {\n# console.log(\"消息点击:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.items.read\", (e) => {\n# console.log(\"消息已读:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.all.read\", (e) => {\n# console.log(\"全部已读\");\n# });\n# </script>\n# \n```\n\n### Empty State\n\n空状态展示,可以自定义空状态文案。\n\n```yaml preview\nbrick: ai-portal.notice-list\nproperties:\n dataSource: []\n emptyText: \"暂无新消息通知\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-list\n# empty-text=\"暂无新消息通知\"\n# id=\"brick-1\"\n# ></ai-portal.notice-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [];\n# </script>\n# \n```\n"
87
+ "doc": "---\ntagName: ai-portal.running-flow\ndisplayName: WrappedAiPortalRunningFlow\ndescription: 运行中的流程视图构件,以泳道方式展示各阶段的活动及其运行状态。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.running-flow\n\n> 运行中的流程视图构件,以泳道方式展示各阶段的活动及其运行状态(completed、working、input-required 等)。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ---- | ------------- | ---- | ------ | -------------------------------------------- |\n| spec | `FlowStage[]` | 否 | - | 流程阶段配置数据,每个阶段包含名称和活动列表 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| -------------- | ------------------------ | ------------------------------------------ |\n| activity.click | `string` — 活动的 taskId | 点击活动时触发,仅当活动有 taskId 时可触发 |\n\n## Examples\n\n### 基础使用\n\n以泳道方式展示多阶段流程及各活动状态。\n\n```yaml preview\nbrick: ai-portal.running-flow\nproperties:\n spec:\n - name: Requirement\n serviceFlowActivities:\n - name: Requirement collects\n state: completed\n - name: Requirement documents\n state: input-required\n - name: Sprint Planning\n serviceFlowActivities:\n - name: planning\n state: working\n - name: sprinting\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.running-flow id=\"brick-1\"></ai-portal.running-flow>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spec = [\n# {\n# name: \"Requirement\",\n# serviceFlowActivities: [\n# {\n# name: \"Requirement collects\",\n# state: \"completed\",\n# },\n# {\n# name: \"Requirement documents\",\n# state: \"input-required\",\n# },\n# ],\n# },\n# {\n# name: \"Sprint Planning\",\n# serviceFlowActivities: [\n# {\n# name: \"planning\",\n# state: \"working\",\n# },\n# {\n# name: \"sprinting\",\n# },\n# ],\n# },\n# ];\n# </script>\n# \n```\n\n### 带点击事件\n\n配置 taskId 后活动可点击,点击时触发 activity.click 事件。\n\n```yaml preview\nbrick: ai-portal.running-flow\nproperties:\n spec:\n - name: 需求阶段\n serviceFlowActivities:\n - name: 需求收集\n taskId: \"task-001\"\n state: completed\n startTime: 1757800000\n endTime: 1757810000\n - name: 需求评审\n taskId: \"task-002\"\n state: working\n startTime: 1757810000\n - name: 开发阶段\n serviceFlowActivities:\n - name: 编码实现\n taskId: \"task-003\"\nevents:\n activity.click:\n action: console.log\n args:\n - \"活动点击,taskId:\"\n - \"<% EVENT.detail %>\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.running-flow id=\"brick-1\"></ai-portal.running-flow>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spec = [\n# {\n# name: \"需求阶段\",\n# serviceFlowActivities: [\n# {\n# name: \"需求收集\",\n# taskId: \"task-001\",\n# state: \"completed\",\n# startTime: 1757800000,\n# endTime: 1757810000,\n# },\n# {\n# name: \"需求评审\",\n# taskId: \"task-002\",\n# state: \"working\",\n# startTime: 1757810000,\n# },\n# ],\n# },\n# {\n# name: \"开发阶段\",\n# serviceFlowActivities: [\n# {\n# name: \"编码实现\",\n# taskId: \"task-003\",\n# },\n# ],\n# },\n# ];\n# brick_1.addEventListener(\"activity.click\", (e) => {\n# console.log(\"活动点击,taskId:\", e.detail);\n# });\n# </script>\n# \n```\n"
88
88
  },
89
89
  "ai-portal.notice-dropdown": {
90
- "doc": "构件 `ai-portal.notice-dropdown`\n\n消息通知下拉框构件,用于展示消息列表。支持自定义触发器、消息列表展示、空状态、以及交互事件。\n\n## Examples\n\n### 基础使用(带消息列表)\n\n```yaml preview\nbrick: ai-portal.notice-dropdown\nproperties:\n dataSource:\n - id: \"msg-1\"\n isRead: false\n type: \"project\"\n title: \"协作流【研发设计】已完成【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布\"\n - id: \"msg-2\"\n isRead: false\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n type: \"space\"\n - id: \"msg-3\"\n type: \"account\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n - id: \"msg-4\"\n type: \"system\"\n isRead: true\n title: \"Samuel在项目【项目A】@了你\"\n - id: \"msg-2\"\n type: \"account\"\n isRead: false\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n - id: \"msg-3\"\n type: \"system\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n - id: \"msg-4\"\n type: \"project\"\n isRead: true\n title: \"Samuel在项目【项目A】@了你\"\n - id: \"msg-2\"\n type: \"space\"\n isRead: false\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n - id: \"msg-3\"\n type: \"space\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n - id: \"msg-4\"\n type: \"system\"\n isRead: true\n title: \"Samuel在项目【项目A】@了你\"\n\nevents:\n notice.click:\n action: console.log\n args:\n - \"点击了消息:\"\n - \"<% EVENT.detail %>\"\n mark.all.read:\n action: console.log\n args:\n - \"点击了全部已读\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-dropdown id=\"brick-1\"></ai-portal.notice-dropdown>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"msg-1\",\n# isRead: false,\n# type: \"project\",\n# title:\n# \"协作流【研发设计】已完成【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-2\",\n# isRead: false,\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# type: \"space\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"account\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-4\",\n# type: \"system\",\n# isRead: true,\n# title: \"Samuel在项目【项目A】@了你\",\n# },\n# {\n# id: \"msg-2\",\n# type: \"account\",\n# isRead: false,\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"system\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-4\",\n# type: \"project\",\n# isRead: true,\n# title: \"Samuel在项目【项目A】@了你\",\n# },\n# {\n# id: \"msg-2\",\n# type: \"space\",\n# isRead: false,\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"space\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-4\",\n# type: \"system\",\n# isRead: true,\n# title: \"Samuel在项目【项目A】@了你\",\n# },\n# ];\n# brick_1.addEventListener(\"notice.click\", (e) => {\n# console.log(\"点击了消息:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.all.read\", (e) => {\n# console.log(\"点击了全部已读\");\n# });\n# </script>\n# \n```\n\n### 空状态\n\n```yaml preview\nbrick: ai-portal.notice-dropdown\nproperties:\n dataSource: []\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-dropdown id=\"brick-1\"></ai-portal.notice-dropdown>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [];\n# </script>\n# \n```\n\n### 自定义触发器(使用 eo-button)\n\n```yaml preview\nbrick: ai-portal.notice-dropdown\nproperties:\n dataSource:\n - id: \"msg-1\"\n isRead: false\n type: \"project\"\n title: \"协作流【研发设计】已完成\"\n - id: \"msg-2\"\n isRead: false\n type: \"space\"\n title: \"协作流【协作流名称】需要人工确认\"\n - id: \"msg-3\"\n type: \"account\"\n isRead: true\n title: \"【项目协作功能】已发布\"\nchildren:\n - brick: eo-button\n slot: trigger\n properties:\n type: primary\n icon:\n lib: \"antd\"\n icon: \"bell\"\n textContent: \"查看通知\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-dropdown id=\"brick-1\">\n# <eo-button slot=\"trigger\" type=\"primary\" icon=\"[object Object]\">\n# 查看通知\n# </eo-button>\n# </ai-portal.notice-dropdown>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"msg-1\",\n# isRead: false,\n# type: \"project\",\n# title: \"协作流【研发设计】已完成\",\n# },\n# {\n# id: \"msg-2\",\n# isRead: false,\n# type: \"space\",\n# title: \"协作流【协作流名称】需要人工确认\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"account\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# ];\n# </script>\n# \n```\n"
90
+ "doc": "---\ntagName: ai-portal.notice-dropdown\ndisplayName: WrappedAiPortalNoticeDropdown\ndescription: 消息通知下拉框构件,用于展示消息列表\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.notice-dropdown\n\n> 消息通知下拉框构件,用于展示消息列表\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ---------------------- | --------------------- | ---- | ------ | ------------------------ |\n| dataSource | `NoticeItem[]` | 否 | - | 消息数据列表 |\n| popoverPlacement | `Placement` | 否 | - | 弹窗位置 |\n| emptyText | `string` | 否 | - | 空状态文案 |\n| notifyCenterUrl | `string` | 否 | - | 通知中心URL |\n| urlTemplate | `string` | 否 | - | 详情链接 |\n| urlTarget | `Target` | 否 | - | 详情链接目标 |\n| dropdownMaxWidth | `string \\| number` | 否 | - | 下拉框最大宽度 |\n| dropdownContentStyle | `React.CSSProperties` | 否 | - | 下拉框内容样式 |\n| hideNotifyCenterButton | `boolean` | 否 | - | 是否隐藏进入消息中心按钮 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| ------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------- |\n| notice.click | `NoticeItem` — { id: 消息ID, type: 消息类型, isRead: 是否已读, title: 标题, description: 描述, time: 时间戳, url: 详情链接 } | 消息项点击事件 |\n| mark.all.read | `void` | 全部已读点击事件 |\n\n## Slots\n\n| 名称 | 说明 |\n| ------- | ---------------------------------------- |\n| trigger | 自定义触发器,默认为带角标的铃铛图标按钮 |\n\n## Examples\n\n### 基础使用(带消息列表)\n\n展示包含多条不同类型消息的下拉通知列表。\n\n```yaml preview\nbrick: ai-portal.notice-dropdown\nproperties:\n dataSource:\n - id: \"msg-1\"\n isRead: false\n type: \"project\"\n title: \"协作流【研发设计】已完成【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布\"\n - id: \"msg-2\"\n isRead: false\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n type: \"space\"\n - id: \"msg-3\"\n type: \"account\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n - id: \"msg-4\"\n type: \"system\"\n isRead: true\n title: \"Samuel在项目【项目A】@了你\"\n - id: \"msg-5\"\n type: \"account\"\n isRead: false\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n - id: \"msg-6\"\n type: \"system\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n - id: \"msg-7\"\n type: \"project\"\n isRead: true\n title: \"Samuel在项目【项目A】@了你\"\n - id: \"msg-8\"\n type: \"space\"\n isRead: false\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n - id: \"msg-9\"\n type: \"space\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n - id: \"msg-10\"\n type: \"system\"\n isRead: true\n title: \"Samuel在项目【项目A】@了你\"\nevents:\n notice.click:\n action: console.log\n args:\n - \"点击了消息:\"\n - \"<% EVENT.detail %>\"\n mark.all.read:\n action: console.log\n args:\n - \"点击了全部已读\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-dropdown id=\"brick-1\"></ai-portal.notice-dropdown>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"msg-1\",\n# isRead: false,\n# type: \"project\",\n# title:\n# \"协作流【研发设计】已完成【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-2\",\n# isRead: false,\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# type: \"space\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"account\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-4\",\n# type: \"system\",\n# isRead: true,\n# title: \"Samuel在项目【项目A】@了你\",\n# },\n# {\n# id: \"msg-5\",\n# type: \"account\",\n# isRead: false,\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# },\n# {\n# id: \"msg-6\",\n# type: \"system\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-7\",\n# type: \"project\",\n# isRead: true,\n# title: \"Samuel在项目【项目A】@了你\",\n# },\n# {\n# id: \"msg-8\",\n# type: \"space\",\n# isRead: false,\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# },\n# {\n# id: \"msg-9\",\n# type: \"space\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# {\n# id: \"msg-10\",\n# type: \"system\",\n# isRead: true,\n# title: \"Samuel在项目【项目A】@了你\",\n# },\n# ];\n# brick_1.addEventListener(\"notice.click\", (e) => {\n# console.log(\"点击了消息:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.all.read\", (e) => {\n# console.log(\"点击了全部已读\");\n# });\n# </script>\n# \n```\n\n### 空状态\n\n当没有消息时展示空状态提示文案。\n\n```yaml preview\nbrick: ai-portal.notice-dropdown\nproperties:\n dataSource: []\n emptyText: \"暂无新消息\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-dropdown\n# empty-text=\"暂无新消息\"\n# id=\"brick-1\"\n# ></ai-portal.notice-dropdown>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [];\n# </script>\n# \n```\n\n### 自定义触发器\n\n使用 trigger 插槽放置自定义触发器元素(如按钮)。\n\n```yaml preview\nbrick: ai-portal.notice-dropdown\nproperties:\n dataSource:\n - id: \"msg-1\"\n isRead: false\n type: \"project\"\n title: \"协作流【研发设计】已完成\"\n - id: \"msg-2\"\n isRead: false\n type: \"space\"\n title: \"协作流【协作流名称】需要人工确认\"\n - id: \"msg-3\"\n type: \"account\"\n isRead: true\n title: \"【项目协作功能】已发布\"\n hideNotifyCenterButton: true\n dropdownMaxWidth: 400\nchildren:\n - brick: eo-button\n slot: trigger\n properties:\n type: primary\n icon:\n lib: \"antd\"\n icon: \"bell\"\n textContent: \"查看通知\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-dropdown\n# hide-notify-center-button\n# dropdown-max-width=\"400\"\n# id=\"brick-1\"\n# >\n# <eo-button slot=\"trigger\" type=\"primary\" icon=\"[object Object]\">\n# 查看通知\n# </eo-button>\n# </ai-portal.notice-dropdown>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"msg-1\",\n# isRead: false,\n# type: \"project\",\n# title: \"协作流【研发设计】已完成\",\n# },\n# {\n# id: \"msg-2\",\n# isRead: false,\n# type: \"space\",\n# title: \"协作流【协作流名称】需要人工确认\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"account\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# ];\n# </script>\n# \n```\n"
91
+ },
92
+ "ai-portal.notice-list": {
93
+ "doc": "---\ntagName: ai-portal.notice-list\ndisplayName: WrappedAiPortalNoticeList\ndescription: 消息通知列表构件,用于展示消息列表,支持批量操作\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.notice-list\n\n> 消息通知列表构件,用于展示消息列表,支持批量操作\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | -------------- | ---- | ------ | ------------------ |\n| dataSource | `NoticeItem[]` | 否 | - | 消息数据列表 |\n| emptyText | `string` | 否 | - | 空状态文案 |\n| urlTemplate | `string` | 否 | - | 详情链接 |\n| urlTarget | `Target` | 否 | - | 详情链接目标 |\n| selectedIds | `string[]` | 否 | - | 选中的消息 ID 数组 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| --------------- | ----------------------------------- | ------------------ |\n| notice.click | `NoticeItem` — 消息项数据 | 消息项点击事件 |\n| mark.items.read | `NoticeItem[]` — 选中的消息 ID 数组 | 标记消息项已读事件 |\n| mark.all.read | `void` | 全部已读事件 |\n\n## Examples\n\n### 基础使用\n\n展示消息列表,支持批量选择和标记已读操作。\n\n```yaml preview\nbrick: ai-portal.notice-list\nproperties:\n dataSource:\n - id: \"1\"\n type: \"project\"\n isRead: true\n title: \"协作流【研发设计】已完成\"\n time: 1761207261887\n - id: \"2\"\n type: \"account\"\n isRead: true\n title: \"您的账户资源配额即将达到限制\"\n time: 1761812267887\n - id: \"3\"\n type: \"system\"\n isRead: false\n title: \"服务通知:服务维护\"\n time: 1761818247887\n - id: \"4\"\n type: \"space\"\n isRead: false\n title: \"Luna 在项目【系统资源收集】中@了你\"\n time: 1761820851887\n - id: \"5\"\n type: \"project\"\n isRead: false\n title: \"协作流【设计规范】已完成\"\n time: 1761821891887\nevents:\n notice.click:\n - action: console.log\n args:\n - \"消息点击:\"\n - <% EVENT.detail %>\n mark.items.read:\n - action: console.log\n args:\n - \"消息已读:\"\n - <% EVENT.detail %>\n mark.all.read:\n - action: console.log\n args:\n - \"全部已读\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-list id=\"brick-1\"></ai-portal.notice-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"1\",\n# type: \"project\",\n# isRead: true,\n# title: \"协作流【研发设计】已完成\",\n# time: 1761207261887,\n# },\n# {\n# id: \"2\",\n# type: \"account\",\n# isRead: true,\n# title: \"您的账户资源配额即将达到限制\",\n# time: 1761812267887,\n# },\n# {\n# id: \"3\",\n# type: \"system\",\n# isRead: false,\n# title: \"服务通知:服务维护\",\n# time: 1761818247887,\n# },\n# {\n# id: \"4\",\n# type: \"space\",\n# isRead: false,\n# title: \"Luna 在项目【系统资源收集】中@了你\",\n# time: 1761820851887,\n# },\n# {\n# id: \"5\",\n# type: \"project\",\n# isRead: false,\n# title: \"协作流【设计规范】已完成\",\n# time: 1761821891887,\n# },\n# ];\n# brick_1.addEventListener(\"notice.click\", (e) => {\n# console.log(\"消息点击:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.items.read\", (e) => {\n# console.log(\"消息已读:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.all.read\", (e) => {\n# console.log(\"全部已读\");\n# });\n# </script>\n# \n```\n\n### 空状态\n\n空状态展示,可以自定义空状态文案。\n\n```yaml preview\nbrick: ai-portal.notice-list\nproperties:\n dataSource: []\n emptyText: \"暂无新消息通知\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-list\n# empty-text=\"暂无新消息通知\"\n# id=\"brick-1\"\n# ></ai-portal.notice-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [];\n# </script>\n# \n```\n\n### 带链接跳转\n\n配置 urlTemplate 使消息项点击后跳转到详情页。\n\n```yaml preview\nbrick: ai-portal.notice-list\nproperties:\n urlTemplate: \"/notices/{{id}}\"\n urlTarget: \"_blank\"\n dataSource:\n - id: \"1\"\n type: \"project\"\n isRead: false\n title: \"协作流【研发设计】已完成\"\n time: 1761207261887\n - id: \"2\"\n type: \"account\"\n isRead: false\n title: \"您的账户资源配额即将达到限制\"\n time: 1761812267887\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.notice-list\n# url-template=\"/notices/{{id}}\"\n# url-target=\"_blank\"\n# id=\"brick-1\"\n# ></ai-portal.notice-list>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.dataSource = [\n# {\n# id: \"1\",\n# type: \"project\",\n# isRead: false,\n# title: \"协作流【研发设计】已完成\",\n# time: 1761207261887,\n# },\n# {\n# id: \"2\",\n# type: \"account\",\n# isRead: false,\n# title: \"您的账户资源配额即将达到限制\",\n# time: 1761812267887,\n# },\n# ];\n# </script>\n# \n```\n"
91
94
  },
92
95
  "ai-portal.chat-panel": {
93
- "doc": "构件 `ai-portal.chat-panel`\n\n## 介绍\n\n弹出式 AI 对话面板,提供一个模态框样式的聊天界面,支持与 AI 助手进行对话交互。\n\n## Examples\n\n### Basic\n\n```yaml preview\n- brick: eo-button\n properties:\n themeVariant: elevo\n textContent: 打开对话面板\n events:\n click:\n target: \"#chatPanel\"\n method: open\n- brick: ai-portal.chat-panel\n properties:\n id: chatPanel\n width: 600\n height: 800\n panelTitle: AI 助手\n placeholder: 请输入您的问题...\n# -- YAML DELIMITER (1nbbm8) --\n# <eo-button theme-variant=\"elevo\" id=\"brick-1\">打开对话面板</eo-button>\n# <ai-portal.chat-panel\n# panel-title=\"AI 助手\"\n# placeholder=\"请输入您的问题...\"\n# id=\"chatPanel\"\n# ></ai-portal.chat-panel>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"click\", (e) => {\n# const brick = document.querySelector(\"#chatPanel\");\n# brick.open();\n# });\n# \n# const chatPanel = document.getElementById(\"chatPanel\");\n# chatPanel.width = 600;\n# chatPanel.height = 800;\n# </script>\n# \n```\n"
96
+ "doc": "---\ntagName: ai-portal.chat-panel\ndisplayName: WrappedAiPortalChatPanel\ndescription: 弹出式 AI 对话面板,以模态框形式展示对话界面,支持与 AI 助手进行多轮对话。\ncategory: ai-portal\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.chat-panel\n\n> 弹出式 AI 对话面板,以模态框形式展示对话界面,支持与 AI 助手进行多轮对话。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ------------- | ----------------------------------------- | ---- | ------- | ------------------------------------ |\n| panelTitle | `string \\| undefined` | 否 | - | 面板标题 |\n| aiEmployeeId | `string \\| undefined` | 否 | - | 预设数字人 ID,对话提交时会携带该 ID |\n| cmd | `CommandPayload \\| undefined` | 否 | - | 预设命令载荷,对话提交时会携带该命令 |\n| width | `string \\| number \\| undefined` | 否 | - | 面板宽度 |\n| height | `string \\| number \\| undefined` | 否 | - | 面板高度 |\n| placeholder | `string \\| undefined` | 否 | - | 输入框占位文字 |\n| uploadOptions | `UploadOptions \\| undefined` | 否 | - | 文件上传配置 |\n| help | `{ useBrick: UseBrickConf } \\| undefined` | 否 | - | 无对话时显示的帮助内容配置 |\n| maskClosable | `boolean \\| undefined` | 否 | `false` | 是否点击遮罩关闭面板 |\n\n## Methods\n\n| 方法 | 参数 | 返回值 | 说明 |\n| ------------- | -------------------------------- | ------ | -------------------- |\n| open | `() => void` | `void` | 打开对话面板 |\n| close | `() => void` | `void` | 关闭对话面板 |\n| setInputValue | `(content: string) => void` | `void` | 设置输入框的内容 |\n| send | `(payload: ChatPayload) => void` | `void` | 直接发送一条消息 |\n| showFile | `(file: FileInfo) => void` | `void` | 在面板中显示文件预览 |\n\n## Examples\n\n### Basic\n\n通过按钮触发打开 AI 对话面板。\n\n```yaml preview\n- brick: eo-button\n properties:\n themeVariant: elevo\n textContent: 打开对话面板\n events:\n click:\n target: \"#chatPanel\"\n method: open\n- brick: ai-portal.chat-panel\n properties:\n id: chatPanel\n width: 600\n height: 800\n panelTitle: AI 助手\n placeholder: 请输入您的问题...\n# -- YAML DELIMITER (1nbbm8) --\n# <eo-button theme-variant=\"elevo\" id=\"brick-1\">打开对话面板</eo-button>\n# <ai-portal.chat-panel\n# panel-title=\"AI 助手\"\n# placeholder=\"请输入您的问题...\"\n# id=\"chatPanel\"\n# ></ai-portal.chat-panel>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"click\", (e) => {\n# const brick = document.querySelector(\"#chatPanel\");\n# brick.open();\n# });\n# \n# const chatPanel = document.getElementById(\"chatPanel\");\n# chatPanel.width = 600;\n# chatPanel.height = 800;\n# </script>\n# \n```\n\n### With Upload Options\n\n配置文件上传功能的对话面板。\n\n```yaml preview\n- brick: eo-button\n properties:\n themeVariant: elevo\n textContent: 打开对话面板\n events:\n click:\n target: \"#chatPanel\"\n method: open\n- brick: ai-portal.chat-panel\n properties:\n id: chatPanel\n panelTitle: AI 文档助手\n placeholder: 请上传文件或输入问题\n maskClosable: true\n uploadOptions:\n enabled: true\n accept: .pdf,.docx\n maxFiles: 3\n readableAccept: PDF 或 Word 文档\n# -- YAML DELIMITER (1nbbm8) --\n# <eo-button theme-variant=\"elevo\" id=\"brick-1\">打开对话面板</eo-button>\n# <ai-portal.chat-panel\n# panel-title=\"AI 文档助手\"\n# placeholder=\"请上传文件或输入问题\"\n# mask-closable\n# id=\"chatPanel\"\n# ></ai-portal.chat-panel>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"click\", (e) => {\n# const brick = document.querySelector(\"#chatPanel\");\n# brick.open();\n# });\n# \n# const chatPanel = document.getElementById(\"chatPanel\");\n# chatPanel.uploadOptions = {\n# enabled: true,\n# accept: \".pdf,.docx\",\n# maxFiles: 3,\n# readableAccept: \"PDF 或 Word 文档\",\n# };\n# </script>\n# \n```\n\n### Programmatic Send\n\n通过调用 send 方法直接发起对话。\n\n```yaml preview\n- brick: eo-button\n properties:\n themeVariant: elevo\n textContent: 发起分析请求\n events:\n click:\n - target: \"#chatPanel\"\n method: open\n - target: \"#chatPanel\"\n method: send\n args:\n - content: 请帮我分析当前系统的性能瓶颈\n- brick: ai-portal.chat-panel\n properties:\n id: chatPanel\n panelTitle: AI 分析助手\n width: 700\n height: 600\n# -- YAML DELIMITER (1nbbm8) --\n# <eo-button theme-variant=\"elevo\" id=\"brick-1\">发起分析请求</eo-button>\n# <ai-portal.chat-panel\n# panel-title=\"AI 分析助手\"\n# id=\"chatPanel\"\n# ></ai-portal.chat-panel>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.addEventListener(\"click\", (e) => {\n# const brick = document.querySelector(\"#chatPanel\");\n# brick.open();\n# });\n# brick_1.addEventListener(\"click\", (e) => {\n# const brick = document.querySelector(\"#chatPanel\");\n# brick.send({ content: \"请帮我分析当前系统的性能瓶颈\" });\n# });\n# \n# const chatPanel = document.getElementById(\"chatPanel\");\n# chatPanel.width = 700;\n# chatPanel.height = 600;\n# </script>\n# \n```\n"
97
+ },
98
+ "ai-portal.space-logo": {
99
+ "doc": "---\ntagName: ai-portal.space-logo\ndisplayName: WrappedAiPortalSpaceLogo\ndescription: 协作空间的 Logo 展示组件\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.space-logo\n\n> 协作空间的 Logo 展示组件\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ---- | -------- | ---- | ------ | --------------------------------------------------------- |\n| size | `number` | 否 | `48` | Logo 容器尺寸(px),图标为容器的 87.5%,圆角为容器的 25% |\n\n## Examples\n\n### 基础使用\n\n使用默认尺寸(48px)展示协作空间 Logo。\n\n```yaml preview\nbrick: ai-portal.space-logo\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.space-logo></ai-portal.space-logo>\n# \n```\n\n### 自定义尺寸\n\n通过 size 属性控制 Logo 容器的像素大小,图标和圆角按比例缩放。\n\n```yaml preview\nbrick: div\nproperties:\n style:\n display: flex\n gap: 16px\n alignItems: center\nchildren:\n - brick: ai-portal.space-logo\n properties:\n size: 32\n - brick: ai-portal.space-logo\n properties:\n size: 48\n - brick: ai-portal.space-logo\n properties:\n size: 64\n - brick: ai-portal.space-logo\n properties:\n size: 96\n# -- YAML DELIMITER (1nbbm8) --\n# <div style=\"display: flex; gap: 16px; align-items: center\">\n# <ai-portal.space-logo size=\"32\"></ai-portal.space-logo>\n# <ai-portal.space-logo size=\"48\"></ai-portal.space-logo>\n# <ai-portal.space-logo size=\"64\"></ai-portal.space-logo>\n# <ai-portal.space-logo size=\"96\"></ai-portal.space-logo>\n# </div>\n# \n```\n"
100
+ },
101
+ "ai-portal.chat-panel-welcome": {
102
+ "doc": "---\ntagName: ai-portal.chat-panel-welcome\ndisplayName: WrappedAiPortalChatPanelWelcome\ndescription: 聊天面板欢迎语构件,展示带有 Elevo 头像的欢迎消息。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.chat-panel-welcome\n\n> 聊天面板欢迎语构件,展示带有 Elevo 头像的欢迎消息。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ---- | -------- | ---- | ------ | -------------- |\n| text | `string` | 否 | - | 欢迎语文本内容 |\n\n## Examples\n\n### 基础使用\n\n展示带 Elevo 头像和欢迎语文本的欢迎消息。\n\n```yaml preview\nbrick: ai-portal.chat-panel-welcome\nproperties:\n text: \"你好!我是 Elevo,你的 AI 助手。有什么可以帮助你的吗?\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-panel-welcome\n# text=\"你好!我是 Elevo,你的 AI 助手。有什么可以帮助你的吗?\"\n# ></ai-portal.chat-panel-welcome>\n# \n```\n\n### 自定义欢迎语\n\n根据业务场景配置个性化的欢迎文案。\n\n```yaml preview\nbrick: ai-portal.chat-panel-welcome\nproperties:\n text: \"欢迎来到产品设计空间!我可以帮助你进行需求分析、流程设计和问题排查。\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.chat-panel-welcome\n# text=\"欢迎来到产品设计空间!我可以帮助你进行需求分析、流程设计和问题排查。\"\n# ></ai-portal.chat-panel-welcome>\n# \n```\n"
103
+ },
104
+ "ai-portal.space-chat-guide": {
105
+ "doc": "---\ntagName: ai-portal.space-chat-guide\ndisplayName: WrappedAiPortalSpaceChatGuide\ndescription: 空间聊天引导构件,根据空间详情展示引导信息,帮助用户快速开始聊天。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.space-chat-guide\n\n> 空间聊天引导构件,根据空间详情展示引导信息,帮助用户快速开始聊天。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| ----------- | ------------- | ---- | ------ | ---------------------------------------------- |\n| spaceDetail | `SpaceDetail` | 是 | - | 空间详情信息,必填,用于展示空间相关的引导内容 |\n\n## Examples\n\n### 基础使用\n\n根据空间详情展示聊天引导内容。\n\n```yaml preview\nbrick: ai-portal.space-chat-guide\nproperties:\n spaceDetail:\n name: \"产品设计空间\"\n instanceId: \"space-001\"\n description: \"这是一个用于产品设计协作的空间\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.space-chat-guide id=\"brick-1\"></ai-portal.space-chat-guide>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spaceDetail = {\n# name: \"产品设计空间\",\n# instanceId: \"space-001\",\n# description: \"这是一个用于产品设计协作的空间\",\n# };\n# </script>\n# \n```\n"
94
106
  },
95
107
  "ai-portal.space-workbench": {
96
- "doc": "构件 `ai-portal.space-workbench`\n\n空间工作台构件,用于展示空间的顶部导航栏,包括空间信息、成员管理、消息通知等功能。\n\n## Examples\n\n### 基础使用\n\n```yaml preview\nbrick: ai-portal.space-workbench\nproperties:\n spaceDetail:\n name: \"产品设计空间\"\n instanceId: \"space-001\"\n description: \"这是一个用于产品设计协作的空间\"\n notifyCenterUrl: \"/notify-center\"\n notices:\n - id: \"msg-1\"\n isRead: false\n type: \"project\"\n title: \"协作流【研发设计】已完成\"\n - id: \"msg-2\"\n isRead: false\n type: \"space\"\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n - id: \"msg-3\"\n type: \"account\"\n isRead: true\n title: \"【项目协作功能】已发布\"\nevents:\n go.back:\n action: console.log\n args:\n - \"点击了返回按钮\"\n members.click:\n action: console.log\n args:\n - \"点击了成员按钮\"\n notice.click:\n action: console.log\n args:\n - \"点击了消息:\"\n - \"<% EVENT.detail %>\"\n mark.all.read:\n action: console.log\n args:\n - \"点击了全部已读\"\n space.edit:\n action: console.log\n args:\n - \"点击了编辑空间\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.space-workbench\n# notify-center-url=\"/notify-center\"\n# id=\"brick-1\"\n# ></ai-portal.space-workbench>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spaceDetail = {\n# name: \"产品设计空间\",\n# instanceId: \"space-001\",\n# description: \"这是一个用于产品设计协作的空间\",\n# };\n# brick_1.notices = [\n# {\n# id: \"msg-1\",\n# isRead: false,\n# type: \"project\",\n# title: \"协作流【研发设计】已完成\",\n# },\n# {\n# id: \"msg-2\",\n# isRead: false,\n# type: \"space\",\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"account\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# ];\n# brick_1.addEventListener(\"go.back\", (e) => {\n# console.log(\"点击了返回按钮\");\n# });\n# brick_1.addEventListener(\"members.click\", (e) => {\n# console.log(\"点击了成员按钮\");\n# });\n# brick_1.addEventListener(\"notice.click\", (e) => {\n# console.log(\"点击了消息:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.all.read\", (e) => {\n# console.log(\"点击了全部已读\");\n# });\n# brick_1.addEventListener(\"space.edit\", (e) => {\n# console.log(\"点击了编辑空间\");\n# });\n# </script>\n# \n```\n\n### 无消息通知\n\n```yaml preview\nbrick: ai-portal.space-workbench\nproperties:\n spaceDetail:\n name: \"研发协作空间\"\n instanceId: \"space-002\"\n description: \"研发团队的协作空间\"\n notifyCenterUrl: \"/notify-center\"\n notices: []\nevents:\n go.back:\n action: console.log\n args:\n - \"返回\"\n members.click:\n action: console.log\n args:\n - \"查看成员\"\n space.edit:\n action: console.log\n args:\n - \"编辑空间\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.space-workbench\n# notify-center-url=\"/notify-center\"\n# id=\"brick-1\"\n# ></ai-portal.space-workbench>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spaceDetail = {\n# name: \"研发协作空间\",\n# instanceId: \"space-002\",\n# description: \"研发团队的协作空间\",\n# };\n# brick_1.notices = [];\n# brick_1.addEventListener(\"go.back\", (e) => {\n# console.log(\"返回\");\n# });\n# brick_1.addEventListener(\"members.click\", (e) => {\n# console.log(\"查看成员\");\n# });\n# brick_1.addEventListener(\"space.edit\", (e) => {\n# console.log(\"编辑空间\");\n# });\n# </script>\n# \n```\n"
108
+ "doc": "---\ntagName: ai-portal.space-workbench\ndisplayName: WrappedAiPortalSpaceWorkbench\ndescription: 协作空间工作台,集成顶部导航、侧边栏(知识库、业务实例)、聊天区域和服务流等核心功能的一体化工作台构件。\ncategory: \"\"\nsource: \"@next-bricks/ai-portal\"\n---\n\n# ai-portal.space-workbench\n\n> 协作空间工作台,集成顶部导航、侧边栏(知识库、业务实例)、聊天区域和服务流等核心功能的一体化工作台构件。\n\n## Props\n\n| 属性 | 类型 | 必填 | 默认值 | 说明 |\n| --------------- | ----------------- | ---- | ------ | ---------------------- |\n| spaceDetail | `SpaceDetail` | 是 | - | 空间详情信息,必填 |\n| notifyCenterUrl | `string` | 是 | - | 消息中心跳转链接,必填 |\n| notices | `NoticeItem[]` | 否 | - | 消息通知列表 |\n| knowledges | `KnowledgeItem[]` | 否 | - | 知识库列表 |\n| uploadOptions | `UploadOptions` | 否 | - | 文件上传配置选项 |\n\n## Events\n\n| 事件 | detail | 说明 |\n| --------------- | ------------------------------------------------------------------------------------------ | ---------------------- |\n| go.back | `void` | 点击返回按钮时触发 |\n| members.click | `void` | 点击成员按钮时触发 |\n| notice.click | `NoticeItem` — { id: 消息ID, type: 消息类型, isRead: 是否已读, title: 标题, time: 时间戳 } | 点击消息通知项时触发 |\n| mark.all.read | `void` | 点击全部已读按钮时触发 |\n| space.edit | `void` | 点击编辑空间按钮时触发 |\n| knowledge.click | `KnowledgeItem` — 知识条目数据 | 点击知识条目时触发 |\n| knowledge.add | `void` | 点击添加知识按钮时触发 |\n\n## Examples\n\n### 基础使用\n\n展示包含空间信息、消息通知的协作空间工作台。\n\n```yaml preview\nbrick: ai-portal.space-workbench\nproperties:\n spaceDetail:\n name: \"产品设计空间\"\n instanceId: \"space-001\"\n description: \"这是一个用于产品设计协作的空间\"\n notifyCenterUrl: \"/notify-center\"\n notices:\n - id: \"msg-1\"\n isRead: false\n type: \"project\"\n title: \"协作流【研发设计】已完成\"\n - id: \"msg-2\"\n isRead: false\n type: \"space\"\n title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\"\n - id: \"msg-3\"\n type: \"account\"\n isRead: true\n title: \"【项目协作功能】已发布\"\nevents:\n go.back:\n action: console.log\n args:\n - \"点击了返回按钮\"\n members.click:\n action: console.log\n args:\n - \"点击了成员按钮\"\n notice.click:\n action: console.log\n args:\n - \"点击了消息:\"\n - \"<% EVENT.detail %>\"\n mark.all.read:\n action: console.log\n args:\n - \"点击了全部已读\"\n space.edit:\n action: console.log\n args:\n - \"点击了编辑空间\"\n knowledge.click:\n action: console.log\n args:\n - \"点击了知识:\"\n - \"<% EVENT.detail %>\"\n knowledge.add:\n action: console.log\n args:\n - \"点击了添加知识\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.space-workbench\n# notify-center-url=\"/notify-center\"\n# id=\"brick-1\"\n# ></ai-portal.space-workbench>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spaceDetail = {\n# name: \"产品设计空间\",\n# instanceId: \"space-001\",\n# description: \"这是一个用于产品设计协作的空间\",\n# };\n# brick_1.notices = [\n# {\n# id: \"msg-1\",\n# isRead: false,\n# type: \"project\",\n# title: \"协作流【研发设计】已完成\",\n# },\n# {\n# id: \"msg-2\",\n# isRead: false,\n# type: \"space\",\n# title: \"协作流【协作流名称】 - 【活动名称】需要人工确认\",\n# },\n# {\n# id: \"msg-3\",\n# type: \"account\",\n# isRead: true,\n# title: \"【项目协作功能】已发布\",\n# },\n# ];\n# brick_1.addEventListener(\"go.back\", (e) => {\n# console.log(\"点击了返回按钮\");\n# });\n# brick_1.addEventListener(\"members.click\", (e) => {\n# console.log(\"点击了成员按钮\");\n# });\n# brick_1.addEventListener(\"notice.click\", (e) => {\n# console.log(\"点击了消息:\", e.detail);\n# });\n# brick_1.addEventListener(\"mark.all.read\", (e) => {\n# console.log(\"点击了全部已读\");\n# });\n# brick_1.addEventListener(\"space.edit\", (e) => {\n# console.log(\"点击了编辑空间\");\n# });\n# brick_1.addEventListener(\"knowledge.click\", (e) => {\n# console.log(\"点击了知识:\", e.detail);\n# });\n# brick_1.addEventListener(\"knowledge.add\", (e) => {\n# console.log(\"点击了添加知识\");\n# });\n# </script>\n# \n```\n\n### 无消息通知\n\n空间没有消息通知时的展示。\n\n```yaml preview\nbrick: ai-portal.space-workbench\nproperties:\n spaceDetail:\n name: \"研发协作空间\"\n instanceId: \"space-002\"\n description: \"研发团队的协作空间\"\n notifyCenterUrl: \"/notify-center\"\n notices: []\nevents:\n go.back:\n action: console.log\n args:\n - \"返回\"\n members.click:\n action: console.log\n args:\n - \"查看成员\"\n space.edit:\n action: console.log\n args:\n - \"编辑空间\"\n# -- YAML DELIMITER (1nbbm8) --\n# <ai-portal.space-workbench\n# notify-center-url=\"/notify-center\"\n# id=\"brick-1\"\n# ></ai-portal.space-workbench>\n# \n# <script>\n# const brick_1 = document.getElementById(\"brick-1\");\n# brick_1.spaceDetail = {\n# name: \"研发协作空间\",\n# instanceId: \"space-002\",\n# description: \"研发团队的协作空间\",\n# };\n# brick_1.notices = [];\n# brick_1.addEventListener(\"go.back\", (e) => {\n# console.log(\"返回\");\n# });\n# brick_1.addEventListener(\"members.click\", (e) => {\n# console.log(\"查看成员\");\n# });\n# brick_1.addEventListener(\"space.edit\", (e) => {\n# console.log(\"编辑空间\");\n# });\n# </script>\n# \n```\n"
97
109
  }
98
110
  }