@blade-hq/agent-react 2612.0.0-beta.1 → 2612.0.0-beta.10

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 (1161) hide show
  1. package/README.md +18 -0
  2. package/dist/chat/ChatPanel.d.ts +1 -3
  3. package/dist/chat/LightComposer.d.ts +1 -1
  4. package/dist/chat/LiteMessageList.d.ts +1 -1
  5. package/dist/chat/MessageList.d.ts +1 -0
  6. package/dist/chat/WorkflowRunBlock.d.ts +19 -3
  7. package/dist/chat/ai-elements/reasoning.d.ts +4 -4
  8. package/dist/chat/customization.d.ts +1 -5
  9. package/dist/chat/index.d.ts +1 -4
  10. package/dist/chat/lib/citations.d.ts +5 -22
  11. package/dist/chat/markdown/MarkdownContent.d.ts +3 -0
  12. package/dist/chat/runtime/actions.d.ts +2 -1
  13. package/dist/chat/runtime/composer-channels.d.ts +4 -0
  14. package/dist/chat/runtime/input-cache-reset.d.ts +1 -1
  15. package/dist/chat/runtime/input-history-storage.d.ts +2 -0
  16. package/dist/chat/runtime/input-services.d.ts +0 -6
  17. package/dist/{chunk-FQQJP2GJ.js → chunk-7TQVTNPL.js} +780 -819
  18. package/dist/chunk-7TQVTNPL.js.map +1 -0
  19. package/dist/{chunk-WCMGQJLE.js → chunk-EYRP6PV3.js} +2 -2
  20. package/dist/{chunk-6ZDOQEWK.js → chunk-JVM2WTTS.js} +898 -638
  21. package/dist/chunk-JVM2WTTS.js.map +1 -0
  22. package/dist/components/ChatInput.d.ts +3 -1
  23. package/dist/components/TopicAssetSubmitDialog.d.ts +14 -0
  24. package/dist/components/plugin-connector.d.ts +1 -0
  25. package/dist/embed/entry.d.ts +2 -0
  26. package/dist/host.d.ts +0 -4
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.js +8 -4
  29. package/dist/internal.d.ts +3 -0
  30. package/dist/internal.js +9 -3
  31. package/dist/internal.js.map +1 -1
  32. package/dist/lib/agent-computer-command.d.ts +1 -3
  33. package/dist/rich-input/ChatInput.d.ts +1 -1
  34. package/dist/rich-input/FileCompletionMenu.d.ts +6 -9
  35. package/dist/rich-input/SkillStatusBar.d.ts +2 -4
  36. package/dist/rich-input/extensions/plugin-mention.d.ts +15 -0
  37. package/dist/rich-input/extensions/skill-mention.d.ts +3 -21
  38. package/dist/rich-input/extensions/topic-asset-mention.d.ts +13 -0
  39. package/dist/rich-input/index.d.ts +6 -3
  40. package/dist/rich-input/lib/composer-content.d.ts +11 -21
  41. package/dist/rich-input/lib/input-history-document.d.ts +3 -0
  42. package/dist/rich-input/lib/plugin-suggestions.d.ts +7 -0
  43. package/dist/rich-input/lib/reference-candidates.d.ts +27 -0
  44. package/dist/rich-input/lib/skill-suggestions.d.ts +1 -1
  45. package/dist/rich-input/lib/topic-asset-suggestions.d.ts +6 -0
  46. package/dist/rich-input/services.d.ts +2 -3
  47. package/dist/rich-input/use-input-history.d.ts +8 -8
  48. package/dist/rich-input/use-reference-candidates.d.ts +8 -0
  49. package/dist/rich-input.js +6409 -6351
  50. package/dist/rich-input.js.map +1 -1
  51. package/dist/style.full.css +1 -1
  52. package/node_modules/@floating-ui/core/LICENSE +20 -0
  53. package/node_modules/@floating-ui/core/README.md +4 -0
  54. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
  55. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1184 -0
  56. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +531 -0
  57. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +531 -0
  58. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1058 -0
  59. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1058 -0
  60. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1203 -0
  61. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
  62. package/node_modules/@floating-ui/core/package.json +63 -0
  63. package/node_modules/@floating-ui/dom/LICENSE +20 -0
  64. package/node_modules/@floating-ui/dom/README.md +4 -0
  65. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
  66. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +956 -0
  67. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +358 -0
  68. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +358 -0
  69. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +781 -0
  70. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +781 -0
  71. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +975 -0
  72. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
  73. package/node_modules/@floating-ui/dom/package.json +71 -0
  74. package/node_modules/@floating-ui/utils/LICENSE +20 -0
  75. package/node_modules/@floating-ui/utils/README.md +4 -0
  76. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
  77. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +103 -0
  78. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
  79. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
  80. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +165 -0
  81. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
  82. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +192 -0
  83. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
  84. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +136 -0
  85. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
  86. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +167 -0
  87. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
  88. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
  89. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +165 -0
  90. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +192 -0
  91. package/node_modules/@floating-ui/utils/dom/package.json +6 -0
  92. package/node_modules/@floating-ui/utils/package.json +70 -0
  93. package/node_modules/@radix-ui/primitive/LICENSE +21 -0
  94. package/node_modules/@radix-ui/primitive/README.md +3 -0
  95. package/node_modules/@radix-ui/primitive/dist/index.d.mts +20 -0
  96. package/node_modules/@radix-ui/primitive/dist/index.d.ts +20 -0
  97. package/node_modules/@radix-ui/primitive/dist/index.js +76 -0
  98. package/node_modules/@radix-ui/primitive/dist/index.js.map +7 -0
  99. package/node_modules/@radix-ui/primitive/dist/index.mjs +53 -0
  100. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -0
  101. package/node_modules/@radix-ui/primitive/package.json +47 -0
  102. package/node_modules/@radix-ui/react-collapsible/LICENSE +21 -0
  103. package/node_modules/@radix-ui/react-collapsible/README.md +3 -0
  104. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +33 -0
  105. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +33 -0
  106. package/node_modules/@radix-ui/react-collapsible/dist/index.js +187 -0
  107. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +7 -0
  108. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +155 -0
  109. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +7 -0
  110. package/node_modules/@radix-ui/react-collapsible/package.json +75 -0
  111. package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
  112. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +15 -0
  113. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +15 -0
  114. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +74 -0
  115. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -0
  116. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +41 -0
  117. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -0
  118. package/node_modules/@radix-ui/react-compose-refs/package.json +75 -0
  119. package/node_modules/@radix-ui/react-context/README.md +13 -0
  120. package/node_modules/@radix-ui/react-context/dist/index.d.mts +21 -0
  121. package/node_modules/@radix-ui/react-context/dist/index.d.ts +21 -0
  122. package/node_modules/@radix-ui/react-context/dist/index.js +114 -0
  123. package/node_modules/@radix-ui/react-context/dist/index.js.map +7 -0
  124. package/node_modules/@radix-ui/react-context/dist/index.mjs +81 -0
  125. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -0
  126. package/node_modules/@radix-ui/react-context/package.json +75 -0
  127. package/node_modules/@radix-ui/react-id/README.md +13 -0
  128. package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
  129. package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
  130. package/node_modules/@radix-ui/react-id/dist/index.js +49 -0
  131. package/node_modules/@radix-ui/react-id/dist/index.js.map +7 -0
  132. package/node_modules/@radix-ui/react-id/dist/index.mjs +16 -0
  133. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +7 -0
  134. package/node_modules/@radix-ui/react-id/package.json +78 -0
  135. package/node_modules/@radix-ui/react-presence/LICENSE +21 -0
  136. package/node_modules/@radix-ui/react-presence/README.md +3 -0
  137. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +12 -0
  138. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +12 -0
  139. package/node_modules/@radix-ui/react-presence/dist/index.js +171 -0
  140. package/node_modules/@radix-ui/react-presence/dist/index.js.map +7 -0
  141. package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
  142. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +7 -0
  143. package/node_modules/@radix-ui/react-presence/package.json +69 -0
  144. package/node_modules/@radix-ui/react-primitive/LICENSE +21 -0
  145. package/node_modules/@radix-ui/react-primitive/README.md +3 -0
  146. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +52 -0
  147. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +52 -0
  148. package/node_modules/@radix-ui/react-primitive/dist/index.js +80 -0
  149. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +7 -0
  150. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +47 -0
  151. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +7 -0
  152. package/node_modules/@radix-ui/react-primitive/package.json +68 -0
  153. package/node_modules/@radix-ui/react-slot/LICENSE +21 -0
  154. package/node_modules/@radix-ui/react-slot/README.md +3 -0
  155. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +17 -0
  156. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +17 -0
  157. package/node_modules/@radix-ui/react-slot/dist/index.js +138 -0
  158. package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -0
  159. package/node_modules/@radix-ui/react-slot/dist/index.mjs +105 -0
  160. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -0
  161. package/node_modules/@radix-ui/react-slot/package.json +63 -0
  162. package/node_modules/@radix-ui/react-use-controllable-state/LICENSE +21 -0
  163. package/node_modules/@radix-ui/react-use-controllable-state/README.md +3 -0
  164. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +40 -0
  165. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +40 -0
  166. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +169 -0
  167. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +7 -0
  168. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +136 -0
  169. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +7 -0
  170. package/node_modules/@radix-ui/react-use-controllable-state/package.json +64 -0
  171. package/node_modules/@radix-ui/react-use-effect-event/LICENSE +21 -0
  172. package/node_modules/@radix-ui/react-use-effect-event/README.md +5 -0
  173. package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts +8 -0
  174. package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts +8 -0
  175. package/node_modules/@radix-ui/react-use-effect-event/dist/index.js +60 -0
  176. package/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map +7 -0
  177. package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs +27 -0
  178. package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map +7 -0
  179. package/node_modules/@radix-ui/react-use-effect-event/package.json +65 -0
  180. package/node_modules/@radix-ui/react-use-effect-event/src/index.ts +1 -0
  181. package/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx +36 -0
  182. package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
  183. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +12 -0
  184. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +12 -0
  185. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +41 -0
  186. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +7 -0
  187. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +8 -0
  188. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +7 -0
  189. package/node_modules/@radix-ui/react-use-layout-effect/package.json +75 -0
  190. package/node_modules/@remirror/core-constants/LICENSE +21 -0
  191. package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.cts +612 -0
  192. package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.ts +612 -0
  193. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.cjs +314 -0
  194. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.cts +20 -0
  195. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.ts +20 -0
  196. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.js +269 -0
  197. package/node_modules/@remirror/core-constants/dist-types/core-constants.d.ts +431 -0
  198. package/node_modules/@remirror/core-constants/dist-types/error-constants.d.ts +119 -0
  199. package/node_modules/@remirror/core-constants/dist-types/index.d.ts +2 -0
  200. package/node_modules/@remirror/core-constants/dist-types/tsconfig.tsbuildinfo +1 -0
  201. package/node_modules/@remirror/core-constants/package.json +45 -0
  202. package/node_modules/@remirror/core-constants/readme.md +17 -0
  203. package/node_modules/@tiptap/core/LICENSE.md +21 -0
  204. package/node_modules/@tiptap/core/README.md +18 -0
  205. package/node_modules/@tiptap/core/dist/index.cjs +7126 -0
  206. package/node_modules/@tiptap/core/dist/index.cjs.map +1 -0
  207. package/node_modules/@tiptap/core/dist/index.d.cts +4954 -0
  208. package/node_modules/@tiptap/core/dist/index.d.ts +4954 -0
  209. package/node_modules/@tiptap/core/dist/index.js +6992 -0
  210. package/node_modules/@tiptap/core/dist/index.js.map +1 -0
  211. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +56 -0
  212. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +1 -0
  213. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +23 -0
  214. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +23 -0
  215. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +26 -0
  216. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
  217. package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +1 -0
  218. package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +1 -0
  219. package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +1 -0
  220. package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +1 -0
  221. package/node_modules/@tiptap/core/jsx-runtime/index.cjs +1 -0
  222. package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +1 -0
  223. package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +1 -0
  224. package/node_modules/@tiptap/core/jsx-runtime/index.js +1 -0
  225. package/node_modules/@tiptap/core/package.json +70 -0
  226. package/node_modules/@tiptap/core/src/CommandManager.ts +138 -0
  227. package/node_modules/@tiptap/core/src/Editor.ts +806 -0
  228. package/node_modules/@tiptap/core/src/EventEmitter.ts +58 -0
  229. package/node_modules/@tiptap/core/src/Extendable.ts +602 -0
  230. package/node_modules/@tiptap/core/src/Extension.ts +55 -0
  231. package/node_modules/@tiptap/core/src/ExtensionManager.ts +440 -0
  232. package/node_modules/@tiptap/core/src/InputRule.ts +290 -0
  233. package/node_modules/@tiptap/core/src/Mark.ts +211 -0
  234. package/node_modules/@tiptap/core/src/MarkView.ts +122 -0
  235. package/node_modules/@tiptap/core/src/Node.ts +377 -0
  236. package/node_modules/@tiptap/core/src/NodePos.ts +257 -0
  237. package/node_modules/@tiptap/core/src/NodeView.ts +339 -0
  238. package/node_modules/@tiptap/core/src/PasteRule.ts +373 -0
  239. package/node_modules/@tiptap/core/src/Tracker.ts +36 -0
  240. package/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts +575 -0
  241. package/node_modules/@tiptap/core/src/commands/blur.ts +29 -0
  242. package/node_modules/@tiptap/core/src/commands/clearContent.ts +25 -0
  243. package/node_modules/@tiptap/core/src/commands/clearNodes.ts +57 -0
  244. package/node_modules/@tiptap/core/src/commands/command.ts +22 -0
  245. package/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +21 -0
  246. package/node_modules/@tiptap/core/src/commands/cut.ts +36 -0
  247. package/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +44 -0
  248. package/node_modules/@tiptap/core/src/commands/deleteNode.ts +41 -0
  249. package/node_modules/@tiptap/core/src/commands/deleteRange.ts +26 -0
  250. package/node_modules/@tiptap/core/src/commands/deleteSelection.ts +21 -0
  251. package/node_modules/@tiptap/core/src/commands/enter.ts +19 -0
  252. package/node_modules/@tiptap/core/src/commands/exitCode.ts +21 -0
  253. package/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +51 -0
  254. package/node_modules/@tiptap/core/src/commands/first.ts +26 -0
  255. package/node_modules/@tiptap/core/src/commands/focus.ts +108 -0
  256. package/node_modules/@tiptap/core/src/commands/forEach.ts +24 -0
  257. package/node_modules/@tiptap/core/src/commands/index.ts +57 -0
  258. package/node_modules/@tiptap/core/src/commands/insertContent.ts +46 -0
  259. package/node_modules/@tiptap/core/src/commands/insertContentAt.ts +212 -0
  260. package/node_modules/@tiptap/core/src/commands/join.ts +69 -0
  261. package/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +37 -0
  262. package/node_modules/@tiptap/core/src/commands/joinItemForward.ts +37 -0
  263. package/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +20 -0
  264. package/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +20 -0
  265. package/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +100 -0
  266. package/node_modules/@tiptap/core/src/commands/lift.ts +34 -0
  267. package/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +21 -0
  268. package/node_modules/@tiptap/core/src/commands/liftListItem.ts +26 -0
  269. package/node_modules/@tiptap/core/src/commands/newlineInCode.ts +21 -0
  270. package/node_modules/@tiptap/core/src/commands/resetAttributes.ts +73 -0
  271. package/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +23 -0
  272. package/node_modules/@tiptap/core/src/commands/selectAll.ts +27 -0
  273. package/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +21 -0
  274. package/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +21 -0
  275. package/node_modules/@tiptap/core/src/commands/selectParentNode.ts +21 -0
  276. package/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +23 -0
  277. package/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +23 -0
  278. package/node_modules/@tiptap/core/src/commands/setContent.ts +76 -0
  279. package/node_modules/@tiptap/core/src/commands/setMark.ts +118 -0
  280. package/node_modules/@tiptap/core/src/commands/setMeta.ts +25 -0
  281. package/node_modules/@tiptap/core/src/commands/setNode.ts +57 -0
  282. package/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +31 -0
  283. package/node_modules/@tiptap/core/src/commands/setTextDirection.ts +51 -0
  284. package/node_modules/@tiptap/core/src/commands/setTextSelection.ts +35 -0
  285. package/node_modules/@tiptap/core/src/commands/sinkListItem.ts +26 -0
  286. package/node_modules/@tiptap/core/src/commands/splitBlock.ts +115 -0
  287. package/node_modules/@tiptap/core/src/commands/splitListItem.ts +149 -0
  288. package/node_modules/@tiptap/core/src/commands/toggleList.ts +159 -0
  289. package/node_modules/@tiptap/core/src/commands/toggleMark.ts +51 -0
  290. package/node_modules/@tiptap/core/src/commands/toggleNode.ts +47 -0
  291. package/node_modules/@tiptap/core/src/commands/toggleWrap.ts +32 -0
  292. package/node_modules/@tiptap/core/src/commands/undoInputRule.ts +49 -0
  293. package/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +32 -0
  294. package/node_modules/@tiptap/core/src/commands/unsetMark.ts +65 -0
  295. package/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +51 -0
  296. package/node_modules/@tiptap/core/src/commands/updateAttributes.ts +150 -0
  297. package/node_modules/@tiptap/core/src/commands/wrapIn.ts +27 -0
  298. package/node_modules/@tiptap/core/src/commands/wrapInList.ts +27 -0
  299. package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +44 -0
  300. package/node_modules/@tiptap/core/src/extensions/commands.ts +14 -0
  301. package/node_modules/@tiptap/core/src/extensions/delete.ts +89 -0
  302. package/node_modules/@tiptap/core/src/extensions/drop.ts +26 -0
  303. package/node_modules/@tiptap/core/src/extensions/editable.ts +18 -0
  304. package/node_modules/@tiptap/core/src/extensions/focusEvents.ts +41 -0
  305. package/node_modules/@tiptap/core/src/extensions/index.ts +10 -0
  306. package/node_modules/@tiptap/core/src/extensions/keymap.ts +160 -0
  307. package/node_modules/@tiptap/core/src/extensions/paste.ts +25 -0
  308. package/node_modules/@tiptap/core/src/extensions/tabindex.ts +18 -0
  309. package/node_modules/@tiptap/core/src/extensions/textDirection.ts +86 -0
  310. package/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +66 -0
  311. package/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +21 -0
  312. package/node_modules/@tiptap/core/src/helpers/createChainableState.ts +39 -0
  313. package/node_modules/@tiptap/core/src/helpers/createDocument.ts +24 -0
  314. package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +119 -0
  315. package/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +18 -0
  316. package/node_modules/@tiptap/core/src/helpers/findChildren.ts +24 -0
  317. package/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +36 -0
  318. package/node_modules/@tiptap/core/src/helpers/findParentNode.ts +18 -0
  319. package/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +37 -0
  320. package/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +30 -0
  321. package/node_modules/@tiptap/core/src/helpers/generateHTML.ts +18 -0
  322. package/node_modules/@tiptap/core/src/helpers/generateJSON.ts +18 -0
  323. package/node_modules/@tiptap/core/src/helpers/generateText.ts +34 -0
  324. package/node_modules/@tiptap/core/src/helpers/getAttributes.ts +29 -0
  325. package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +122 -0
  326. package/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +85 -0
  327. package/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +54 -0
  328. package/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +32 -0
  329. package/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +13 -0
  330. package/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +30 -0
  331. package/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +90 -0
  332. package/node_modules/@tiptap/core/src/helpers/getMarkType.ts +13 -0
  333. package/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +44 -0
  334. package/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +29 -0
  335. package/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +22 -0
  336. package/node_modules/@tiptap/core/src/helpers/getNodeType.ts +13 -0
  337. package/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +23 -0
  338. package/node_modules/@tiptap/core/src/helpers/getSchema.ts +12 -0
  339. package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +183 -0
  340. package/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +11 -0
  341. package/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +19 -0
  342. package/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +28 -0
  343. package/node_modules/@tiptap/core/src/helpers/getText.ts +28 -0
  344. package/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +52 -0
  345. package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +29 -0
  346. package/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +16 -0
  347. package/node_modules/@tiptap/core/src/helpers/index.ts +55 -0
  348. package/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +47 -0
  349. package/node_modules/@tiptap/core/src/helpers/isActive.ts +23 -0
  350. package/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +29 -0
  351. package/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +11 -0
  352. package/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +13 -0
  353. package/node_modules/@tiptap/core/src/helpers/isList.ts +27 -0
  354. package/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +94 -0
  355. package/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +51 -0
  356. package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +62 -0
  357. package/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +5 -0
  358. package/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +5 -0
  359. package/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +35 -0
  360. package/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +25 -0
  361. package/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +31 -0
  362. package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +149 -0
  363. package/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +29 -0
  364. package/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +26 -0
  365. package/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +16 -0
  366. package/node_modules/@tiptap/core/src/index.ts +28 -0
  367. package/node_modules/@tiptap/core/src/inputRules/index.ts +5 -0
  368. package/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +68 -0
  369. package/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +73 -0
  370. package/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +35 -0
  371. package/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +35 -0
  372. package/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +82 -0
  373. package/node_modules/@tiptap/core/src/jsx-runtime.ts +65 -0
  374. package/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +1060 -0
  375. package/node_modules/@tiptap/core/src/lib/index.ts +1 -0
  376. package/node_modules/@tiptap/core/src/pasteRules/index.ts +3 -0
  377. package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +71 -0
  378. package/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +44 -0
  379. package/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +34 -0
  380. package/node_modules/@tiptap/core/src/style.ts +71 -0
  381. package/node_modules/@tiptap/core/src/types.ts +1058 -0
  382. package/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +21 -0
  383. package/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +30 -0
  384. package/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +21 -0
  385. package/node_modules/@tiptap/core/src/utilities/deleteProps.ts +16 -0
  386. package/node_modules/@tiptap/core/src/utilities/elementFromString.ts +27 -0
  387. package/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +4 -0
  388. package/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +8 -0
  389. package/node_modules/@tiptap/core/src/utilities/fromString.ts +19 -0
  390. package/node_modules/@tiptap/core/src/utilities/index.ts +26 -0
  391. package/node_modules/@tiptap/core/src/utilities/isAndroid.ts +3 -0
  392. package/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +3 -0
  393. package/node_modules/@tiptap/core/src/utilities/isFirefox.ts +11 -0
  394. package/node_modules/@tiptap/core/src/utilities/isFunction.ts +4 -0
  395. package/node_modules/@tiptap/core/src/utilities/isMacOS.ts +3 -0
  396. package/node_modules/@tiptap/core/src/utilities/isNumber.ts +3 -0
  397. package/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +13 -0
  398. package/node_modules/@tiptap/core/src/utilities/isRegExp.ts +3 -0
  399. package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
  400. package/node_modules/@tiptap/core/src/utilities/isString.ts +3 -0
  401. package/node_modules/@tiptap/core/src/utilities/isiOS.ts +7 -0
  402. package/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts +130 -0
  403. package/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +141 -0
  404. package/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +225 -0
  405. package/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +282 -0
  406. package/node_modules/@tiptap/core/src/utilities/markdown/index.ts +13 -0
  407. package/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +194 -0
  408. package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +96 -0
  409. package/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +109 -0
  410. package/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +17 -0
  411. package/node_modules/@tiptap/core/src/utilities/minMax.ts +3 -0
  412. package/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +30 -0
  413. package/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +13 -0
  414. package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +21 -0
  415. package/node_modules/@tiptap/extension-bubble-menu/README.md +18 -0
  416. package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +462 -0
  417. package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs.map +1 -0
  418. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +169 -0
  419. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +169 -0
  420. package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +443 -0
  421. package/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +1 -0
  422. package/node_modules/@tiptap/extension-bubble-menu/package.json +54 -0
  423. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.ts +650 -0
  424. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu.ts +50 -0
  425. package/node_modules/@tiptap/extension-bubble-menu/src/index.ts +6 -0
  426. package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +21 -0
  427. package/node_modules/@tiptap/extension-floating-menu/README.md +18 -0
  428. package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +380 -0
  429. package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs.map +1 -0
  430. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +179 -0
  431. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +179 -0
  432. package/node_modules/@tiptap/extension-floating-menu/dist/index.js +361 -0
  433. package/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +1 -0
  434. package/node_modules/@tiptap/extension-floating-menu/package.json +53 -0
  435. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.ts +525 -0
  436. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu.ts +77 -0
  437. package/node_modules/@tiptap/extension-floating-menu/src/index.ts +6 -0
  438. package/node_modules/@tiptap/extension-mention/LICENSE.md +21 -0
  439. package/node_modules/@tiptap/extension-mention/README.md +18 -0
  440. package/node_modules/@tiptap/extension-mention/dist/index.cjs +277 -0
  441. package/node_modules/@tiptap/extension-mention/dist/index.cjs.map +1 -0
  442. package/node_modules/@tiptap/extension-mention/dist/index.d.cts +93 -0
  443. package/node_modules/@tiptap/extension-mention/dist/index.d.ts +93 -0
  444. package/node_modules/@tiptap/extension-mention/dist/index.js +250 -0
  445. package/node_modules/@tiptap/extension-mention/dist/index.js.map +1 -0
  446. package/node_modules/@tiptap/extension-mention/package.json +52 -0
  447. package/node_modules/@tiptap/extension-mention/src/index.ts +5 -0
  448. package/node_modules/@tiptap/extension-mention/src/mention.ts +357 -0
  449. package/node_modules/@tiptap/extension-mention/src/utils/get-default-suggestion-attributes.ts +89 -0
  450. package/node_modules/@tiptap/pm/LICENSE.md +21 -0
  451. package/node_modules/@tiptap/pm/README.md +22 -0
  452. package/node_modules/@tiptap/pm/changeset/index.ts +1 -0
  453. package/node_modules/@tiptap/pm/collab/index.ts +1 -0
  454. package/node_modules/@tiptap/pm/commands/index.ts +1 -0
  455. package/node_modules/@tiptap/pm/dist/changeset/index.cjs +2 -0
  456. package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +18 -0
  457. package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +18 -0
  458. package/node_modules/@tiptap/pm/dist/changeset/index.js +2 -0
  459. package/node_modules/@tiptap/pm/dist/collab/index.cjs +2 -0
  460. package/node_modules/@tiptap/pm/dist/collab/index.d.cts +1 -0
  461. package/node_modules/@tiptap/pm/dist/collab/index.d.ts +1 -0
  462. package/node_modules/@tiptap/pm/dist/collab/index.js +2 -0
  463. package/node_modules/@tiptap/pm/dist/commands/index.cjs +2 -0
  464. package/node_modules/@tiptap/pm/dist/commands/index.d.cts +1 -0
  465. package/node_modules/@tiptap/pm/dist/commands/index.d.ts +1 -0
  466. package/node_modules/@tiptap/pm/dist/commands/index.js +2 -0
  467. package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +2 -0
  468. package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +1 -0
  469. package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +1 -0
  470. package/node_modules/@tiptap/pm/dist/dropcursor/index.js +2 -0
  471. package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +2 -0
  472. package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +1 -0
  473. package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +1 -0
  474. package/node_modules/@tiptap/pm/dist/gapcursor/index.js +2 -0
  475. package/node_modules/@tiptap/pm/dist/history/index.cjs +2 -0
  476. package/node_modules/@tiptap/pm/dist/history/index.d.cts +1 -0
  477. package/node_modules/@tiptap/pm/dist/history/index.d.ts +1 -0
  478. package/node_modules/@tiptap/pm/dist/history/index.js +2 -0
  479. package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +2 -0
  480. package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +1 -0
  481. package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +1 -0
  482. package/node_modules/@tiptap/pm/dist/inputrules/index.js +2 -0
  483. package/node_modules/@tiptap/pm/dist/keymap/index.cjs +2 -0
  484. package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +1 -0
  485. package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +1 -0
  486. package/node_modules/@tiptap/pm/dist/keymap/index.js +2 -0
  487. package/node_modules/@tiptap/pm/dist/markdown/index.cjs +2 -0
  488. package/node_modules/@tiptap/pm/dist/markdown/index.d.cts +1 -0
  489. package/node_modules/@tiptap/pm/dist/markdown/index.d.ts +1 -0
  490. package/node_modules/@tiptap/pm/dist/markdown/index.js +2 -0
  491. package/node_modules/@tiptap/pm/dist/menu/index.cjs +2 -0
  492. package/node_modules/@tiptap/pm/dist/menu/index.d.cts +1 -0
  493. package/node_modules/@tiptap/pm/dist/menu/index.d.ts +1 -0
  494. package/node_modules/@tiptap/pm/dist/menu/index.js +2 -0
  495. package/node_modules/@tiptap/pm/dist/model/index.cjs +2 -0
  496. package/node_modules/@tiptap/pm/dist/model/index.d.cts +1 -0
  497. package/node_modules/@tiptap/pm/dist/model/index.d.ts +1 -0
  498. package/node_modules/@tiptap/pm/dist/model/index.js +2 -0
  499. package/node_modules/@tiptap/pm/dist/schema-basic/index.cjs +2 -0
  500. package/node_modules/@tiptap/pm/dist/schema-basic/index.d.cts +1 -0
  501. package/node_modules/@tiptap/pm/dist/schema-basic/index.d.ts +1 -0
  502. package/node_modules/@tiptap/pm/dist/schema-basic/index.js +2 -0
  503. package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +2 -0
  504. package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +1 -0
  505. package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +1 -0
  506. package/node_modules/@tiptap/pm/dist/schema-list/index.js +2 -0
  507. package/node_modules/@tiptap/pm/dist/state/index.cjs +2 -0
  508. package/node_modules/@tiptap/pm/dist/state/index.d.cts +1 -0
  509. package/node_modules/@tiptap/pm/dist/state/index.d.ts +1 -0
  510. package/node_modules/@tiptap/pm/dist/state/index.js +2 -0
  511. package/node_modules/@tiptap/pm/dist/tables/index.cjs +2 -0
  512. package/node_modules/@tiptap/pm/dist/tables/index.d.cts +1 -0
  513. package/node_modules/@tiptap/pm/dist/tables/index.d.ts +1 -0
  514. package/node_modules/@tiptap/pm/dist/tables/index.js +2 -0
  515. package/node_modules/@tiptap/pm/dist/trailing-node/index.cjs +2 -0
  516. package/node_modules/@tiptap/pm/dist/trailing-node/index.d.cts +1 -0
  517. package/node_modules/@tiptap/pm/dist/trailing-node/index.d.ts +1 -0
  518. package/node_modules/@tiptap/pm/dist/trailing-node/index.js +2 -0
  519. package/node_modules/@tiptap/pm/dist/transform/index.cjs +2 -0
  520. package/node_modules/@tiptap/pm/dist/transform/index.d.cts +1 -0
  521. package/node_modules/@tiptap/pm/dist/transform/index.d.ts +1 -0
  522. package/node_modules/@tiptap/pm/dist/transform/index.js +2 -0
  523. package/node_modules/@tiptap/pm/dist/view/index.cjs +2 -0
  524. package/node_modules/@tiptap/pm/dist/view/index.d.cts +1 -0
  525. package/node_modules/@tiptap/pm/dist/view/index.d.ts +1 -0
  526. package/node_modules/@tiptap/pm/dist/view/index.js +2 -0
  527. package/node_modules/@tiptap/pm/dropcursor/index.ts +1 -0
  528. package/node_modules/@tiptap/pm/gapcursor/index.ts +1 -0
  529. package/node_modules/@tiptap/pm/history/index.ts +1 -0
  530. package/node_modules/@tiptap/pm/inputrules/index.ts +1 -0
  531. package/node_modules/@tiptap/pm/keymap/index.ts +1 -0
  532. package/node_modules/@tiptap/pm/markdown/index.ts +1 -0
  533. package/node_modules/@tiptap/pm/menu/index.ts +1 -0
  534. package/node_modules/@tiptap/pm/model/index.ts +1 -0
  535. package/node_modules/@tiptap/pm/package.json +211 -0
  536. package/node_modules/@tiptap/pm/schema-basic/index.ts +1 -0
  537. package/node_modules/@tiptap/pm/schema-list/index.ts +1 -0
  538. package/node_modules/@tiptap/pm/state/index.ts +1 -0
  539. package/node_modules/@tiptap/pm/tables/index.ts +1 -0
  540. package/node_modules/@tiptap/pm/trailing-node/index.ts +1 -0
  541. package/node_modules/@tiptap/pm/transform/index.ts +1 -0
  542. package/node_modules/@tiptap/pm/view/index.ts +1 -0
  543. package/node_modules/@tiptap/react/LICENSE.md +21 -0
  544. package/node_modules/@tiptap/react/README.md +18 -0
  545. package/node_modules/@tiptap/react/dist/index.cjs +1195 -0
  546. package/node_modules/@tiptap/react/dist/index.cjs.map +1 -0
  547. package/node_modules/@tiptap/react/dist/index.d.cts +534 -0
  548. package/node_modules/@tiptap/react/dist/index.d.ts +534 -0
  549. package/node_modules/@tiptap/react/dist/index.js +1131 -0
  550. package/node_modules/@tiptap/react/dist/index.js.map +1 -0
  551. package/node_modules/@tiptap/react/dist/menus/index.cjs +499 -0
  552. package/node_modules/@tiptap/react/dist/menus/index.cjs.map +1 -0
  553. package/node_modules/@tiptap/react/dist/menus/index.d.cts +19 -0
  554. package/node_modules/@tiptap/react/dist/menus/index.d.ts +19 -0
  555. package/node_modules/@tiptap/react/dist/menus/index.js +461 -0
  556. package/node_modules/@tiptap/react/dist/menus/index.js.map +1 -0
  557. package/node_modules/@tiptap/react/package.json +76 -0
  558. package/node_modules/@tiptap/react/src/Context.tsx +60 -0
  559. package/node_modules/@tiptap/react/src/Editor.ts +13 -0
  560. package/node_modules/@tiptap/react/src/EditorContent.tsx +229 -0
  561. package/node_modules/@tiptap/react/src/NodeViewContent.tsx +30 -0
  562. package/node_modules/@tiptap/react/src/NodeViewWrapper.tsx +27 -0
  563. package/node_modules/@tiptap/react/src/ReactMarkViewRenderer.tsx +106 -0
  564. package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.tsx +387 -0
  565. package/node_modules/@tiptap/react/src/ReactRenderer.tsx +282 -0
  566. package/node_modules/@tiptap/react/src/Tiptap.tsx +224 -0
  567. package/node_modules/@tiptap/react/src/index.ts +13 -0
  568. package/node_modules/@tiptap/react/src/menus/BubbleMenu.spec.ts +174 -0
  569. package/node_modules/@tiptap/react/src/menus/BubbleMenu.tsx +153 -0
  570. package/node_modules/@tiptap/react/src/menus/FloatingMenu.spec.ts +164 -0
  571. package/node_modules/@tiptap/react/src/menus/FloatingMenu.tsx +137 -0
  572. package/node_modules/@tiptap/react/src/menus/getAutoPluginKey.ts +5 -0
  573. package/node_modules/@tiptap/react/src/menus/index.ts +2 -0
  574. package/node_modules/@tiptap/react/src/menus/useMenuElementProps.ts +354 -0
  575. package/node_modules/@tiptap/react/src/types.ts +6 -0
  576. package/node_modules/@tiptap/react/src/useEditor.ts +382 -0
  577. package/node_modules/@tiptap/react/src/useEditorState.ts +173 -0
  578. package/node_modules/@tiptap/react/src/useReactNodeView.ts +28 -0
  579. package/node_modules/@tiptap/suggestion/LICENSE.md +21 -0
  580. package/node_modules/@tiptap/suggestion/README.md +18 -0
  581. package/node_modules/@tiptap/suggestion/dist/index.cjs +369 -0
  582. package/node_modules/@tiptap/suggestion/dist/index.cjs.map +1 -0
  583. package/node_modules/@tiptap/suggestion/dist/index.d.cts +213 -0
  584. package/node_modules/@tiptap/suggestion/dist/index.d.ts +213 -0
  585. package/node_modules/@tiptap/suggestion/dist/index.js +339 -0
  586. package/node_modules/@tiptap/suggestion/dist/index.js.map +1 -0
  587. package/node_modules/@tiptap/suggestion/package.json +50 -0
  588. package/node_modules/@tiptap/suggestion/src/__tests__/suggestion.test.ts +127 -0
  589. package/node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts +79 -0
  590. package/node_modules/@tiptap/suggestion/src/index.ts +8 -0
  591. package/node_modules/@tiptap/suggestion/src/suggestion.ts +585 -0
  592. package/node_modules/@types/linkify-it/LICENSE +21 -0
  593. package/node_modules/@types/linkify-it/README.md +15 -0
  594. package/node_modules/@types/linkify-it/build/index.cjs.d.ts +178 -0
  595. package/node_modules/@types/linkify-it/index.d.mts +174 -0
  596. package/node_modules/@types/linkify-it/index.d.ts +3 -0
  597. package/node_modules/@types/linkify-it/package.json +50 -0
  598. package/node_modules/@types/markdown-it/LICENSE +21 -0
  599. package/node_modules/@types/markdown-it/README.md +15 -0
  600. package/node_modules/@types/markdown-it/dist/index.cjs.d.ts +1236 -0
  601. package/node_modules/@types/markdown-it/dist/markdown-it.d.ts +5 -0
  602. package/node_modules/@types/markdown-it/dist/markdown-it.min.d.ts +5 -0
  603. package/node_modules/@types/markdown-it/index.d.mts +1 -0
  604. package/node_modules/@types/markdown-it/index.d.ts +3 -0
  605. package/node_modules/@types/markdown-it/lib/common/html_blocks.d.mts +7 -0
  606. package/node_modules/@types/markdown-it/lib/common/html_re.d.mts +2 -0
  607. package/node_modules/@types/markdown-it/lib/common/utils.d.mts +62 -0
  608. package/node_modules/@types/markdown-it/lib/helpers/index.d.mts +5 -0
  609. package/node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.mts +7 -0
  610. package/node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.mts +3 -0
  611. package/node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.mts +29 -0
  612. package/node_modules/@types/markdown-it/lib/index.d.mts +404 -0
  613. package/node_modules/@types/markdown-it/lib/parser_block.d.mts +25 -0
  614. package/node_modules/@types/markdown-it/lib/parser_core.d.mts +18 -0
  615. package/node_modules/@types/markdown-it/lib/parser_inline.d.mts +38 -0
  616. package/node_modules/@types/markdown-it/lib/renderer.d.mts +96 -0
  617. package/node_modules/@types/markdown-it/lib/ruler.d.mts +158 -0
  618. package/node_modules/@types/markdown-it/lib/rules_block/state_block.d.mts +124 -0
  619. package/node_modules/@types/markdown-it/lib/rules_core/state_core.d.mts +18 -0
  620. package/node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.mts +73 -0
  621. package/node_modules/@types/markdown-it/lib/token.d.mts +108 -0
  622. package/node_modules/@types/markdown-it/package.json +54 -0
  623. package/node_modules/@types/mdurl/LICENSE +21 -0
  624. package/node_modules/@types/mdurl/README.md +15 -0
  625. package/node_modules/@types/mdurl/build/index.cjs.d.ts +52 -0
  626. package/node_modules/@types/mdurl/index.d.mts +6 -0
  627. package/node_modules/@types/mdurl/index.d.ts +3 -0
  628. package/node_modules/@types/mdurl/lib/decode.d.mts +10 -0
  629. package/node_modules/@types/mdurl/lib/encode.d.mts +15 -0
  630. package/node_modules/@types/mdurl/lib/format.d.mts +3 -0
  631. package/node_modules/@types/mdurl/lib/parse.d.mts +18 -0
  632. package/node_modules/@types/mdurl/package.json +36 -0
  633. package/node_modules/@types/use-sync-external-store/LICENSE +21 -0
  634. package/node_modules/@types/use-sync-external-store/README.md +15 -0
  635. package/node_modules/@types/use-sync-external-store/index.d.ts +5 -0
  636. package/node_modules/@types/use-sync-external-store/package.json +30 -0
  637. package/node_modules/@types/use-sync-external-store/shim/index.d.ts +1 -0
  638. package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +1 -0
  639. package/node_modules/@types/use-sync-external-store/with-selector.d.ts +7 -0
  640. package/node_modules/argparse/LICENSE +254 -0
  641. package/node_modules/argparse/README.md +84 -0
  642. package/node_modules/argparse/argparse.js +3707 -0
  643. package/node_modules/argparse/lib/sub.js +67 -0
  644. package/node_modules/argparse/lib/textwrap.js +440 -0
  645. package/node_modules/argparse/package.json +31 -0
  646. package/node_modules/crelt/LICENSE +19 -0
  647. package/node_modules/crelt/README.md +23 -0
  648. package/node_modules/crelt/dist/index.cjs +31 -0
  649. package/node_modules/crelt/dist/index.d.cts +4 -0
  650. package/node_modules/crelt/index.d.ts +4 -0
  651. package/node_modules/crelt/index.js +28 -0
  652. package/node_modules/crelt/package.json +35 -0
  653. package/node_modules/crelt/rollup.config.js +13 -0
  654. package/node_modules/entities/LICENSE +11 -0
  655. package/node_modules/entities/lib/decode.d.ts +211 -0
  656. package/node_modules/entities/lib/decode.d.ts.map +1 -0
  657. package/node_modules/entities/lib/decode.js +536 -0
  658. package/node_modules/entities/lib/decode.js.map +1 -0
  659. package/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
  660. package/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
  661. package/node_modules/entities/lib/decode_codepoint.js +76 -0
  662. package/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  663. package/node_modules/entities/lib/encode.d.ts +22 -0
  664. package/node_modules/entities/lib/encode.d.ts.map +1 -0
  665. package/node_modules/entities/lib/encode.js +77 -0
  666. package/node_modules/entities/lib/encode.js.map +1 -0
  667. package/node_modules/entities/lib/escape.d.ts +43 -0
  668. package/node_modules/entities/lib/escape.d.ts.map +1 -0
  669. package/node_modules/entities/lib/escape.js +122 -0
  670. package/node_modules/entities/lib/escape.js.map +1 -0
  671. package/node_modules/entities/lib/esm/decode.d.ts +211 -0
  672. package/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
  673. package/node_modules/entities/lib/esm/decode.js +496 -0
  674. package/node_modules/entities/lib/esm/decode.js.map +1 -0
  675. package/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
  676. package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
  677. package/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
  678. package/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
  679. package/node_modules/entities/lib/esm/encode.d.ts +22 -0
  680. package/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
  681. package/node_modules/entities/lib/esm/encode.js +69 -0
  682. package/node_modules/entities/lib/esm/encode.js.map +1 -0
  683. package/node_modules/entities/lib/esm/escape.d.ts +43 -0
  684. package/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
  685. package/node_modules/entities/lib/esm/escape.js +116 -0
  686. package/node_modules/entities/lib/esm/escape.js.map +1 -0
  687. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
  688. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
  689. package/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  690. package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
  691. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
  692. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
  693. package/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  694. package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
  695. package/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
  696. package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
  697. package/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
  698. package/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
  699. package/node_modules/entities/lib/esm/index.d.ts +96 -0
  700. package/node_modules/entities/lib/esm/index.d.ts.map +1 -0
  701. package/node_modules/entities/lib/esm/index.js +99 -0
  702. package/node_modules/entities/lib/esm/index.js.map +1 -0
  703. package/node_modules/entities/lib/esm/package.json +1 -0
  704. package/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
  705. package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
  706. package/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  707. package/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  708. package/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
  709. package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
  710. package/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  711. package/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  712. package/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
  713. package/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
  714. package/node_modules/entities/lib/generated/encode-html.js +12 -0
  715. package/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  716. package/node_modules/entities/lib/index.d.ts +96 -0
  717. package/node_modules/entities/lib/index.d.ts.map +1 -0
  718. package/node_modules/entities/lib/index.js +126 -0
  719. package/node_modules/entities/lib/index.js.map +1 -0
  720. package/node_modules/entities/package.json +90 -0
  721. package/node_modules/entities/readme.md +122 -0
  722. package/node_modules/escape-string-regexp/index.d.ts +18 -0
  723. package/node_modules/escape-string-regexp/index.js +13 -0
  724. package/node_modules/escape-string-regexp/license +9 -0
  725. package/node_modules/escape-string-regexp/package.json +38 -0
  726. package/node_modules/escape-string-regexp/readme.md +34 -0
  727. package/node_modules/fast-equals/LICENSE +21 -0
  728. package/node_modules/fast-equals/README.md +477 -0
  729. package/node_modules/fast-equals/dist/cjs/comparator.d.cts +60 -0
  730. package/node_modules/fast-equals/dist/cjs/equals.d.cts +62 -0
  731. package/node_modules/fast-equals/dist/cjs/index.cjs +653 -0
  732. package/node_modules/fast-equals/dist/cjs/index.cjs.map +1 -0
  733. package/node_modules/fast-equals/dist/cjs/index.d.cts +66 -0
  734. package/node_modules/fast-equals/dist/cjs/internalTypes.d.cts +178 -0
  735. package/node_modules/fast-equals/dist/cjs/utils.d.cts +33 -0
  736. package/node_modules/fast-equals/dist/es/comparator.d.mts +60 -0
  737. package/node_modules/fast-equals/dist/es/equals.d.mts +62 -0
  738. package/node_modules/fast-equals/dist/es/index.d.mts +66 -0
  739. package/node_modules/fast-equals/dist/es/index.mjs +642 -0
  740. package/node_modules/fast-equals/dist/es/index.mjs.map +1 -0
  741. package/node_modules/fast-equals/dist/es/internalTypes.d.mts +178 -0
  742. package/node_modules/fast-equals/dist/es/utils.d.mts +33 -0
  743. package/node_modules/fast-equals/dist/umd/comparator.d.ts +26 -0
  744. package/node_modules/fast-equals/dist/umd/equals.d.ts +62 -0
  745. package/node_modules/fast-equals/dist/umd/index.d.ts +47 -0
  746. package/node_modules/fast-equals/dist/umd/index.js +659 -0
  747. package/node_modules/fast-equals/dist/umd/index.js.map +1 -0
  748. package/node_modules/fast-equals/dist/umd/internalTypes.d.ts +159 -0
  749. package/node_modules/fast-equals/dist/umd/utils.d.ts +28 -0
  750. package/node_modules/fast-equals/index.d.ts +260 -0
  751. package/node_modules/fast-equals/package.json +113 -0
  752. package/node_modules/linkify-it/LICENSE +22 -0
  753. package/node_modules/linkify-it/README.md +196 -0
  754. package/node_modules/linkify-it/build/index.cjs.js +832 -0
  755. package/node_modules/linkify-it/index.mjs +642 -0
  756. package/node_modules/linkify-it/lib/re.mjs +189 -0
  757. package/node_modules/linkify-it/package.json +58 -0
  758. package/node_modules/markdown-it/LICENSE +22 -0
  759. package/node_modules/markdown-it/README.md +324 -0
  760. package/node_modules/markdown-it/bin/markdown-it.mjs +107 -0
  761. package/node_modules/markdown-it/dist/index.cjs.js +5547 -0
  762. package/node_modules/markdown-it/dist/markdown-it.js +6969 -0
  763. package/node_modules/markdown-it/dist/markdown-it.min.js +2 -0
  764. package/node_modules/markdown-it/index.mjs +1 -0
  765. package/node_modules/markdown-it/lib/common/html_blocks.mjs +67 -0
  766. package/node_modules/markdown-it/lib/common/html_re.mjs +25 -0
  767. package/node_modules/markdown-it/lib/common/utils.mjs +304 -0
  768. package/node_modules/markdown-it/lib/helpers/index.mjs +11 -0
  769. package/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +77 -0
  770. package/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +49 -0
  771. package/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +66 -0
  772. package/node_modules/markdown-it/lib/index.mjs +565 -0
  773. package/node_modules/markdown-it/lib/parser_block.mjs +134 -0
  774. package/node_modules/markdown-it/lib/parser_core.mjs +62 -0
  775. package/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
  776. package/node_modules/markdown-it/lib/presets/commonmark.mjs +88 -0
  777. package/node_modules/markdown-it/lib/presets/default.mjs +47 -0
  778. package/node_modules/markdown-it/lib/presets/zero.mjs +70 -0
  779. package/node_modules/markdown-it/lib/renderer.mjs +322 -0
  780. package/node_modules/markdown-it/lib/ruler.mjs +340 -0
  781. package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +209 -0
  782. package/node_modules/markdown-it/lib/rules_block/code.mjs +30 -0
  783. package/node_modules/markdown-it/lib/rules_block/fence.mjs +94 -0
  784. package/node_modules/markdown-it/lib/rules_block/heading.mjs +51 -0
  785. package/node_modules/markdown-it/lib/rules_block/hr.mjs +40 -0
  786. package/node_modules/markdown-it/lib/rules_block/html_block.mjs +69 -0
  787. package/node_modules/markdown-it/lib/rules_block/lheading.mjs +82 -0
  788. package/node_modules/markdown-it/lib/rules_block/list.mjs +331 -0
  789. package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +46 -0
  790. package/node_modules/markdown-it/lib/rules_block/reference.mjs +212 -0
  791. package/node_modules/markdown-it/lib/rules_block/state_block.mjs +220 -0
  792. package/node_modules/markdown-it/lib/rules_block/table.mjs +228 -0
  793. package/node_modules/markdown-it/lib/rules_core/block.mjs +13 -0
  794. package/node_modules/markdown-it/lib/rules_core/inline.mjs +11 -0
  795. package/node_modules/markdown-it/lib/rules_core/linkify.mjs +134 -0
  796. package/node_modules/markdown-it/lib/rules_core/normalize.mjs +17 -0
  797. package/node_modules/markdown-it/lib/rules_core/replacements.mjs +101 -0
  798. package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +193 -0
  799. package/node_modules/markdown-it/lib/rules_core/state_core.mjs +17 -0
  800. package/node_modules/markdown-it/lib/rules_core/text_join.mjs +43 -0
  801. package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +72 -0
  802. package/node_modules/markdown-it/lib/rules_inline/backticks.mjs +60 -0
  803. package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +124 -0
  804. package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +123 -0
  805. package/node_modules/markdown-it/lib/rules_inline/entity.mjs +51 -0
  806. package/node_modules/markdown-it/lib/rules_inline/escape.mjs +69 -0
  807. package/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +38 -0
  808. package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +50 -0
  809. package/node_modules/markdown-it/lib/rules_inline/image.mjs +138 -0
  810. package/node_modules/markdown-it/lib/rules_inline/link.mjs +139 -0
  811. package/node_modules/markdown-it/lib/rules_inline/linkify.mjs +63 -0
  812. package/node_modules/markdown-it/lib/rules_inline/newline.mjs +42 -0
  813. package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +123 -0
  814. package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +127 -0
  815. package/node_modules/markdown-it/lib/rules_inline/text.mjs +86 -0
  816. package/node_modules/markdown-it/lib/token.mjs +191 -0
  817. package/node_modules/markdown-it/package.json +92 -0
  818. package/node_modules/mdurl/LICENSE +45 -0
  819. package/node_modules/mdurl/README.md +102 -0
  820. package/node_modules/mdurl/build/index.cjs.js +534 -0
  821. package/node_modules/mdurl/index.mjs +11 -0
  822. package/node_modules/mdurl/lib/decode.mjs +112 -0
  823. package/node_modules/mdurl/lib/encode.mjs +89 -0
  824. package/node_modules/mdurl/lib/format.mjs +21 -0
  825. package/node_modules/mdurl/lib/parse.mjs +308 -0
  826. package/node_modules/mdurl/package.json +37 -0
  827. package/node_modules/orderedmap/LICENSE +19 -0
  828. package/node_modules/orderedmap/README.md +69 -0
  829. package/node_modules/orderedmap/dist/index.cjs +139 -0
  830. package/node_modules/orderedmap/dist/index.d.cts +33 -0
  831. package/node_modules/orderedmap/dist/index.d.ts +33 -0
  832. package/node_modules/orderedmap/dist/index.js +137 -0
  833. package/node_modules/orderedmap/package.json +39 -0
  834. package/node_modules/prosemirror-changeset/CHANGELOG.md +147 -0
  835. package/node_modules/prosemirror-changeset/LICENSE +19 -0
  836. package/node_modules/prosemirror-changeset/README.md +175 -0
  837. package/node_modules/prosemirror-changeset/dist/index.cjs +585 -0
  838. package/node_modules/prosemirror-changeset/dist/index.d.cts +186 -0
  839. package/node_modules/prosemirror-changeset/dist/index.d.ts +186 -0
  840. package/node_modules/prosemirror-changeset/dist/index.js +715 -0
  841. package/node_modules/prosemirror-changeset/package.json +40 -0
  842. package/node_modules/prosemirror-changeset/src/README.md +32 -0
  843. package/node_modules/prosemirror-changeset/src/change.ts +189 -0
  844. package/node_modules/prosemirror-changeset/src/changeset.ts +212 -0
  845. package/node_modules/prosemirror-changeset/src/diff.ts +151 -0
  846. package/node_modules/prosemirror-changeset/src/simplify.ts +132 -0
  847. package/node_modules/prosemirror-changeset/test/test-changed-range.ts +48 -0
  848. package/node_modules/prosemirror-changeset/test/test-changes.ts +211 -0
  849. package/node_modules/prosemirror-changeset/test/test-diff.ts +69 -0
  850. package/node_modules/prosemirror-changeset/test/test-merge.ts +56 -0
  851. package/node_modules/prosemirror-changeset/test/test-simplify.ts +71 -0
  852. package/node_modules/prosemirror-collab/.tern-project +8 -0
  853. package/node_modules/prosemirror-collab/CHANGELOG.md +77 -0
  854. package/node_modules/prosemirror-collab/CONTRIBUTING.md +104 -0
  855. package/node_modules/prosemirror-collab/LICENSE +19 -0
  856. package/node_modules/prosemirror-collab/README.md +28 -0
  857. package/node_modules/prosemirror-collab/dist/index.cjs +155 -0
  858. package/node_modules/prosemirror-collab/dist/index.d.cts +60 -0
  859. package/node_modules/prosemirror-collab/dist/index.d.ts +60 -0
  860. package/node_modules/prosemirror-collab/dist/index.js +156 -0
  861. package/node_modules/prosemirror-collab/package.json +40 -0
  862. package/node_modules/prosemirror-collab/src/README.md +11 -0
  863. package/node_modules/prosemirror-collab/src/collab.ts +184 -0
  864. package/node_modules/prosemirror-commands/.tern-project +8 -0
  865. package/node_modules/prosemirror-commands/CHANGELOG.md +322 -0
  866. package/node_modules/prosemirror-commands/CONTRIBUTING.md +104 -0
  867. package/node_modules/prosemirror-commands/LICENSE +19 -0
  868. package/node_modules/prosemirror-commands/README.md +28 -0
  869. package/node_modules/prosemirror-commands/dist/index.cjs +687 -0
  870. package/node_modules/prosemirror-commands/dist/index.d.cts +215 -0
  871. package/node_modules/prosemirror-commands/dist/index.d.ts +215 -0
  872. package/node_modules/prosemirror-commands/dist/index.js +850 -0
  873. package/node_modules/prosemirror-commands/package.json +39 -0
  874. package/node_modules/prosemirror-commands/src/README.md +40 -0
  875. package/node_modules/prosemirror-commands/src/commands.ts +783 -0
  876. package/node_modules/prosemirror-dropcursor/CHANGELOG.md +137 -0
  877. package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +100 -0
  878. package/node_modules/prosemirror-dropcursor/LICENSE +19 -0
  879. package/node_modules/prosemirror-dropcursor/README.md +50 -0
  880. package/node_modules/prosemirror-dropcursor/dist/index.cjs +185 -0
  881. package/node_modules/prosemirror-dropcursor/dist/index.d.cts +38 -0
  882. package/node_modules/prosemirror-dropcursor/dist/index.d.ts +38 -0
  883. package/node_modules/prosemirror-dropcursor/dist/index.js +146 -0
  884. package/node_modules/prosemirror-dropcursor/package.json +38 -0
  885. package/node_modules/prosemirror-dropcursor/src/dropcursor.ts +170 -0
  886. package/node_modules/prosemirror-gapcursor/CHANGELOG.md +122 -0
  887. package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +104 -0
  888. package/node_modules/prosemirror-gapcursor/LICENSE +19 -0
  889. package/node_modules/prosemirror-gapcursor/README.md +31 -0
  890. package/node_modules/prosemirror-gapcursor/dist/index.cjs +239 -0
  891. package/node_modules/prosemirror-gapcursor/dist/index.d.cts +31 -0
  892. package/node_modules/prosemirror-gapcursor/dist/index.d.ts +31 -0
  893. package/node_modules/prosemirror-gapcursor/dist/index.js +239 -0
  894. package/node_modules/prosemirror-gapcursor/package.json +43 -0
  895. package/node_modules/prosemirror-gapcursor/src/README.md +21 -0
  896. package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +141 -0
  897. package/node_modules/prosemirror-gapcursor/src/index.ts +91 -0
  898. package/node_modules/prosemirror-gapcursor/style/gapcursor.css +25 -0
  899. package/node_modules/prosemirror-history/.tern-project +8 -0
  900. package/node_modules/prosemirror-history/CHANGELOG.md +170 -0
  901. package/node_modules/prosemirror-history/CONTRIBUTING.md +104 -0
  902. package/node_modules/prosemirror-history/LICENSE +19 -0
  903. package/node_modules/prosemirror-history/README.md +27 -0
  904. package/node_modules/prosemirror-history/dist/index.cjs +382 -0
  905. package/node_modules/prosemirror-history/dist/index.d.cts +64 -0
  906. package/node_modules/prosemirror-history/dist/index.d.ts +64 -0
  907. package/node_modules/prosemirror-history/dist/index.js +453 -0
  908. package/node_modules/prosemirror-history/package.json +40 -0
  909. package/node_modules/prosemirror-history/src/README.md +23 -0
  910. package/node_modules/prosemirror-history/src/history.ts +465 -0
  911. package/node_modules/prosemirror-inputrules/.tern-project +8 -0
  912. package/node_modules/prosemirror-inputrules/CHANGELOG.md +127 -0
  913. package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +104 -0
  914. package/node_modules/prosemirror-inputrules/LICENSE +19 -0
  915. package/node_modules/prosemirror-inputrules/README.md +29 -0
  916. package/node_modules/prosemirror-inputrules/dist/index.cjs +194 -0
  917. package/node_modules/prosemirror-inputrules/dist/index.d.cts +131 -0
  918. package/node_modules/prosemirror-inputrules/dist/index.d.ts +131 -0
  919. package/node_modules/prosemirror-inputrules/dist/index.js +239 -0
  920. package/node_modules/prosemirror-inputrules/package.json +36 -0
  921. package/node_modules/prosemirror-inputrules/src/README.md +23 -0
  922. package/node_modules/prosemirror-inputrules/src/index.ts +4 -0
  923. package/node_modules/prosemirror-inputrules/src/inputrules.ts +167 -0
  924. package/node_modules/prosemirror-inputrules/src/rulebuilders.ts +59 -0
  925. package/node_modules/prosemirror-inputrules/src/rules.ts +17 -0
  926. package/node_modules/prosemirror-keymap/.tern-project +8 -0
  927. package/node_modules/prosemirror-keymap/CHANGELOG.md +104 -0
  928. package/node_modules/prosemirror-keymap/CONTRIBUTING.md +104 -0
  929. package/node_modules/prosemirror-keymap/LICENSE +19 -0
  930. package/node_modules/prosemirror-keymap/README.md +27 -0
  931. package/node_modules/prosemirror-keymap/dist/index.cjs +65 -0
  932. package/node_modules/prosemirror-keymap/dist/index.d.cts +47 -0
  933. package/node_modules/prosemirror-keymap/dist/index.d.ts +47 -0
  934. package/node_modules/prosemirror-keymap/dist/index.js +128 -0
  935. package/node_modules/prosemirror-keymap/package.json +38 -0
  936. package/node_modules/prosemirror-keymap/src/README.md +5 -0
  937. package/node_modules/prosemirror-keymap/src/keymap.ts +105 -0
  938. package/node_modules/prosemirror-markdown/.tern-project +8 -0
  939. package/node_modules/prosemirror-markdown/CHANGELOG.md +311 -0
  940. package/node_modules/prosemirror-markdown/CONTRIBUTING.md +100 -0
  941. package/node_modules/prosemirror-markdown/LICENSE +19 -0
  942. package/node_modules/prosemirror-markdown/README.md +276 -0
  943. package/node_modules/prosemirror-markdown/dist/index.cjs +966 -0
  944. package/node_modules/prosemirror-markdown/dist/index.d.cts +335 -0
  945. package/node_modules/prosemirror-markdown/dist/index.d.ts +335 -0
  946. package/node_modules/prosemirror-markdown/dist/index.js +878 -0
  947. package/node_modules/prosemirror-markdown/package.json +40 -0
  948. package/node_modules/prosemirror-markdown/src/README.md +42 -0
  949. package/node_modules/prosemirror-markdown/src/from_markdown.ts +272 -0
  950. package/node_modules/prosemirror-markdown/src/index.ts +5 -0
  951. package/node_modules/prosemirror-markdown/src/schema.ts +156 -0
  952. package/node_modules/prosemirror-markdown/src/to_markdown.ts +483 -0
  953. package/node_modules/prosemirror-menu/.tern-project +8 -0
  954. package/node_modules/prosemirror-menu/CHANGELOG.md +107 -0
  955. package/node_modules/prosemirror-menu/CONTRIBUTING.md +100 -0
  956. package/node_modules/prosemirror-menu/LICENSE +19 -0
  957. package/node_modules/prosemirror-menu/README.md +235 -0
  958. package/node_modules/prosemirror-menu/dist/index.cjs +798 -0
  959. package/node_modules/prosemirror-menu/dist/index.d.cts +281 -0
  960. package/node_modules/prosemirror-menu/dist/index.d.ts +281 -0
  961. package/node_modules/prosemirror-menu/dist/index.js +795 -0
  962. package/node_modules/prosemirror-menu/package.json +42 -0
  963. package/node_modules/prosemirror-menu/src/README.md +60 -0
  964. package/node_modules/prosemirror-menu/src/icons.ts +53 -0
  965. package/node_modules/prosemirror-menu/src/index.ts +4 -0
  966. package/node_modules/prosemirror-menu/src/menu.ts +628 -0
  967. package/node_modules/prosemirror-menu/src/menubar.ts +210 -0
  968. package/node_modules/prosemirror-menu/style/menu.css +169 -0
  969. package/node_modules/prosemirror-model/.tern-project +8 -0
  970. package/node_modules/prosemirror-model/CHANGELOG.md +730 -0
  971. package/node_modules/prosemirror-model/CONTRIBUTING.md +104 -0
  972. package/node_modules/prosemirror-model/LICENSE +19 -0
  973. package/node_modules/prosemirror-model/README.md +29 -0
  974. package/node_modules/prosemirror-model/dist/index.cjs +2898 -0
  975. package/node_modules/prosemirror-model/dist/index.d.cts +1679 -0
  976. package/node_modules/prosemirror-model/dist/index.d.ts +1679 -0
  977. package/node_modules/prosemirror-model/dist/index.js +3464 -0
  978. package/node_modules/prosemirror-model/package.json +38 -0
  979. package/node_modules/prosemirror-model/src/README.md +62 -0
  980. package/node_modules/prosemirror-model/src/comparedeep.ts +15 -0
  981. package/node_modules/prosemirror-model/src/content.ts +413 -0
  982. package/node_modules/prosemirror-model/src/diff.ts +52 -0
  983. package/node_modules/prosemirror-model/src/dom.ts +1 -0
  984. package/node_modules/prosemirror-model/src/fragment.ts +268 -0
  985. package/node_modules/prosemirror-model/src/from_dom.ts +848 -0
  986. package/node_modules/prosemirror-model/src/index.ts +11 -0
  987. package/node_modules/prosemirror-model/src/mark.ts +111 -0
  988. package/node_modules/prosemirror-model/src/node.ts +402 -0
  989. package/node_modules/prosemirror-model/src/replace.ts +225 -0
  990. package/node_modules/prosemirror-model/src/resolvedpos.ts +289 -0
  991. package/node_modules/prosemirror-model/src/schema.ts +705 -0
  992. package/node_modules/prosemirror-model/src/to_dom.ts +238 -0
  993. package/node_modules/prosemirror-schema-basic/.tern-project +8 -0
  994. package/node_modules/prosemirror-schema-basic/CHANGELOG.md +81 -0
  995. package/node_modules/prosemirror-schema-basic/CONTRIBUTING.md +100 -0
  996. package/node_modules/prosemirror-schema-basic/LICENSE +19 -0
  997. package/node_modules/prosemirror-schema-basic/README.md +28 -0
  998. package/node_modules/prosemirror-schema-basic/dist/index.cjs +246 -0
  999. package/node_modules/prosemirror-schema-basic/dist/index.d.cts +87 -0
  1000. package/node_modules/prosemirror-schema-basic/dist/index.d.ts +87 -0
  1001. package/node_modules/prosemirror-schema-basic/dist/index.js +183 -0
  1002. package/node_modules/prosemirror-schema-basic/package.json +37 -0
  1003. package/node_modules/prosemirror-schema-basic/src/README.md +8 -0
  1004. package/node_modules/prosemirror-schema-basic/src/schema-basic.ts +166 -0
  1005. package/node_modules/prosemirror-schema-list/.tern-project +8 -0
  1006. package/node_modules/prosemirror-schema-list/CHANGELOG.md +140 -0
  1007. package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +100 -0
  1008. package/node_modules/prosemirror-schema-list/LICENSE +19 -0
  1009. package/node_modules/prosemirror-schema-list/README.md +28 -0
  1010. package/node_modules/prosemirror-schema-list/dist/index.cjs +253 -0
  1011. package/node_modules/prosemirror-schema-list/dist/index.d.cts +71 -0
  1012. package/node_modules/prosemirror-schema-list/dist/index.d.ts +71 -0
  1013. package/node_modules/prosemirror-schema-list/dist/index.js +289 -0
  1014. package/node_modules/prosemirror-schema-list/package.json +40 -0
  1015. package/node_modules/prosemirror-schema-list/src/README.md +29 -0
  1016. package/node_modules/prosemirror-schema-list/src/schema-list.ts +267 -0
  1017. package/node_modules/prosemirror-state/.tern-project +8 -0
  1018. package/node_modules/prosemirror-state/CHANGELOG.md +296 -0
  1019. package/node_modules/prosemirror-state/CONTRIBUTING.md +104 -0
  1020. package/node_modules/prosemirror-state/LICENSE +19 -0
  1021. package/node_modules/prosemirror-state/README.md +28 -0
  1022. package/node_modules/prosemirror-state/dist/index.cjs +884 -0
  1023. package/node_modules/prosemirror-state/dist/index.d.cts +709 -0
  1024. package/node_modules/prosemirror-state/dist/index.d.ts +709 -0
  1025. package/node_modules/prosemirror-state/dist/index.js +1002 -0
  1026. package/node_modules/prosemirror-state/package.json +39 -0
  1027. package/node_modules/prosemirror-state/src/README.md +42 -0
  1028. package/node_modules/prosemirror-state/src/index.ts +7 -0
  1029. package/node_modules/prosemirror-state/src/plugin.ts +142 -0
  1030. package/node_modules/prosemirror-state/src/selection.ts +462 -0
  1031. package/node_modules/prosemirror-state/src/state.ts +266 -0
  1032. package/node_modules/prosemirror-state/src/transaction.ts +215 -0
  1033. package/node_modules/prosemirror-tables/LICENSE +19 -0
  1034. package/node_modules/prosemirror-tables/README.md +254 -0
  1035. package/node_modules/prosemirror-tables/dist/index.cjs +2683 -0
  1036. package/node_modules/prosemirror-tables/dist/index.d.cts +751 -0
  1037. package/node_modules/prosemirror-tables/dist/index.d.cts.map +1 -0
  1038. package/node_modules/prosemirror-tables/dist/index.d.ts +751 -0
  1039. package/node_modules/prosemirror-tables/dist/index.d.ts.map +1 -0
  1040. package/node_modules/prosemirror-tables/dist/index.js +2626 -0
  1041. package/node_modules/prosemirror-tables/dist/index.js.map +1 -0
  1042. package/node_modules/prosemirror-tables/package.json +80 -0
  1043. package/node_modules/prosemirror-tables/style/tables.css +48 -0
  1044. package/node_modules/prosemirror-trailing-node/LICENSE +21 -0
  1045. package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.cts +41 -0
  1046. package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.ts +41 -0
  1047. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.cjs +70 -0
  1048. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.cts +2 -0
  1049. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.ts +2 -0
  1050. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.js +43 -0
  1051. package/node_modules/prosemirror-trailing-node/dist-types/index.d.ts +2 -0
  1052. package/node_modules/prosemirror-trailing-node/dist-types/trailing-node-plugin.d.ts +33 -0
  1053. package/node_modules/prosemirror-trailing-node/dist-types/tsconfig.tsbuildinfo +1 -0
  1054. package/node_modules/prosemirror-trailing-node/package.json +57 -0
  1055. package/node_modules/prosemirror-trailing-node/readme.md +55 -0
  1056. package/node_modules/prosemirror-transform/.tern-project +8 -0
  1057. package/node_modules/prosemirror-transform/CHANGELOG.md +502 -0
  1058. package/node_modules/prosemirror-transform/CONTRIBUTING.md +104 -0
  1059. package/node_modules/prosemirror-transform/LICENSE +19 -0
  1060. package/node_modules/prosemirror-transform/README.md +29 -0
  1061. package/node_modules/prosemirror-transform/dist/index.cjs +1888 -0
  1062. package/node_modules/prosemirror-transform/dist/index.d.cts +847 -0
  1063. package/node_modules/prosemirror-transform/dist/index.d.ts +847 -0
  1064. package/node_modules/prosemirror-transform/dist/index.js +2181 -0
  1065. package/node_modules/prosemirror-transform/package.json +37 -0
  1066. package/node_modules/prosemirror-transform/src/README.md +59 -0
  1067. package/node_modules/prosemirror-transform/src/attr_step.ts +98 -0
  1068. package/node_modules/prosemirror-transform/src/index.ts +11 -0
  1069. package/node_modules/prosemirror-transform/src/map.ts +284 -0
  1070. package/node_modules/prosemirror-transform/src/mark.ts +106 -0
  1071. package/node_modules/prosemirror-transform/src/mark_step.ts +224 -0
  1072. package/node_modules/prosemirror-transform/src/replace.ts +460 -0
  1073. package/node_modules/prosemirror-transform/src/replace_step.ts +178 -0
  1074. package/node_modules/prosemirror-transform/src/step.ts +97 -0
  1075. package/node_modules/prosemirror-transform/src/structure.ts +349 -0
  1076. package/node_modules/prosemirror-transform/src/transform.ts +271 -0
  1077. package/node_modules/prosemirror-view/.tern-project +8 -0
  1078. package/node_modules/prosemirror-view/CHANGELOG.md +2447 -0
  1079. package/node_modules/prosemirror-view/CONTRIBUTING.md +104 -0
  1080. package/node_modules/prosemirror-view/LICENSE +19 -0
  1081. package/node_modules/prosemirror-view/README.md +28 -0
  1082. package/node_modules/prosemirror-view/dist/index.cjs +5381 -0
  1083. package/node_modules/prosemirror-view/dist/index.d.cts +904 -0
  1084. package/node_modules/prosemirror-view/dist/index.d.ts +904 -0
  1085. package/node_modules/prosemirror-view/dist/index.js +5900 -0
  1086. package/node_modules/prosemirror-view/package.json +43 -0
  1087. package/node_modules/prosemirror-view/src/README.md +38 -0
  1088. package/node_modules/prosemirror-view/src/browser.ts +24 -0
  1089. package/node_modules/prosemirror-view/src/capturekeys.ts +345 -0
  1090. package/node_modules/prosemirror-view/src/clipboard.ts +263 -0
  1091. package/node_modules/prosemirror-view/src/decoration.ts +793 -0
  1092. package/node_modules/prosemirror-view/src/dom.ts +159 -0
  1093. package/node_modules/prosemirror-view/src/domchange.ts +383 -0
  1094. package/node_modules/prosemirror-view/src/domcoords.ts +515 -0
  1095. package/node_modules/prosemirror-view/src/domobserver.ts +392 -0
  1096. package/node_modules/prosemirror-view/src/index.ts +825 -0
  1097. package/node_modules/prosemirror-view/src/input.ts +830 -0
  1098. package/node_modules/prosemirror-view/src/selection.ts +216 -0
  1099. package/node_modules/prosemirror-view/src/viewdesc.ts +1590 -0
  1100. package/node_modules/prosemirror-view/style/prosemirror.css +54 -0
  1101. package/node_modules/punycode.js/LICENSE-MIT.txt +20 -0
  1102. package/node_modules/punycode.js/README.md +148 -0
  1103. package/node_modules/punycode.js/package.json +58 -0
  1104. package/node_modules/punycode.js/punycode.es6.js +444 -0
  1105. package/node_modules/punycode.js/punycode.js +443 -0
  1106. package/node_modules/rope-sequence/LICENSE +19 -0
  1107. package/node_modules/rope-sequence/README.md +63 -0
  1108. package/node_modules/rope-sequence/dist/index.cjs +209 -0
  1109. package/node_modules/rope-sequence/dist/index.d.cts +11 -0
  1110. package/node_modules/rope-sequence/dist/index.d.ts +11 -0
  1111. package/node_modules/rope-sequence/dist/index.js +207 -0
  1112. package/node_modules/rope-sequence/index.js +190 -0
  1113. package/node_modules/rope-sequence/package.json +34 -0
  1114. package/node_modules/rope-sequence/test.js +78 -0
  1115. package/node_modules/uc.micro/LICENSE.txt +20 -0
  1116. package/node_modules/uc.micro/README.md +14 -0
  1117. package/node_modules/uc.micro/build/index.cjs.js +20 -0
  1118. package/node_modules/uc.micro/categories/Cc/regex.mjs +1 -0
  1119. package/node_modules/uc.micro/categories/Cf/regex.mjs +1 -0
  1120. package/node_modules/uc.micro/categories/P/regex.mjs +1 -0
  1121. package/node_modules/uc.micro/categories/S/regex.mjs +1 -0
  1122. package/node_modules/uc.micro/categories/Z/regex.mjs +1 -0
  1123. package/node_modules/uc.micro/index.mjs +8 -0
  1124. package/node_modules/uc.micro/package.json +37 -0
  1125. package/node_modules/uc.micro/properties/Any/regex.mjs +1 -0
  1126. package/node_modules/use-sync-external-store/LICENSE +21 -0
  1127. package/node_modules/use-sync-external-store/README.md +5 -0
  1128. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +97 -0
  1129. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +85 -0
  1130. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +95 -0
  1131. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +88 -0
  1132. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +59 -0
  1133. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +66 -0
  1134. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +96 -0
  1135. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +84 -0
  1136. package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +27 -0
  1137. package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +13 -0
  1138. package/node_modules/use-sync-external-store/index.js +7 -0
  1139. package/node_modules/use-sync-external-store/package.json +43 -0
  1140. package/node_modules/use-sync-external-store/shim/index.js +7 -0
  1141. package/node_modules/use-sync-external-store/shim/index.native.js +7 -0
  1142. package/node_modules/use-sync-external-store/shim/with-selector.js +7 -0
  1143. package/node_modules/use-sync-external-store/with-selector.js +7 -0
  1144. package/node_modules/w3c-keyname/.tern-port +1 -0
  1145. package/node_modules/w3c-keyname/LICENSE +19 -0
  1146. package/node_modules/w3c-keyname/README.md +18 -0
  1147. package/node_modules/w3c-keyname/index.cjs +127 -0
  1148. package/node_modules/w3c-keyname/index.d.cts +5 -0
  1149. package/node_modules/w3c-keyname/index.d.ts +5 -0
  1150. package/node_modules/w3c-keyname/index.js +119 -0
  1151. package/node_modules/w3c-keyname/package.json +37 -0
  1152. package/package.json +120 -3
  1153. package/public-api.md +23 -2
  1154. package/dist/chat/tool-renderers/KbSearchRenderer.d.ts +0 -2
  1155. package/dist/chat/tool-renderers/kb-search-result.d.ts +0 -19
  1156. package/dist/chunk-6ZDOQEWK.js.map +0 -1
  1157. package/dist/chunk-FQQJP2GJ.js.map +0 -1
  1158. package/dist/rich-input/extensions/kb-mention.d.ts +0 -18
  1159. package/dist/rich-input/extensions/workflow-mention.d.ts +0 -10
  1160. package/dist/rich-input/lib/kb-suggestions.d.ts +0 -37
  1161. /package/dist/{chunk-WCMGQJLE.js.map → chunk-EYRP6PV3.js.map} +0 -0
@@ -17,13 +17,14 @@ import {
17
17
  CircleAlert,
18
18
  CircleCheck,
19
19
  CirclePause,
20
+ CircleSlash,
20
21
  CircleX,
21
- CodePreview,
22
22
  Copy,
23
23
  CurrentChatSessionProvider,
24
24
  Dialog,
25
25
  DialogClose,
26
26
  DialogContent,
27
+ DialogDescription,
27
28
  DialogTitle,
28
29
  Download,
29
30
  Earth,
@@ -67,37 +68,28 @@ import {
67
68
  Terminal,
68
69
  Trash2,
69
70
  TriangleAlert,
70
- Workflow,
71
71
  Wrench,
72
72
  X,
73
+ Zap,
73
74
  chatTone,
74
75
  cn,
75
76
  copyToClipboard,
76
77
  dist_exports,
77
78
  dist_exports3 as dist_exports2,
78
- extractErrorMessage,
79
79
  extractToolFilePath,
80
- formatBytes,
81
80
  formatToolFileName,
82
81
  formatToolName,
83
- getBooleanValue,
84
- getFileName,
85
- getNumberValue,
86
82
  getPlanUpdateDisplayState,
87
- getResultImages,
88
- getResultText,
89
- getStringValue,
83
+ getPluginSuggestionItems,
90
84
  getToolDescription,
91
85
  getToolDisplayLabel,
92
86
  getToolOutputTag,
93
87
  getToolStatusLabel,
94
88
  getToolTone,
95
- isPlainObject,
96
89
  isPlanUpdateTool,
97
90
  notifyChat,
98
- parseJsonValue,
99
- parseKbSearchResult,
100
91
  parsePlanUpdate,
92
+ pluginRefsForSend,
101
93
  sendToSession,
102
94
  useBladeClient,
103
95
  useBladeHost,
@@ -120,7 +112,7 @@ import {
120
112
  useSessionSource,
121
113
  useSessionState,
122
114
  useSingleSessionSource
123
- } from "./chunk-FQQJP2GJ.js";
115
+ } from "./chunk-7TQVTNPL.js";
124
116
  import {
125
117
  __export
126
118
  } from "./chunk-PR4QN5HX.js";
@@ -473,7 +465,7 @@ function ReplayMismatchPrompt({ mismatch, className }) {
473
465
 
474
466
  // src/components/AgentChat.tsx
475
467
  import { BladeApiError as BladeApiError2 } from "@blade-hq/agent-client/internal";
476
- import { useEffect as useEffect30, useMemo as useMemo18, useRef as useRef27, useState as useState36 } from "react";
468
+ import { useEffect as useEffect30, useMemo as useMemo18, useRef as useRef28, useState as useState36 } from "react";
477
469
 
478
470
  // src/chat/ChatPanel.tsx
479
471
  import { useCallback as useCallback17, useEffect as useEffect28, useMemo as useMemo17, useState as useState34 } from "react";
@@ -1510,7 +1502,7 @@ __export(util_exports, {
1510
1502
  hide: () => hide,
1511
1503
  installLazyProp: () => installLazyProp,
1512
1504
  isObject: () => isObject,
1513
- isPlainObject: () => isPlainObject2,
1505
+ isPlainObject: () => isPlainObject,
1514
1506
  issue: () => issue,
1515
1507
  joinValues: () => joinValues,
1516
1508
  jsonStringifyReplacer: () => jsonStringifyReplacer,
@@ -1696,7 +1688,7 @@ var allowsEval = /* @__PURE__ */ cached(() => {
1696
1688
  return false;
1697
1689
  }
1698
1690
  });
1699
- function isPlainObject2(o) {
1691
+ function isPlainObject(o) {
1700
1692
  if (isObject(o) === false)
1701
1693
  return false;
1702
1694
  const ctor = o.constructor;
@@ -1713,7 +1705,7 @@ function isPlainObject2(o) {
1713
1705
  return true;
1714
1706
  }
1715
1707
  function shallowClone(o) {
1716
- if (isPlainObject2(o))
1708
+ if (isPlainObject(o))
1717
1709
  return { ...o };
1718
1710
  if (Array.isArray(o))
1719
1711
  return [...o];
@@ -1917,7 +1909,7 @@ function omit(schema2, mask) {
1917
1909
  return clone(schema2, def);
1918
1910
  }
1919
1911
  function extend(schema2, shape) {
1920
- if (!isPlainObject2(shape)) {
1912
+ if (!isPlainObject(shape)) {
1921
1913
  throw new Error("Invalid input to extend: expected a plain object");
1922
1914
  }
1923
1915
  const checks = schema2._zod.def.checks;
@@ -1940,7 +1932,7 @@ function extend(schema2, shape) {
1940
1932
  return clone(schema2, def);
1941
1933
  }
1942
1934
  function safeExtend(schema2, shape) {
1943
- if (!isPlainObject2(shape)) {
1935
+ if (!isPlainObject(shape)) {
1944
1936
  throw new Error("Invalid input to safeExtend: expected a plain object");
1945
1937
  }
1946
1938
  const def = mergeDefs(schema2._zod.def, {
@@ -4783,7 +4775,7 @@ function mergeValues(a, b2) {
4783
4775
  if (a instanceof Date && b2 instanceof Date && +a === +b2) {
4784
4776
  return { valid: true, data: a };
4785
4777
  }
4786
- if (isPlainObject2(a) && isPlainObject2(b2)) {
4778
+ if (isPlainObject(a) && isPlainObject(b2)) {
4787
4779
  const bKeys = Object.keys(b2);
4788
4780
  const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
4789
4781
  const newObj = { ...a, ...b2 };
@@ -4994,7 +4986,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4994
4986
  memo6?.attach(inst);
4995
4987
  inst._zod.parse = (payload, ctx) => {
4996
4988
  const input2 = payload.value;
4997
- if (!isPlainObject2(input2)) {
4989
+ if (!isPlainObject(input2)) {
4998
4990
  payload.issues.push({
4999
4991
  expected: "record",
5000
4992
  code: "invalid_type",
@@ -14698,7 +14690,7 @@ function generateIntersectionCheck(doc, ctx, schema2, accessor) {
14698
14690
  }
14699
14691
  function generateRecordCheck(doc, ctx, schema2, accessor) {
14700
14692
  const def = schema2._zod.def;
14701
- const isPlainObjectConst = addConstant(ctx, isPlainObject2);
14693
+ const isPlainObjectConst = addConstant(ctx, isPlainObject);
14702
14694
  doc.write(`if (!${isPlainObjectConst}(${accessor})) return INVALID;`);
14703
14695
  const outputVar = newVar(ctx);
14704
14696
  const kVar = newVar(ctx);
@@ -19372,7 +19364,7 @@ function convertBaseSchema(schema2, ctx) {
19372
19364
  const patterns = patternKeys.map((p2) => new RegExp(p2));
19373
19365
  const basePatternSchema = zodSchema;
19374
19366
  zodSchema = zodSchema.check((payload) => {
19375
- if (!isPlainObject2(payload.value))
19367
+ if (!isPlainObject(payload.value))
19376
19368
  return;
19377
19369
  const unrecognized = [];
19378
19370
  for (const key of Object.keys(payload.value)) {
@@ -24874,18 +24866,18 @@ var Protocol = class {
24874
24866
  function isPlainObject$1(value) {
24875
24867
  return value !== null && typeof value === "object" && !Array.isArray(value);
24876
24868
  }
24877
- function isPlainObject3(value) {
24869
+ function isPlainObject2(value) {
24878
24870
  return typeof value === "object" && value !== null && !Array.isArray(value);
24879
24871
  }
24880
24872
  function partitionInputResponses(inputResponses) {
24881
24873
  const accepted = {};
24882
24874
  const droppedKeys = [];
24883
- if (!isPlainObject3(inputResponses)) return {
24875
+ if (!isPlainObject2(inputResponses)) return {
24884
24876
  accepted,
24885
24877
  droppedKeys
24886
24878
  };
24887
24879
  for (const [key, entry] of Object.entries(inputResponses)) {
24888
- if (!isPlainObject3(entry) || "method" in entry || "result" in entry) {
24880
+ if (!isPlainObject2(entry) || "method" in entry || "result" in entry) {
24889
24881
  droppedKeys.push(key);
24890
24882
  continue;
24891
24883
  }
@@ -26183,7 +26175,8 @@ function useFollowupInteraction() {
26183
26175
  }
26184
26176
 
26185
26177
  // src/chat/LightComposer.tsx
26186
- import { useEffect as useEffect6, useState as useState7 } from "react";
26178
+ import { useEffect as useEffect6, useRef as useRef7, useState as useState7 } from "react";
26179
+ import { normalizePluginRefs } from "@blade-hq/agent-client";
26187
26180
 
26188
26181
  // src/components/ChatInput.tsx
26189
26182
  import { useRef as useRef6, useState as useState6 } from "react";
@@ -26209,7 +26202,8 @@ function ChatInput({
26209
26202
  textareaClassName,
26210
26203
  toolbarClassName,
26211
26204
  queueKey,
26212
- hasAttachments = false
26205
+ hasAttachments = false,
26206
+ onKeyDown
26213
26207
  }) {
26214
26208
  const trimmed = value.trim();
26215
26209
  const latestValue = useRef6(value);
@@ -26233,6 +26227,8 @@ function ChatInput({
26233
26227
  }
26234
26228
  };
26235
26229
  const handleKeyDown = (event) => {
26230
+ onKeyDown?.(event);
26231
+ if (event.defaultPrevented) return;
26236
26232
  if (shouldSubmitChatInput({
26237
26233
  key: event.key,
26238
26234
  shiftKey: event.shiftKey,
@@ -26327,12 +26323,56 @@ function LightComposer({
26327
26323
  initialDraftKey
26328
26324
  }) {
26329
26325
  const session = useSessionHandle(sessionId);
26326
+ const client = useBladeClient();
26327
+ const [refs, setRefs] = useState7([]);
26328
+ const [items, setItems] = useState7([]);
26329
+ const [selectedIndex, setSelectedIndex] = useState7(0);
26330
+ const restored = useRef7(null);
26330
26331
  const [value, setValue] = useState7(initialDraft ?? "");
26331
26332
  const [draftKey, setDraftKey] = useState7(initialDraftKey);
26332
26333
  if (draftKey !== initialDraftKey) {
26333
26334
  setDraftKey(initialDraftKey);
26334
26335
  if (initialDraft) setValue(initialDraft);
26335
26336
  }
26337
+ const [dismissed, setDismissed] = useState7(null);
26338
+ const match = value.match(/(?:^|\s)@([^@\s]*)$/);
26339
+ const query = match && value !== dismissed ? match[1] : null;
26340
+ const candidates = items.filter((item) => item.kind === "plugin");
26341
+ useEffect6(() => {
26342
+ setItems([]);
26343
+ setSelectedIndex(0);
26344
+ if (query === null) return;
26345
+ let current = true;
26346
+ const timer = setTimeout(() => {
26347
+ void getPluginSuggestionItems(client, sessionId, query).then((result) => {
26348
+ if (current) setItems(result);
26349
+ });
26350
+ }, 150);
26351
+ return () => {
26352
+ current = false;
26353
+ clearTimeout(timer);
26354
+ };
26355
+ }, [client, client.token, sessionId, query]);
26356
+ useEffect6(() => {
26357
+ setRefs([]);
26358
+ if (!session) return;
26359
+ const restore = () => {
26360
+ if (restored.current === sessionId) return;
26361
+ const latest = [...session.getState().turns].reverse().find((turn) => turn.role === "user");
26362
+ if (!latest || latest.turn_id.startsWith("local-user-")) return;
26363
+ restored.current = sessionId ?? null;
26364
+ setRefs(normalizePluginRefs(latest.refs));
26365
+ };
26366
+ restore();
26367
+ return session.subscribe(restore);
26368
+ }, [session, sessionId]);
26369
+ const select = (item) => {
26370
+ const next = normalizePluginRefs([...refs, item]);
26371
+ if (next.length > 20) return;
26372
+ setRefs(next);
26373
+ setValue((prev) => prev.replace(/@[^@\s]*$/, `@${item.label} `));
26374
+ setItems([]);
26375
+ };
26336
26376
  useEffect6(() => {
26337
26377
  if (!session) return;
26338
26378
  const offAttach = session.on("attachRequested", ({ label, content: content3 }) => {
@@ -26351,12 +26391,38 @@ ${content3}`);
26351
26391
  }, [session]);
26352
26392
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
26353
26393
  planPanel ? /* @__PURE__ */ jsx8("div", { className: maxWidthClassName ? `mx-auto w-full ${maxWidthClassName}` : void 0, children: planPanel }) : null,
26394
+ refs.length ? /* @__PURE__ */ jsx8("div", { "aria-label": "\u9009\u62E9\u7684\u63D2\u4EF6\u6761\u76EE", className: "flex flex-wrap gap-2 px-3 pt-2", children: refs.map((ref) => /* @__PURE__ */ jsxs8("span", { className: "rounded bg-[hsl(var(--muted))] px-2 py-1 text-xs", children: [
26395
+ ref.label,
26396
+ /* @__PURE__ */ jsx8("button", { type: "button", "aria-label": `\u79FB\u9664${ref.label}`, onClick: () => setRefs((prev) => prev.filter((item) => item !== ref)), children: " \xD7" })
26397
+ ] }, JSON.stringify([ref.plugin, ref.server, ref.id]))) }) : null,
26398
+ query !== null && items.length ? /* @__PURE__ */ jsx8("fieldset", { "aria-label": "\u63D2\u4EF6\u6761\u76EE\u5019\u9009", className: "m-0 min-w-0 border-0 px-3 py-2", children: items.map((item, index2) => item.kind === "plugin" ? /* @__PURE__ */ jsxs8("button", { type: "button", "aria-pressed": candidates[selectedIndex] === item, onMouseDown: (event) => event.preventDefault(), onClick: () => select(item), className: `flex w-full items-center gap-2 rounded px-2 py-1 text-sm hover:bg-[hsl(var(--muted))] ${candidates[selectedIndex] === item ? "bg-[hsl(var(--muted))]" : ""}`, children: [
26399
+ item.icon ? /* @__PURE__ */ jsx8("img", { src: item.icon, alt: "", width: 16, height: 16 }) : null,
26400
+ item.label,
26401
+ /* @__PURE__ */ jsx8("span", { className: "ml-auto text-xs text-[hsl(var(--muted-foreground))]", children: item.display_name })
26402
+ ] }, JSON.stringify([item.plugin, item.server, item.id])) : /* @__PURE__ */ jsx8("div", { className: "text-xs", children: item.message }, index2)) }) : null,
26354
26403
  /* @__PURE__ */ jsx8(
26355
26404
  ChatInput,
26356
26405
  {
26357
26406
  value,
26358
26407
  onValueChange: setValue,
26359
- onSend: (text4) => onSend(text4),
26408
+ onSend: (text4) => onSend(text4 || refs.map((ref) => `@${ref.label}`).join(" "), { refs: pluginRefsForSend(refs, session?.getState().turns) }),
26409
+ hasAttachments: refs.length > 0,
26410
+ onKeyDown: (event) => {
26411
+ if (query === null || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
26412
+ if (event.key === "Escape") {
26413
+ event.preventDefault();
26414
+ setDismissed(value);
26415
+ }
26416
+ if (!candidates.length) return;
26417
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
26418
+ event.preventDefault();
26419
+ setSelectedIndex((prev) => (prev + (event.key === "ArrowDown" ? 1 : candidates.length - 1)) % candidates.length);
26420
+ }
26421
+ if (event.key === "Enter" && !event.shiftKey) {
26422
+ event.preventDefault();
26423
+ select(candidates[selectedIndex]);
26424
+ }
26425
+ },
26360
26426
  onStop: () => void onStop(),
26361
26427
  isStreaming,
26362
26428
  isStopping,
@@ -26372,7 +26438,7 @@ ${content3}`);
26372
26438
  }
26373
26439
 
26374
26440
  // src/chat/LiteMessageList.tsx
26375
- import { useCallback as useCallback8, useEffect as useEffect19, useMemo as useMemo12, useRef as useRef17, useState as useState24 } from "react";
26441
+ import { useCallback as useCallback8, useEffect as useEffect19, useMemo as useMemo12, useRef as useRef18, useState as useState24 } from "react";
26376
26442
  import {
26377
26443
  extractTextAttachments as extractTextAttachments2,
26378
26444
  getTextContent as getTextContent3,
@@ -26381,18 +26447,16 @@ import {
26381
26447
 
26382
26448
  // src/chat/lib/citations.ts
26383
26449
  function sameEvidence(a, b2) {
26384
- return a.kbName === b2.kbName && a.title === b2.title && a.path === b2.path && a.page === b2.page && a.heading === b2.heading && a.text === b2.text;
26450
+ return a.title === b2.title && a.text === b2.text && a.toolCallId === b2.toolCallId && a.itemId === b2.itemId;
26385
26451
  }
26386
26452
  function buildCitationsFromToolCalls(toolCalls) {
26387
- const kbSearchCalls = (toolCalls ?? []).filter(
26388
- (call) => formatToolName(call.name) === "KbSearch" && call.status === "done"
26389
- );
26453
+ const successfulCalls = (toolCalls ?? []).filter((call) => call.status === "done");
26390
26454
  const merged = /* @__PURE__ */ new Map();
26391
26455
  const ambiguous = /* @__PURE__ */ new Set();
26392
- for (const call of kbSearchCalls) {
26393
- const parsed = parseKbSearchResult(call.result);
26394
- if (!parsed) continue;
26395
- for (const hit of parsed.hits) {
26456
+ for (const call of successfulCalls) {
26457
+ const hits = parsePluginEvidence(call);
26458
+ if (!hits) continue;
26459
+ for (const hit of hits) {
26396
26460
  const existing = merged.get(hit.n);
26397
26461
  if (existing && !sameEvidence(existing, hit)) {
26398
26462
  ambiguous.add(hit.n);
@@ -26408,6 +26472,32 @@ function buildCitationsFromToolCalls(toolCalls) {
26408
26472
  }
26409
26473
  return map3;
26410
26474
  }
26475
+ function parsePluginEvidence(call) {
26476
+ const items = call.evidence;
26477
+ if (!Array.isArray(items)) return void 0;
26478
+ return items.flatMap((item) => {
26479
+ if (!item || typeof item !== "object") return [];
26480
+ const entry = item;
26481
+ if (!Number.isSafeInteger(entry.n) || Number(entry.n) < 1 || entry.tool_call_id !== call.id && entry.parent_tool_call_id !== call.id || typeof entry.id !== "string" || typeof entry.title !== "string" || typeof entry.text !== "string") return [];
26482
+ let url2 = null;
26483
+ if (typeof entry.url === "string") {
26484
+ try {
26485
+ const parsed = new URL(entry.url);
26486
+ if (["https:", "http:"].includes(parsed.protocol) && !parsed.username && !parsed.password) url2 = parsed.href;
26487
+ } catch {
26488
+ }
26489
+ }
26490
+ return [{
26491
+ n: Number(entry.n),
26492
+ title: entry.title,
26493
+ text: entry.text,
26494
+ snapshot: true,
26495
+ toolCallId: String(entry.tool_call_id),
26496
+ itemId: entry.id,
26497
+ previewUrl: url2
26498
+ }];
26499
+ });
26500
+ }
26411
26501
 
26412
26502
  // src/chat/LiteMessageList.tsx
26413
26503
  import { chatErrorForDisplay as chatErrorForDisplay2, isBackgroundWakeMessage as isBackgroundWakeMessage2 } from "@blade-hq/agent-client/internal";
@@ -26432,13 +26522,13 @@ function BackgroundWakeNotice() {
26432
26522
  }
26433
26523
 
26434
26524
  // src/components/MessageImage.tsx
26435
- import { forwardRef, useEffect as useEffect7, useImperativeHandle, useRef as useRef7, useState as useState8 } from "react";
26525
+ import { forwardRef, useEffect as useEffect7, useImperativeHandle, useRef as useRef8, useState as useState8 } from "react";
26436
26526
  import { jsx as jsx10 } from "react/jsx-runtime";
26437
26527
  var assetPattern = /^\/api\/(sessions|share)\/([^/]+)\/media\/([a-f0-9]{64})$/;
26438
26528
  var MessageImage = forwardRef(function MessageImage2({ client: suppliedClient, src, original = false, alt, style, ...props }, ref) {
26439
26529
  const contextClient = useOptionalBladeClient();
26440
26530
  const client = suppliedClient ?? contextClient;
26441
- const element2 = useRef7(null);
26531
+ const element2 = useRef8(null);
26442
26532
  useImperativeHandle(ref, () => element2.current);
26443
26533
  const [visible, setVisible] = useState8(false);
26444
26534
  const [result, setResult] = useState8(null);
@@ -26497,7 +26587,7 @@ var MessageImage = forwardRef(function MessageImage2({ client: suppliedClient, s
26497
26587
  });
26498
26588
 
26499
26589
  // src/chat/AssistantTurnBlock.tsx
26500
- import { memo as memo5, useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo11, useRef as useRef14, useState as useState22 } from "react";
26590
+ import { memo as memo5, useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo11, useRef as useRef15, useState as useState22 } from "react";
26501
26591
  import { getFileParts as getFileParts2, getImageParts as getImageParts2, getTextContent as getTextContent2, normalizeMessageContent } from "@blade-hq/agent-client/internal";
26502
26592
 
26503
26593
  // src/chat/lib/ui-meta.ts
@@ -26561,7 +26651,7 @@ import {
26561
26651
  useContext as useContext5,
26562
26652
  useEffect as useEffect8,
26563
26653
  useMemo as useMemo5,
26564
- useRef as useRef10,
26654
+ useRef as useRef11,
26565
26655
  useState as useState10
26566
26656
  } from "react";
26567
26657
 
@@ -26597,7 +26687,7 @@ var ShimmerComponent = ({
26597
26687
  var Shimmer = memo3(ShimmerComponent);
26598
26688
 
26599
26689
  // src/components/markdown/index.ts
26600
- import { createElement as createElement3, useRef as useRef8 } from "react";
26690
+ import { createElement as createElement3, useRef as useRef9 } from "react";
26601
26691
 
26602
26692
  // ../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
26603
26693
  var emptyOptions = {};
@@ -35475,10 +35565,10 @@ function MarkdownRenderer({
35475
35565
  codeBlockOverrides
35476
35566
  }) {
35477
35567
  const isStreaming = mode === "streaming";
35478
- const cacheRef = useRef8(createParseCache());
35479
- const blockCacheRef = useRef8(/* @__PURE__ */ new WeakMap());
35480
- const groupIdentityMapRef = useRef8(/* @__PURE__ */ new WeakMap());
35481
- const rendererConfigRef = useRef8(null);
35568
+ const cacheRef = useRef9(createParseCache());
35569
+ const blockCacheRef = useRef9(/* @__PURE__ */ new WeakMap());
35570
+ const groupIdentityMapRef = useRef9(/* @__PURE__ */ new WeakMap());
35571
+ const rendererConfigRef = useRef9(null);
35482
35572
  const previousConfig = rendererConfigRef.current;
35483
35573
  if (!previousConfig || previousConfig.allowedTags !== allowedTags || previousConfig.components !== components || previousConfig.rawHtmlPlugins !== rawHtmlPlugins || previousConfig.codeBlockOverrides !== codeBlockOverrides) {
35484
35574
  blockCacheRef.current = /* @__PURE__ */ new WeakMap();
@@ -35608,7 +35698,7 @@ function normalizeAdjacentUrlFormatting(value) {
35608
35698
  }
35609
35699
 
35610
35700
  // src/chat/markdown/MarkdownContent.tsx
35611
- import { isValidElement, useMemo as useMemo4, useRef as useRef9, useState as useState9 } from "react";
35701
+ import { isValidElement, useMemo as useMemo4, useRef as useRef10, useState as useState9 } from "react";
35612
35702
 
35613
35703
  // src/chat/lib/markdown-asset-url.ts
35614
35704
  function isAbsoluteAssetUrl(src, hasFileContext) {
@@ -35722,6 +35812,7 @@ function InlineToolCallBlock({
35722
35812
  }
35723
35813
  function CitationRefBlock({ "data-n": dataN, citations }) {
35724
35814
  const overlayRoot = useOverlayRoot();
35815
+ const [snapshotOpen, setSnapshotOpen] = useState9(false);
35725
35816
  const n2 = Number(dataN);
35726
35817
  const entry = Number.isFinite(n2) ? citations?.[n2] : void 0;
35727
35818
  if (!entry) return /* @__PURE__ */ jsxs10(Fragment6, { children: [
@@ -35730,48 +35821,51 @@ function CitationRefBlock({ "data-n": dataN, citations }) {
35730
35821
  "]"
35731
35822
  ] });
35732
35823
  const handleClick = () => {
35733
- if (entry.previewUrl) {
35824
+ if (entry.snapshot) {
35825
+ setSnapshotOpen(true);
35826
+ } else if (entry.previewUrl) {
35734
35827
  window.open(entry.previewUrl, "_blank", "noopener,noreferrer");
35735
35828
  }
35736
35829
  };
35737
- return /* @__PURE__ */ jsx14(dist_exports2.Provider, { delayDuration: 150, children: /* @__PURE__ */ jsxs10(dist_exports2.Root, { children: [
35738
- /* @__PURE__ */ jsx14(dist_exports2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx14(
35739
- "button",
35740
- {
35741
- type: "button",
35742
- onClick: handleClick,
35743
- className: cn(
35744
- "not-prose mx-0.5 inline-flex h-4 min-w-4 shrink-0 translate-y-[-2px] items-center justify-center rounded px-1 align-super text-[10px] leading-none font-medium",
35745
- "bg-[hsl(var(--muted))]/60 text-[hsl(var(--muted-foreground))] transition-colors",
35746
- entry.previewUrl ? "cursor-pointer hover:bg-[hsl(var(--muted))] hover:text-[hsl(var(--foreground))]" : "cursor-default"
35747
- ),
35748
- "aria-label": `\u5F15\u7528\u6765\u6E90\uFF1A${entry.title}${entry.page ? ` \u7B2C ${entry.page} \u9875` : ""}`,
35749
- children: entry.n
35750
- }
35751
- ) }),
35752
- /* @__PURE__ */ jsx14(dist_exports2.Portal, { container: overlayRoot, children: /* @__PURE__ */ jsxs10(
35753
- dist_exports2.Content,
35754
- {
35755
- side: "top",
35756
- sideOffset: 6,
35757
- className: "z-[70] flex max-w-sm origin-(--radix-tooltip-content-transform-origin) flex-col gap-1 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--popover))] px-3 py-2 text-left text-[12px] leading-5 whitespace-normal text-[hsl(var(--popover-foreground))] shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:animate-in data-[state=instant-open]:fade-in-0 data-[state=instant-open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
35758
- children: [
35759
- /* @__PURE__ */ jsxs10("div", { className: "font-medium", children: [
35760
- entry.title,
35761
- entry.page ? ` \xB7 \u7B2C ${entry.page} \u9875` : ""
35762
- ] }),
35763
- entry.kbName ? /* @__PURE__ */ jsxs10("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
35764
- "\u300A",
35765
- entry.kbName,
35766
- "\u300B"
35767
- ] }) : null,
35768
- entry.text ? /* @__PURE__ */ jsx14("div", { className: "line-clamp-4 text-[hsl(var(--muted-foreground))]", children: entry.text }) : null,
35769
- entry.previewUrl ? /* @__PURE__ */ jsx14("div", { className: "text-[10px] text-[hsl(var(--muted-foreground))]/70", children: "\u70B9\u51FB\u67E5\u770B\u539F\u6587" }) : null,
35770
- /* @__PURE__ */ jsx14(dist_exports2.Arrow, { className: "fill-[hsl(var(--popover))]" })
35771
- ]
35772
- }
35773
- ) })
35774
- ] }) });
35830
+ return /* @__PURE__ */ jsxs10(dist_exports2.Provider, { delayDuration: 150, children: [
35831
+ /* @__PURE__ */ jsxs10(dist_exports2.Root, { children: [
35832
+ /* @__PURE__ */ jsx14(dist_exports2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx14(
35833
+ "button",
35834
+ {
35835
+ type: "button",
35836
+ onClick: handleClick,
35837
+ className: cn(
35838
+ "not-prose mx-0.5 inline-flex h-4 min-w-4 shrink-0 translate-y-[-2px] items-center justify-center rounded px-1 align-super text-[10px] leading-none font-medium",
35839
+ "bg-[hsl(var(--muted))]/60 text-[hsl(var(--muted-foreground))] transition-colors",
35840
+ entry.snapshot || entry.previewUrl ? "cursor-pointer hover:bg-[hsl(var(--muted))] hover:text-[hsl(var(--foreground))]" : "cursor-default"
35841
+ ),
35842
+ "aria-label": `\u5F15\u7528\u6765\u6E90\uFF1A${entry.title}`,
35843
+ children: entry.n
35844
+ }
35845
+ ) }),
35846
+ /* @__PURE__ */ jsx14(dist_exports2.Portal, { container: overlayRoot, children: /* @__PURE__ */ jsxs10(
35847
+ dist_exports2.Content,
35848
+ {
35849
+ side: "top",
35850
+ sideOffset: 6,
35851
+ className: "z-[70] flex max-w-sm origin-(--radix-tooltip-content-transform-origin) flex-col gap-1 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--popover))] px-3 py-2 text-left text-[12px] leading-5 whitespace-normal text-[hsl(var(--popover-foreground))] shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:animate-in data-[state=instant-open]:fade-in-0 data-[state=instant-open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
35852
+ children: [
35853
+ /* @__PURE__ */ jsx14("div", { className: "font-medium", children: entry.title }),
35854
+ entry.text ? /* @__PURE__ */ jsx14("div", { className: "line-clamp-4 text-[hsl(var(--muted-foreground))]", children: entry.text }) : null,
35855
+ entry.snapshot || entry.previewUrl ? /* @__PURE__ */ jsx14("div", { className: "text-[10px] text-[hsl(var(--muted-foreground))]/70", children: "\u70B9\u51FB\u67E5\u770B\u539F\u6587" }) : null,
35856
+ /* @__PURE__ */ jsx14(dist_exports2.Arrow, { className: "fill-[hsl(var(--popover))]" })
35857
+ ]
35858
+ }
35859
+ ) })
35860
+ ] }),
35861
+ entry.snapshot ? /* @__PURE__ */ jsx14(Dialog, { open: snapshotOpen, onOpenChange: setSnapshotOpen, children: /* @__PURE__ */ jsxs10(DialogContent, { "aria-describedby": void 0, className: "max-h-[80vh] overflow-y-auto", children: [
35862
+ /* @__PURE__ */ jsx14(DialogTitle, { children: entry.title }),
35863
+ /* @__PURE__ */ jsx14("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u56DE\u7B54\u65F6\u4FDD\u5B58\u7684\u539F\u6587" }),
35864
+ /* @__PURE__ */ jsx14("div", { className: "whitespace-pre-wrap break-words text-sm", children: entry.text.slice(0, 2e4) }),
35865
+ entry.text.length > 2e4 ? /* @__PURE__ */ jsx14("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u539F\u6587\u8F83\u957F\uFF0C\u6B64\u5904\u663E\u793A\u524D 20000 \u5B57\u7B26\uFF1B\u5B8C\u6574\u5185\u5BB9\u5DF2\u4FDD\u5B58\u5728\u5BF9\u8BDD\u4E2D\u3002" }) : null,
35866
+ entry.previewUrl ? /* @__PURE__ */ jsx14(ExternalAnchor, { href: entry.previewUrl, children: "\u6253\u5F00\u6765\u6E90\u9875\u9762" }) : null
35867
+ ] }) }) : null
35868
+ ] });
35775
35869
  }
35776
35870
  function extractText(value) {
35777
35871
  if (typeof value === "string" || typeof value === "number") return String(value);
@@ -35793,7 +35887,7 @@ function resolveCollapsedContent({
35793
35887
  return decodeCollapsedContent(dataRawAttribute) || extractText(children).trim();
35794
35888
  }
35795
35889
  function CodeBlockPre({ children, ...props }) {
35796
- const preRef = useRef9(null);
35890
+ const preRef = useRef10(null);
35797
35891
  const [copied, setCopied] = useState9(false);
35798
35892
  const codeChild = Array.isArray(children) ? children[0] : children;
35799
35893
  const hasCodeNode = isValidElement(codeChild);
@@ -36058,7 +36152,7 @@ var Reasoning = memo4(
36058
36152
  defaultProp: void 0,
36059
36153
  prop: durationProp
36060
36154
  });
36061
- const startTimeRef = useRef10(null);
36155
+ const startTimeRef = useRef11(null);
36062
36156
  useEffect8(() => {
36063
36157
  if (isStreaming) {
36064
36158
  if (startTimeRef.current === null) {
@@ -36592,7 +36686,7 @@ import {
36592
36686
  } from "@blade-hq/agent-client/internal";
36593
36687
 
36594
36688
  // src/chat/AskUserQuestionBlock.tsx
36595
- import { useEffect as useEffect10, useMemo as useMemo7, useRef as useRef11, useState as useState14 } from "react";
36689
+ import { useEffect as useEffect10, useMemo as useMemo7, useRef as useRef12, useState as useState14 } from "react";
36596
36690
  import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
36597
36691
  var CUSTOM_TEXTAREA_MAX_HEIGHT = 160;
36598
36692
  function resizeCustomTextarea(textarea) {
@@ -36601,7 +36695,7 @@ function resizeCustomTextarea(textarea) {
36601
36695
  textarea.style.overflowY = textarea.scrollHeight > CUSTOM_TEXTAREA_MAX_HEIGHT ? "auto" : "hidden";
36602
36696
  }
36603
36697
  function useAutoResizeTextarea(value) {
36604
- const textareaRef = useRef11(null);
36698
+ const textareaRef = useRef12(null);
36605
36699
  useEffect10(() => {
36606
36700
  const textarea = textareaRef.current;
36607
36701
  if (textarea?.value === value) resizeCustomTextarea(textarea);
@@ -37003,26 +37097,6 @@ function parseAskUserQuestion(toolResult) {
37003
37097
  }
37004
37098
  return null;
37005
37099
  }
37006
- function parseAskUserQuestionError(toolResult) {
37007
- if (!toolResult) return null;
37008
- try {
37009
- const parsed = JSON.parse(toolResult);
37010
- let detail = null;
37011
- if (typeof parsed.error === "string") detail = parsed.error;
37012
- if (parsed.error && typeof parsed.error === "object") {
37013
- const message = parsed.error.message;
37014
- if (typeof message === "string") detail = message;
37015
- }
37016
- if (!detail && typeof parsed.message === "string") detail = parsed.message;
37017
- if (!detail) return null;
37018
- return {
37019
- message: parsed.error_code === "invalid_questions" ? "\u63D0\u95EE\u5185\u5BB9\u4E0D\u5B8C\u6574\uFF0C\u5F53\u524D\u6CA1\u6709\u7B49\u5F85\u4F60\u56DE\u7B54\u3002\u8BF7\u8BA9\u667A\u80FD\u4F53\u91CD\u65B0\u63D0\u95EE\u3002" : "\u8FD9\u6B21\u63D0\u95EE\u6CA1\u6709\u6210\u529F\uFF0C\u5F53\u524D\u6CA1\u6709\u7B49\u5F85\u4F60\u56DE\u7B54\u3002\u8BF7\u8BA9\u667A\u80FD\u4F53\u91CD\u65B0\u63D0\u95EE\u3002",
37020
- detail
37021
- };
37022
- } catch {
37023
- return null;
37024
- }
37025
- }
37026
37100
  function normalizeQuestionItem(value) {
37027
37101
  if (!value || typeof value !== "object") return null;
37028
37102
  const item = value;
@@ -37046,8 +37120,137 @@ function normalizeOptionItem(value) {
37046
37120
  };
37047
37121
  }
37048
37122
 
37123
+ // src/chat/lib/code-language.ts
37124
+ var FILE_EXTENSION_ALIASES = {
37125
+ ".bash": "bash",
37126
+ ".css": "css",
37127
+ ".go": "go",
37128
+ ".htm": "html",
37129
+ ".html": "html",
37130
+ ".js": "javascript",
37131
+ ".json": "json",
37132
+ ".jsonc": "json",
37133
+ ".jsx": "jsx",
37134
+ ".md": "markdown",
37135
+ ".mdx": "markdown",
37136
+ ".py": "python",
37137
+ ".rs": "rust",
37138
+ ".scss": "css",
37139
+ ".sh": "bash",
37140
+ ".ts": "typescript",
37141
+ ".tsx": "tsx",
37142
+ ".yaml": "yaml",
37143
+ ".yml": "yaml",
37144
+ ".zsh": "bash"
37145
+ };
37146
+ function getCodeLanguageFromFilename(filePath) {
37147
+ if (!filePath) return null;
37148
+ const dotIndex = filePath.lastIndexOf(".");
37149
+ if (dotIndex < 0) return null;
37150
+ return FILE_EXTENSION_ALIASES[filePath.slice(dotIndex).toLowerCase()] ?? null;
37151
+ }
37152
+
37153
+ // src/chat/tool-renderers/shared.tsx
37154
+ import { jsx as jsx22 } from "react/jsx-runtime";
37155
+ function getResultText(result) {
37156
+ if (typeof result === "string") return result;
37157
+ if (Array.isArray(result)) {
37158
+ const texts = result.filter(
37159
+ (p2) => typeof p2 === "object" && p2 !== null && p2.type === "text" && typeof p2.text === "string"
37160
+ ).map((p2) => p2.text);
37161
+ return texts.length > 0 ? texts.join("\n") : null;
37162
+ }
37163
+ return result != null ? String(result) : null;
37164
+ }
37165
+ function getResultImages(result) {
37166
+ if (!Array.isArray(result)) return [];
37167
+ return result.filter(
37168
+ (p2) => typeof p2 === "object" && p2 !== null && p2.type === "image_url" && typeof p2.image_url?.url === "string"
37169
+ ).map((p2) => p2.image_url);
37170
+ }
37171
+ function parseJsonValue(value) {
37172
+ if (!value) return null;
37173
+ try {
37174
+ return JSON.parse(value);
37175
+ } catch {
37176
+ return null;
37177
+ }
37178
+ }
37179
+ function isPlainObject3(value) {
37180
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
37181
+ }
37182
+ function getStringValue(data, key) {
37183
+ const value = data?.[key];
37184
+ return typeof value === "string" && value.trim() ? value.trim() : null;
37185
+ }
37186
+ function getNumberValue(data, key) {
37187
+ const value = data?.[key];
37188
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
37189
+ }
37190
+ function getBooleanValue(data, key) {
37191
+ return data?.[key] === true;
37192
+ }
37193
+ function extractErrorMessage(value) {
37194
+ const text4 = typeof value === "string" ? value : getResultText(value);
37195
+ if (!text4?.trim()) return null;
37196
+ const parsed = parseJsonValue(text4);
37197
+ if (!isPlainObject3(parsed)) return null;
37198
+ return typeof parsed.error === "string" && parsed.error.trim() ? parsed.error.trim() : null;
37199
+ }
37200
+ function getFileName(filePath) {
37201
+ if (!filePath) return "\u672A\u547D\u540D\u6587\u4EF6";
37202
+ return filePath.split(/[\\/]/).pop() ?? filePath;
37203
+ }
37204
+ function getCodeLanguage(filePath) {
37205
+ return getCodeLanguageFromFilename(filePath);
37206
+ }
37207
+ function formatBytes(size) {
37208
+ if (typeof size !== "number" || !Number.isFinite(size) || size < 0) return null;
37209
+ if (size < 1024) return `${size} B`;
37210
+ if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KB`;
37211
+ return `${(size / (1024 * 1024)).toFixed(1)} MB`;
37212
+ }
37213
+ function CodePreview({
37214
+ content: content3,
37215
+ filePath,
37216
+ emptyLabel = "\uFF08\u6682\u65E0\u5185\u5BB9\uFF09",
37217
+ className
37218
+ }) {
37219
+ const { highlightedHtml } = useHighlightedCode(content3, getCodeLanguage(filePath));
37220
+ if (!content3.trim()) {
37221
+ return /* @__PURE__ */ jsx22(
37222
+ "pre",
37223
+ {
37224
+ className: cn(
37225
+ "overflow-auto rounded-lg border border-[hsl(var(--border))]",
37226
+ "bg-[hsl(var(--muted))]/35 p-3 font-mono text-[11px] text-[hsl(var(--muted-foreground))]",
37227
+ className
37228
+ ),
37229
+ children: /* @__PURE__ */ jsx22("code", { children: emptyLabel })
37230
+ }
37231
+ );
37232
+ }
37233
+ return /* @__PURE__ */ jsx22(
37234
+ "pre",
37235
+ {
37236
+ className: cn(
37237
+ "overflow-auto rounded-lg border border-[hsl(var(--border))]",
37238
+ "bg-[hsl(var(--muted))]/35 p-3 text-[11px]",
37239
+ className
37240
+ ),
37241
+ children: highlightedHtml ? /* @__PURE__ */ jsx22(
37242
+ "code",
37243
+ {
37244
+ className: "font-mono",
37245
+ dangerouslySetInnerHTML: { __html: highlightedHtml }
37246
+ }
37247
+ ) : /* @__PURE__ */ jsx22("code", { className: "whitespace-pre-wrap break-words font-mono text-[hsl(var(--foreground))]", children: content3 })
37248
+ }
37249
+ );
37250
+ }
37251
+
37049
37252
  // src/chat/tool-renderers/BashRenderer.tsx
37050
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
37253
+ import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
37051
37254
  function pickOutputField(data) {
37052
37255
  if (!data) return null;
37053
37256
  for (const key of ["output", "stdout", "stderr"]) {
@@ -37057,15 +37260,15 @@ function pickOutputField(data) {
37057
37260
  return null;
37058
37261
  }
37059
37262
  function MetaPill({ label }) {
37060
- return /* @__PURE__ */ jsx22("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-[10px] text-secondary-foreground", children: label });
37263
+ return /* @__PURE__ */ jsx23("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-[10px] text-secondary-foreground", children: label });
37061
37264
  }
37062
37265
  function BashRenderer({ toolCall }) {
37063
37266
  const argsValue = parseJsonValue(toolCall.arguments);
37064
37267
  const rawText = getResultText(toolCall.result);
37065
37268
  const resultStr = typeof rawText === "string" && rawText.trim().length > 0 ? rawText : null;
37066
37269
  const resultValue = parseJsonValue(resultStr);
37067
- const args = isPlainObject(argsValue) ? argsValue : null;
37068
- const result = isPlainObject(resultValue) ? resultValue : null;
37270
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37271
+ const result = isPlainObject3(resultValue) ? resultValue : null;
37069
37272
  const normalizedName = formatToolName(toolCall.name);
37070
37273
  const command = getStringValue(result, "command") ?? getStringValue(args, "command") ?? "";
37071
37274
  const description = getStringValue(args, "description") ?? getStringValue(result, "description") ?? "";
@@ -37082,12 +37285,12 @@ function BashRenderer({ toolCall }) {
37082
37285
  const hasFailure = toolCall.status === "error" || timedOut || exitCode !== null && exitCode !== 0;
37083
37286
  return /* @__PURE__ */ jsxs17("div", { className: "space-y-3", children: [
37084
37287
  (description || cwd) && /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center gap-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37085
- description ? /* @__PURE__ */ jsx22("span", { children: description }) : null,
37086
- cwd ? /* @__PURE__ */ jsx22("span", { className: "rounded-full bg-[hsl(var(--muted))] px-2 py-0.5 font-mono", children: cwd }) : null
37288
+ description ? /* @__PURE__ */ jsx23("span", { children: description }) : null,
37289
+ cwd ? /* @__PURE__ */ jsx23("span", { className: "rounded-full bg-[hsl(var(--muted))] px-2 py-0.5 font-mono", children: cwd }) : null
37087
37290
  ] }),
37088
37291
  /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [
37089
- /* @__PURE__ */ jsx22("div", { className: "border-b border-border px-3 py-2 text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u547D\u4EE4" }),
37090
- /* @__PURE__ */ jsx22("pre", { className: "overflow-x-auto px-3 py-3 font-mono text-[11px] leading-5 text-foreground", children: /* @__PURE__ */ jsx22("code", { children: `$ ${command || "\uFF08\u672A\u63D0\u4F9B\u547D\u4EE4\uFF09"}` }) })
37292
+ /* @__PURE__ */ jsx23("div", { className: "border-b border-border px-3 py-2 text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u547D\u4EE4" }),
37293
+ /* @__PURE__ */ jsx23("pre", { className: "overflow-x-auto px-3 py-3 font-mono text-[11px] leading-5 text-foreground", children: /* @__PURE__ */ jsx23("code", { children: `$ ${command || "\uFF08\u672A\u63D0\u4F9B\u547D\u4EE4\uFF09"}` }) })
37091
37294
  ] }),
37092
37295
  /* @__PURE__ */ jsxs17(
37093
37296
  "div",
@@ -37098,25 +37301,25 @@ function BashRenderer({ toolCall }) {
37098
37301
  ),
37099
37302
  children: [
37100
37303
  /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center justify-between gap-2 border-b border-border px-3 py-2", children: [
37101
- /* @__PURE__ */ jsx22("div", { className: "text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u8F93\u51FA" }),
37304
+ /* @__PURE__ */ jsx23("div", { className: "text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u8F93\u51FA" }),
37102
37305
  /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center gap-1.5", children: [
37103
- taskId ? /* @__PURE__ */ jsx22(MetaPill, { label: `\u4EFB\u52A1 ${taskId}` }) : null,
37104
- exitCode !== null ? /* @__PURE__ */ jsx22(MetaPill, { label: `\u9000\u51FA\u7801 ${exitCode}` }) : null,
37105
- timedOut ? /* @__PURE__ */ jsx22(MetaPill, { label: "\u5DF2\u8D85\u65F6" }) : null,
37106
- truncated ? /* @__PURE__ */ jsx22(MetaPill, { label: "\u8F93\u51FA\u5DF2\u622A\u65AD" }) : null,
37107
- normalizedName === "BgBash" && !taskId ? /* @__PURE__ */ jsx22(MetaPill, { label: "\u540E\u53F0\u4EFB\u52A1" }) : null
37306
+ taskId ? /* @__PURE__ */ jsx23(MetaPill, { label: `\u4EFB\u52A1 ${taskId}` }) : null,
37307
+ exitCode !== null ? /* @__PURE__ */ jsx23(MetaPill, { label: `\u9000\u51FA\u7801 ${exitCode}` }) : null,
37308
+ timedOut ? /* @__PURE__ */ jsx23(MetaPill, { label: "\u5DF2\u8D85\u65F6" }) : null,
37309
+ truncated ? /* @__PURE__ */ jsx23(MetaPill, { label: "\u8F93\u51FA\u5DF2\u622A\u65AD" }) : null,
37310
+ normalizedName === "BgBash" && !taskId ? /* @__PURE__ */ jsx23(MetaPill, { label: "\u540E\u53F0\u4EFB\u52A1" }) : null
37108
37311
  ] })
37109
37312
  ] }),
37110
- /* @__PURE__ */ jsx22("pre", { className: "max-h-[280px] overflow-auto px-3 py-3 font-mono text-[11px] leading-5 text-foreground", children: /* @__PURE__ */ jsx22("code", { className: "whitespace-pre-wrap break-words", children: output2 !== null && output2.trim().length > 0 ? output2 : normalizedName === "BgBash" ? "\u4EFB\u52A1\u5DF2\u8FDB\u5165\u540E\u53F0\u6267\u884C\uFF0C\u8F93\u51FA\u4F1A\u5728\u540E\u53F0\u4EFB\u52A1\u9762\u677F\u4E2D\u7EE7\u7EED\u66F4\u65B0\u3002" : output2 !== null && output2.trim().length === 0 && hasFailure ? "\u547D\u4EE4\u5DF2\u7ED3\u675F\uFF0C\u4F46\u672A\u6355\u83B7\u5230\u7EC8\u7AEF\u8F93\u51FA\uFF08\u8BF7\u67E5\u770B\u9000\u51FA\u7801\uFF09\u3002" : "\u547D\u4EE4\u672A\u8FD4\u56DE\u8F93\u51FA\u3002" }) })
37313
+ /* @__PURE__ */ jsx23("pre", { className: "max-h-[280px] overflow-auto px-3 py-3 font-mono text-[11px] leading-5 text-foreground", children: /* @__PURE__ */ jsx23("code", { className: "whitespace-pre-wrap break-words", children: output2 !== null && output2.trim().length > 0 ? output2 : normalizedName === "BgBash" ? "\u4EFB\u52A1\u5DF2\u8FDB\u5165\u540E\u53F0\u6267\u884C\uFF0C\u8F93\u51FA\u4F1A\u5728\u540E\u53F0\u4EFB\u52A1\u9762\u677F\u4E2D\u7EE7\u7EED\u66F4\u65B0\u3002" : output2 !== null && output2.trim().length === 0 && hasFailure ? "\u547D\u4EE4\u5DF2\u7ED3\u675F\uFF0C\u4F46\u672A\u6355\u83B7\u5230\u7EC8\u7AEF\u8F93\u51FA\uFF08\u8BF7\u67E5\u770B\u9000\u51FA\u7801\uFF09\u3002" : "\u547D\u4EE4\u672A\u8FD4\u56DE\u8F93\u51FA\u3002" }) })
37111
37314
  ]
37112
37315
  }
37113
37316
  ),
37114
- cwdResetNote ? /* @__PURE__ */ jsx22("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: cwdResetNote }) : null
37317
+ cwdResetNote ? /* @__PURE__ */ jsx23("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: cwdResetNote }) : null
37115
37318
  ] });
37116
37319
  }
37117
37320
 
37118
37321
  // src/chat/tool-renderers/FileEditRenderer.tsx
37119
- import { useLayoutEffect as useLayoutEffect3, useRef as useRef12 } from "react";
37322
+ import { useLayoutEffect as useLayoutEffect3, useRef as useRef13 } from "react";
37120
37323
 
37121
37324
  // src/chat/tool-renderers/write-preview-scroll.ts
37122
37325
  function shouldFollowWritePreview(toolName, status) {
@@ -37127,7 +37330,7 @@ function scrollWritePreviewToLatest(preview) {
37127
37330
  }
37128
37331
 
37129
37332
  // src/chat/tool-renderers/FileEditRenderer.tsx
37130
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
37333
+ import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
37131
37334
  var MAX_DIFF_LINES = 200;
37132
37335
  var FILE_PATH_FIELDS = ["file_path", "path"];
37133
37336
  function computeDiff(oldText, newText) {
@@ -37198,7 +37401,7 @@ function buildEditPreview(args, rawArguments) {
37198
37401
  const edits = Array.isArray(args?.edits) ? args.edits : null;
37199
37402
  if (edits) {
37200
37403
  return edits.flatMap((rawEdit, index2) => {
37201
- if (!isPlainObject(rawEdit)) {
37404
+ if (!isPlainObject3(rawEdit)) {
37202
37405
  return [];
37203
37406
  }
37204
37407
  const oldText = getStringValue(rawEdit, "old_text") ?? "";
@@ -37309,10 +37512,10 @@ function readJsonString(raw, start) {
37309
37512
  return { value: chars.join(""), closed: false };
37310
37513
  }
37311
37514
  function FileEditRenderer({ toolCall }) {
37312
- const previewRef = useRef12(null);
37515
+ const previewRef = useRef13(null);
37313
37516
  const rawArguments = toolCall.arguments ?? "";
37314
37517
  const argsValue = parseJsonValue(toolCall.arguments);
37315
- const args = isPlainObject(argsValue) ? argsValue : null;
37518
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37316
37519
  const normalizedName = formatToolName(toolCall.name);
37317
37520
  const partialFilePath = extractJsonStringFieldPartial(rawArguments, FILE_PATH_FIELDS);
37318
37521
  const filePath = extractToolFilePath(toolCall) ?? partialFilePath;
@@ -37335,16 +37538,16 @@ function FileEditRenderer({ toolCall }) {
37335
37538
  return /* @__PURE__ */ jsxs18("div", { className: "space-y-3", children: [
37336
37539
  /* @__PURE__ */ jsxs18("div", { className: "flex items-start justify-between gap-3", children: [
37337
37540
  /* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
37338
- /* @__PURE__ */ jsx23("div", { className: "text-[10px] uppercase tracking-[0.16em] text-[hsl(var(--muted-foreground))]", children: normalizedName === "Write" ? "\u5199\u5165\u6587\u4EF6" : "\u7F16\u8F91\u6587\u4EF6" }),
37339
- /* @__PURE__ */ jsx23("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: fileName })
37541
+ /* @__PURE__ */ jsx24("div", { className: "text-[10px] uppercase tracking-[0.16em] text-[hsl(var(--muted-foreground))]", children: normalizedName === "Write" ? "\u5199\u5165\u6587\u4EF6" : "\u7F16\u8F91\u6587\u4EF6" }),
37542
+ /* @__PURE__ */ jsx24("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: fileName })
37340
37543
  ] }),
37341
- checksum ? /* @__PURE__ */ jsx23("span", { className: "rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2 py-0.5 font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: checksum }) : null
37544
+ checksum ? /* @__PURE__ */ jsx24("span", { className: "rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2 py-0.5 font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: checksum }) : null
37342
37545
  ] }),
37343
- description ? /* @__PURE__ */ jsx23("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: description }) : null,
37344
- displayErrorMessage ? /* @__PURE__ */ jsx23("div", { className: "rounded-lg border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-[11px] text-[hsl(var(--swf-danger))]", children: displayErrorMessage }) : null,
37546
+ description ? /* @__PURE__ */ jsx24("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: description }) : null,
37547
+ displayErrorMessage ? /* @__PURE__ */ jsx24("div", { className: "rounded-lg border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-[11px] text-[hsl(var(--swf-danger))]", children: displayErrorMessage }) : null,
37345
37548
  /* @__PURE__ */ jsxs18("div", { className: "file-edit-preview overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20", children: [
37346
- /* @__PURE__ */ jsx23("div", { className: "border-b border-[hsl(var(--border))] px-3 py-2 text-[10px] uppercase tracking-[0.16em] text-[hsl(var(--muted-foreground))]", children: normalizedName === "Write" ? "\u5185\u5BB9\u9884\u89C8" : "\u53D8\u66F4\u9884\u89C8" }),
37347
- /* @__PURE__ */ jsx23(
37549
+ /* @__PURE__ */ jsx24("div", { className: "border-b border-[hsl(var(--border))] px-3 py-2 text-[10px] uppercase tracking-[0.16em] text-[hsl(var(--muted-foreground))]", children: normalizedName === "Write" ? "\u5185\u5BB9\u9884\u89C8" : "\u53D8\u66F4\u9884\u89C8" }),
37550
+ /* @__PURE__ */ jsx24(
37348
37551
  "pre",
37349
37552
  {
37350
37553
  ref: previewRef,
@@ -37361,7 +37564,7 @@ function FileEditRenderer({ toolCall }) {
37361
37564
  line.type === "unchanged" && "text-[hsl(var(--foreground))]"
37362
37565
  ),
37363
37566
  children: [
37364
- /* @__PURE__ */ jsx23("span", { className: "select-none py-0.5 text-right text-[10px] text-[hsl(var(--muted-foreground))]", children: line.line ?? "" }),
37567
+ /* @__PURE__ */ jsx24("span", { className: "select-none py-0.5 text-right text-[10px] text-[hsl(var(--muted-foreground))]", children: line.line ?? "" }),
37365
37568
  /* @__PURE__ */ jsxs18("span", { className: "min-w-0 whitespace-pre-wrap break-words py-0.5", children: [
37366
37569
  prefix,
37367
37570
  line.value
@@ -37370,11 +37573,11 @@ function FileEditRenderer({ toolCall }) {
37370
37573
  },
37371
37574
  `${line.type}-${line.line}-${index2}`
37372
37575
  );
37373
- }) : /* @__PURE__ */ jsx23("div", { className: "px-3 py-4 text-[11px] text-[hsl(var(--muted-foreground))]", children: "\u672A\u68C0\u6D4B\u5230\u53EF\u9884\u89C8\u7684\u53D8\u66F4\u3002" })
37576
+ }) : /* @__PURE__ */ jsx24("div", { className: "px-3 py-4 text-[11px] text-[hsl(var(--muted-foreground))]", children: "\u672A\u68C0\u6D4B\u5230\u53EF\u9884\u89C8\u7684\u53D8\u66F4\u3002" })
37374
37577
  }
37375
37578
  )
37376
37579
  ] }),
37377
- displaySummaryText ? /* @__PURE__ */ jsx23("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: displaySummaryText }) : null
37580
+ displaySummaryText ? /* @__PURE__ */ jsx24("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: displaySummaryText }) : null
37378
37581
  ] });
37379
37582
  }
37380
37583
 
@@ -37382,17 +37585,17 @@ function FileEditRenderer({ toolCall }) {
37382
37585
  import { useState as useState16 } from "react";
37383
37586
 
37384
37587
  // src/chat/ImageLightbox.tsx
37385
- import { useCallback as useCallback4, useEffect as useEffect11, useRef as useRef13, useState as useState15 } from "react";
37588
+ import { useCallback as useCallback4, useEffect as useEffect11, useRef as useRef14, useState as useState15 } from "react";
37386
37589
  import { createPortal } from "react-dom";
37387
- import { Fragment as Fragment10, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
37590
+ import { Fragment as Fragment10, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
37388
37591
  function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 }) {
37389
37592
  const [currentIndex, setCurrentIndex] = useState15(initialIndex);
37390
37593
  const [scale, setScale] = useState15(1);
37391
37594
  const [translate, setTranslate] = useState15({ x: 0, y: 0 });
37392
- const dragging = useRef13(false);
37393
- const dragStart = useRef13({ x: 0, y: 0 });
37394
- const translateStart = useRef13({ x: 0, y: 0 });
37395
- const imgRef = useRef13(null);
37595
+ const dragging = useRef14(false);
37596
+ const dragStart = useRef14({ x: 0, y: 0 });
37597
+ const translateStart = useRef14({ x: 0, y: 0 });
37598
+ const imgRef = useRef14(null);
37396
37599
  const [loadedSource, setLoadedSource] = useState15(null);
37397
37600
  const reset = useCallback4(() => {
37398
37601
  setScale(1);
@@ -37414,7 +37617,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37414
37617
  setCurrentIndex((i2) => Math.min(images.length - 1, i2 + 1));
37415
37618
  reset();
37416
37619
  }, [images.length, reset]);
37417
- const prevOpenRef = useRef13(false);
37620
+ const prevOpenRef = useRef14(false);
37418
37621
  useEffect11(() => {
37419
37622
  if (open2 && !prevOpenRef.current) {
37420
37623
  setLoadedSource(null);
@@ -37504,16 +37707,16 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37504
37707
  className: "fixed inset-0 z-50 flex animate-in items-center justify-center bg-black/80 fade-in-0 duration-(--motion-duration-fast)",
37505
37708
  onClick: close,
37506
37709
  children: [
37507
- /* @__PURE__ */ jsx24(
37710
+ /* @__PURE__ */ jsx25(
37508
37711
  "button",
37509
37712
  {
37510
37713
  type: "button",
37511
37714
  onClick: close,
37512
37715
  className: "absolute right-4 top-4 z-10 rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37513
- children: /* @__PURE__ */ jsx24(X, { size: 20 })
37716
+ children: /* @__PURE__ */ jsx25(X, { size: 20 })
37514
37717
  }
37515
37718
  ),
37516
- /* @__PURE__ */ jsx24("span", { className: "text-sm text-white/60", children: "\u52A0\u8F7D\u4E2D..." })
37719
+ /* @__PURE__ */ jsx25("span", { className: "text-sm text-white/60", children: "\u52A0\u8F7D\u4E2D..." })
37517
37720
  ]
37518
37721
  }
37519
37722
  ),
@@ -37536,7 +37739,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37536
37739
  className: "absolute right-4 top-4 z-10 flex items-center gap-1.5",
37537
37740
  onClick: (e) => e.stopPropagation(),
37538
37741
  children: [
37539
- /* @__PURE__ */ jsx24(
37742
+ /* @__PURE__ */ jsx25(
37540
37743
  "button",
37541
37744
  {
37542
37745
  type: "button",
@@ -37544,10 +37747,10 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37544
37747
  disabled: loadedSource !== current.src,
37545
37748
  title: loadedSource === current.src ? "\u4E0B\u8F7D\u56FE\u7247" : "\u539F\u56FE\u52A0\u8F7D\u4E2D",
37546
37749
  className: "rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37547
- children: /* @__PURE__ */ jsx24(Download, { size: 18 })
37750
+ children: /* @__PURE__ */ jsx25(Download, { size: 18 })
37548
37751
  }
37549
37752
  ),
37550
- /* @__PURE__ */ jsx24(
37753
+ /* @__PURE__ */ jsx25(
37551
37754
  "button",
37552
37755
  {
37553
37756
  type: "button",
@@ -37555,22 +37758,22 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37555
37758
  disabled: loadedSource !== current.src,
37556
37759
  title: loadedSource === current.src ? "\u65B0\u6807\u7B7E\u9875\u6253\u5F00" : "\u539F\u56FE\u52A0\u8F7D\u4E2D",
37557
37760
  className: "rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37558
- children: /* @__PURE__ */ jsx24(ExternalLink, { size: 18 })
37761
+ children: /* @__PURE__ */ jsx25(ExternalLink, { size: 18 })
37559
37762
  }
37560
37763
  ),
37561
- /* @__PURE__ */ jsx24(
37764
+ /* @__PURE__ */ jsx25(
37562
37765
  "button",
37563
37766
  {
37564
37767
  type: "button",
37565
37768
  onClick: close,
37566
37769
  className: "rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37567
- children: /* @__PURE__ */ jsx24(X, { size: 20 })
37770
+ children: /* @__PURE__ */ jsx25(X, { size: 20 })
37568
37771
  }
37569
37772
  )
37570
37773
  ]
37571
37774
  }
37572
37775
  ),
37573
- showNav && currentIndex > 0 && /* @__PURE__ */ jsx24(
37776
+ showNav && currentIndex > 0 && /* @__PURE__ */ jsx25(
37574
37777
  "button",
37575
37778
  {
37576
37779
  type: "button",
@@ -37579,10 +37782,10 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37579
37782
  goPrev();
37580
37783
  },
37581
37784
  className: "absolute left-4 top-1/2 z-10 -translate-y-1/2 rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37582
- children: /* @__PURE__ */ jsx24(ChevronLeft, { size: 24 })
37785
+ children: /* @__PURE__ */ jsx25(ChevronLeft, { size: 24 })
37583
37786
  }
37584
37787
  ),
37585
- showNav && currentIndex < images.length - 1 && /* @__PURE__ */ jsx24(
37788
+ showNav && currentIndex < images.length - 1 && /* @__PURE__ */ jsx25(
37586
37789
  "button",
37587
37790
  {
37588
37791
  type: "button",
@@ -37591,43 +37794,43 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37591
37794
  goNext();
37592
37795
  },
37593
37796
  className: "absolute right-4 top-1/2 z-10 -translate-y-1/2 rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37594
- children: /* @__PURE__ */ jsx24(ChevronRight, { size: 24 })
37797
+ children: /* @__PURE__ */ jsx25(ChevronRight, { size: 24 })
37595
37798
  }
37596
37799
  ),
37597
37800
  /* @__PURE__ */ jsxs19("div", { className: "absolute bottom-6 left-1/2 z-10 flex -translate-x-1/2 items-center gap-1 rounded-full bg-black/50 px-2 py-1", children: [
37598
- /* @__PURE__ */ jsx24(
37801
+ /* @__PURE__ */ jsx25(
37599
37802
  "button",
37600
37803
  {
37601
37804
  type: "button",
37602
37805
  onClick: zoomOut,
37603
37806
  className: "rounded-full p-1.5 text-white/80 transition-colors hover:bg-white/10 hover:text-white",
37604
- children: /* @__PURE__ */ jsx24(Minus, { size: 16 })
37807
+ children: /* @__PURE__ */ jsx25(Minus, { size: 16 })
37605
37808
  }
37606
37809
  ),
37607
37810
  /* @__PURE__ */ jsxs19("span", { className: "min-w-[3rem] text-center text-xs text-white/80", children: [
37608
37811
  Math.round(scale * 100),
37609
37812
  "%"
37610
37813
  ] }),
37611
- /* @__PURE__ */ jsx24(
37814
+ /* @__PURE__ */ jsx25(
37612
37815
  "button",
37613
37816
  {
37614
37817
  type: "button",
37615
37818
  onClick: zoomIn,
37616
37819
  className: "rounded-full p-1.5 text-white/80 transition-colors hover:bg-white/10 hover:text-white",
37617
- children: /* @__PURE__ */ jsx24(Plus, { size: 16 })
37820
+ children: /* @__PURE__ */ jsx25(Plus, { size: 16 })
37618
37821
  }
37619
37822
  ),
37620
- /* @__PURE__ */ jsx24(
37823
+ /* @__PURE__ */ jsx25(
37621
37824
  "button",
37622
37825
  {
37623
37826
  type: "button",
37624
37827
  onClick: reset,
37625
37828
  className: "rounded-full p-1.5 text-white/80 transition-colors hover:bg-white/10 hover:text-white",
37626
- children: /* @__PURE__ */ jsx24(RotateCcw, { size: 16 })
37829
+ children: /* @__PURE__ */ jsx25(RotateCcw, { size: 16 })
37627
37830
  }
37628
37831
  ),
37629
37832
  showNav && /* @__PURE__ */ jsxs19(Fragment10, { children: [
37630
- /* @__PURE__ */ jsx24("div", { className: "mx-1 h-4 w-px bg-white/20" }),
37833
+ /* @__PURE__ */ jsx25("div", { className: "mx-1 h-4 w-px bg-white/20" }),
37631
37834
  /* @__PURE__ */ jsxs19("span", { className: "min-w-[3rem] text-center text-xs text-white/80", children: [
37632
37835
  currentIndex + 1,
37633
37836
  " / ",
@@ -37635,7 +37838,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37635
37838
  ] })
37636
37839
  ] })
37637
37840
  ] }),
37638
- /* @__PURE__ */ jsx24(
37841
+ /* @__PURE__ */ jsx25(
37639
37842
  "div",
37640
37843
  {
37641
37844
  className: "flex h-full w-full items-center justify-center overflow-hidden p-12",
@@ -37646,7 +37849,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37646
37849
  onMouseUp: handleMouseUp,
37647
37850
  onMouseLeave: handleMouseUp,
37648
37851
  onDoubleClick: handleDoubleClick,
37649
- children: /* @__PURE__ */ jsx24(
37852
+ children: /* @__PURE__ */ jsx25(
37650
37853
  MessageImage,
37651
37854
  {
37652
37855
  original: true,
@@ -37672,7 +37875,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37672
37875
  }
37673
37876
 
37674
37877
  // src/chat/tool-renderers/FileReadRenderer.tsx
37675
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
37878
+ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
37676
37879
  var NUMBERED_LINE_RE = /^(\s*\d+)\t([\s\S]*)$/;
37677
37880
  function parseReadResult(result) {
37678
37881
  if (!result) {
@@ -37718,7 +37921,7 @@ function formatLineRange(startLine, endLine) {
37718
37921
  function FileReadRenderer({ toolCall }) {
37719
37922
  const [lightboxIndex, setLightboxIndex] = useState16(null);
37720
37923
  const argsValue = parseJsonValue(toolCall.arguments);
37721
- const args = isPlainObject(argsValue) ? argsValue : null;
37924
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37722
37925
  const filePath = extractToolFilePath(toolCall);
37723
37926
  const fileName = getFileName(filePath);
37724
37927
  const displayName = filePath ? formatToolFileName(filePath) : fileName;
@@ -37737,25 +37940,25 @@ function FileReadRenderer({ toolCall }) {
37737
37940
  return /* @__PURE__ */ jsxs20("div", { className: "space-y-3", children: [
37738
37941
  /* @__PURE__ */ jsxs20("div", { className: "flex items-start justify-between gap-3", children: [
37739
37942
  /* @__PURE__ */ jsxs20("div", { className: "min-w-0", children: [
37740
- /* @__PURE__ */ jsx25("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: displayName }),
37741
- filePath ? /* @__PURE__ */ jsx25("div", { className: "truncate text-[10px] text-[hsl(var(--muted-foreground))]", children: filePath }) : null
37943
+ /* @__PURE__ */ jsx26("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: displayName }),
37944
+ filePath ? /* @__PURE__ */ jsx26("div", { className: "truncate text-[10px] text-[hsl(var(--muted-foreground))]", children: filePath }) : null
37742
37945
  ] }),
37743
37946
  /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center justify-end gap-1.5", children: [
37744
- lineRange ? /* @__PURE__ */ jsx25("span", { className: "rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2 py-0.5 text-[10px] text-[hsl(var(--muted-foreground))]", children: lineRange }) : null,
37745
- checksum ? /* @__PURE__ */ jsx25("span", { className: "rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2 py-0.5 font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: checksum }) : null
37947
+ lineRange ? /* @__PURE__ */ jsx26("span", { className: "rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2 py-0.5 text-[10px] text-[hsl(var(--muted-foreground))]", children: lineRange }) : null,
37948
+ checksum ? /* @__PURE__ */ jsx26("span", { className: "rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2 py-0.5 font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: checksum }) : null
37746
37949
  ] })
37747
37950
  ] }),
37748
- description ? /* @__PURE__ */ jsx25("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: description }) : null,
37749
- errorMessage ? /* @__PURE__ */ jsx25("div", { className: "rounded-lg border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-[11px] text-[hsl(var(--swf-danger))]", children: errorMessage }) : null,
37951
+ description ? /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: description }) : null,
37952
+ errorMessage ? /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-[11px] text-[hsl(var(--swf-danger))]", children: errorMessage }) : null,
37750
37953
  isImageResult ? /* @__PURE__ */ jsxs20("div", { className: "grid gap-2", children: [
37751
- imageUrls.map((url2, idx) => /* @__PURE__ */ jsx25(
37954
+ imageUrls.map((url2, idx) => /* @__PURE__ */ jsx26(
37752
37955
  "button",
37753
37956
  {
37754
37957
  type: "button",
37755
37958
  onClick: () => setLightboxIndex(idx),
37756
37959
  className: "cursor-zoom-in",
37757
37960
  title: "\u67E5\u770B\u5927\u56FE",
37758
- children: /* @__PURE__ */ jsx25(
37961
+ children: /* @__PURE__ */ jsx26(
37759
37962
  MessageImage,
37760
37963
  {
37761
37964
  src: url2,
@@ -37768,7 +37971,7 @@ function FileReadRenderer({ toolCall }) {
37768
37971
  },
37769
37972
  url2.slice(0, 64)
37770
37973
  )),
37771
- /* @__PURE__ */ jsx25(
37974
+ /* @__PURE__ */ jsx26(
37772
37975
  ImageLightbox,
37773
37976
  {
37774
37977
  open: lightboxIndex != null,
@@ -37779,86 +37982,16 @@ function FileReadRenderer({ toolCall }) {
37779
37982
  initialIndex: lightboxIndex ?? 0
37780
37983
  }
37781
37984
  ),
37782
- content3 ? /* @__PURE__ */ jsx25("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: content3 }) : null
37783
- ] }) : !errorMessage ? /* @__PURE__ */ jsx25(CodePreview, { content: content3, filePath, className: "max-h-[360px]" }) : null,
37784
- note ? /* @__PURE__ */ jsx25("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: note }) : null
37785
- ] });
37786
- }
37787
-
37788
- // src/chat/tool-renderers/KbSearchRenderer.tsx
37789
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
37790
- function KbSearchRenderer({ toolCall }) {
37791
- const resultStr = getResultText(toolCall.result);
37792
- const errorMessage = extractErrorMessage(resultStr);
37793
- if (errorMessage) {
37794
- return /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-[11px] text-[hsl(var(--swf-danger))]", children: errorMessage });
37795
- }
37796
- const argsValue = parseJsonValue(toolCall.arguments);
37797
- const args = isPlainObject(argsValue) ? argsValue : null;
37798
- const parsed = parseKbSearchResult(toolCall.result);
37799
- const query = parsed?.query ?? getStringValue(args, "query");
37800
- return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
37801
- query ? /* @__PURE__ */ jsxs21("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37802
- "\u68C0\u7D22\uFF1A",
37803
- query
37804
- ] }) : null,
37805
- parsed && parsed.hits.length > 0 ? /* @__PURE__ */ jsx26("div", { className: "grid gap-2", children: parsed.hits.map((hit) => /* @__PURE__ */ jsx26(
37806
- "div",
37807
- {
37808
- className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-2",
37809
- children: /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2", children: [
37810
- /* @__PURE__ */ jsxs21("span", { className: "mt-0.5 shrink-0 rounded bg-[hsl(var(--muted))] px-1.5 font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: [
37811
- "[",
37812
- hit.n,
37813
- "]"
37814
- ] }),
37815
- /* @__PURE__ */ jsxs21("div", { className: "min-w-0 flex-1", children: [
37816
- /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2", children: [
37817
- /* @__PURE__ */ jsx26(BookOpen, { size: 13, className: "mt-0.5 shrink-0 text-[hsl(var(--muted-foreground))]" }),
37818
- hit.previewUrl ? /* @__PURE__ */ jsxs21(
37819
- "a",
37820
- {
37821
- href: hit.previewUrl,
37822
- target: "_blank",
37823
- rel: "noreferrer",
37824
- className: cn(
37825
- "inline-flex min-w-0 items-center gap-1 text-[11px] font-medium",
37826
- "text-[hsl(var(--swf-link-text))] hover:underline"
37827
- ),
37828
- title: "\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00\u539F\u6587",
37829
- children: [
37830
- /* @__PURE__ */ jsx26("span", { className: "truncate", children: hit.title }),
37831
- /* @__PURE__ */ jsx26(ExternalLink, { size: 11, className: "shrink-0" })
37832
- ]
37833
- }
37834
- ) : /* @__PURE__ */ jsx26("span", { className: "truncate text-[11px] font-medium text-[hsl(var(--foreground))]", children: hit.title })
37835
- ] }),
37836
- /* @__PURE__ */ jsxs21("div", { className: "mt-0.5 flex flex-wrap gap-x-2 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
37837
- hit.kbName ? /* @__PURE__ */ jsxs21("span", { children: [
37838
- "\u300A",
37839
- hit.kbName,
37840
- "\u300B"
37841
- ] }) : null,
37842
- hit.page !== null ? /* @__PURE__ */ jsxs21("span", { children: [
37843
- "\u7B2C ",
37844
- hit.page,
37845
- " \u9875"
37846
- ] }) : null,
37847
- hit.heading ? /* @__PURE__ */ jsx26("span", { className: "truncate", children: hit.heading }) : null
37848
- ] }),
37849
- hit.text ? /* @__PURE__ */ jsx26("p", { className: "mt-1.5 line-clamp-4 whitespace-pre-wrap text-[11px] leading-5 text-[hsl(var(--muted-foreground))]", children: hit.text }) : null
37850
- ] })
37851
- ] })
37852
- },
37853
- `${hit.n}-${hit.path}-${hit.page ?? ""}`
37854
- )) }) : /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-dashed border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-4 text-[11px] text-[hsl(var(--muted-foreground))]", children: parsed?.summary ?? "\u77E5\u8BC6\u5E93\u91CC\u6CA1\u6709\u627E\u5230\u76F8\u5173\u5185\u5BB9\u3002" })
37985
+ content3 ? /* @__PURE__ */ jsx26("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: content3 }) : null
37986
+ ] }) : !errorMessage ? /* @__PURE__ */ jsx26(CodePreview, { content: content3, filePath, className: "max-h-[360px]" }) : null,
37987
+ note ? /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/35 px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: note }) : null
37855
37988
  ] });
37856
37989
  }
37857
37990
 
37858
37991
  // src/chat/tool-renderers/SearchRenderer.tsx
37859
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
37992
+ import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
37860
37993
  function toRecordArray(value) {
37861
- return Array.isArray(value) ? value.filter(isPlainObject) : [];
37994
+ return Array.isArray(value) ? value.filter(isPlainObject3) : [];
37862
37995
  }
37863
37996
  function parseDirectoryItems(result) {
37864
37997
  const value = parseJsonValue(result);
@@ -37873,7 +38006,7 @@ function parseDirectoryItems(result) {
37873
38006
  size: null
37874
38007
  };
37875
38008
  }
37876
- if (!isPlainObject(item)) {
38009
+ if (!isPlainObject3(item)) {
37877
38010
  return null;
37878
38011
  }
37879
38012
  return {
@@ -37898,7 +38031,7 @@ function parseGrepResult(result) {
37898
38031
  }
37899
38032
  function parseWebResults(result) {
37900
38033
  const value = parseJsonValue(result);
37901
- const items = isPlainObject(value) ? toRecordArray(value.results) : toRecordArray(value);
38034
+ const items = isPlainObject3(value) ? toRecordArray(value.results) : toRecordArray(value);
37902
38035
  return items.map((item) => ({
37903
38036
  // text 是当前字段;description 只为读旧会话保留,那时的结果没有正文片段。
37904
38037
  description: typeof item.text === "string" ? item.text : typeof item.description === "string" ? item.description : null,
@@ -37913,7 +38046,7 @@ function renderEmptyState(label) {
37913
38046
  function SearchRenderer({ toolCall }) {
37914
38047
  const normalizedName = formatToolName(toolCall.name);
37915
38048
  const argsValue = parseJsonValue(toolCall.arguments);
37916
- const args = isPlainObject(argsValue) ? argsValue : null;
38049
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37917
38050
  const resultStr = getResultText(toolCall.result);
37918
38051
  const errorMessage = extractErrorMessage(resultStr);
37919
38052
  if (errorMessage) {
@@ -37922,17 +38055,17 @@ function SearchRenderer({ toolCall }) {
37922
38055
  if (normalizedName === "Ls" || normalizedName === "Glob") {
37923
38056
  const items = parseDirectoryItems(resultStr);
37924
38057
  const path2 = getStringValue(args, "path");
37925
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37926
- path2 ? /* @__PURE__ */ jsxs22("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38058
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38059
+ path2 ? /* @__PURE__ */ jsxs21("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37927
38060
  "\u76EE\u5F55\uFF1A",
37928
38061
  path2
37929
38062
  ] }) : null,
37930
- items.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: items.map((item) => /* @__PURE__ */ jsxs22(
38063
+ items.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: items.map((item) => /* @__PURE__ */ jsxs21(
37931
38064
  "div",
37932
38065
  {
37933
38066
  className: "flex items-center justify-between gap-3 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-2",
37934
38067
  children: [
37935
- /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 items-center gap-2", children: [
38068
+ /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 items-center gap-2", children: [
37936
38069
  item.isDir ? /* @__PURE__ */ jsx27(Folder, { size: 14, className: "shrink-0 text-[hsl(var(--muted-foreground))]" }) : /* @__PURE__ */ jsx27(FileText, { size: 14, className: "shrink-0 text-[hsl(var(--muted-foreground))]" }),
37937
38070
  /* @__PURE__ */ jsx27("span", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: item.name })
37938
38071
  ] }),
@@ -37946,22 +38079,22 @@ function SearchRenderer({ toolCall }) {
37946
38079
  if (normalizedName === "Grep") {
37947
38080
  const { matches, searchPath } = parseGrepResult(resultStr);
37948
38081
  const pattern = getStringValue(args, "pattern");
37949
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37950
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-center gap-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38082
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38083
+ /* @__PURE__ */ jsxs21("div", { className: "flex flex-wrap items-center gap-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37951
38084
  pattern ? /* @__PURE__ */ jsx27("span", { className: "rounded-full bg-[hsl(var(--muted))] px-2 py-0.5 font-mono", children: pattern }) : null,
37952
- searchPath ? /* @__PURE__ */ jsxs22("span", { children: [
38085
+ searchPath ? /* @__PURE__ */ jsxs21("span", { children: [
37953
38086
  "\u8303\u56F4\uFF1A",
37954
38087
  searchPath
37955
38088
  ] }) : null
37956
38089
  ] }),
37957
- matches.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: matches.map((match) => /* @__PURE__ */ jsxs22(
38090
+ matches.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: matches.map((match) => /* @__PURE__ */ jsxs21(
37958
38091
  "div",
37959
38092
  {
37960
38093
  className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-2",
37961
38094
  children: [
37962
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between gap-3", children: [
38095
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between gap-3", children: [
37963
38096
  /* @__PURE__ */ jsx27("span", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: match.path }),
37964
- match.lineNumber !== null ? /* @__PURE__ */ jsxs22("span", { className: "shrink-0 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38097
+ match.lineNumber !== null ? /* @__PURE__ */ jsxs21("span", { className: "shrink-0 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
37965
38098
  "\u7B2C ",
37966
38099
  match.lineNumber,
37967
38100
  " \u884C"
@@ -37977,8 +38110,8 @@ function SearchRenderer({ toolCall }) {
37977
38110
  if (normalizedName === "WebFetch") {
37978
38111
  const url2 = getStringValue(args, "url");
37979
38112
  const text4 = resultStr?.trim();
37980
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37981
- url2 ? /* @__PURE__ */ jsxs22(
38113
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38114
+ url2 ? /* @__PURE__ */ jsxs21(
37982
38115
  "a",
37983
38116
  {
37984
38117
  href: url2,
@@ -37997,8 +38130,8 @@ function SearchRenderer({ toolCall }) {
37997
38130
  }
37998
38131
  const results = parseWebResults(resultStr);
37999
38132
  const query = getStringValue(args, "query");
38000
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
38001
- query ? /* @__PURE__ */ jsxs22("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38133
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38134
+ query ? /* @__PURE__ */ jsxs21("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38002
38135
  "\u67E5\u8BE2\uFF1A",
38003
38136
  query
38004
38137
  ] }) : null,
@@ -38012,10 +38145,10 @@ function SearchRenderer({ toolCall }) {
38012
38145
  "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-3 transition-colors",
38013
38146
  item.url && "hover:border-[hsl(var(--ring))] hover:bg-[hsl(var(--muted))]/35"
38014
38147
  ),
38015
- children: /* @__PURE__ */ jsxs22("div", { className: "flex items-start gap-3", children: [
38148
+ children: /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-3", children: [
38016
38149
  /* @__PURE__ */ jsx27(Earth, { size: 16, className: "mt-0.5 shrink-0 text-[hsl(var(--muted-foreground))]" }),
38017
- /* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
38018
- /* @__PURE__ */ jsxs22("div", { className: "flex items-start justify-between gap-3", children: [
38150
+ /* @__PURE__ */ jsxs21("div", { className: "min-w-0 flex-1", children: [
38151
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-start justify-between gap-3", children: [
38019
38152
  /* @__PURE__ */ jsx27("span", { className: "line-clamp-2 text-[11px] font-medium text-[hsl(var(--foreground))]", children: item.title ?? item.url ?? "\u672A\u547D\u540D\u7ED3\u679C" }),
38020
38153
  item.url ? /* @__PURE__ */ jsx27(
38021
38154
  ExternalLink,
@@ -38026,7 +38159,7 @@ function SearchRenderer({ toolCall }) {
38026
38159
  ) : null
38027
38160
  ] }),
38028
38161
  item.url ? /* @__PURE__ */ jsx27("div", { className: "mt-1 truncate font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: item.url }) : null,
38029
- item.publishedDate ? /* @__PURE__ */ jsxs22("div", { className: "mt-1 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38162
+ item.publishedDate ? /* @__PURE__ */ jsxs21("div", { className: "mt-1 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38030
38163
  "\u53D1\u5E03\u4E8E ",
38031
38164
  item.publishedDate.slice(0, 10)
38032
38165
  ] }) : null,
@@ -38040,9 +38173,9 @@ function SearchRenderer({ toolCall }) {
38040
38173
  }
38041
38174
 
38042
38175
  // src/chat/tool-renderers/SubmitResultRenderer.tsx
38043
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
38176
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
38044
38177
  function extractText2(value, key) {
38045
- if (!isPlainObject(value)) return null;
38178
+ if (!isPlainObject3(value)) return null;
38046
38179
  const field = value[key];
38047
38180
  return typeof field === "string" && field.trim() ? field.trim() : null;
38048
38181
  }
@@ -38050,7 +38183,7 @@ function parsePayload(toolCall) {
38050
38183
  const resultText2 = getResultText(toolCall.result);
38051
38184
  const parsedResult = parseJsonValue(resultText2);
38052
38185
  const parsedArgs = parseJsonValue(toolCall.arguments);
38053
- const source = isPlainObject(parsedResult) ? parsedResult : parsedArgs;
38186
+ const source = isPlainObject3(parsedResult) ? parsedResult : parsedArgs;
38054
38187
  const description = extractText2(source, "description");
38055
38188
  const result = extractText2(source, "result") ?? (typeof resultText2 === "string" ? resultText2.trim() : null);
38056
38189
  const error61 = extractText2(source, "err_msg") ?? extractText2(source, "error");
@@ -38061,21 +38194,21 @@ function SubmitResultRenderer({ toolCall }) {
38061
38194
  const { description, result, error: error61, status } = parsePayload(toolCall);
38062
38195
  const isError = toolCall.status === "error" || Boolean(error61);
38063
38196
  const Icon = isError ? CircleAlert : CircleCheck;
38064
- return /* @__PURE__ */ jsxs23("div", { className: "overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
38065
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted))]/25 px-4 py-3", children: [
38197
+ return /* @__PURE__ */ jsxs22("div", { className: "overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
38198
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-3 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted))]/25 px-4 py-3", children: [
38066
38199
  /* @__PURE__ */ jsx28("div", { className: isError ? "text-[hsl(var(--swf-danger))]" : "text-[hsl(var(--swf-success))]", children: /* @__PURE__ */ jsx28(Icon, { size: 18 }) }),
38067
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0 flex-1", children: [
38200
+ /* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
38068
38201
  /* @__PURE__ */ jsx28("div", { className: "font-medium text-[hsl(var(--foreground))]", children: description || (isError ? "\u4EFB\u52A1\u6267\u884C\u5931\u8D25" : "\u4EFB\u52A1\u7ED3\u679C\u5DF2\u63D0\u4EA4") }),
38069
38202
  description ? /* @__PURE__ */ jsx28("div", { className: "mt-0.5 text-xs text-[hsl(var(--muted-foreground))]", children: isError ? "\u4EFB\u52A1\u6267\u884C\u5931\u8D25" : "\u4EFB\u52A1\u7ED3\u679C\u5DF2\u63D0\u4EA4" }) : null,
38070
- status ? /* @__PURE__ */ jsxs23("div", { className: "mt-0.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
38203
+ status ? /* @__PURE__ */ jsxs22("div", { className: "mt-0.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
38071
38204
  "\u72B6\u6001\uFF1A",
38072
38205
  status
38073
38206
  ] }) : null
38074
38207
  ] })
38075
38208
  ] }),
38076
- /* @__PURE__ */ jsxs23("div", { className: "space-y-3 px-4 py-4 text-sm leading-6 text-[hsl(var(--foreground))]", children: [
38209
+ /* @__PURE__ */ jsxs22("div", { className: "space-y-3 px-4 py-4 text-sm leading-6 text-[hsl(var(--foreground))]", children: [
38077
38210
  result ? /* @__PURE__ */ jsx28("p", { className: "whitespace-pre-wrap", children: result }) : null,
38078
- error61 ? /* @__PURE__ */ jsxs23("div", { className: "rounded-xl border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-sm text-[hsl(var(--swf-danger))]", children: [
38211
+ error61 ? /* @__PURE__ */ jsxs22("div", { className: "rounded-xl border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] px-3 py-2 text-sm text-[hsl(var(--swf-danger))]", children: [
38079
38212
  /* @__PURE__ */ jsx28("div", { className: "mb-1 font-medium", children: "\u9519\u8BEF\u4FE1\u606F" }),
38080
38213
  /* @__PURE__ */ jsx28("div", { className: "whitespace-pre-wrap", children: error61 })
38081
38214
  ] }) : null,
@@ -38091,7 +38224,6 @@ var RENDERERS = /* @__PURE__ */ new Map([
38091
38224
  ["Edit", FileEditRenderer],
38092
38225
  ["MultiEdit", FileEditRenderer],
38093
38226
  ["Grep", SearchRenderer],
38094
- ["KbSearch", KbSearchRenderer],
38095
38227
  ["Glob", SearchRenderer],
38096
38228
  ["Ls", SearchRenderer],
38097
38229
  ["Read", FileReadRenderer],
@@ -38105,7 +38237,7 @@ function getRenderer(toolName) {
38105
38237
  }
38106
38238
 
38107
38239
  // src/chat/ToolCallBlock.tsx
38108
- import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
38240
+ import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
38109
38241
  function getFilePreviewName(filePath) {
38110
38242
  return filePath.split(/[\\/]/).pop() ?? filePath;
38111
38243
  }
@@ -38168,7 +38300,7 @@ function ToolPreviewAction({
38168
38300
  return null;
38169
38301
  }
38170
38302
  const label = uiMeta.title ?? displayName;
38171
- return /* @__PURE__ */ jsxs24(
38303
+ return /* @__PURE__ */ jsxs23(
38172
38304
  "button",
38173
38305
  {
38174
38306
  type: "button",
@@ -38260,6 +38392,7 @@ function ToolCallBlock({
38260
38392
  const customToolCall2 = customQuestion == null && !customization?.renderers?.askUserQuestion ? customization?.renderers?.toolCall?.(toolCall) : null;
38261
38393
  if (customQuestion != null) return /* @__PURE__ */ jsx29(Fragment11, { children: customQuestion });
38262
38394
  if (customToolCall2 != null) return /* @__PURE__ */ jsx29(Fragment11, { children: customToolCall2 });
38395
+ if (toolCall.status === "error") return null;
38263
38396
  if (askData) {
38264
38397
  const questionBlock = /* @__PURE__ */ jsx29(
38265
38398
  AskUserQuestionBlock,
@@ -38275,33 +38408,20 @@ function ToolCallBlock({
38275
38408
  if (!reasoning) {
38276
38409
  return questionBlock;
38277
38410
  }
38278
- return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
38411
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1", children: [
38279
38412
  questionBlock,
38280
38413
  /* @__PURE__ */ jsx29("div", { className: "ml-4", children: /* @__PURE__ */ jsx29(ThinkingBadge, { reasoning, variant: "block" }) })
38281
38414
  ] });
38282
38415
  }
38283
- if (toolCall.status === "error") {
38284
- const errorDetail = parseAskUserQuestionError(
38285
- typeof toolCall.result === "string" ? toolCall.result : null
38286
- );
38287
- return /* @__PURE__ */ jsxs24("div", { part: "ask-card", className: "blade-chat-ask-card ml-4 max-w-lg rounded-xl border border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] p-4 text-sm text-[hsl(var(--foreground))]", children: [
38288
- /* @__PURE__ */ jsx29("div", { className: "font-semibold", children: "\u8FD9\u6B21\u63D0\u95EE\u672A\u80FD\u751F\u6210" }),
38289
- /* @__PURE__ */ jsx29("div", { className: "mt-1 text-xs leading-5 text-[hsl(var(--muted-foreground))]", children: errorDetail?.message ?? "\u63D0\u95EE\u9009\u9879\u7684\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u5F53\u524D\u6CA1\u6709\u7B49\u5F85\u4F60\u56DE\u7B54\u3002\u8BF7\u8BA9\u667A\u80FD\u4F53\u91CD\u65B0\u63D0\u95EE\u3002" }),
38290
- errorDetail?.detail ? /* @__PURE__ */ jsxs24("details", { className: "mt-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
38291
- /* @__PURE__ */ jsx29("summary", { className: "cursor-pointer", children: "\u67E5\u770B\u5177\u4F53\u539F\u56E0" }),
38292
- /* @__PURE__ */ jsx29("div", { className: "mt-1 break-words font-mono", children: errorDetail.detail })
38293
- ] }) : null
38294
- ] });
38295
- }
38296
38416
  if (toolCall.status === "pending") {
38297
- return /* @__PURE__ */ jsxs24("div", { part: "ask-card", className: "blade-chat-ask-card ml-4 flex max-w-lg items-center gap-2 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 text-sm text-[hsl(var(--muted-foreground))]", children: [
38417
+ return /* @__PURE__ */ jsxs23("div", { part: "ask-card", className: "blade-chat-ask-card ml-4 flex max-w-lg items-center gap-2 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 text-sm text-[hsl(var(--muted-foreground))]", children: [
38298
38418
  /* @__PURE__ */ jsx29(LoaderCircle, { size: 14, className: "animate-spin" }),
38299
38419
  /* @__PURE__ */ jsx29("span", { children: "\u6B63\u5728\u51C6\u5907\u95EE\u9898\u2026" })
38300
38420
  ] });
38301
38421
  }
38302
- return /* @__PURE__ */ jsxs24("div", { part: "ask-card", className: "blade-chat-ask-card ml-4 max-w-lg rounded-xl border border-[hsl(var(--swf-warning)/0.35)] bg-[hsl(var(--swf-warning-soft))] p-4 text-sm text-[hsl(var(--foreground))]", children: [
38422
+ return /* @__PURE__ */ jsxs23("div", { part: "ask-card", className: "blade-chat-ask-card ml-4 max-w-lg rounded-xl border border-[hsl(var(--swf-warning)/0.35)] bg-[hsl(var(--swf-warning-soft))] p-4 text-sm text-[hsl(var(--foreground))]", children: [
38303
38423
  /* @__PURE__ */ jsx29("div", { className: "font-semibold", children: "\u9009\u62E9\u9898\u5185\u5BB9\u6682\u65F6\u65E0\u6CD5\u663E\u793A" }),
38304
- /* @__PURE__ */ jsxs24("div", { className: "mt-1 text-xs leading-5 text-[hsl(var(--muted-foreground))]", children: [
38424
+ /* @__PURE__ */ jsxs23("div", { className: "mt-1 text-xs leading-5 text-[hsl(var(--muted-foreground))]", children: [
38305
38425
  "\u6536\u5230\u7684\u4EA4\u4E92\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u7248\u672C\u4E0D\u517C\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u95EE\u9898\u6301\u7EED\uFF0C\u8BF7\u63D0\u4F9B\u4EA4\u4E92\u7F16\u53F7",
38306
38426
  /* @__PURE__ */ jsx29("span", { className: "ml-1 font-mono", children: toolCall.id }),
38307
38427
  "\u3002"
@@ -38316,7 +38436,7 @@ function ToolCallBlock({
38316
38436
  const indentClass = level === 2 ? "ml-3" : "";
38317
38437
  const statusIcon = toolCall.status === "pending" ? /* @__PURE__ */ jsx29(LoaderCircle, { size: 12, className: "animate-spin" }) : toolCall.status === "awaiting_answer" ? /* @__PURE__ */ jsx29(MessageSquareMore, { size: 12 }) : toolCall.status === "cancelled" || toolCall.status === "error" ? /* @__PURE__ */ jsx29(X, { size: 12 }) : /* @__PURE__ */ jsx29(Check, { size: 12 });
38318
38438
  const statusTextClass = tone === "failed" ? "text-[hsl(var(--swf-danger))]" : tone === "awaiting" ? "text-[hsl(var(--swf-warning))]" : tone === "running" ? "text-[hsl(var(--muted-foreground))]" : "text-[hsl(var(--primary))]";
38319
- return /* @__PURE__ */ jsxs24(
38439
+ return /* @__PURE__ */ jsxs23(
38320
38440
  "div",
38321
38441
  {
38322
38442
  part: normalizedName === "Agent" ? "agent-loop" : "tool-row",
@@ -38327,8 +38447,8 @@ function ToolCallBlock({
38327
38447
  customization?.classNames?.toolCall
38328
38448
  ),
38329
38449
  children: [
38330
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 min-h-7 pr-3 leading-5", children: [
38331
- /* @__PURE__ */ jsxs24(
38450
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 min-h-7 pr-3 leading-5", children: [
38451
+ /* @__PURE__ */ jsxs23(
38332
38452
  "button",
38333
38453
  {
38334
38454
  type: "button",
@@ -38346,11 +38466,11 @@ function ToolCallBlock({
38346
38466
  )
38347
38467
  }
38348
38468
  ),
38349
- /* @__PURE__ */ jsxs24("span", { className: cn("flex shrink-0 items-center gap-1 text-[10px]", statusTextClass), children: [
38469
+ /* @__PURE__ */ jsxs23("span", { className: cn("flex shrink-0 items-center gap-1 text-[10px]", statusTextClass), children: [
38350
38470
  statusIcon,
38351
38471
  /* @__PURE__ */ jsx29("span", { children: getToolStatusLabel(toolCall.status) })
38352
38472
  ] }),
38353
- /* @__PURE__ */ jsxs24("span", { className: "min-w-0 flex-1 truncate font-medium text-[hsl(var(--foreground))]", children: [
38473
+ /* @__PURE__ */ jsxs23("span", { className: "min-w-0 flex-1 truncate font-medium text-[hsl(var(--foreground))]", children: [
38354
38474
  displayName,
38355
38475
  toolCall.status === "error" ? "\uFF08\u5F85\u91CD\u8BD5\uFF09" : ""
38356
38476
  ] })
@@ -38368,12 +38488,12 @@ function ToolCallBlock({
38368
38488
  }
38369
38489
  )
38370
38490
  ] }),
38371
- expanded && /* @__PURE__ */ jsx29("div", { className: "ml-4 mt-1 rounded-xl bg-[hsl(var(--card))] px-3 py-3", children: Renderer ? /* @__PURE__ */ jsx29(Renderer, { toolCall, sessionId: resolvedSessionId }) : /* @__PURE__ */ jsxs24(Fragment11, { children: [
38491
+ expanded && /* @__PURE__ */ jsx29("div", { className: "ml-4 mt-1 rounded-xl bg-[hsl(var(--card))] px-3 py-3", children: Renderer ? /* @__PURE__ */ jsx29(Renderer, { toolCall, sessionId: resolvedSessionId }) : /* @__PURE__ */ jsxs23(Fragment11, { children: [
38372
38492
  /* @__PURE__ */ jsx29("div", { className: "mb-1 text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u5DE5\u5177" }),
38373
38493
  /* @__PURE__ */ jsx29("div", { className: "mb-3 font-mono text-[11px] text-[hsl(var(--foreground))]", children: normalizedName }),
38374
38494
  /* @__PURE__ */ jsx29("div", { className: "mb-1 text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u53C2\u6570" }),
38375
38495
  /* @__PURE__ */ jsx29("pre", { className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-[hsl(var(--muted))] p-2 font-mono text-[11px] text-[hsl(var(--foreground))]", children: formatArgs(toolCall.arguments) }),
38376
- toolCall.result != null && /* @__PURE__ */ jsxs24(Fragment11, { children: [
38496
+ toolCall.result != null && /* @__PURE__ */ jsxs23(Fragment11, { children: [
38377
38497
  /* @__PURE__ */ jsx29("div", { className: "mb-1 mt-3 text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u7ED3\u679C" }),
38378
38498
  /* @__PURE__ */ jsx29(
38379
38499
  "pre",
@@ -38544,7 +38664,7 @@ function useAsyncValue(key, load2) {
38544
38664
  }
38545
38665
 
38546
38666
  // src/chat/AttachmentPreviewDialog.tsx
38547
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
38667
+ import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
38548
38668
  function AttachmentPreviewDialog({ open: open2, onOpenChange, filename, url: url2, mode }) {
38549
38669
  const enabled = open2 && url2 != null && (mode === "markdown" || mode === "text");
38550
38670
  const { data: content3, error: error61 } = useAsyncValue(enabled ? `${mode}:${url2}` : null, async (signal) => {
@@ -38560,15 +38680,15 @@ function AttachmentPreviewDialog({ open: open2, onOpenChange, filename, url: url
38560
38680
  return res.text();
38561
38681
  });
38562
38682
  if (!open2) return null;
38563
- return /* @__PURE__ */ jsx30(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxs25(
38683
+ return /* @__PURE__ */ jsx30(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxs24(
38564
38684
  DialogContent,
38565
38685
  {
38566
38686
  showCloseButton: false,
38567
38687
  className: "flex max-h-[90vh] w-full max-w-3xl flex-col gap-0 overflow-hidden p-0",
38568
38688
  children: [
38569
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
38689
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
38570
38690
  /* @__PURE__ */ jsx30(DialogTitle, { className: "truncate text-sm font-semibold text-[hsl(var(--foreground))]", children: filename }),
38571
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
38691
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
38572
38692
  url2 && /* @__PURE__ */ jsx30(
38573
38693
  "a",
38574
38694
  {
@@ -38606,14 +38726,14 @@ function renderContent({
38606
38726
  return /* @__PURE__ */ jsx30("p", { className: "text-[hsl(var(--muted-foreground))]", children: "\u6B64\u9644\u4EF6\u6682\u65E0\u53EF\u7528\u9884\u89C8\u5730\u5740\u3002" });
38607
38727
  }
38608
38728
  if (mode === "default") {
38609
- return /* @__PURE__ */ jsxs25("p", { className: "text-[hsl(var(--muted-foreground))]", children: [
38729
+ return /* @__PURE__ */ jsxs24("p", { className: "text-[hsl(var(--muted-foreground))]", children: [
38610
38730
  "\u6B64\u7C7B\u578B\u6682\u4E0D\u652F\u6301\u5185\u5D4C\u9884\u89C8\u3002\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2",
38611
38731
  /* @__PURE__ */ jsx30("span", { className: "mx-1 font-medium text-[hsl(var(--foreground))]", children: "\u4E0B\u8F7D" }),
38612
38732
  "\u6309\u94AE\u67E5\u770B\u3002"
38613
38733
  ] });
38614
38734
  }
38615
38735
  if (error61) {
38616
- return /* @__PURE__ */ jsxs25("p", { className: "text-[hsl(var(--destructive))]", children: [
38736
+ return /* @__PURE__ */ jsxs24("p", { className: "text-[hsl(var(--destructive))]", children: [
38617
38737
  "\u52A0\u8F7D\u5931\u8D25\uFF1A",
38618
38738
  String(error61?.message ?? error61)
38619
38739
  ] });
@@ -38628,10 +38748,10 @@ function renderContent({
38628
38748
  }
38629
38749
 
38630
38750
  // src/chat/MessageContextPills.tsx
38631
- import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
38751
+ import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
38632
38752
  function MessageContextPills({ contexts }) {
38633
38753
  if (contexts.length === 0) return null;
38634
- return /* @__PURE__ */ jsx31("div", { className: "flex flex-wrap gap-1.5", children: contexts.map((ctx, index2) => /* @__PURE__ */ jsxs26(
38754
+ return /* @__PURE__ */ jsx31("div", { className: "flex flex-wrap gap-1.5", children: contexts.map((ctx, index2) => /* @__PURE__ */ jsxs25(
38635
38755
  "div",
38636
38756
  {
38637
38757
  className: "flex shrink-0 items-center gap-1.5 rounded-full border border-[hsl(var(--primary)/0.25)] bg-[hsl(var(--primary)/0.1)] px-2.5 py-1 text-[11px] text-[hsl(var(--primary)/0.85)]",
@@ -38646,7 +38766,7 @@ function MessageContextPills({ contexts }) {
38646
38766
  }
38647
38767
 
38648
38768
  // src/chat/TextAttachmentPills.tsx
38649
- import { Fragment as Fragment12, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
38769
+ import { Fragment as Fragment12, jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
38650
38770
  function getFileIcon2(fileName) {
38651
38771
  const lower2 = fileName.toLowerCase();
38652
38772
  if (/\.(zip|rar|7z|tar|gz)$/.test(lower2)) return Archive;
@@ -38664,7 +38784,7 @@ function TextAttachmentPills({ attachments, onPreview }) {
38664
38784
  return /* @__PURE__ */ jsx32("div", { className: "flex flex-wrap gap-1.5", children: attachments.map((att, index2) => {
38665
38785
  const Icon = getFileIcon2(att.name);
38666
38786
  const key = `${att.uploadedPath ?? att.name}:${att.name}:${index2}`;
38667
- const content3 = /* @__PURE__ */ jsxs27(Fragment12, { children: [
38787
+ const content3 = /* @__PURE__ */ jsxs26(Fragment12, { children: [
38668
38788
  /* @__PURE__ */ jsx32(Icon, { size: 12, className: "shrink-0 text-[hsl(var(--primary)/0.6)]" }),
38669
38789
  /* @__PURE__ */ jsx32("span", { className: "max-w-40 truncate", children: att.name })
38670
38790
  ] });
@@ -38686,19 +38806,19 @@ function TextAttachmentPills({ attachments, onPreview }) {
38686
38806
  }
38687
38807
 
38688
38808
  // src/components/WhatIfUserBubble.tsx
38689
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
38809
+ import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
38690
38810
  function WhatIfUserBubble({ parsed, onQuoteClick }) {
38691
38811
  const { fromStep, quotes, userText } = parsed;
38692
- return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-end gap-2", children: [
38693
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1.5 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.5)] px-2.5 py-0.5 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38812
+ return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-end gap-2", children: [
38813
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1.5 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.5)] px-2.5 py-0.5 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38694
38814
  /* @__PURE__ */ jsx33(RefreshCcw, { size: 10 }),
38695
38815
  /* @__PURE__ */ jsx33("span", { children: fromStep != null ? `\u91CD\u8DD1\u81EA step ${fromStep}` : "\u91CD\u8DD1" })
38696
38816
  ] }),
38697
38817
  quotes.length > 0 && /* @__PURE__ */ jsx33("div", { className: "flex max-w-[min(72vw,42rem)] flex-col items-stretch gap-2", children: quotes.map((quote, index2) => {
38698
38818
  const clickable = quote.stepNumber != null && !!onQuoteClick;
38699
38819
  const label = quote.stepNumber != null ? `\u6B65\u9AA4${quote.stepNumber} \xB7 ${quote.label}` : quote.label;
38700
- return /* @__PURE__ */ jsxs28("div", { className: "rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card)/0.8)] px-3 py-2 text-left", children: [
38701
- /* @__PURE__ */ jsxs28("button", { type: "button", disabled: !clickable, onClick: () => clickable && onQuoteClick(quote.stepNumber), className: "inline-flex max-w-full items-center gap-1 text-[11px] font-medium text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] disabled:cursor-default", title: clickable ? "\u8DF3\u8F6C\u5230\u5BF9\u5E94\u6B65\u9AA4\u5361\u7247" : void 0, children: [
38820
+ return /* @__PURE__ */ jsxs27("div", { className: "rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card)/0.8)] px-3 py-2 text-left", children: [
38821
+ /* @__PURE__ */ jsxs27("button", { type: "button", disabled: !clickable, onClick: () => clickable && onQuoteClick(quote.stepNumber), className: "inline-flex max-w-full items-center gap-1 text-[11px] font-medium text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] disabled:cursor-default", title: clickable ? "\u8DF3\u8F6C\u5230\u5BF9\u5E94\u6B65\u9AA4\u5361\u7247" : void 0, children: [
38702
38822
  /* @__PURE__ */ jsx33("span", { children: "\u21B3" }),
38703
38823
  /* @__PURE__ */ jsx33("span", { className: "truncate", children: label })
38704
38824
  ] }),
@@ -38710,7 +38830,7 @@ function WhatIfUserBubble({ parsed, onQuoteClick }) {
38710
38830
  }
38711
38831
 
38712
38832
  // src/chat/UserMessageBubble.tsx
38713
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
38833
+ import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
38714
38834
  function isUserMessage(message) {
38715
38835
  return message.role === "user";
38716
38836
  }
@@ -38760,9 +38880,16 @@ function UserMessageBubble({ message, className }) {
38760
38880
  contexts: textContexts
38761
38881
  } = extractTextAttachments(message.content);
38762
38882
  const trimmedClean = cleanText.trim();
38883
+ const pluginPills = message.refs?.length ? /* @__PURE__ */ jsx34("div", { className: "flex flex-wrap justify-end gap-1.5", "aria-label": "\u9009\u62E9\u7684\u63D2\u4EF6\u6761\u76EE", children: message.refs.map((ref) => /* @__PURE__ */ jsx34("span", { className: "max-w-full truncate rounded-full border border-border bg-muted px-2.5 py-1 text-xs", children: ref.label }, `${ref.plugin}:${ref.server}:${ref.id}`)) }) : null;
38884
+ const topicAssetPills = message.topic_asset_refs?.length ? /* @__PURE__ */ jsx34("div", { className: "flex max-w-full flex-wrap justify-end gap-1.5", "aria-label": "\u5F15\u7528\u7684\u4E3B\u9898\u8D44\u4EA7", children: message.topic_asset_refs.map((ref) => /* @__PURE__ */ jsxs28("span", { title: ref.path, className: "max-w-full truncate rounded-full border border-border bg-muted px-2.5 py-1 text-xs text-foreground", children: [
38885
+ "\u4E3B\u9898\u8D44\u4EA7 \xB7 ",
38886
+ ref.path
38887
+ ] }, `${ref.topic_id}:${ref.path}`)) }) : null;
38763
38888
  const whatifParsed = trimmedClean && imageParts.length === 0 && fileParts.length === 0 && textAttachments.length === 0 ? parseWhatIfPrompt(cleanText) : null;
38764
38889
  if (whatifParsed && customBubble == null) {
38765
- return /* @__PURE__ */ jsx34("div", { part: "user-row", className: "blade-chat-user-row flex justify-end", children: /* @__PURE__ */ jsxs29("div", { className: "blade-chat-user-col group flex max-w-[72%] flex-col items-end gap-2", children: [
38890
+ return /* @__PURE__ */ jsx34("div", { part: "user-row", className: "blade-chat-user-row flex justify-end", children: /* @__PURE__ */ jsxs28("div", { className: "blade-chat-user-col group flex max-w-[72%] flex-col items-end gap-2", children: [
38891
+ pluginPills,
38892
+ topicAssetPills,
38766
38893
  /* @__PURE__ */ jsx34(WhatIfUserBubble, { parsed: whatifParsed }),
38767
38894
  whatifParsed.userText && /* @__PURE__ */ jsx34(
38768
38895
  MessageActions,
@@ -38815,8 +38942,8 @@ function UserMessageBubble({ message, className }) {
38815
38942
  const mode = kind === "text" ? lower2.endsWith(".md") ? "markdown" : "text" : "default";
38816
38943
  setPreview({ filename: attachment.name, url: url2, mode });
38817
38944
  };
38818
- return /* @__PURE__ */ jsx34("div", { part: "user-row", className: cn("blade-chat-user-row flex justify-end", className), children: /* @__PURE__ */ jsxs29("div", { className: "blade-chat-user-col group flex max-w-[72%] flex-col items-end gap-3", children: [
38819
- (imageParts.length > 0 || imageTextAttachmentMeta.length > 0) && /* @__PURE__ */ jsxs29("div", { className: "grid gap-2", children: [
38945
+ return /* @__PURE__ */ jsx34("div", { part: "user-row", className: cn("blade-chat-user-row flex justify-end", className), children: /* @__PURE__ */ jsxs28("div", { className: "blade-chat-user-col group flex max-w-[72%] flex-col items-end gap-3", children: [
38946
+ (imageParts.length > 0 || imageTextAttachmentMeta.length > 0) && /* @__PURE__ */ jsxs28("div", { className: "grid gap-2", children: [
38820
38947
  imageParts.map((part, idx) => /* @__PURE__ */ jsx34(
38821
38948
  "button",
38822
38949
  {
@@ -38898,6 +39025,8 @@ function UserMessageBubble({ message, className }) {
38898
39025
  }
38899
39026
  ),
38900
39027
  /* @__PURE__ */ jsx34(MessageContextPills, { contexts: textContexts }),
39028
+ pluginPills,
39029
+ topicAssetPills,
38901
39030
  trimmedClean && // 原型:不对称圆角(指向发送侧的一角收窄),无边框、无内阴影。
38902
39031
  (customBubble != null ? customBubble : /* @__PURE__ */ jsx34(
38903
39032
  "div",
@@ -38914,7 +39043,7 @@ function UserMessageBubble({ message, className }) {
38914
39043
  )
38915
39044
  }
38916
39045
  )),
38917
- trimmedClean && (isSending(message) ? /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1 pr-1 text-[11px] font-medium text-[hsl(var(--muted-foreground))/0.85]", children: [
39046
+ trimmedClean && (isSending(message) ? /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1 pr-1 text-[11px] font-medium text-[hsl(var(--muted-foreground))/0.85]", children: [
38918
39047
  /* @__PURE__ */ jsx34(LoaderCircle, { size: 12, className: "animate-spin", "aria-hidden": "true" }),
38919
39048
  /* @__PURE__ */ jsx34("span", { children: "\u53D1\u9001\u4E2D" })
38920
39049
  ] }) : /* @__PURE__ */ jsx34(
@@ -38932,7 +39061,7 @@ function ErrorMessageBlock({
38932
39061
  }) {
38933
39062
  const text4 = chatErrorForDisplay(getTextContent(message.content));
38934
39063
  const looksLikeModelUnavailable = /no source matches this model|404/i.test(text4);
38935
- return /* @__PURE__ */ jsx34("div", { part: "error-row", className: cn("blade-chat-error-row flex min-w-0 justify-start", className), children: /* @__PURE__ */ jsxs29("div", { className: "min-w-0 max-w-full whitespace-pre-wrap break-words border-l-[3px] border-[hsl(var(--border))] px-3 py-1 text-left text-sm leading-7 text-[hsl(var(--muted-foreground))] [overflow-wrap:anywhere]", children: [
39064
+ return /* @__PURE__ */ jsx34("div", { part: "error-row", className: cn("blade-chat-error-row flex min-w-0 justify-start", className), children: /* @__PURE__ */ jsxs28("div", { className: "min-w-0 max-w-full whitespace-pre-wrap break-words border-l-[3px] border-[hsl(var(--border))] px-3 py-1 text-left text-sm leading-7 text-[hsl(var(--muted-foreground))] [overflow-wrap:anywhere]", children: [
38936
39065
  text4,
38937
39066
  looksLikeModelUnavailable ? /* @__PURE__ */ jsx34("div", { className: "mt-1 opacity-80", children: "\u6A21\u578B\u53EF\u80FD\u672A\u542F\u52A8\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002" }) : null
38938
39067
  ] }) });
@@ -38947,7 +39076,7 @@ function findLatestReasoningMessageIndex(messages) {
38947
39076
  }
38948
39077
 
38949
39078
  // src/chat/AgentLoopBlock.tsx
38950
- import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
39079
+ import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
38951
39080
  var COLLAPSED_SUMMARY_HIDDEN_TOOLS = /* @__PURE__ */ new Set(["ReadSkill", "Read"]);
38952
39081
  function safeParseDescription(argsStr) {
38953
39082
  try {
@@ -39050,7 +39179,7 @@ function AgentLoopBlock({
39050
39179
  const status = hasAwaitingAnswer || toolCall.status === "awaiting_answer" && visibleLoopToolCalls.length === 0 ? "awaiting_answer" : toolCall.status === "pending" || loopEntry?.info.status === "running" ? "running" : toolCall.status === "error" || loopEntry?.info.status === "error" ? "error" : toolCall.status === "cancelled" || loopEntry?.info.status === "cancelled" ? "cancelled" : "done";
39051
39180
  const latestReasoningIndex = status === "running" ? findLatestReasoningMessageIndex(childMessages) : -1;
39052
39181
  const cardStyles = getLoopCardStyles(status);
39053
- return /* @__PURE__ */ jsxs30(
39182
+ return /* @__PURE__ */ jsxs29(
39054
39183
  "div",
39055
39184
  {
39056
39185
  part: "agent-loop",
@@ -39059,8 +39188,8 @@ function AgentLoopBlock({
39059
39188
  cardStyles.borderClass
39060
39189
  ),
39061
39190
  children: [
39062
- status === "running" || status === "awaiting_answer" ? /* @__PURE__ */ jsxs30(Fragment13, { children: [
39063
- /* @__PURE__ */ jsxs30(
39191
+ status === "running" || status === "awaiting_answer" ? /* @__PURE__ */ jsxs29(Fragment13, { children: [
39192
+ /* @__PURE__ */ jsxs29(
39064
39193
  "div",
39065
39194
  {
39066
39195
  className: cn(
@@ -39075,9 +39204,9 @@ function AgentLoopBlock({
39075
39204
  onClick: toggleExpanded,
39076
39205
  "aria-expanded": expanded,
39077
39206
  className: "flex min-w-0 flex-1 items-center gap-2 text-left focus-visible:ring-1 focus-visible:ring-[hsl(var(--ring))] focus:outline-none",
39078
- children: /* @__PURE__ */ jsxs30("span", { className: "min-w-0 flex items-center gap-2", children: [
39207
+ children: /* @__PURE__ */ jsxs29("span", { className: "min-w-0 flex items-center gap-2", children: [
39079
39208
  status === "awaiting_answer" ? /* @__PURE__ */ jsx35(MessageSquareMore, { size: 14, className: "shrink-0 text-[hsl(var(--swf-warning))] motion-safe:animate-pulse" }) : /* @__PURE__ */ jsx35(Bot, { size: 14, className: "shrink-0 text-[hsl(var(--muted-foreground))]" }),
39080
- /* @__PURE__ */ jsxs30("span", { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: [
39209
+ /* @__PURE__ */ jsxs29("span", { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: [
39081
39210
  renderDescription ? renderDescription(description) : description,
39082
39211
  status === "awaiting_answer" ? " \u2014 \u7B49\u5F85\u56DE\u7B54" : ""
39083
39212
  ] })
@@ -39123,12 +39252,12 @@ function AgentLoopBlock({
39123
39252
  level: 2
39124
39253
  },
39125
39254
  childToolCall.id
39126
- )) : /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
39255
+ )) : /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
39127
39256
  /* @__PURE__ */ jsx35(LoaderCircle, { size: 12, className: "shrink-0 animate-spin text-[hsl(var(--muted-foreground))]" }),
39128
39257
  /* @__PURE__ */ jsx35("span", { children: "\u6B63\u5728\u542F\u52A8..." })
39129
39258
  ] }) }) : status === "awaiting_answer" ? /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-1 py-2", children: /* @__PURE__ */ jsx35("div", { className: "px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: "\u8BF7\u5728\u4E0B\u65B9\u5B50\u667A\u80FD\u4F53\u5BF9\u8BDD\u4E2D\u5B8C\u6210\u786E\u8BA4" }) }) : null
39130
- ] }) : /* @__PURE__ */ jsxs30(Fragment13, { children: [
39131
- /* @__PURE__ */ jsxs30(
39259
+ ] }) : /* @__PURE__ */ jsxs29(Fragment13, { children: [
39260
+ /* @__PURE__ */ jsxs29(
39132
39261
  "div",
39133
39262
  {
39134
39263
  className: cn(
@@ -39143,7 +39272,7 @@ function AgentLoopBlock({
39143
39272
  onClick: toggleExpanded,
39144
39273
  "aria-expanded": expanded,
39145
39274
  className: "flex min-w-0 flex-1 items-center gap-2 text-left focus-visible:ring-1 focus-visible:ring-[hsl(var(--ring))] focus:outline-none",
39146
- children: /* @__PURE__ */ jsxs30("span", { className: "min-w-0 flex items-center gap-2", children: [
39275
+ children: /* @__PURE__ */ jsxs29("span", { className: "min-w-0 flex items-center gap-2", children: [
39147
39276
  status === "error" ? /* @__PURE__ */ jsx35(X, { size: 14, className: cn("shrink-0", cardStyles.iconClass) }) : status === "cancelled" ? /* @__PURE__ */ jsx35(Ban, { size: 14, className: cn("shrink-0", cardStyles.iconClass) }) : /* @__PURE__ */ jsx35(Check, { size: 14, className: "shrink-0 text-[hsl(var(--swf-success))]" }),
39148
39277
  /* @__PURE__ */ jsx35("span", { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: renderDescription ? renderDescription(description) : description })
39149
39278
  ] })
@@ -39180,9 +39309,9 @@ function AgentLoopBlock({
39180
39309
  ]
39181
39310
  }
39182
39311
  ),
39183
- !expanded ? /* @__PURE__ */ jsxs30(Fragment13, { children: [
39312
+ !expanded ? /* @__PURE__ */ jsxs29(Fragment13, { children: [
39184
39313
  /* @__PURE__ */ jsx35("div", { className: "flex flex-wrap gap-1.5 px-4 py-2", children: completedToolLabels.length > 0 ? completedToolLabels.map(
39185
- (item) => item.kind === "file" ? /* @__PURE__ */ jsxs30(
39314
+ (item) => item.kind === "file" ? /* @__PURE__ */ jsxs29(
39186
39315
  "span",
39187
39316
  {
39188
39317
  className: "inline-flex min-w-0 items-center gap-1 rounded-[6px] bg-[hsl(var(--muted))] px-2 py-0.5 text-xs font-medium text-[hsl(var(--secondary-foreground))]",
@@ -39205,10 +39334,10 @@ function AgentLoopBlock({
39205
39334
  inlineToolUiBlocks.length > 0 ? /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-2 px-4 pb-3", children: inlineToolUiBlocks.map((block) => /* @__PURE__ */ jsx35(ToolUiCard, { card: block.card, sessionId }, block.key)) }) : null
39206
39335
  ] }) : null
39207
39336
  ] }),
39208
- expanded && /* @__PURE__ */ jsxs30("div", { className: "border-t border-[hsl(var(--border))] py-2", children: [
39337
+ expanded && /* @__PURE__ */ jsxs29("div", { className: "border-t border-[hsl(var(--border))] py-2", children: [
39209
39338
  (() => {
39210
39339
  const taskPrompt = safeParsePrompt(toolCall.arguments);
39211
- return taskPrompt ? /* @__PURE__ */ jsxs30("details", { className: "mx-3 mb-2 rounded-md bg-[hsl(var(--muted))]/40", children: [
39340
+ return taskPrompt ? /* @__PURE__ */ jsxs29("details", { className: "mx-3 mb-2 rounded-md bg-[hsl(var(--muted))]/40", children: [
39212
39341
  /* @__PURE__ */ jsx35("summary", { className: "cursor-pointer px-3 py-1.5 text-[11px] font-medium text-[hsl(var(--muted-foreground))]", children: "\u4EFB\u52A1" }),
39213
39342
  /* @__PURE__ */ jsx35("div", { className: "px-3 pb-2", children: /* @__PURE__ */ jsx35("pre", { className: "whitespace-pre-wrap text-[11px] leading-relaxed text-[hsl(var(--foreground))]", children: taskPrompt }) })
39214
39343
  ] }) : null;
@@ -39238,7 +39367,7 @@ function AgentLoopBlock({
39238
39367
  },
39239
39368
  message.entry_id ?? `${message.timestamp ?? "error"}-${index2}`
39240
39369
  ) : null
39241
- ) }) : status === "running" ? /* @__PURE__ */ jsxs30("div", { className: "px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
39370
+ ) }) : status === "running" ? /* @__PURE__ */ jsxs29("div", { className: "px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
39242
39371
  /* @__PURE__ */ jsx35(LoaderCircle, { size: 12, className: "mr-1.5 inline animate-spin" }),
39243
39372
  "\u6B63\u5728\u542F\u52A8..."
39244
39373
  ] }) : toolCall.result ? /* @__PURE__ */ jsx35("pre", { className: "max-h-[400px] overflow-auto px-3 py-2 whitespace-pre-wrap text-[11px] text-[hsl(var(--muted-foreground))]", children: typeof toolCall.result === "string" ? toolCall.result : JSON.stringify(toolCall.result, null, 2) }) : null
@@ -39262,8 +39391,8 @@ function ExpandedChildAssistantMessage({
39262
39391
  (toolCall) => formatToolName(toolCall.name) !== "AskUserQuestion"
39263
39392
  ) : message.tool_calls ?? [];
39264
39393
  const hasToolCalls = toolCalls.length > 0;
39265
- return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-2", children: [
39266
- showReasoning && message.reasoning && /* @__PURE__ */ jsxs30(Reasoning, { isStreaming, children: [
39394
+ return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2", children: [
39395
+ showReasoning && message.reasoning && /* @__PURE__ */ jsxs29(Reasoning, { isStreaming, children: [
39267
39396
  /* @__PURE__ */ jsx35(ReasoningTrigger, { wordCount: message.reasoning.length }),
39268
39397
  /* @__PURE__ */ jsx35(ReasoningContent, { children: message.reasoning })
39269
39398
  ] }),
@@ -39309,7 +39438,7 @@ function ChildText({
39309
39438
  sessionId,
39310
39439
  reasoning
39311
39440
  }) {
39312
- return /* @__PURE__ */ jsxs30("div", { className: "pl-8 text-[12px] leading-6 text-[hsl(var(--foreground))]", children: [
39441
+ return /* @__PURE__ */ jsxs29("div", { className: "pl-8 text-[12px] leading-6 text-[hsl(var(--foreground))]", children: [
39313
39442
  /* @__PURE__ */ jsx35(
39314
39443
  MarkdownContent,
39315
39444
  {
@@ -39349,7 +39478,7 @@ function getLoopCardStyles(status) {
39349
39478
  }
39350
39479
 
39351
39480
  // src/chat/WorkflowRunBlock.tsx
39352
- import { Fragment as Fragment14, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
39481
+ import { Fragment as Fragment14, jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
39353
39482
  var EMPTY_ENTRIES = [];
39354
39483
  function synthToolCall(loopName, info, desc) {
39355
39484
  return {
@@ -39364,26 +39493,43 @@ function resultText(result) {
39364
39493
  return typeof result === "string" ? result.trim() : "";
39365
39494
  }
39366
39495
  var LOG_PREFIX = "[workflow] ";
39367
- function groupEntries(entries) {
39496
+ function groupWorkflowEntries(entries) {
39368
39497
  const prelude = [];
39369
39498
  const groups = [];
39499
+ const byStep = /* @__PURE__ */ new Map();
39370
39500
  entries.forEach((entry, index2) => {
39371
39501
  if (entry.kind === "log") {
39372
- const target = groups[groups.length - 1];
39502
+ const target = entry.stepId && byStep.get(entry.stepId) || groups[groups.length - 1];
39373
39503
  if (target) target.logs.push(entry.text);
39374
39504
  else prelude.push(entry.text);
39375
39505
  return;
39376
39506
  }
39377
- groups.push({
39507
+ const group = {
39378
39508
  key: `step-${index2}`,
39379
39509
  desc: entry.desc,
39380
39510
  stepId: entry.stepId,
39381
39511
  stepKind: entry.stepKind,
39512
+ status: entry.status,
39382
39513
  logs: []
39383
- });
39514
+ };
39515
+ groups.push(group);
39516
+ if (entry.stepId) byStep.set(entry.stepId, group);
39384
39517
  });
39385
39518
  return { prelude, groups };
39386
39519
  }
39520
+ function stepStatus(group, runStatus) {
39521
+ if (group.status) return group.status;
39522
+ if (runStatus === "running") return group.stepKind === "step" && group.logs.length > 0 ? "done" : "running";
39523
+ return runStatus === "done" ? "done" : void 0;
39524
+ }
39525
+ function StatusIcon({ status }) {
39526
+ if (status === "done") return /* @__PURE__ */ jsx36(Check, { size: 13, className: "shrink-0 text-emerald-600", "aria-label": "\u5B8C\u6210" });
39527
+ if (status === "running") return /* @__PURE__ */ jsx36(LoaderCircle, { size: 13, className: "shrink-0 animate-spin text-[hsl(var(--muted-foreground))]", "aria-label": "\u8FDB\u884C\u4E2D" });
39528
+ if (status === "error") return /* @__PURE__ */ jsx36(X, { size: 13, className: "shrink-0 text-red-600", "aria-label": "\u5931\u8D25" });
39529
+ if (status === "cancelled") return /* @__PURE__ */ jsx36(CircleSlash, { size: 13, className: "shrink-0 text-[hsl(var(--muted-foreground))]", "aria-label": "\u5DF2\u53D6\u6D88" });
39530
+ return null;
39531
+ }
39532
+ var CONTAINER_LABEL = { parallel: "\u5E76\u884C", choice: "\u6761\u4EF6", end: "\u7ED3\u675F" };
39387
39533
  var EMPTY_OUTPUT_LOG_RE = /输出[::]\s*[((]空[))]\s*$/;
39388
39534
  var TERMINATOR_LOG_RE = /^(?:结束流程|条件不满足[,,]结束流程\([^)]*\))$/;
39389
39535
  function meaningfulLogs(logs) {
@@ -39424,7 +39570,7 @@ function RefTokenText({ text: text4, refs }) {
39424
39570
  const id = match[1];
39425
39571
  const info = refs.get(id);
39426
39572
  parts.push(
39427
- /* @__PURE__ */ jsxs31(
39573
+ /* @__PURE__ */ jsxs30(
39428
39574
  "span",
39429
39575
  {
39430
39576
  title: info?.value ? info.value.slice(0, 300) : "\u5C1A\u65E0\u8F93\u51FA",
@@ -39452,7 +39598,7 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39452
39598
  [agentLoops, toolCall.id]
39453
39599
  );
39454
39600
  const output2 = resultText(toolCall.result);
39455
- const { prelude, groups } = useMemo10(() => groupEntries(run?.entries ?? EMPTY_ENTRIES), [run?.entries]);
39601
+ const { prelude, groups } = useMemo10(() => groupWorkflowEntries(run?.entries ?? EMPTY_ENTRIES), [run?.entries]);
39456
39602
  const { groupLoops, leftoverLoops } = useMemo10(() => {
39457
39603
  const remaining = [...stepLoops];
39458
39604
  const assigned = groups.map((group) => {
@@ -39496,11 +39642,11 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39496
39642
  const status = run?.status ?? "running";
39497
39643
  const running = status === "running";
39498
39644
  const stepCount = groups.length || stepLoops.length;
39499
- const title = run?.name || "\u5DE5\u4F5C\u6D41";
39645
+ const title = run?.name || "\u6280\u80FD";
39500
39646
  const statusSummary = running ? `\u8FDB\u884C\u4E2D \xB7 ${stepCount} \u6B65` : status === "error" ? `\u5931\u8D25 \xB7 ${stepCount} \u6B65` : status === "cancelled" ? `\u5DF2\u53D6\u6D88 \xB7 ${stepCount} \u6B65` : `\u5DF2\u5B8C\u6210 \xB7 ${stepCount} \u6B65`;
39501
39647
  const hasStepContent = groups.length > 0 || stepLoops.length > 0;
39502
- return /* @__PURE__ */ jsxs31("div", { className: "msg-animate overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]/50", children: [
39503
- /* @__PURE__ */ jsxs31(
39648
+ return /* @__PURE__ */ jsxs30("div", { className: "msg-animate overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]/50", children: [
39649
+ /* @__PURE__ */ jsxs30(
39504
39650
  "button",
39505
39651
  {
39506
39652
  type: "button",
@@ -39508,12 +39654,12 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39508
39654
  "aria-expanded": !collapsed,
39509
39655
  className: "flex w-full items-center gap-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--primary)/0.06)] px-4 py-2.5 text-left transition-colors hover:bg-[hsl(var(--primary)/0.1)] focus-visible:ring-1 focus-visible:ring-[hsl(var(--ring))] focus:outline-none",
39510
39656
  children: [
39511
- /* @__PURE__ */ jsx36(Workflow, { size: 15, className: "shrink-0 text-[hsl(var(--primary))]" }),
39512
- /* @__PURE__ */ jsxs31("span", { className: "min-w-0 truncate text-sm font-semibold text-[hsl(var(--foreground))]", children: [
39513
- "\u5DE5\u4F5C\u6D41\u8FD0\u884C \xB7 ",
39657
+ /* @__PURE__ */ jsx36(Zap, { size: 15, className: "shrink-0 text-violet-600" }),
39658
+ /* @__PURE__ */ jsxs30("span", { className: "min-w-0 truncate text-sm font-semibold text-[hsl(var(--foreground))]", children: [
39659
+ "\u56FA\u5B9A\u6D41\u7A0B \xB7 ",
39514
39660
  title
39515
39661
  ] }),
39516
- /* @__PURE__ */ jsxs31("span", { className: "ml-auto flex shrink-0 items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
39662
+ /* @__PURE__ */ jsxs30("span", { className: "ml-auto flex shrink-0 items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
39517
39663
  running ? /* @__PURE__ */ jsx36(LoaderCircle, { size: 12, className: "animate-spin" }) : null,
39518
39664
  statusSummary
39519
39665
  ] }),
@@ -39530,13 +39676,13 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39530
39676
  ]
39531
39677
  }
39532
39678
  ),
39533
- !collapsed && /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-2 p-3", children: [
39679
+ !collapsed && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-2 p-3", children: [
39534
39680
  /* @__PURE__ */ jsx36(LogLines, { logs: meaningfulLogs(prelude) }),
39535
39681
  groups.map((group, index2) => {
39536
39682
  const loop = groupLoops[index2];
39537
39683
  const logs = meaningfulLogs(group.logs);
39538
39684
  if (loop) {
39539
- return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1", children: [
39685
+ return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1", children: [
39540
39686
  /* @__PURE__ */ jsx36(
39541
39687
  AgentLoopBlock,
39542
39688
  {
@@ -39549,13 +39695,20 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39549
39695
  /* @__PURE__ */ jsx36(LogLines, { logs })
39550
39696
  ] }, group.key);
39551
39697
  }
39552
- if (logs.length === 0) return null;
39553
- return /* @__PURE__ */ jsxs31(
39698
+ const container = CONTAINER_LABEL[group.stepKind];
39699
+ return /* @__PURE__ */ jsxs30(
39554
39700
  "div",
39555
39701
  {
39556
- className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-3 py-2",
39702
+ className: cn(
39703
+ "rounded-lg px-3 py-2",
39704
+ container ? "border border-dashed border-violet-400/50 bg-violet-500/5" : "border border-[hsl(var(--border))] bg-[hsl(var(--card))]"
39705
+ ),
39557
39706
  children: [
39558
- /* @__PURE__ */ jsx36("div", { className: "text-sm text-[hsl(var(--foreground))]", children: renderRefText(group.desc || group.stepId) }),
39707
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1.5 text-sm text-[hsl(var(--foreground))]", children: [
39708
+ /* @__PURE__ */ jsx36(StatusIcon, { status: stepStatus(group, status) }),
39709
+ container ? /* @__PURE__ */ jsx36("span", { className: "text-[11px] font-semibold text-violet-600", children: container }) : null,
39710
+ /* @__PURE__ */ jsx36("span", { className: "min-w-0 truncate", children: renderRefText(group.desc || group.stepId) })
39711
+ ] }),
39559
39712
  /* @__PURE__ */ jsx36(LogLines, { logs })
39560
39713
  ]
39561
39714
  },
@@ -39573,7 +39726,7 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39573
39726
  step.loopName
39574
39727
  )),
39575
39728
  (!hasStepContent && output2 || status === "error" && output2) && /* @__PURE__ */ jsx36("pre", { className: "max-h-48 overflow-y-auto whitespace-pre-wrap break-words rounded-lg border border-[hsl(var(--border))] px-3 py-2 font-mono text-[11px] leading-[1.5] text-[hsl(var(--muted-foreground))]", children: output2 }),
39576
- status === "done" && hasStepContent && finalOutput && /* @__PURE__ */ jsxs31("details", { className: "rounded-lg border border-[hsl(var(--border))] px-3 py-2", children: [
39729
+ status === "done" && hasStepContent && finalOutput && /* @__PURE__ */ jsxs30("details", { className: "rounded-lg border border-[hsl(var(--border))] px-3 py-2", children: [
39577
39730
  /* @__PURE__ */ jsx36("summary", { className: "cursor-pointer select-none text-xs text-[hsl(var(--muted-foreground))]", children: "\u6700\u7EC8\u8F93\u51FA" }),
39578
39731
  /* @__PURE__ */ jsx36("pre", { className: "mt-1.5 max-h-48 overflow-y-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-[1.5] text-[hsl(var(--muted-foreground))]", children: finalOutput })
39579
39732
  ] }),
@@ -39636,7 +39789,7 @@ function toolCallAnswered(toolCall, sessionStatus, answerData) {
39636
39789
  }
39637
39790
 
39638
39791
  // src/chat/AssistantTurnBlock.tsx
39639
- import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
39792
+ import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
39640
39793
  var EMPTY_MESSAGES = [];
39641
39794
  var EMPTY_AGENT_LOOPS = {};
39642
39795
  var turnDisplayModeMemory = /* @__PURE__ */ new Map();
@@ -39858,7 +40011,7 @@ function AssistantTurnBlockBase({
39858
40011
  const [displayMode, setDisplayMode] = useState22(
39859
40012
  () => forceExpanded ? "detail" : (displayModeMemoryKey ? turnDisplayModeMemory.get(displayModeMemoryKey) : void 0) ?? defaultTurnDisplayMode({ forceExpanded, hasActionableToolCall, isStreaming })
39860
40013
  );
39861
- const wasStreamingRef = useRef14(isStreaming);
40014
+ const wasStreamingRef = useRef15(isStreaming);
39862
40015
  useEffect16(() => {
39863
40016
  if (wasStreamingRef.current && !isStreaming && !forceExpanded && !(displayModeMemoryKey && turnDisplayModeMemory.has(displayModeMemoryKey))) {
39864
40017
  setDisplayMode(
@@ -39930,7 +40083,7 @@ function AssistantTurnBlockBase({
39930
40083
  const hasFailedWithoutContent = messages.some(
39931
40084
  (message) => message.status === "failed" && !hasRenderableMessageContent(message)
39932
40085
  );
39933
- const hasExecutionProcess = detailToolCalls.length > 0 || persistentAskUserQuestions.length > 0 || messages.some((message) => Boolean(message.reasoning)) || resourceBlocks.length > 0;
40086
+ const hasExecutionProcess = detailToolCalls.length > 0 || workflowRunToolCalls.length > 0 || persistentAskUserQuestions.length > 0 || messages.some((message) => Boolean(message.reasoning)) || resourceBlocks.length > 0;
39934
40087
  const executionDurationMs = getExecutionDurationMs({
39935
40088
  // 根消息的 duration 已覆盖等待子智能体的墙钟时间,不能再累计 turnMessages
39936
40089
  // 里收集到的子循环,否则嵌套和并行 Agent 都会重复计时。
@@ -39950,7 +40103,7 @@ function AssistantTurnBlockBase({
39950
40103
  if (observedMemoryRefs.length > 0) setCachedMemoryRefs(observedMemoryRefs);
39951
40104
  }, [observedMemoryRefs]);
39952
40105
  const memoryRefs = observedMemoryRefs.length > 0 ? observedMemoryRefs : cachedMemoryRefs;
39953
- return /* @__PURE__ */ jsxs32(
40106
+ return /* @__PURE__ */ jsxs31(
39954
40107
  "div",
39955
40108
  {
39956
40109
  "aria-busy": isStreaming || void 0,
@@ -39964,7 +40117,7 @@ function AssistantTurnBlockBase({
39964
40117
  memoryRefs.length > 0 && /* @__PURE__ */ jsx37(MemoryRefsHint, { refs: memoryRefs }),
39965
40118
  hasInterruptedState && /* @__PURE__ */ jsx37("div", { className: "ml-4 w-fit rounded-full border border-[hsl(var(--swf-warning)/0.3)] bg-[hsl(var(--swf-warning-soft))] px-2.5 py-1 text-[10px] font-medium text-[hsl(var(--swf-warning))]", children: "\u5DF2\u4E2D\u65AD" }),
39966
40119
  hasFailedWithoutContent && /* @__PURE__ */ jsx37("div", { className: "ml-4 w-fit rounded-full border border-[hsl(var(--destructive)/0.3)] bg-[hsl(var(--destructive)/0.1)] px-2.5 py-1 text-[10px] font-medium text-[hsl(var(--destructive))]", children: "\u751F\u6210\u5931\u8D25" }),
39967
- hasExecutionProcess && /* @__PURE__ */ jsxs32("div", { className: "flex w-full items-start gap-2.5", children: [
40120
+ hasExecutionProcess && /* @__PURE__ */ jsxs31("div", { className: "flex w-full items-start gap-2.5", children: [
39968
40121
  /* @__PURE__ */ jsx37(
39969
40122
  "span",
39970
40123
  {
@@ -39973,8 +40126,8 @@ function AssistantTurnBlockBase({
39973
40126
  children: /* @__PURE__ */ jsx37(Bot, { size: 16 })
39974
40127
  }
39975
40128
  ),
39976
- /* @__PURE__ */ jsxs32("div", { className: "min-w-0 flex-1 pt-0.5", children: [
39977
- /* @__PURE__ */ jsxs32(
40129
+ /* @__PURE__ */ jsxs31("div", { className: "min-w-0 flex-1 pt-0.5", children: [
40130
+ /* @__PURE__ */ jsxs31(
39978
40131
  "button",
39979
40132
  {
39980
40133
  type: "button",
@@ -40016,32 +40169,34 @@ function AssistantTurnBlockBase({
40016
40169
  /* @__PURE__ */ jsx37("div", { className: "mt-3 h-px w-full bg-[hsl(var(--border)/0.75)]" })
40017
40170
  ] })
40018
40171
  ] }),
40019
- hasExecutionProcess && effectiveMode === "detail" ? /* @__PURE__ */ jsx37("div", { className: "ml-10 flex flex-col gap-1", children: /* @__PURE__ */ jsx37(
40020
- AssistantMessages,
40021
- {
40022
- messages: assistantTurnMessages,
40023
- isStreaming,
40024
- isReasoningRevealing,
40025
- sessionId,
40026
- askAnswers,
40027
- onAnswer,
40028
- sessionStatus,
40029
- level,
40030
- turnToolCalls,
40031
- showToolDetails: true,
40032
- hideAskUserQuestions: true,
40033
- hideMessageContentFor: finalMessage,
40034
- customization
40035
- }
40036
- ) }) : null,
40037
- workflowRunToolCalls.length > 0 ? /* @__PURE__ */ jsx37("div", { className: "ml-10 flex flex-col gap-3", children: workflowRunToolCalls.map((workflowToolCall) => /* @__PURE__ */ jsx37(
40038
- WorkflowRunBlock,
40039
- {
40040
- toolCall: workflowToolCall,
40041
- sessionId
40042
- },
40043
- workflowToolCall.id
40044
- )) }) : null,
40172
+ hasExecutionProcess && effectiveMode === "detail" ? /* @__PURE__ */ jsxs31("div", { className: "ml-10 flex flex-col gap-1", children: [
40173
+ /* @__PURE__ */ jsx37(
40174
+ AssistantMessages,
40175
+ {
40176
+ messages: assistantTurnMessages,
40177
+ isStreaming,
40178
+ isReasoningRevealing,
40179
+ sessionId,
40180
+ askAnswers,
40181
+ onAnswer,
40182
+ sessionStatus,
40183
+ level,
40184
+ turnToolCalls,
40185
+ showToolDetails: true,
40186
+ hideAskUserQuestions: true,
40187
+ hideMessageContentFor: finalMessage,
40188
+ customization
40189
+ }
40190
+ ),
40191
+ workflowRunToolCalls.map((workflowToolCall) => /* @__PURE__ */ jsx37(
40192
+ WorkflowRunBlock,
40193
+ {
40194
+ toolCall: workflowToolCall,
40195
+ sessionId
40196
+ },
40197
+ workflowToolCall.id
40198
+ ))
40199
+ ] }) : null,
40045
40200
  resourceBlocks.some((block) => !compactOrderedToolIds.has(block.toolCallId)) ? /* @__PURE__ */ jsx37("div", { className: "ml-10 flex flex-col gap-3", children: resourceBlocks.filter((block) => !compactOrderedToolIds.has(block.toolCallId)).map((block) => /* @__PURE__ */ jsx37(ToolUiCard, { card: block.card, sessionId }, block.key)) }) : null,
40046
40201
  previewToolCalls.some(({ toolCall }) => !compactOrderedToolIds.has(toolCall.id)) ? /* @__PURE__ */ jsx37("div", { className: "ml-10 flex flex-wrap gap-x-3 gap-y-1", children: previewToolCalls.filter(({ toolCall }) => !compactOrderedToolIds.has(toolCall.id)).map(({ key, toolCall, blocks }) => /* @__PURE__ */ jsx37(
40047
40202
  ToolPreviewAction,
@@ -40187,6 +40342,7 @@ function DetailedToolCallList({
40187
40342
  );
40188
40343
  }
40189
40344
  const { toolCall } = item;
40345
+ if (isWorkflowRunToolName2(toolCall.name)) return null;
40190
40346
  return customization?.components?.ToolCall ? /* @__PURE__ */ jsx37(
40191
40347
  customization.components.ToolCall,
40192
40348
  {
@@ -40247,12 +40403,12 @@ function AssistantMessages({
40247
40403
  );
40248
40404
  const hasToolCalls = toolCalls.length > 0;
40249
40405
  const orderedParts = getOrderedMessageParts(message, toolCalls);
40250
- return /* @__PURE__ */ jsxs32(
40406
+ return /* @__PURE__ */ jsxs31(
40251
40407
  "div",
40252
40408
  {
40253
40409
  className: "flex flex-col gap-1",
40254
40410
  children: [
40255
- showReasoning && /* @__PURE__ */ jsxs32(
40411
+ showReasoning && /* @__PURE__ */ jsxs31(
40256
40412
  Reasoning,
40257
40413
  {
40258
40414
  isStreaming: isReasoningStreamingLastMessage,
@@ -40361,8 +40517,9 @@ function CompactToolGroupBlock({
40361
40517
  level,
40362
40518
  customization
40363
40519
  }) {
40364
- return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-1", children: [
40520
+ return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1", children: [
40365
40521
  toolCalls.map((toolCall) => {
40522
+ if (isWorkflowRunToolName2(toolCall.name)) return null;
40366
40523
  const CustomToolCall = customization?.components?.ToolCall;
40367
40524
  return CustomToolCall ? /* @__PURE__ */ jsx37(
40368
40525
  CustomToolCall,
@@ -40421,7 +40578,7 @@ function AssistantMessageContent({
40421
40578
  if (!text4 && imageParts.length === 0 && fileParts.length === 0 && !reasoning && !failed) {
40422
40579
  return null;
40423
40580
  }
40424
- return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-3", children: [
40581
+ return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-3", children: [
40425
40582
  failed ? /* @__PURE__ */ jsx37("div", { className: "w-fit rounded-full border border-[hsl(var(--destructive)/0.3)] bg-[hsl(var(--destructive)/0.1)] px-2.5 py-1 text-[10px] font-medium text-[hsl(var(--destructive))]", children: "\u751F\u6210\u5931\u8D25" }) : null,
40426
40583
  imageParts.length > 0 && /* @__PURE__ */ jsx37("div", { className: "grid gap-2", children: imageParts.map((part) => /* @__PURE__ */ jsx37(
40427
40584
  MessageImage,
@@ -40470,7 +40627,7 @@ function AssistantText({
40470
40627
  () => ({ sessionId, messageId, sendMessage }),
40471
40628
  [sessionId, messageId, sendMessage]
40472
40629
  );
40473
- return /* @__PURE__ */ jsxs32(
40630
+ return /* @__PURE__ */ jsxs31(
40474
40631
  "div",
40475
40632
  {
40476
40633
  part: "assistant-text",
@@ -40505,13 +40662,13 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40505
40662
  const memoriesHref = useChatEnvironment().memoriesHref;
40506
40663
  const hasSkill = refs.some((r) => r.skill_name);
40507
40664
  const label = hasSkill ? "\u53C2\u8003\u4E86\u8BE5\u6280\u80FD\u7684\u5386\u53F2\u7ECF\u9A8C" : "\u53C2\u8003\u4E86\u5386\u53F2\u7ECF\u9A8C";
40508
- return /* @__PURE__ */ jsxs32(
40665
+ return /* @__PURE__ */ jsxs31(
40509
40666
  "div",
40510
40667
  {
40511
40668
  part: "memory-refs",
40512
40669
  className: cn("blade-chat-memory-refs relative z-[1] ml-1 w-[calc(100%-0.25rem)] max-w-[680px] self-start", className),
40513
40670
  children: [
40514
- /* @__PURE__ */ jsxs32(
40671
+ /* @__PURE__ */ jsxs31(
40515
40672
  "button",
40516
40673
  {
40517
40674
  type: "button",
@@ -40519,7 +40676,7 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40519
40676
  className: "inline-flex h-8 items-center gap-1.5 rounded-lg border border-[hsl(var(--primary)/0.22)] bg-[hsl(var(--primary)/0.07)] px-3 text-xs font-medium text-[hsl(var(--primary))] transition-colors hover:bg-[hsl(var(--primary)/0.12)]",
40520
40677
  children: [
40521
40678
  /* @__PURE__ */ jsx37(BookOpen, { size: 12 }),
40522
- /* @__PURE__ */ jsxs32("span", { children: [
40679
+ /* @__PURE__ */ jsxs31("span", { children: [
40523
40680
  label,
40524
40681
  "\uFF08",
40525
40682
  refs.length,
@@ -40535,8 +40692,8 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40535
40692
  ]
40536
40693
  }
40537
40694
  ),
40538
- expanded && /* @__PURE__ */ jsxs32("div", { className: "mt-2 flex flex-col gap-2 rounded-xl border border-[hsl(var(--border)/0.8)] bg-[hsl(var(--muted)/0.28)] p-2.5", children: [
40539
- refs.map((ref) => /* @__PURE__ */ jsxs32(
40695
+ expanded && /* @__PURE__ */ jsxs31("div", { className: "mt-2 flex flex-col gap-2 rounded-xl border border-[hsl(var(--border)/0.8)] bg-[hsl(var(--muted)/0.28)] p-2.5", children: [
40696
+ refs.map((ref) => /* @__PURE__ */ jsxs31(
40540
40697
  "div",
40541
40698
  {
40542
40699
  className: "rounded-lg border border-[hsl(var(--border)/0.55)] bg-[hsl(var(--background)/0.72)] px-3 py-2.5",
@@ -40547,7 +40704,7 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40547
40704
  },
40548
40705
  ref.id
40549
40706
  )),
40550
- memoriesHref ? /* @__PURE__ */ jsxs32(
40707
+ memoriesHref ? /* @__PURE__ */ jsxs31(
40551
40708
  "a",
40552
40709
  {
40553
40710
  href: memoriesHref,
@@ -40567,7 +40724,7 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40567
40724
  }
40568
40725
 
40569
40726
  // src/hooks/use-message-pin.ts
40570
- import { useCallback as useCallback6, useEffect as useEffect17, useRef as useRef15 } from "react";
40727
+ import { useCallback as useCallback6, useEffect as useEffect17, useRef as useRef16 } from "react";
40571
40728
  var DEFAULT_MARGIN_PX = 24;
40572
40729
  var MANUAL_SCROLL_TOLERANCE_PX = 2;
40573
40730
  function useMessagePin({
@@ -40589,16 +40746,16 @@ function useMessagePin({
40589
40746
  scrollToBottom,
40590
40747
  margin = DEFAULT_MARGIN_PX
40591
40748
  }) {
40592
- const pinActiveRef = useRef15(false);
40593
- const frameRef = useRef15(null);
40594
- const retryTimeoutRef = useRef15(null);
40595
- const manualScrollCheckTimeoutRef = useRef15(null);
40596
- const repositionPendingRef = useRef15(false);
40597
- const pinnedTargetScrollTopRef = useRef15(null);
40598
- const appliedTargetKeyRef = useRef15(null);
40599
- const initialObservedTargetKeyRef = useRef15(pinTarget ? null : targetKey);
40600
- const observedTargetKeyRef = useRef15(initialObservedTargetKeyRef.current);
40601
- const setSpacerHeightRef = useRef15(setSpacerHeight);
40749
+ const pinActiveRef = useRef16(false);
40750
+ const frameRef = useRef16(null);
40751
+ const retryTimeoutRef = useRef16(null);
40752
+ const manualScrollCheckTimeoutRef = useRef16(null);
40753
+ const repositionPendingRef = useRef16(false);
40754
+ const pinnedTargetScrollTopRef = useRef16(null);
40755
+ const appliedTargetKeyRef = useRef16(null);
40756
+ const initialObservedTargetKeyRef = useRef16(pinTarget ? null : targetKey);
40757
+ const observedTargetKeyRef = useRef16(initialObservedTargetKeyRef.current);
40758
+ const setSpacerHeightRef = useRef16(setSpacerHeight);
40602
40759
  setSpacerHeightRef.current = setSpacerHeight;
40603
40760
  const release = useCallback6(() => {
40604
40761
  if (!pinActiveRef.current) return;
@@ -41031,15 +41188,15 @@ import {
41031
41188
  getContextDisplayState,
41032
41189
  getContextGroupDisplayState
41033
41190
  } from "@blade-hq/agent-client/internal";
41034
- import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
41191
+ import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
41035
41192
  function ContextCard({ context, className }) {
41036
41193
  const display = getContextDisplayState(context);
41037
- return /* @__PURE__ */ jsxs33(
41194
+ return /* @__PURE__ */ jsxs32(
41038
41195
  "details",
41039
41196
  {
41040
41197
  className: `blade-chat-context-card group/context-card overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-sm ${className ?? ""}`,
41041
41198
  children: [
41042
- /* @__PURE__ */ jsxs33("summary", { className: "blade-chat-context-summary flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 [&::-webkit-details-marker]:hidden", children: [
41199
+ /* @__PURE__ */ jsxs32("summary", { className: "blade-chat-context-summary flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 [&::-webkit-details-marker]:hidden", children: [
41043
41200
  /* @__PURE__ */ jsx38(
41044
41201
  Layers,
41045
41202
  {
@@ -41048,7 +41205,7 @@ function ContextCard({ context, className }) {
41048
41205
  "aria-hidden": "true"
41049
41206
  }
41050
41207
  ),
41051
- /* @__PURE__ */ jsxs33("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41208
+ /* @__PURE__ */ jsxs32("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41052
41209
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-title block font-medium text-[hsl(var(--foreground))]", children: display.title }),
41053
41210
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-status block truncate text-xs text-[hsl(var(--muted-foreground))]", children: display.summary })
41054
41211
  ] }),
@@ -41070,8 +41227,8 @@ function ContextGroupCard({ contexts, className }) {
41070
41227
  if (contexts.length === 0) return null;
41071
41228
  const single = contexts.length === 1 ? getContextDisplayState(contexts[0]) : null;
41072
41229
  const group = single ? null : getContextGroupDisplayState(contexts);
41073
- return /* @__PURE__ */ jsxs33("details", { className: `blade-chat-context-card group/context-group overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-sm ${className ?? ""}`, children: [
41074
- /* @__PURE__ */ jsxs33("summary", { className: "blade-chat-context-summary flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 [&::-webkit-details-marker]:hidden", children: [
41230
+ return /* @__PURE__ */ jsxs32("details", { className: `blade-chat-context-card group/context-group overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-sm ${className ?? ""}`, children: [
41231
+ /* @__PURE__ */ jsxs32("summary", { className: "blade-chat-context-summary flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 [&::-webkit-details-marker]:hidden", children: [
41075
41232
  /* @__PURE__ */ jsx38(
41076
41233
  Layers,
41077
41234
  {
@@ -41080,7 +41237,7 @@ function ContextGroupCard({ contexts, className }) {
41080
41237
  "aria-hidden": "true"
41081
41238
  }
41082
41239
  ),
41083
- /* @__PURE__ */ jsxs33("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41240
+ /* @__PURE__ */ jsxs32("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41084
41241
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-title block font-medium text-[hsl(var(--foreground))]", children: single ? single.title : `${group?.title} \xB7 ${group?.count} \u9879` }),
41085
41242
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-status block truncate text-xs text-[hsl(var(--muted-foreground))]", children: single ? single.summary : group?.summary })
41086
41243
  ] }),
@@ -41104,8 +41261,8 @@ function ContextGroupCard({ contexts, className }) {
41104
41261
  }
41105
41262
 
41106
41263
  // src/chat/ResultFeedback.tsx
41107
- import { useCallback as useCallback7, useEffect as useEffect18, useRef as useRef16, useState as useState23 } from "react";
41108
- import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
41264
+ import { useCallback as useCallback7, useEffect as useEffect18, useRef as useRef17, useState as useState23 } from "react";
41265
+ import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
41109
41266
  var REASONS = [
41110
41267
  { value: "not_solved", label: "\u6CA1\u89E3\u51B3\u95EE\u9898" },
41111
41268
  { value: "inaccurate", label: "\u5185\u5BB9\u4E0D\u51C6\u786E" },
@@ -41119,17 +41276,17 @@ function reasonLabel(reason) {
41119
41276
  }
41120
41277
  function HistoricalResultFeedback({ feedback }) {
41121
41278
  const label = reasonLabel(feedback.reason);
41122
- return /* @__PURE__ */ jsxs34(
41279
+ return /* @__PURE__ */ jsxs33(
41123
41280
  "section",
41124
41281
  {
41125
41282
  "aria-label": "\u5386\u53F2\u7ED3\u679C\u53CD\u9988",
41126
41283
  className: "w-fit max-w-full rounded-lg border border-[hsl(var(--border)/0.7)] bg-[hsl(var(--muted)/0.2)] px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]",
41127
41284
  children: [
41128
- /* @__PURE__ */ jsxs34("span", { children: [
41285
+ /* @__PURE__ */ jsxs33("span", { children: [
41129
41286
  "\u4F60\u5BF9\u6B64\u8F6E\u7ED3\u679C\u7684\u8BC4\u4EF7\uFF1A",
41130
41287
  feedback.helpful ? "\u6709\u5E2E\u52A9" : "\u6CA1\u5E2E\u52A9"
41131
41288
  ] }),
41132
- label ? /* @__PURE__ */ jsxs34("span", { children: [
41289
+ label ? /* @__PURE__ */ jsxs33("span", { children: [
41133
41290
  " \xB7 ",
41134
41291
  label
41135
41292
  ] }) : null
@@ -41154,10 +41311,10 @@ function ResultFeedback({
41154
41311
  );
41155
41312
  const [saving, setSaving] = useState23(false);
41156
41313
  const [saveError, setSaveError] = useState23(false);
41157
- const latestChoice = useRef16(null);
41314
+ const latestChoice = useRef17(null);
41158
41315
  const eligible = followup.feedback_eligible === true;
41159
41316
  const emit = useFollowupInteraction();
41160
- const reportedShown = useRef16(false);
41317
+ const reportedShown = useRef17(false);
41161
41318
  const visible = eligible && !isViewer;
41162
41319
  useEffect18(() => {
41163
41320
  if (!visible || reportedShown.current) return;
@@ -41204,14 +41361,14 @@ function ResultFeedback({
41204
41361
  [client, emit, followup.assistant_entry_id, onSaved, sessionId]
41205
41362
  );
41206
41363
  if (!visible) return null;
41207
- return /* @__PURE__ */ jsxs34(
41364
+ return /* @__PURE__ */ jsxs33(
41208
41365
  "section",
41209
41366
  {
41210
41367
  "aria-label": "\u7ED3\u679C\u53CD\u9988",
41211
41368
  className: "flex flex-col gap-2 border-t border-[hsl(var(--border)/0.7)] pt-3",
41212
41369
  children: [
41213
41370
  /* @__PURE__ */ jsx39("div", { className: "text-xs font-medium text-[hsl(var(--muted-foreground))]", children: "\u76EE\u524D\u7684\u6574\u4F53\u7ED3\u679C\u6709\u5E2E\u52A9\u5417\uFF1F" }),
41214
- /* @__PURE__ */ jsxs34("div", { className: "flex flex-wrap gap-1.5", children: [
41371
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap gap-1.5", children: [
41215
41372
  /* @__PURE__ */ jsx39(
41216
41373
  "button",
41217
41374
  {
@@ -41247,7 +41404,7 @@ function ResultFeedback({
41247
41404
  },
41248
41405
  reason.value
41249
41406
  )) }) : null,
41250
- saveError ? /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--destructive))]", children: [
41407
+ saveError ? /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--destructive))]", children: [
41251
41408
  /* @__PURE__ */ jsx39("span", { children: "\u53CD\u9988\u6682\u672A\u4FDD\u5B58\uFF0C\u53EF\u91CD\u8BD5" }),
41252
41409
  /* @__PURE__ */ jsx39(
41253
41410
  "button",
@@ -41268,7 +41425,7 @@ function ResultFeedback({
41268
41425
  }
41269
41426
 
41270
41427
  // src/chat/LiteMessageList.tsx
41271
- import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
41428
+ import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
41272
41429
  var LITE_LOADING_INDICATOR_HEIGHT = 38;
41273
41430
  function messageText(message) {
41274
41431
  return getTextContent3(normalizeMessageContent2(message.content)).trim();
@@ -41410,11 +41567,11 @@ function LiteMessageList({
41410
41567
  onLoadOlder,
41411
41568
  historyLoadRevision = 0
41412
41569
  }) {
41413
- const scrollRef = useRef17(null);
41414
- const trailingSpacerRef = useRef17(null);
41415
- const stickToBottomRef = useRef17(true);
41416
- const scrollFrameRef = useRef17(null);
41417
- const loadingOlderRef = useRef17(false);
41570
+ const scrollRef = useRef18(null);
41571
+ const trailingSpacerRef = useRef18(null);
41572
+ const stickToBottomRef = useRef18(true);
41573
+ const scrollFrameRef = useRef18(null);
41574
+ const loadingOlderRef = useRef18(false);
41418
41575
  useEffect19(() => {
41419
41576
  void historyLoadRevision;
41420
41577
  const element2 = scrollRef.current;
@@ -41555,7 +41712,7 @@ function LiteMessageList({
41555
41712
  },
41556
41713
  []
41557
41714
  );
41558
- return /* @__PURE__ */ jsxs35(
41715
+ return /* @__PURE__ */ jsxs34(
41559
41716
  "div",
41560
41717
  {
41561
41718
  ref: scrollRef,
@@ -41569,7 +41726,7 @@ function LiteMessageList({
41569
41726
  },
41570
41727
  className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-6 sm:px-8",
41571
41728
  children: [
41572
- rows.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "grid min-h-full place-items-center text-sm text-[hsl(var(--muted-foreground))]", children: isLoadingHistory ? "\u6B63\u5728\u52A0\u8F7D\u6D88\u606F\u2026" : "\u5F00\u59CB\u65B0\u7684\u5BF9\u8BDD\u5427" }) : /* @__PURE__ */ jsxs35(
41729
+ rows.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "grid min-h-full place-items-center text-sm text-[hsl(var(--muted-foreground))]", children: isLoadingHistory ? "\u6B63\u5728\u52A0\u8F7D\u6D88\u606F\u2026" : "\u5F00\u59CB\u65B0\u7684\u5BF9\u8BDD\u5427" }) : /* @__PURE__ */ jsxs34(
41573
41730
  "div",
41574
41731
  {
41575
41732
  className: "relative mx-auto w-full max-w-3xl",
@@ -41657,7 +41814,7 @@ function PlainTextMessage({
41657
41814
  if (row.role === "user") {
41658
41815
  return /* @__PURE__ */ jsx40("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx40("div", { className: "max-w-[82%] rounded-[18px] rounded-br-[6px] border border-[hsl(var(--user-msg-border))] bg-[hsl(var(--user-msg-bg))] px-4 py-3 text-sm leading-6 text-[hsl(var(--user-msg-fg))]", children: markdown }) });
41659
41816
  }
41660
- return /* @__PURE__ */ jsxs35(
41817
+ return /* @__PURE__ */ jsxs34(
41661
41818
  "div",
41662
41819
  {
41663
41820
  className: `break-words text-sm leading-6 ${row.role === "error" ? "text-[hsl(var(--destructive))]" : "text-[hsl(var(--foreground))]"}`,
@@ -41669,7 +41826,7 @@ function PlainTextMessage({
41669
41826
  );
41670
41827
  }
41671
41828
  function LiteLoadingIndicator() {
41672
- return /* @__PURE__ */ jsxs35("output", { className: "flex h-[38px] items-center gap-2 px-1 text-xs text-[hsl(var(--muted-foreground))]", "aria-live": "polite", children: [
41829
+ return /* @__PURE__ */ jsxs34("output", { className: "flex h-[38px] items-center gap-2 px-1 text-xs text-[hsl(var(--muted-foreground))]", "aria-live": "polite", children: [
41673
41830
  /* @__PURE__ */ jsx40(LoaderCircle, { size: 14, className: "animate-spin", "aria-hidden": "true" }),
41674
41831
  /* @__PURE__ */ jsx40("span", { children: "\u6B63\u5728\u751F\u6210\u4E2D\u2026" })
41675
41832
  ] });
@@ -41695,11 +41852,11 @@ function LiteFollowup({
41695
41852
  setDownloadingPath(null);
41696
41853
  }
41697
41854
  };
41698
- return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col items-start gap-3", children: [
41699
- artifacts.length > 0 ? /* @__PURE__ */ jsxs35("div", { className: "flex w-full flex-col items-start gap-1.5", children: [
41855
+ return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col items-start gap-3", children: [
41856
+ artifacts.length > 0 ? /* @__PURE__ */ jsxs34("div", { className: "flex w-full flex-col items-start gap-1.5", children: [
41700
41857
  /* @__PURE__ */ jsx40("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u672C\u8F6E\u6210\u679C" }),
41701
41858
  artifacts.map(
41702
- (artifact, artifactIndex) => artifact.kind === "link" ? /* @__PURE__ */ jsxs35(
41859
+ (artifact, artifactIndex) => artifact.kind === "link" ? /* @__PURE__ */ jsxs34(
41703
41860
  "a",
41704
41861
  {
41705
41862
  href: artifact.target,
@@ -41712,7 +41869,7 @@ function LiteFollowup({
41712
41869
  ]
41713
41870
  },
41714
41871
  `${artifact.kind}:${artifactIndex}`
41715
- ) : /* @__PURE__ */ jsxs35(
41872
+ ) : /* @__PURE__ */ jsxs34(
41716
41873
  "button",
41717
41874
  {
41718
41875
  type: "button",
@@ -41732,9 +41889,9 @@ function LiteFollowup({
41732
41889
  )
41733
41890
  )
41734
41891
  ] }) : null,
41735
- followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs35("div", { className: "flex max-w-full flex-col items-start gap-1.5", children: [
41892
+ followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs34("div", { className: "flex max-w-full flex-col items-start gap-1.5", children: [
41736
41893
  /* @__PURE__ */ jsx40("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u4E0B\u4E00\u6B65\u53EF\u4EE5" }),
41737
- followup.suggestions.map((suggestion) => /* @__PURE__ */ jsxs35(
41894
+ followup.suggestions.map((suggestion) => /* @__PURE__ */ jsxs34(
41738
41895
  "button",
41739
41896
  {
41740
41897
  type: "button",
@@ -41771,12 +41928,12 @@ import {
41771
41928
  useEffect as useEffect26,
41772
41929
  useLayoutEffect as useLayoutEffect7,
41773
41930
  useMemo as useMemo16,
41774
- useRef as useRef25,
41931
+ useRef as useRef26,
41775
41932
  useState as useState32
41776
41933
  } from "react";
41777
41934
 
41778
41935
  // ../../node_modules/.pnpm/use-stick-to-bottom@1.1.3_react@19.2.4/node_modules/use-stick-to-bottom/dist/useStickToBottom.js
41779
- import { useCallback as useCallback9, useMemo as useMemo13, useRef as useRef18, useState as useState25 } from "react";
41936
+ import { useCallback as useCallback9, useMemo as useMemo13, useRef as useRef19, useState as useState25 } from "react";
41780
41937
  var DEFAULT_SPRING_ANIMATION = {
41781
41938
  /**
41782
41939
  * A value from 0 to 1, on how much to damp the animation.
@@ -41816,7 +41973,7 @@ var useStickToBottom = (options = {}) => {
41816
41973
  const [escapedFromLock, updateEscapedFromLock] = useState25(false);
41817
41974
  const [isAtBottom, updateIsAtBottom] = useState25(options.initial !== false);
41818
41975
  const [isNearBottom, setIsNearBottom] = useState25(false);
41819
- const optionsRef = useRef18(null);
41976
+ const optionsRef = useRef19(null);
41820
41977
  optionsRef.current = options;
41821
41978
  const isSelecting = useCallback9(() => {
41822
41979
  if (!mouseDown) {
@@ -42120,11 +42277,11 @@ function mergeAnimations(...animations) {
42120
42277
 
42121
42278
  // ../../node_modules/.pnpm/use-stick-to-bottom@1.1.3_react@19.2.4/node_modules/use-stick-to-bottom/dist/StickToBottom.js
42122
42279
  import * as React from "react";
42123
- import { createContext as createContext7, useContext as useContext7, useEffect as useEffect20, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect4, useMemo as useMemo14, useRef as useRef19 } from "react";
42280
+ import { createContext as createContext7, useContext as useContext7, useEffect as useEffect20, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect4, useMemo as useMemo14, useRef as useRef20 } from "react";
42124
42281
  var StickToBottomContext = createContext7(null);
42125
42282
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect4 : useEffect20;
42126
42283
  function StickToBottom({ instance, children, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }) {
42127
- const customTargetScrollTop = useRef19(null);
42284
+ const customTargetScrollTop = useRef20(null);
42128
42285
  const targetScrollTop = React.useCallback((target, elements) => {
42129
42286
  const get = context?.targetScrollTop ?? currentTargetScrollTop;
42130
42287
  return get?.(target, elements) ?? target;
@@ -42205,7 +42362,7 @@ import {
42205
42362
  isHiddenInternalMessage as isHiddenInternalMessage2,
42206
42363
  normalizeMessageContent as normalizeMessageContent3
42207
42364
  } from "@blade-hq/agent-client/internal";
42208
- import { useCallback as useCallback11, useEffect as useEffect21, useLayoutEffect as useLayoutEffect5, useRef as useRef20, useState as useState26 } from "react";
42365
+ import { useCallback as useCallback11, useEffect as useEffect21, useLayoutEffect as useLayoutEffect5, useRef as useRef21, useState as useState26 } from "react";
42209
42366
  var HIGHLIGHT_MS = 1600;
42210
42367
  var TURN_NAV_HIGHLIGHT_CLASS = "blade-turn-nav-flash";
42211
42368
  var MAX_FRAMES_AFTER_LOCATE = 20;
@@ -42260,7 +42417,7 @@ function useTurnNavigation({
42260
42417
  reloadKey,
42261
42418
  rewriteKey
42262
42419
  }) {
42263
- const callbacks = useRef20({
42420
+ const callbacks = useRef21({
42264
42421
  getLoadedEntryElement,
42265
42422
  isEntryLoaded,
42266
42423
  locateEntry,
@@ -42275,14 +42432,14 @@ function useTurnNavigation({
42275
42432
  const [failedEntryId, setFailedEntryId] = useState26(null);
42276
42433
  const [error61, setError] = useState26(null);
42277
42434
  const [indexRefresh, setIndexRefresh] = useState26(0);
42278
- const seekSeq = useRef20(0);
42279
- const indexSeq = useRef20(0);
42280
- const indexRef = useRef20({
42435
+ const seekSeq = useRef21(0);
42436
+ const indexSeq = useRef21(0);
42437
+ const indexRef = useRef21({
42281
42438
  sessionId: null,
42282
42439
  items: []
42283
42440
  });
42284
- const highlightTimer = useRef20(void 0);
42285
- const highlightedRef = useRef20(null);
42441
+ const highlightTimer = useRef21(void 0);
42442
+ const highlightedRef = useRef21(null);
42286
42443
  const clearHighlight = useCallback11(() => {
42287
42444
  clearTimeout(highlightTimer.current);
42288
42445
  highlightTimer.current = void 0;
@@ -42441,7 +42598,7 @@ function useTurnNavigation({
42441
42598
  }
42442
42599
 
42443
42600
  // src/hooks/use-typewriter-reveal.ts
42444
- import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef21, useState as useState27 } from "react";
42601
+ import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef22, useState as useState27 } from "react";
42445
42602
  var REVEAL_INITIAL_CPS = 18;
42446
42603
  var REVEAL_MIN_CPS = 6;
42447
42604
  var REVEAL_MAX_CPS = 240;
@@ -42478,14 +42635,14 @@ function initialRevealState(targetText, isLive, resetKey) {
42478
42635
  }
42479
42636
  function useTypewriterReveal(targetText, isLive, resetKey) {
42480
42637
  const [state, setState] = useState27(() => initialRevealState(targetText, isLive, resetKey));
42481
- const targetTextRef = useRef21(targetText);
42638
+ const targetTextRef = useRef22(targetText);
42482
42639
  targetTextRef.current = targetText;
42483
- const revealedLenRef = useRef21(state.revealedLen);
42484
- const priorTargetLenRef = useRef21(targetText.length);
42485
- const emaCpsRef = useRef21(REVEAL_INITIAL_CPS);
42486
- const lastTickTsRef = useRef21(null);
42487
- const lastArrivalTsRef = useRef21(null);
42488
- const cancelRef = useRef21(null);
42640
+ const revealedLenRef = useRef22(state.revealedLen);
42641
+ const priorTargetLenRef = useRef22(targetText.length);
42642
+ const emaCpsRef = useRef22(REVEAL_INITIAL_CPS);
42643
+ const lastTickTsRef = useRef22(null);
42644
+ const lastArrivalTsRef = useRef22(null);
42645
+ const cancelRef = useRef22(null);
42489
42646
  const stopTicking = useCallback12(() => {
42490
42647
  cancelRef.current?.();
42491
42648
  cancelRef.current = null;
@@ -42517,7 +42674,7 @@ function useTypewriterReveal(targetText, isLive, resetKey) {
42517
42674
  priorTargetLenRef.current = targetText.length;
42518
42675
  setState((s) => ({ ...s, displayedText: targetText, revealedLen: targetText.length, isRevealing: false }));
42519
42676
  }
42520
- const tickRef = useRef21(null);
42677
+ const tickRef = useRef22(null);
42521
42678
  tickRef.current = (ts) => {
42522
42679
  cancelRef.current = null;
42523
42680
  const currentTargetLen = targetTextRef.current.length;
@@ -45540,7 +45697,7 @@ function extractRefs(content3) {
45540
45697
  }
45541
45698
 
45542
45699
  // src/chat/plan/PlanSummaryCard.tsx
45543
- import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
45700
+ import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
45544
45701
  function PlanSummaryCard({
45545
45702
  messages,
45546
45703
  sessionStatus,
@@ -45555,8 +45712,8 @@ function PlanSummaryCard({
45555
45712
  const isWaitingForInput = sessionStatus === "waiting_for_input";
45556
45713
  const canConfirm = Boolean(onConfirmPlan) && isWaitingForInput && data.lastPauseTool === "ExitPlanMode";
45557
45714
  const openPlanPanel = openPlanPanelAction && sessionId ? () => openPlanPanelAction(sessionId) : void 0;
45558
- return /* @__PURE__ */ jsxs36("div", { className: "flex w-full flex-col gap-4 rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card)/0.55)] p-4", children: [
45559
- /* @__PURE__ */ jsxs36(
45715
+ return /* @__PURE__ */ jsxs35("div", { className: "flex w-full flex-col gap-4 rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card)/0.55)] p-4", children: [
45716
+ /* @__PURE__ */ jsxs35(
45560
45717
  "button",
45561
45718
  {
45562
45719
  type: "button",
@@ -45564,14 +45721,14 @@ function PlanSummaryCard({
45564
45721
  disabled: isHistorical || !openPlanPanel,
45565
45722
  className: "flex w-full flex-col gap-4 text-left transition-colors hover:text-[hsl(var(--foreground))]",
45566
45723
  children: [
45567
- /* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between gap-3", children: [
45568
- /* @__PURE__ */ jsxs36("div", { className: "min-w-0 space-y-2", children: [
45569
- /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45724
+ /* @__PURE__ */ jsxs35("div", { className: "flex items-start justify-between gap-3", children: [
45725
+ /* @__PURE__ */ jsxs35("div", { className: "min-w-0 space-y-2", children: [
45726
+ /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45570
45727
  /* @__PURE__ */ jsx41(Sparkles, { size: 12 }),
45571
45728
  /* @__PURE__ */ jsx41("span", { children: "\u89C4\u5212\u6458\u8981" })
45572
45729
  ] }),
45573
45730
  /* @__PURE__ */ jsx41("div", { className: "truncate text-base font-medium text-[hsl(var(--foreground))]", children: data.intent || "\u5F53\u524D\u89C4\u5212" }),
45574
- /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: summaryState.kind === "progress" ? /* @__PURE__ */ jsxs36(Fragment15, { children: [
45731
+ /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: summaryState.kind === "progress" ? /* @__PURE__ */ jsxs35(Fragment15, { children: [
45575
45732
  /* @__PURE__ */ jsx41("span", { className: "rounded-full bg-[hsl(var(--accent))] px-2.5 py-1 text-[hsl(var(--foreground))]", children: summaryState.label }),
45576
45733
  /* @__PURE__ */ jsx41("span", { className: "font-mono tracking-[0.25em] text-[hsl(var(--muted-foreground))]", children: summaryState.dots })
45577
45734
  ] }) : /* @__PURE__ */ jsx41(
@@ -45596,16 +45753,16 @@ function PlanSummaryCard({
45596
45753
  }
45597
45754
  )
45598
45755
  ] }),
45599
- summaryState.kind === "complete" && /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45600
- /* @__PURE__ */ jsxs36("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45756
+ summaryState.kind === "complete" && /* @__PURE__ */ jsxs35("div", { className: "flex flex-wrap items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45757
+ /* @__PURE__ */ jsxs35("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45601
45758
  data.selectedSkills.length,
45602
45759
  " \u4E2A\u6280\u80FD"
45603
45760
  ] }),
45604
- /* @__PURE__ */ jsxs36("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45761
+ /* @__PURE__ */ jsxs35("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45605
45762
  stepCount,
45606
45763
  " \u4E2A\u6B65\u9AA4"
45607
45764
  ] }),
45608
- !isHistorical && /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--muted-foreground))]", children: [
45765
+ !isHistorical && /* @__PURE__ */ jsxs35("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--muted-foreground))]", children: [
45609
45766
  /* @__PURE__ */ jsx41(CircleCheck, { size: 12 }),
45610
45767
  "\u53F3\u4FA7\u67E5\u770B\u8BE6\u60C5"
45611
45768
  ] })
@@ -45628,9 +45785,9 @@ function PlanConfirmationPanel({
45628
45785
  setRevisionText("");
45629
45786
  setIsEditing(false);
45630
45787
  };
45631
- return /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--background)/0.45)] p-3", children: [
45632
- /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap gap-2", children: [
45633
- /* @__PURE__ */ jsxs36(
45788
+ return /* @__PURE__ */ jsxs35("div", { className: "space-y-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--background)/0.45)] p-3", children: [
45789
+ /* @__PURE__ */ jsxs35("div", { className: "flex flex-wrap gap-2", children: [
45790
+ /* @__PURE__ */ jsxs35(
45634
45791
  "button",
45635
45792
  {
45636
45793
  type: "button",
@@ -45642,7 +45799,7 @@ function PlanConfirmationPanel({
45642
45799
  ]
45643
45800
  }
45644
45801
  ),
45645
- /* @__PURE__ */ jsxs36(
45802
+ /* @__PURE__ */ jsxs35(
45646
45803
  "button",
45647
45804
  {
45648
45805
  type: "button",
@@ -45655,7 +45812,7 @@ function PlanConfirmationPanel({
45655
45812
  }
45656
45813
  )
45657
45814
  ] }),
45658
- isEditing && /* @__PURE__ */ jsxs36("div", { className: "space-y-2", children: [
45815
+ isEditing && /* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
45659
45816
  /* @__PURE__ */ jsx41(
45660
45817
  "textarea",
45661
45818
  {
@@ -45783,7 +45940,7 @@ function extractPlanMessagesForTurn(messages, turnLastMessage) {
45783
45940
 
45784
45941
  // src/chat/CompactionCard.tsx
45785
45942
  import { useState as useState29 } from "react";
45786
- import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
45943
+ import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
45787
45944
  var PERCENT_FORMATTER = new Intl.NumberFormat("zh-CN", {
45788
45945
  style: "percent",
45789
45946
  maximumFractionDigits: 0
@@ -45844,9 +46001,9 @@ function CompactionCard({
45844
46001
  const hasSummary = typeof source.summary_full === "string" && source.summary_full.trim().length > 0 && !isGenericArchiveSummary(source.summary_full);
45845
46002
  const hasFailureReason = source.status === "failed" && Boolean(source.failure_reason);
45846
46003
  const canExpand = source.status === "completed" && (hasSummary || archivedToolCalls.length > 0) || hasFailureReason;
45847
- return /* @__PURE__ */ jsxs37("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
45848
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-2", children: [
45849
- /* @__PURE__ */ jsxs37(
46004
+ return /* @__PURE__ */ jsxs36("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
46005
+ /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-2", children: [
46006
+ /* @__PURE__ */ jsxs36(
45850
46007
  "button",
45851
46008
  {
45852
46009
  type: "button",
@@ -45858,13 +46015,13 @@ function CompactionCard({
45858
46015
  "aria-expanded": expanded,
45859
46016
  children: [
45860
46017
  canExpand ? expanded ? /* @__PURE__ */ jsx42(ChevronDown, { size: 12, className: "shrink-0" }) : /* @__PURE__ */ jsx42(ChevronRight, { size: 12, className: "shrink-0" }) : null,
45861
- /* @__PURE__ */ jsx42("span", { children: source.status === "streaming" ? /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1", children: [
46018
+ /* @__PURE__ */ jsx42("span", { children: source.status === "streaming" ? /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1", children: [
45862
46019
  /* @__PURE__ */ jsx42(LoaderCircle, { size: 12, className: "animate-spin" }),
45863
46020
  "\u6B63\u5728\u538B\u7F29\u4E0A\u4E0B\u6587"
45864
- ] }) : source.status === "failed" ? /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-danger))]", children: [
46021
+ ] }) : source.status === "failed" ? /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-danger))]", children: [
45865
46022
  /* @__PURE__ */ jsx42(CircleX, { size: 12 }),
45866
46023
  "\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25"
45867
- ] }) : source.status === "interrupted" ? /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-warning))]", children: [
46024
+ ] }) : source.status === "interrupted" ? /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-warning))]", children: [
45868
46025
  /* @__PURE__ */ jsx42(Square, { size: 12 }),
45869
46026
  "\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88"
45870
46027
  ] }) : "\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29" })
@@ -45881,13 +46038,13 @@ function CompactionCard({
45881
46038
  }
45882
46039
  ) : null
45883
46040
  ] }),
45884
- expanded ? /* @__PURE__ */ jsxs37("div", { className: "mt-1 max-w-3xl rounded-lg border border-[hsl(var(--border))]/70 bg-[hsl(var(--card))]/80 px-3 py-2 text-[11px] leading-relaxed", children: [
45885
- /* @__PURE__ */ jsxs37("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-[hsl(var(--muted-foreground))]", children: [
45886
- /* @__PURE__ */ jsxs37("span", { children: [
46041
+ expanded ? /* @__PURE__ */ jsxs36("div", { className: "mt-1 max-w-3xl rounded-lg border border-[hsl(var(--border))]/70 bg-[hsl(var(--card))]/80 px-3 py-2 text-[11px] leading-relaxed", children: [
46042
+ /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-[hsl(var(--muted-foreground))]", children: [
46043
+ /* @__PURE__ */ jsxs36("span", { children: [
45887
46044
  "#",
45888
46045
  shortId(source.compaction_id)
45889
46046
  ] }),
45890
- /* @__PURE__ */ jsxs37("span", { children: [
46047
+ /* @__PURE__ */ jsxs36("span", { children: [
45891
46048
  "\u8282\u7701 ",
45892
46049
  formatSavedRatio(source.saved_ratio),
45893
46050
  "\uFF08",
@@ -45897,7 +46054,7 @@ function CompactionCard({
45897
46054
  formatTokens(source.tokens_after),
45898
46055
  " token\uFF09"
45899
46056
  ] }),
45900
- /* @__PURE__ */ jsxs37("span", { children: [
46057
+ /* @__PURE__ */ jsxs36("span", { children: [
45901
46058
  "\u5F52\u6863 ",
45902
46059
  archivedCount,
45903
46060
  " \u4E2A\u5DE5\u5177\u7ED3\u679C"
@@ -45905,12 +46062,12 @@ function CompactionCard({
45905
46062
  ] }),
45906
46063
  archivedToolCalls.length > 0 ? /* @__PURE__ */ jsx42("div", { className: "mt-2 space-y-1.5", children: archivedToolCalls.map((item, index2) => {
45907
46064
  const archivePath = getArchivePath(item, archivedFiles);
45908
- return /* @__PURE__ */ jsxs37(
46065
+ return /* @__PURE__ */ jsxs36(
45909
46066
  "div",
45910
46067
  {
45911
46068
  className: "rounded-md border border-[hsl(var(--border))]/70 bg-[hsl(var(--muted))]/35 px-2 py-1.5",
45912
46069
  children: [
45913
- /* @__PURE__ */ jsxs37("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-[hsl(var(--foreground))]", children: [
46070
+ /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-[hsl(var(--foreground))]", children: [
45914
46071
  /* @__PURE__ */ jsx42("span", { className: "font-medium", children: getArchivedToolLabel(item) }),
45915
46072
  item.tool_call_id ? /* @__PURE__ */ jsx42("span", { className: "font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: item.tool_call_id }) : null
45916
46073
  ] }),
@@ -45921,7 +46078,7 @@ function CompactionCard({
45921
46078
  );
45922
46079
  }) }) : null,
45923
46080
  hasSummary ? /* @__PURE__ */ jsx42("pre", { className: "mt-2 max-h-[360px] overflow-auto whitespace-pre-wrap rounded-md border border-[hsl(var(--border))]/70 bg-[hsl(var(--muted))]/25 px-2 py-1.5 font-mono text-[11px] leading-relaxed text-[hsl(var(--foreground))]", children: source.summary_full }) : null,
45924
- source.status === "failed" && source.failure_reason ? /* @__PURE__ */ jsxs37("div", { className: "mt-2 text-[hsl(var(--swf-danger))]", children: [
46081
+ source.status === "failed" && source.failure_reason ? /* @__PURE__ */ jsxs36("div", { className: "mt-2 text-[hsl(var(--swf-danger))]", children: [
45925
46082
  "\u5931\u8D25\u539F\u56E0\uFF1A",
45926
46083
  source.failure_reason
45927
46084
  ] }) : null
@@ -45930,11 +46087,11 @@ function CompactionCard({
45930
46087
  }
45931
46088
 
45932
46089
  // src/chat/PostChatFollowupBlock.tsx
45933
- import { useEffect as useEffect24, useRef as useRef23 } from "react";
46090
+ import { useEffect as useEffect24, useRef as useRef24 } from "react";
45934
46091
 
45935
46092
  // src/chat/FinalArtifactCards.tsx
45936
- import { useEffect as useEffect23, useRef as useRef22, useState as useState30 } from "react";
45937
- import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
46093
+ import { useEffect as useEffect23, useRef as useRef23, useState as useState30 } from "react";
46094
+ import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
45938
46095
  function basename2(path2) {
45939
46096
  return path2.split("/").filter(Boolean).pop() || path2;
45940
46097
  }
@@ -45955,7 +46112,7 @@ function LinkCard({
45955
46112
  const bladeHost = useBladeHost();
45956
46113
  const host = hostOf(url2);
45957
46114
  const local = isLoopbackUrl(url2) && Boolean(bladeHost.openPreview);
45958
- const content3 = /* @__PURE__ */ jsxs38(Fragment16, { children: [
46115
+ const content3 = /* @__PURE__ */ jsxs37(Fragment16, { children: [
45959
46116
  /* @__PURE__ */ jsx43("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[hsl(var(--primary))]", children: /* @__PURE__ */ jsx43(Globe, { size: 15, "aria-hidden": "true" }) }),
45960
46117
  /* @__PURE__ */ jsx43("span", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx43("span", { className: "block truncate text-xs font-medium leading-5", children: label || host }) }),
45961
46118
  /* @__PURE__ */ jsx43(
@@ -46008,8 +46165,8 @@ function FinalArtifactCards({
46008
46165
  const hasMore = artifacts.length > 3;
46009
46166
  const visibleArtifacts = expanded ? artifacts : artifacts.slice(0, 3);
46010
46167
  const emit = useFollowupInteraction();
46011
- const reportedShown = useRef22(/* @__PURE__ */ new Set());
46012
- const reportedOpened = useRef22(/* @__PURE__ */ new Set());
46168
+ const reportedShown = useRef23(/* @__PURE__ */ new Set());
46169
+ const reportedOpened = useRef23(/* @__PURE__ */ new Set());
46013
46170
  const visibleCount = visibleArtifacts.length;
46014
46171
  useEffect23(() => {
46015
46172
  for (let artifactIndex = 0; artifactIndex < visibleCount; artifactIndex += 1) {
@@ -46027,7 +46184,7 @@ function FinalArtifactCards({
46027
46184
  const columnCount = Math.min(artifacts.length, 3);
46028
46185
  const gridWidth = columnCount * 180 + Math.max(0, columnCount - 1) * 6;
46029
46186
  if (artifacts.length === 0) return null;
46030
- return /* @__PURE__ */ jsxs38("div", { className: "flex max-w-full flex-col gap-1.5", children: [
46187
+ return /* @__PURE__ */ jsxs37("div", { className: "flex max-w-full flex-col gap-1.5", children: [
46031
46188
  /* @__PURE__ */ jsx43(
46032
46189
  "div",
46033
46190
  {
@@ -46063,7 +46220,7 @@ function FinalArtifactCards({
46063
46220
  )
46064
46221
  }
46065
46222
  ),
46066
- hasMore ? /* @__PURE__ */ jsxs38(
46223
+ hasMore ? /* @__PURE__ */ jsxs37(
46067
46224
  "button",
46068
46225
  {
46069
46226
  type: "button",
@@ -46087,7 +46244,7 @@ function FinalArtifactCards({
46087
46244
  }
46088
46245
 
46089
46246
  // src/chat/PostChatFollowupBlock.tsx
46090
- import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
46247
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
46091
46248
  function PostChatFollowupBlock({
46092
46249
  sessionId,
46093
46250
  followup,
@@ -46097,8 +46254,8 @@ function PostChatFollowupBlock({
46097
46254
  }) {
46098
46255
  const composer = useComposerBridge(sessionId);
46099
46256
  const emit = useFollowupInteraction();
46100
- const reportedSuggestions = useRef23(false);
46101
- const adopted = useRef23(/* @__PURE__ */ new Set());
46257
+ const reportedSuggestions = useRef24(false);
46258
+ const adopted = useRef24(/* @__PURE__ */ new Set());
46102
46259
  const artifacts = followup?.final_artifacts ?? [];
46103
46260
  const assistantEntryId = followup?.assistant_entry_id ?? "";
46104
46261
  const suggestionCount = followup?.suggestions.length ?? 0;
@@ -46109,9 +46266,9 @@ function PostChatFollowupBlock({
46109
46266
  }, [assistantEntryId, emit, sessionId, suggestionCount]);
46110
46267
  if (!followup || !followup.recaption && followup.suggestions.length === 0 && artifacts.length === 0 && !followup.feedback_eligible)
46111
46268
  return null;
46112
- return /* @__PURE__ */ jsxs39("div", { part: "followup", className: "blade-chat-followup flex w-fit max-w-full flex-col gap-4 rounded-xl border border-[hsl(var(--border)/0.75)] bg-[hsl(var(--muted)/0.28)] px-3 py-3 sm:min-w-[340px] sm:max-w-[680px]", children: [
46113
- followup.recaption ? /* @__PURE__ */ jsxs39("section", { "aria-label": "\u672C\u8F6E\u5C0F\u7ED3", className: "flex flex-col gap-2", children: [
46114
- /* @__PURE__ */ jsxs39("div", { className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-[hsl(var(--muted-foreground))]", children: [
46269
+ return /* @__PURE__ */ jsxs38("div", { part: "followup", className: "blade-chat-followup flex w-fit max-w-full flex-col gap-4 rounded-xl border border-[hsl(var(--border)/0.75)] bg-[hsl(var(--muted)/0.28)] px-3 py-3 sm:min-w-[340px] sm:max-w-[680px]", children: [
46270
+ followup.recaption ? /* @__PURE__ */ jsxs38("section", { "aria-label": "\u672C\u8F6E\u5C0F\u7ED3", className: "flex flex-col gap-2", children: [
46271
+ /* @__PURE__ */ jsxs38("div", { className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-[hsl(var(--muted-foreground))]", children: [
46115
46272
  /* @__PURE__ */ jsx44(Sparkles, { size: 14, "aria-hidden": "true" }),
46116
46273
  "\u672C\u8F6E\u5C0F\u7ED3"
46117
46274
  ] }),
@@ -46133,9 +46290,9 @@ function PostChatFollowupBlock({
46133
46290
  assistantEntryId
46134
46291
  }
46135
46292
  ) }) : null,
46136
- followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs39("section", { className: "flex flex-col items-start gap-1.5", "aria-label": "\u4E0B\u4E00\u6B65\u5EFA\u8BAE", children: [
46293
+ followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs38("section", { className: "flex flex-col items-start gap-1.5", "aria-label": "\u4E0B\u4E00\u6B65\u5EFA\u8BAE", children: [
46137
46294
  /* @__PURE__ */ jsx44("div", { className: "text-xs font-medium text-[hsl(var(--muted-foreground))]", children: "\u4E0B\u4E00\u6B65\u53EF\u4EE5" }),
46138
- /* @__PURE__ */ jsx44("div", { className: "grid w-fit max-w-full gap-1.5 sm:max-w-[680px]", children: followup.suggestions.map((suggestion, suggestionIndex) => /* @__PURE__ */ jsxs39(
46295
+ /* @__PURE__ */ jsx44("div", { className: "grid w-fit max-w-full gap-1.5 sm:max-w-[680px]", children: followup.suggestions.map((suggestion, suggestionIndex) => /* @__PURE__ */ jsxs38(
46139
46296
  "button",
46140
46297
  {
46141
46298
  type: "button",
@@ -46180,7 +46337,7 @@ function PostChatFollowupBlock({
46180
46337
 
46181
46338
  // src/chat/RenderErrorBoundary.tsx
46182
46339
  import { Component } from "react";
46183
- import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
46340
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
46184
46341
  function getFirstComponentName(componentStack) {
46185
46342
  const match = componentStack.match(/\n\s+at\s+([^\s(]+)/);
46186
46343
  return match?.[1] ?? null;
@@ -46213,14 +46370,14 @@ var RenderErrorBoundary = class extends Component {
46213
46370
  return children;
46214
46371
  }
46215
46372
  const componentName = getFirstComponentName(componentStack);
46216
- return /* @__PURE__ */ jsx45("div", { className: "blade-chat-render-error rounded-xl border border-[hsl(var(--swf-warning)/0.3)] bg-[hsl(var(--swf-warning-soft))] px-4 py-3 text-sm text-[hsl(var(--foreground))]", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-start gap-2", children: [
46373
+ return /* @__PURE__ */ jsx45("div", { className: "blade-chat-render-error rounded-xl border border-[hsl(var(--swf-warning)/0.3)] bg-[hsl(var(--swf-warning-soft))] px-4 py-3 text-sm text-[hsl(var(--foreground))]", children: /* @__PURE__ */ jsxs39("div", { className: "flex items-start gap-2", children: [
46217
46374
  /* @__PURE__ */ jsx45(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0 text-[hsl(var(--swf-warning))]" }),
46218
- /* @__PURE__ */ jsxs40("div", { className: "min-w-0 flex-1", children: [
46219
- /* @__PURE__ */ jsxs40("div", { className: "font-medium", children: [
46375
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0 flex-1", children: [
46376
+ /* @__PURE__ */ jsxs39("div", { className: "font-medium", children: [
46220
46377
  label,
46221
46378
  "\u6E32\u67D3\u5931\u8D25"
46222
46379
  ] }),
46223
- /* @__PURE__ */ jsxs40("div", { className: "mt-1 break-words text-xs leading-5 text-[hsl(var(--secondary-foreground))]", children: [
46380
+ /* @__PURE__ */ jsxs39("div", { className: "mt-1 break-words text-xs leading-5 text-[hsl(var(--secondary-foreground))]", children: [
46224
46381
  componentName ? `\u7EC4\u4EF6\uFF1A${componentName}\u3002` : null,
46225
46382
  error61.message || "\u53D1\u751F\u4E86\u672A\u9884\u671F\u7684\u6E32\u67D3\u9519\u8BEF\u3002"
46226
46383
  ] }),
@@ -46231,8 +46388,8 @@ var RenderErrorBoundary = class extends Component {
46231
46388
  };
46232
46389
 
46233
46390
  // src/chat/TurnNavRail.tsx
46234
- import { useCallback as useCallback13, useEffect as useEffect25, useLayoutEffect as useLayoutEffect6, useRef as useRef24, useState as useState31 } from "react";
46235
- import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
46391
+ import { useCallback as useCallback13, useEffect as useEffect25, useLayoutEffect as useLayoutEffect6, useRef as useRef25, useState as useState31 } from "react";
46392
+ import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
46236
46393
  var PANEL_MAX_HEIGHT = 448;
46237
46394
  var PANEL_MARGIN = 16;
46238
46395
  function clippingAncestor(element2) {
@@ -46255,11 +46412,11 @@ function TurnNavRail({
46255
46412
  }) {
46256
46413
  const [hoveredTurnId, setHoveredTurnId] = useState31(null);
46257
46414
  const [panelOpen, setPanelOpen] = useState31(false);
46258
- const listRef = useRef24(null);
46259
- const markerRef = useRef24(null);
46260
- const edgeRatioRef = useRef24(0.5);
46261
- const velocityRef = useRef24(0);
46262
- const rafRef = useRef24(null);
46415
+ const listRef = useRef25(null);
46416
+ const markerRef = useRef25(null);
46417
+ const edgeRatioRef = useRef25(0.5);
46418
+ const velocityRef = useRef25(0);
46419
+ const rafRef = useRef25(null);
46263
46420
  useEffect25(() => {
46264
46421
  if (!panelOpen || hoveredTurnId == null) return;
46265
46422
  const list2 = listRef.current;
@@ -46377,8 +46534,8 @@ function TurnNavRail({
46377
46534
  setPanelOpen(false);
46378
46535
  setHoveredTurnId(null);
46379
46536
  },
46380
- children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-end", children: [
46381
- /* @__PURE__ */ jsxs41(
46537
+ children: /* @__PURE__ */ jsxs40("div", { className: "flex flex-col items-end", children: [
46538
+ /* @__PURE__ */ jsxs40(
46382
46539
  "div",
46383
46540
  {
46384
46541
  ref: markerRef,
@@ -46426,7 +46583,7 @@ function TurnNavRail({
46426
46583
  ]
46427
46584
  }
46428
46585
  ),
46429
- error61 ? /* @__PURE__ */ jsxs41(
46586
+ error61 ? /* @__PURE__ */ jsxs40(
46430
46587
  "div",
46431
46588
  {
46432
46589
  role: "alert",
@@ -46536,7 +46693,12 @@ function calculateAnimatedScrollTop({
46536
46693
  }
46537
46694
 
46538
46695
  // src/chat/MessageList.tsx
46539
- import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
46696
+ import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
46697
+ function isReasoningRevealingForMessage(message, isRevealing, isStopping = false) {
46698
+ if (isStopping) return false;
46699
+ const hasContent = message?.content != null && message.content.length > 0;
46700
+ return isRevealing || Boolean(message?.reasoning && !hasContent && !message.tool_calls?.length);
46701
+ }
46540
46702
  function getMessageMeasureSignature(message) {
46541
46703
  const contentSize = typeof message.content === "string" ? message.content.length : message.content.length;
46542
46704
  return [
@@ -46625,8 +46787,8 @@ function MessageListBody({
46625
46787
  const stateIsStreaming = useSessionState(sessionId, (state) => state.isStreaming);
46626
46788
  const sessionIsStreaming = streamingOverride ?? stateIsStreaming;
46627
46789
  const agentLoopNameSet = useMemo16(() => new Set(Object.keys(agentLoops ?? {})), [agentLoops]);
46628
- const assistantMessagesCacheRef = useRef25(/* @__PURE__ */ new Map());
46629
- const stickContextRef = useRef25(null);
46790
+ const assistantMessagesCacheRef = useRef26(/* @__PURE__ */ new Map());
46791
+ const stickContextRef = useRef26(null);
46630
46792
  const latestAssistantIndex = (() => {
46631
46793
  for (let i2 = messages.length - 1; i2 >= 0; i2 -= 1) {
46632
46794
  const candidate = messages[i2];
@@ -46641,6 +46803,11 @@ function MessageListBody({
46641
46803
  const isRevealLive = latestAssistantMessage != null && !isReplay;
46642
46804
  const contentReveal = useTypewriterReveal(revealContentText, isRevealLive, revealTargetKey);
46643
46805
  const reasoningReveal = useTypewriterReveal(revealReasoningText, isRevealLive, revealTargetKey);
46806
+ const isReasoningRevealing = isReasoningRevealingForMessage(
46807
+ latestAssistantMessage,
46808
+ reasoningReveal.isRevealing,
46809
+ isStopping
46810
+ );
46644
46811
  const isRevealingAny = contentReveal.isRevealing || reasoningReveal.isRevealing;
46645
46812
  useEffect26(() => {
46646
46813
  onRevealingChange?.(isRevealingAny);
@@ -46723,52 +46890,52 @@ function MessageListBody({
46723
46890
  const latestUserStableId = latestUserBlock?.message.render_id ?? latestUserAnchorId;
46724
46891
  const latestUserIsOptimistic = latestUserBlock?.message.entry_id?.startsWith("local-user-") ?? false;
46725
46892
  const effectiveNewUserMessageKey = latestUserIsOptimistic ? latestUserBlock?.key ?? latestUserAnchorId : null;
46726
- const containerRef = useRef25(null);
46727
- const scrollContainerRef = useRef25(null);
46728
- const virtualPrefixRef = useRef25(null);
46729
- const visibleTurnsRef = useRef25(/* @__PURE__ */ new Map());
46730
- const visibleBlockRowsRef = useRef25(/* @__PURE__ */ new Map());
46731
- const mountedTurnElementsRef = useRef25(/* @__PURE__ */ new Map());
46732
- const turnRefCallbacksRef = useRef25(
46893
+ const containerRef = useRef26(null);
46894
+ const scrollContainerRef = useRef26(null);
46895
+ const virtualPrefixRef = useRef26(null);
46896
+ const visibleTurnsRef = useRef26(/* @__PURE__ */ new Map());
46897
+ const visibleBlockRowsRef = useRef26(/* @__PURE__ */ new Map());
46898
+ const mountedTurnElementsRef = useRef26(/* @__PURE__ */ new Map());
46899
+ const turnRefCallbacksRef = useRef26(
46733
46900
  /* @__PURE__ */ new Map()
46734
46901
  );
46735
- const intersectionObserverRef = useRef25(null);
46736
- const measuredSizeByKeyRef = useRef25(/* @__PURE__ */ new Map());
46737
- const measuredRowElementsRef = useRef25(/* @__PURE__ */ new Map());
46738
- const rowRefCallbacksRef = useRef25(
46902
+ const intersectionObserverRef = useRef26(null);
46903
+ const measuredSizeByKeyRef = useRef26(/* @__PURE__ */ new Map());
46904
+ const measuredRowElementsRef = useRef26(/* @__PURE__ */ new Map());
46905
+ const rowRefCallbacksRef = useRef26(
46739
46906
  /* @__PURE__ */ new Map()
46740
46907
  );
46741
- const rowResizeObserverRef = useRef25(null);
46742
- const boundaryAnchorRef = useRef25(null);
46743
- const previousStablePrefixEndRef = useRef25(null);
46744
- const frameRef = useRef25(null);
46745
- const startScrollFrameRef = useRef25(null);
46746
- const startScrollTimeoutRef = useRef25(null);
46747
- const entryScrollFrameRef = useRef25(null);
46748
- const entryScrollTimeoutRefs = useRef25([]);
46749
- const appliedStartScrollKeyRef = useRef25(null);
46750
- const appliedEntryScrollKeyRef = useRef25(null);
46751
- const newTurnSpacerRef = useRef25(null);
46752
- const newTurnScrollFrameRef = useRef25(null);
46753
- const newTurnScrollTimeoutRef = useRef25(null);
46754
- const newTurnSpacerFrameRef = useRef25(null);
46755
- const newTurnAnimationFrameRef = useRef25(null);
46756
- const newTurnAnimationCleanupRef = useRef25(null);
46757
- const isAnimatingNewTurnRef = useRef25(false);
46758
- const heldStickToBottomRef = useRef25(false);
46759
- const pinnedScrollTopRef = useRef25(null);
46760
- const newTurnPinActiveRef = useRef25(false);
46761
- const appliedNewUserMessageKeyRef = useRef25(null);
46762
- const observedLatestUserAnchorRef = useRef25(
46908
+ const rowResizeObserverRef = useRef26(null);
46909
+ const boundaryAnchorRef = useRef26(null);
46910
+ const previousStablePrefixEndRef = useRef26(null);
46911
+ const frameRef = useRef26(null);
46912
+ const startScrollFrameRef = useRef26(null);
46913
+ const startScrollTimeoutRef = useRef26(null);
46914
+ const entryScrollFrameRef = useRef26(null);
46915
+ const entryScrollTimeoutRefs = useRef26([]);
46916
+ const appliedStartScrollKeyRef = useRef26(null);
46917
+ const appliedEntryScrollKeyRef = useRef26(null);
46918
+ const newTurnSpacerRef = useRef26(null);
46919
+ const newTurnScrollFrameRef = useRef26(null);
46920
+ const newTurnScrollTimeoutRef = useRef26(null);
46921
+ const newTurnSpacerFrameRef = useRef26(null);
46922
+ const newTurnAnimationFrameRef = useRef26(null);
46923
+ const newTurnAnimationCleanupRef = useRef26(null);
46924
+ const isAnimatingNewTurnRef = useRef26(false);
46925
+ const heldStickToBottomRef = useRef26(false);
46926
+ const pinnedScrollTopRef = useRef26(null);
46927
+ const newTurnPinActiveRef = useRef26(false);
46928
+ const appliedNewUserMessageKeyRef = useRef26(null);
46929
+ const observedLatestUserAnchorRef = useRef26(
46763
46930
  latestUserIsOptimistic ? null : latestUserAnchorId
46764
46931
  );
46765
- const observedLatestUserStableIdRef = useRef25(
46932
+ const observedLatestUserStableIdRef = useRef26(
46766
46933
  latestUserIsOptimistic ? null : latestUserStableId
46767
46934
  );
46768
46935
  const [activeTurnId, setActiveTurnId] = useState32(lastTurnId);
46769
46936
  const [virtualScrollMargin, setVirtualScrollMargin] = useState32(0);
46770
46937
  const [scrollContainerElement, setScrollContainerElement] = useState32(null);
46771
- const loadingOlderRef = useRef25(false);
46938
+ const loadingOlderRef = useRef26(false);
46772
46939
  const virtualizationEnabled = Boolean(useChatEnvironment().useVirtualizer);
46773
46940
  const stablePrefixEnd = useMemo16(
46774
46941
  () => virtualizationEnabled ? findStablePrefixEnd(renderBlocks) : 0,
@@ -47529,7 +47696,7 @@ function MessageListBody({
47529
47696
  stablePrefixEnd,
47530
47697
  virtualizer
47531
47698
  ]);
47532
- return /* @__PURE__ */ jsxs42(
47699
+ return /* @__PURE__ */ jsxs41(
47533
47700
  "div",
47534
47701
  {
47535
47702
  ref: containerRef,
@@ -47548,7 +47715,7 @@ function MessageListBody({
47548
47715
  failedTurnId: navFailedEntryId
47549
47716
  }
47550
47717
  ) : null,
47551
- /* @__PURE__ */ jsxs42(
47718
+ /* @__PURE__ */ jsxs41(
47552
47719
  StickToBottom,
47553
47720
  {
47554
47721
  contextRef: stickContextRef,
@@ -47557,7 +47724,7 @@ function MessageListBody({
47557
47724
  resize: stickyTurn ? { damping: 0.8, stiffness: 0.08, mass: 1 } : "instant",
47558
47725
  targetScrollTop: shouldAnchorEntry ? getAnchorTargetScrollTop : void 0,
47559
47726
  children: [
47560
- /* @__PURE__ */ jsxs42(
47727
+ /* @__PURE__ */ jsxs41(
47561
47728
  StickToBottom.Content,
47562
47729
  {
47563
47730
  part: "messages-scroll",
@@ -47579,7 +47746,7 @@ function MessageListBody({
47579
47746
  renderBlocks,
47580
47747
  sessionId,
47581
47748
  sessionStatus,
47582
- isReasoningRevealing: reasoningReveal.isRevealing,
47749
+ isReasoningRevealing,
47583
47750
  revealTargetMessage: latestAssistantMessage,
47584
47751
  revealedContentText: contentReveal.displayedText,
47585
47752
  revealedReasoningText: reasoningReveal.displayedText,
@@ -47716,7 +47883,7 @@ function MessageListContent({
47716
47883
  const isHistoricalPlan = globalBlockIndex !== latestPlanCardBlockIndex;
47717
47884
  const blockFeedback = displayMessages.map((message) => message.entry_id && resultFeedbackByEntry.get(message.entry_id)).find((feedback) => feedback != null);
47718
47885
  const isActiveFollowup = block.anchorId === followupTurnId;
47719
- return /* @__PURE__ */ jsxs42(
47886
+ return /* @__PURE__ */ jsxs41(
47720
47887
  "div",
47721
47888
  {
47722
47889
  ref: getTurnElementRef(block.anchorId),
@@ -47817,7 +47984,7 @@ function MessageListContent({
47817
47984
  const renderMeasuredRow = (block, globalBlockIndex, virtualItem) => {
47818
47985
  const persistentId = getRenderBlockPersistentId(block);
47819
47986
  const isVirtual = virtualItem !== void 0;
47820
- return /* @__PURE__ */ jsxs42(
47987
+ return /* @__PURE__ */ jsxs41(
47821
47988
  "div",
47822
47989
  {
47823
47990
  ref: getMeasuredRowRef(block, globalBlockIndex, isVirtual),
@@ -47848,8 +48015,8 @@ function MessageListContent({
47848
48015
  {
47849
48016
  part: "messages-content",
47850
48017
  className: `blade-chat-messages-content mx-auto max-w-[748px] ${customization?.classNames?.messageListContent ?? ""}`,
47851
- children: /* @__PURE__ */ jsxs42("div", { className: `min-w-0 flex flex-col gap-9 ${customization?.classNames?.messageListInner ?? ""}`, children: [
47852
- renderBlocks.length === 0 && isLoadingHistory ? /* @__PURE__ */ jsx47(HistoryLoadingPlaceholder, {}) : renderBlocks.length === 0 ? emptyState ? emptyState : customization?.components?.EmptyState ? /* @__PURE__ */ jsx47(customization.components.EmptyState, {}) : /* @__PURE__ */ jsxs42(
48018
+ children: /* @__PURE__ */ jsxs41("div", { className: `min-w-0 flex flex-col gap-9 ${customization?.classNames?.messageListInner ?? ""}`, children: [
48019
+ renderBlocks.length === 0 && isLoadingHistory ? /* @__PURE__ */ jsx47(HistoryLoadingPlaceholder, {}) : renderBlocks.length === 0 ? emptyState ? emptyState : customization?.components?.EmptyState ? /* @__PURE__ */ jsx47(customization.components.EmptyState, {}) : /* @__PURE__ */ jsxs41(
47853
48020
  "div",
47854
48021
  {
47855
48022
  part: "empty",
@@ -47860,7 +48027,7 @@ function MessageListContent({
47860
48027
  /* @__PURE__ */ jsx47("span", { className: "text-sm opacity-60", children: "\u5728\u4E0B\u65B9\u8F93\u5165\u6D88\u606F\u5F00\u59CB\u804A\u5929" })
47861
48028
  ]
47862
48029
  }
47863
- ) : /* @__PURE__ */ jsxs42(Fragment17, { children: [
48030
+ ) : /* @__PURE__ */ jsxs41(Fragment17, { children: [
47864
48031
  stablePrefixEnd > 0 ? /* @__PURE__ */ jsx47(
47865
48032
  "div",
47866
48033
  {
@@ -47884,14 +48051,14 @@ function MessageListContent({
47884
48051
  );
47885
48052
  }
47886
48053
  function HistoryLoadingPlaceholder() {
47887
- return /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-9", "aria-busy": "true", "aria-live": "polite", children: [
47888
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-center gap-2 text-sm text-[hsl(var(--muted-foreground))]", children: [
48054
+ return /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-9", "aria-busy": "true", "aria-live": "polite", children: [
48055
+ /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-center gap-2 text-sm text-[hsl(var(--muted-foreground))]", children: [
47889
48056
  /* @__PURE__ */ jsx47("span", { className: "size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }),
47890
48057
  /* @__PURE__ */ jsx47("span", { children: "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD\u8BB0\u5F55\u2026" })
47891
48058
  ] }),
47892
- [0, 1].map((index2) => /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-4", children: [
48059
+ [0, 1].map((index2) => /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-4", children: [
47893
48060
  /* @__PURE__ */ jsx47("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx47("div", { className: "h-10 w-2/5 animate-pulse rounded-2xl bg-[hsl(var(--muted))]" }) }),
47894
- /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-2.5", children: [
48061
+ /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-2.5", children: [
47895
48062
  /* @__PURE__ */ jsx47("div", { className: "h-4 w-1/3 animate-pulse rounded bg-[hsl(var(--muted))]" }),
47896
48063
  /* @__PURE__ */ jsx47("div", { className: "h-4 w-4/5 animate-pulse rounded bg-[hsl(var(--muted))]" }),
47897
48064
  /* @__PURE__ */ jsx47("div", { className: "h-4 w-3/5 animate-pulse rounded bg-[hsl(var(--muted))]" })
@@ -47902,7 +48069,7 @@ function HistoryLoadingPlaceholder() {
47902
48069
  function ScrollToBottomButton({ onBeforeScroll }) {
47903
48070
  const { isAtBottom, scrollToBottom } = useStickToBottomContext();
47904
48071
  if (isAtBottom) return null;
47905
- return /* @__PURE__ */ jsxs42(
48072
+ return /* @__PURE__ */ jsxs41(
47906
48073
  "button",
47907
48074
  {
47908
48075
  type: "button",
@@ -47922,9 +48089,9 @@ function ScrollToBottomButton({ onBeforeScroll }) {
47922
48089
  }
47923
48090
  function PlanningDivider({ kind }) {
47924
48091
  const isEnter = kind === "enter";
47925
- return /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-3 py-1", children: [
48092
+ return /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-3 py-1", children: [
47926
48093
  /* @__PURE__ */ jsx47("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent" }),
47927
- /* @__PURE__ */ jsxs42("div", { className: "inline-flex items-center gap-1.5 rounded-full border border-[hsl(var(--swf-warning)/0.3)] bg-[hsl(var(--swf-warning-soft))] px-3 py-1 text-[11px] text-[hsl(var(--swf-warning))]", children: [
48094
+ /* @__PURE__ */ jsxs41("div", { className: "inline-flex items-center gap-1.5 rounded-full border border-[hsl(var(--swf-warning)/0.3)] bg-[hsl(var(--swf-warning-soft))] px-3 py-1 text-[11px] text-[hsl(var(--swf-warning))]", children: [
47928
48095
  /* @__PURE__ */ jsx47(Lightbulb, { size: 12 }),
47929
48096
  /* @__PURE__ */ jsx47("span", { children: isEnter ? "\u8FDB\u5165\u89C4\u5212\u6A21\u5F0F" : "\u89C4\u5212\u5B8C\u6210" })
47930
48097
  ] }),
@@ -47939,7 +48106,7 @@ function MessageList(props) {
47939
48106
  }
47940
48107
 
47941
48108
  // src/chat/runtime/use-chat-actions.ts
47942
- import { useCallback as useCallback15, useEffect as useEffect27, useRef as useRef26, useState as useState33 } from "react";
48109
+ import { useCallback as useCallback15, useEffect as useEffect27, useRef as useRef27, useState as useState33 } from "react";
47943
48110
  function useChatActions(sessionId) {
47944
48111
  const source = useSessionSource();
47945
48112
  const session = useSessionHandle(sessionId);
@@ -47947,7 +48114,7 @@ function useChatActions(sessionId) {
47947
48114
  const [isStopping, setIsStopping] = useState33(false);
47948
48115
  const [queueNotice, setQueueNotice] = useState33(null);
47949
48116
  const [pendingQueueItemId, setPendingQueueItemId] = useState33(null);
47950
- const previousSessionIdRef = useRef26(sessionId);
48117
+ const previousSessionIdRef = useRef27(sessionId);
47951
48118
  const send = useCallback15(
47952
48119
  (msg, targetMode, askuserAnswer, options) => (
47953
48120
  // 等会话就绪再发:等待回答时要按最新状态把输入当作作答
@@ -48100,7 +48267,7 @@ function SessionReplayBar({
48100
48267
  }
48101
48268
 
48102
48269
  // src/chat/ChatPanel.tsx
48103
- import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
48270
+ import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
48104
48271
  function nextQueuedOrder(items, itemId, delta) {
48105
48272
  const pending = items.filter((item) => item.status === "pending");
48106
48273
  const index2 = pending.findIndex((item) => item.id === itemId);
@@ -48129,8 +48296,6 @@ function ChatPanel({
48129
48296
  onCommand,
48130
48297
  canCreateBoardTask,
48131
48298
  canShareSession = false,
48132
- onResyncSkills,
48133
- isResyncingSkills = false,
48134
48299
  onOpenSkills,
48135
48300
  inputLabel,
48136
48301
  onDoubleEscape,
@@ -48261,7 +48426,8 @@ function ChatPanel({
48261
48426
  model: options?.model || void 0,
48262
48427
  thinkingOverride: options?.thinkingOverride,
48263
48428
  reasoningLevel: options?.reasoningLevel,
48264
- kbIds: options?.kbIds,
48429
+ refs: options?.refs,
48430
+ topicAssetRefs: options?.topicAssetRefs,
48265
48431
  queueWhenRunning: options?.queueWhenRunning
48266
48432
  });
48267
48433
  },
@@ -48343,8 +48509,6 @@ function ChatPanel({
48343
48509
  SkillStatusBarComponent: SkillStatus,
48344
48510
  skillStatusBarClassName: classNames?.skillStatusBarRoot,
48345
48511
  skillStatusBarInnerClassName: classNames?.skillStatusBarInner,
48346
- onResyncSkills,
48347
- isResyncingSkills,
48348
48512
  onOpenSkills,
48349
48513
  inputLabel,
48350
48514
  placeholderText: placeholder,
@@ -48356,14 +48520,14 @@ function ChatPanel({
48356
48520
  initialDraftKey,
48357
48521
  lite
48358
48522
  };
48359
- return /* @__PURE__ */ jsx49(CurrentChatSessionProvider, { sessionId: sessionId || null, children: /* @__PURE__ */ jsx49(ChatCustomizationProvider, { value: customization, children: /* @__PURE__ */ jsx49(FollowupInteractionProvider, { value: onFollowupInteraction, children: /* @__PURE__ */ jsx49(McpAppMessageContext.Provider, { value: handleMcpAppMessage, children: /* @__PURE__ */ jsxs43(
48523
+ return /* @__PURE__ */ jsx49(CurrentChatSessionProvider, { sessionId: sessionId || null, children: /* @__PURE__ */ jsx49(ChatCustomizationProvider, { value: customization, children: /* @__PURE__ */ jsx49(FollowupInteractionProvider, { value: onFollowupInteraction, children: /* @__PURE__ */ jsx49(McpAppMessageContext.Provider, { value: handleMcpAppMessage, children: /* @__PURE__ */ jsxs42(
48360
48524
  "div",
48361
48525
  {
48362
48526
  "data-theme": theme,
48363
48527
  part: "root",
48364
48528
  className: cn("blade-chat flex min-h-0 flex-1 flex-col overflow-hidden", classNames?.root),
48365
48529
  children: [
48366
- isViewer && /* @__PURE__ */ jsxs43(
48530
+ isViewer && /* @__PURE__ */ jsxs42(
48367
48531
  "div",
48368
48532
  {
48369
48533
  className: cn(
@@ -48379,7 +48543,7 @@ function ChatPanel({
48379
48543
  !isViewer && /* @__PURE__ */ jsx49(ConnectionBanner, { connection }),
48380
48544
  banner,
48381
48545
  /* @__PURE__ */ jsx49(SessionReplayBar, { sessionId, onExit: onExitReplay }),
48382
- errorMessage && /* @__PURE__ */ jsxs43(
48546
+ errorMessage && /* @__PURE__ */ jsxs42(
48383
48547
  "div",
48384
48548
  {
48385
48549
  part: "error-bar",
@@ -48462,7 +48626,7 @@ function ChatPanel({
48462
48626
  className: cn("mx-auto w-full max-w-3xl px-5 pb-3", classNames?.chatInputInner)
48463
48627
  }
48464
48628
  ) : null,
48465
- !isViewer && /* @__PURE__ */ jsxs43(Fragment18, { children: [
48629
+ !isViewer && /* @__PURE__ */ jsxs42(Fragment18, { children: [
48466
48630
  /* @__PURE__ */ jsx49(
48467
48631
  SessionQueuePanel,
48468
48632
  {
@@ -48494,13 +48658,13 @@ function ChatPanel({
48494
48658
 
48495
48659
  // src/components/SessionPluginSelector.tsx
48496
48660
  import { useEffect as useEffect29, useState as useState35 } from "react";
48497
- import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
48661
+ import { jsx as jsx50, jsxs as jsxs43 } from "react/jsx-runtime";
48498
48662
  function SessionPluginSelector(props) {
48499
48663
  return /* @__PURE__ */ jsx50(PluginSelectorState, { ...props }, props.sessionId);
48500
48664
  }
48501
48665
  function PluginSelectorState({ client, sessionId, className, side = "bottom", onChange }) {
48502
48666
  const [open2, setOpen] = useState35(false);
48503
- return /* @__PURE__ */ jsxs44("div", { className: `relative text-xs ${className ?? ""}`, children: [
48667
+ return /* @__PURE__ */ jsxs43("div", { className: `relative text-xs ${className ?? ""}`, children: [
48504
48668
  /* @__PURE__ */ jsx50(
48505
48669
  "button",
48506
48670
  {
@@ -48526,7 +48690,7 @@ function PluginSelectorList({
48526
48690
  useEffect29(() => {
48527
48691
  reload();
48528
48692
  }, [reload]);
48529
- return /* @__PURE__ */ jsxs44(
48693
+ return /* @__PURE__ */ jsxs43(
48530
48694
  "div",
48531
48695
  {
48532
48696
  className: `absolute left-0 z-40 my-2 max-h-72 w-72 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-3 text-[hsl(var(--popover-foreground))] shadow-lg ${side === "top" ? "bottom-full" : "top-full"}`,
@@ -48556,7 +48720,7 @@ function PluginSelectorList({
48556
48720
  }
48557
48721
 
48558
48722
  // src/components/AgentChat.tsx
48559
- import { Fragment as Fragment19, jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
48723
+ import { Fragment as Fragment19, jsx as jsx51, jsxs as jsxs44 } from "react/jsx-runtime";
48560
48724
  function isUnauthorizedError(error61) {
48561
48725
  return error61 instanceof BladeApiError2 && error61.status === 401;
48562
48726
  }
@@ -48575,7 +48739,7 @@ function LoginCard({ client, onLoggedIn }) {
48575
48739
  setLoggingIn(false);
48576
48740
  }
48577
48741
  };
48578
- return /* @__PURE__ */ jsx51("div", { className: "blade-chat-login flex flex-1 items-center justify-center p-6", children: /* @__PURE__ */ jsxs45("div", { className: "flex w-full max-w-sm flex-col items-center gap-4 rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-6 py-8 text-center", children: [
48742
+ return /* @__PURE__ */ jsx51("div", { className: "blade-chat-login flex flex-1 items-center justify-center p-6", children: /* @__PURE__ */ jsxs44("div", { className: "flex w-full max-w-sm flex-col items-center gap-4 rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-6 py-8 text-center", children: [
48579
48743
  /* @__PURE__ */ jsx51(LockKeyhole, { size: 28, className: "text-[hsl(var(--muted-foreground))]" }),
48580
48744
  /* @__PURE__ */ jsx51("div", { className: "text-base font-medium text-[hsl(var(--foreground))]", children: "\u9700\u8981\u767B\u5F55\u540E\u4F7F\u7528" }),
48581
48745
  /* @__PURE__ */ jsx51("div", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: "\u767B\u5F55\u540E\u5373\u53EF\u4E0E\u667A\u80FD\u4F53\u5BF9\u8BDD\uFF0C\u4F60\u7684\u4F1A\u8BDD\u5185\u5BB9\u4EC5\u81EA\u5DF1\u53EF\u89C1\u3002" }),
@@ -48648,8 +48812,8 @@ function ChatSessionView({
48648
48812
  useEffect30(() => {
48649
48813
  setNotice(null);
48650
48814
  }, [resolvedSessionId, replaySpeed, replaying]);
48651
- const onSessionReadyRef = useRef27(onSessionReady);
48652
- const readySessionRef = useRef27(null);
48815
+ const onSessionReadyRef = useRef28(onSessionReady);
48816
+ const readySessionRef = useRef28(null);
48653
48817
  const hasOnSessionReady = onSessionReady !== void 0;
48654
48818
  useEffect30(() => {
48655
48819
  onSessionReadyRef.current = onSessionReady;
@@ -48697,7 +48861,7 @@ function ChatSessionView({
48697
48861
  onFollowupInteraction,
48698
48862
  errorMessage: connectError ?? replay.error?.message ?? notice,
48699
48863
  onExitReplay: () => void replay.exitToAutonomous(),
48700
- banner: /* @__PURE__ */ jsxs45(Fragment19, { children: [
48864
+ banner: /* @__PURE__ */ jsxs44(Fragment19, { children: [
48701
48865
  resolvedSessionId && !isViewer && (sessionPluginControls ? sessionPluginControls(resolvedSessionId) : /* @__PURE__ */ jsx51(SessionPluginSelector, { client, sessionId: resolvedSessionId })),
48702
48866
  /* @__PURE__ */ jsx51(ReplayMismatchPrompt, { mismatch: replay.mismatch })
48703
48867
  ] })
@@ -48710,7 +48874,7 @@ import { chatErrorForDisplay as chatErrorForDisplay4 } from "@blade-hq/agent-cli
48710
48874
  import { useEffect as useEffect31, useMemo as useMemo20, useState as useState39 } from "react";
48711
48875
 
48712
48876
  // src/hooks/use-llm-chat.ts
48713
- import { useCallback as useCallback18, useMemo as useMemo19, useRef as useRef28, useState as useState37 } from "react";
48877
+ import { useCallback as useCallback18, useMemo as useMemo19, useRef as useRef29, useState as useState37 } from "react";
48714
48878
  var DEFAULT_HISTORY_TURNS = 12;
48715
48879
  var DEFAULT_MAX_TOOL_ROUNDS = 4;
48716
48880
  var syntheticIdSeq = 0;
@@ -48721,12 +48885,12 @@ function useLlmChat(options) {
48721
48885
  const [failedToolIds, setFailedToolIds] = useState37([]);
48722
48886
  const [error61, setError] = useState37(null);
48723
48887
  const [isStreaming, setIsStreaming] = useState37(false);
48724
- const abortRef = useRef28(null);
48725
- const activeStartedAtRef = useRef28(null);
48726
- const assistantTimingsRef = useRef28(/* @__PURE__ */ new WeakMap());
48727
- const generationRef = useRef28(0);
48728
- const historyRef = useRef28([]);
48729
- const optionsRef = useRef28(options);
48888
+ const abortRef = useRef29(null);
48889
+ const activeStartedAtRef = useRef29(null);
48890
+ const assistantTimingsRef = useRef29(/* @__PURE__ */ new WeakMap());
48891
+ const generationRef = useRef29(0);
48892
+ const historyRef = useRef29([]);
48893
+ const optionsRef = useRef29(options);
48730
48894
  optionsRef.current = options;
48731
48895
  historyRef.current = history;
48732
48896
  const stop = useCallback18(() => {
@@ -49067,7 +49231,7 @@ function toToolCallInfo(call, results, failedToolIds) {
49067
49231
 
49068
49232
  // src/components/LlmAdvancedSettings.tsx
49069
49233
  import { useState as useState38 } from "react";
49070
- import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
49234
+ import { jsx as jsx52, jsxs as jsxs45 } from "react/jsx-runtime";
49071
49235
  var FIELDS = [
49072
49236
  { id: "baseURL", label: "\u6A21\u578B\u670D\u52A1\u5730\u5740", placeholder: "http://\u5185\u7F51\u5730\u5740/v1" },
49073
49237
  { id: "model", label: "\u6A21\u578B", placeholder: "\u6A21\u578B\u540D\u79F0" },
@@ -49118,8 +49282,8 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49118
49282
  if (!normalized) return null;
49119
49283
  const fields = FIELDS.filter((field) => normalized[field.id]);
49120
49284
  const dirty = Object.keys(override).length > 0;
49121
- return /* @__PURE__ */ jsxs46("div", { className: "blade-chat-advanced border-t border-[hsl(var(--border))] px-4 py-2 text-xs", children: [
49122
- /* @__PURE__ */ jsxs46(
49285
+ return /* @__PURE__ */ jsxs45("div", { className: "blade-chat-advanced border-t border-[hsl(var(--border))] px-4 py-2 text-xs", children: [
49286
+ /* @__PURE__ */ jsxs45(
49123
49287
  "button",
49124
49288
  {
49125
49289
  type: "button",
@@ -49135,8 +49299,8 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49135
49299
  ]
49136
49300
  }
49137
49301
  ),
49138
- open2 && /* @__PURE__ */ jsxs46("div", { className: "mt-2 flex flex-col gap-2", children: [
49139
- fields.map((field) => /* @__PURE__ */ jsxs46("label", { className: "flex flex-col gap-1", children: [
49302
+ open2 && /* @__PURE__ */ jsxs45("div", { className: "mt-2 flex flex-col gap-2", children: [
49303
+ fields.map((field) => /* @__PURE__ */ jsxs45("label", { className: "flex flex-col gap-1", children: [
49140
49304
  /* @__PURE__ */ jsx52("span", { className: "text-[hsl(var(--muted-foreground))]", children: field.label }),
49141
49305
  /* @__PURE__ */ jsx52(
49142
49306
  "input",
@@ -49150,7 +49314,7 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49150
49314
  )
49151
49315
  ] }, field.id)),
49152
49316
  normalized.apiKey && /* @__PURE__ */ jsx52("p", { className: "text-[hsl(var(--muted-foreground))]", children: "\u5BC6\u94A5\u4F1A\u5B58\u5728\u8FD9\u53F0\u6D4F\u89C8\u5668\u91CC\u3002\u53EA\u5728\u4F60\u4FE1\u5F97\u8FC7\u8FD9\u53F0\u673A\u5668\u65F6\u586B\u3002" }),
49153
- /* @__PURE__ */ jsxs46("div", { className: "flex gap-2", children: [
49317
+ /* @__PURE__ */ jsxs45("div", { className: "flex gap-2", children: [
49154
49318
  /* @__PURE__ */ jsx52(
49155
49319
  "button",
49156
49320
  {
@@ -49185,7 +49349,7 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49185
49349
  }
49186
49350
 
49187
49351
  // src/components/LlmChat.tsx
49188
- import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
49352
+ import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
49189
49353
  function LlmChat({
49190
49354
  classNames,
49191
49355
  renderers,
@@ -49217,14 +49381,14 @@ ${text4}` : text4),
49217
49381
  onReady?.(handle);
49218
49382
  }, [handle, onReady]);
49219
49383
  const customization = useMemo20(() => ({ classNames, renderers }), [classNames, renderers]);
49220
- return /* @__PURE__ */ jsx53(ChatCustomizationProvider, { value: customization, children: /* @__PURE__ */ jsxs47(
49384
+ return /* @__PURE__ */ jsx53(ChatCustomizationProvider, { value: customization, children: /* @__PURE__ */ jsxs46(
49221
49385
  "div",
49222
49386
  {
49223
49387
  "data-theme": theme,
49224
49388
  part: "root",
49225
49389
  className: cn("blade-chat flex min-h-0 flex-1 flex-col overflow-hidden", classNames?.root),
49226
49390
  children: [
49227
- error61 ? /* @__PURE__ */ jsxs47(
49391
+ error61 ? /* @__PURE__ */ jsxs46(
49228
49392
  "div",
49229
49393
  {
49230
49394
  part: "error-bar",
@@ -49313,6 +49477,99 @@ function ChatView(props) {
49313
49477
  return /* @__PURE__ */ jsx54(AgentChat, { ...rest });
49314
49478
  }
49315
49479
 
49480
+ // src/components/TopicAssetSubmitDialog.tsx
49481
+ import { useRef as useRef30, useState as useState40 } from "react";
49482
+ import { jsx as jsx55, jsxs as jsxs47 } from "react/jsx-runtime";
49483
+ function useTopicAssetSubmissionAccess(sessionId) {
49484
+ const client = useBladeClient();
49485
+ return useAsyncValue(sessionId, async (signal) => {
49486
+ if (!sessionId) return null;
49487
+ const [session, groups] = await Promise.all([
49488
+ client.sessions.getSession(sessionId, { signal }),
49489
+ client.chatGroups.list()
49490
+ ]);
49491
+ if (session.runtime_type !== "sandbox" || !session.chat_group_id || session.viewer_role === "viewer") return null;
49492
+ const group = groups.find((item) => item.id === session.chat_group_id);
49493
+ return group && (group.role === "owner" || group.role === "editor") ? group : null;
49494
+ });
49495
+ }
49496
+ function TopicAssetSubmitDialog({ sessionId, topicId, path: path2, onClose, onSubmitted }) {
49497
+ const client = useBladeClient();
49498
+ const [folder, setFolder] = useState40("");
49499
+ const [message, setMessage] = useState40("");
49500
+ const [error61, setError] = useState40(null);
49501
+ const [busy, setBusy] = useState40(false);
49502
+ const submitting = useRef30(false);
49503
+ const [revision, setRevision] = useState40(0);
49504
+ const assets = useAsyncValue(`${sessionId}:${topicId}:${revision}`, async () => {
49505
+ const [session, groups, result] = await Promise.all([
49506
+ client.sessions.getSession(sessionId),
49507
+ client.chatGroups.list(),
49508
+ client.chatGroups.listAssets(topicId)
49509
+ ]);
49510
+ const role = groups.find((item) => item.id === topicId)?.role;
49511
+ if (session.runtime_type !== "sandbox" || session.chat_group_id !== topicId || session.viewer_role === "viewer") throw new Error("\u8FD9\u4E2A\u4F1A\u8BDD\u4E0D\u80FD\u63D0\u4EA4\u5230\u8BE5\u4E3B\u9898");
49512
+ if (role !== "owner" && role !== "editor") throw new Error("\u4F60\u5728\u8FD9\u4E2A\u4E3B\u9898\u6CA1\u6709\u63D0\u4EA4\u6743\u9650");
49513
+ const folders = /* @__PURE__ */ new Set();
49514
+ for (const asset of result.items) {
49515
+ if (asset.is_dir) folders.add(asset.path);
49516
+ const parts = asset.path.split("/");
49517
+ for (let i2 = 1; i2 < parts.length; i2 += 1) folders.add(parts.slice(0, i2).join("/"));
49518
+ }
49519
+ return [...folders].sort((a, b2) => a.localeCompare(b2));
49520
+ });
49521
+ const submit = async () => {
49522
+ if (submitting.current || !assets.data) return;
49523
+ submitting.current = true;
49524
+ setBusy(true);
49525
+ setError(null);
49526
+ try {
49527
+ const name = path2.split("/").at(-1) ?? path2;
49528
+ await client.chatGroups.submitSessionAsset({ session_id: sessionId, path: path2, target_path: folder ? `${folder}/${name}` : name, message: message.trim() });
49529
+ onSubmitted?.();
49530
+ onClose();
49531
+ } catch (cause) {
49532
+ setError(cause instanceof Error ? cause.message : "\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
49533
+ } finally {
49534
+ submitting.current = false;
49535
+ setBusy(false);
49536
+ }
49537
+ };
49538
+ return /* @__PURE__ */ jsx55(Dialog, { open: true, onOpenChange: (open2) => {
49539
+ if (!open2 && !busy) onClose();
49540
+ }, children: /* @__PURE__ */ jsxs47(DialogContent, { className: "max-w-md", children: [
49541
+ /* @__PURE__ */ jsx55(DialogTitle, { children: "\u63D0\u4EA4\u5230\u8D44\u4EA7" }),
49542
+ /* @__PURE__ */ jsx55(DialogDescription, { children: "\u5C06\u6587\u4EF6\u590D\u5236\u5230\u4E3B\u9898\u4F9B\u6210\u5458\u4F7F\u7528\uFF0C\u5DE5\u4F5C\u533A\u539F\u6587\u4EF6\u4F1A\u4FDD\u7559\u3002\u540C\u540D\u8D44\u4EA7\u4F1A\u88AB\u66FF\u6362\u3002" }),
49543
+ /* @__PURE__ */ jsxs47("form", { onSubmit: (event) => {
49544
+ event.preventDefault();
49545
+ void submit();
49546
+ }, className: "flex flex-col gap-4", children: [
49547
+ /* @__PURE__ */ jsx55("p", { className: "break-all text-sm text-secondary-foreground", children: path2 }),
49548
+ /* @__PURE__ */ jsxs47("label", { className: "flex flex-col gap-1 text-sm", children: [
49549
+ "\u76EE\u6807\u6587\u4EF6\u5939",
49550
+ /* @__PURE__ */ jsxs47("select", { "aria-label": "\u76EE\u6807\u6587\u4EF6\u5939", value: folder, onChange: (event) => setFolder(event.target.value), disabled: busy || !assets.data, className: "rounded-md border border-border bg-background p-2", children: [
49551
+ /* @__PURE__ */ jsx55("option", { value: "", children: "\u8D44\u4EA7\u6839\u76EE\u5F55" }),
49552
+ assets.data?.map((item) => /* @__PURE__ */ jsx55("option", { value: item, children: item }, item))
49553
+ ] })
49554
+ ] }),
49555
+ /* @__PURE__ */ jsxs47("label", { className: "flex flex-col gap-1 text-sm", children: [
49556
+ "\u8BF4\u660E\uFF08\u53EF\u9009\uFF09",
49557
+ /* @__PURE__ */ jsx55("textarea", { "aria-label": "\u63D0\u4EA4\u8BF4\u660E", value: message, onChange: (event) => setMessage(event.target.value), maxLength: 1e3, disabled: busy, className: "min-h-20 rounded-md border border-border bg-background p-2" })
49558
+ ] }),
49559
+ assets.error ? /* @__PURE__ */ jsxs47("div", { role: "alert", className: "text-sm text-muted-foreground", children: [
49560
+ assets.error instanceof Error ? assets.error.message : "\u8D44\u4EA7\u52A0\u8F7D\u5931\u8D25",
49561
+ " ",
49562
+ /* @__PURE__ */ jsx55("button", { type: "button", onClick: () => setRevision((n2) => n2 + 1), className: "underline", children: "\u91CD\u8BD5" })
49563
+ ] }) : !assets.data ? /* @__PURE__ */ jsx55("output", { className: "text-sm text-muted-foreground", children: "\u6B63\u5728\u52A0\u8F7D\u8D44\u4EA7\u2026" }) : null,
49564
+ error61 ? /* @__PURE__ */ jsx55("p", { role: "alert", className: "text-sm text-muted-foreground", children: error61 }) : null,
49565
+ /* @__PURE__ */ jsxs47("div", { className: "flex justify-end gap-2", children: [
49566
+ /* @__PURE__ */ jsx55("button", { type: "button", disabled: busy, onClick: onClose, className: "rounded-md border border-border px-3 py-2 text-sm", children: "\u53D6\u6D88" }),
49567
+ /* @__PURE__ */ jsx55("button", { type: "submit", disabled: busy || !assets.data, className: "rounded-md bg-primary px-3 py-2 text-sm text-primary-foreground disabled:opacity-50", children: busy ? "\u63D0\u4EA4\u4E2D\u2026" : "\u63D0\u4EA4" })
49568
+ ] })
49569
+ ] })
49570
+ ] }) });
49571
+ }
49572
+
49316
49573
  export {
49317
49574
  useAgentSession,
49318
49575
  useReplay,
@@ -49325,6 +49582,7 @@ export {
49325
49582
  MessageImage,
49326
49583
  DEFAULT_ALLOWED_TAGS,
49327
49584
  MarkdownRenderer,
49585
+ CodeBlockPre,
49328
49586
  MarkdownContent,
49329
49587
  ToolUiCardView,
49330
49588
  parseWhatIfPrompt,
@@ -49341,7 +49599,9 @@ export {
49341
49599
  AgentChat,
49342
49600
  useLlmChat,
49343
49601
  LlmChat,
49344
- ChatView
49602
+ ChatView,
49603
+ useTopicAssetSubmissionAccess,
49604
+ TopicAssetSubmitDialog
49345
49605
  };
49346
49606
  /*! Bundled license information:
49347
49607
 
@@ -49362,4 +49622,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
49362
49622
  js-yaml/dist/js-yaml.mjs:
49363
49623
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
49364
49624
  */
49365
- //# sourceMappingURL=chunk-6ZDOQEWK.js.map
49625
+ //# sourceMappingURL=chunk-JVM2WTTS.js.map