@blade-hq/agent-react 2612.0.0-beta.9 → 2612.0.0-beta.91

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 (183) hide show
  1. package/README.md +53 -0
  2. package/dist/SessionPluginConfigForm-Y657MKRX.js +9 -0
  3. package/dist/SessionPluginConfigForm-Y657MKRX.js.map +1 -0
  4. package/dist/chat/AgentLoopBlock.d.ts +0 -2
  5. package/dist/chat/AskUserQuestionBlock.d.ts +3 -20
  6. package/dist/chat/AssistantTurnBlock.d.ts +3 -10
  7. package/dist/chat/AttachmentPreviewDialog.d.ts +0 -1
  8. package/dist/chat/ChatLoadingIndicator.d.ts +15 -0
  9. package/dist/chat/ChatPanel.d.ts +3 -1
  10. package/dist/chat/ContextAttachmentPills.d.ts +4 -0
  11. package/dist/chat/CurrentPlanPanel.d.ts +0 -3
  12. package/dist/chat/FileDeliveryCards.d.ts +12 -10
  13. package/dist/chat/FinalArtifactCards.d.ts +0 -1
  14. package/dist/chat/ImageLightbox.d.ts +1 -1
  15. package/dist/chat/LiteMessageList.d.ts +5 -3
  16. package/dist/chat/MessageFileAttachmentList.d.ts +0 -5
  17. package/dist/chat/QuestionnaireQuestionBlock.d.ts +11 -0
  18. package/dist/chat/SessionReplayBar.d.ts +0 -1
  19. package/dist/chat/TextAttachmentPills.d.ts +0 -3
  20. package/dist/chat/TurnNavRail.d.ts +1 -7
  21. package/dist/chat/WorkflowRunBlock.d.ts +21 -4
  22. package/dist/chat/ai-elements/shimmer.d.ts +2 -2
  23. package/dist/chat/chat-column-width.d.ts +21 -0
  24. package/dist/chat/customization.d.ts +1 -1
  25. package/dist/chat/index.d.ts +6 -3
  26. package/dist/chat/markdown/ExternalAnchor.d.ts +2 -2
  27. package/dist/chat/message-list-blocks.d.ts +0 -1
  28. package/dist/chat/runtime/actions.d.ts +7 -3
  29. package/dist/chat/runtime/background-task-dismissals.d.ts +0 -1
  30. package/dist/chat/runtime/composer-channels.d.ts +0 -3
  31. package/dist/chat/runtime/environment.d.ts +2 -0
  32. package/dist/chat/runtime/input-cache-reset.d.ts +0 -5
  33. package/dist/chat/runtime/input-services.d.ts +10 -0
  34. package/dist/chat/runtime/session-source.d.ts +0 -5
  35. package/dist/chat/runtime/use-chat-actions.d.ts +1 -5
  36. package/dist/chat/turn-locate-channel.d.ts +53 -0
  37. package/dist/chat.css +23 -18
  38. package/dist/{chunk-HJ7KNUWM.js → chunk-5ESAKOUV.js} +4181 -16595
  39. package/dist/chunk-5ESAKOUV.js.map +1 -0
  40. package/dist/chunk-74FML2TR.js +9488 -0
  41. package/dist/chunk-74FML2TR.js.map +1 -0
  42. package/dist/chunk-DL7XZGQS.js +9437 -0
  43. package/dist/chunk-DL7XZGQS.js.map +1 -0
  44. package/dist/{chunk-4OG6AJXY.js → chunk-L75DNQ3N.js} +3954 -26107
  45. package/dist/chunk-L75DNQ3N.js.map +1 -0
  46. package/dist/chunk-Q2JZ5FBP.js +4157 -0
  47. package/dist/chunk-Q2JZ5FBP.js.map +1 -0
  48. package/dist/chunk-R2WN24PN.js +2433 -0
  49. package/dist/chunk-R2WN24PN.js.map +1 -0
  50. package/dist/chunk-R6TH36MS.js +805 -0
  51. package/dist/chunk-R6TH36MS.js.map +1 -0
  52. package/dist/chunk-SEJUZPT5.js +950 -0
  53. package/dist/chunk-SEJUZPT5.js.map +1 -0
  54. package/dist/chunk-UKJ2UI4S.js +1340 -0
  55. package/dist/chunk-UKJ2UI4S.js.map +1 -0
  56. package/dist/chunk-ZRMO4P2Y.js +14430 -0
  57. package/dist/chunk-ZRMO4P2Y.js.map +1 -0
  58. package/dist/components/AccountConnectorRules.d.ts +7 -0
  59. package/dist/components/AccountConnectors.d.ts +13 -0
  60. package/dist/components/BrowserConnectionDialog.d.ts +8 -0
  61. package/dist/components/ChatInput.d.ts +1 -15
  62. package/dist/components/ConfigConnection.d.ts +16 -0
  63. package/dist/components/ConnectorAuthorizationProgress.d.ts +6 -0
  64. package/dist/components/ConnectorConnection.d.ts +4 -0
  65. package/dist/components/ConnectorDetail.d.ts +46 -0
  66. package/dist/components/ConnectorPanel.d.ts +3 -1
  67. package/dist/components/ConnectorRulesPanel.d.ts +10 -0
  68. package/dist/components/ConnectorRuntimeDiagnostics.d.ts +5 -0
  69. package/dist/components/DeviceConnection.d.ts +21 -0
  70. package/dist/components/FeishuCapabilitySelection.d.ts +14 -0
  71. package/dist/components/FeishuPermissionStatus.d.ts +7 -0
  72. package/dist/components/LlmAdvancedSettings.d.ts +0 -1
  73. package/dist/components/ManagedConnection.d.ts +12 -0
  74. package/dist/components/McpAppFrame.d.ts +17 -0
  75. package/dist/components/PackEventNotice.d.ts +3 -0
  76. package/dist/components/PlanUpdateBlock.d.ts +0 -1
  77. package/dist/components/SessionPluginConfigForm.d.ts +4 -1
  78. package/dist/components/SessionPluginIcon.d.ts +1 -0
  79. package/dist/components/plugin-connector.d.ts +1 -0
  80. package/dist/connectors.d.ts +6 -0
  81. package/dist/connectors.js +19 -0
  82. package/dist/connectors.js.map +1 -0
  83. package/dist/embed/blade-chat-element.d.ts +0 -8
  84. package/dist/embed/entry.d.ts +19 -19
  85. package/dist/hooks/use-capabilities.d.ts +3 -0
  86. package/dist/hooks/use-message-pin.d.ts +1 -1
  87. package/dist/hooks/use-turn-navigation.d.ts +19 -0
  88. package/dist/index.d.ts +7 -0
  89. package/dist/index.js +25 -3
  90. package/dist/internal.d.ts +7 -4
  91. package/dist/internal.js +665 -103
  92. package/dist/internal.js.map +1 -1
  93. package/dist/lib/message-shortcuts.d.ts +5 -0
  94. package/dist/questions.d.ts +7 -0
  95. package/dist/questions.js +910 -0
  96. package/dist/questions.js.map +1 -0
  97. package/dist/rich-input/ChatInput.d.ts +1 -1
  98. package/dist/rich-input/ConnectButton.d.ts +7 -5
  99. package/dist/rich-input/FileCompletionMenu.d.ts +1 -2
  100. package/dist/rich-input/InputActionSubmenu.d.ts +10 -0
  101. package/dist/rich-input/ModelSelector.d.ts +3 -1
  102. package/dist/rich-input/SkillActionMenu.d.ts +10 -0
  103. package/dist/rich-input/SkillStatusBar.d.ts +0 -6
  104. package/dist/rich-input/extensions/skill-mention.d.ts +3 -20
  105. package/dist/rich-input/index.d.ts +3 -2
  106. package/dist/rich-input/lib/composer-content.d.ts +5 -1
  107. package/dist/rich-input/lib/plugin-suggestions.d.ts +4 -4
  108. package/dist/rich-input/lib/reference-candidates.d.ts +0 -1
  109. package/dist/rich-input/lib/skill-suggestions.d.ts +1 -1
  110. package/dist/rich-input/lib/user-home.d.ts +0 -17
  111. package/dist/rich-input/model/resolve-model.d.ts +2 -2
  112. package/dist/rich-input/services.d.ts +1 -1
  113. package/dist/rich-input/voice/VoiceWaveform.d.ts +0 -3
  114. package/dist/rich-input.js +1711 -2140
  115. package/dist/rich-input.js.map +1 -1
  116. package/dist/style.css +16 -55
  117. package/dist/style.full.css +41 -77
  118. package/dist/tool-details.d.ts +8 -0
  119. package/dist/tool-details.js +25 -0
  120. package/dist/tool-details.js.map +1 -0
  121. package/node_modules/@modelcontextprotocol/ext-apps/LICENSE +216 -0
  122. package/node_modules/@modelcontextprotocol/ext-apps/README.md +284 -0
  123. package/node_modules/@modelcontextprotocol/ext-apps/dist/docs/patterns.d.ts +9 -0
  124. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.d.ts +1348 -0
  125. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.examples.d.ts +9 -0
  126. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js +39 -0
  127. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.test.d.ts +1 -0
  128. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-with-deps.js +82 -0
  129. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.d.ts +1214 -0
  130. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.examples.d.ts +9 -0
  131. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js +39 -0
  132. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.test.d.ts +1 -0
  133. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/constants.d.ts +65 -0
  134. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/events.d.ts +47 -0
  135. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/events.test.d.ts +1 -0
  136. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.d.ts +1047 -0
  137. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.json +6170 -0
  138. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.test.d.ts +41 -0
  139. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/interop-v1.test.d.ts +1 -0
  140. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/legacy-handlers.d.ts +66 -0
  141. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/legacy-handlers.test.d.ts +1 -0
  142. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.d.ts +126 -0
  143. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.examples.d.ts +9 -0
  144. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.test.d.ts +1 -0
  145. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.d.ts +37 -0
  146. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.examples.d.ts +6 -0
  147. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.js +39 -0
  148. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/react-with-deps.js +82 -0
  149. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useApp.d.ts +115 -0
  150. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useApp.examples.d.ts +6 -0
  151. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useAutoResize.d.ts +54 -0
  152. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useAutoResize.examples.d.ts +6 -0
  153. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useDocumentTheme.d.ts +44 -0
  154. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useDocumentTheme.examples.d.ts +6 -0
  155. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useHostStyles.d.ts +113 -0
  156. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useHostStyles.examples.d.ts +6 -0
  157. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.d.ts +381 -0
  158. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.examples.d.ts +9 -0
  159. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js +1 -0
  160. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.test.d.ts +1 -0
  161. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/spec.types.d.ts +698 -0
  162. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/standard-schema.d.ts +23 -0
  163. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/styles.d.ts +184 -0
  164. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/styles.examples.d.ts +9 -0
  165. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/types.d.ts +33 -0
  166. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/wire-compat.test.d.ts +1 -0
  167. package/node_modules/@modelcontextprotocol/ext-apps/package.json +144 -0
  168. package/node_modules/@standard-schema/spec/LICENSE +21 -0
  169. package/node_modules/@standard-schema/spec/README.md +198 -0
  170. package/node_modules/@standard-schema/spec/dist/index.cjs +18 -0
  171. package/node_modules/@standard-schema/spec/dist/index.d.cts +119 -0
  172. package/node_modules/@standard-schema/spec/dist/index.d.ts +119 -0
  173. package/node_modules/@standard-schema/spec/dist/index.js +0 -0
  174. package/node_modules/@standard-schema/spec/package.json +52 -0
  175. package/package.json +19 -3
  176. package/public-api.md +66 -4
  177. package/dist/chat-OCLOVB3H.css +0 -175
  178. package/dist/chunk-3DRBRQXN.js +0 -258
  179. package/dist/chunk-3DRBRQXN.js.map +0 -1
  180. package/dist/chunk-4OG6AJXY.js.map +0 -1
  181. package/dist/chunk-HJ7KNUWM.js.map +0 -1
  182. package/dist/lib/agent-computer-command.d.ts +0 -32
  183. package/dist/rich-input/extensions/workflow-mention.d.ts +0 -10
package/README.md CHANGED
@@ -460,6 +460,10 @@ blade-chat::part(input-toolbar) { gap: 12px; }
460
460
 
461
461
  不需要本包——用后端托管的单文件产物 `<script src=".../sdk/blade-agent.js">` + `<blade-chat>` 自定义元素,行为与 `ChatView` 一致。Vue 项目用 `@blade-hq/agent-vue` 的 `<BladeChat>` 组件;区块定制用挂载式渲染器(`<blade-chat>` 元素的 `renderers` 属性),详见 agent-client README「`<blade-chat>` 的挂载式渲染器」。
462
462
 
463
+ ## 独立工具详情
464
+
465
+ 自行维护消息时间线的应用可按需使用公开入口 `@blade-hq/agent-react/tool-details`,无需依赖 `/internal` 或挂载完整聊天视图。入口导出 `getRenderer(name)`、`formatToolName`、`getToolDisplayLabel`、`parsePlanUpdate`、`ToolUiCardView`、`isToolUiCard`,以及 `ToolRendererProps`、`ToolUiCard` 类型。`getRenderer` 对内置工具返回共享组件,未注册的名称返回 `null`,宿主可组合自己的通用展示。工具组件接收公开的 `ToolCallInfo`,主题及 Tailwind 编译方式与聊天视图相同;涉及会话资源的工具卡片仍需 `BladeProvider` 与对应会话权限。
466
+
463
467
  ## 第一方内部入口
464
468
 
465
469
  - `@blade-hq/agent-react/internal`:内置 Web 与浏览器插件用的聊天内部块、判定逻辑和连接器组件。
@@ -489,3 +493,52 @@ blade-chat::part(input-toolbar) { gap: 12px; }
489
493
  ### 选择插件条目
490
494
 
491
495
  ChatView 和 `<blade-chat>` 的默认轻量输入支持 @ 搜索插件条目,候选显示中文插件名和图标。选中条目在输入框上方显示,可点 × 移除;发送后保留选择,刷新后恢复最近用户消息的选择。富输入使用同样的候选接口与 PluginRef 身份。自动读取失败时模型会收到明确失败说明。
496
+
497
+ ### 应用资料展示
498
+
499
+ 共享聊天视图展示消息级 `context_attachments`:气泡只显示正文,资料标签可展开查看纯文本详情,`data` 中的内部 JSON 与 ID 不显示。`ChatSendOptions.contextAttachments` 可沿共享发送入口传入 SDK;可靠后台发送先持久保存原业务输入与 requestId,再调用同一 `AgentSession.send`,按 `receipt.status` 判断接收结果。文件读取使用当前 `BladeProvider` 的 `BladeClient` 和资料指定的会话权限,失效或没有来源的文件显示「文件不可用」。内置 Web、扩展和嵌入视图使用相同实现。
500
+
501
+ ### 独立嵌入提问卡片(React 19+)
502
+
503
+ 自行管理消息时间线的宿主可从 `@blade-hq/agent-react/questions` 按需导入 `QuestionnaireQuestionBlock`(也导出为 `AskUserQuestionBlock`),无需加载整个 `ChatView`。该入口基于官方 shadcn Questionnaire,遵循 `@shadcn/react` 的 React 19+ 要求;原有 `ChatView` 入口及其问答渲染器保留 React 18 支持。
504
+
505
+ 入口同时导出 `AskUserQuestionData` 和 `AskUserAnswerData` 类型。通过 `data`、`answered`、`answerData` 和 `sessionStatus` 提供问题及状态;`onAnswer(text, toolCallId, answerData)` 交给宿主,使用 `session.send(text, { askUserAnswer: { tool_call_id: toolCallId, ...answerData } })` 将原生结构化回答送回原始会话,不能送入普通文本队列。
506
+
507
+ Questionnaire 负责必答校验、原生单选/多选、自填和前后分页,不提供跳过问题的业务行为。宿主负责传输、提交失败反馈、刷新已保存的回答及主题样式;提交失败时以 `sessionStatus="failed"` 恢复当前选择供重试。问题类型及文本格式化函数与 BA 原生协议共用。
508
+
509
+ ## 飞书授权接入
510
+
511
+ `ConnectorConnection` 通过 `type="device"` 或 `type="managed"` 选择连接方式,并接收对应连接组件的宿主回调。
512
+
513
+ `DeviceConnection` 接收宿主的 `read`、`act`、`onChanged` 回调及可选 `onDisable`、`diagnostics`。未传 `detail` 的授权界面可用 `initialPage="manage"` 在首次挂载时直达管理页;尚未关联应用时仍进入连接入口,不会自动创建应用或授权。初始权限采用飞书平台默认模板及官方 CLI 推荐清单,不以机器人/本人身份或 SW 已实现能力筛选。权限状态按企业侧开通、本人授权分别展示,未知不等于拒绝;工作能力目录另外说明当前能执行的操作。
514
+
515
+ 首次关联应用后继续确认官方推荐的本人授权,允许两次扫码。企业审核要求以飞书页面为准;添加能力仍按当前操作核验和补充,核验失败保留连接与错误。统一授权流程按 `authorize` / `poll` 逐步展示当前飞书官方二维码,完成后显式 `finish`;PA 通过 `bindDelivery` 接入机器人消息,接入失败保留授权,可单独重试。完整分类选择在完成时替换启用集合,局部补权保留其他已选项;取消申请保留已有授权。增加能力时保留此助手原有停用状态,按钮显示“授权并保存”,暂停推送也不会被自动恢复。日志、历史步骤和原生错误编号放在连接帮助的高级排查内。
516
+
517
+ PA 等只需要授权界面的宿主可从 `@blade-hq/agent-react/connectors` 导入,避免加载整套聊天 UI。组件仅接收公开授权链接,二维码在本地生成。宿主须扫描组件源码(含 `FeishuCapabilitySelection.tsx`)的 Tailwind 样式,或使用 SDK 完整样式。认证身份变化时重建组件,避免沿用前一账号的视图。
518
+
519
+
520
+ ### 聊天中的飞书连接
521
+
522
+ `@blade-hq/agent-react/connectors` 的 `DeviceConnection` 可传 `autoAuthorize`:仅在用户主动打开聊天授权卡片时开始准备官方二维码,设置页默认仍手动发起。`authorizationCapabilities` 用于只补当前操作需要的能力;已有有效二维码会继续使用,不重复生成。生成二维码不代表用户授权或企业审核已通过。 卡片宿主可用 `authorizationDescription` 提供按实际业务能力及身份生成的说明;`onAuthorizationDismiss` 让“暂时取消”只关闭当前窗口,保留其他渠道共用的授权链接。不传关闭回调时仍取消本次授权尝试。
523
+
524
+ 首次连接默认只申请机器人能力;需要本人能力时按操作补充授权。已有连接的选择和授权不受影响。
525
+
526
+ ### 连接器管理详情
527
+
528
+ `ConnectorConnection` 的 `detail` 传入名称、图标和 `rules` 内容,使用共享的紧凑头部、更多操作、权限/诊断二级页与确认框。只在 PA 等拥有对应能力的宿主传入 `bindDelivery`、`detail.preferences`、`detail.onOpenPush`;不提供的能力不会生成空标签。停用只改变本地启用意图,移除才会清除托管凭据并停止收推,两者分别确认。
529
+
530
+ 普通 schema / 网页登录连接使用 `ConfigConnection`,宿主提供表单或登录内容、连接状态及已鉴权的动作回调。`ConnectorDetail` 可组合其他连接方式;动作可通过 `description` 提供菜单中的影响说明;动作类型为 `ConnectorDetailAction`,宿主插槽类型为 `ConnectorDetailOptions`,签名见 [公开 API](public-api.md)。切换连接器或认证身份时按身份重建组件,授权轮询只由连接组件持有。
531
+
532
+ 源码集成时扫描新增的 `ConnectorDetail.tsx` / `ConfigConnection.tsx`、使用的 UI composites;Shadow DOM 宿主沿用 `OverlayRootProvider`。生产集成保留浏览器与 schema 表单的按需加载,不为使用详情而加载整套聊天 UI。
533
+
534
+ ### ConnectorRulesPanel
535
+
536
+ 从 `@blade-hq/agent-react/connectors` 导入 `ConnectorRulesPanel`,传入稳定的 `read` 和 `update` 回调(调用 `client.connectors.rules/updateRules`)。组件展示分组、分类、启用/关闭开关与恢复默认;保存成功才替换当前值,失败保留原设置。宿主通过 `className` 与继承主题接入已有样式;`onCountChange` 返回可设置规则组数。详情中的 `compact` 隐藏重复标题,并默认显示第一个业务分类;仍可选择全部及恢复所有分类的默认设置。
537
+
538
+ 连接器宿主可通过 `ConnectorDetailOptions.name` 提供连接器名。飞书待开通权限提醒按连接器名、连接身份与权限集合摘要记忆展开状态;缺失权限归零时清理该连接器的旧记录;直接组合 `ConnectorDetail` 时可用 `noticeStorageKey` 指定本地记忆键。localStorage 不可用时保留内存内交互。
539
+
540
+
541
+
542
+ ### 平台能力展示
543
+
544
+ `useCapabilities(client)` 消费共享 SDK 的能力快照,在有效期届满时刷新,失败不保留过期的 allow。返回 `null` 或 `status: "unknown"` 时表示暂时无法确认,known 且缺少对应 key 才表示未开通。内置 Web 的平台浏览器入口使用同一 hook;外部宿主可据此提供自己的入口,实际调用仍由资源服务鉴权。
@@ -0,0 +1,9 @@
1
+ import {
2
+ SessionPluginConfigForm
3
+ } from "./chunk-5ESAKOUV.js";
4
+ import "./chunk-SEJUZPT5.js";
5
+ import "./chunk-PR4QN5HX.js";
6
+ export {
7
+ SessionPluginConfigForm
8
+ };
9
+ //# sourceMappingURL=SessionPluginConfigForm-Y657MKRX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -5,9 +5,7 @@ interface Props {
5
5
  sessionId: string;
6
6
  reasoning?: string;
7
7
  hideAskUserQuestions?: boolean;
8
- /** 初始展开(工作流步骤卡默认摊开,老 #1841 体验);等待回答仍强制展开。 */
9
8
  defaultExpanded?: boolean;
10
- /** 自定义卡头描述渲染(工作流用它把 {{ref}} 画成引用胶囊)。 */
11
9
  renderDescription?: (description: string) => ReactNode;
12
10
  }
13
11
  export declare function AgentLoopBlock({ toolCall, sessionId, reasoning, hideAskUserQuestions, defaultExpanded, renderDescription, }: Props): import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,6 @@
1
- import type { AskUserAnswerData } from "@blade-hq/agent-client";
2
- export type { AskUserAnswerData };
3
- interface OptionItem {
4
- label: string;
5
- description: string;
6
- }
7
- interface QuestionItem {
8
- question: string;
9
- options: OptionItem[];
10
- multiSelect?: boolean;
11
- }
12
- interface SourceLoopInfo {
13
- loop_name: string;
14
- description: string;
15
- }
16
- export interface AskUserQuestionData {
17
- questions: QuestionItem[];
18
- source_loop?: SourceLoopInfo | null;
19
- }
1
+ import type { AskUserAnswerData, AskUserQuestionData } from "@blade-hq/agent-client";
2
+ export { parseAskUserQuestion } from "@blade-hq/agent-client";
3
+ export type { AskUserAnswerData, AskUserQuestionData };
20
4
  interface Props {
21
5
  data: AskUserQuestionData;
22
6
  answered: boolean;
@@ -26,7 +10,6 @@ interface Props {
26
10
  onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
27
11
  }
28
12
  export declare function AskUserQuestionBlock({ data, answered, toolCallId, sessionStatus, answerData, onAnswer, }: Props): import("react/jsx-runtime").JSX.Element;
29
- export declare function parseAskUserQuestion(toolResult: string | null | undefined): AskUserQuestionData | null;
30
13
  export interface AskUserQuestionError {
31
14
  message: string;
32
15
  detail: string | null;
@@ -7,14 +7,6 @@ interface Props {
7
7
  sessionId: string;
8
8
  messages: ChatMessage[];
9
9
  isStreaming?: boolean;
10
- /**
11
- * 打字机式显示节流下,"正文还没播完"跟"思考过程本身有没有说完"是两条
12
- * 独立时间线——正文通常比思考过程晚播完很久。"正在思考"/"已思考" 这个
13
- * 标签只该看思考过程自己有没有播完,不能被 isStreaming(含正文节流)
14
- * 拖着一起等正文播完才翻,否则会出现"正文都在吐字好几秒了,还显示正在
15
- * 思考"这种跟视觉进度对不上的观感。不传时按旧行为处理(等价于思考过程
16
- * 跟 isStreaming 同步)。
17
- */
18
10
  isReasoningRevealing?: boolean;
19
11
  isLastTurn?: boolean;
20
12
  askAnswers?: Record<string, AskUserAnswerData>;
@@ -22,6 +14,7 @@ interface Props {
22
14
  sessionStatus?: string;
23
15
  level?: 1 | 2;
24
16
  forceExpanded?: boolean;
17
+ excludeDeliveredPaths?: ReadonlySet<string>;
25
18
  customization?: ChatViewCustomization;
26
19
  }
27
20
  export type TurnDisplayMode = "compact" | "detail";
@@ -38,9 +31,9 @@ export declare function formatExecutionDuration(durationMs: number): string;
38
31
  export declare function getExecutionDurationMs({ messages, isStreaming, now, }: {
39
32
  messages: ChatMessage[];
40
33
  isStreaming: boolean;
41
- now?: number;
34
+ now?: number | null;
42
35
  }): number;
43
- declare function AssistantTurnBlockBase({ sessionId, messages: rawMessages, isStreaming, isReasoningRevealing, askAnswers, onAnswer, sessionStatus, level, forceExpanded, customization, }: Props): import("react/jsx-runtime").JSX.Element;
36
+ declare function AssistantTurnBlockBase({ sessionId, messages: rawMessages, isStreaming, isReasoningRevealing, askAnswers, onAnswer, sessionStatus, level, forceExpanded, excludeDeliveredPaths, customization, }: Props): import("react/jsx-runtime").JSX.Element;
44
37
  export declare const AssistantTurnBlock: import("react").MemoExoticComponent<typeof AssistantTurnBlockBase>;
45
38
  /** 一轮消息里引用到的记忆(按 id 去重,保持首次出现的顺序)。 */
46
39
  export declare function collectMemoryRefs(messages: ChatMessage[]): MemoryRefInfo[];
@@ -19,7 +19,6 @@ interface Props {
19
19
  * token 靠 query 字符串携带,因此也不需要再挂 Authorization header。
20
20
  */
21
21
  url: string | null;
22
- /** text-like 视为"可文本预览";其他只显示下载按钮。 */
23
22
  mode: "markdown" | "text" | "default";
24
23
  }
25
24
  export declare function AttachmentPreviewDialog({ open, onOpenChange, filename, url, mode }: Props): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ export declare function isPreparingReply(messages: readonly {
2
+ role: string;
3
+ kind?: string;
4
+ }[]): boolean;
5
+ export declare function formatLoadingElapsed(elapsedMs: number): string;
6
+ export declare function resolveLoadingStageLabel({ preparing, elapsedMs, activeToolLabel, }: {
7
+ preparing: boolean;
8
+ elapsedMs: number;
9
+ activeToolLabel?: string | null;
10
+ }): string;
11
+ export declare function ChatLoadingIndicator({ preparing, startedAtMs, activeToolLabel, }: {
12
+ preparing?: boolean;
13
+ startedAtMs?: number | null;
14
+ activeToolLabel?: string | null;
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -49,6 +49,8 @@ export interface ChatPanelProps extends ChatViewCustomization {
49
49
  initialDraft?: string;
50
50
  initialDraftKey?: string;
51
51
  renderMode?: ChatRenderMode;
52
+ /** 是否允许在全宽桌面容器中拖拽对话栏左右导轨调宽(侧栏/浮窗/外部嵌入默认关闭)。 */
53
+ resizableColumns?: boolean;
52
54
  /**
53
55
  * 开发者视图专用的输入框底部统计插槽。宿主(内置 Web 页面)注入;普通与精简视图不会调用它,
54
56
  * 因此也不会发出统计请求。
@@ -59,4 +61,4 @@ export interface ChatPanelProps extends ChatViewCustomization {
59
61
  * 聊天面板:消息流 + 队列 + 输入框。数据只来自 SessionSourceProvider 提供的会话实例与 props;
60
62
  * 内置 Web、浏览器插件与 SDK 的 ChatView / `<blade-chat>` 渲染的都是它。
61
63
  */
62
- export declare function ChatPanel({ sessionId, theme, mode: providedMode, onToggleMode, banner, header, footer, emptyState, errorMessage: externalError, onExitReplay, placeholder, onFollowupInteraction, renderAttachments, onBeforeSend, onCommand, canCreateBoardTask, canShareSession, onOpenSkills, inputLabel, onDoubleEscape, composerHint, composerBanner, scrollToStartKey, scrollToEntryKey, initialDraft, initialDraftKey, renderMode: requestedRenderMode, renderComposerStats, classNames, components, renderers, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
64
+ export declare function ChatPanel({ sessionId, theme, mode: providedMode, onToggleMode, banner, header, footer, emptyState, errorMessage: externalError, onExitReplay, placeholder, onFollowupInteraction, renderAttachments, onBeforeSend, onCommand, canCreateBoardTask, canShareSession, onOpenSkills, inputLabel, onDoubleEscape, composerHint, composerBanner, scrollToStartKey, scrollToEntryKey, initialDraft, initialDraftKey, renderMode: requestedRenderMode, resizableColumns, renderComposerStats, classNames, components, renderers, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ContextAttachment } from "@blade-hq/agent-client";
2
+ export declare function ContextAttachmentPills({ attachments }: {
3
+ attachments?: ContextAttachment[];
4
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,11 +1,8 @@
1
1
  import type { ChatMessage } from "@blade-hq/agent-client/internal";
2
2
  export declare function CurrentPlanPanelContent({ messages, running, autoReveal, sessionId, hideTodo, }: {
3
3
  messages: ChatMessage[];
4
- /** 会话是否还在执行;停止或加载历史时进度里的步骤不再转圈。 */
5
4
  running?: boolean;
6
- /** 仅当前这次消息变更来自实时成功的 update_plan 时为 true。 */
7
5
  autoReveal?: boolean;
8
- /** Key the plan block by session so switching sessions resets its local UI state. */
9
6
  sessionId?: string;
10
7
  hideTodo?: boolean;
11
8
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,26 +1,28 @@
1
1
  import type { ToolCallInfo } from "@blade-hq/agent-client/internal";
2
- /** 从该轮工具调用中提取智能体写入的工作区文件(去重、按出现顺序)。 */
3
- export declare function collectDeliveredFiles(toolCalls: ToolCallInfo[], sessionId: string): Array<{
2
+ export type DeliveredFileChangeKind = "created" | "modified";
3
+ export interface DeliveredFileEntry {
4
4
  relPath: string;
5
5
  name: string;
6
- }>;
7
- export declare function DeliveryCard({ path, name, sessionId, description, displayName, compact, onOpen, onDownloadStarted, onDownloadSucceeded, }: {
8
- /** 文件路径:工作目录下的相对路径,或容器内的绝对路径。 */
6
+ changeKind: DeliveredFileChangeKind;
7
+ }
8
+ export declare function normalizeDeliveredRelPath(rawPath: string, sessionId: string): string | null;
9
+ /** 从该轮工具调用中提取智能体写入或修改的工作区文件(去重、按首次出现顺序)。 */
10
+ export declare function collectDeliveredFiles(toolCalls: ToolCallInfo[], sessionId: string, excludePaths?: ReadonlySet<string>): DeliveredFileEntry[];
11
+ export declare function DeliveryCard({ path, name, sessionId, description, displayName, changeKind, compact, onOpen, onDownloadStarted, onDownloadSucceeded, }: {
9
12
  path: string;
10
13
  name: string;
11
14
  sessionId: string;
12
- /** 副标题;不传时按扩展名显示「Markdown · AI 生成」这类默认说明。 */
13
15
  description?: string;
14
- /** 卡片可读名称;下载文件名仍使用 name。 */
15
16
  displayName?: string;
16
- /** 会话总结使用正文 MEDIA 卡片的紧凑样式。 */
17
+ changeKind?: DeliveredFileChangeKind;
17
18
  compact?: boolean;
18
19
  onOpen?: () => void;
19
20
  onDownloadStarted?: () => void;
20
21
  onDownloadSucceeded?: () => void;
21
22
  }): import("react/jsx-runtime").JSX.Element;
22
- /** 文件交付卡片组(需求 10):助手在本轮写入的工作区文件,以卡片形式内联展示。 */
23
- export declare function FileDeliveryCards({ toolCalls, sessionId, }: {
23
+ /** 回合末交付与改动文件卡(参考 DeepSeek ui-deliverables):汇总展示本轮写入或更新的工作区文件。 */
24
+ export declare function FileDeliveryCards({ toolCalls, sessionId, excludePaths, }: {
24
25
  toolCalls: ToolCallInfo[];
25
26
  sessionId: string;
27
+ excludePaths?: ReadonlySet<string>;
26
28
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -3,6 +3,5 @@ import type { FinalArtifact } from "@blade-hq/agent-client/internal";
3
3
  export declare function FinalArtifactCards({ artifacts, sessionId, assistantEntryId, }: {
4
4
  artifacts: FinalArtifact[];
5
5
  sessionId: string;
6
- /** 所属回复;交互事件(`onFollowupInteraction`)用它指明是哪一轮的成果。 */
7
6
  assistantEntryId: string;
8
7
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -7,5 +7,5 @@ interface ImageLightboxProps {
7
7
  }[];
8
8
  initialIndex?: number;
9
9
  }
10
- export declare function ImageLightbox({ open, onOpenChange, images, initialIndex }: ImageLightboxProps): import("react").ReactPortal | null;
10
+ export declare function ImageLightbox({ open, onOpenChange, images, initialIndex }: ImageLightboxProps): import("react/jsx-runtime").JSX.Element | null;
11
11
  export {};
@@ -10,9 +10,7 @@ type TextRow = {
10
10
  text: string;
11
11
  entryIds: string[];
12
12
  failed?: boolean;
13
- /** 本轮(含子智能体循环)真实检索到的引用证据,只有 assistant 文本行才有——
14
- * 跟 AssistantTurnBlock.tsx 的 turnToolCalls/citations 同一套算法,不然轻量
15
- * 模式下 插件引用的 [n] 角标只能停在纯文本,点不开、也 hover 不出来源。 */
13
+ sending?: boolean;
16
14
  citations?: Record<number, CitationEntry>;
17
15
  };
18
16
  type MemoryRefsRow = {
@@ -54,6 +52,10 @@ type ContextDividerRow = {
54
52
  type LiteRow = {
55
53
  type: "background-wakeup";
56
54
  key: string;
55
+ } | {
56
+ type: "pack-event";
57
+ key: string;
58
+ title: string;
57
59
  } | TextRow | MemoryRefsRow | FollowupRow | HistoricalFeedbackRow | QuestionRow | ToolDescriptionRow | ContextGroupRow | ContextDividerRow;
58
60
  export declare function buildLiteRows({ messages, followup, sessionMessages, agentLoops, resultFeedbackByEntry, showContexts, }: {
59
61
  messages: ChatMessage[];
@@ -2,11 +2,6 @@ import type { FileContentPart } from "@blade-hq/agent-client/internal";
2
2
  interface MessageFileAttachmentListProps {
3
3
  files: FileContentPart[];
4
4
  className?: string;
5
- /**
6
- * R6:点击 pill 时的预览回调。不传时 pill 保持纯展示(向后兼容,Home /
7
- * ChatDev 等复用点零改动)。调用方自己决定 URL 来源 + 渲染什么(lightbox /
8
- * FilePreviewDialog / 下载等)。
9
- */
10
5
  onPreview?: (file: FileContentPart) => void;
11
6
  }
12
7
  export declare function MessageFileAttachmentList({ files, className, onPreview, }: MessageFileAttachmentListProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import type { AskUserAnswerData, AskUserQuestionData } from "@blade-hq/agent-client";
2
+ export type { AskUserAnswerData, AskUserQuestionData };
3
+ interface Props {
4
+ data: AskUserQuestionData;
5
+ answered: boolean;
6
+ toolCallId: string;
7
+ sessionStatus: string;
8
+ answerData?: AskUserAnswerData | undefined;
9
+ onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
10
+ }
11
+ export declare function QuestionnaireQuestionBlock({ data, answered, toolCallId, sessionStatus, answerData, onAnswer }: Props): import("react/jsx-runtime").JSX.Element;
@@ -7,6 +7,5 @@
7
7
  export declare function SessionReplayBar({ sessionId, className, onExit, }: {
8
8
  sessionId: string;
9
9
  className?: string;
10
- /** 宿主自己接管了「输入对不上录制内容」的处理时传入:退出要先了结那次待定的决定。 */
11
10
  onExit?: () => void;
12
11
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,6 @@
1
1
  import type { ParsedTextAttachment } from "@blade-hq/agent-client/internal";
2
2
  interface TextAttachmentPillsProps {
3
3
  attachments: ParsedTextAttachment[];
4
- /**
5
- * R6:点击 pill 时的预览回调。不传时保持纯展示(向后兼容)。
6
- */
7
4
  onPreview?: (attachment: ParsedTextAttachment) => void;
8
5
  }
9
6
  export declare function TextAttachmentPills({ attachments, onPreview }: TextAttachmentPillsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,16 +1,10 @@
1
- export interface TurnNavItem {
2
- id: string;
3
- title: string;
4
- }
1
+ import type { TurnNavItem } from "../hooks/use-turn-navigation";
5
2
  interface TurnNavRailProps {
6
3
  items: TurnNavItem[];
7
4
  activeTurnId: string | null;
8
5
  onSelectTurn: (turnId: string) => void;
9
- /** 正在请求定位的目标;null / 不传表示没有在途定位(开发者列表不传)。 */
10
6
  loadingTurnId?: string | null;
11
- /** 定位失败提示。 */
12
7
  error?: string | null;
13
- /** 定位失败的那条发言;重试按钮就再点它一次。 */
14
8
  failedTurnId?: string | null;
15
9
  }
16
10
  export declare function TurnNavRail({ items, activeTurnId, onSelectTurn, loadingTurnId, error, failedTurnId, }: TurnNavRailProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,13 +1,30 @@
1
+ import type { WorkflowRunEntry } from "@blade-hq/agent-client";
1
2
  import type { ToolCallInfo } from "@blade-hq/agent-client/internal";
3
+ import type { InputSessionSkill } from "./runtime/input-services";
2
4
  interface Props {
3
- /** 触发这次运行的 workflow:run 工具调用。 */
4
5
  toolCall: ToolCallInfo;
5
6
  sessionId: string;
6
7
  }
8
+ /** 标题里的技能 id 换成会话技能列表里的中文名;查不到(未加载/已卸载)就保留 id。 */
9
+ export declare function workflowTitle(name: string, argumentsJson: string, skills: readonly Pick<InputSessionSkill, "skill_id" | "display_name">[]): string;
10
+ type StepGroup = {
11
+ key: string;
12
+ desc: string;
13
+ stepId: string;
14
+ stepKind: string;
15
+ status?: string;
16
+ logs: string[];
17
+ };
18
+ /** 事件流 → 步骤分组:每个 step 事件开一张卡。log 行带所属步骤 id 时归到那一步
19
+ * (并行分支的输出不按宣告顺序到达,按位置归会挂错卡);旧记录没有 id 才归到上一步。 */
20
+ export declare function groupWorkflowEntries(entries: readonly WorkflowRunEntry[]): {
21
+ prelude: string[];
22
+ groups: StepGroup[];
23
+ };
7
24
  /**
8
- * 「工作流运行」块:一次 workflow:run 的执行呈现——每个步骤一张卡顺序铺开
9
- * (agent 步骤=完整子智能体卡,命令/条件步骤=描述+输出的小卡),头部可整体折叠。
10
- * 渲染在触发它的回合内部(思考折叠区之后、总结之前),随回合持久。
25
+ * 「固定流程」块:一次 workflow:run(跑某个技能的 flows/*.yaml)的执行呈现——每个步骤
26
+ * 一张卡顺序铺开(agent 步骤=完整子智能体卡,命令/条件步骤=描述+输出的小卡),头部可整体折叠。
27
+ * 渲染在触发它的回合的「执行过程」折叠区里,和普通技能的工具调用同一个位置。
11
28
  */
12
29
  export declare function WorkflowRunBlock({ toolCall, sessionId }: Props): import("react/jsx-runtime").JSX.Element;
13
30
  export {};
@@ -7,8 +7,8 @@ export interface TextShimmerProps {
7
7
  spread?: number;
8
8
  }
9
9
  /**
10
- * 流式等待时的扫光文字。动画是纯 CSS(`blade-shimmer-sweep`,定义在 chat.css),
11
- * 不引入动画库。
10
+ * 参考 DeepSeek Harness TextShimmer:15° 斜切流光扫掠(105deg),
11
+ * 直接使用语义 HSL 变量,确保浅色/深色主题与独立 SDK 宿主均清晰可见。
12
12
  */
13
13
  declare const ShimmerComponent: ({ children, as: Component, className, duration, spread, }: TextShimmerProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export declare const Shimmer: import("react").MemoExoticComponent<typeof ShimmerComponent>;
@@ -0,0 +1,21 @@
1
+ import { type RefObject } from "react";
2
+ export declare const CHAT_COLUMN_WIDTH_STORAGE_KEY = "blade-ui:chat-column-width";
3
+ export declare const DEFAULT_CHAT_COLUMN_WIDTH = 780;
4
+ export declare const MIN_CHAT_COLUMN_WIDTH = 640;
5
+ export declare const MAX_CHAT_COLUMN_WIDTH = 1200;
6
+ export declare function clampChatColumnWidth(width: number, containerWidth?: number | null): number;
7
+ export declare function getChatColumnWidth(): number;
8
+ export declare function setChatColumnWidth(nextWidth: number, containerWidth?: number | null): number;
9
+ export declare function resetChatColumnWidth(): number;
10
+ export declare function useChatColumnWidth(enabled?: boolean): {
11
+ width: number;
12
+ setWidth: (next: number, containerWidth?: number | null) => number;
13
+ resetWidth: () => number;
14
+ };
15
+ export declare function ChatColumnResizeRails({ containerRef, effectiveWidth, onWidthChange, onReset, }: {
16
+ containerRef: RefObject<HTMLElement | null>;
17
+ effectiveWidth: number;
18
+ onWidthChange: (nextWidth: number, containerWidth: number | null) => void;
19
+ onReset: () => void;
20
+ }): import("react/jsx-runtime").JSX.Element;
21
+ export declare function useObservedContainerWidth(ref: RefObject<HTMLElement | null>, enabled?: boolean): number | null;
@@ -30,7 +30,7 @@ export type ChatViewClassNames = Partial<{
30
30
  skillStatusBarInner: string;
31
31
  }>;
32
32
  /** 输入框提交时的附加项(模型、推理档位、知识库等由富输入给出)。 */
33
- export interface ChatSendOptions extends Pick<ChatSendExtras, "thinkingOverride" | "reasoningLevel" | "refs" | "topicAssetRefs" | "queueWhenRunning"> {
33
+ export interface ChatSendOptions extends Pick<ChatSendExtras, "thinkingOverride" | "reasoningLevel" | "refs" | "contextAttachments" | "topicAssetRefs" | "queueWhenRunning"> {
34
34
  /** 附件实际上传到的会话(首页新建会话时由输入框给出)。 */
35
35
  targetSessionId?: string;
36
36
  /** 本条消息用的模型;null 表示沿用会话已保存的模型。 */
@@ -9,7 +9,9 @@ export type { ChatPanelProps } from "./ChatPanel";
9
9
  export { CompactionCard } from "./CompactionCard";
10
10
  export { ConnectionBanner } from "./ConnectionBanner";
11
11
  export { CurrentPlanPanelContent, CurrentPlanPanel } from "./CurrentPlanPanel";
12
- export { collectDeliveredFiles, DeliveryCard, FileDeliveryCards } from "./FileDeliveryCards";
12
+ export { collectDeliveredFiles, normalizeDeliveredRelPath, DeliveryCard, FileDeliveryCards } from "./FileDeliveryCards";
13
+ export type { DeliveredFileChangeKind, DeliveredFileEntry } from "./FileDeliveryCards";
14
+ export { CHAT_COLUMN_WIDTH_STORAGE_KEY, DEFAULT_CHAT_COLUMN_WIDTH, MIN_CHAT_COLUMN_WIDTH, MAX_CHAT_COLUMN_WIDTH, clampChatColumnWidth, getChatColumnWidth, setChatColumnWidth, resetChatColumnWidth, useChatColumnWidth, useObservedContainerWidth, ChatColumnResizeRails, } from "./chat-column-width";
13
15
  export { FinalArtifactCards } from "./FinalArtifactCards";
14
16
  export { ImageLightbox } from "./ImageLightbox";
15
17
  export { LightComposer } from "./LightComposer";
@@ -27,7 +29,8 @@ export { TextAttachmentPills } from "./TextAttachmentPills";
27
29
  export { getFilePreviewName, ToolFilePreviewAction, ToolPreviewAction, resolveAskQuestionState, ToolCallBlock } from "./ToolCallBlock";
28
30
  export { ToolUiCard } from "./ToolUiCard";
29
31
  export { TurnNavRail } from "./TurnNavRail";
30
- export type { TurnNavItem } from "./TurnNavRail";
32
+ export { turnLocateChannel, useTurnLocateRequest, useTurnLocateStatus } from "./turn-locate-channel";
33
+ export type { TurnLocateRequest, TurnLocateStatus } from "./turn-locate-channel";
31
34
  export { isUserMessage, isErrorMessage, USER_MESSAGE_MARKDOWN_CLASS, UserMessageBubble, ErrorMessageBlock } from "./UserMessageBubble";
32
35
  export type { UserChatMessage, ErrorChatMessage } from "./UserMessageBubble";
33
36
  export { WorkflowRunBlock } from "./WorkflowRunBlock";
@@ -91,7 +94,7 @@ export { getRenderer } from "./tool-renderers/registry";
91
94
  export { getResultText, getResultImages, parseJsonValue, isPlainObject, getStringValue, getNumberValue, getBooleanValue, extractErrorMessage, getFileName, getCodeLanguage, formatBytes, CodePreview } from "./tool-renderers/shared";
92
95
  export { shouldFollowWritePreview, scrollWritePreviewToLatest } from "./tool-renderers/write-preview-scroll";
93
96
  export { skillDisplayName } from "./lib/skill-name";
94
- export { type ConnectorComputerSectionProps, type InputConnection, type InputDataState, type InputModelCatalog, type InputModelOption, type InputModelPreferences, type InputSessionSkill, type InputSkillStats, type RichInputServices, parseModelReasoningLevels, RichInputServicesProvider, useRichInputServices, } from "./runtime/input-services";
97
+ export { type ConnectorComputerSectionProps, type ConnectorPhoneSectionProps, type InputConnection, type InputDataState, type InputModelCatalog, type InputModelOption, type InputModelPreferences, type InputSessionSkill, type InputSkillStats, type RichInputServices, parseModelReasoningLevels, RichInputServicesProvider, useRichInputServices, } from "./runtime/input-services";
95
98
  export { backgroundTaskDismissals, useDismissedBackgroundTasks } from "./runtime/background-task-dismissals";
96
99
  export { visibleSkillIds, visibleSkills } from "./lib/skill-visibility";
97
100
  export { resetInputCaches } from "./runtime/input-cache-reset";
@@ -1,6 +1,6 @@
1
- import type { ComponentPropsWithRef } from "react";
1
+ import { type ComponentPropsWithRef } from "react";
2
2
  type AnchorProps = ComponentPropsWithRef<"a">;
3
- /** 链接一律新窗口打开并断开 opener,SDK 不接管站内跳转。
3
+ /** 连接器登录入口使用浮层,其余链接新窗口打开并断开 opener。
4
4
  * 页内锚点(脚注引用/回链这类 `href="#fn-note"`)不能套"新窗口打开"这套
5
5
  * 逻辑——新开一个标签页访问 `#片段` 只是把整篇文档重新打开一次,不是
6
6
  * 滚动到页内位置,会破坏脚注的跳转体验。只有真正的外部链接才需要新窗口
@@ -78,7 +78,6 @@ export declare function selectActiveTurnAtViewportPosition({ visibleTurns, conta
78
78
  containerBottom: number;
79
79
  fallbackTurnId: string | null;
80
80
  currentTurnId?: string | null;
81
- /** 滚动容器已到底。 */
82
81
  atBottom?: boolean;
83
82
  }): string | null;
84
83
  /** 测试双通道最终渲染计划时忽略仅影响布局的 wrapper。 */
@@ -1,4 +1,4 @@
1
- import type { AgentSession, MessageContent, SendOptions, SessionState } from "@blade-hq/agent-client/internal";
1
+ import { type AgentSession, type InputKind, type MessageContent, type SendOptions, type SessionState } from "@blade-hq/agent-client/internal";
2
2
  /**
3
3
  * 等待回答时直接在输入框里打字:把这段文字当作最近一个子回路 AskUserQuestion 的自由作答,
4
4
  * 服务端据此恢复运行,而不是另起一轮。
@@ -9,15 +9,19 @@ export interface ChatSendExtras {
9
9
  model?: string;
10
10
  thinkingOverride?: boolean;
11
11
  reasoningLevel?: string;
12
+ contextAttachments?: SendOptions["contextAttachments"];
12
13
  refs?: SendOptions["refs"];
13
14
  topicAssetRefs?: SendOptions["topicAssetRefs"];
14
15
  whatif?: SendOptions["whatif"];
15
16
  replayDecision?: SendOptions["replayDecision"];
16
17
  /**
17
- * 声明「会话在跑就把这条消息放进等待队列」。只有渲染了队列面板、能展示等待消息的宿主才该传:
18
- * 没有面板时排队等于消息凭空消失。
18
+ * 默认发送引导消息;显式为 true 时,等待当前运行结束后处理。
19
19
  */
20
20
  queueWhenRunning?: boolean;
21
+ releaseNativeWait?: boolean;
22
+ inputKind?: InputKind;
23
+ receivedAt?: string;
24
+ timeZone?: string;
21
25
  }
22
26
  /** 向会话发送一条消息。返回服务端是否接受(或已改道进等待队列)。 */
23
27
  export declare function sendToSession(session: AgentSession, message: MessageContent, mode?: string, askUserAnswer?: Record<string, unknown>, extras?: ChatSendExtras): Promise<boolean>;
@@ -3,7 +3,6 @@ export declare const backgroundTaskDismissals: {
3
3
  getState: () => Dismissed;
4
4
  subscribe(listener: () => void): () => void;
5
5
  dismiss(sessionId: string, taskId: string): void;
6
- /** 换身份:清空。 */
7
6
  reset(): void;
8
7
  };
9
8
  export declare function useDismissedBackgroundTasks(sessionId: string): string[];
@@ -38,11 +38,8 @@ export declare const composerChannels: {
38
38
  clearSendRequests(sessionId: string): void;
39
39
  setModelDraft(sessionId: string, model: string): void;
40
40
  clearModelDraft(sessionId: string): void;
41
- /** 回退到某一步后,把那一步的用户原话放回输入框(null 清除)。 */
42
41
  setRewindDraft(sessionId: string, text: string | null): void;
43
- /** 会话被关闭 / 删除:清掉它还没被取走的信号。 */
44
42
  clearSession(sessionId: string): void;
45
- /** 换身份:清空全部通道。 */
46
43
  reset(): void;
47
44
  };
48
45
  export type ComposerChannels = typeof composerChannels;
@@ -63,6 +63,8 @@ export interface DeveloperMessageListProps {
63
63
  export interface ChatEnvironment {
64
64
  /** 当前渲染模式;不注入时是普通模式。 */
65
65
  renderMode?: ChatRenderMode;
66
+ /** 是否在技能列表与 `/` 搜索中显示系统内置技能(与会话是否切到轨迹视图解耦)。 */
67
+ includeBuiltinSkills?: boolean;
66
68
  /** 开发者视图;不注入时开发者模式按普通模式显示。 */
67
69
  DeveloperMessageList?: ComponentType<DeveloperMessageListProps>;
68
70
  /** 默认输入框(内置 Web 注入富输入);不注入时用轻输入。 */
@@ -1,8 +1,3 @@
1
- /**
2
- * 换身份(登出、换账号、换后端)时清掉富输入按 client 缓存的数据(技能菜单、模型目录等),
3
- * 新身份不会看到上一个身份的清单。富输入的缓存在这里登记清理函数;宿主在身份变化时调用
4
- * `resetInputCaches`。放在 internal 入口,宿主调用它不必引入富输入。
5
- */
6
1
  import type { BladeClient } from "@blade-hq/agent-client";
7
2
  export declare function onInputCachesReset(client: BladeClient, reset: () => void): () => void;
8
3
  export declare function resetInputCaches(client: BladeClient): void;
@@ -64,6 +64,14 @@ export interface InputDataState<T> {
64
64
  error: unknown;
65
65
  }
66
66
  export interface ConnectorComputerSectionProps {
67
+ sessionId: string | null;
68
+ query: string;
69
+ excludedSelection?: string[];
70
+ onExcludedSelectionChange?: (ids: string[]) => void;
71
+ /** 收起连接器面板(打开设置之类的动作前调用)。 */
72
+ closePanel: () => void;
73
+ }
74
+ export interface ConnectorPhoneSectionProps {
67
75
  sessionId: string | null;
68
76
  query: string;
69
77
  pendingSelection?: string[];
@@ -92,6 +100,8 @@ export interface RichInputServices {
92
100
  };
93
101
  /** 连接器面板里的「电脑」分区;不提供时不显示。 */
94
102
  ConnectorComputerSection?: ComponentType<ConnectorComputerSectionProps>;
103
+ /** 连接器面板里的「手机」分区,渲染在「电脑」下面;不提供时不显示。 */
104
+ ConnectorPhoneSection?: ComponentType<ConnectorPhoneSectionProps>;
95
105
  /** 连接器面板里的「外部账号」分区;不提供时不显示。 */
96
106
  ConnectorAccountsSection?: ComponentType<{
97
107
  query: string;
@@ -1,8 +1,3 @@
1
- /**
2
- * 聊天组件读会话状态的来源。组件只认 `AgentSession`,不关心实例由谁持有:
3
- * 内置 Web 用自己的会话登记表(含静态会话、保留区),SDK 的 ChatView / `<blade-chat>` / 插件
4
- * 用 `useAgentSession` 持有的那一个实例(`createSingleSessionSource`)。
5
- */
6
1
  import { type AgentSession, type SessionState } from "@blade-hq/agent-client/internal";
7
2
  import { type ReactNode } from "react";
8
3
  export interface SessionSource {
@@ -1,8 +1,4 @@
1
- /**
2
- * 聊天面板的动作与交互态:发送(等待回答时自动当作作答)、停止(带「停止中」)、等待消息队列命令
3
- * (冲突提示与进行中的条目)。全部直接作用在会话实例上。
4
- */
5
- import type { MessageContent } from "@blade-hq/agent-client/internal";
1
+ import { type MessageContent } from "@blade-hq/agent-client/internal";
6
2
  import { type ChatSendExtras } from "./actions";
7
3
  export declare function useChatActions(sessionId: string): {
8
4
  isStopping: boolean;