@blade-hq/agent-react 2612.0.0-beta.5 → 2612.0.0-beta.7

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 (1150) hide show
  1. package/README.md +8 -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/ai-elements/reasoning.d.ts +4 -4
  6. package/dist/chat/customization.d.ts +1 -5
  7. package/dist/chat/index.d.ts +1 -4
  8. package/dist/chat/lib/citations.d.ts +5 -22
  9. package/dist/chat/runtime/actions.d.ts +1 -1
  10. package/dist/chat/runtime/input-cache-reset.d.ts +1 -1
  11. package/dist/chat/runtime/input-history-storage.d.ts +2 -0
  12. package/dist/chat/runtime/input-services.d.ts +0 -6
  13. package/dist/{chunk-T5WGKZN4.js → chunk-67GHJQK5.js} +724 -575
  14. package/dist/chunk-67GHJQK5.js.map +1 -0
  15. package/dist/{chunk-7IPINZHT.js → chunk-DPDXGYGM.js} +2 -2
  16. package/dist/{chunk-XULCQP3Q.js → chunk-MERN5XEM.js} +636 -704
  17. package/dist/chunk-MERN5XEM.js.map +1 -0
  18. package/dist/components/ChatInput.d.ts +3 -1
  19. package/dist/components/plugin-connector.d.ts +1 -0
  20. package/dist/embed/entry.d.ts +1 -0
  21. package/dist/host.d.ts +0 -4
  22. package/dist/index.js +2 -2
  23. package/dist/internal.js +3 -3
  24. package/dist/internal.js.map +1 -1
  25. package/dist/lib/agent-computer-command.d.ts +1 -3
  26. package/dist/rich-input/ChatInput.d.ts +1 -1
  27. package/dist/rich-input/FileCompletionMenu.d.ts +5 -9
  28. package/dist/rich-input/SkillStatusBar.d.ts +2 -4
  29. package/dist/rich-input/extensions/plugin-mention.d.ts +15 -0
  30. package/dist/rich-input/extensions/skill-mention.d.ts +0 -1
  31. package/dist/rich-input/index.d.ts +4 -2
  32. package/dist/rich-input/lib/composer-content.d.ts +7 -22
  33. package/dist/rich-input/lib/input-history-document.d.ts +3 -0
  34. package/dist/rich-input/lib/plugin-suggestions.d.ts +7 -0
  35. package/dist/rich-input/lib/reference-candidates.d.ts +27 -0
  36. package/dist/rich-input/services.d.ts +2 -3
  37. package/dist/rich-input/use-input-history.d.ts +8 -10
  38. package/dist/rich-input/use-reference-candidates.d.ts +8 -0
  39. package/dist/rich-input.js +491 -472
  40. package/dist/rich-input.js.map +1 -1
  41. package/dist/style.full.css +1 -1
  42. package/node_modules/@floating-ui/core/LICENSE +20 -0
  43. package/node_modules/@floating-ui/core/README.md +4 -0
  44. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
  45. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1184 -0
  46. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +531 -0
  47. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +531 -0
  48. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1058 -0
  49. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1058 -0
  50. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1203 -0
  51. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
  52. package/node_modules/@floating-ui/core/package.json +63 -0
  53. package/node_modules/@floating-ui/dom/LICENSE +20 -0
  54. package/node_modules/@floating-ui/dom/README.md +4 -0
  55. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
  56. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +956 -0
  57. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +358 -0
  58. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +358 -0
  59. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +781 -0
  60. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +781 -0
  61. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +975 -0
  62. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
  63. package/node_modules/@floating-ui/dom/package.json +71 -0
  64. package/node_modules/@floating-ui/utils/LICENSE +20 -0
  65. package/node_modules/@floating-ui/utils/README.md +4 -0
  66. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
  67. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +103 -0
  68. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
  69. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
  70. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +165 -0
  71. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
  72. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +192 -0
  73. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
  74. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +136 -0
  75. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
  76. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +167 -0
  77. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
  78. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
  79. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +165 -0
  80. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +192 -0
  81. package/node_modules/@floating-ui/utils/dom/package.json +6 -0
  82. package/node_modules/@floating-ui/utils/package.json +70 -0
  83. package/node_modules/@radix-ui/primitive/LICENSE +21 -0
  84. package/node_modules/@radix-ui/primitive/README.md +3 -0
  85. package/node_modules/@radix-ui/primitive/dist/index.d.mts +20 -0
  86. package/node_modules/@radix-ui/primitive/dist/index.d.ts +20 -0
  87. package/node_modules/@radix-ui/primitive/dist/index.js +76 -0
  88. package/node_modules/@radix-ui/primitive/dist/index.js.map +7 -0
  89. package/node_modules/@radix-ui/primitive/dist/index.mjs +53 -0
  90. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -0
  91. package/node_modules/@radix-ui/primitive/package.json +47 -0
  92. package/node_modules/@radix-ui/react-collapsible/LICENSE +21 -0
  93. package/node_modules/@radix-ui/react-collapsible/README.md +3 -0
  94. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +33 -0
  95. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +33 -0
  96. package/node_modules/@radix-ui/react-collapsible/dist/index.js +187 -0
  97. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +7 -0
  98. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +155 -0
  99. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +7 -0
  100. package/node_modules/@radix-ui/react-collapsible/package.json +75 -0
  101. package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
  102. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +15 -0
  103. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +15 -0
  104. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +74 -0
  105. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -0
  106. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +41 -0
  107. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -0
  108. package/node_modules/@radix-ui/react-compose-refs/package.json +75 -0
  109. package/node_modules/@radix-ui/react-context/README.md +13 -0
  110. package/node_modules/@radix-ui/react-context/dist/index.d.mts +21 -0
  111. package/node_modules/@radix-ui/react-context/dist/index.d.ts +21 -0
  112. package/node_modules/@radix-ui/react-context/dist/index.js +114 -0
  113. package/node_modules/@radix-ui/react-context/dist/index.js.map +7 -0
  114. package/node_modules/@radix-ui/react-context/dist/index.mjs +81 -0
  115. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -0
  116. package/node_modules/@radix-ui/react-context/package.json +75 -0
  117. package/node_modules/@radix-ui/react-id/README.md +13 -0
  118. package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
  119. package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
  120. package/node_modules/@radix-ui/react-id/dist/index.js +49 -0
  121. package/node_modules/@radix-ui/react-id/dist/index.js.map +7 -0
  122. package/node_modules/@radix-ui/react-id/dist/index.mjs +16 -0
  123. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +7 -0
  124. package/node_modules/@radix-ui/react-id/package.json +78 -0
  125. package/node_modules/@radix-ui/react-presence/LICENSE +21 -0
  126. package/node_modules/@radix-ui/react-presence/README.md +3 -0
  127. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +12 -0
  128. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +12 -0
  129. package/node_modules/@radix-ui/react-presence/dist/index.js +171 -0
  130. package/node_modules/@radix-ui/react-presence/dist/index.js.map +7 -0
  131. package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
  132. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +7 -0
  133. package/node_modules/@radix-ui/react-presence/package.json +69 -0
  134. package/node_modules/@radix-ui/react-primitive/LICENSE +21 -0
  135. package/node_modules/@radix-ui/react-primitive/README.md +3 -0
  136. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +52 -0
  137. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +52 -0
  138. package/node_modules/@radix-ui/react-primitive/dist/index.js +80 -0
  139. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +7 -0
  140. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +47 -0
  141. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +7 -0
  142. package/node_modules/@radix-ui/react-primitive/package.json +68 -0
  143. package/node_modules/@radix-ui/react-slot/LICENSE +21 -0
  144. package/node_modules/@radix-ui/react-slot/README.md +3 -0
  145. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +17 -0
  146. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +17 -0
  147. package/node_modules/@radix-ui/react-slot/dist/index.js +138 -0
  148. package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -0
  149. package/node_modules/@radix-ui/react-slot/dist/index.mjs +105 -0
  150. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -0
  151. package/node_modules/@radix-ui/react-slot/package.json +63 -0
  152. package/node_modules/@radix-ui/react-use-controllable-state/LICENSE +21 -0
  153. package/node_modules/@radix-ui/react-use-controllable-state/README.md +3 -0
  154. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +40 -0
  155. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +40 -0
  156. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +169 -0
  157. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +7 -0
  158. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +136 -0
  159. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +7 -0
  160. package/node_modules/@radix-ui/react-use-controllable-state/package.json +64 -0
  161. package/node_modules/@radix-ui/react-use-effect-event/LICENSE +21 -0
  162. package/node_modules/@radix-ui/react-use-effect-event/README.md +5 -0
  163. package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts +8 -0
  164. package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts +8 -0
  165. package/node_modules/@radix-ui/react-use-effect-event/dist/index.js +60 -0
  166. package/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map +7 -0
  167. package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs +27 -0
  168. package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map +7 -0
  169. package/node_modules/@radix-ui/react-use-effect-event/package.json +65 -0
  170. package/node_modules/@radix-ui/react-use-effect-event/src/index.ts +1 -0
  171. package/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx +36 -0
  172. package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
  173. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +12 -0
  174. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +12 -0
  175. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +41 -0
  176. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +7 -0
  177. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +8 -0
  178. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +7 -0
  179. package/node_modules/@radix-ui/react-use-layout-effect/package.json +75 -0
  180. package/node_modules/@remirror/core-constants/LICENSE +21 -0
  181. package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.cts +612 -0
  182. package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.ts +612 -0
  183. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.cjs +314 -0
  184. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.cts +20 -0
  185. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.ts +20 -0
  186. package/node_modules/@remirror/core-constants/dist/remirror-core-constants.js +269 -0
  187. package/node_modules/@remirror/core-constants/dist-types/core-constants.d.ts +431 -0
  188. package/node_modules/@remirror/core-constants/dist-types/error-constants.d.ts +119 -0
  189. package/node_modules/@remirror/core-constants/dist-types/index.d.ts +2 -0
  190. package/node_modules/@remirror/core-constants/dist-types/tsconfig.tsbuildinfo +1 -0
  191. package/node_modules/@remirror/core-constants/package.json +45 -0
  192. package/node_modules/@remirror/core-constants/readme.md +17 -0
  193. package/node_modules/@tiptap/core/LICENSE.md +21 -0
  194. package/node_modules/@tiptap/core/README.md +18 -0
  195. package/node_modules/@tiptap/core/dist/index.cjs +7126 -0
  196. package/node_modules/@tiptap/core/dist/index.cjs.map +1 -0
  197. package/node_modules/@tiptap/core/dist/index.d.cts +4954 -0
  198. package/node_modules/@tiptap/core/dist/index.d.ts +4954 -0
  199. package/node_modules/@tiptap/core/dist/index.js +6992 -0
  200. package/node_modules/@tiptap/core/dist/index.js.map +1 -0
  201. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +56 -0
  202. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +1 -0
  203. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +23 -0
  204. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +23 -0
  205. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +26 -0
  206. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
  207. package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +1 -0
  208. package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +1 -0
  209. package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +1 -0
  210. package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +1 -0
  211. package/node_modules/@tiptap/core/jsx-runtime/index.cjs +1 -0
  212. package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +1 -0
  213. package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +1 -0
  214. package/node_modules/@tiptap/core/jsx-runtime/index.js +1 -0
  215. package/node_modules/@tiptap/core/package.json +70 -0
  216. package/node_modules/@tiptap/core/src/CommandManager.ts +138 -0
  217. package/node_modules/@tiptap/core/src/Editor.ts +806 -0
  218. package/node_modules/@tiptap/core/src/EventEmitter.ts +58 -0
  219. package/node_modules/@tiptap/core/src/Extendable.ts +602 -0
  220. package/node_modules/@tiptap/core/src/Extension.ts +55 -0
  221. package/node_modules/@tiptap/core/src/ExtensionManager.ts +440 -0
  222. package/node_modules/@tiptap/core/src/InputRule.ts +290 -0
  223. package/node_modules/@tiptap/core/src/Mark.ts +211 -0
  224. package/node_modules/@tiptap/core/src/MarkView.ts +122 -0
  225. package/node_modules/@tiptap/core/src/Node.ts +377 -0
  226. package/node_modules/@tiptap/core/src/NodePos.ts +257 -0
  227. package/node_modules/@tiptap/core/src/NodeView.ts +339 -0
  228. package/node_modules/@tiptap/core/src/PasteRule.ts +373 -0
  229. package/node_modules/@tiptap/core/src/Tracker.ts +36 -0
  230. package/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts +575 -0
  231. package/node_modules/@tiptap/core/src/commands/blur.ts +29 -0
  232. package/node_modules/@tiptap/core/src/commands/clearContent.ts +25 -0
  233. package/node_modules/@tiptap/core/src/commands/clearNodes.ts +57 -0
  234. package/node_modules/@tiptap/core/src/commands/command.ts +22 -0
  235. package/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +21 -0
  236. package/node_modules/@tiptap/core/src/commands/cut.ts +36 -0
  237. package/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +44 -0
  238. package/node_modules/@tiptap/core/src/commands/deleteNode.ts +41 -0
  239. package/node_modules/@tiptap/core/src/commands/deleteRange.ts +26 -0
  240. package/node_modules/@tiptap/core/src/commands/deleteSelection.ts +21 -0
  241. package/node_modules/@tiptap/core/src/commands/enter.ts +19 -0
  242. package/node_modules/@tiptap/core/src/commands/exitCode.ts +21 -0
  243. package/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +51 -0
  244. package/node_modules/@tiptap/core/src/commands/first.ts +26 -0
  245. package/node_modules/@tiptap/core/src/commands/focus.ts +108 -0
  246. package/node_modules/@tiptap/core/src/commands/forEach.ts +24 -0
  247. package/node_modules/@tiptap/core/src/commands/index.ts +57 -0
  248. package/node_modules/@tiptap/core/src/commands/insertContent.ts +46 -0
  249. package/node_modules/@tiptap/core/src/commands/insertContentAt.ts +212 -0
  250. package/node_modules/@tiptap/core/src/commands/join.ts +69 -0
  251. package/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +37 -0
  252. package/node_modules/@tiptap/core/src/commands/joinItemForward.ts +37 -0
  253. package/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +20 -0
  254. package/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +20 -0
  255. package/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +100 -0
  256. package/node_modules/@tiptap/core/src/commands/lift.ts +34 -0
  257. package/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +21 -0
  258. package/node_modules/@tiptap/core/src/commands/liftListItem.ts +26 -0
  259. package/node_modules/@tiptap/core/src/commands/newlineInCode.ts +21 -0
  260. package/node_modules/@tiptap/core/src/commands/resetAttributes.ts +73 -0
  261. package/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +23 -0
  262. package/node_modules/@tiptap/core/src/commands/selectAll.ts +27 -0
  263. package/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +21 -0
  264. package/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +21 -0
  265. package/node_modules/@tiptap/core/src/commands/selectParentNode.ts +21 -0
  266. package/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +23 -0
  267. package/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +23 -0
  268. package/node_modules/@tiptap/core/src/commands/setContent.ts +76 -0
  269. package/node_modules/@tiptap/core/src/commands/setMark.ts +118 -0
  270. package/node_modules/@tiptap/core/src/commands/setMeta.ts +25 -0
  271. package/node_modules/@tiptap/core/src/commands/setNode.ts +57 -0
  272. package/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +31 -0
  273. package/node_modules/@tiptap/core/src/commands/setTextDirection.ts +51 -0
  274. package/node_modules/@tiptap/core/src/commands/setTextSelection.ts +35 -0
  275. package/node_modules/@tiptap/core/src/commands/sinkListItem.ts +26 -0
  276. package/node_modules/@tiptap/core/src/commands/splitBlock.ts +115 -0
  277. package/node_modules/@tiptap/core/src/commands/splitListItem.ts +149 -0
  278. package/node_modules/@tiptap/core/src/commands/toggleList.ts +159 -0
  279. package/node_modules/@tiptap/core/src/commands/toggleMark.ts +51 -0
  280. package/node_modules/@tiptap/core/src/commands/toggleNode.ts +47 -0
  281. package/node_modules/@tiptap/core/src/commands/toggleWrap.ts +32 -0
  282. package/node_modules/@tiptap/core/src/commands/undoInputRule.ts +49 -0
  283. package/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +32 -0
  284. package/node_modules/@tiptap/core/src/commands/unsetMark.ts +65 -0
  285. package/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +51 -0
  286. package/node_modules/@tiptap/core/src/commands/updateAttributes.ts +150 -0
  287. package/node_modules/@tiptap/core/src/commands/wrapIn.ts +27 -0
  288. package/node_modules/@tiptap/core/src/commands/wrapInList.ts +27 -0
  289. package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +44 -0
  290. package/node_modules/@tiptap/core/src/extensions/commands.ts +14 -0
  291. package/node_modules/@tiptap/core/src/extensions/delete.ts +89 -0
  292. package/node_modules/@tiptap/core/src/extensions/drop.ts +26 -0
  293. package/node_modules/@tiptap/core/src/extensions/editable.ts +18 -0
  294. package/node_modules/@tiptap/core/src/extensions/focusEvents.ts +41 -0
  295. package/node_modules/@tiptap/core/src/extensions/index.ts +10 -0
  296. package/node_modules/@tiptap/core/src/extensions/keymap.ts +160 -0
  297. package/node_modules/@tiptap/core/src/extensions/paste.ts +25 -0
  298. package/node_modules/@tiptap/core/src/extensions/tabindex.ts +18 -0
  299. package/node_modules/@tiptap/core/src/extensions/textDirection.ts +86 -0
  300. package/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +66 -0
  301. package/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +21 -0
  302. package/node_modules/@tiptap/core/src/helpers/createChainableState.ts +39 -0
  303. package/node_modules/@tiptap/core/src/helpers/createDocument.ts +24 -0
  304. package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +119 -0
  305. package/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +18 -0
  306. package/node_modules/@tiptap/core/src/helpers/findChildren.ts +24 -0
  307. package/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +36 -0
  308. package/node_modules/@tiptap/core/src/helpers/findParentNode.ts +18 -0
  309. package/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +37 -0
  310. package/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +30 -0
  311. package/node_modules/@tiptap/core/src/helpers/generateHTML.ts +18 -0
  312. package/node_modules/@tiptap/core/src/helpers/generateJSON.ts +18 -0
  313. package/node_modules/@tiptap/core/src/helpers/generateText.ts +34 -0
  314. package/node_modules/@tiptap/core/src/helpers/getAttributes.ts +29 -0
  315. package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +122 -0
  316. package/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +85 -0
  317. package/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +54 -0
  318. package/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +32 -0
  319. package/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +13 -0
  320. package/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +30 -0
  321. package/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +90 -0
  322. package/node_modules/@tiptap/core/src/helpers/getMarkType.ts +13 -0
  323. package/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +44 -0
  324. package/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +29 -0
  325. package/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +22 -0
  326. package/node_modules/@tiptap/core/src/helpers/getNodeType.ts +13 -0
  327. package/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +23 -0
  328. package/node_modules/@tiptap/core/src/helpers/getSchema.ts +12 -0
  329. package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +183 -0
  330. package/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +11 -0
  331. package/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +19 -0
  332. package/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +28 -0
  333. package/node_modules/@tiptap/core/src/helpers/getText.ts +28 -0
  334. package/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +52 -0
  335. package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +29 -0
  336. package/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +16 -0
  337. package/node_modules/@tiptap/core/src/helpers/index.ts +55 -0
  338. package/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +47 -0
  339. package/node_modules/@tiptap/core/src/helpers/isActive.ts +23 -0
  340. package/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +29 -0
  341. package/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +11 -0
  342. package/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +13 -0
  343. package/node_modules/@tiptap/core/src/helpers/isList.ts +27 -0
  344. package/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +94 -0
  345. package/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +51 -0
  346. package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +62 -0
  347. package/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +5 -0
  348. package/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +5 -0
  349. package/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +35 -0
  350. package/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +25 -0
  351. package/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +31 -0
  352. package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +149 -0
  353. package/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +29 -0
  354. package/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +26 -0
  355. package/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +16 -0
  356. package/node_modules/@tiptap/core/src/index.ts +28 -0
  357. package/node_modules/@tiptap/core/src/inputRules/index.ts +5 -0
  358. package/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +68 -0
  359. package/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +73 -0
  360. package/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +35 -0
  361. package/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +35 -0
  362. package/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +82 -0
  363. package/node_modules/@tiptap/core/src/jsx-runtime.ts +65 -0
  364. package/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +1060 -0
  365. package/node_modules/@tiptap/core/src/lib/index.ts +1 -0
  366. package/node_modules/@tiptap/core/src/pasteRules/index.ts +3 -0
  367. package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +71 -0
  368. package/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +44 -0
  369. package/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +34 -0
  370. package/node_modules/@tiptap/core/src/style.ts +71 -0
  371. package/node_modules/@tiptap/core/src/types.ts +1058 -0
  372. package/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +21 -0
  373. package/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +30 -0
  374. package/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +21 -0
  375. package/node_modules/@tiptap/core/src/utilities/deleteProps.ts +16 -0
  376. package/node_modules/@tiptap/core/src/utilities/elementFromString.ts +27 -0
  377. package/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +4 -0
  378. package/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +8 -0
  379. package/node_modules/@tiptap/core/src/utilities/fromString.ts +19 -0
  380. package/node_modules/@tiptap/core/src/utilities/index.ts +26 -0
  381. package/node_modules/@tiptap/core/src/utilities/isAndroid.ts +3 -0
  382. package/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +3 -0
  383. package/node_modules/@tiptap/core/src/utilities/isFirefox.ts +11 -0
  384. package/node_modules/@tiptap/core/src/utilities/isFunction.ts +4 -0
  385. package/node_modules/@tiptap/core/src/utilities/isMacOS.ts +3 -0
  386. package/node_modules/@tiptap/core/src/utilities/isNumber.ts +3 -0
  387. package/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +13 -0
  388. package/node_modules/@tiptap/core/src/utilities/isRegExp.ts +3 -0
  389. package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
  390. package/node_modules/@tiptap/core/src/utilities/isString.ts +3 -0
  391. package/node_modules/@tiptap/core/src/utilities/isiOS.ts +7 -0
  392. package/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts +130 -0
  393. package/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +141 -0
  394. package/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +225 -0
  395. package/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +282 -0
  396. package/node_modules/@tiptap/core/src/utilities/markdown/index.ts +13 -0
  397. package/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +194 -0
  398. package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +96 -0
  399. package/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +109 -0
  400. package/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +17 -0
  401. package/node_modules/@tiptap/core/src/utilities/minMax.ts +3 -0
  402. package/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +30 -0
  403. package/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +13 -0
  404. package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +21 -0
  405. package/node_modules/@tiptap/extension-bubble-menu/README.md +18 -0
  406. package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +462 -0
  407. package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs.map +1 -0
  408. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +169 -0
  409. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +169 -0
  410. package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +443 -0
  411. package/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +1 -0
  412. package/node_modules/@tiptap/extension-bubble-menu/package.json +54 -0
  413. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.ts +650 -0
  414. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu.ts +50 -0
  415. package/node_modules/@tiptap/extension-bubble-menu/src/index.ts +6 -0
  416. package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +21 -0
  417. package/node_modules/@tiptap/extension-floating-menu/README.md +18 -0
  418. package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +380 -0
  419. package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs.map +1 -0
  420. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +179 -0
  421. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +179 -0
  422. package/node_modules/@tiptap/extension-floating-menu/dist/index.js +361 -0
  423. package/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +1 -0
  424. package/node_modules/@tiptap/extension-floating-menu/package.json +53 -0
  425. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.ts +525 -0
  426. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu.ts +77 -0
  427. package/node_modules/@tiptap/extension-floating-menu/src/index.ts +6 -0
  428. package/node_modules/@tiptap/extension-mention/LICENSE.md +21 -0
  429. package/node_modules/@tiptap/extension-mention/README.md +18 -0
  430. package/node_modules/@tiptap/extension-mention/dist/index.cjs +277 -0
  431. package/node_modules/@tiptap/extension-mention/dist/index.cjs.map +1 -0
  432. package/node_modules/@tiptap/extension-mention/dist/index.d.cts +93 -0
  433. package/node_modules/@tiptap/extension-mention/dist/index.d.ts +93 -0
  434. package/node_modules/@tiptap/extension-mention/dist/index.js +250 -0
  435. package/node_modules/@tiptap/extension-mention/dist/index.js.map +1 -0
  436. package/node_modules/@tiptap/extension-mention/package.json +52 -0
  437. package/node_modules/@tiptap/extension-mention/src/index.ts +5 -0
  438. package/node_modules/@tiptap/extension-mention/src/mention.ts +357 -0
  439. package/node_modules/@tiptap/extension-mention/src/utils/get-default-suggestion-attributes.ts +89 -0
  440. package/node_modules/@tiptap/pm/LICENSE.md +21 -0
  441. package/node_modules/@tiptap/pm/README.md +22 -0
  442. package/node_modules/@tiptap/pm/changeset/index.ts +1 -0
  443. package/node_modules/@tiptap/pm/collab/index.ts +1 -0
  444. package/node_modules/@tiptap/pm/commands/index.ts +1 -0
  445. package/node_modules/@tiptap/pm/dist/changeset/index.cjs +2 -0
  446. package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +18 -0
  447. package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +18 -0
  448. package/node_modules/@tiptap/pm/dist/changeset/index.js +2 -0
  449. package/node_modules/@tiptap/pm/dist/collab/index.cjs +2 -0
  450. package/node_modules/@tiptap/pm/dist/collab/index.d.cts +1 -0
  451. package/node_modules/@tiptap/pm/dist/collab/index.d.ts +1 -0
  452. package/node_modules/@tiptap/pm/dist/collab/index.js +2 -0
  453. package/node_modules/@tiptap/pm/dist/commands/index.cjs +2 -0
  454. package/node_modules/@tiptap/pm/dist/commands/index.d.cts +1 -0
  455. package/node_modules/@tiptap/pm/dist/commands/index.d.ts +1 -0
  456. package/node_modules/@tiptap/pm/dist/commands/index.js +2 -0
  457. package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +2 -0
  458. package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +1 -0
  459. package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +1 -0
  460. package/node_modules/@tiptap/pm/dist/dropcursor/index.js +2 -0
  461. package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +2 -0
  462. package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +1 -0
  463. package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +1 -0
  464. package/node_modules/@tiptap/pm/dist/gapcursor/index.js +2 -0
  465. package/node_modules/@tiptap/pm/dist/history/index.cjs +2 -0
  466. package/node_modules/@tiptap/pm/dist/history/index.d.cts +1 -0
  467. package/node_modules/@tiptap/pm/dist/history/index.d.ts +1 -0
  468. package/node_modules/@tiptap/pm/dist/history/index.js +2 -0
  469. package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +2 -0
  470. package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +1 -0
  471. package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +1 -0
  472. package/node_modules/@tiptap/pm/dist/inputrules/index.js +2 -0
  473. package/node_modules/@tiptap/pm/dist/keymap/index.cjs +2 -0
  474. package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +1 -0
  475. package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +1 -0
  476. package/node_modules/@tiptap/pm/dist/keymap/index.js +2 -0
  477. package/node_modules/@tiptap/pm/dist/markdown/index.cjs +2 -0
  478. package/node_modules/@tiptap/pm/dist/markdown/index.d.cts +1 -0
  479. package/node_modules/@tiptap/pm/dist/markdown/index.d.ts +1 -0
  480. package/node_modules/@tiptap/pm/dist/markdown/index.js +2 -0
  481. package/node_modules/@tiptap/pm/dist/menu/index.cjs +2 -0
  482. package/node_modules/@tiptap/pm/dist/menu/index.d.cts +1 -0
  483. package/node_modules/@tiptap/pm/dist/menu/index.d.ts +1 -0
  484. package/node_modules/@tiptap/pm/dist/menu/index.js +2 -0
  485. package/node_modules/@tiptap/pm/dist/model/index.cjs +2 -0
  486. package/node_modules/@tiptap/pm/dist/model/index.d.cts +1 -0
  487. package/node_modules/@tiptap/pm/dist/model/index.d.ts +1 -0
  488. package/node_modules/@tiptap/pm/dist/model/index.js +2 -0
  489. package/node_modules/@tiptap/pm/dist/schema-basic/index.cjs +2 -0
  490. package/node_modules/@tiptap/pm/dist/schema-basic/index.d.cts +1 -0
  491. package/node_modules/@tiptap/pm/dist/schema-basic/index.d.ts +1 -0
  492. package/node_modules/@tiptap/pm/dist/schema-basic/index.js +2 -0
  493. package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +2 -0
  494. package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +1 -0
  495. package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +1 -0
  496. package/node_modules/@tiptap/pm/dist/schema-list/index.js +2 -0
  497. package/node_modules/@tiptap/pm/dist/state/index.cjs +2 -0
  498. package/node_modules/@tiptap/pm/dist/state/index.d.cts +1 -0
  499. package/node_modules/@tiptap/pm/dist/state/index.d.ts +1 -0
  500. package/node_modules/@tiptap/pm/dist/state/index.js +2 -0
  501. package/node_modules/@tiptap/pm/dist/tables/index.cjs +2 -0
  502. package/node_modules/@tiptap/pm/dist/tables/index.d.cts +1 -0
  503. package/node_modules/@tiptap/pm/dist/tables/index.d.ts +1 -0
  504. package/node_modules/@tiptap/pm/dist/tables/index.js +2 -0
  505. package/node_modules/@tiptap/pm/dist/trailing-node/index.cjs +2 -0
  506. package/node_modules/@tiptap/pm/dist/trailing-node/index.d.cts +1 -0
  507. package/node_modules/@tiptap/pm/dist/trailing-node/index.d.ts +1 -0
  508. package/node_modules/@tiptap/pm/dist/trailing-node/index.js +2 -0
  509. package/node_modules/@tiptap/pm/dist/transform/index.cjs +2 -0
  510. package/node_modules/@tiptap/pm/dist/transform/index.d.cts +1 -0
  511. package/node_modules/@tiptap/pm/dist/transform/index.d.ts +1 -0
  512. package/node_modules/@tiptap/pm/dist/transform/index.js +2 -0
  513. package/node_modules/@tiptap/pm/dist/view/index.cjs +2 -0
  514. package/node_modules/@tiptap/pm/dist/view/index.d.cts +1 -0
  515. package/node_modules/@tiptap/pm/dist/view/index.d.ts +1 -0
  516. package/node_modules/@tiptap/pm/dist/view/index.js +2 -0
  517. package/node_modules/@tiptap/pm/dropcursor/index.ts +1 -0
  518. package/node_modules/@tiptap/pm/gapcursor/index.ts +1 -0
  519. package/node_modules/@tiptap/pm/history/index.ts +1 -0
  520. package/node_modules/@tiptap/pm/inputrules/index.ts +1 -0
  521. package/node_modules/@tiptap/pm/keymap/index.ts +1 -0
  522. package/node_modules/@tiptap/pm/markdown/index.ts +1 -0
  523. package/node_modules/@tiptap/pm/menu/index.ts +1 -0
  524. package/node_modules/@tiptap/pm/model/index.ts +1 -0
  525. package/node_modules/@tiptap/pm/package.json +211 -0
  526. package/node_modules/@tiptap/pm/schema-basic/index.ts +1 -0
  527. package/node_modules/@tiptap/pm/schema-list/index.ts +1 -0
  528. package/node_modules/@tiptap/pm/state/index.ts +1 -0
  529. package/node_modules/@tiptap/pm/tables/index.ts +1 -0
  530. package/node_modules/@tiptap/pm/trailing-node/index.ts +1 -0
  531. package/node_modules/@tiptap/pm/transform/index.ts +1 -0
  532. package/node_modules/@tiptap/pm/view/index.ts +1 -0
  533. package/node_modules/@tiptap/react/LICENSE.md +21 -0
  534. package/node_modules/@tiptap/react/README.md +18 -0
  535. package/node_modules/@tiptap/react/dist/index.cjs +1195 -0
  536. package/node_modules/@tiptap/react/dist/index.cjs.map +1 -0
  537. package/node_modules/@tiptap/react/dist/index.d.cts +534 -0
  538. package/node_modules/@tiptap/react/dist/index.d.ts +534 -0
  539. package/node_modules/@tiptap/react/dist/index.js +1131 -0
  540. package/node_modules/@tiptap/react/dist/index.js.map +1 -0
  541. package/node_modules/@tiptap/react/dist/menus/index.cjs +499 -0
  542. package/node_modules/@tiptap/react/dist/menus/index.cjs.map +1 -0
  543. package/node_modules/@tiptap/react/dist/menus/index.d.cts +19 -0
  544. package/node_modules/@tiptap/react/dist/menus/index.d.ts +19 -0
  545. package/node_modules/@tiptap/react/dist/menus/index.js +461 -0
  546. package/node_modules/@tiptap/react/dist/menus/index.js.map +1 -0
  547. package/node_modules/@tiptap/react/package.json +76 -0
  548. package/node_modules/@tiptap/react/src/Context.tsx +60 -0
  549. package/node_modules/@tiptap/react/src/Editor.ts +13 -0
  550. package/node_modules/@tiptap/react/src/EditorContent.tsx +229 -0
  551. package/node_modules/@tiptap/react/src/NodeViewContent.tsx +30 -0
  552. package/node_modules/@tiptap/react/src/NodeViewWrapper.tsx +27 -0
  553. package/node_modules/@tiptap/react/src/ReactMarkViewRenderer.tsx +106 -0
  554. package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.tsx +387 -0
  555. package/node_modules/@tiptap/react/src/ReactRenderer.tsx +282 -0
  556. package/node_modules/@tiptap/react/src/Tiptap.tsx +224 -0
  557. package/node_modules/@tiptap/react/src/index.ts +13 -0
  558. package/node_modules/@tiptap/react/src/menus/BubbleMenu.spec.ts +174 -0
  559. package/node_modules/@tiptap/react/src/menus/BubbleMenu.tsx +153 -0
  560. package/node_modules/@tiptap/react/src/menus/FloatingMenu.spec.ts +164 -0
  561. package/node_modules/@tiptap/react/src/menus/FloatingMenu.tsx +137 -0
  562. package/node_modules/@tiptap/react/src/menus/getAutoPluginKey.ts +5 -0
  563. package/node_modules/@tiptap/react/src/menus/index.ts +2 -0
  564. package/node_modules/@tiptap/react/src/menus/useMenuElementProps.ts +354 -0
  565. package/node_modules/@tiptap/react/src/types.ts +6 -0
  566. package/node_modules/@tiptap/react/src/useEditor.ts +382 -0
  567. package/node_modules/@tiptap/react/src/useEditorState.ts +173 -0
  568. package/node_modules/@tiptap/react/src/useReactNodeView.ts +28 -0
  569. package/node_modules/@tiptap/suggestion/LICENSE.md +21 -0
  570. package/node_modules/@tiptap/suggestion/README.md +18 -0
  571. package/node_modules/@tiptap/suggestion/dist/index.cjs +369 -0
  572. package/node_modules/@tiptap/suggestion/dist/index.cjs.map +1 -0
  573. package/node_modules/@tiptap/suggestion/dist/index.d.cts +213 -0
  574. package/node_modules/@tiptap/suggestion/dist/index.d.ts +213 -0
  575. package/node_modules/@tiptap/suggestion/dist/index.js +339 -0
  576. package/node_modules/@tiptap/suggestion/dist/index.js.map +1 -0
  577. package/node_modules/@tiptap/suggestion/package.json +50 -0
  578. package/node_modules/@tiptap/suggestion/src/__tests__/suggestion.test.ts +127 -0
  579. package/node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts +79 -0
  580. package/node_modules/@tiptap/suggestion/src/index.ts +8 -0
  581. package/node_modules/@tiptap/suggestion/src/suggestion.ts +585 -0
  582. package/node_modules/@types/linkify-it/LICENSE +21 -0
  583. package/node_modules/@types/linkify-it/README.md +15 -0
  584. package/node_modules/@types/linkify-it/build/index.cjs.d.ts +178 -0
  585. package/node_modules/@types/linkify-it/index.d.mts +174 -0
  586. package/node_modules/@types/linkify-it/index.d.ts +3 -0
  587. package/node_modules/@types/linkify-it/package.json +50 -0
  588. package/node_modules/@types/markdown-it/LICENSE +21 -0
  589. package/node_modules/@types/markdown-it/README.md +15 -0
  590. package/node_modules/@types/markdown-it/dist/index.cjs.d.ts +1236 -0
  591. package/node_modules/@types/markdown-it/dist/markdown-it.d.ts +5 -0
  592. package/node_modules/@types/markdown-it/dist/markdown-it.min.d.ts +5 -0
  593. package/node_modules/@types/markdown-it/index.d.mts +1 -0
  594. package/node_modules/@types/markdown-it/index.d.ts +3 -0
  595. package/node_modules/@types/markdown-it/lib/common/html_blocks.d.mts +7 -0
  596. package/node_modules/@types/markdown-it/lib/common/html_re.d.mts +2 -0
  597. package/node_modules/@types/markdown-it/lib/common/utils.d.mts +62 -0
  598. package/node_modules/@types/markdown-it/lib/helpers/index.d.mts +5 -0
  599. package/node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.mts +7 -0
  600. package/node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.mts +3 -0
  601. package/node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.mts +29 -0
  602. package/node_modules/@types/markdown-it/lib/index.d.mts +404 -0
  603. package/node_modules/@types/markdown-it/lib/parser_block.d.mts +25 -0
  604. package/node_modules/@types/markdown-it/lib/parser_core.d.mts +18 -0
  605. package/node_modules/@types/markdown-it/lib/parser_inline.d.mts +38 -0
  606. package/node_modules/@types/markdown-it/lib/renderer.d.mts +96 -0
  607. package/node_modules/@types/markdown-it/lib/ruler.d.mts +158 -0
  608. package/node_modules/@types/markdown-it/lib/rules_block/state_block.d.mts +124 -0
  609. package/node_modules/@types/markdown-it/lib/rules_core/state_core.d.mts +18 -0
  610. package/node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.mts +73 -0
  611. package/node_modules/@types/markdown-it/lib/token.d.mts +108 -0
  612. package/node_modules/@types/markdown-it/package.json +54 -0
  613. package/node_modules/@types/mdurl/LICENSE +21 -0
  614. package/node_modules/@types/mdurl/README.md +15 -0
  615. package/node_modules/@types/mdurl/build/index.cjs.d.ts +52 -0
  616. package/node_modules/@types/mdurl/index.d.mts +6 -0
  617. package/node_modules/@types/mdurl/index.d.ts +3 -0
  618. package/node_modules/@types/mdurl/lib/decode.d.mts +10 -0
  619. package/node_modules/@types/mdurl/lib/encode.d.mts +15 -0
  620. package/node_modules/@types/mdurl/lib/format.d.mts +3 -0
  621. package/node_modules/@types/mdurl/lib/parse.d.mts +18 -0
  622. package/node_modules/@types/mdurl/package.json +36 -0
  623. package/node_modules/@types/use-sync-external-store/LICENSE +21 -0
  624. package/node_modules/@types/use-sync-external-store/README.md +15 -0
  625. package/node_modules/@types/use-sync-external-store/index.d.ts +5 -0
  626. package/node_modules/@types/use-sync-external-store/package.json +30 -0
  627. package/node_modules/@types/use-sync-external-store/shim/index.d.ts +1 -0
  628. package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +1 -0
  629. package/node_modules/@types/use-sync-external-store/with-selector.d.ts +7 -0
  630. package/node_modules/argparse/LICENSE +254 -0
  631. package/node_modules/argparse/README.md +84 -0
  632. package/node_modules/argparse/argparse.js +3707 -0
  633. package/node_modules/argparse/lib/sub.js +67 -0
  634. package/node_modules/argparse/lib/textwrap.js +440 -0
  635. package/node_modules/argparse/package.json +31 -0
  636. package/node_modules/crelt/LICENSE +19 -0
  637. package/node_modules/crelt/README.md +23 -0
  638. package/node_modules/crelt/dist/index.cjs +31 -0
  639. package/node_modules/crelt/dist/index.d.cts +4 -0
  640. package/node_modules/crelt/index.d.ts +4 -0
  641. package/node_modules/crelt/index.js +28 -0
  642. package/node_modules/crelt/package.json +35 -0
  643. package/node_modules/crelt/rollup.config.js +13 -0
  644. package/node_modules/entities/LICENSE +11 -0
  645. package/node_modules/entities/lib/decode.d.ts +211 -0
  646. package/node_modules/entities/lib/decode.d.ts.map +1 -0
  647. package/node_modules/entities/lib/decode.js +536 -0
  648. package/node_modules/entities/lib/decode.js.map +1 -0
  649. package/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
  650. package/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
  651. package/node_modules/entities/lib/decode_codepoint.js +76 -0
  652. package/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  653. package/node_modules/entities/lib/encode.d.ts +22 -0
  654. package/node_modules/entities/lib/encode.d.ts.map +1 -0
  655. package/node_modules/entities/lib/encode.js +77 -0
  656. package/node_modules/entities/lib/encode.js.map +1 -0
  657. package/node_modules/entities/lib/escape.d.ts +43 -0
  658. package/node_modules/entities/lib/escape.d.ts.map +1 -0
  659. package/node_modules/entities/lib/escape.js +122 -0
  660. package/node_modules/entities/lib/escape.js.map +1 -0
  661. package/node_modules/entities/lib/esm/decode.d.ts +211 -0
  662. package/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
  663. package/node_modules/entities/lib/esm/decode.js +496 -0
  664. package/node_modules/entities/lib/esm/decode.js.map +1 -0
  665. package/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
  666. package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
  667. package/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
  668. package/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
  669. package/node_modules/entities/lib/esm/encode.d.ts +22 -0
  670. package/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
  671. package/node_modules/entities/lib/esm/encode.js +69 -0
  672. package/node_modules/entities/lib/esm/encode.js.map +1 -0
  673. package/node_modules/entities/lib/esm/escape.d.ts +43 -0
  674. package/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
  675. package/node_modules/entities/lib/esm/escape.js +116 -0
  676. package/node_modules/entities/lib/esm/escape.js.map +1 -0
  677. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
  678. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
  679. package/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  680. package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
  681. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
  682. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
  683. package/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  684. package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
  685. package/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
  686. package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
  687. package/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
  688. package/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
  689. package/node_modules/entities/lib/esm/index.d.ts +96 -0
  690. package/node_modules/entities/lib/esm/index.d.ts.map +1 -0
  691. package/node_modules/entities/lib/esm/index.js +99 -0
  692. package/node_modules/entities/lib/esm/index.js.map +1 -0
  693. package/node_modules/entities/lib/esm/package.json +1 -0
  694. package/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
  695. package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
  696. package/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  697. package/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  698. package/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
  699. package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
  700. package/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  701. package/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  702. package/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
  703. package/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
  704. package/node_modules/entities/lib/generated/encode-html.js +12 -0
  705. package/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  706. package/node_modules/entities/lib/index.d.ts +96 -0
  707. package/node_modules/entities/lib/index.d.ts.map +1 -0
  708. package/node_modules/entities/lib/index.js +126 -0
  709. package/node_modules/entities/lib/index.js.map +1 -0
  710. package/node_modules/entities/package.json +90 -0
  711. package/node_modules/entities/readme.md +122 -0
  712. package/node_modules/escape-string-regexp/index.d.ts +18 -0
  713. package/node_modules/escape-string-regexp/index.js +13 -0
  714. package/node_modules/escape-string-regexp/license +9 -0
  715. package/node_modules/escape-string-regexp/package.json +38 -0
  716. package/node_modules/escape-string-regexp/readme.md +34 -0
  717. package/node_modules/fast-equals/LICENSE +21 -0
  718. package/node_modules/fast-equals/README.md +477 -0
  719. package/node_modules/fast-equals/dist/cjs/comparator.d.cts +60 -0
  720. package/node_modules/fast-equals/dist/cjs/equals.d.cts +62 -0
  721. package/node_modules/fast-equals/dist/cjs/index.cjs +653 -0
  722. package/node_modules/fast-equals/dist/cjs/index.cjs.map +1 -0
  723. package/node_modules/fast-equals/dist/cjs/index.d.cts +66 -0
  724. package/node_modules/fast-equals/dist/cjs/internalTypes.d.cts +178 -0
  725. package/node_modules/fast-equals/dist/cjs/utils.d.cts +33 -0
  726. package/node_modules/fast-equals/dist/es/comparator.d.mts +60 -0
  727. package/node_modules/fast-equals/dist/es/equals.d.mts +62 -0
  728. package/node_modules/fast-equals/dist/es/index.d.mts +66 -0
  729. package/node_modules/fast-equals/dist/es/index.mjs +642 -0
  730. package/node_modules/fast-equals/dist/es/index.mjs.map +1 -0
  731. package/node_modules/fast-equals/dist/es/internalTypes.d.mts +178 -0
  732. package/node_modules/fast-equals/dist/es/utils.d.mts +33 -0
  733. package/node_modules/fast-equals/dist/umd/comparator.d.ts +26 -0
  734. package/node_modules/fast-equals/dist/umd/equals.d.ts +62 -0
  735. package/node_modules/fast-equals/dist/umd/index.d.ts +47 -0
  736. package/node_modules/fast-equals/dist/umd/index.js +659 -0
  737. package/node_modules/fast-equals/dist/umd/index.js.map +1 -0
  738. package/node_modules/fast-equals/dist/umd/internalTypes.d.ts +159 -0
  739. package/node_modules/fast-equals/dist/umd/utils.d.ts +28 -0
  740. package/node_modules/fast-equals/index.d.ts +260 -0
  741. package/node_modules/fast-equals/package.json +113 -0
  742. package/node_modules/linkify-it/LICENSE +22 -0
  743. package/node_modules/linkify-it/README.md +196 -0
  744. package/node_modules/linkify-it/build/index.cjs.js +832 -0
  745. package/node_modules/linkify-it/index.mjs +642 -0
  746. package/node_modules/linkify-it/lib/re.mjs +189 -0
  747. package/node_modules/linkify-it/package.json +58 -0
  748. package/node_modules/markdown-it/LICENSE +22 -0
  749. package/node_modules/markdown-it/README.md +324 -0
  750. package/node_modules/markdown-it/bin/markdown-it.mjs +107 -0
  751. package/node_modules/markdown-it/dist/index.cjs.js +5547 -0
  752. package/node_modules/markdown-it/dist/markdown-it.js +6969 -0
  753. package/node_modules/markdown-it/dist/markdown-it.min.js +2 -0
  754. package/node_modules/markdown-it/index.mjs +1 -0
  755. package/node_modules/markdown-it/lib/common/html_blocks.mjs +67 -0
  756. package/node_modules/markdown-it/lib/common/html_re.mjs +25 -0
  757. package/node_modules/markdown-it/lib/common/utils.mjs +304 -0
  758. package/node_modules/markdown-it/lib/helpers/index.mjs +11 -0
  759. package/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +77 -0
  760. package/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +49 -0
  761. package/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +66 -0
  762. package/node_modules/markdown-it/lib/index.mjs +565 -0
  763. package/node_modules/markdown-it/lib/parser_block.mjs +134 -0
  764. package/node_modules/markdown-it/lib/parser_core.mjs +62 -0
  765. package/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
  766. package/node_modules/markdown-it/lib/presets/commonmark.mjs +88 -0
  767. package/node_modules/markdown-it/lib/presets/default.mjs +47 -0
  768. package/node_modules/markdown-it/lib/presets/zero.mjs +70 -0
  769. package/node_modules/markdown-it/lib/renderer.mjs +322 -0
  770. package/node_modules/markdown-it/lib/ruler.mjs +340 -0
  771. package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +209 -0
  772. package/node_modules/markdown-it/lib/rules_block/code.mjs +30 -0
  773. package/node_modules/markdown-it/lib/rules_block/fence.mjs +94 -0
  774. package/node_modules/markdown-it/lib/rules_block/heading.mjs +51 -0
  775. package/node_modules/markdown-it/lib/rules_block/hr.mjs +40 -0
  776. package/node_modules/markdown-it/lib/rules_block/html_block.mjs +69 -0
  777. package/node_modules/markdown-it/lib/rules_block/lheading.mjs +82 -0
  778. package/node_modules/markdown-it/lib/rules_block/list.mjs +331 -0
  779. package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +46 -0
  780. package/node_modules/markdown-it/lib/rules_block/reference.mjs +212 -0
  781. package/node_modules/markdown-it/lib/rules_block/state_block.mjs +220 -0
  782. package/node_modules/markdown-it/lib/rules_block/table.mjs +228 -0
  783. package/node_modules/markdown-it/lib/rules_core/block.mjs +13 -0
  784. package/node_modules/markdown-it/lib/rules_core/inline.mjs +11 -0
  785. package/node_modules/markdown-it/lib/rules_core/linkify.mjs +134 -0
  786. package/node_modules/markdown-it/lib/rules_core/normalize.mjs +17 -0
  787. package/node_modules/markdown-it/lib/rules_core/replacements.mjs +101 -0
  788. package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +193 -0
  789. package/node_modules/markdown-it/lib/rules_core/state_core.mjs +17 -0
  790. package/node_modules/markdown-it/lib/rules_core/text_join.mjs +43 -0
  791. package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +72 -0
  792. package/node_modules/markdown-it/lib/rules_inline/backticks.mjs +60 -0
  793. package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +124 -0
  794. package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +123 -0
  795. package/node_modules/markdown-it/lib/rules_inline/entity.mjs +51 -0
  796. package/node_modules/markdown-it/lib/rules_inline/escape.mjs +69 -0
  797. package/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +38 -0
  798. package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +50 -0
  799. package/node_modules/markdown-it/lib/rules_inline/image.mjs +138 -0
  800. package/node_modules/markdown-it/lib/rules_inline/link.mjs +139 -0
  801. package/node_modules/markdown-it/lib/rules_inline/linkify.mjs +63 -0
  802. package/node_modules/markdown-it/lib/rules_inline/newline.mjs +42 -0
  803. package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +123 -0
  804. package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +127 -0
  805. package/node_modules/markdown-it/lib/rules_inline/text.mjs +86 -0
  806. package/node_modules/markdown-it/lib/token.mjs +191 -0
  807. package/node_modules/markdown-it/package.json +92 -0
  808. package/node_modules/mdurl/LICENSE +45 -0
  809. package/node_modules/mdurl/README.md +102 -0
  810. package/node_modules/mdurl/build/index.cjs.js +534 -0
  811. package/node_modules/mdurl/index.mjs +11 -0
  812. package/node_modules/mdurl/lib/decode.mjs +112 -0
  813. package/node_modules/mdurl/lib/encode.mjs +89 -0
  814. package/node_modules/mdurl/lib/format.mjs +21 -0
  815. package/node_modules/mdurl/lib/parse.mjs +308 -0
  816. package/node_modules/mdurl/package.json +37 -0
  817. package/node_modules/orderedmap/LICENSE +19 -0
  818. package/node_modules/orderedmap/README.md +69 -0
  819. package/node_modules/orderedmap/dist/index.cjs +139 -0
  820. package/node_modules/orderedmap/dist/index.d.cts +33 -0
  821. package/node_modules/orderedmap/dist/index.d.ts +33 -0
  822. package/node_modules/orderedmap/dist/index.js +137 -0
  823. package/node_modules/orderedmap/package.json +39 -0
  824. package/node_modules/prosemirror-changeset/CHANGELOG.md +147 -0
  825. package/node_modules/prosemirror-changeset/LICENSE +19 -0
  826. package/node_modules/prosemirror-changeset/README.md +175 -0
  827. package/node_modules/prosemirror-changeset/dist/index.cjs +585 -0
  828. package/node_modules/prosemirror-changeset/dist/index.d.cts +186 -0
  829. package/node_modules/prosemirror-changeset/dist/index.d.ts +186 -0
  830. package/node_modules/prosemirror-changeset/dist/index.js +715 -0
  831. package/node_modules/prosemirror-changeset/package.json +40 -0
  832. package/node_modules/prosemirror-changeset/src/README.md +32 -0
  833. package/node_modules/prosemirror-changeset/src/change.ts +189 -0
  834. package/node_modules/prosemirror-changeset/src/changeset.ts +212 -0
  835. package/node_modules/prosemirror-changeset/src/diff.ts +151 -0
  836. package/node_modules/prosemirror-changeset/src/simplify.ts +132 -0
  837. package/node_modules/prosemirror-changeset/test/test-changed-range.ts +48 -0
  838. package/node_modules/prosemirror-changeset/test/test-changes.ts +211 -0
  839. package/node_modules/prosemirror-changeset/test/test-diff.ts +69 -0
  840. package/node_modules/prosemirror-changeset/test/test-merge.ts +56 -0
  841. package/node_modules/prosemirror-changeset/test/test-simplify.ts +71 -0
  842. package/node_modules/prosemirror-collab/.tern-project +8 -0
  843. package/node_modules/prosemirror-collab/CHANGELOG.md +77 -0
  844. package/node_modules/prosemirror-collab/CONTRIBUTING.md +104 -0
  845. package/node_modules/prosemirror-collab/LICENSE +19 -0
  846. package/node_modules/prosemirror-collab/README.md +28 -0
  847. package/node_modules/prosemirror-collab/dist/index.cjs +155 -0
  848. package/node_modules/prosemirror-collab/dist/index.d.cts +60 -0
  849. package/node_modules/prosemirror-collab/dist/index.d.ts +60 -0
  850. package/node_modules/prosemirror-collab/dist/index.js +156 -0
  851. package/node_modules/prosemirror-collab/package.json +40 -0
  852. package/node_modules/prosemirror-collab/src/README.md +11 -0
  853. package/node_modules/prosemirror-collab/src/collab.ts +184 -0
  854. package/node_modules/prosemirror-commands/.tern-project +8 -0
  855. package/node_modules/prosemirror-commands/CHANGELOG.md +322 -0
  856. package/node_modules/prosemirror-commands/CONTRIBUTING.md +104 -0
  857. package/node_modules/prosemirror-commands/LICENSE +19 -0
  858. package/node_modules/prosemirror-commands/README.md +28 -0
  859. package/node_modules/prosemirror-commands/dist/index.cjs +687 -0
  860. package/node_modules/prosemirror-commands/dist/index.d.cts +215 -0
  861. package/node_modules/prosemirror-commands/dist/index.d.ts +215 -0
  862. package/node_modules/prosemirror-commands/dist/index.js +850 -0
  863. package/node_modules/prosemirror-commands/package.json +39 -0
  864. package/node_modules/prosemirror-commands/src/README.md +40 -0
  865. package/node_modules/prosemirror-commands/src/commands.ts +783 -0
  866. package/node_modules/prosemirror-dropcursor/CHANGELOG.md +137 -0
  867. package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +100 -0
  868. package/node_modules/prosemirror-dropcursor/LICENSE +19 -0
  869. package/node_modules/prosemirror-dropcursor/README.md +50 -0
  870. package/node_modules/prosemirror-dropcursor/dist/index.cjs +185 -0
  871. package/node_modules/prosemirror-dropcursor/dist/index.d.cts +38 -0
  872. package/node_modules/prosemirror-dropcursor/dist/index.d.ts +38 -0
  873. package/node_modules/prosemirror-dropcursor/dist/index.js +146 -0
  874. package/node_modules/prosemirror-dropcursor/package.json +38 -0
  875. package/node_modules/prosemirror-dropcursor/src/dropcursor.ts +170 -0
  876. package/node_modules/prosemirror-gapcursor/CHANGELOG.md +122 -0
  877. package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +104 -0
  878. package/node_modules/prosemirror-gapcursor/LICENSE +19 -0
  879. package/node_modules/prosemirror-gapcursor/README.md +31 -0
  880. package/node_modules/prosemirror-gapcursor/dist/index.cjs +239 -0
  881. package/node_modules/prosemirror-gapcursor/dist/index.d.cts +31 -0
  882. package/node_modules/prosemirror-gapcursor/dist/index.d.ts +31 -0
  883. package/node_modules/prosemirror-gapcursor/dist/index.js +239 -0
  884. package/node_modules/prosemirror-gapcursor/package.json +43 -0
  885. package/node_modules/prosemirror-gapcursor/src/README.md +21 -0
  886. package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +141 -0
  887. package/node_modules/prosemirror-gapcursor/src/index.ts +91 -0
  888. package/node_modules/prosemirror-gapcursor/style/gapcursor.css +25 -0
  889. package/node_modules/prosemirror-history/.tern-project +8 -0
  890. package/node_modules/prosemirror-history/CHANGELOG.md +170 -0
  891. package/node_modules/prosemirror-history/CONTRIBUTING.md +104 -0
  892. package/node_modules/prosemirror-history/LICENSE +19 -0
  893. package/node_modules/prosemirror-history/README.md +27 -0
  894. package/node_modules/prosemirror-history/dist/index.cjs +382 -0
  895. package/node_modules/prosemirror-history/dist/index.d.cts +64 -0
  896. package/node_modules/prosemirror-history/dist/index.d.ts +64 -0
  897. package/node_modules/prosemirror-history/dist/index.js +453 -0
  898. package/node_modules/prosemirror-history/package.json +40 -0
  899. package/node_modules/prosemirror-history/src/README.md +23 -0
  900. package/node_modules/prosemirror-history/src/history.ts +465 -0
  901. package/node_modules/prosemirror-inputrules/.tern-project +8 -0
  902. package/node_modules/prosemirror-inputrules/CHANGELOG.md +127 -0
  903. package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +104 -0
  904. package/node_modules/prosemirror-inputrules/LICENSE +19 -0
  905. package/node_modules/prosemirror-inputrules/README.md +29 -0
  906. package/node_modules/prosemirror-inputrules/dist/index.cjs +194 -0
  907. package/node_modules/prosemirror-inputrules/dist/index.d.cts +131 -0
  908. package/node_modules/prosemirror-inputrules/dist/index.d.ts +131 -0
  909. package/node_modules/prosemirror-inputrules/dist/index.js +239 -0
  910. package/node_modules/prosemirror-inputrules/package.json +36 -0
  911. package/node_modules/prosemirror-inputrules/src/README.md +23 -0
  912. package/node_modules/prosemirror-inputrules/src/index.ts +4 -0
  913. package/node_modules/prosemirror-inputrules/src/inputrules.ts +167 -0
  914. package/node_modules/prosemirror-inputrules/src/rulebuilders.ts +59 -0
  915. package/node_modules/prosemirror-inputrules/src/rules.ts +17 -0
  916. package/node_modules/prosemirror-keymap/.tern-project +8 -0
  917. package/node_modules/prosemirror-keymap/CHANGELOG.md +104 -0
  918. package/node_modules/prosemirror-keymap/CONTRIBUTING.md +104 -0
  919. package/node_modules/prosemirror-keymap/LICENSE +19 -0
  920. package/node_modules/prosemirror-keymap/README.md +27 -0
  921. package/node_modules/prosemirror-keymap/dist/index.cjs +65 -0
  922. package/node_modules/prosemirror-keymap/dist/index.d.cts +47 -0
  923. package/node_modules/prosemirror-keymap/dist/index.d.ts +47 -0
  924. package/node_modules/prosemirror-keymap/dist/index.js +128 -0
  925. package/node_modules/prosemirror-keymap/package.json +38 -0
  926. package/node_modules/prosemirror-keymap/src/README.md +5 -0
  927. package/node_modules/prosemirror-keymap/src/keymap.ts +105 -0
  928. package/node_modules/prosemirror-markdown/.tern-project +8 -0
  929. package/node_modules/prosemirror-markdown/CHANGELOG.md +311 -0
  930. package/node_modules/prosemirror-markdown/CONTRIBUTING.md +100 -0
  931. package/node_modules/prosemirror-markdown/LICENSE +19 -0
  932. package/node_modules/prosemirror-markdown/README.md +276 -0
  933. package/node_modules/prosemirror-markdown/dist/index.cjs +966 -0
  934. package/node_modules/prosemirror-markdown/dist/index.d.cts +335 -0
  935. package/node_modules/prosemirror-markdown/dist/index.d.ts +335 -0
  936. package/node_modules/prosemirror-markdown/dist/index.js +878 -0
  937. package/node_modules/prosemirror-markdown/package.json +40 -0
  938. package/node_modules/prosemirror-markdown/src/README.md +42 -0
  939. package/node_modules/prosemirror-markdown/src/from_markdown.ts +272 -0
  940. package/node_modules/prosemirror-markdown/src/index.ts +5 -0
  941. package/node_modules/prosemirror-markdown/src/schema.ts +156 -0
  942. package/node_modules/prosemirror-markdown/src/to_markdown.ts +483 -0
  943. package/node_modules/prosemirror-menu/.tern-project +8 -0
  944. package/node_modules/prosemirror-menu/CHANGELOG.md +107 -0
  945. package/node_modules/prosemirror-menu/CONTRIBUTING.md +100 -0
  946. package/node_modules/prosemirror-menu/LICENSE +19 -0
  947. package/node_modules/prosemirror-menu/README.md +235 -0
  948. package/node_modules/prosemirror-menu/dist/index.cjs +798 -0
  949. package/node_modules/prosemirror-menu/dist/index.d.cts +281 -0
  950. package/node_modules/prosemirror-menu/dist/index.d.ts +281 -0
  951. package/node_modules/prosemirror-menu/dist/index.js +795 -0
  952. package/node_modules/prosemirror-menu/package.json +42 -0
  953. package/node_modules/prosemirror-menu/src/README.md +60 -0
  954. package/node_modules/prosemirror-menu/src/icons.ts +53 -0
  955. package/node_modules/prosemirror-menu/src/index.ts +4 -0
  956. package/node_modules/prosemirror-menu/src/menu.ts +628 -0
  957. package/node_modules/prosemirror-menu/src/menubar.ts +210 -0
  958. package/node_modules/prosemirror-menu/style/menu.css +169 -0
  959. package/node_modules/prosemirror-model/.tern-project +8 -0
  960. package/node_modules/prosemirror-model/CHANGELOG.md +730 -0
  961. package/node_modules/prosemirror-model/CONTRIBUTING.md +104 -0
  962. package/node_modules/prosemirror-model/LICENSE +19 -0
  963. package/node_modules/prosemirror-model/README.md +29 -0
  964. package/node_modules/prosemirror-model/dist/index.cjs +2898 -0
  965. package/node_modules/prosemirror-model/dist/index.d.cts +1679 -0
  966. package/node_modules/prosemirror-model/dist/index.d.ts +1679 -0
  967. package/node_modules/prosemirror-model/dist/index.js +3464 -0
  968. package/node_modules/prosemirror-model/package.json +38 -0
  969. package/node_modules/prosemirror-model/src/README.md +62 -0
  970. package/node_modules/prosemirror-model/src/comparedeep.ts +15 -0
  971. package/node_modules/prosemirror-model/src/content.ts +413 -0
  972. package/node_modules/prosemirror-model/src/diff.ts +52 -0
  973. package/node_modules/prosemirror-model/src/dom.ts +1 -0
  974. package/node_modules/prosemirror-model/src/fragment.ts +268 -0
  975. package/node_modules/prosemirror-model/src/from_dom.ts +848 -0
  976. package/node_modules/prosemirror-model/src/index.ts +11 -0
  977. package/node_modules/prosemirror-model/src/mark.ts +111 -0
  978. package/node_modules/prosemirror-model/src/node.ts +402 -0
  979. package/node_modules/prosemirror-model/src/replace.ts +225 -0
  980. package/node_modules/prosemirror-model/src/resolvedpos.ts +289 -0
  981. package/node_modules/prosemirror-model/src/schema.ts +705 -0
  982. package/node_modules/prosemirror-model/src/to_dom.ts +238 -0
  983. package/node_modules/prosemirror-schema-basic/.tern-project +8 -0
  984. package/node_modules/prosemirror-schema-basic/CHANGELOG.md +81 -0
  985. package/node_modules/prosemirror-schema-basic/CONTRIBUTING.md +100 -0
  986. package/node_modules/prosemirror-schema-basic/LICENSE +19 -0
  987. package/node_modules/prosemirror-schema-basic/README.md +28 -0
  988. package/node_modules/prosemirror-schema-basic/dist/index.cjs +246 -0
  989. package/node_modules/prosemirror-schema-basic/dist/index.d.cts +87 -0
  990. package/node_modules/prosemirror-schema-basic/dist/index.d.ts +87 -0
  991. package/node_modules/prosemirror-schema-basic/dist/index.js +183 -0
  992. package/node_modules/prosemirror-schema-basic/package.json +37 -0
  993. package/node_modules/prosemirror-schema-basic/src/README.md +8 -0
  994. package/node_modules/prosemirror-schema-basic/src/schema-basic.ts +166 -0
  995. package/node_modules/prosemirror-schema-list/.tern-project +8 -0
  996. package/node_modules/prosemirror-schema-list/CHANGELOG.md +140 -0
  997. package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +100 -0
  998. package/node_modules/prosemirror-schema-list/LICENSE +19 -0
  999. package/node_modules/prosemirror-schema-list/README.md +28 -0
  1000. package/node_modules/prosemirror-schema-list/dist/index.cjs +253 -0
  1001. package/node_modules/prosemirror-schema-list/dist/index.d.cts +71 -0
  1002. package/node_modules/prosemirror-schema-list/dist/index.d.ts +71 -0
  1003. package/node_modules/prosemirror-schema-list/dist/index.js +289 -0
  1004. package/node_modules/prosemirror-schema-list/package.json +40 -0
  1005. package/node_modules/prosemirror-schema-list/src/README.md +29 -0
  1006. package/node_modules/prosemirror-schema-list/src/schema-list.ts +267 -0
  1007. package/node_modules/prosemirror-state/.tern-project +8 -0
  1008. package/node_modules/prosemirror-state/CHANGELOG.md +296 -0
  1009. package/node_modules/prosemirror-state/CONTRIBUTING.md +104 -0
  1010. package/node_modules/prosemirror-state/LICENSE +19 -0
  1011. package/node_modules/prosemirror-state/README.md +28 -0
  1012. package/node_modules/prosemirror-state/dist/index.cjs +884 -0
  1013. package/node_modules/prosemirror-state/dist/index.d.cts +709 -0
  1014. package/node_modules/prosemirror-state/dist/index.d.ts +709 -0
  1015. package/node_modules/prosemirror-state/dist/index.js +1002 -0
  1016. package/node_modules/prosemirror-state/package.json +39 -0
  1017. package/node_modules/prosemirror-state/src/README.md +42 -0
  1018. package/node_modules/prosemirror-state/src/index.ts +7 -0
  1019. package/node_modules/prosemirror-state/src/plugin.ts +142 -0
  1020. package/node_modules/prosemirror-state/src/selection.ts +462 -0
  1021. package/node_modules/prosemirror-state/src/state.ts +266 -0
  1022. package/node_modules/prosemirror-state/src/transaction.ts +215 -0
  1023. package/node_modules/prosemirror-tables/LICENSE +19 -0
  1024. package/node_modules/prosemirror-tables/README.md +254 -0
  1025. package/node_modules/prosemirror-tables/dist/index.cjs +2683 -0
  1026. package/node_modules/prosemirror-tables/dist/index.d.cts +751 -0
  1027. package/node_modules/prosemirror-tables/dist/index.d.cts.map +1 -0
  1028. package/node_modules/prosemirror-tables/dist/index.d.ts +751 -0
  1029. package/node_modules/prosemirror-tables/dist/index.d.ts.map +1 -0
  1030. package/node_modules/prosemirror-tables/dist/index.js +2626 -0
  1031. package/node_modules/prosemirror-tables/dist/index.js.map +1 -0
  1032. package/node_modules/prosemirror-tables/package.json +80 -0
  1033. package/node_modules/prosemirror-tables/style/tables.css +48 -0
  1034. package/node_modules/prosemirror-trailing-node/LICENSE +21 -0
  1035. package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.cts +41 -0
  1036. package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.ts +41 -0
  1037. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.cjs +70 -0
  1038. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.cts +2 -0
  1039. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.ts +2 -0
  1040. package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.js +43 -0
  1041. package/node_modules/prosemirror-trailing-node/dist-types/index.d.ts +2 -0
  1042. package/node_modules/prosemirror-trailing-node/dist-types/trailing-node-plugin.d.ts +33 -0
  1043. package/node_modules/prosemirror-trailing-node/dist-types/tsconfig.tsbuildinfo +1 -0
  1044. package/node_modules/prosemirror-trailing-node/package.json +57 -0
  1045. package/node_modules/prosemirror-trailing-node/readme.md +55 -0
  1046. package/node_modules/prosemirror-transform/.tern-project +8 -0
  1047. package/node_modules/prosemirror-transform/CHANGELOG.md +502 -0
  1048. package/node_modules/prosemirror-transform/CONTRIBUTING.md +104 -0
  1049. package/node_modules/prosemirror-transform/LICENSE +19 -0
  1050. package/node_modules/prosemirror-transform/README.md +29 -0
  1051. package/node_modules/prosemirror-transform/dist/index.cjs +1888 -0
  1052. package/node_modules/prosemirror-transform/dist/index.d.cts +847 -0
  1053. package/node_modules/prosemirror-transform/dist/index.d.ts +847 -0
  1054. package/node_modules/prosemirror-transform/dist/index.js +2181 -0
  1055. package/node_modules/prosemirror-transform/package.json +37 -0
  1056. package/node_modules/prosemirror-transform/src/README.md +59 -0
  1057. package/node_modules/prosemirror-transform/src/attr_step.ts +98 -0
  1058. package/node_modules/prosemirror-transform/src/index.ts +11 -0
  1059. package/node_modules/prosemirror-transform/src/map.ts +284 -0
  1060. package/node_modules/prosemirror-transform/src/mark.ts +106 -0
  1061. package/node_modules/prosemirror-transform/src/mark_step.ts +224 -0
  1062. package/node_modules/prosemirror-transform/src/replace.ts +460 -0
  1063. package/node_modules/prosemirror-transform/src/replace_step.ts +178 -0
  1064. package/node_modules/prosemirror-transform/src/step.ts +97 -0
  1065. package/node_modules/prosemirror-transform/src/structure.ts +349 -0
  1066. package/node_modules/prosemirror-transform/src/transform.ts +271 -0
  1067. package/node_modules/prosemirror-view/.tern-project +8 -0
  1068. package/node_modules/prosemirror-view/CHANGELOG.md +2447 -0
  1069. package/node_modules/prosemirror-view/CONTRIBUTING.md +104 -0
  1070. package/node_modules/prosemirror-view/LICENSE +19 -0
  1071. package/node_modules/prosemirror-view/README.md +28 -0
  1072. package/node_modules/prosemirror-view/dist/index.cjs +5381 -0
  1073. package/node_modules/prosemirror-view/dist/index.d.cts +904 -0
  1074. package/node_modules/prosemirror-view/dist/index.d.ts +904 -0
  1075. package/node_modules/prosemirror-view/dist/index.js +5900 -0
  1076. package/node_modules/prosemirror-view/package.json +43 -0
  1077. package/node_modules/prosemirror-view/src/README.md +38 -0
  1078. package/node_modules/prosemirror-view/src/browser.ts +24 -0
  1079. package/node_modules/prosemirror-view/src/capturekeys.ts +345 -0
  1080. package/node_modules/prosemirror-view/src/clipboard.ts +263 -0
  1081. package/node_modules/prosemirror-view/src/decoration.ts +793 -0
  1082. package/node_modules/prosemirror-view/src/dom.ts +159 -0
  1083. package/node_modules/prosemirror-view/src/domchange.ts +383 -0
  1084. package/node_modules/prosemirror-view/src/domcoords.ts +515 -0
  1085. package/node_modules/prosemirror-view/src/domobserver.ts +392 -0
  1086. package/node_modules/prosemirror-view/src/index.ts +825 -0
  1087. package/node_modules/prosemirror-view/src/input.ts +830 -0
  1088. package/node_modules/prosemirror-view/src/selection.ts +216 -0
  1089. package/node_modules/prosemirror-view/src/viewdesc.ts +1590 -0
  1090. package/node_modules/prosemirror-view/style/prosemirror.css +54 -0
  1091. package/node_modules/punycode.js/LICENSE-MIT.txt +20 -0
  1092. package/node_modules/punycode.js/README.md +148 -0
  1093. package/node_modules/punycode.js/package.json +58 -0
  1094. package/node_modules/punycode.js/punycode.es6.js +444 -0
  1095. package/node_modules/punycode.js/punycode.js +443 -0
  1096. package/node_modules/rope-sequence/LICENSE +19 -0
  1097. package/node_modules/rope-sequence/README.md +63 -0
  1098. package/node_modules/rope-sequence/dist/index.cjs +209 -0
  1099. package/node_modules/rope-sequence/dist/index.d.cts +11 -0
  1100. package/node_modules/rope-sequence/dist/index.d.ts +11 -0
  1101. package/node_modules/rope-sequence/dist/index.js +207 -0
  1102. package/node_modules/rope-sequence/index.js +190 -0
  1103. package/node_modules/rope-sequence/package.json +34 -0
  1104. package/node_modules/rope-sequence/test.js +78 -0
  1105. package/node_modules/uc.micro/LICENSE.txt +20 -0
  1106. package/node_modules/uc.micro/README.md +14 -0
  1107. package/node_modules/uc.micro/build/index.cjs.js +20 -0
  1108. package/node_modules/uc.micro/categories/Cc/regex.mjs +1 -0
  1109. package/node_modules/uc.micro/categories/Cf/regex.mjs +1 -0
  1110. package/node_modules/uc.micro/categories/P/regex.mjs +1 -0
  1111. package/node_modules/uc.micro/categories/S/regex.mjs +1 -0
  1112. package/node_modules/uc.micro/categories/Z/regex.mjs +1 -0
  1113. package/node_modules/uc.micro/index.mjs +8 -0
  1114. package/node_modules/uc.micro/package.json +37 -0
  1115. package/node_modules/uc.micro/properties/Any/regex.mjs +1 -0
  1116. package/node_modules/use-sync-external-store/LICENSE +21 -0
  1117. package/node_modules/use-sync-external-store/README.md +5 -0
  1118. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +97 -0
  1119. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +85 -0
  1120. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +95 -0
  1121. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +88 -0
  1122. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +59 -0
  1123. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +66 -0
  1124. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +96 -0
  1125. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +84 -0
  1126. package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +27 -0
  1127. package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +13 -0
  1128. package/node_modules/use-sync-external-store/index.js +7 -0
  1129. package/node_modules/use-sync-external-store/package.json +43 -0
  1130. package/node_modules/use-sync-external-store/shim/index.js +7 -0
  1131. package/node_modules/use-sync-external-store/shim/index.native.js +7 -0
  1132. package/node_modules/use-sync-external-store/shim/with-selector.js +7 -0
  1133. package/node_modules/use-sync-external-store/with-selector.js +7 -0
  1134. package/node_modules/w3c-keyname/.tern-port +1 -0
  1135. package/node_modules/w3c-keyname/LICENSE +19 -0
  1136. package/node_modules/w3c-keyname/README.md +18 -0
  1137. package/node_modules/w3c-keyname/index.cjs +127 -0
  1138. package/node_modules/w3c-keyname/index.d.cts +5 -0
  1139. package/node_modules/w3c-keyname/index.d.ts +5 -0
  1140. package/node_modules/w3c-keyname/index.js +119 -0
  1141. package/node_modules/w3c-keyname/package.json +37 -0
  1142. package/package.json +120 -3
  1143. package/public-api.md +0 -1
  1144. package/dist/chat/tool-renderers/KbSearchRenderer.d.ts +0 -2
  1145. package/dist/chat/tool-renderers/kb-search-result.d.ts +0 -19
  1146. package/dist/chunk-T5WGKZN4.js.map +0 -1
  1147. package/dist/chunk-XULCQP3Q.js.map +0 -1
  1148. package/dist/rich-input/extensions/kb-mention.d.ts +0 -18
  1149. package/dist/rich-input/lib/kb-suggestions.d.ts +0 -37
  1150. /package/dist/{chunk-7IPINZHT.js.map → chunk-DPDXGYGM.js.map} +0 -0
@@ -18,7 +18,6 @@ import {
18
18
  CircleCheck,
19
19
  CirclePause,
20
20
  CircleX,
21
- CodePreview,
22
21
  Copy,
23
22
  CurrentChatSessionProvider,
24
23
  Dialog,
@@ -76,29 +75,20 @@ import {
76
75
  copyToClipboard,
77
76
  dist_exports,
78
77
  dist_exports3 as dist_exports2,
79
- extractErrorMessage,
80
78
  extractToolFilePath,
81
- formatBytes,
82
79
  formatToolFileName,
83
80
  formatToolName,
84
- getBooleanValue,
85
- getFileName,
86
- getNumberValue,
87
81
  getPlanUpdateDisplayState,
88
- getResultImages,
89
- getResultText,
90
- getStringValue,
82
+ getPluginSuggestionItems,
91
83
  getToolDescription,
92
84
  getToolDisplayLabel,
93
85
  getToolOutputTag,
94
86
  getToolStatusLabel,
95
87
  getToolTone,
96
- isPlainObject,
97
88
  isPlanUpdateTool,
98
89
  notifyChat,
99
- parseJsonValue,
100
- parseKbSearchResult,
101
90
  parsePlanUpdate,
91
+ pluginRefsForSend,
102
92
  sendToSession,
103
93
  useBladeClient,
104
94
  useBladeHost,
@@ -121,7 +111,7 @@ import {
121
111
  useSessionSource,
122
112
  useSessionState,
123
113
  useSingleSessionSource
124
- } from "./chunk-XULCQP3Q.js";
114
+ } from "./chunk-MERN5XEM.js";
125
115
  import {
126
116
  __export
127
117
  } from "./chunk-PR4QN5HX.js";
@@ -474,7 +464,7 @@ function ReplayMismatchPrompt({ mismatch, className }) {
474
464
 
475
465
  // src/components/AgentChat.tsx
476
466
  import { BladeApiError as BladeApiError2 } from "@blade-hq/agent-client/internal";
477
- import { useEffect as useEffect30, useMemo as useMemo18, useRef as useRef27, useState as useState36 } from "react";
467
+ import { useEffect as useEffect30, useMemo as useMemo18, useRef as useRef28, useState as useState36 } from "react";
478
468
 
479
469
  // src/chat/ChatPanel.tsx
480
470
  import { useCallback as useCallback17, useEffect as useEffect28, useMemo as useMemo17, useState as useState34 } from "react";
@@ -1511,7 +1501,7 @@ __export(util_exports, {
1511
1501
  hide: () => hide,
1512
1502
  installLazyProp: () => installLazyProp,
1513
1503
  isObject: () => isObject,
1514
- isPlainObject: () => isPlainObject2,
1504
+ isPlainObject: () => isPlainObject,
1515
1505
  issue: () => issue,
1516
1506
  joinValues: () => joinValues,
1517
1507
  jsonStringifyReplacer: () => jsonStringifyReplacer,
@@ -1697,7 +1687,7 @@ var allowsEval = /* @__PURE__ */ cached(() => {
1697
1687
  return false;
1698
1688
  }
1699
1689
  });
1700
- function isPlainObject2(o) {
1690
+ function isPlainObject(o) {
1701
1691
  if (isObject(o) === false)
1702
1692
  return false;
1703
1693
  const ctor = o.constructor;
@@ -1714,7 +1704,7 @@ function isPlainObject2(o) {
1714
1704
  return true;
1715
1705
  }
1716
1706
  function shallowClone(o) {
1717
- if (isPlainObject2(o))
1707
+ if (isPlainObject(o))
1718
1708
  return { ...o };
1719
1709
  if (Array.isArray(o))
1720
1710
  return [...o];
@@ -1918,7 +1908,7 @@ function omit(schema2, mask) {
1918
1908
  return clone(schema2, def);
1919
1909
  }
1920
1910
  function extend(schema2, shape) {
1921
- if (!isPlainObject2(shape)) {
1911
+ if (!isPlainObject(shape)) {
1922
1912
  throw new Error("Invalid input to extend: expected a plain object");
1923
1913
  }
1924
1914
  const checks = schema2._zod.def.checks;
@@ -1941,7 +1931,7 @@ function extend(schema2, shape) {
1941
1931
  return clone(schema2, def);
1942
1932
  }
1943
1933
  function safeExtend(schema2, shape) {
1944
- if (!isPlainObject2(shape)) {
1934
+ if (!isPlainObject(shape)) {
1945
1935
  throw new Error("Invalid input to safeExtend: expected a plain object");
1946
1936
  }
1947
1937
  const def = mergeDefs(schema2._zod.def, {
@@ -4784,7 +4774,7 @@ function mergeValues(a, b2) {
4784
4774
  if (a instanceof Date && b2 instanceof Date && +a === +b2) {
4785
4775
  return { valid: true, data: a };
4786
4776
  }
4787
- if (isPlainObject2(a) && isPlainObject2(b2)) {
4777
+ if (isPlainObject(a) && isPlainObject(b2)) {
4788
4778
  const bKeys = Object.keys(b2);
4789
4779
  const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
4790
4780
  const newObj = { ...a, ...b2 };
@@ -4995,7 +4985,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4995
4985
  memo6?.attach(inst);
4996
4986
  inst._zod.parse = (payload, ctx) => {
4997
4987
  const input2 = payload.value;
4998
- if (!isPlainObject2(input2)) {
4988
+ if (!isPlainObject(input2)) {
4999
4989
  payload.issues.push({
5000
4990
  expected: "record",
5001
4991
  code: "invalid_type",
@@ -14699,7 +14689,7 @@ function generateIntersectionCheck(doc, ctx, schema2, accessor) {
14699
14689
  }
14700
14690
  function generateRecordCheck(doc, ctx, schema2, accessor) {
14701
14691
  const def = schema2._zod.def;
14702
- const isPlainObjectConst = addConstant(ctx, isPlainObject2);
14692
+ const isPlainObjectConst = addConstant(ctx, isPlainObject);
14703
14693
  doc.write(`if (!${isPlainObjectConst}(${accessor})) return INVALID;`);
14704
14694
  const outputVar = newVar(ctx);
14705
14695
  const kVar = newVar(ctx);
@@ -19373,7 +19363,7 @@ function convertBaseSchema(schema2, ctx) {
19373
19363
  const patterns = patternKeys.map((p2) => new RegExp(p2));
19374
19364
  const basePatternSchema = zodSchema;
19375
19365
  zodSchema = zodSchema.check((payload) => {
19376
- if (!isPlainObject2(payload.value))
19366
+ if (!isPlainObject(payload.value))
19377
19367
  return;
19378
19368
  const unrecognized = [];
19379
19369
  for (const key of Object.keys(payload.value)) {
@@ -24875,18 +24865,18 @@ var Protocol = class {
24875
24865
  function isPlainObject$1(value) {
24876
24866
  return value !== null && typeof value === "object" && !Array.isArray(value);
24877
24867
  }
24878
- function isPlainObject3(value) {
24868
+ function isPlainObject2(value) {
24879
24869
  return typeof value === "object" && value !== null && !Array.isArray(value);
24880
24870
  }
24881
24871
  function partitionInputResponses(inputResponses) {
24882
24872
  const accepted = {};
24883
24873
  const droppedKeys = [];
24884
- if (!isPlainObject3(inputResponses)) return {
24874
+ if (!isPlainObject2(inputResponses)) return {
24885
24875
  accepted,
24886
24876
  droppedKeys
24887
24877
  };
24888
24878
  for (const [key, entry] of Object.entries(inputResponses)) {
24889
- if (!isPlainObject3(entry) || "method" in entry || "result" in entry) {
24879
+ if (!isPlainObject2(entry) || "method" in entry || "result" in entry) {
24890
24880
  droppedKeys.push(key);
24891
24881
  continue;
24892
24882
  }
@@ -26184,7 +26174,8 @@ function useFollowupInteraction() {
26184
26174
  }
26185
26175
 
26186
26176
  // src/chat/LightComposer.tsx
26187
- import { useEffect as useEffect6, useState as useState7 } from "react";
26177
+ import { useEffect as useEffect6, useRef as useRef7, useState as useState7 } from "react";
26178
+ import { normalizePluginRefs } from "@blade-hq/agent-client";
26188
26179
 
26189
26180
  // src/components/ChatInput.tsx
26190
26181
  import { useRef as useRef6, useState as useState6 } from "react";
@@ -26210,7 +26201,8 @@ function ChatInput({
26210
26201
  textareaClassName,
26211
26202
  toolbarClassName,
26212
26203
  queueKey,
26213
- hasAttachments = false
26204
+ hasAttachments = false,
26205
+ onKeyDown
26214
26206
  }) {
26215
26207
  const trimmed = value.trim();
26216
26208
  const latestValue = useRef6(value);
@@ -26234,6 +26226,8 @@ function ChatInput({
26234
26226
  }
26235
26227
  };
26236
26228
  const handleKeyDown = (event) => {
26229
+ onKeyDown?.(event);
26230
+ if (event.defaultPrevented) return;
26237
26231
  if (shouldSubmitChatInput({
26238
26232
  key: event.key,
26239
26233
  shiftKey: event.shiftKey,
@@ -26328,12 +26322,56 @@ function LightComposer({
26328
26322
  initialDraftKey
26329
26323
  }) {
26330
26324
  const session = useSessionHandle(sessionId);
26325
+ const client = useBladeClient();
26326
+ const [refs, setRefs] = useState7([]);
26327
+ const [items, setItems] = useState7([]);
26328
+ const [selectedIndex, setSelectedIndex] = useState7(0);
26329
+ const restored = useRef7(null);
26331
26330
  const [value, setValue] = useState7(initialDraft ?? "");
26332
26331
  const [draftKey, setDraftKey] = useState7(initialDraftKey);
26333
26332
  if (draftKey !== initialDraftKey) {
26334
26333
  setDraftKey(initialDraftKey);
26335
26334
  if (initialDraft) setValue(initialDraft);
26336
26335
  }
26336
+ const [dismissed, setDismissed] = useState7(null);
26337
+ const match = value.match(/(?:^|\s)@([^@\s]*)$/);
26338
+ const query = match && value !== dismissed ? match[1] : null;
26339
+ const candidates = items.filter((item) => item.kind === "plugin");
26340
+ useEffect6(() => {
26341
+ setItems([]);
26342
+ setSelectedIndex(0);
26343
+ if (query === null) return;
26344
+ let current = true;
26345
+ const timer = setTimeout(() => {
26346
+ void getPluginSuggestionItems(client, sessionId, query).then((result) => {
26347
+ if (current) setItems(result);
26348
+ });
26349
+ }, 150);
26350
+ return () => {
26351
+ current = false;
26352
+ clearTimeout(timer);
26353
+ };
26354
+ }, [client, client.token, sessionId, query]);
26355
+ useEffect6(() => {
26356
+ setRefs([]);
26357
+ if (!session) return;
26358
+ const restore = () => {
26359
+ if (restored.current === sessionId) return;
26360
+ const latest = [...session.getState().turns].reverse().find((turn) => turn.role === "user");
26361
+ if (!latest || latest.turn_id.startsWith("local-user-")) return;
26362
+ restored.current = sessionId ?? null;
26363
+ setRefs(normalizePluginRefs(latest.refs));
26364
+ };
26365
+ restore();
26366
+ return session.subscribe(restore);
26367
+ }, [session, sessionId]);
26368
+ const select = (item) => {
26369
+ const next = normalizePluginRefs([...refs, item]);
26370
+ if (next.length > 20) return;
26371
+ setRefs(next);
26372
+ setValue((prev) => prev.replace(/@[^@\s]*$/, `@${item.label} `));
26373
+ setItems([]);
26374
+ };
26337
26375
  useEffect6(() => {
26338
26376
  if (!session) return;
26339
26377
  const offAttach = session.on("attachRequested", ({ label, content: content3 }) => {
@@ -26352,12 +26390,38 @@ ${content3}`);
26352
26390
  }, [session]);
26353
26391
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
26354
26392
  planPanel ? /* @__PURE__ */ jsx8("div", { className: maxWidthClassName ? `mx-auto w-full ${maxWidthClassName}` : void 0, children: planPanel }) : null,
26393
+ 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: [
26394
+ ref.label,
26395
+ /* @__PURE__ */ jsx8("button", { type: "button", "aria-label": `\u79FB\u9664${ref.label}`, onClick: () => setRefs((prev) => prev.filter((item) => item !== ref)), children: " \xD7" })
26396
+ ] }, JSON.stringify([ref.plugin, ref.server, ref.id]))) }) : null,
26397
+ 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: [
26398
+ item.icon ? /* @__PURE__ */ jsx8("img", { src: item.icon, alt: "", width: 16, height: 16 }) : null,
26399
+ item.label,
26400
+ /* @__PURE__ */ jsx8("span", { className: "ml-auto text-xs text-[hsl(var(--muted-foreground))]", children: item.display_name })
26401
+ ] }, JSON.stringify([item.plugin, item.server, item.id])) : /* @__PURE__ */ jsx8("div", { className: "text-xs", children: item.message }, index2)) }) : null,
26355
26402
  /* @__PURE__ */ jsx8(
26356
26403
  ChatInput,
26357
26404
  {
26358
26405
  value,
26359
26406
  onValueChange: setValue,
26360
- onSend: (text4) => onSend(text4),
26407
+ onSend: (text4) => onSend(text4 || refs.map((ref) => `@${ref.label}`).join(" "), { refs: pluginRefsForSend(refs, session?.getState().turns) }),
26408
+ hasAttachments: refs.length > 0,
26409
+ onKeyDown: (event) => {
26410
+ if (query === null || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
26411
+ if (event.key === "Escape") {
26412
+ event.preventDefault();
26413
+ setDismissed(value);
26414
+ }
26415
+ if (!candidates.length) return;
26416
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
26417
+ event.preventDefault();
26418
+ setSelectedIndex((prev) => (prev + (event.key === "ArrowDown" ? 1 : candidates.length - 1)) % candidates.length);
26419
+ }
26420
+ if (event.key === "Enter" && !event.shiftKey) {
26421
+ event.preventDefault();
26422
+ select(candidates[selectedIndex]);
26423
+ }
26424
+ },
26361
26425
  onStop: () => void onStop(),
26362
26426
  isStreaming,
26363
26427
  isStopping,
@@ -26373,7 +26437,7 @@ ${content3}`);
26373
26437
  }
26374
26438
 
26375
26439
  // src/chat/LiteMessageList.tsx
26376
- import { useCallback as useCallback8, useEffect as useEffect19, useMemo as useMemo12, useRef as useRef17, useState as useState24 } from "react";
26440
+ import { useCallback as useCallback8, useEffect as useEffect19, useMemo as useMemo12, useRef as useRef18, useState as useState24 } from "react";
26377
26441
  import {
26378
26442
  extractTextAttachments as extractTextAttachments2,
26379
26443
  getTextContent as getTextContent3,
@@ -26382,18 +26446,16 @@ import {
26382
26446
 
26383
26447
  // src/chat/lib/citations.ts
26384
26448
  function sameEvidence(a, b2) {
26385
- 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;
26449
+ return a.title === b2.title && a.text === b2.text && a.toolCallId === b2.toolCallId && a.itemId === b2.itemId;
26386
26450
  }
26387
26451
  function buildCitationsFromToolCalls(toolCalls) {
26388
- const kbSearchCalls = (toolCalls ?? []).filter(
26389
- (call) => formatToolName(call.name) === "KbSearch" && call.status === "done"
26390
- );
26452
+ const successfulCalls = (toolCalls ?? []).filter((call) => call.status === "done");
26391
26453
  const merged = /* @__PURE__ */ new Map();
26392
26454
  const ambiguous = /* @__PURE__ */ new Set();
26393
- for (const call of kbSearchCalls) {
26394
- const parsed = parseKbSearchResult(call.result);
26395
- if (!parsed) continue;
26396
- for (const hit of parsed.hits) {
26455
+ for (const call of successfulCalls) {
26456
+ const hits = parsePluginEvidence(call);
26457
+ if (!hits) continue;
26458
+ for (const hit of hits) {
26397
26459
  const existing = merged.get(hit.n);
26398
26460
  if (existing && !sameEvidence(existing, hit)) {
26399
26461
  ambiguous.add(hit.n);
@@ -26409,6 +26471,32 @@ function buildCitationsFromToolCalls(toolCalls) {
26409
26471
  }
26410
26472
  return map3;
26411
26473
  }
26474
+ function parsePluginEvidence(call) {
26475
+ const items = call.evidence;
26476
+ if (!Array.isArray(items)) return void 0;
26477
+ return items.flatMap((item) => {
26478
+ if (!item || typeof item !== "object") return [];
26479
+ const entry = item;
26480
+ 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 [];
26481
+ let url2 = null;
26482
+ if (typeof entry.url === "string") {
26483
+ try {
26484
+ const parsed = new URL(entry.url);
26485
+ if (["https:", "http:"].includes(parsed.protocol) && !parsed.username && !parsed.password) url2 = parsed.href;
26486
+ } catch {
26487
+ }
26488
+ }
26489
+ return [{
26490
+ n: Number(entry.n),
26491
+ title: entry.title,
26492
+ text: entry.text,
26493
+ snapshot: true,
26494
+ toolCallId: String(entry.tool_call_id),
26495
+ itemId: entry.id,
26496
+ previewUrl: url2
26497
+ }];
26498
+ });
26499
+ }
26412
26500
 
26413
26501
  // src/chat/LiteMessageList.tsx
26414
26502
  import { chatErrorForDisplay as chatErrorForDisplay2, isBackgroundWakeMessage as isBackgroundWakeMessage2 } from "@blade-hq/agent-client/internal";
@@ -26433,13 +26521,13 @@ function BackgroundWakeNotice() {
26433
26521
  }
26434
26522
 
26435
26523
  // src/components/MessageImage.tsx
26436
- import { forwardRef, useEffect as useEffect7, useImperativeHandle, useRef as useRef7, useState as useState8 } from "react";
26524
+ import { forwardRef, useEffect as useEffect7, useImperativeHandle, useRef as useRef8, useState as useState8 } from "react";
26437
26525
  import { jsx as jsx10 } from "react/jsx-runtime";
26438
26526
  var assetPattern = /^\/api\/(sessions|share)\/([^/]+)\/media\/([a-f0-9]{64})$/;
26439
26527
  var MessageImage = forwardRef(function MessageImage2({ client: suppliedClient, src, original = false, alt, style, ...props }, ref) {
26440
26528
  const contextClient = useOptionalBladeClient();
26441
26529
  const client = suppliedClient ?? contextClient;
26442
- const element2 = useRef7(null);
26530
+ const element2 = useRef8(null);
26443
26531
  useImperativeHandle(ref, () => element2.current);
26444
26532
  const [visible, setVisible] = useState8(false);
26445
26533
  const [result, setResult] = useState8(null);
@@ -26498,7 +26586,7 @@ var MessageImage = forwardRef(function MessageImage2({ client: suppliedClient, s
26498
26586
  });
26499
26587
 
26500
26588
  // src/chat/AssistantTurnBlock.tsx
26501
- import { memo as memo5, useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo11, useRef as useRef14, useState as useState22 } from "react";
26589
+ import { memo as memo5, useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo11, useRef as useRef15, useState as useState22 } from "react";
26502
26590
  import { getFileParts as getFileParts2, getImageParts as getImageParts2, getTextContent as getTextContent2, normalizeMessageContent } from "@blade-hq/agent-client/internal";
26503
26591
 
26504
26592
  // src/chat/lib/ui-meta.ts
@@ -26562,7 +26650,7 @@ import {
26562
26650
  useContext as useContext5,
26563
26651
  useEffect as useEffect8,
26564
26652
  useMemo as useMemo5,
26565
- useRef as useRef10,
26653
+ useRef as useRef11,
26566
26654
  useState as useState10
26567
26655
  } from "react";
26568
26656
 
@@ -26598,7 +26686,7 @@ var ShimmerComponent = ({
26598
26686
  var Shimmer = memo3(ShimmerComponent);
26599
26687
 
26600
26688
  // src/components/markdown/index.ts
26601
- import { createElement as createElement3, useRef as useRef8 } from "react";
26689
+ import { createElement as createElement3, useRef as useRef9 } from "react";
26602
26690
 
26603
26691
  // ../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
26604
26692
  var emptyOptions = {};
@@ -35476,10 +35564,10 @@ function MarkdownRenderer({
35476
35564
  codeBlockOverrides
35477
35565
  }) {
35478
35566
  const isStreaming = mode === "streaming";
35479
- const cacheRef = useRef8(createParseCache());
35480
- const blockCacheRef = useRef8(/* @__PURE__ */ new WeakMap());
35481
- const groupIdentityMapRef = useRef8(/* @__PURE__ */ new WeakMap());
35482
- const rendererConfigRef = useRef8(null);
35567
+ const cacheRef = useRef9(createParseCache());
35568
+ const blockCacheRef = useRef9(/* @__PURE__ */ new WeakMap());
35569
+ const groupIdentityMapRef = useRef9(/* @__PURE__ */ new WeakMap());
35570
+ const rendererConfigRef = useRef9(null);
35483
35571
  const previousConfig = rendererConfigRef.current;
35484
35572
  if (!previousConfig || previousConfig.allowedTags !== allowedTags || previousConfig.components !== components || previousConfig.rawHtmlPlugins !== rawHtmlPlugins || previousConfig.codeBlockOverrides !== codeBlockOverrides) {
35485
35573
  blockCacheRef.current = /* @__PURE__ */ new WeakMap();
@@ -35609,7 +35697,7 @@ function normalizeAdjacentUrlFormatting(value) {
35609
35697
  }
35610
35698
 
35611
35699
  // src/chat/markdown/MarkdownContent.tsx
35612
- import { isValidElement, useMemo as useMemo4, useRef as useRef9, useState as useState9 } from "react";
35700
+ import { isValidElement, useMemo as useMemo4, useRef as useRef10, useState as useState9 } from "react";
35613
35701
 
35614
35702
  // src/chat/lib/markdown-asset-url.ts
35615
35703
  function isAbsoluteAssetUrl(src, hasFileContext) {
@@ -35723,6 +35811,7 @@ function InlineToolCallBlock({
35723
35811
  }
35724
35812
  function CitationRefBlock({ "data-n": dataN, citations }) {
35725
35813
  const overlayRoot = useOverlayRoot();
35814
+ const [snapshotOpen, setSnapshotOpen] = useState9(false);
35726
35815
  const n2 = Number(dataN);
35727
35816
  const entry = Number.isFinite(n2) ? citations?.[n2] : void 0;
35728
35817
  if (!entry) return /* @__PURE__ */ jsxs10(Fragment6, { children: [
@@ -35731,48 +35820,51 @@ function CitationRefBlock({ "data-n": dataN, citations }) {
35731
35820
  "]"
35732
35821
  ] });
35733
35822
  const handleClick = () => {
35734
- if (entry.previewUrl) {
35823
+ if (entry.snapshot) {
35824
+ setSnapshotOpen(true);
35825
+ } else if (entry.previewUrl) {
35735
35826
  window.open(entry.previewUrl, "_blank", "noopener,noreferrer");
35736
35827
  }
35737
35828
  };
35738
- return /* @__PURE__ */ jsx14(dist_exports2.Provider, { delayDuration: 150, children: /* @__PURE__ */ jsxs10(dist_exports2.Root, { children: [
35739
- /* @__PURE__ */ jsx14(dist_exports2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx14(
35740
- "button",
35741
- {
35742
- type: "button",
35743
- onClick: handleClick,
35744
- className: cn(
35745
- "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",
35746
- "bg-[hsl(var(--muted))]/60 text-[hsl(var(--muted-foreground))] transition-colors",
35747
- entry.previewUrl ? "cursor-pointer hover:bg-[hsl(var(--muted))] hover:text-[hsl(var(--foreground))]" : "cursor-default"
35748
- ),
35749
- "aria-label": `\u5F15\u7528\u6765\u6E90\uFF1A${entry.title}${entry.page ? ` \u7B2C ${entry.page} \u9875` : ""}`,
35750
- children: entry.n
35751
- }
35752
- ) }),
35753
- /* @__PURE__ */ jsx14(dist_exports2.Portal, { container: overlayRoot, children: /* @__PURE__ */ jsxs10(
35754
- dist_exports2.Content,
35755
- {
35756
- side: "top",
35757
- sideOffset: 6,
35758
- 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",
35759
- children: [
35760
- /* @__PURE__ */ jsxs10("div", { className: "font-medium", children: [
35761
- entry.title,
35762
- entry.page ? ` \xB7 \u7B2C ${entry.page} \u9875` : ""
35763
- ] }),
35764
- entry.kbName ? /* @__PURE__ */ jsxs10("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
35765
- "\u300A",
35766
- entry.kbName,
35767
- "\u300B"
35768
- ] }) : null,
35769
- entry.text ? /* @__PURE__ */ jsx14("div", { className: "line-clamp-4 text-[hsl(var(--muted-foreground))]", children: entry.text }) : null,
35770
- entry.previewUrl ? /* @__PURE__ */ jsx14("div", { className: "text-[10px] text-[hsl(var(--muted-foreground))]/70", children: "\u70B9\u51FB\u67E5\u770B\u539F\u6587" }) : null,
35771
- /* @__PURE__ */ jsx14(dist_exports2.Arrow, { className: "fill-[hsl(var(--popover))]" })
35772
- ]
35773
- }
35774
- ) })
35775
- ] }) });
35829
+ return /* @__PURE__ */ jsxs10(dist_exports2.Provider, { delayDuration: 150, children: [
35830
+ /* @__PURE__ */ jsxs10(dist_exports2.Root, { children: [
35831
+ /* @__PURE__ */ jsx14(dist_exports2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx14(
35832
+ "button",
35833
+ {
35834
+ type: "button",
35835
+ onClick: handleClick,
35836
+ className: cn(
35837
+ "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",
35838
+ "bg-[hsl(var(--muted))]/60 text-[hsl(var(--muted-foreground))] transition-colors",
35839
+ entry.snapshot || entry.previewUrl ? "cursor-pointer hover:bg-[hsl(var(--muted))] hover:text-[hsl(var(--foreground))]" : "cursor-default"
35840
+ ),
35841
+ "aria-label": `\u5F15\u7528\u6765\u6E90\uFF1A${entry.title}`,
35842
+ children: entry.n
35843
+ }
35844
+ ) }),
35845
+ /* @__PURE__ */ jsx14(dist_exports2.Portal, { container: overlayRoot, children: /* @__PURE__ */ jsxs10(
35846
+ dist_exports2.Content,
35847
+ {
35848
+ side: "top",
35849
+ sideOffset: 6,
35850
+ 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",
35851
+ children: [
35852
+ /* @__PURE__ */ jsx14("div", { className: "font-medium", children: entry.title }),
35853
+ entry.text ? /* @__PURE__ */ jsx14("div", { className: "line-clamp-4 text-[hsl(var(--muted-foreground))]", children: entry.text }) : null,
35854
+ entry.snapshot || entry.previewUrl ? /* @__PURE__ */ jsx14("div", { className: "text-[10px] text-[hsl(var(--muted-foreground))]/70", children: "\u70B9\u51FB\u67E5\u770B\u539F\u6587" }) : null,
35855
+ /* @__PURE__ */ jsx14(dist_exports2.Arrow, { className: "fill-[hsl(var(--popover))]" })
35856
+ ]
35857
+ }
35858
+ ) })
35859
+ ] }),
35860
+ 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: [
35861
+ /* @__PURE__ */ jsx14(DialogTitle, { children: entry.title }),
35862
+ /* @__PURE__ */ jsx14("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u56DE\u7B54\u65F6\u4FDD\u5B58\u7684\u539F\u6587" }),
35863
+ /* @__PURE__ */ jsx14("div", { className: "whitespace-pre-wrap break-words text-sm", children: entry.text.slice(0, 2e4) }),
35864
+ 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,
35865
+ entry.previewUrl ? /* @__PURE__ */ jsx14(ExternalAnchor, { href: entry.previewUrl, children: "\u6253\u5F00\u6765\u6E90\u9875\u9762" }) : null
35866
+ ] }) }) : null
35867
+ ] });
35776
35868
  }
35777
35869
  function extractText(value) {
35778
35870
  if (typeof value === "string" || typeof value === "number") return String(value);
@@ -35794,7 +35886,7 @@ function resolveCollapsedContent({
35794
35886
  return decodeCollapsedContent(dataRawAttribute) || extractText(children).trim();
35795
35887
  }
35796
35888
  function CodeBlockPre({ children, ...props }) {
35797
- const preRef = useRef9(null);
35889
+ const preRef = useRef10(null);
35798
35890
  const [copied, setCopied] = useState9(false);
35799
35891
  const codeChild = Array.isArray(children) ? children[0] : children;
35800
35892
  const hasCodeNode = isValidElement(codeChild);
@@ -36059,7 +36151,7 @@ var Reasoning = memo4(
36059
36151
  defaultProp: void 0,
36060
36152
  prop: durationProp
36061
36153
  });
36062
- const startTimeRef = useRef10(null);
36154
+ const startTimeRef = useRef11(null);
36063
36155
  useEffect8(() => {
36064
36156
  if (isStreaming) {
36065
36157
  if (startTimeRef.current === null) {
@@ -36593,7 +36685,7 @@ import {
36593
36685
  } from "@blade-hq/agent-client/internal";
36594
36686
 
36595
36687
  // src/chat/AskUserQuestionBlock.tsx
36596
- import { useEffect as useEffect10, useMemo as useMemo7, useRef as useRef11, useState as useState14 } from "react";
36688
+ import { useEffect as useEffect10, useMemo as useMemo7, useRef as useRef12, useState as useState14 } from "react";
36597
36689
  import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
36598
36690
  var CUSTOM_TEXTAREA_MAX_HEIGHT = 160;
36599
36691
  function resizeCustomTextarea(textarea) {
@@ -36602,7 +36694,7 @@ function resizeCustomTextarea(textarea) {
36602
36694
  textarea.style.overflowY = textarea.scrollHeight > CUSTOM_TEXTAREA_MAX_HEIGHT ? "auto" : "hidden";
36603
36695
  }
36604
36696
  function useAutoResizeTextarea(value) {
36605
- const textareaRef = useRef11(null);
36697
+ const textareaRef = useRef12(null);
36606
36698
  useEffect10(() => {
36607
36699
  const textarea = textareaRef.current;
36608
36700
  if (textarea?.value === value) resizeCustomTextarea(textarea);
@@ -37027,8 +37119,137 @@ function normalizeOptionItem(value) {
37027
37119
  };
37028
37120
  }
37029
37121
 
37122
+ // src/chat/lib/code-language.ts
37123
+ var FILE_EXTENSION_ALIASES = {
37124
+ ".bash": "bash",
37125
+ ".css": "css",
37126
+ ".go": "go",
37127
+ ".htm": "html",
37128
+ ".html": "html",
37129
+ ".js": "javascript",
37130
+ ".json": "json",
37131
+ ".jsonc": "json",
37132
+ ".jsx": "jsx",
37133
+ ".md": "markdown",
37134
+ ".mdx": "markdown",
37135
+ ".py": "python",
37136
+ ".rs": "rust",
37137
+ ".scss": "css",
37138
+ ".sh": "bash",
37139
+ ".ts": "typescript",
37140
+ ".tsx": "tsx",
37141
+ ".yaml": "yaml",
37142
+ ".yml": "yaml",
37143
+ ".zsh": "bash"
37144
+ };
37145
+ function getCodeLanguageFromFilename(filePath) {
37146
+ if (!filePath) return null;
37147
+ const dotIndex = filePath.lastIndexOf(".");
37148
+ if (dotIndex < 0) return null;
37149
+ return FILE_EXTENSION_ALIASES[filePath.slice(dotIndex).toLowerCase()] ?? null;
37150
+ }
37151
+
37152
+ // src/chat/tool-renderers/shared.tsx
37153
+ import { jsx as jsx22 } from "react/jsx-runtime";
37154
+ function getResultText(result) {
37155
+ if (typeof result === "string") return result;
37156
+ if (Array.isArray(result)) {
37157
+ const texts = result.filter(
37158
+ (p2) => typeof p2 === "object" && p2 !== null && p2.type === "text" && typeof p2.text === "string"
37159
+ ).map((p2) => p2.text);
37160
+ return texts.length > 0 ? texts.join("\n") : null;
37161
+ }
37162
+ return result != null ? String(result) : null;
37163
+ }
37164
+ function getResultImages(result) {
37165
+ if (!Array.isArray(result)) return [];
37166
+ return result.filter(
37167
+ (p2) => typeof p2 === "object" && p2 !== null && p2.type === "image_url" && typeof p2.image_url?.url === "string"
37168
+ ).map((p2) => p2.image_url);
37169
+ }
37170
+ function parseJsonValue(value) {
37171
+ if (!value) return null;
37172
+ try {
37173
+ return JSON.parse(value);
37174
+ } catch {
37175
+ return null;
37176
+ }
37177
+ }
37178
+ function isPlainObject3(value) {
37179
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
37180
+ }
37181
+ function getStringValue(data, key) {
37182
+ const value = data?.[key];
37183
+ return typeof value === "string" && value.trim() ? value.trim() : null;
37184
+ }
37185
+ function getNumberValue(data, key) {
37186
+ const value = data?.[key];
37187
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
37188
+ }
37189
+ function getBooleanValue(data, key) {
37190
+ return data?.[key] === true;
37191
+ }
37192
+ function extractErrorMessage(value) {
37193
+ const text4 = typeof value === "string" ? value : getResultText(value);
37194
+ if (!text4?.trim()) return null;
37195
+ const parsed = parseJsonValue(text4);
37196
+ if (!isPlainObject3(parsed)) return null;
37197
+ return typeof parsed.error === "string" && parsed.error.trim() ? parsed.error.trim() : null;
37198
+ }
37199
+ function getFileName(filePath) {
37200
+ if (!filePath) return "\u672A\u547D\u540D\u6587\u4EF6";
37201
+ return filePath.split(/[\\/]/).pop() ?? filePath;
37202
+ }
37203
+ function getCodeLanguage(filePath) {
37204
+ return getCodeLanguageFromFilename(filePath);
37205
+ }
37206
+ function formatBytes(size) {
37207
+ if (typeof size !== "number" || !Number.isFinite(size) || size < 0) return null;
37208
+ if (size < 1024) return `${size} B`;
37209
+ if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KB`;
37210
+ return `${(size / (1024 * 1024)).toFixed(1)} MB`;
37211
+ }
37212
+ function CodePreview({
37213
+ content: content3,
37214
+ filePath,
37215
+ emptyLabel = "\uFF08\u6682\u65E0\u5185\u5BB9\uFF09",
37216
+ className
37217
+ }) {
37218
+ const { highlightedHtml } = useHighlightedCode(content3, getCodeLanguage(filePath));
37219
+ if (!content3.trim()) {
37220
+ return /* @__PURE__ */ jsx22(
37221
+ "pre",
37222
+ {
37223
+ className: cn(
37224
+ "overflow-auto rounded-lg border border-[hsl(var(--border))]",
37225
+ "bg-[hsl(var(--muted))]/35 p-3 font-mono text-[11px] text-[hsl(var(--muted-foreground))]",
37226
+ className
37227
+ ),
37228
+ children: /* @__PURE__ */ jsx22("code", { children: emptyLabel })
37229
+ }
37230
+ );
37231
+ }
37232
+ return /* @__PURE__ */ jsx22(
37233
+ "pre",
37234
+ {
37235
+ className: cn(
37236
+ "overflow-auto rounded-lg border border-[hsl(var(--border))]",
37237
+ "bg-[hsl(var(--muted))]/35 p-3 text-[11px]",
37238
+ className
37239
+ ),
37240
+ children: highlightedHtml ? /* @__PURE__ */ jsx22(
37241
+ "code",
37242
+ {
37243
+ className: "font-mono",
37244
+ dangerouslySetInnerHTML: { __html: highlightedHtml }
37245
+ }
37246
+ ) : /* @__PURE__ */ jsx22("code", { className: "whitespace-pre-wrap break-words font-mono text-[hsl(var(--foreground))]", children: content3 })
37247
+ }
37248
+ );
37249
+ }
37250
+
37030
37251
  // src/chat/tool-renderers/BashRenderer.tsx
37031
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
37252
+ import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
37032
37253
  function pickOutputField(data) {
37033
37254
  if (!data) return null;
37034
37255
  for (const key of ["output", "stdout", "stderr"]) {
@@ -37038,15 +37259,15 @@ function pickOutputField(data) {
37038
37259
  return null;
37039
37260
  }
37040
37261
  function MetaPill({ label }) {
37041
- return /* @__PURE__ */ jsx22("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-[10px] text-secondary-foreground", children: label });
37262
+ return /* @__PURE__ */ jsx23("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-[10px] text-secondary-foreground", children: label });
37042
37263
  }
37043
37264
  function BashRenderer({ toolCall }) {
37044
37265
  const argsValue = parseJsonValue(toolCall.arguments);
37045
37266
  const rawText = getResultText(toolCall.result);
37046
37267
  const resultStr = typeof rawText === "string" && rawText.trim().length > 0 ? rawText : null;
37047
37268
  const resultValue = parseJsonValue(resultStr);
37048
- const args = isPlainObject(argsValue) ? argsValue : null;
37049
- const result = isPlainObject(resultValue) ? resultValue : null;
37269
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37270
+ const result = isPlainObject3(resultValue) ? resultValue : null;
37050
37271
  const normalizedName = formatToolName(toolCall.name);
37051
37272
  const command = getStringValue(result, "command") ?? getStringValue(args, "command") ?? "";
37052
37273
  const description = getStringValue(args, "description") ?? getStringValue(result, "description") ?? "";
@@ -37063,12 +37284,12 @@ function BashRenderer({ toolCall }) {
37063
37284
  const hasFailure = toolCall.status === "error" || timedOut || exitCode !== null && exitCode !== 0;
37064
37285
  return /* @__PURE__ */ jsxs17("div", { className: "space-y-3", children: [
37065
37286
  (description || cwd) && /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center gap-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37066
- description ? /* @__PURE__ */ jsx22("span", { children: description }) : null,
37067
- cwd ? /* @__PURE__ */ jsx22("span", { className: "rounded-full bg-[hsl(var(--muted))] px-2 py-0.5 font-mono", children: cwd }) : null
37287
+ description ? /* @__PURE__ */ jsx23("span", { children: description }) : null,
37288
+ cwd ? /* @__PURE__ */ jsx23("span", { className: "rounded-full bg-[hsl(var(--muted))] px-2 py-0.5 font-mono", children: cwd }) : null
37068
37289
  ] }),
37069
37290
  /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [
37070
- /* @__PURE__ */ jsx22("div", { className: "border-b border-border px-3 py-2 text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u547D\u4EE4" }),
37071
- /* @__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"}` }) })
37291
+ /* @__PURE__ */ jsx23("div", { className: "border-b border-border px-3 py-2 text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u547D\u4EE4" }),
37292
+ /* @__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"}` }) })
37072
37293
  ] }),
37073
37294
  /* @__PURE__ */ jsxs17(
37074
37295
  "div",
@@ -37079,25 +37300,25 @@ function BashRenderer({ toolCall }) {
37079
37300
  ),
37080
37301
  children: [
37081
37302
  /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center justify-between gap-2 border-b border-border px-3 py-2", children: [
37082
- /* @__PURE__ */ jsx22("div", { className: "text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u8F93\u51FA" }),
37303
+ /* @__PURE__ */ jsx23("div", { className: "text-[10px] uppercase tracking-[0.16em] text-muted-foreground", children: "\u8F93\u51FA" }),
37083
37304
  /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center gap-1.5", children: [
37084
- taskId ? /* @__PURE__ */ jsx22(MetaPill, { label: `\u4EFB\u52A1 ${taskId}` }) : null,
37085
- exitCode !== null ? /* @__PURE__ */ jsx22(MetaPill, { label: `\u9000\u51FA\u7801 ${exitCode}` }) : null,
37086
- timedOut ? /* @__PURE__ */ jsx22(MetaPill, { label: "\u5DF2\u8D85\u65F6" }) : null,
37087
- truncated ? /* @__PURE__ */ jsx22(MetaPill, { label: "\u8F93\u51FA\u5DF2\u622A\u65AD" }) : null,
37088
- normalizedName === "BgBash" && !taskId ? /* @__PURE__ */ jsx22(MetaPill, { label: "\u540E\u53F0\u4EFB\u52A1" }) : null
37305
+ taskId ? /* @__PURE__ */ jsx23(MetaPill, { label: `\u4EFB\u52A1 ${taskId}` }) : null,
37306
+ exitCode !== null ? /* @__PURE__ */ jsx23(MetaPill, { label: `\u9000\u51FA\u7801 ${exitCode}` }) : null,
37307
+ timedOut ? /* @__PURE__ */ jsx23(MetaPill, { label: "\u5DF2\u8D85\u65F6" }) : null,
37308
+ truncated ? /* @__PURE__ */ jsx23(MetaPill, { label: "\u8F93\u51FA\u5DF2\u622A\u65AD" }) : null,
37309
+ normalizedName === "BgBash" && !taskId ? /* @__PURE__ */ jsx23(MetaPill, { label: "\u540E\u53F0\u4EFB\u52A1" }) : null
37089
37310
  ] })
37090
37311
  ] }),
37091
- /* @__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" }) })
37312
+ /* @__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" }) })
37092
37313
  ]
37093
37314
  }
37094
37315
  ),
37095
- 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
37316
+ 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
37096
37317
  ] });
37097
37318
  }
37098
37319
 
37099
37320
  // src/chat/tool-renderers/FileEditRenderer.tsx
37100
- import { useLayoutEffect as useLayoutEffect3, useRef as useRef12 } from "react";
37321
+ import { useLayoutEffect as useLayoutEffect3, useRef as useRef13 } from "react";
37101
37322
 
37102
37323
  // src/chat/tool-renderers/write-preview-scroll.ts
37103
37324
  function shouldFollowWritePreview(toolName, status) {
@@ -37108,7 +37329,7 @@ function scrollWritePreviewToLatest(preview) {
37108
37329
  }
37109
37330
 
37110
37331
  // src/chat/tool-renderers/FileEditRenderer.tsx
37111
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
37332
+ import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
37112
37333
  var MAX_DIFF_LINES = 200;
37113
37334
  var FILE_PATH_FIELDS = ["file_path", "path"];
37114
37335
  function computeDiff(oldText, newText) {
@@ -37179,7 +37400,7 @@ function buildEditPreview(args, rawArguments) {
37179
37400
  const edits = Array.isArray(args?.edits) ? args.edits : null;
37180
37401
  if (edits) {
37181
37402
  return edits.flatMap((rawEdit, index2) => {
37182
- if (!isPlainObject(rawEdit)) {
37403
+ if (!isPlainObject3(rawEdit)) {
37183
37404
  return [];
37184
37405
  }
37185
37406
  const oldText = getStringValue(rawEdit, "old_text") ?? "";
@@ -37290,10 +37511,10 @@ function readJsonString(raw, start) {
37290
37511
  return { value: chars.join(""), closed: false };
37291
37512
  }
37292
37513
  function FileEditRenderer({ toolCall }) {
37293
- const previewRef = useRef12(null);
37514
+ const previewRef = useRef13(null);
37294
37515
  const rawArguments = toolCall.arguments ?? "";
37295
37516
  const argsValue = parseJsonValue(toolCall.arguments);
37296
- const args = isPlainObject(argsValue) ? argsValue : null;
37517
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37297
37518
  const normalizedName = formatToolName(toolCall.name);
37298
37519
  const partialFilePath = extractJsonStringFieldPartial(rawArguments, FILE_PATH_FIELDS);
37299
37520
  const filePath = extractToolFilePath(toolCall) ?? partialFilePath;
@@ -37316,16 +37537,16 @@ function FileEditRenderer({ toolCall }) {
37316
37537
  return /* @__PURE__ */ jsxs18("div", { className: "space-y-3", children: [
37317
37538
  /* @__PURE__ */ jsxs18("div", { className: "flex items-start justify-between gap-3", children: [
37318
37539
  /* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
37319
- /* @__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" }),
37320
- /* @__PURE__ */ jsx23("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: fileName })
37540
+ /* @__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" }),
37541
+ /* @__PURE__ */ jsx24("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: fileName })
37321
37542
  ] }),
37322
- 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
37543
+ 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
37323
37544
  ] }),
37324
- 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,
37325
- 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,
37545
+ 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,
37546
+ 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,
37326
37547
  /* @__PURE__ */ jsxs18("div", { className: "file-edit-preview overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20", children: [
37327
- /* @__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" }),
37328
- /* @__PURE__ */ jsx23(
37548
+ /* @__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" }),
37549
+ /* @__PURE__ */ jsx24(
37329
37550
  "pre",
37330
37551
  {
37331
37552
  ref: previewRef,
@@ -37342,7 +37563,7 @@ function FileEditRenderer({ toolCall }) {
37342
37563
  line.type === "unchanged" && "text-[hsl(var(--foreground))]"
37343
37564
  ),
37344
37565
  children: [
37345
- /* @__PURE__ */ jsx23("span", { className: "select-none py-0.5 text-right text-[10px] text-[hsl(var(--muted-foreground))]", children: line.line ?? "" }),
37566
+ /* @__PURE__ */ jsx24("span", { className: "select-none py-0.5 text-right text-[10px] text-[hsl(var(--muted-foreground))]", children: line.line ?? "" }),
37346
37567
  /* @__PURE__ */ jsxs18("span", { className: "min-w-0 whitespace-pre-wrap break-words py-0.5", children: [
37347
37568
  prefix,
37348
37569
  line.value
@@ -37351,11 +37572,11 @@ function FileEditRenderer({ toolCall }) {
37351
37572
  },
37352
37573
  `${line.type}-${line.line}-${index2}`
37353
37574
  );
37354
- }) : /* @__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" })
37575
+ }) : /* @__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" })
37355
37576
  }
37356
37577
  )
37357
37578
  ] }),
37358
- 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
37579
+ 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
37359
37580
  ] });
37360
37581
  }
37361
37582
 
@@ -37363,17 +37584,17 @@ function FileEditRenderer({ toolCall }) {
37363
37584
  import { useState as useState16 } from "react";
37364
37585
 
37365
37586
  // src/chat/ImageLightbox.tsx
37366
- import { useCallback as useCallback4, useEffect as useEffect11, useRef as useRef13, useState as useState15 } from "react";
37587
+ import { useCallback as useCallback4, useEffect as useEffect11, useRef as useRef14, useState as useState15 } from "react";
37367
37588
  import { createPortal } from "react-dom";
37368
- import { Fragment as Fragment10, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
37589
+ import { Fragment as Fragment10, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
37369
37590
  function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 }) {
37370
37591
  const [currentIndex, setCurrentIndex] = useState15(initialIndex);
37371
37592
  const [scale, setScale] = useState15(1);
37372
37593
  const [translate, setTranslate] = useState15({ x: 0, y: 0 });
37373
- const dragging = useRef13(false);
37374
- const dragStart = useRef13({ x: 0, y: 0 });
37375
- const translateStart = useRef13({ x: 0, y: 0 });
37376
- const imgRef = useRef13(null);
37594
+ const dragging = useRef14(false);
37595
+ const dragStart = useRef14({ x: 0, y: 0 });
37596
+ const translateStart = useRef14({ x: 0, y: 0 });
37597
+ const imgRef = useRef14(null);
37377
37598
  const [loadedSource, setLoadedSource] = useState15(null);
37378
37599
  const reset = useCallback4(() => {
37379
37600
  setScale(1);
@@ -37395,7 +37616,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37395
37616
  setCurrentIndex((i2) => Math.min(images.length - 1, i2 + 1));
37396
37617
  reset();
37397
37618
  }, [images.length, reset]);
37398
- const prevOpenRef = useRef13(false);
37619
+ const prevOpenRef = useRef14(false);
37399
37620
  useEffect11(() => {
37400
37621
  if (open2 && !prevOpenRef.current) {
37401
37622
  setLoadedSource(null);
@@ -37485,16 +37706,16 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37485
37706
  className: "fixed inset-0 z-50 flex animate-in items-center justify-center bg-black/80 fade-in-0 duration-(--motion-duration-fast)",
37486
37707
  onClick: close,
37487
37708
  children: [
37488
- /* @__PURE__ */ jsx24(
37709
+ /* @__PURE__ */ jsx25(
37489
37710
  "button",
37490
37711
  {
37491
37712
  type: "button",
37492
37713
  onClick: close,
37493
37714
  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",
37494
- children: /* @__PURE__ */ jsx24(X, { size: 20 })
37715
+ children: /* @__PURE__ */ jsx25(X, { size: 20 })
37495
37716
  }
37496
37717
  ),
37497
- /* @__PURE__ */ jsx24("span", { className: "text-sm text-white/60", children: "\u52A0\u8F7D\u4E2D..." })
37718
+ /* @__PURE__ */ jsx25("span", { className: "text-sm text-white/60", children: "\u52A0\u8F7D\u4E2D..." })
37498
37719
  ]
37499
37720
  }
37500
37721
  ),
@@ -37517,7 +37738,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37517
37738
  className: "absolute right-4 top-4 z-10 flex items-center gap-1.5",
37518
37739
  onClick: (e) => e.stopPropagation(),
37519
37740
  children: [
37520
- /* @__PURE__ */ jsx24(
37741
+ /* @__PURE__ */ jsx25(
37521
37742
  "button",
37522
37743
  {
37523
37744
  type: "button",
@@ -37525,10 +37746,10 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37525
37746
  disabled: loadedSource !== current.src,
37526
37747
  title: loadedSource === current.src ? "\u4E0B\u8F7D\u56FE\u7247" : "\u539F\u56FE\u52A0\u8F7D\u4E2D",
37527
37748
  className: "rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37528
- children: /* @__PURE__ */ jsx24(Download, { size: 18 })
37749
+ children: /* @__PURE__ */ jsx25(Download, { size: 18 })
37529
37750
  }
37530
37751
  ),
37531
- /* @__PURE__ */ jsx24(
37752
+ /* @__PURE__ */ jsx25(
37532
37753
  "button",
37533
37754
  {
37534
37755
  type: "button",
@@ -37536,22 +37757,22 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37536
37757
  disabled: loadedSource !== current.src,
37537
37758
  title: loadedSource === current.src ? "\u65B0\u6807\u7B7E\u9875\u6253\u5F00" : "\u539F\u56FE\u52A0\u8F7D\u4E2D",
37538
37759
  className: "rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37539
- children: /* @__PURE__ */ jsx24(ExternalLink, { size: 18 })
37760
+ children: /* @__PURE__ */ jsx25(ExternalLink, { size: 18 })
37540
37761
  }
37541
37762
  ),
37542
- /* @__PURE__ */ jsx24(
37763
+ /* @__PURE__ */ jsx25(
37543
37764
  "button",
37544
37765
  {
37545
37766
  type: "button",
37546
37767
  onClick: close,
37547
37768
  className: "rounded-full bg-black/50 p-2 text-white/80 transition-colors hover:bg-black/70 hover:text-white",
37548
- children: /* @__PURE__ */ jsx24(X, { size: 20 })
37769
+ children: /* @__PURE__ */ jsx25(X, { size: 20 })
37549
37770
  }
37550
37771
  )
37551
37772
  ]
37552
37773
  }
37553
37774
  ),
37554
- showNav && currentIndex > 0 && /* @__PURE__ */ jsx24(
37775
+ showNav && currentIndex > 0 && /* @__PURE__ */ jsx25(
37555
37776
  "button",
37556
37777
  {
37557
37778
  type: "button",
@@ -37560,10 +37781,10 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37560
37781
  goPrev();
37561
37782
  },
37562
37783
  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",
37563
- children: /* @__PURE__ */ jsx24(ChevronLeft, { size: 24 })
37784
+ children: /* @__PURE__ */ jsx25(ChevronLeft, { size: 24 })
37564
37785
  }
37565
37786
  ),
37566
- showNav && currentIndex < images.length - 1 && /* @__PURE__ */ jsx24(
37787
+ showNav && currentIndex < images.length - 1 && /* @__PURE__ */ jsx25(
37567
37788
  "button",
37568
37789
  {
37569
37790
  type: "button",
@@ -37572,43 +37793,43 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37572
37793
  goNext();
37573
37794
  },
37574
37795
  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",
37575
- children: /* @__PURE__ */ jsx24(ChevronRight, { size: 24 })
37796
+ children: /* @__PURE__ */ jsx25(ChevronRight, { size: 24 })
37576
37797
  }
37577
37798
  ),
37578
37799
  /* @__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: [
37579
- /* @__PURE__ */ jsx24(
37800
+ /* @__PURE__ */ jsx25(
37580
37801
  "button",
37581
37802
  {
37582
37803
  type: "button",
37583
37804
  onClick: zoomOut,
37584
37805
  className: "rounded-full p-1.5 text-white/80 transition-colors hover:bg-white/10 hover:text-white",
37585
- children: /* @__PURE__ */ jsx24(Minus, { size: 16 })
37806
+ children: /* @__PURE__ */ jsx25(Minus, { size: 16 })
37586
37807
  }
37587
37808
  ),
37588
37809
  /* @__PURE__ */ jsxs19("span", { className: "min-w-[3rem] text-center text-xs text-white/80", children: [
37589
37810
  Math.round(scale * 100),
37590
37811
  "%"
37591
37812
  ] }),
37592
- /* @__PURE__ */ jsx24(
37813
+ /* @__PURE__ */ jsx25(
37593
37814
  "button",
37594
37815
  {
37595
37816
  type: "button",
37596
37817
  onClick: zoomIn,
37597
37818
  className: "rounded-full p-1.5 text-white/80 transition-colors hover:bg-white/10 hover:text-white",
37598
- children: /* @__PURE__ */ jsx24(Plus, { size: 16 })
37819
+ children: /* @__PURE__ */ jsx25(Plus, { size: 16 })
37599
37820
  }
37600
37821
  ),
37601
- /* @__PURE__ */ jsx24(
37822
+ /* @__PURE__ */ jsx25(
37602
37823
  "button",
37603
37824
  {
37604
37825
  type: "button",
37605
37826
  onClick: reset,
37606
37827
  className: "rounded-full p-1.5 text-white/80 transition-colors hover:bg-white/10 hover:text-white",
37607
- children: /* @__PURE__ */ jsx24(RotateCcw, { size: 16 })
37828
+ children: /* @__PURE__ */ jsx25(RotateCcw, { size: 16 })
37608
37829
  }
37609
37830
  ),
37610
37831
  showNav && /* @__PURE__ */ jsxs19(Fragment10, { children: [
37611
- /* @__PURE__ */ jsx24("div", { className: "mx-1 h-4 w-px bg-white/20" }),
37832
+ /* @__PURE__ */ jsx25("div", { className: "mx-1 h-4 w-px bg-white/20" }),
37612
37833
  /* @__PURE__ */ jsxs19("span", { className: "min-w-[3rem] text-center text-xs text-white/80", children: [
37613
37834
  currentIndex + 1,
37614
37835
  " / ",
@@ -37616,7 +37837,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37616
37837
  ] })
37617
37838
  ] })
37618
37839
  ] }),
37619
- /* @__PURE__ */ jsx24(
37840
+ /* @__PURE__ */ jsx25(
37620
37841
  "div",
37621
37842
  {
37622
37843
  className: "flex h-full w-full items-center justify-center overflow-hidden p-12",
@@ -37627,7 +37848,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37627
37848
  onMouseUp: handleMouseUp,
37628
37849
  onMouseLeave: handleMouseUp,
37629
37850
  onDoubleClick: handleDoubleClick,
37630
- children: /* @__PURE__ */ jsx24(
37851
+ children: /* @__PURE__ */ jsx25(
37631
37852
  MessageImage,
37632
37853
  {
37633
37854
  original: true,
@@ -37653,7 +37874,7 @@ function ImageLightbox({ open: open2, onOpenChange, images, initialIndex = 0 })
37653
37874
  }
37654
37875
 
37655
37876
  // src/chat/tool-renderers/FileReadRenderer.tsx
37656
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
37877
+ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
37657
37878
  var NUMBERED_LINE_RE = /^(\s*\d+)\t([\s\S]*)$/;
37658
37879
  function parseReadResult(result) {
37659
37880
  if (!result) {
@@ -37699,7 +37920,7 @@ function formatLineRange(startLine, endLine) {
37699
37920
  function FileReadRenderer({ toolCall }) {
37700
37921
  const [lightboxIndex, setLightboxIndex] = useState16(null);
37701
37922
  const argsValue = parseJsonValue(toolCall.arguments);
37702
- const args = isPlainObject(argsValue) ? argsValue : null;
37923
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37703
37924
  const filePath = extractToolFilePath(toolCall);
37704
37925
  const fileName = getFileName(filePath);
37705
37926
  const displayName = filePath ? formatToolFileName(filePath) : fileName;
@@ -37718,25 +37939,25 @@ function FileReadRenderer({ toolCall }) {
37718
37939
  return /* @__PURE__ */ jsxs20("div", { className: "space-y-3", children: [
37719
37940
  /* @__PURE__ */ jsxs20("div", { className: "flex items-start justify-between gap-3", children: [
37720
37941
  /* @__PURE__ */ jsxs20("div", { className: "min-w-0", children: [
37721
- /* @__PURE__ */ jsx25("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: displayName }),
37722
- filePath ? /* @__PURE__ */ jsx25("div", { className: "truncate text-[10px] text-[hsl(var(--muted-foreground))]", children: filePath }) : null
37942
+ /* @__PURE__ */ jsx26("div", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: displayName }),
37943
+ filePath ? /* @__PURE__ */ jsx26("div", { className: "truncate text-[10px] text-[hsl(var(--muted-foreground))]", children: filePath }) : null
37723
37944
  ] }),
37724
37945
  /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center justify-end gap-1.5", children: [
37725
- 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,
37726
- 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
37946
+ 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,
37947
+ 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
37727
37948
  ] })
37728
37949
  ] }),
37729
- 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,
37730
- 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,
37950
+ 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,
37951
+ 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,
37731
37952
  isImageResult ? /* @__PURE__ */ jsxs20("div", { className: "grid gap-2", children: [
37732
- imageUrls.map((url2, idx) => /* @__PURE__ */ jsx25(
37953
+ imageUrls.map((url2, idx) => /* @__PURE__ */ jsx26(
37733
37954
  "button",
37734
37955
  {
37735
37956
  type: "button",
37736
37957
  onClick: () => setLightboxIndex(idx),
37737
37958
  className: "cursor-zoom-in",
37738
37959
  title: "\u67E5\u770B\u5927\u56FE",
37739
- children: /* @__PURE__ */ jsx25(
37960
+ children: /* @__PURE__ */ jsx26(
37740
37961
  MessageImage,
37741
37962
  {
37742
37963
  src: url2,
@@ -37749,7 +37970,7 @@ function FileReadRenderer({ toolCall }) {
37749
37970
  },
37750
37971
  url2.slice(0, 64)
37751
37972
  )),
37752
- /* @__PURE__ */ jsx25(
37973
+ /* @__PURE__ */ jsx26(
37753
37974
  ImageLightbox,
37754
37975
  {
37755
37976
  open: lightboxIndex != null,
@@ -37760,86 +37981,16 @@ function FileReadRenderer({ toolCall }) {
37760
37981
  initialIndex: lightboxIndex ?? 0
37761
37982
  }
37762
37983
  ),
37763
- content3 ? /* @__PURE__ */ jsx25("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: content3 }) : null
37764
- ] }) : !errorMessage ? /* @__PURE__ */ jsx25(CodePreview, { content: content3, filePath, className: "max-h-[360px]" }) : null,
37765
- 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
37766
- ] });
37767
- }
37768
-
37769
- // src/chat/tool-renderers/KbSearchRenderer.tsx
37770
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
37771
- function KbSearchRenderer({ toolCall }) {
37772
- const resultStr = getResultText(toolCall.result);
37773
- const errorMessage = extractErrorMessage(resultStr);
37774
- if (errorMessage) {
37775
- 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 });
37776
- }
37777
- const argsValue = parseJsonValue(toolCall.arguments);
37778
- const args = isPlainObject(argsValue) ? argsValue : null;
37779
- const parsed = parseKbSearchResult(toolCall.result);
37780
- const query = parsed?.query ?? getStringValue(args, "query");
37781
- return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
37782
- query ? /* @__PURE__ */ jsxs21("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37783
- "\u68C0\u7D22\uFF1A",
37784
- query
37785
- ] }) : null,
37786
- parsed && parsed.hits.length > 0 ? /* @__PURE__ */ jsx26("div", { className: "grid gap-2", children: parsed.hits.map((hit) => /* @__PURE__ */ jsx26(
37787
- "div",
37788
- {
37789
- className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-2",
37790
- children: /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2", children: [
37791
- /* @__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: [
37792
- "[",
37793
- hit.n,
37794
- "]"
37795
- ] }),
37796
- /* @__PURE__ */ jsxs21("div", { className: "min-w-0 flex-1", children: [
37797
- /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2", children: [
37798
- /* @__PURE__ */ jsx26(BookOpen, { size: 13, className: "mt-0.5 shrink-0 text-[hsl(var(--muted-foreground))]" }),
37799
- hit.previewUrl ? /* @__PURE__ */ jsxs21(
37800
- "a",
37801
- {
37802
- href: hit.previewUrl,
37803
- target: "_blank",
37804
- rel: "noreferrer",
37805
- className: cn(
37806
- "inline-flex min-w-0 items-center gap-1 text-[11px] font-medium",
37807
- "text-[hsl(var(--swf-link-text))] hover:underline"
37808
- ),
37809
- title: "\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00\u539F\u6587",
37810
- children: [
37811
- /* @__PURE__ */ jsx26("span", { className: "truncate", children: hit.title }),
37812
- /* @__PURE__ */ jsx26(ExternalLink, { size: 11, className: "shrink-0" })
37813
- ]
37814
- }
37815
- ) : /* @__PURE__ */ jsx26("span", { className: "truncate text-[11px] font-medium text-[hsl(var(--foreground))]", children: hit.title })
37816
- ] }),
37817
- /* @__PURE__ */ jsxs21("div", { className: "mt-0.5 flex flex-wrap gap-x-2 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
37818
- hit.kbName ? /* @__PURE__ */ jsxs21("span", { children: [
37819
- "\u300A",
37820
- hit.kbName,
37821
- "\u300B"
37822
- ] }) : null,
37823
- hit.page !== null ? /* @__PURE__ */ jsxs21("span", { children: [
37824
- "\u7B2C ",
37825
- hit.page,
37826
- " \u9875"
37827
- ] }) : null,
37828
- hit.heading ? /* @__PURE__ */ jsx26("span", { className: "truncate", children: hit.heading }) : null
37829
- ] }),
37830
- 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
37831
- ] })
37832
- ] })
37833
- },
37834
- `${hit.n}-${hit.path}-${hit.page ?? ""}`
37835
- )) }) : /* @__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" })
37984
+ content3 ? /* @__PURE__ */ jsx26("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: content3 }) : null
37985
+ ] }) : !errorMessage ? /* @__PURE__ */ jsx26(CodePreview, { content: content3, filePath, className: "max-h-[360px]" }) : null,
37986
+ 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
37836
37987
  ] });
37837
37988
  }
37838
37989
 
37839
37990
  // src/chat/tool-renderers/SearchRenderer.tsx
37840
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
37991
+ import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
37841
37992
  function toRecordArray(value) {
37842
- return Array.isArray(value) ? value.filter(isPlainObject) : [];
37993
+ return Array.isArray(value) ? value.filter(isPlainObject3) : [];
37843
37994
  }
37844
37995
  function parseDirectoryItems(result) {
37845
37996
  const value = parseJsonValue(result);
@@ -37854,7 +38005,7 @@ function parseDirectoryItems(result) {
37854
38005
  size: null
37855
38006
  };
37856
38007
  }
37857
- if (!isPlainObject(item)) {
38008
+ if (!isPlainObject3(item)) {
37858
38009
  return null;
37859
38010
  }
37860
38011
  return {
@@ -37879,7 +38030,7 @@ function parseGrepResult(result) {
37879
38030
  }
37880
38031
  function parseWebResults(result) {
37881
38032
  const value = parseJsonValue(result);
37882
- const items = isPlainObject(value) ? toRecordArray(value.results) : toRecordArray(value);
38033
+ const items = isPlainObject3(value) ? toRecordArray(value.results) : toRecordArray(value);
37883
38034
  return items.map((item) => ({
37884
38035
  // text 是当前字段;description 只为读旧会话保留,那时的结果没有正文片段。
37885
38036
  description: typeof item.text === "string" ? item.text : typeof item.description === "string" ? item.description : null,
@@ -37894,7 +38045,7 @@ function renderEmptyState(label) {
37894
38045
  function SearchRenderer({ toolCall }) {
37895
38046
  const normalizedName = formatToolName(toolCall.name);
37896
38047
  const argsValue = parseJsonValue(toolCall.arguments);
37897
- const args = isPlainObject(argsValue) ? argsValue : null;
38048
+ const args = isPlainObject3(argsValue) ? argsValue : null;
37898
38049
  const resultStr = getResultText(toolCall.result);
37899
38050
  const errorMessage = extractErrorMessage(resultStr);
37900
38051
  if (errorMessage) {
@@ -37903,17 +38054,17 @@ function SearchRenderer({ toolCall }) {
37903
38054
  if (normalizedName === "Ls" || normalizedName === "Glob") {
37904
38055
  const items = parseDirectoryItems(resultStr);
37905
38056
  const path2 = getStringValue(args, "path");
37906
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37907
- path2 ? /* @__PURE__ */ jsxs22("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38057
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38058
+ path2 ? /* @__PURE__ */ jsxs21("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37908
38059
  "\u76EE\u5F55\uFF1A",
37909
38060
  path2
37910
38061
  ] }) : null,
37911
- items.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: items.map((item) => /* @__PURE__ */ jsxs22(
38062
+ items.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: items.map((item) => /* @__PURE__ */ jsxs21(
37912
38063
  "div",
37913
38064
  {
37914
38065
  className: "flex items-center justify-between gap-3 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-2",
37915
38066
  children: [
37916
- /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 items-center gap-2", children: [
38067
+ /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 items-center gap-2", children: [
37917
38068
  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))]" }),
37918
38069
  /* @__PURE__ */ jsx27("span", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: item.name })
37919
38070
  ] }),
@@ -37927,22 +38078,22 @@ function SearchRenderer({ toolCall }) {
37927
38078
  if (normalizedName === "Grep") {
37928
38079
  const { matches, searchPath } = parseGrepResult(resultStr);
37929
38080
  const pattern = getStringValue(args, "pattern");
37930
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37931
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-center gap-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38081
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38082
+ /* @__PURE__ */ jsxs21("div", { className: "flex flex-wrap items-center gap-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37932
38083
  pattern ? /* @__PURE__ */ jsx27("span", { className: "rounded-full bg-[hsl(var(--muted))] px-2 py-0.5 font-mono", children: pattern }) : null,
37933
- searchPath ? /* @__PURE__ */ jsxs22("span", { children: [
38084
+ searchPath ? /* @__PURE__ */ jsxs21("span", { children: [
37934
38085
  "\u8303\u56F4\uFF1A",
37935
38086
  searchPath
37936
38087
  ] }) : null
37937
38088
  ] }),
37938
- matches.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: matches.map((match) => /* @__PURE__ */ jsxs22(
38089
+ matches.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "grid gap-2", children: matches.map((match) => /* @__PURE__ */ jsxs21(
37939
38090
  "div",
37940
38091
  {
37941
38092
  className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-2",
37942
38093
  children: [
37943
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between gap-3", children: [
38094
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between gap-3", children: [
37944
38095
  /* @__PURE__ */ jsx27("span", { className: "truncate font-mono text-[11px] text-[hsl(var(--foreground))]", children: match.path }),
37945
- match.lineNumber !== null ? /* @__PURE__ */ jsxs22("span", { className: "shrink-0 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38096
+ match.lineNumber !== null ? /* @__PURE__ */ jsxs21("span", { className: "shrink-0 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
37946
38097
  "\u7B2C ",
37947
38098
  match.lineNumber,
37948
38099
  " \u884C"
@@ -37958,8 +38109,8 @@ function SearchRenderer({ toolCall }) {
37958
38109
  if (normalizedName === "WebFetch") {
37959
38110
  const url2 = getStringValue(args, "url");
37960
38111
  const text4 = resultStr?.trim();
37961
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37962
- url2 ? /* @__PURE__ */ jsxs22(
38112
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38113
+ url2 ? /* @__PURE__ */ jsxs21(
37963
38114
  "a",
37964
38115
  {
37965
38116
  href: url2,
@@ -37978,8 +38129,8 @@ function SearchRenderer({ toolCall }) {
37978
38129
  }
37979
38130
  const results = parseWebResults(resultStr);
37980
38131
  const query = getStringValue(args, "query");
37981
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-3", children: [
37982
- query ? /* @__PURE__ */ jsxs22("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
38132
+ return /* @__PURE__ */ jsxs21("div", { className: "space-y-3", children: [
38133
+ query ? /* @__PURE__ */ jsxs21("div", { className: "text-[11px] text-[hsl(var(--muted-foreground))]", children: [
37983
38134
  "\u67E5\u8BE2\uFF1A",
37984
38135
  query
37985
38136
  ] }) : null,
@@ -37993,10 +38144,10 @@ function SearchRenderer({ toolCall }) {
37993
38144
  "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--muted))]/20 px-3 py-3 transition-colors",
37994
38145
  item.url && "hover:border-[hsl(var(--ring))] hover:bg-[hsl(var(--muted))]/35"
37995
38146
  ),
37996
- children: /* @__PURE__ */ jsxs22("div", { className: "flex items-start gap-3", children: [
38147
+ children: /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-3", children: [
37997
38148
  /* @__PURE__ */ jsx27(Earth, { size: 16, className: "mt-0.5 shrink-0 text-[hsl(var(--muted-foreground))]" }),
37998
- /* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
37999
- /* @__PURE__ */ jsxs22("div", { className: "flex items-start justify-between gap-3", children: [
38149
+ /* @__PURE__ */ jsxs21("div", { className: "min-w-0 flex-1", children: [
38150
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-start justify-between gap-3", children: [
38000
38151
  /* @__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" }),
38001
38152
  item.url ? /* @__PURE__ */ jsx27(
38002
38153
  ExternalLink,
@@ -38007,7 +38158,7 @@ function SearchRenderer({ toolCall }) {
38007
38158
  ) : null
38008
38159
  ] }),
38009
38160
  item.url ? /* @__PURE__ */ jsx27("div", { className: "mt-1 truncate font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: item.url }) : null,
38010
- item.publishedDate ? /* @__PURE__ */ jsxs22("div", { className: "mt-1 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38161
+ item.publishedDate ? /* @__PURE__ */ jsxs21("div", { className: "mt-1 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
38011
38162
  "\u53D1\u5E03\u4E8E ",
38012
38163
  item.publishedDate.slice(0, 10)
38013
38164
  ] }) : null,
@@ -38021,9 +38172,9 @@ function SearchRenderer({ toolCall }) {
38021
38172
  }
38022
38173
 
38023
38174
  // src/chat/tool-renderers/SubmitResultRenderer.tsx
38024
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
38175
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
38025
38176
  function extractText2(value, key) {
38026
- if (!isPlainObject(value)) return null;
38177
+ if (!isPlainObject3(value)) return null;
38027
38178
  const field = value[key];
38028
38179
  return typeof field === "string" && field.trim() ? field.trim() : null;
38029
38180
  }
@@ -38031,7 +38182,7 @@ function parsePayload(toolCall) {
38031
38182
  const resultText2 = getResultText(toolCall.result);
38032
38183
  const parsedResult = parseJsonValue(resultText2);
38033
38184
  const parsedArgs = parseJsonValue(toolCall.arguments);
38034
- const source = isPlainObject(parsedResult) ? parsedResult : parsedArgs;
38185
+ const source = isPlainObject3(parsedResult) ? parsedResult : parsedArgs;
38035
38186
  const description = extractText2(source, "description");
38036
38187
  const result = extractText2(source, "result") ?? (typeof resultText2 === "string" ? resultText2.trim() : null);
38037
38188
  const error61 = extractText2(source, "err_msg") ?? extractText2(source, "error");
@@ -38042,21 +38193,21 @@ function SubmitResultRenderer({ toolCall }) {
38042
38193
  const { description, result, error: error61, status } = parsePayload(toolCall);
38043
38194
  const isError = toolCall.status === "error" || Boolean(error61);
38044
38195
  const Icon = isError ? CircleAlert : CircleCheck;
38045
- return /* @__PURE__ */ jsxs23("div", { className: "overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
38046
- /* @__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: [
38196
+ return /* @__PURE__ */ jsxs22("div", { className: "overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
38197
+ /* @__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: [
38047
38198
  /* @__PURE__ */ jsx28("div", { className: isError ? "text-[hsl(var(--swf-danger))]" : "text-[hsl(var(--swf-success))]", children: /* @__PURE__ */ jsx28(Icon, { size: 18 }) }),
38048
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0 flex-1", children: [
38199
+ /* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
38049
38200
  /* @__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") }),
38050
38201
  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,
38051
- status ? /* @__PURE__ */ jsxs23("div", { className: "mt-0.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
38202
+ status ? /* @__PURE__ */ jsxs22("div", { className: "mt-0.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
38052
38203
  "\u72B6\u6001\uFF1A",
38053
38204
  status
38054
38205
  ] }) : null
38055
38206
  ] })
38056
38207
  ] }),
38057
- /* @__PURE__ */ jsxs23("div", { className: "space-y-3 px-4 py-4 text-sm leading-6 text-[hsl(var(--foreground))]", children: [
38208
+ /* @__PURE__ */ jsxs22("div", { className: "space-y-3 px-4 py-4 text-sm leading-6 text-[hsl(var(--foreground))]", children: [
38058
38209
  result ? /* @__PURE__ */ jsx28("p", { className: "whitespace-pre-wrap", children: result }) : null,
38059
- 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: [
38210
+ 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: [
38060
38211
  /* @__PURE__ */ jsx28("div", { className: "mb-1 font-medium", children: "\u9519\u8BEF\u4FE1\u606F" }),
38061
38212
  /* @__PURE__ */ jsx28("div", { className: "whitespace-pre-wrap", children: error61 })
38062
38213
  ] }) : null,
@@ -38072,7 +38223,6 @@ var RENDERERS = /* @__PURE__ */ new Map([
38072
38223
  ["Edit", FileEditRenderer],
38073
38224
  ["MultiEdit", FileEditRenderer],
38074
38225
  ["Grep", SearchRenderer],
38075
- ["KbSearch", KbSearchRenderer],
38076
38226
  ["Glob", SearchRenderer],
38077
38227
  ["Ls", SearchRenderer],
38078
38228
  ["Read", FileReadRenderer],
@@ -38086,7 +38236,7 @@ function getRenderer(toolName) {
38086
38236
  }
38087
38237
 
38088
38238
  // src/chat/ToolCallBlock.tsx
38089
- import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
38239
+ import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
38090
38240
  function getFilePreviewName(filePath) {
38091
38241
  return filePath.split(/[\\/]/).pop() ?? filePath;
38092
38242
  }
@@ -38149,7 +38299,7 @@ function ToolPreviewAction({
38149
38299
  return null;
38150
38300
  }
38151
38301
  const label = uiMeta.title ?? displayName;
38152
- return /* @__PURE__ */ jsxs24(
38302
+ return /* @__PURE__ */ jsxs23(
38153
38303
  "button",
38154
38304
  {
38155
38305
  type: "button",
@@ -38257,20 +38407,20 @@ function ToolCallBlock({
38257
38407
  if (!reasoning) {
38258
38408
  return questionBlock;
38259
38409
  }
38260
- return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
38410
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1", children: [
38261
38411
  questionBlock,
38262
38412
  /* @__PURE__ */ jsx29("div", { className: "ml-4", children: /* @__PURE__ */ jsx29(ThinkingBadge, { reasoning, variant: "block" }) })
38263
38413
  ] });
38264
38414
  }
38265
38415
  if (toolCall.status === "pending") {
38266
- 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: [
38416
+ 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: [
38267
38417
  /* @__PURE__ */ jsx29(LoaderCircle, { size: 14, className: "animate-spin" }),
38268
38418
  /* @__PURE__ */ jsx29("span", { children: "\u6B63\u5728\u51C6\u5907\u95EE\u9898\u2026" })
38269
38419
  ] });
38270
38420
  }
38271
- 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: [
38421
+ 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: [
38272
38422
  /* @__PURE__ */ jsx29("div", { className: "font-semibold", children: "\u9009\u62E9\u9898\u5185\u5BB9\u6682\u65F6\u65E0\u6CD5\u663E\u793A" }),
38273
- /* @__PURE__ */ jsxs24("div", { className: "mt-1 text-xs leading-5 text-[hsl(var(--muted-foreground))]", children: [
38423
+ /* @__PURE__ */ jsxs23("div", { className: "mt-1 text-xs leading-5 text-[hsl(var(--muted-foreground))]", children: [
38274
38424
  "\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",
38275
38425
  /* @__PURE__ */ jsx29("span", { className: "ml-1 font-mono", children: toolCall.id }),
38276
38426
  "\u3002"
@@ -38285,7 +38435,7 @@ function ToolCallBlock({
38285
38435
  const indentClass = level === 2 ? "ml-3" : "";
38286
38436
  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 });
38287
38437
  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))]";
38288
- return /* @__PURE__ */ jsxs24(
38438
+ return /* @__PURE__ */ jsxs23(
38289
38439
  "div",
38290
38440
  {
38291
38441
  part: normalizedName === "Agent" ? "agent-loop" : "tool-row",
@@ -38296,8 +38446,8 @@ function ToolCallBlock({
38296
38446
  customization?.classNames?.toolCall
38297
38447
  ),
38298
38448
  children: [
38299
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 min-h-7 pr-3 leading-5", children: [
38300
- /* @__PURE__ */ jsxs24(
38449
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 min-h-7 pr-3 leading-5", children: [
38450
+ /* @__PURE__ */ jsxs23(
38301
38451
  "button",
38302
38452
  {
38303
38453
  type: "button",
@@ -38315,11 +38465,11 @@ function ToolCallBlock({
38315
38465
  )
38316
38466
  }
38317
38467
  ),
38318
- /* @__PURE__ */ jsxs24("span", { className: cn("flex shrink-0 items-center gap-1 text-[10px]", statusTextClass), children: [
38468
+ /* @__PURE__ */ jsxs23("span", { className: cn("flex shrink-0 items-center gap-1 text-[10px]", statusTextClass), children: [
38319
38469
  statusIcon,
38320
38470
  /* @__PURE__ */ jsx29("span", { children: getToolStatusLabel(toolCall.status) })
38321
38471
  ] }),
38322
- /* @__PURE__ */ jsxs24("span", { className: "min-w-0 flex-1 truncate font-medium text-[hsl(var(--foreground))]", children: [
38472
+ /* @__PURE__ */ jsxs23("span", { className: "min-w-0 flex-1 truncate font-medium text-[hsl(var(--foreground))]", children: [
38323
38473
  displayName,
38324
38474
  toolCall.status === "error" ? "\uFF08\u5F85\u91CD\u8BD5\uFF09" : ""
38325
38475
  ] })
@@ -38337,12 +38487,12 @@ function ToolCallBlock({
38337
38487
  }
38338
38488
  )
38339
38489
  ] }),
38340
- 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: [
38490
+ 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: [
38341
38491
  /* @__PURE__ */ jsx29("div", { className: "mb-1 text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u5DE5\u5177" }),
38342
38492
  /* @__PURE__ */ jsx29("div", { className: "mb-3 font-mono text-[11px] text-[hsl(var(--foreground))]", children: normalizedName }),
38343
38493
  /* @__PURE__ */ jsx29("div", { className: "mb-1 text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u53C2\u6570" }),
38344
38494
  /* @__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) }),
38345
- toolCall.result != null && /* @__PURE__ */ jsxs24(Fragment11, { children: [
38495
+ toolCall.result != null && /* @__PURE__ */ jsxs23(Fragment11, { children: [
38346
38496
  /* @__PURE__ */ jsx29("div", { className: "mb-1 mt-3 text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u7ED3\u679C" }),
38347
38497
  /* @__PURE__ */ jsx29(
38348
38498
  "pre",
@@ -38513,7 +38663,7 @@ function useAsyncValue(key, load2) {
38513
38663
  }
38514
38664
 
38515
38665
  // src/chat/AttachmentPreviewDialog.tsx
38516
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
38666
+ import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
38517
38667
  function AttachmentPreviewDialog({ open: open2, onOpenChange, filename, url: url2, mode }) {
38518
38668
  const enabled = open2 && url2 != null && (mode === "markdown" || mode === "text");
38519
38669
  const { data: content3, error: error61 } = useAsyncValue(enabled ? `${mode}:${url2}` : null, async (signal) => {
@@ -38529,15 +38679,15 @@ function AttachmentPreviewDialog({ open: open2, onOpenChange, filename, url: url
38529
38679
  return res.text();
38530
38680
  });
38531
38681
  if (!open2) return null;
38532
- return /* @__PURE__ */ jsx30(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxs25(
38682
+ return /* @__PURE__ */ jsx30(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxs24(
38533
38683
  DialogContent,
38534
38684
  {
38535
38685
  showCloseButton: false,
38536
38686
  className: "flex max-h-[90vh] w-full max-w-3xl flex-col gap-0 overflow-hidden p-0",
38537
38687
  children: [
38538
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
38688
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
38539
38689
  /* @__PURE__ */ jsx30(DialogTitle, { className: "truncate text-sm font-semibold text-[hsl(var(--foreground))]", children: filename }),
38540
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
38690
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
38541
38691
  url2 && /* @__PURE__ */ jsx30(
38542
38692
  "a",
38543
38693
  {
@@ -38575,14 +38725,14 @@ function renderContent({
38575
38725
  return /* @__PURE__ */ jsx30("p", { className: "text-[hsl(var(--muted-foreground))]", children: "\u6B64\u9644\u4EF6\u6682\u65E0\u53EF\u7528\u9884\u89C8\u5730\u5740\u3002" });
38576
38726
  }
38577
38727
  if (mode === "default") {
38578
- return /* @__PURE__ */ jsxs25("p", { className: "text-[hsl(var(--muted-foreground))]", children: [
38728
+ return /* @__PURE__ */ jsxs24("p", { className: "text-[hsl(var(--muted-foreground))]", children: [
38579
38729
  "\u6B64\u7C7B\u578B\u6682\u4E0D\u652F\u6301\u5185\u5D4C\u9884\u89C8\u3002\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2",
38580
38730
  /* @__PURE__ */ jsx30("span", { className: "mx-1 font-medium text-[hsl(var(--foreground))]", children: "\u4E0B\u8F7D" }),
38581
38731
  "\u6309\u94AE\u67E5\u770B\u3002"
38582
38732
  ] });
38583
38733
  }
38584
38734
  if (error61) {
38585
- return /* @__PURE__ */ jsxs25("p", { className: "text-[hsl(var(--destructive))]", children: [
38735
+ return /* @__PURE__ */ jsxs24("p", { className: "text-[hsl(var(--destructive))]", children: [
38586
38736
  "\u52A0\u8F7D\u5931\u8D25\uFF1A",
38587
38737
  String(error61?.message ?? error61)
38588
38738
  ] });
@@ -38597,10 +38747,10 @@ function renderContent({
38597
38747
  }
38598
38748
 
38599
38749
  // src/chat/MessageContextPills.tsx
38600
- import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
38750
+ import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
38601
38751
  function MessageContextPills({ contexts }) {
38602
38752
  if (contexts.length === 0) return null;
38603
- return /* @__PURE__ */ jsx31("div", { className: "flex flex-wrap gap-1.5", children: contexts.map((ctx, index2) => /* @__PURE__ */ jsxs26(
38753
+ return /* @__PURE__ */ jsx31("div", { className: "flex flex-wrap gap-1.5", children: contexts.map((ctx, index2) => /* @__PURE__ */ jsxs25(
38604
38754
  "div",
38605
38755
  {
38606
38756
  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)]",
@@ -38615,7 +38765,7 @@ function MessageContextPills({ contexts }) {
38615
38765
  }
38616
38766
 
38617
38767
  // src/chat/TextAttachmentPills.tsx
38618
- import { Fragment as Fragment12, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
38768
+ import { Fragment as Fragment12, jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
38619
38769
  function getFileIcon2(fileName) {
38620
38770
  const lower2 = fileName.toLowerCase();
38621
38771
  if (/\.(zip|rar|7z|tar|gz)$/.test(lower2)) return Archive;
@@ -38633,7 +38783,7 @@ function TextAttachmentPills({ attachments, onPreview }) {
38633
38783
  return /* @__PURE__ */ jsx32("div", { className: "flex flex-wrap gap-1.5", children: attachments.map((att, index2) => {
38634
38784
  const Icon = getFileIcon2(att.name);
38635
38785
  const key = `${att.uploadedPath ?? att.name}:${att.name}:${index2}`;
38636
- const content3 = /* @__PURE__ */ jsxs27(Fragment12, { children: [
38786
+ const content3 = /* @__PURE__ */ jsxs26(Fragment12, { children: [
38637
38787
  /* @__PURE__ */ jsx32(Icon, { size: 12, className: "shrink-0 text-[hsl(var(--primary)/0.6)]" }),
38638
38788
  /* @__PURE__ */ jsx32("span", { className: "max-w-40 truncate", children: att.name })
38639
38789
  ] });
@@ -38655,19 +38805,19 @@ function TextAttachmentPills({ attachments, onPreview }) {
38655
38805
  }
38656
38806
 
38657
38807
  // src/components/WhatIfUserBubble.tsx
38658
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
38808
+ import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
38659
38809
  function WhatIfUserBubble({ parsed, onQuoteClick }) {
38660
38810
  const { fromStep, quotes, userText } = parsed;
38661
- return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-end gap-2", children: [
38662
- /* @__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: [
38811
+ return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-end gap-2", children: [
38812
+ /* @__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: [
38663
38813
  /* @__PURE__ */ jsx33(RefreshCcw, { size: 10 }),
38664
38814
  /* @__PURE__ */ jsx33("span", { children: fromStep != null ? `\u91CD\u8DD1\u81EA step ${fromStep}` : "\u91CD\u8DD1" })
38665
38815
  ] }),
38666
38816
  quotes.length > 0 && /* @__PURE__ */ jsx33("div", { className: "flex max-w-[min(72vw,42rem)] flex-col items-stretch gap-2", children: quotes.map((quote, index2) => {
38667
38817
  const clickable = quote.stepNumber != null && !!onQuoteClick;
38668
38818
  const label = quote.stepNumber != null ? `\u6B65\u9AA4${quote.stepNumber} \xB7 ${quote.label}` : quote.label;
38669
- 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: [
38670
- /* @__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: [
38819
+ 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: [
38820
+ /* @__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: [
38671
38821
  /* @__PURE__ */ jsx33("span", { children: "\u21B3" }),
38672
38822
  /* @__PURE__ */ jsx33("span", { className: "truncate", children: label })
38673
38823
  ] }),
@@ -38679,7 +38829,7 @@ function WhatIfUserBubble({ parsed, onQuoteClick }) {
38679
38829
  }
38680
38830
 
38681
38831
  // src/chat/UserMessageBubble.tsx
38682
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
38832
+ import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
38683
38833
  function isUserMessage(message) {
38684
38834
  return message.role === "user";
38685
38835
  }
@@ -38729,13 +38879,15 @@ function UserMessageBubble({ message, className }) {
38729
38879
  contexts: textContexts
38730
38880
  } = extractTextAttachments(message.content);
38731
38881
  const trimmedClean = cleanText.trim();
38732
- 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__ */ jsxs29("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: [
38882
+ 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;
38883
+ 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: [
38733
38884
  "\u4E3B\u9898\u8D44\u4EA7 \xB7 ",
38734
38885
  ref.path
38735
38886
  ] }, `${ref.topic_id}:${ref.path}`)) }) : null;
38736
38887
  const whatifParsed = trimmedClean && imageParts.length === 0 && fileParts.length === 0 && textAttachments.length === 0 ? parseWhatIfPrompt(cleanText) : null;
38737
38888
  if (whatifParsed && customBubble == null) {
38738
- 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: [
38889
+ 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: [
38890
+ pluginPills,
38739
38891
  topicAssetPills,
38740
38892
  /* @__PURE__ */ jsx34(WhatIfUserBubble, { parsed: whatifParsed }),
38741
38893
  whatifParsed.userText && /* @__PURE__ */ jsx34(
@@ -38789,8 +38941,8 @@ function UserMessageBubble({ message, className }) {
38789
38941
  const mode = kind === "text" ? lower2.endsWith(".md") ? "markdown" : "text" : "default";
38790
38942
  setPreview({ filename: attachment.name, url: url2, mode });
38791
38943
  };
38792
- 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: [
38793
- (imageParts.length > 0 || imageTextAttachmentMeta.length > 0) && /* @__PURE__ */ jsxs29("div", { className: "grid gap-2", children: [
38944
+ 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: [
38945
+ (imageParts.length > 0 || imageTextAttachmentMeta.length > 0) && /* @__PURE__ */ jsxs28("div", { className: "grid gap-2", children: [
38794
38946
  imageParts.map((part, idx) => /* @__PURE__ */ jsx34(
38795
38947
  "button",
38796
38948
  {
@@ -38872,6 +39024,7 @@ function UserMessageBubble({ message, className }) {
38872
39024
  }
38873
39025
  ),
38874
39026
  /* @__PURE__ */ jsx34(MessageContextPills, { contexts: textContexts }),
39027
+ pluginPills,
38875
39028
  topicAssetPills,
38876
39029
  trimmedClean && // 原型:不对称圆角(指向发送侧的一角收窄),无边框、无内阴影。
38877
39030
  (customBubble != null ? customBubble : /* @__PURE__ */ jsx34(
@@ -38889,7 +39042,7 @@ function UserMessageBubble({ message, className }) {
38889
39042
  )
38890
39043
  }
38891
39044
  )),
38892
- 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: [
39045
+ 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: [
38893
39046
  /* @__PURE__ */ jsx34(LoaderCircle, { size: 12, className: "animate-spin", "aria-hidden": "true" }),
38894
39047
  /* @__PURE__ */ jsx34("span", { children: "\u53D1\u9001\u4E2D" })
38895
39048
  ] }) : /* @__PURE__ */ jsx34(
@@ -38907,7 +39060,7 @@ function ErrorMessageBlock({
38907
39060
  }) {
38908
39061
  const text4 = chatErrorForDisplay(getTextContent(message.content));
38909
39062
  const looksLikeModelUnavailable = /no source matches this model|404/i.test(text4);
38910
- 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: [
39063
+ 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: [
38911
39064
  text4,
38912
39065
  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
38913
39066
  ] }) });
@@ -38922,7 +39075,7 @@ function findLatestReasoningMessageIndex(messages) {
38922
39075
  }
38923
39076
 
38924
39077
  // src/chat/AgentLoopBlock.tsx
38925
- import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
39078
+ import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
38926
39079
  var COLLAPSED_SUMMARY_HIDDEN_TOOLS = /* @__PURE__ */ new Set(["ReadSkill", "Read"]);
38927
39080
  function safeParseDescription(argsStr) {
38928
39081
  try {
@@ -39025,7 +39178,7 @@ function AgentLoopBlock({
39025
39178
  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";
39026
39179
  const latestReasoningIndex = status === "running" ? findLatestReasoningMessageIndex(childMessages) : -1;
39027
39180
  const cardStyles = getLoopCardStyles(status);
39028
- return /* @__PURE__ */ jsxs30(
39181
+ return /* @__PURE__ */ jsxs29(
39029
39182
  "div",
39030
39183
  {
39031
39184
  part: "agent-loop",
@@ -39034,8 +39187,8 @@ function AgentLoopBlock({
39034
39187
  cardStyles.borderClass
39035
39188
  ),
39036
39189
  children: [
39037
- status === "running" || status === "awaiting_answer" ? /* @__PURE__ */ jsxs30(Fragment13, { children: [
39038
- /* @__PURE__ */ jsxs30(
39190
+ status === "running" || status === "awaiting_answer" ? /* @__PURE__ */ jsxs29(Fragment13, { children: [
39191
+ /* @__PURE__ */ jsxs29(
39039
39192
  "div",
39040
39193
  {
39041
39194
  className: cn(
@@ -39050,9 +39203,9 @@ function AgentLoopBlock({
39050
39203
  onClick: toggleExpanded,
39051
39204
  "aria-expanded": expanded,
39052
39205
  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",
39053
- children: /* @__PURE__ */ jsxs30("span", { className: "min-w-0 flex items-center gap-2", children: [
39206
+ children: /* @__PURE__ */ jsxs29("span", { className: "min-w-0 flex items-center gap-2", children: [
39054
39207
  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))]" }),
39055
- /* @__PURE__ */ jsxs30("span", { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: [
39208
+ /* @__PURE__ */ jsxs29("span", { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: [
39056
39209
  renderDescription ? renderDescription(description) : description,
39057
39210
  status === "awaiting_answer" ? " \u2014 \u7B49\u5F85\u56DE\u7B54" : ""
39058
39211
  ] })
@@ -39098,12 +39251,12 @@ function AgentLoopBlock({
39098
39251
  level: 2
39099
39252
  },
39100
39253
  childToolCall.id
39101
- )) : /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
39254
+ )) : /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
39102
39255
  /* @__PURE__ */ jsx35(LoaderCircle, { size: 12, className: "shrink-0 animate-spin text-[hsl(var(--muted-foreground))]" }),
39103
39256
  /* @__PURE__ */ jsx35("span", { children: "\u6B63\u5728\u542F\u52A8..." })
39104
39257
  ] }) }) : 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
39105
- ] }) : /* @__PURE__ */ jsxs30(Fragment13, { children: [
39106
- /* @__PURE__ */ jsxs30(
39258
+ ] }) : /* @__PURE__ */ jsxs29(Fragment13, { children: [
39259
+ /* @__PURE__ */ jsxs29(
39107
39260
  "div",
39108
39261
  {
39109
39262
  className: cn(
@@ -39118,7 +39271,7 @@ function AgentLoopBlock({
39118
39271
  onClick: toggleExpanded,
39119
39272
  "aria-expanded": expanded,
39120
39273
  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",
39121
- children: /* @__PURE__ */ jsxs30("span", { className: "min-w-0 flex items-center gap-2", children: [
39274
+ children: /* @__PURE__ */ jsxs29("span", { className: "min-w-0 flex items-center gap-2", children: [
39122
39275
  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))]" }),
39123
39276
  /* @__PURE__ */ jsx35("span", { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: renderDescription ? renderDescription(description) : description })
39124
39277
  ] })
@@ -39155,9 +39308,9 @@ function AgentLoopBlock({
39155
39308
  ]
39156
39309
  }
39157
39310
  ),
39158
- !expanded ? /* @__PURE__ */ jsxs30(Fragment13, { children: [
39311
+ !expanded ? /* @__PURE__ */ jsxs29(Fragment13, { children: [
39159
39312
  /* @__PURE__ */ jsx35("div", { className: "flex flex-wrap gap-1.5 px-4 py-2", children: completedToolLabels.length > 0 ? completedToolLabels.map(
39160
- (item) => item.kind === "file" ? /* @__PURE__ */ jsxs30(
39313
+ (item) => item.kind === "file" ? /* @__PURE__ */ jsxs29(
39161
39314
  "span",
39162
39315
  {
39163
39316
  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))]",
@@ -39180,10 +39333,10 @@ function AgentLoopBlock({
39180
39333
  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
39181
39334
  ] }) : null
39182
39335
  ] }),
39183
- expanded && /* @__PURE__ */ jsxs30("div", { className: "border-t border-[hsl(var(--border))] py-2", children: [
39336
+ expanded && /* @__PURE__ */ jsxs29("div", { className: "border-t border-[hsl(var(--border))] py-2", children: [
39184
39337
  (() => {
39185
39338
  const taskPrompt = safeParsePrompt(toolCall.arguments);
39186
- return taskPrompt ? /* @__PURE__ */ jsxs30("details", { className: "mx-3 mb-2 rounded-md bg-[hsl(var(--muted))]/40", children: [
39339
+ return taskPrompt ? /* @__PURE__ */ jsxs29("details", { className: "mx-3 mb-2 rounded-md bg-[hsl(var(--muted))]/40", children: [
39187
39340
  /* @__PURE__ */ jsx35("summary", { className: "cursor-pointer px-3 py-1.5 text-[11px] font-medium text-[hsl(var(--muted-foreground))]", children: "\u4EFB\u52A1" }),
39188
39341
  /* @__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 }) })
39189
39342
  ] }) : null;
@@ -39213,7 +39366,7 @@ function AgentLoopBlock({
39213
39366
  },
39214
39367
  message.entry_id ?? `${message.timestamp ?? "error"}-${index2}`
39215
39368
  ) : null
39216
- ) }) : status === "running" ? /* @__PURE__ */ jsxs30("div", { className: "px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
39369
+ ) }) : status === "running" ? /* @__PURE__ */ jsxs29("div", { className: "px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
39217
39370
  /* @__PURE__ */ jsx35(LoaderCircle, { size: 12, className: "mr-1.5 inline animate-spin" }),
39218
39371
  "\u6B63\u5728\u542F\u52A8..."
39219
39372
  ] }) : 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
@@ -39237,8 +39390,8 @@ function ExpandedChildAssistantMessage({
39237
39390
  (toolCall) => formatToolName(toolCall.name) !== "AskUserQuestion"
39238
39391
  ) : message.tool_calls ?? [];
39239
39392
  const hasToolCalls = toolCalls.length > 0;
39240
- return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-2", children: [
39241
- showReasoning && message.reasoning && /* @__PURE__ */ jsxs30(Reasoning, { isStreaming, children: [
39393
+ return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2", children: [
39394
+ showReasoning && message.reasoning && /* @__PURE__ */ jsxs29(Reasoning, { isStreaming, children: [
39242
39395
  /* @__PURE__ */ jsx35(ReasoningTrigger, { wordCount: message.reasoning.length }),
39243
39396
  /* @__PURE__ */ jsx35(ReasoningContent, { children: message.reasoning })
39244
39397
  ] }),
@@ -39284,7 +39437,7 @@ function ChildText({
39284
39437
  sessionId,
39285
39438
  reasoning
39286
39439
  }) {
39287
- return /* @__PURE__ */ jsxs30("div", { className: "pl-8 text-[12px] leading-6 text-[hsl(var(--foreground))]", children: [
39440
+ return /* @__PURE__ */ jsxs29("div", { className: "pl-8 text-[12px] leading-6 text-[hsl(var(--foreground))]", children: [
39288
39441
  /* @__PURE__ */ jsx35(
39289
39442
  MarkdownContent,
39290
39443
  {
@@ -39324,7 +39477,7 @@ function getLoopCardStyles(status) {
39324
39477
  }
39325
39478
 
39326
39479
  // src/chat/WorkflowRunBlock.tsx
39327
- import { Fragment as Fragment14, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
39480
+ import { Fragment as Fragment14, jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
39328
39481
  var EMPTY_ENTRIES = [];
39329
39482
  function synthToolCall(loopName, info, desc) {
39330
39483
  return {
@@ -39399,7 +39552,7 @@ function RefTokenText({ text: text4, refs }) {
39399
39552
  const id = match[1];
39400
39553
  const info = refs.get(id);
39401
39554
  parts.push(
39402
- /* @__PURE__ */ jsxs31(
39555
+ /* @__PURE__ */ jsxs30(
39403
39556
  "span",
39404
39557
  {
39405
39558
  title: info?.value ? info.value.slice(0, 300) : "\u5C1A\u65E0\u8F93\u51FA",
@@ -39474,8 +39627,8 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39474
39627
  const title = run?.name || "\u5DE5\u4F5C\u6D41";
39475
39628
  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`;
39476
39629
  const hasStepContent = groups.length > 0 || stepLoops.length > 0;
39477
- return /* @__PURE__ */ jsxs31("div", { className: "msg-animate overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]/50", children: [
39478
- /* @__PURE__ */ jsxs31(
39630
+ return /* @__PURE__ */ jsxs30("div", { className: "msg-animate overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]/50", children: [
39631
+ /* @__PURE__ */ jsxs30(
39479
39632
  "button",
39480
39633
  {
39481
39634
  type: "button",
@@ -39484,11 +39637,11 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39484
39637
  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",
39485
39638
  children: [
39486
39639
  /* @__PURE__ */ jsx36(Workflow, { size: 15, className: "shrink-0 text-[hsl(var(--primary))]" }),
39487
- /* @__PURE__ */ jsxs31("span", { className: "min-w-0 truncate text-sm font-semibold text-[hsl(var(--foreground))]", children: [
39640
+ /* @__PURE__ */ jsxs30("span", { className: "min-w-0 truncate text-sm font-semibold text-[hsl(var(--foreground))]", children: [
39488
39641
  "\u5DE5\u4F5C\u6D41\u8FD0\u884C \xB7 ",
39489
39642
  title
39490
39643
  ] }),
39491
- /* @__PURE__ */ jsxs31("span", { className: "ml-auto flex shrink-0 items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
39644
+ /* @__PURE__ */ jsxs30("span", { className: "ml-auto flex shrink-0 items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
39492
39645
  running ? /* @__PURE__ */ jsx36(LoaderCircle, { size: 12, className: "animate-spin" }) : null,
39493
39646
  statusSummary
39494
39647
  ] }),
@@ -39505,13 +39658,13 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39505
39658
  ]
39506
39659
  }
39507
39660
  ),
39508
- !collapsed && /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-2 p-3", children: [
39661
+ !collapsed && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-2 p-3", children: [
39509
39662
  /* @__PURE__ */ jsx36(LogLines, { logs: meaningfulLogs(prelude) }),
39510
39663
  groups.map((group, index2) => {
39511
39664
  const loop = groupLoops[index2];
39512
39665
  const logs = meaningfulLogs(group.logs);
39513
39666
  if (loop) {
39514
- return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1", children: [
39667
+ return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1", children: [
39515
39668
  /* @__PURE__ */ jsx36(
39516
39669
  AgentLoopBlock,
39517
39670
  {
@@ -39525,7 +39678,7 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39525
39678
  ] }, group.key);
39526
39679
  }
39527
39680
  if (logs.length === 0) return null;
39528
- return /* @__PURE__ */ jsxs31(
39681
+ return /* @__PURE__ */ jsxs30(
39529
39682
  "div",
39530
39683
  {
39531
39684
  className: "rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-3 py-2",
@@ -39548,7 +39701,7 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
39548
39701
  step.loopName
39549
39702
  )),
39550
39703
  (!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 }),
39551
- status === "done" && hasStepContent && finalOutput && /* @__PURE__ */ jsxs31("details", { className: "rounded-lg border border-[hsl(var(--border))] px-3 py-2", children: [
39704
+ status === "done" && hasStepContent && finalOutput && /* @__PURE__ */ jsxs30("details", { className: "rounded-lg border border-[hsl(var(--border))] px-3 py-2", children: [
39552
39705
  /* @__PURE__ */ jsx36("summary", { className: "cursor-pointer select-none text-xs text-[hsl(var(--muted-foreground))]", children: "\u6700\u7EC8\u8F93\u51FA" }),
39553
39706
  /* @__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 })
39554
39707
  ] }),
@@ -39611,7 +39764,7 @@ function toolCallAnswered(toolCall, sessionStatus, answerData) {
39611
39764
  }
39612
39765
 
39613
39766
  // src/chat/AssistantTurnBlock.tsx
39614
- import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
39767
+ import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
39615
39768
  var EMPTY_MESSAGES = [];
39616
39769
  var EMPTY_AGENT_LOOPS = {};
39617
39770
  var turnDisplayModeMemory = /* @__PURE__ */ new Map();
@@ -39833,7 +39986,7 @@ function AssistantTurnBlockBase({
39833
39986
  const [displayMode, setDisplayMode] = useState22(
39834
39987
  () => forceExpanded ? "detail" : (displayModeMemoryKey ? turnDisplayModeMemory.get(displayModeMemoryKey) : void 0) ?? defaultTurnDisplayMode({ forceExpanded, hasActionableToolCall, isStreaming })
39835
39988
  );
39836
- const wasStreamingRef = useRef14(isStreaming);
39989
+ const wasStreamingRef = useRef15(isStreaming);
39837
39990
  useEffect16(() => {
39838
39991
  if (wasStreamingRef.current && !isStreaming && !forceExpanded && !(displayModeMemoryKey && turnDisplayModeMemory.has(displayModeMemoryKey))) {
39839
39992
  setDisplayMode(
@@ -39925,7 +40078,7 @@ function AssistantTurnBlockBase({
39925
40078
  if (observedMemoryRefs.length > 0) setCachedMemoryRefs(observedMemoryRefs);
39926
40079
  }, [observedMemoryRefs]);
39927
40080
  const memoryRefs = observedMemoryRefs.length > 0 ? observedMemoryRefs : cachedMemoryRefs;
39928
- return /* @__PURE__ */ jsxs32(
40081
+ return /* @__PURE__ */ jsxs31(
39929
40082
  "div",
39930
40083
  {
39931
40084
  "aria-busy": isStreaming || void 0,
@@ -39939,7 +40092,7 @@ function AssistantTurnBlockBase({
39939
40092
  memoryRefs.length > 0 && /* @__PURE__ */ jsx37(MemoryRefsHint, { refs: memoryRefs }),
39940
40093
  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" }),
39941
40094
  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" }),
39942
- hasExecutionProcess && /* @__PURE__ */ jsxs32("div", { className: "flex w-full items-start gap-2.5", children: [
40095
+ hasExecutionProcess && /* @__PURE__ */ jsxs31("div", { className: "flex w-full items-start gap-2.5", children: [
39943
40096
  /* @__PURE__ */ jsx37(
39944
40097
  "span",
39945
40098
  {
@@ -39948,8 +40101,8 @@ function AssistantTurnBlockBase({
39948
40101
  children: /* @__PURE__ */ jsx37(Bot, { size: 16 })
39949
40102
  }
39950
40103
  ),
39951
- /* @__PURE__ */ jsxs32("div", { className: "min-w-0 flex-1 pt-0.5", children: [
39952
- /* @__PURE__ */ jsxs32(
40104
+ /* @__PURE__ */ jsxs31("div", { className: "min-w-0 flex-1 pt-0.5", children: [
40105
+ /* @__PURE__ */ jsxs31(
39953
40106
  "button",
39954
40107
  {
39955
40108
  type: "button",
@@ -40222,12 +40375,12 @@ function AssistantMessages({
40222
40375
  );
40223
40376
  const hasToolCalls = toolCalls.length > 0;
40224
40377
  const orderedParts = getOrderedMessageParts(message, toolCalls);
40225
- return /* @__PURE__ */ jsxs32(
40378
+ return /* @__PURE__ */ jsxs31(
40226
40379
  "div",
40227
40380
  {
40228
40381
  className: "flex flex-col gap-1",
40229
40382
  children: [
40230
- showReasoning && /* @__PURE__ */ jsxs32(
40383
+ showReasoning && /* @__PURE__ */ jsxs31(
40231
40384
  Reasoning,
40232
40385
  {
40233
40386
  isStreaming: isReasoningStreamingLastMessage,
@@ -40336,7 +40489,7 @@ function CompactToolGroupBlock({
40336
40489
  level,
40337
40490
  customization
40338
40491
  }) {
40339
- return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-1", children: [
40492
+ return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1", children: [
40340
40493
  toolCalls.map((toolCall) => {
40341
40494
  const CustomToolCall = customization?.components?.ToolCall;
40342
40495
  return CustomToolCall ? /* @__PURE__ */ jsx37(
@@ -40396,7 +40549,7 @@ function AssistantMessageContent({
40396
40549
  if (!text4 && imageParts.length === 0 && fileParts.length === 0 && !reasoning && !failed) {
40397
40550
  return null;
40398
40551
  }
40399
- return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-3", children: [
40552
+ return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-3", children: [
40400
40553
  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,
40401
40554
  imageParts.length > 0 && /* @__PURE__ */ jsx37("div", { className: "grid gap-2", children: imageParts.map((part) => /* @__PURE__ */ jsx37(
40402
40555
  MessageImage,
@@ -40445,7 +40598,7 @@ function AssistantText({
40445
40598
  () => ({ sessionId, messageId, sendMessage }),
40446
40599
  [sessionId, messageId, sendMessage]
40447
40600
  );
40448
- return /* @__PURE__ */ jsxs32(
40601
+ return /* @__PURE__ */ jsxs31(
40449
40602
  "div",
40450
40603
  {
40451
40604
  part: "assistant-text",
@@ -40480,13 +40633,13 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40480
40633
  const memoriesHref = useChatEnvironment().memoriesHref;
40481
40634
  const hasSkill = refs.some((r) => r.skill_name);
40482
40635
  const label = hasSkill ? "\u53C2\u8003\u4E86\u8BE5\u6280\u80FD\u7684\u5386\u53F2\u7ECF\u9A8C" : "\u53C2\u8003\u4E86\u5386\u53F2\u7ECF\u9A8C";
40483
- return /* @__PURE__ */ jsxs32(
40636
+ return /* @__PURE__ */ jsxs31(
40484
40637
  "div",
40485
40638
  {
40486
40639
  part: "memory-refs",
40487
40640
  className: cn("blade-chat-memory-refs relative z-[1] ml-1 w-[calc(100%-0.25rem)] max-w-[680px] self-start", className),
40488
40641
  children: [
40489
- /* @__PURE__ */ jsxs32(
40642
+ /* @__PURE__ */ jsxs31(
40490
40643
  "button",
40491
40644
  {
40492
40645
  type: "button",
@@ -40494,7 +40647,7 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40494
40647
  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)]",
40495
40648
  children: [
40496
40649
  /* @__PURE__ */ jsx37(BookOpen, { size: 12 }),
40497
- /* @__PURE__ */ jsxs32("span", { children: [
40650
+ /* @__PURE__ */ jsxs31("span", { children: [
40498
40651
  label,
40499
40652
  "\uFF08",
40500
40653
  refs.length,
@@ -40510,8 +40663,8 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40510
40663
  ]
40511
40664
  }
40512
40665
  ),
40513
- 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: [
40514
- refs.map((ref) => /* @__PURE__ */ jsxs32(
40666
+ 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: [
40667
+ refs.map((ref) => /* @__PURE__ */ jsxs31(
40515
40668
  "div",
40516
40669
  {
40517
40670
  className: "rounded-lg border border-[hsl(var(--border)/0.55)] bg-[hsl(var(--background)/0.72)] px-3 py-2.5",
@@ -40522,7 +40675,7 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40522
40675
  },
40523
40676
  ref.id
40524
40677
  )),
40525
- memoriesHref ? /* @__PURE__ */ jsxs32(
40678
+ memoriesHref ? /* @__PURE__ */ jsxs31(
40526
40679
  "a",
40527
40680
  {
40528
40681
  href: memoriesHref,
@@ -40542,7 +40695,7 @@ function MemoryRefsHint({ refs: rawRefs, className }) {
40542
40695
  }
40543
40696
 
40544
40697
  // src/hooks/use-message-pin.ts
40545
- import { useCallback as useCallback6, useEffect as useEffect17, useRef as useRef15 } from "react";
40698
+ import { useCallback as useCallback6, useEffect as useEffect17, useRef as useRef16 } from "react";
40546
40699
  var DEFAULT_MARGIN_PX = 24;
40547
40700
  var MANUAL_SCROLL_TOLERANCE_PX = 2;
40548
40701
  function useMessagePin({
@@ -40564,16 +40717,16 @@ function useMessagePin({
40564
40717
  scrollToBottom,
40565
40718
  margin = DEFAULT_MARGIN_PX
40566
40719
  }) {
40567
- const pinActiveRef = useRef15(false);
40568
- const frameRef = useRef15(null);
40569
- const retryTimeoutRef = useRef15(null);
40570
- const manualScrollCheckTimeoutRef = useRef15(null);
40571
- const repositionPendingRef = useRef15(false);
40572
- const pinnedTargetScrollTopRef = useRef15(null);
40573
- const appliedTargetKeyRef = useRef15(null);
40574
- const initialObservedTargetKeyRef = useRef15(pinTarget ? null : targetKey);
40575
- const observedTargetKeyRef = useRef15(initialObservedTargetKeyRef.current);
40576
- const setSpacerHeightRef = useRef15(setSpacerHeight);
40720
+ const pinActiveRef = useRef16(false);
40721
+ const frameRef = useRef16(null);
40722
+ const retryTimeoutRef = useRef16(null);
40723
+ const manualScrollCheckTimeoutRef = useRef16(null);
40724
+ const repositionPendingRef = useRef16(false);
40725
+ const pinnedTargetScrollTopRef = useRef16(null);
40726
+ const appliedTargetKeyRef = useRef16(null);
40727
+ const initialObservedTargetKeyRef = useRef16(pinTarget ? null : targetKey);
40728
+ const observedTargetKeyRef = useRef16(initialObservedTargetKeyRef.current);
40729
+ const setSpacerHeightRef = useRef16(setSpacerHeight);
40577
40730
  setSpacerHeightRef.current = setSpacerHeight;
40578
40731
  const release = useCallback6(() => {
40579
40732
  if (!pinActiveRef.current) return;
@@ -41006,15 +41159,15 @@ import {
41006
41159
  getContextDisplayState,
41007
41160
  getContextGroupDisplayState
41008
41161
  } from "@blade-hq/agent-client/internal";
41009
- import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
41162
+ import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
41010
41163
  function ContextCard({ context, className }) {
41011
41164
  const display = getContextDisplayState(context);
41012
- return /* @__PURE__ */ jsxs33(
41165
+ return /* @__PURE__ */ jsxs32(
41013
41166
  "details",
41014
41167
  {
41015
41168
  className: `blade-chat-context-card group/context-card overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-sm ${className ?? ""}`,
41016
41169
  children: [
41017
- /* @__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: [
41170
+ /* @__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: [
41018
41171
  /* @__PURE__ */ jsx38(
41019
41172
  Layers,
41020
41173
  {
@@ -41023,7 +41176,7 @@ function ContextCard({ context, className }) {
41023
41176
  "aria-hidden": "true"
41024
41177
  }
41025
41178
  ),
41026
- /* @__PURE__ */ jsxs33("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41179
+ /* @__PURE__ */ jsxs32("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41027
41180
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-title block font-medium text-[hsl(var(--foreground))]", children: display.title }),
41028
41181
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-status block truncate text-xs text-[hsl(var(--muted-foreground))]", children: display.summary })
41029
41182
  ] }),
@@ -41045,8 +41198,8 @@ function ContextGroupCard({ contexts, className }) {
41045
41198
  if (contexts.length === 0) return null;
41046
41199
  const single = contexts.length === 1 ? getContextDisplayState(contexts[0]) : null;
41047
41200
  const group = single ? null : getContextGroupDisplayState(contexts);
41048
- 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: [
41049
- /* @__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: [
41201
+ 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: [
41202
+ /* @__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: [
41050
41203
  /* @__PURE__ */ jsx38(
41051
41204
  Layers,
41052
41205
  {
@@ -41055,7 +41208,7 @@ function ContextGroupCard({ contexts, className }) {
41055
41208
  "aria-hidden": "true"
41056
41209
  }
41057
41210
  ),
41058
- /* @__PURE__ */ jsxs33("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41211
+ /* @__PURE__ */ jsxs32("span", { className: "blade-chat-context-copy min-w-0 flex-1", children: [
41059
41212
  /* @__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` }),
41060
41213
  /* @__PURE__ */ jsx38("span", { className: "blade-chat-context-status block truncate text-xs text-[hsl(var(--muted-foreground))]", children: single ? single.summary : group?.summary })
41061
41214
  ] }),
@@ -41079,8 +41232,8 @@ function ContextGroupCard({ contexts, className }) {
41079
41232
  }
41080
41233
 
41081
41234
  // src/chat/ResultFeedback.tsx
41082
- import { useCallback as useCallback7, useEffect as useEffect18, useRef as useRef16, useState as useState23 } from "react";
41083
- import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
41235
+ import { useCallback as useCallback7, useEffect as useEffect18, useRef as useRef17, useState as useState23 } from "react";
41236
+ import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
41084
41237
  var REASONS = [
41085
41238
  { value: "not_solved", label: "\u6CA1\u89E3\u51B3\u95EE\u9898" },
41086
41239
  { value: "inaccurate", label: "\u5185\u5BB9\u4E0D\u51C6\u786E" },
@@ -41094,17 +41247,17 @@ function reasonLabel(reason) {
41094
41247
  }
41095
41248
  function HistoricalResultFeedback({ feedback }) {
41096
41249
  const label = reasonLabel(feedback.reason);
41097
- return /* @__PURE__ */ jsxs34(
41250
+ return /* @__PURE__ */ jsxs33(
41098
41251
  "section",
41099
41252
  {
41100
41253
  "aria-label": "\u5386\u53F2\u7ED3\u679C\u53CD\u9988",
41101
41254
  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))]",
41102
41255
  children: [
41103
- /* @__PURE__ */ jsxs34("span", { children: [
41256
+ /* @__PURE__ */ jsxs33("span", { children: [
41104
41257
  "\u4F60\u5BF9\u6B64\u8F6E\u7ED3\u679C\u7684\u8BC4\u4EF7\uFF1A",
41105
41258
  feedback.helpful ? "\u6709\u5E2E\u52A9" : "\u6CA1\u5E2E\u52A9"
41106
41259
  ] }),
41107
- label ? /* @__PURE__ */ jsxs34("span", { children: [
41260
+ label ? /* @__PURE__ */ jsxs33("span", { children: [
41108
41261
  " \xB7 ",
41109
41262
  label
41110
41263
  ] }) : null
@@ -41129,10 +41282,10 @@ function ResultFeedback({
41129
41282
  );
41130
41283
  const [saving, setSaving] = useState23(false);
41131
41284
  const [saveError, setSaveError] = useState23(false);
41132
- const latestChoice = useRef16(null);
41285
+ const latestChoice = useRef17(null);
41133
41286
  const eligible = followup.feedback_eligible === true;
41134
41287
  const emit = useFollowupInteraction();
41135
- const reportedShown = useRef16(false);
41288
+ const reportedShown = useRef17(false);
41136
41289
  const visible = eligible && !isViewer;
41137
41290
  useEffect18(() => {
41138
41291
  if (!visible || reportedShown.current) return;
@@ -41179,14 +41332,14 @@ function ResultFeedback({
41179
41332
  [client, emit, followup.assistant_entry_id, onSaved, sessionId]
41180
41333
  );
41181
41334
  if (!visible) return null;
41182
- return /* @__PURE__ */ jsxs34(
41335
+ return /* @__PURE__ */ jsxs33(
41183
41336
  "section",
41184
41337
  {
41185
41338
  "aria-label": "\u7ED3\u679C\u53CD\u9988",
41186
41339
  className: "flex flex-col gap-2 border-t border-[hsl(var(--border)/0.7)] pt-3",
41187
41340
  children: [
41188
41341
  /* @__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" }),
41189
- /* @__PURE__ */ jsxs34("div", { className: "flex flex-wrap gap-1.5", children: [
41342
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap gap-1.5", children: [
41190
41343
  /* @__PURE__ */ jsx39(
41191
41344
  "button",
41192
41345
  {
@@ -41222,7 +41375,7 @@ function ResultFeedback({
41222
41375
  },
41223
41376
  reason.value
41224
41377
  )) }) : null,
41225
- saveError ? /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--destructive))]", children: [
41378
+ saveError ? /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--destructive))]", children: [
41226
41379
  /* @__PURE__ */ jsx39("span", { children: "\u53CD\u9988\u6682\u672A\u4FDD\u5B58\uFF0C\u53EF\u91CD\u8BD5" }),
41227
41380
  /* @__PURE__ */ jsx39(
41228
41381
  "button",
@@ -41243,7 +41396,7 @@ function ResultFeedback({
41243
41396
  }
41244
41397
 
41245
41398
  // src/chat/LiteMessageList.tsx
41246
- import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
41399
+ import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
41247
41400
  var LITE_LOADING_INDICATOR_HEIGHT = 38;
41248
41401
  function messageText(message) {
41249
41402
  return getTextContent3(normalizeMessageContent2(message.content)).trim();
@@ -41385,11 +41538,11 @@ function LiteMessageList({
41385
41538
  onLoadOlder,
41386
41539
  historyLoadRevision = 0
41387
41540
  }) {
41388
- const scrollRef = useRef17(null);
41389
- const trailingSpacerRef = useRef17(null);
41390
- const stickToBottomRef = useRef17(true);
41391
- const scrollFrameRef = useRef17(null);
41392
- const loadingOlderRef = useRef17(false);
41541
+ const scrollRef = useRef18(null);
41542
+ const trailingSpacerRef = useRef18(null);
41543
+ const stickToBottomRef = useRef18(true);
41544
+ const scrollFrameRef = useRef18(null);
41545
+ const loadingOlderRef = useRef18(false);
41393
41546
  useEffect19(() => {
41394
41547
  void historyLoadRevision;
41395
41548
  const element2 = scrollRef.current;
@@ -41530,7 +41683,7 @@ function LiteMessageList({
41530
41683
  },
41531
41684
  []
41532
41685
  );
41533
- return /* @__PURE__ */ jsxs35(
41686
+ return /* @__PURE__ */ jsxs34(
41534
41687
  "div",
41535
41688
  {
41536
41689
  ref: scrollRef,
@@ -41544,7 +41697,7 @@ function LiteMessageList({
41544
41697
  },
41545
41698
  className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-6 sm:px-8",
41546
41699
  children: [
41547
- 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(
41700
+ 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(
41548
41701
  "div",
41549
41702
  {
41550
41703
  className: "relative mx-auto w-full max-w-3xl",
@@ -41632,7 +41785,7 @@ function PlainTextMessage({
41632
41785
  if (row.role === "user") {
41633
41786
  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 }) });
41634
41787
  }
41635
- return /* @__PURE__ */ jsxs35(
41788
+ return /* @__PURE__ */ jsxs34(
41636
41789
  "div",
41637
41790
  {
41638
41791
  className: `break-words text-sm leading-6 ${row.role === "error" ? "text-[hsl(var(--destructive))]" : "text-[hsl(var(--foreground))]"}`,
@@ -41644,7 +41797,7 @@ function PlainTextMessage({
41644
41797
  );
41645
41798
  }
41646
41799
  function LiteLoadingIndicator() {
41647
- 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: [
41800
+ 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: [
41648
41801
  /* @__PURE__ */ jsx40(LoaderCircle, { size: 14, className: "animate-spin", "aria-hidden": "true" }),
41649
41802
  /* @__PURE__ */ jsx40("span", { children: "\u6B63\u5728\u751F\u6210\u4E2D\u2026" })
41650
41803
  ] });
@@ -41670,11 +41823,11 @@ function LiteFollowup({
41670
41823
  setDownloadingPath(null);
41671
41824
  }
41672
41825
  };
41673
- return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col items-start gap-3", children: [
41674
- artifacts.length > 0 ? /* @__PURE__ */ jsxs35("div", { className: "flex w-full flex-col items-start gap-1.5", children: [
41826
+ return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col items-start gap-3", children: [
41827
+ artifacts.length > 0 ? /* @__PURE__ */ jsxs34("div", { className: "flex w-full flex-col items-start gap-1.5", children: [
41675
41828
  /* @__PURE__ */ jsx40("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u672C\u8F6E\u6210\u679C" }),
41676
41829
  artifacts.map(
41677
- (artifact, artifactIndex) => artifact.kind === "link" ? /* @__PURE__ */ jsxs35(
41830
+ (artifact, artifactIndex) => artifact.kind === "link" ? /* @__PURE__ */ jsxs34(
41678
41831
  "a",
41679
41832
  {
41680
41833
  href: artifact.target,
@@ -41687,7 +41840,7 @@ function LiteFollowup({
41687
41840
  ]
41688
41841
  },
41689
41842
  `${artifact.kind}:${artifactIndex}`
41690
- ) : /* @__PURE__ */ jsxs35(
41843
+ ) : /* @__PURE__ */ jsxs34(
41691
41844
  "button",
41692
41845
  {
41693
41846
  type: "button",
@@ -41707,9 +41860,9 @@ function LiteFollowup({
41707
41860
  )
41708
41861
  )
41709
41862
  ] }) : null,
41710
- followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs35("div", { className: "flex max-w-full flex-col items-start gap-1.5", children: [
41863
+ followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs34("div", { className: "flex max-w-full flex-col items-start gap-1.5", children: [
41711
41864
  /* @__PURE__ */ jsx40("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u4E0B\u4E00\u6B65\u53EF\u4EE5" }),
41712
- followup.suggestions.map((suggestion) => /* @__PURE__ */ jsxs35(
41865
+ followup.suggestions.map((suggestion) => /* @__PURE__ */ jsxs34(
41713
41866
  "button",
41714
41867
  {
41715
41868
  type: "button",
@@ -41746,12 +41899,12 @@ import {
41746
41899
  useEffect as useEffect26,
41747
41900
  useLayoutEffect as useLayoutEffect7,
41748
41901
  useMemo as useMemo16,
41749
- useRef as useRef25,
41902
+ useRef as useRef26,
41750
41903
  useState as useState32
41751
41904
  } from "react";
41752
41905
 
41753
41906
  // ../../node_modules/.pnpm/use-stick-to-bottom@1.1.3_react@19.2.4/node_modules/use-stick-to-bottom/dist/useStickToBottom.js
41754
- import { useCallback as useCallback9, useMemo as useMemo13, useRef as useRef18, useState as useState25 } from "react";
41907
+ import { useCallback as useCallback9, useMemo as useMemo13, useRef as useRef19, useState as useState25 } from "react";
41755
41908
  var DEFAULT_SPRING_ANIMATION = {
41756
41909
  /**
41757
41910
  * A value from 0 to 1, on how much to damp the animation.
@@ -41791,7 +41944,7 @@ var useStickToBottom = (options = {}) => {
41791
41944
  const [escapedFromLock, updateEscapedFromLock] = useState25(false);
41792
41945
  const [isAtBottom, updateIsAtBottom] = useState25(options.initial !== false);
41793
41946
  const [isNearBottom, setIsNearBottom] = useState25(false);
41794
- const optionsRef = useRef18(null);
41947
+ const optionsRef = useRef19(null);
41795
41948
  optionsRef.current = options;
41796
41949
  const isSelecting = useCallback9(() => {
41797
41950
  if (!mouseDown) {
@@ -42095,11 +42248,11 @@ function mergeAnimations(...animations) {
42095
42248
 
42096
42249
  // ../../node_modules/.pnpm/use-stick-to-bottom@1.1.3_react@19.2.4/node_modules/use-stick-to-bottom/dist/StickToBottom.js
42097
42250
  import * as React from "react";
42098
- import { createContext as createContext7, useContext as useContext7, useEffect as useEffect20, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect4, useMemo as useMemo14, useRef as useRef19 } from "react";
42251
+ import { createContext as createContext7, useContext as useContext7, useEffect as useEffect20, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect4, useMemo as useMemo14, useRef as useRef20 } from "react";
42099
42252
  var StickToBottomContext = createContext7(null);
42100
42253
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect4 : useEffect20;
42101
42254
  function StickToBottom({ instance, children, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }) {
42102
- const customTargetScrollTop = useRef19(null);
42255
+ const customTargetScrollTop = useRef20(null);
42103
42256
  const targetScrollTop = React.useCallback((target, elements) => {
42104
42257
  const get = context?.targetScrollTop ?? currentTargetScrollTop;
42105
42258
  return get?.(target, elements) ?? target;
@@ -42180,7 +42333,7 @@ import {
42180
42333
  isHiddenInternalMessage as isHiddenInternalMessage2,
42181
42334
  normalizeMessageContent as normalizeMessageContent3
42182
42335
  } from "@blade-hq/agent-client/internal";
42183
- import { useCallback as useCallback11, useEffect as useEffect21, useLayoutEffect as useLayoutEffect5, useRef as useRef20, useState as useState26 } from "react";
42336
+ import { useCallback as useCallback11, useEffect as useEffect21, useLayoutEffect as useLayoutEffect5, useRef as useRef21, useState as useState26 } from "react";
42184
42337
  var HIGHLIGHT_MS = 1600;
42185
42338
  var TURN_NAV_HIGHLIGHT_CLASS = "blade-turn-nav-flash";
42186
42339
  var MAX_FRAMES_AFTER_LOCATE = 20;
@@ -42235,7 +42388,7 @@ function useTurnNavigation({
42235
42388
  reloadKey,
42236
42389
  rewriteKey
42237
42390
  }) {
42238
- const callbacks = useRef20({
42391
+ const callbacks = useRef21({
42239
42392
  getLoadedEntryElement,
42240
42393
  isEntryLoaded,
42241
42394
  locateEntry,
@@ -42250,14 +42403,14 @@ function useTurnNavigation({
42250
42403
  const [failedEntryId, setFailedEntryId] = useState26(null);
42251
42404
  const [error61, setError] = useState26(null);
42252
42405
  const [indexRefresh, setIndexRefresh] = useState26(0);
42253
- const seekSeq = useRef20(0);
42254
- const indexSeq = useRef20(0);
42255
- const indexRef = useRef20({
42406
+ const seekSeq = useRef21(0);
42407
+ const indexSeq = useRef21(0);
42408
+ const indexRef = useRef21({
42256
42409
  sessionId: null,
42257
42410
  items: []
42258
42411
  });
42259
- const highlightTimer = useRef20(void 0);
42260
- const highlightedRef = useRef20(null);
42412
+ const highlightTimer = useRef21(void 0);
42413
+ const highlightedRef = useRef21(null);
42261
42414
  const clearHighlight = useCallback11(() => {
42262
42415
  clearTimeout(highlightTimer.current);
42263
42416
  highlightTimer.current = void 0;
@@ -42416,7 +42569,7 @@ function useTurnNavigation({
42416
42569
  }
42417
42570
 
42418
42571
  // src/hooks/use-typewriter-reveal.ts
42419
- import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef21, useState as useState27 } from "react";
42572
+ import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef22, useState as useState27 } from "react";
42420
42573
  var REVEAL_INITIAL_CPS = 18;
42421
42574
  var REVEAL_MIN_CPS = 6;
42422
42575
  var REVEAL_MAX_CPS = 240;
@@ -42453,14 +42606,14 @@ function initialRevealState(targetText, isLive, resetKey) {
42453
42606
  }
42454
42607
  function useTypewriterReveal(targetText, isLive, resetKey) {
42455
42608
  const [state, setState] = useState27(() => initialRevealState(targetText, isLive, resetKey));
42456
- const targetTextRef = useRef21(targetText);
42609
+ const targetTextRef = useRef22(targetText);
42457
42610
  targetTextRef.current = targetText;
42458
- const revealedLenRef = useRef21(state.revealedLen);
42459
- const priorTargetLenRef = useRef21(targetText.length);
42460
- const emaCpsRef = useRef21(REVEAL_INITIAL_CPS);
42461
- const lastTickTsRef = useRef21(null);
42462
- const lastArrivalTsRef = useRef21(null);
42463
- const cancelRef = useRef21(null);
42611
+ const revealedLenRef = useRef22(state.revealedLen);
42612
+ const priorTargetLenRef = useRef22(targetText.length);
42613
+ const emaCpsRef = useRef22(REVEAL_INITIAL_CPS);
42614
+ const lastTickTsRef = useRef22(null);
42615
+ const lastArrivalTsRef = useRef22(null);
42616
+ const cancelRef = useRef22(null);
42464
42617
  const stopTicking = useCallback12(() => {
42465
42618
  cancelRef.current?.();
42466
42619
  cancelRef.current = null;
@@ -42492,7 +42645,7 @@ function useTypewriterReveal(targetText, isLive, resetKey) {
42492
42645
  priorTargetLenRef.current = targetText.length;
42493
42646
  setState((s) => ({ ...s, displayedText: targetText, revealedLen: targetText.length, isRevealing: false }));
42494
42647
  }
42495
- const tickRef = useRef21(null);
42648
+ const tickRef = useRef22(null);
42496
42649
  tickRef.current = (ts) => {
42497
42650
  cancelRef.current = null;
42498
42651
  const currentTargetLen = targetTextRef.current.length;
@@ -45515,7 +45668,7 @@ function extractRefs(content3) {
45515
45668
  }
45516
45669
 
45517
45670
  // src/chat/plan/PlanSummaryCard.tsx
45518
- import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
45671
+ import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
45519
45672
  function PlanSummaryCard({
45520
45673
  messages,
45521
45674
  sessionStatus,
@@ -45530,8 +45683,8 @@ function PlanSummaryCard({
45530
45683
  const isWaitingForInput = sessionStatus === "waiting_for_input";
45531
45684
  const canConfirm = Boolean(onConfirmPlan) && isWaitingForInput && data.lastPauseTool === "ExitPlanMode";
45532
45685
  const openPlanPanel = openPlanPanelAction && sessionId ? () => openPlanPanelAction(sessionId) : void 0;
45533
- 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: [
45534
- /* @__PURE__ */ jsxs36(
45686
+ 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: [
45687
+ /* @__PURE__ */ jsxs35(
45535
45688
  "button",
45536
45689
  {
45537
45690
  type: "button",
@@ -45539,14 +45692,14 @@ function PlanSummaryCard({
45539
45692
  disabled: isHistorical || !openPlanPanel,
45540
45693
  className: "flex w-full flex-col gap-4 text-left transition-colors hover:text-[hsl(var(--foreground))]",
45541
45694
  children: [
45542
- /* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between gap-3", children: [
45543
- /* @__PURE__ */ jsxs36("div", { className: "min-w-0 space-y-2", children: [
45544
- /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45695
+ /* @__PURE__ */ jsxs35("div", { className: "flex items-start justify-between gap-3", children: [
45696
+ /* @__PURE__ */ jsxs35("div", { className: "min-w-0 space-y-2", children: [
45697
+ /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45545
45698
  /* @__PURE__ */ jsx41(Sparkles, { size: 12 }),
45546
45699
  /* @__PURE__ */ jsx41("span", { children: "\u89C4\u5212\u6458\u8981" })
45547
45700
  ] }),
45548
45701
  /* @__PURE__ */ jsx41("div", { className: "truncate text-base font-medium text-[hsl(var(--foreground))]", children: data.intent || "\u5F53\u524D\u89C4\u5212" }),
45549
- /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: summaryState.kind === "progress" ? /* @__PURE__ */ jsxs36(Fragment15, { children: [
45702
+ /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: summaryState.kind === "progress" ? /* @__PURE__ */ jsxs35(Fragment15, { children: [
45550
45703
  /* @__PURE__ */ jsx41("span", { className: "rounded-full bg-[hsl(var(--accent))] px-2.5 py-1 text-[hsl(var(--foreground))]", children: summaryState.label }),
45551
45704
  /* @__PURE__ */ jsx41("span", { className: "font-mono tracking-[0.25em] text-[hsl(var(--muted-foreground))]", children: summaryState.dots })
45552
45705
  ] }) : /* @__PURE__ */ jsx41(
@@ -45571,16 +45724,16 @@ function PlanSummaryCard({
45571
45724
  }
45572
45725
  )
45573
45726
  ] }),
45574
- summaryState.kind === "complete" && /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45575
- /* @__PURE__ */ jsxs36("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45727
+ summaryState.kind === "complete" && /* @__PURE__ */ jsxs35("div", { className: "flex flex-wrap items-center gap-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
45728
+ /* @__PURE__ */ jsxs35("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45576
45729
  data.selectedSkills.length,
45577
45730
  " \u4E2A\u6280\u80FD"
45578
45731
  ] }),
45579
- /* @__PURE__ */ jsxs36("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45732
+ /* @__PURE__ */ jsxs35("span", { className: "rounded-full border border-[hsl(var(--border))] px-2.5 py-1", children: [
45580
45733
  stepCount,
45581
45734
  " \u4E2A\u6B65\u9AA4"
45582
45735
  ] }),
45583
- !isHistorical && /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--muted-foreground))]", children: [
45736
+ !isHistorical && /* @__PURE__ */ jsxs35("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--muted-foreground))]", children: [
45584
45737
  /* @__PURE__ */ jsx41(CircleCheck, { size: 12 }),
45585
45738
  "\u53F3\u4FA7\u67E5\u770B\u8BE6\u60C5"
45586
45739
  ] })
@@ -45603,9 +45756,9 @@ function PlanConfirmationPanel({
45603
45756
  setRevisionText("");
45604
45757
  setIsEditing(false);
45605
45758
  };
45606
- return /* @__PURE__ */ jsxs36("div", { className: "space-y-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--background)/0.45)] p-3", children: [
45607
- /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap gap-2", children: [
45608
- /* @__PURE__ */ jsxs36(
45759
+ return /* @__PURE__ */ jsxs35("div", { className: "space-y-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--background)/0.45)] p-3", children: [
45760
+ /* @__PURE__ */ jsxs35("div", { className: "flex flex-wrap gap-2", children: [
45761
+ /* @__PURE__ */ jsxs35(
45609
45762
  "button",
45610
45763
  {
45611
45764
  type: "button",
@@ -45617,7 +45770,7 @@ function PlanConfirmationPanel({
45617
45770
  ]
45618
45771
  }
45619
45772
  ),
45620
- /* @__PURE__ */ jsxs36(
45773
+ /* @__PURE__ */ jsxs35(
45621
45774
  "button",
45622
45775
  {
45623
45776
  type: "button",
@@ -45630,7 +45783,7 @@ function PlanConfirmationPanel({
45630
45783
  }
45631
45784
  )
45632
45785
  ] }),
45633
- isEditing && /* @__PURE__ */ jsxs36("div", { className: "space-y-2", children: [
45786
+ isEditing && /* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
45634
45787
  /* @__PURE__ */ jsx41(
45635
45788
  "textarea",
45636
45789
  {
@@ -45758,7 +45911,7 @@ function extractPlanMessagesForTurn(messages, turnLastMessage) {
45758
45911
 
45759
45912
  // src/chat/CompactionCard.tsx
45760
45913
  import { useState as useState29 } from "react";
45761
- import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
45914
+ import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
45762
45915
  var PERCENT_FORMATTER = new Intl.NumberFormat("zh-CN", {
45763
45916
  style: "percent",
45764
45917
  maximumFractionDigits: 0
@@ -45819,9 +45972,9 @@ function CompactionCard({
45819
45972
  const hasSummary = typeof source.summary_full === "string" && source.summary_full.trim().length > 0 && !isGenericArchiveSummary(source.summary_full);
45820
45973
  const hasFailureReason = source.status === "failed" && Boolean(source.failure_reason);
45821
45974
  const canExpand = source.status === "completed" && (hasSummary || archivedToolCalls.length > 0) || hasFailureReason;
45822
- return /* @__PURE__ */ jsxs37("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
45823
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-2", children: [
45824
- /* @__PURE__ */ jsxs37(
45975
+ return /* @__PURE__ */ jsxs36("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
45976
+ /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-2", children: [
45977
+ /* @__PURE__ */ jsxs36(
45825
45978
  "button",
45826
45979
  {
45827
45980
  type: "button",
@@ -45833,13 +45986,13 @@ function CompactionCard({
45833
45986
  "aria-expanded": expanded,
45834
45987
  children: [
45835
45988
  canExpand ? expanded ? /* @__PURE__ */ jsx42(ChevronDown, { size: 12, className: "shrink-0" }) : /* @__PURE__ */ jsx42(ChevronRight, { size: 12, className: "shrink-0" }) : null,
45836
- /* @__PURE__ */ jsx42("span", { children: source.status === "streaming" ? /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1", children: [
45989
+ /* @__PURE__ */ jsx42("span", { children: source.status === "streaming" ? /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1", children: [
45837
45990
  /* @__PURE__ */ jsx42(LoaderCircle, { size: 12, className: "animate-spin" }),
45838
45991
  "\u6B63\u5728\u538B\u7F29\u4E0A\u4E0B\u6587"
45839
- ] }) : source.status === "failed" ? /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-danger))]", children: [
45992
+ ] }) : source.status === "failed" ? /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-danger))]", children: [
45840
45993
  /* @__PURE__ */ jsx42(CircleX, { size: 12 }),
45841
45994
  "\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25"
45842
- ] }) : source.status === "interrupted" ? /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-warning))]", children: [
45995
+ ] }) : source.status === "interrupted" ? /* @__PURE__ */ jsxs36("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--swf-warning))]", children: [
45843
45996
  /* @__PURE__ */ jsx42(Square, { size: 12 }),
45844
45997
  "\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88"
45845
45998
  ] }) : "\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29" })
@@ -45856,13 +46009,13 @@ function CompactionCard({
45856
46009
  }
45857
46010
  ) : null
45858
46011
  ] }),
45859
- 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: [
45860
- /* @__PURE__ */ jsxs37("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-[hsl(var(--muted-foreground))]", children: [
45861
- /* @__PURE__ */ jsxs37("span", { children: [
46012
+ 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: [
46013
+ /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-[hsl(var(--muted-foreground))]", children: [
46014
+ /* @__PURE__ */ jsxs36("span", { children: [
45862
46015
  "#",
45863
46016
  shortId(source.compaction_id)
45864
46017
  ] }),
45865
- /* @__PURE__ */ jsxs37("span", { children: [
46018
+ /* @__PURE__ */ jsxs36("span", { children: [
45866
46019
  "\u8282\u7701 ",
45867
46020
  formatSavedRatio(source.saved_ratio),
45868
46021
  "\uFF08",
@@ -45872,7 +46025,7 @@ function CompactionCard({
45872
46025
  formatTokens(source.tokens_after),
45873
46026
  " token\uFF09"
45874
46027
  ] }),
45875
- /* @__PURE__ */ jsxs37("span", { children: [
46028
+ /* @__PURE__ */ jsxs36("span", { children: [
45876
46029
  "\u5F52\u6863 ",
45877
46030
  archivedCount,
45878
46031
  " \u4E2A\u5DE5\u5177\u7ED3\u679C"
@@ -45880,12 +46033,12 @@ function CompactionCard({
45880
46033
  ] }),
45881
46034
  archivedToolCalls.length > 0 ? /* @__PURE__ */ jsx42("div", { className: "mt-2 space-y-1.5", children: archivedToolCalls.map((item, index2) => {
45882
46035
  const archivePath = getArchivePath(item, archivedFiles);
45883
- return /* @__PURE__ */ jsxs37(
46036
+ return /* @__PURE__ */ jsxs36(
45884
46037
  "div",
45885
46038
  {
45886
46039
  className: "rounded-md border border-[hsl(var(--border))]/70 bg-[hsl(var(--muted))]/35 px-2 py-1.5",
45887
46040
  children: [
45888
- /* @__PURE__ */ jsxs37("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-[hsl(var(--foreground))]", children: [
46041
+ /* @__PURE__ */ jsxs36("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-[hsl(var(--foreground))]", children: [
45889
46042
  /* @__PURE__ */ jsx42("span", { className: "font-medium", children: getArchivedToolLabel(item) }),
45890
46043
  item.tool_call_id ? /* @__PURE__ */ jsx42("span", { className: "font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: item.tool_call_id }) : null
45891
46044
  ] }),
@@ -45896,7 +46049,7 @@ function CompactionCard({
45896
46049
  );
45897
46050
  }) }) : null,
45898
46051
  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,
45899
- source.status === "failed" && source.failure_reason ? /* @__PURE__ */ jsxs37("div", { className: "mt-2 text-[hsl(var(--swf-danger))]", children: [
46052
+ source.status === "failed" && source.failure_reason ? /* @__PURE__ */ jsxs36("div", { className: "mt-2 text-[hsl(var(--swf-danger))]", children: [
45900
46053
  "\u5931\u8D25\u539F\u56E0\uFF1A",
45901
46054
  source.failure_reason
45902
46055
  ] }) : null
@@ -45905,11 +46058,11 @@ function CompactionCard({
45905
46058
  }
45906
46059
 
45907
46060
  // src/chat/PostChatFollowupBlock.tsx
45908
- import { useEffect as useEffect24, useRef as useRef23 } from "react";
46061
+ import { useEffect as useEffect24, useRef as useRef24 } from "react";
45909
46062
 
45910
46063
  // src/chat/FinalArtifactCards.tsx
45911
- import { useEffect as useEffect23, useRef as useRef22, useState as useState30 } from "react";
45912
- import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
46064
+ import { useEffect as useEffect23, useRef as useRef23, useState as useState30 } from "react";
46065
+ import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
45913
46066
  function basename2(path2) {
45914
46067
  return path2.split("/").filter(Boolean).pop() || path2;
45915
46068
  }
@@ -45930,7 +46083,7 @@ function LinkCard({
45930
46083
  const bladeHost = useBladeHost();
45931
46084
  const host = hostOf(url2);
45932
46085
  const local = isLoopbackUrl(url2) && Boolean(bladeHost.openPreview);
45933
- const content3 = /* @__PURE__ */ jsxs38(Fragment16, { children: [
46086
+ const content3 = /* @__PURE__ */ jsxs37(Fragment16, { children: [
45934
46087
  /* @__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" }) }),
45935
46088
  /* @__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 }) }),
45936
46089
  /* @__PURE__ */ jsx43(
@@ -45983,8 +46136,8 @@ function FinalArtifactCards({
45983
46136
  const hasMore = artifacts.length > 3;
45984
46137
  const visibleArtifacts = expanded ? artifacts : artifacts.slice(0, 3);
45985
46138
  const emit = useFollowupInteraction();
45986
- const reportedShown = useRef22(/* @__PURE__ */ new Set());
45987
- const reportedOpened = useRef22(/* @__PURE__ */ new Set());
46139
+ const reportedShown = useRef23(/* @__PURE__ */ new Set());
46140
+ const reportedOpened = useRef23(/* @__PURE__ */ new Set());
45988
46141
  const visibleCount = visibleArtifacts.length;
45989
46142
  useEffect23(() => {
45990
46143
  for (let artifactIndex = 0; artifactIndex < visibleCount; artifactIndex += 1) {
@@ -46002,7 +46155,7 @@ function FinalArtifactCards({
46002
46155
  const columnCount = Math.min(artifacts.length, 3);
46003
46156
  const gridWidth = columnCount * 180 + Math.max(0, columnCount - 1) * 6;
46004
46157
  if (artifacts.length === 0) return null;
46005
- return /* @__PURE__ */ jsxs38("div", { className: "flex max-w-full flex-col gap-1.5", children: [
46158
+ return /* @__PURE__ */ jsxs37("div", { className: "flex max-w-full flex-col gap-1.5", children: [
46006
46159
  /* @__PURE__ */ jsx43(
46007
46160
  "div",
46008
46161
  {
@@ -46038,7 +46191,7 @@ function FinalArtifactCards({
46038
46191
  )
46039
46192
  }
46040
46193
  ),
46041
- hasMore ? /* @__PURE__ */ jsxs38(
46194
+ hasMore ? /* @__PURE__ */ jsxs37(
46042
46195
  "button",
46043
46196
  {
46044
46197
  type: "button",
@@ -46062,7 +46215,7 @@ function FinalArtifactCards({
46062
46215
  }
46063
46216
 
46064
46217
  // src/chat/PostChatFollowupBlock.tsx
46065
- import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
46218
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
46066
46219
  function PostChatFollowupBlock({
46067
46220
  sessionId,
46068
46221
  followup,
@@ -46072,8 +46225,8 @@ function PostChatFollowupBlock({
46072
46225
  }) {
46073
46226
  const composer = useComposerBridge(sessionId);
46074
46227
  const emit = useFollowupInteraction();
46075
- const reportedSuggestions = useRef23(false);
46076
- const adopted = useRef23(/* @__PURE__ */ new Set());
46228
+ const reportedSuggestions = useRef24(false);
46229
+ const adopted = useRef24(/* @__PURE__ */ new Set());
46077
46230
  const artifacts = followup?.final_artifacts ?? [];
46078
46231
  const assistantEntryId = followup?.assistant_entry_id ?? "";
46079
46232
  const suggestionCount = followup?.suggestions.length ?? 0;
@@ -46084,9 +46237,9 @@ function PostChatFollowupBlock({
46084
46237
  }, [assistantEntryId, emit, sessionId, suggestionCount]);
46085
46238
  if (!followup || !followup.recaption && followup.suggestions.length === 0 && artifacts.length === 0 && !followup.feedback_eligible)
46086
46239
  return null;
46087
- 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: [
46088
- followup.recaption ? /* @__PURE__ */ jsxs39("section", { "aria-label": "\u672C\u8F6E\u5C0F\u7ED3", className: "flex flex-col gap-2", children: [
46089
- /* @__PURE__ */ jsxs39("div", { className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-[hsl(var(--muted-foreground))]", children: [
46240
+ 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: [
46241
+ followup.recaption ? /* @__PURE__ */ jsxs38("section", { "aria-label": "\u672C\u8F6E\u5C0F\u7ED3", className: "flex flex-col gap-2", children: [
46242
+ /* @__PURE__ */ jsxs38("div", { className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-[hsl(var(--muted-foreground))]", children: [
46090
46243
  /* @__PURE__ */ jsx44(Sparkles, { size: 14, "aria-hidden": "true" }),
46091
46244
  "\u672C\u8F6E\u5C0F\u7ED3"
46092
46245
  ] }),
@@ -46108,9 +46261,9 @@ function PostChatFollowupBlock({
46108
46261
  assistantEntryId
46109
46262
  }
46110
46263
  ) }) : null,
46111
- followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs39("section", { className: "flex flex-col items-start gap-1.5", "aria-label": "\u4E0B\u4E00\u6B65\u5EFA\u8BAE", children: [
46264
+ followup.suggestions.length > 0 ? /* @__PURE__ */ jsxs38("section", { className: "flex flex-col items-start gap-1.5", "aria-label": "\u4E0B\u4E00\u6B65\u5EFA\u8BAE", children: [
46112
46265
  /* @__PURE__ */ jsx44("div", { className: "text-xs font-medium text-[hsl(var(--muted-foreground))]", children: "\u4E0B\u4E00\u6B65\u53EF\u4EE5" }),
46113
- /* @__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(
46266
+ /* @__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(
46114
46267
  "button",
46115
46268
  {
46116
46269
  type: "button",
@@ -46155,7 +46308,7 @@ function PostChatFollowupBlock({
46155
46308
 
46156
46309
  // src/chat/RenderErrorBoundary.tsx
46157
46310
  import { Component } from "react";
46158
- import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
46311
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
46159
46312
  function getFirstComponentName(componentStack) {
46160
46313
  const match = componentStack.match(/\n\s+at\s+([^\s(]+)/);
46161
46314
  return match?.[1] ?? null;
@@ -46188,14 +46341,14 @@ var RenderErrorBoundary = class extends Component {
46188
46341
  return children;
46189
46342
  }
46190
46343
  const componentName = getFirstComponentName(componentStack);
46191
- 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: [
46344
+ 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: [
46192
46345
  /* @__PURE__ */ jsx45(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0 text-[hsl(var(--swf-warning))]" }),
46193
- /* @__PURE__ */ jsxs40("div", { className: "min-w-0 flex-1", children: [
46194
- /* @__PURE__ */ jsxs40("div", { className: "font-medium", children: [
46346
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0 flex-1", children: [
46347
+ /* @__PURE__ */ jsxs39("div", { className: "font-medium", children: [
46195
46348
  label,
46196
46349
  "\u6E32\u67D3\u5931\u8D25"
46197
46350
  ] }),
46198
- /* @__PURE__ */ jsxs40("div", { className: "mt-1 break-words text-xs leading-5 text-[hsl(var(--secondary-foreground))]", children: [
46351
+ /* @__PURE__ */ jsxs39("div", { className: "mt-1 break-words text-xs leading-5 text-[hsl(var(--secondary-foreground))]", children: [
46199
46352
  componentName ? `\u7EC4\u4EF6\uFF1A${componentName}\u3002` : null,
46200
46353
  error61.message || "\u53D1\u751F\u4E86\u672A\u9884\u671F\u7684\u6E32\u67D3\u9519\u8BEF\u3002"
46201
46354
  ] }),
@@ -46206,8 +46359,8 @@ var RenderErrorBoundary = class extends Component {
46206
46359
  };
46207
46360
 
46208
46361
  // src/chat/TurnNavRail.tsx
46209
- import { useCallback as useCallback13, useEffect as useEffect25, useLayoutEffect as useLayoutEffect6, useRef as useRef24, useState as useState31 } from "react";
46210
- import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
46362
+ import { useCallback as useCallback13, useEffect as useEffect25, useLayoutEffect as useLayoutEffect6, useRef as useRef25, useState as useState31 } from "react";
46363
+ import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
46211
46364
  var PANEL_MAX_HEIGHT = 448;
46212
46365
  var PANEL_MARGIN = 16;
46213
46366
  function clippingAncestor(element2) {
@@ -46230,11 +46383,11 @@ function TurnNavRail({
46230
46383
  }) {
46231
46384
  const [hoveredTurnId, setHoveredTurnId] = useState31(null);
46232
46385
  const [panelOpen, setPanelOpen] = useState31(false);
46233
- const listRef = useRef24(null);
46234
- const markerRef = useRef24(null);
46235
- const edgeRatioRef = useRef24(0.5);
46236
- const velocityRef = useRef24(0);
46237
- const rafRef = useRef24(null);
46386
+ const listRef = useRef25(null);
46387
+ const markerRef = useRef25(null);
46388
+ const edgeRatioRef = useRef25(0.5);
46389
+ const velocityRef = useRef25(0);
46390
+ const rafRef = useRef25(null);
46238
46391
  useEffect25(() => {
46239
46392
  if (!panelOpen || hoveredTurnId == null) return;
46240
46393
  const list2 = listRef.current;
@@ -46352,8 +46505,8 @@ function TurnNavRail({
46352
46505
  setPanelOpen(false);
46353
46506
  setHoveredTurnId(null);
46354
46507
  },
46355
- children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-end", children: [
46356
- /* @__PURE__ */ jsxs41(
46508
+ children: /* @__PURE__ */ jsxs40("div", { className: "flex flex-col items-end", children: [
46509
+ /* @__PURE__ */ jsxs40(
46357
46510
  "div",
46358
46511
  {
46359
46512
  ref: markerRef,
@@ -46401,7 +46554,7 @@ function TurnNavRail({
46401
46554
  ]
46402
46555
  }
46403
46556
  ),
46404
- error61 ? /* @__PURE__ */ jsxs41(
46557
+ error61 ? /* @__PURE__ */ jsxs40(
46405
46558
  "div",
46406
46559
  {
46407
46560
  role: "alert",
@@ -46511,7 +46664,7 @@ function calculateAnimatedScrollTop({
46511
46664
  }
46512
46665
 
46513
46666
  // src/chat/MessageList.tsx
46514
- import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
46667
+ import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
46515
46668
  function isReasoningRevealingForMessage(message, isRevealing, isStopping = false) {
46516
46669
  if (isStopping) return false;
46517
46670
  const hasContent = message?.content != null && message.content.length > 0;
@@ -46605,8 +46758,8 @@ function MessageListBody({
46605
46758
  const stateIsStreaming = useSessionState(sessionId, (state) => state.isStreaming);
46606
46759
  const sessionIsStreaming = streamingOverride ?? stateIsStreaming;
46607
46760
  const agentLoopNameSet = useMemo16(() => new Set(Object.keys(agentLoops ?? {})), [agentLoops]);
46608
- const assistantMessagesCacheRef = useRef25(/* @__PURE__ */ new Map());
46609
- const stickContextRef = useRef25(null);
46761
+ const assistantMessagesCacheRef = useRef26(/* @__PURE__ */ new Map());
46762
+ const stickContextRef = useRef26(null);
46610
46763
  const latestAssistantIndex = (() => {
46611
46764
  for (let i2 = messages.length - 1; i2 >= 0; i2 -= 1) {
46612
46765
  const candidate = messages[i2];
@@ -46708,52 +46861,52 @@ function MessageListBody({
46708
46861
  const latestUserStableId = latestUserBlock?.message.render_id ?? latestUserAnchorId;
46709
46862
  const latestUserIsOptimistic = latestUserBlock?.message.entry_id?.startsWith("local-user-") ?? false;
46710
46863
  const effectiveNewUserMessageKey = latestUserIsOptimistic ? latestUserBlock?.key ?? latestUserAnchorId : null;
46711
- const containerRef = useRef25(null);
46712
- const scrollContainerRef = useRef25(null);
46713
- const virtualPrefixRef = useRef25(null);
46714
- const visibleTurnsRef = useRef25(/* @__PURE__ */ new Map());
46715
- const visibleBlockRowsRef = useRef25(/* @__PURE__ */ new Map());
46716
- const mountedTurnElementsRef = useRef25(/* @__PURE__ */ new Map());
46717
- const turnRefCallbacksRef = useRef25(
46864
+ const containerRef = useRef26(null);
46865
+ const scrollContainerRef = useRef26(null);
46866
+ const virtualPrefixRef = useRef26(null);
46867
+ const visibleTurnsRef = useRef26(/* @__PURE__ */ new Map());
46868
+ const visibleBlockRowsRef = useRef26(/* @__PURE__ */ new Map());
46869
+ const mountedTurnElementsRef = useRef26(/* @__PURE__ */ new Map());
46870
+ const turnRefCallbacksRef = useRef26(
46718
46871
  /* @__PURE__ */ new Map()
46719
46872
  );
46720
- const intersectionObserverRef = useRef25(null);
46721
- const measuredSizeByKeyRef = useRef25(/* @__PURE__ */ new Map());
46722
- const measuredRowElementsRef = useRef25(/* @__PURE__ */ new Map());
46723
- const rowRefCallbacksRef = useRef25(
46873
+ const intersectionObserverRef = useRef26(null);
46874
+ const measuredSizeByKeyRef = useRef26(/* @__PURE__ */ new Map());
46875
+ const measuredRowElementsRef = useRef26(/* @__PURE__ */ new Map());
46876
+ const rowRefCallbacksRef = useRef26(
46724
46877
  /* @__PURE__ */ new Map()
46725
46878
  );
46726
- const rowResizeObserverRef = useRef25(null);
46727
- const boundaryAnchorRef = useRef25(null);
46728
- const previousStablePrefixEndRef = useRef25(null);
46729
- const frameRef = useRef25(null);
46730
- const startScrollFrameRef = useRef25(null);
46731
- const startScrollTimeoutRef = useRef25(null);
46732
- const entryScrollFrameRef = useRef25(null);
46733
- const entryScrollTimeoutRefs = useRef25([]);
46734
- const appliedStartScrollKeyRef = useRef25(null);
46735
- const appliedEntryScrollKeyRef = useRef25(null);
46736
- const newTurnSpacerRef = useRef25(null);
46737
- const newTurnScrollFrameRef = useRef25(null);
46738
- const newTurnScrollTimeoutRef = useRef25(null);
46739
- const newTurnSpacerFrameRef = useRef25(null);
46740
- const newTurnAnimationFrameRef = useRef25(null);
46741
- const newTurnAnimationCleanupRef = useRef25(null);
46742
- const isAnimatingNewTurnRef = useRef25(false);
46743
- const heldStickToBottomRef = useRef25(false);
46744
- const pinnedScrollTopRef = useRef25(null);
46745
- const newTurnPinActiveRef = useRef25(false);
46746
- const appliedNewUserMessageKeyRef = useRef25(null);
46747
- const observedLatestUserAnchorRef = useRef25(
46879
+ const rowResizeObserverRef = useRef26(null);
46880
+ const boundaryAnchorRef = useRef26(null);
46881
+ const previousStablePrefixEndRef = useRef26(null);
46882
+ const frameRef = useRef26(null);
46883
+ const startScrollFrameRef = useRef26(null);
46884
+ const startScrollTimeoutRef = useRef26(null);
46885
+ const entryScrollFrameRef = useRef26(null);
46886
+ const entryScrollTimeoutRefs = useRef26([]);
46887
+ const appliedStartScrollKeyRef = useRef26(null);
46888
+ const appliedEntryScrollKeyRef = useRef26(null);
46889
+ const newTurnSpacerRef = useRef26(null);
46890
+ const newTurnScrollFrameRef = useRef26(null);
46891
+ const newTurnScrollTimeoutRef = useRef26(null);
46892
+ const newTurnSpacerFrameRef = useRef26(null);
46893
+ const newTurnAnimationFrameRef = useRef26(null);
46894
+ const newTurnAnimationCleanupRef = useRef26(null);
46895
+ const isAnimatingNewTurnRef = useRef26(false);
46896
+ const heldStickToBottomRef = useRef26(false);
46897
+ const pinnedScrollTopRef = useRef26(null);
46898
+ const newTurnPinActiveRef = useRef26(false);
46899
+ const appliedNewUserMessageKeyRef = useRef26(null);
46900
+ const observedLatestUserAnchorRef = useRef26(
46748
46901
  latestUserIsOptimistic ? null : latestUserAnchorId
46749
46902
  );
46750
- const observedLatestUserStableIdRef = useRef25(
46903
+ const observedLatestUserStableIdRef = useRef26(
46751
46904
  latestUserIsOptimistic ? null : latestUserStableId
46752
46905
  );
46753
46906
  const [activeTurnId, setActiveTurnId] = useState32(lastTurnId);
46754
46907
  const [virtualScrollMargin, setVirtualScrollMargin] = useState32(0);
46755
46908
  const [scrollContainerElement, setScrollContainerElement] = useState32(null);
46756
- const loadingOlderRef = useRef25(false);
46909
+ const loadingOlderRef = useRef26(false);
46757
46910
  const virtualizationEnabled = Boolean(useChatEnvironment().useVirtualizer);
46758
46911
  const stablePrefixEnd = useMemo16(
46759
46912
  () => virtualizationEnabled ? findStablePrefixEnd(renderBlocks) : 0,
@@ -47514,7 +47667,7 @@ function MessageListBody({
47514
47667
  stablePrefixEnd,
47515
47668
  virtualizer
47516
47669
  ]);
47517
- return /* @__PURE__ */ jsxs42(
47670
+ return /* @__PURE__ */ jsxs41(
47518
47671
  "div",
47519
47672
  {
47520
47673
  ref: containerRef,
@@ -47533,7 +47686,7 @@ function MessageListBody({
47533
47686
  failedTurnId: navFailedEntryId
47534
47687
  }
47535
47688
  ) : null,
47536
- /* @__PURE__ */ jsxs42(
47689
+ /* @__PURE__ */ jsxs41(
47537
47690
  StickToBottom,
47538
47691
  {
47539
47692
  contextRef: stickContextRef,
@@ -47542,7 +47695,7 @@ function MessageListBody({
47542
47695
  resize: stickyTurn ? { damping: 0.8, stiffness: 0.08, mass: 1 } : "instant",
47543
47696
  targetScrollTop: shouldAnchorEntry ? getAnchorTargetScrollTop : void 0,
47544
47697
  children: [
47545
- /* @__PURE__ */ jsxs42(
47698
+ /* @__PURE__ */ jsxs41(
47546
47699
  StickToBottom.Content,
47547
47700
  {
47548
47701
  part: "messages-scroll",
@@ -47701,7 +47854,7 @@ function MessageListContent({
47701
47854
  const isHistoricalPlan = globalBlockIndex !== latestPlanCardBlockIndex;
47702
47855
  const blockFeedback = displayMessages.map((message) => message.entry_id && resultFeedbackByEntry.get(message.entry_id)).find((feedback) => feedback != null);
47703
47856
  const isActiveFollowup = block.anchorId === followupTurnId;
47704
- return /* @__PURE__ */ jsxs42(
47857
+ return /* @__PURE__ */ jsxs41(
47705
47858
  "div",
47706
47859
  {
47707
47860
  ref: getTurnElementRef(block.anchorId),
@@ -47802,7 +47955,7 @@ function MessageListContent({
47802
47955
  const renderMeasuredRow = (block, globalBlockIndex, virtualItem) => {
47803
47956
  const persistentId = getRenderBlockPersistentId(block);
47804
47957
  const isVirtual = virtualItem !== void 0;
47805
- return /* @__PURE__ */ jsxs42(
47958
+ return /* @__PURE__ */ jsxs41(
47806
47959
  "div",
47807
47960
  {
47808
47961
  ref: getMeasuredRowRef(block, globalBlockIndex, isVirtual),
@@ -47833,8 +47986,8 @@ function MessageListContent({
47833
47986
  {
47834
47987
  part: "messages-content",
47835
47988
  className: `blade-chat-messages-content mx-auto max-w-[748px] ${customization?.classNames?.messageListContent ?? ""}`,
47836
- children: /* @__PURE__ */ jsxs42("div", { className: `min-w-0 flex flex-col gap-9 ${customization?.classNames?.messageListInner ?? ""}`, children: [
47837
- renderBlocks.length === 0 && isLoadingHistory ? /* @__PURE__ */ jsx47(HistoryLoadingPlaceholder, {}) : renderBlocks.length === 0 ? emptyState ? emptyState : customization?.components?.EmptyState ? /* @__PURE__ */ jsx47(customization.components.EmptyState, {}) : /* @__PURE__ */ jsxs42(
47989
+ children: /* @__PURE__ */ jsxs41("div", { className: `min-w-0 flex flex-col gap-9 ${customization?.classNames?.messageListInner ?? ""}`, children: [
47990
+ renderBlocks.length === 0 && isLoadingHistory ? /* @__PURE__ */ jsx47(HistoryLoadingPlaceholder, {}) : renderBlocks.length === 0 ? emptyState ? emptyState : customization?.components?.EmptyState ? /* @__PURE__ */ jsx47(customization.components.EmptyState, {}) : /* @__PURE__ */ jsxs41(
47838
47991
  "div",
47839
47992
  {
47840
47993
  part: "empty",
@@ -47845,7 +47998,7 @@ function MessageListContent({
47845
47998
  /* @__PURE__ */ jsx47("span", { className: "text-sm opacity-60", children: "\u5728\u4E0B\u65B9\u8F93\u5165\u6D88\u606F\u5F00\u59CB\u804A\u5929" })
47846
47999
  ]
47847
48000
  }
47848
- ) : /* @__PURE__ */ jsxs42(Fragment17, { children: [
48001
+ ) : /* @__PURE__ */ jsxs41(Fragment17, { children: [
47849
48002
  stablePrefixEnd > 0 ? /* @__PURE__ */ jsx47(
47850
48003
  "div",
47851
48004
  {
@@ -47869,14 +48022,14 @@ function MessageListContent({
47869
48022
  );
47870
48023
  }
47871
48024
  function HistoryLoadingPlaceholder() {
47872
- return /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-9", "aria-busy": "true", "aria-live": "polite", children: [
47873
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-center gap-2 text-sm text-[hsl(var(--muted-foreground))]", children: [
48025
+ return /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-9", "aria-busy": "true", "aria-live": "polite", children: [
48026
+ /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-center gap-2 text-sm text-[hsl(var(--muted-foreground))]", children: [
47874
48027
  /* @__PURE__ */ jsx47("span", { className: "size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }),
47875
48028
  /* @__PURE__ */ jsx47("span", { children: "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD\u8BB0\u5F55\u2026" })
47876
48029
  ] }),
47877
- [0, 1].map((index2) => /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-4", children: [
48030
+ [0, 1].map((index2) => /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-4", children: [
47878
48031
  /* @__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))]" }) }),
47879
- /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-2.5", children: [
48032
+ /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-2.5", children: [
47880
48033
  /* @__PURE__ */ jsx47("div", { className: "h-4 w-1/3 animate-pulse rounded bg-[hsl(var(--muted))]" }),
47881
48034
  /* @__PURE__ */ jsx47("div", { className: "h-4 w-4/5 animate-pulse rounded bg-[hsl(var(--muted))]" }),
47882
48035
  /* @__PURE__ */ jsx47("div", { className: "h-4 w-3/5 animate-pulse rounded bg-[hsl(var(--muted))]" })
@@ -47887,7 +48040,7 @@ function HistoryLoadingPlaceholder() {
47887
48040
  function ScrollToBottomButton({ onBeforeScroll }) {
47888
48041
  const { isAtBottom, scrollToBottom } = useStickToBottomContext();
47889
48042
  if (isAtBottom) return null;
47890
- return /* @__PURE__ */ jsxs42(
48043
+ return /* @__PURE__ */ jsxs41(
47891
48044
  "button",
47892
48045
  {
47893
48046
  type: "button",
@@ -47907,9 +48060,9 @@ function ScrollToBottomButton({ onBeforeScroll }) {
47907
48060
  }
47908
48061
  function PlanningDivider({ kind }) {
47909
48062
  const isEnter = kind === "enter";
47910
- return /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-3 py-1", children: [
48063
+ return /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-3 py-1", children: [
47911
48064
  /* @__PURE__ */ jsx47("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent" }),
47912
- /* @__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: [
48065
+ /* @__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: [
47913
48066
  /* @__PURE__ */ jsx47(Lightbulb, { size: 12 }),
47914
48067
  /* @__PURE__ */ jsx47("span", { children: isEnter ? "\u8FDB\u5165\u89C4\u5212\u6A21\u5F0F" : "\u89C4\u5212\u5B8C\u6210" })
47915
48068
  ] }),
@@ -47924,7 +48077,7 @@ function MessageList(props) {
47924
48077
  }
47925
48078
 
47926
48079
  // src/chat/runtime/use-chat-actions.ts
47927
- import { useCallback as useCallback15, useEffect as useEffect27, useRef as useRef26, useState as useState33 } from "react";
48080
+ import { useCallback as useCallback15, useEffect as useEffect27, useRef as useRef27, useState as useState33 } from "react";
47928
48081
  function useChatActions(sessionId) {
47929
48082
  const source = useSessionSource();
47930
48083
  const session = useSessionHandle(sessionId);
@@ -47932,7 +48085,7 @@ function useChatActions(sessionId) {
47932
48085
  const [isStopping, setIsStopping] = useState33(false);
47933
48086
  const [queueNotice, setQueueNotice] = useState33(null);
47934
48087
  const [pendingQueueItemId, setPendingQueueItemId] = useState33(null);
47935
- const previousSessionIdRef = useRef26(sessionId);
48088
+ const previousSessionIdRef = useRef27(sessionId);
47936
48089
  const send = useCallback15(
47937
48090
  (msg, targetMode, askuserAnswer, options) => (
47938
48091
  // 等会话就绪再发:等待回答时要按最新状态把输入当作作答
@@ -48085,7 +48238,7 @@ function SessionReplayBar({
48085
48238
  }
48086
48239
 
48087
48240
  // src/chat/ChatPanel.tsx
48088
- import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
48241
+ import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
48089
48242
  function nextQueuedOrder(items, itemId, delta) {
48090
48243
  const pending = items.filter((item) => item.status === "pending");
48091
48244
  const index2 = pending.findIndex((item) => item.id === itemId);
@@ -48114,8 +48267,6 @@ function ChatPanel({
48114
48267
  onCommand,
48115
48268
  canCreateBoardTask,
48116
48269
  canShareSession = false,
48117
- onResyncSkills,
48118
- isResyncingSkills = false,
48119
48270
  onOpenSkills,
48120
48271
  inputLabel,
48121
48272
  onDoubleEscape,
@@ -48246,7 +48397,7 @@ function ChatPanel({
48246
48397
  model: options?.model || void 0,
48247
48398
  thinkingOverride: options?.thinkingOverride,
48248
48399
  reasoningLevel: options?.reasoningLevel,
48249
- kbIds: options?.kbIds,
48400
+ refs: options?.refs,
48250
48401
  topicAssetRefs: options?.topicAssetRefs,
48251
48402
  queueWhenRunning: options?.queueWhenRunning
48252
48403
  });
@@ -48329,8 +48480,6 @@ function ChatPanel({
48329
48480
  SkillStatusBarComponent: SkillStatus,
48330
48481
  skillStatusBarClassName: classNames?.skillStatusBarRoot,
48331
48482
  skillStatusBarInnerClassName: classNames?.skillStatusBarInner,
48332
- onResyncSkills,
48333
- isResyncingSkills,
48334
48483
  onOpenSkills,
48335
48484
  inputLabel,
48336
48485
  placeholderText: placeholder,
@@ -48342,14 +48491,14 @@ function ChatPanel({
48342
48491
  initialDraftKey,
48343
48492
  lite
48344
48493
  };
48345
- 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(
48494
+ 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(
48346
48495
  "div",
48347
48496
  {
48348
48497
  "data-theme": theme,
48349
48498
  part: "root",
48350
48499
  className: cn("blade-chat flex min-h-0 flex-1 flex-col overflow-hidden", classNames?.root),
48351
48500
  children: [
48352
- isViewer && /* @__PURE__ */ jsxs43(
48501
+ isViewer && /* @__PURE__ */ jsxs42(
48353
48502
  "div",
48354
48503
  {
48355
48504
  className: cn(
@@ -48365,7 +48514,7 @@ function ChatPanel({
48365
48514
  !isViewer && /* @__PURE__ */ jsx49(ConnectionBanner, { connection }),
48366
48515
  banner,
48367
48516
  /* @__PURE__ */ jsx49(SessionReplayBar, { sessionId, onExit: onExitReplay }),
48368
- errorMessage && /* @__PURE__ */ jsxs43(
48517
+ errorMessage && /* @__PURE__ */ jsxs42(
48369
48518
  "div",
48370
48519
  {
48371
48520
  part: "error-bar",
@@ -48448,7 +48597,7 @@ function ChatPanel({
48448
48597
  className: cn("mx-auto w-full max-w-3xl px-5 pb-3", classNames?.chatInputInner)
48449
48598
  }
48450
48599
  ) : null,
48451
- !isViewer && /* @__PURE__ */ jsxs43(Fragment18, { children: [
48600
+ !isViewer && /* @__PURE__ */ jsxs42(Fragment18, { children: [
48452
48601
  /* @__PURE__ */ jsx49(
48453
48602
  SessionQueuePanel,
48454
48603
  {
@@ -48480,13 +48629,13 @@ function ChatPanel({
48480
48629
 
48481
48630
  // src/components/SessionPluginSelector.tsx
48482
48631
  import { useEffect as useEffect29, useState as useState35 } from "react";
48483
- import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
48632
+ import { jsx as jsx50, jsxs as jsxs43 } from "react/jsx-runtime";
48484
48633
  function SessionPluginSelector(props) {
48485
48634
  return /* @__PURE__ */ jsx50(PluginSelectorState, { ...props }, props.sessionId);
48486
48635
  }
48487
48636
  function PluginSelectorState({ client, sessionId, className, side = "bottom", onChange }) {
48488
48637
  const [open2, setOpen] = useState35(false);
48489
- return /* @__PURE__ */ jsxs44("div", { className: `relative text-xs ${className ?? ""}`, children: [
48638
+ return /* @__PURE__ */ jsxs43("div", { className: `relative text-xs ${className ?? ""}`, children: [
48490
48639
  /* @__PURE__ */ jsx50(
48491
48640
  "button",
48492
48641
  {
@@ -48512,7 +48661,7 @@ function PluginSelectorList({
48512
48661
  useEffect29(() => {
48513
48662
  reload();
48514
48663
  }, [reload]);
48515
- return /* @__PURE__ */ jsxs44(
48664
+ return /* @__PURE__ */ jsxs43(
48516
48665
  "div",
48517
48666
  {
48518
48667
  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"}`,
@@ -48542,7 +48691,7 @@ function PluginSelectorList({
48542
48691
  }
48543
48692
 
48544
48693
  // src/components/AgentChat.tsx
48545
- import { Fragment as Fragment19, jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
48694
+ import { Fragment as Fragment19, jsx as jsx51, jsxs as jsxs44 } from "react/jsx-runtime";
48546
48695
  function isUnauthorizedError(error61) {
48547
48696
  return error61 instanceof BladeApiError2 && error61.status === 401;
48548
48697
  }
@@ -48561,7 +48710,7 @@ function LoginCard({ client, onLoggedIn }) {
48561
48710
  setLoggingIn(false);
48562
48711
  }
48563
48712
  };
48564
- 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: [
48713
+ 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: [
48565
48714
  /* @__PURE__ */ jsx51(LockKeyhole, { size: 28, className: "text-[hsl(var(--muted-foreground))]" }),
48566
48715
  /* @__PURE__ */ jsx51("div", { className: "text-base font-medium text-[hsl(var(--foreground))]", children: "\u9700\u8981\u767B\u5F55\u540E\u4F7F\u7528" }),
48567
48716
  /* @__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" }),
@@ -48634,8 +48783,8 @@ function ChatSessionView({
48634
48783
  useEffect30(() => {
48635
48784
  setNotice(null);
48636
48785
  }, [resolvedSessionId, replaySpeed, replaying]);
48637
- const onSessionReadyRef = useRef27(onSessionReady);
48638
- const readySessionRef = useRef27(null);
48786
+ const onSessionReadyRef = useRef28(onSessionReady);
48787
+ const readySessionRef = useRef28(null);
48639
48788
  const hasOnSessionReady = onSessionReady !== void 0;
48640
48789
  useEffect30(() => {
48641
48790
  onSessionReadyRef.current = onSessionReady;
@@ -48683,7 +48832,7 @@ function ChatSessionView({
48683
48832
  onFollowupInteraction,
48684
48833
  errorMessage: connectError ?? replay.error?.message ?? notice,
48685
48834
  onExitReplay: () => void replay.exitToAutonomous(),
48686
- banner: /* @__PURE__ */ jsxs45(Fragment19, { children: [
48835
+ banner: /* @__PURE__ */ jsxs44(Fragment19, { children: [
48687
48836
  resolvedSessionId && !isViewer && (sessionPluginControls ? sessionPluginControls(resolvedSessionId) : /* @__PURE__ */ jsx51(SessionPluginSelector, { client, sessionId: resolvedSessionId })),
48688
48837
  /* @__PURE__ */ jsx51(ReplayMismatchPrompt, { mismatch: replay.mismatch })
48689
48838
  ] })
@@ -48696,7 +48845,7 @@ import { chatErrorForDisplay as chatErrorForDisplay4 } from "@blade-hq/agent-cli
48696
48845
  import { useEffect as useEffect31, useMemo as useMemo20, useState as useState39 } from "react";
48697
48846
 
48698
48847
  // src/hooks/use-llm-chat.ts
48699
- import { useCallback as useCallback18, useMemo as useMemo19, useRef as useRef28, useState as useState37 } from "react";
48848
+ import { useCallback as useCallback18, useMemo as useMemo19, useRef as useRef29, useState as useState37 } from "react";
48700
48849
  var DEFAULT_HISTORY_TURNS = 12;
48701
48850
  var DEFAULT_MAX_TOOL_ROUNDS = 4;
48702
48851
  var syntheticIdSeq = 0;
@@ -48707,12 +48856,12 @@ function useLlmChat(options) {
48707
48856
  const [failedToolIds, setFailedToolIds] = useState37([]);
48708
48857
  const [error61, setError] = useState37(null);
48709
48858
  const [isStreaming, setIsStreaming] = useState37(false);
48710
- const abortRef = useRef28(null);
48711
- const activeStartedAtRef = useRef28(null);
48712
- const assistantTimingsRef = useRef28(/* @__PURE__ */ new WeakMap());
48713
- const generationRef = useRef28(0);
48714
- const historyRef = useRef28([]);
48715
- const optionsRef = useRef28(options);
48859
+ const abortRef = useRef29(null);
48860
+ const activeStartedAtRef = useRef29(null);
48861
+ const assistantTimingsRef = useRef29(/* @__PURE__ */ new WeakMap());
48862
+ const generationRef = useRef29(0);
48863
+ const historyRef = useRef29([]);
48864
+ const optionsRef = useRef29(options);
48716
48865
  optionsRef.current = options;
48717
48866
  historyRef.current = history;
48718
48867
  const stop = useCallback18(() => {
@@ -49053,7 +49202,7 @@ function toToolCallInfo(call, results, failedToolIds) {
49053
49202
 
49054
49203
  // src/components/LlmAdvancedSettings.tsx
49055
49204
  import { useState as useState38 } from "react";
49056
- import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
49205
+ import { jsx as jsx52, jsxs as jsxs45 } from "react/jsx-runtime";
49057
49206
  var FIELDS = [
49058
49207
  { id: "baseURL", label: "\u6A21\u578B\u670D\u52A1\u5730\u5740", placeholder: "http://\u5185\u7F51\u5730\u5740/v1" },
49059
49208
  { id: "model", label: "\u6A21\u578B", placeholder: "\u6A21\u578B\u540D\u79F0" },
@@ -49104,8 +49253,8 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49104
49253
  if (!normalized) return null;
49105
49254
  const fields = FIELDS.filter((field) => normalized[field.id]);
49106
49255
  const dirty = Object.keys(override).length > 0;
49107
- return /* @__PURE__ */ jsxs46("div", { className: "blade-chat-advanced border-t border-[hsl(var(--border))] px-4 py-2 text-xs", children: [
49108
- /* @__PURE__ */ jsxs46(
49256
+ return /* @__PURE__ */ jsxs45("div", { className: "blade-chat-advanced border-t border-[hsl(var(--border))] px-4 py-2 text-xs", children: [
49257
+ /* @__PURE__ */ jsxs45(
49109
49258
  "button",
49110
49259
  {
49111
49260
  type: "button",
@@ -49121,8 +49270,8 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49121
49270
  ]
49122
49271
  }
49123
49272
  ),
49124
- open2 && /* @__PURE__ */ jsxs46("div", { className: "mt-2 flex flex-col gap-2", children: [
49125
- fields.map((field) => /* @__PURE__ */ jsxs46("label", { className: "flex flex-col gap-1", children: [
49273
+ open2 && /* @__PURE__ */ jsxs45("div", { className: "mt-2 flex flex-col gap-2", children: [
49274
+ fields.map((field) => /* @__PURE__ */ jsxs45("label", { className: "flex flex-col gap-1", children: [
49126
49275
  /* @__PURE__ */ jsx52("span", { className: "text-[hsl(var(--muted-foreground))]", children: field.label }),
49127
49276
  /* @__PURE__ */ jsx52(
49128
49277
  "input",
@@ -49136,7 +49285,7 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49136
49285
  )
49137
49286
  ] }, field.id)),
49138
49287
  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" }),
49139
- /* @__PURE__ */ jsxs46("div", { className: "flex gap-2", children: [
49288
+ /* @__PURE__ */ jsxs45("div", { className: "flex gap-2", children: [
49140
49289
  /* @__PURE__ */ jsx52(
49141
49290
  "button",
49142
49291
  {
@@ -49171,7 +49320,7 @@ function LlmAdvancedSettingsBar({ settings, defaults, override, onChange }) {
49171
49320
  }
49172
49321
 
49173
49322
  // src/components/LlmChat.tsx
49174
- import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
49323
+ import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
49175
49324
  function LlmChat({
49176
49325
  classNames,
49177
49326
  renderers,
@@ -49203,14 +49352,14 @@ ${text4}` : text4),
49203
49352
  onReady?.(handle);
49204
49353
  }, [handle, onReady]);
49205
49354
  const customization = useMemo20(() => ({ classNames, renderers }), [classNames, renderers]);
49206
- return /* @__PURE__ */ jsx53(ChatCustomizationProvider, { value: customization, children: /* @__PURE__ */ jsxs47(
49355
+ return /* @__PURE__ */ jsx53(ChatCustomizationProvider, { value: customization, children: /* @__PURE__ */ jsxs46(
49207
49356
  "div",
49208
49357
  {
49209
49358
  "data-theme": theme,
49210
49359
  part: "root",
49211
49360
  className: cn("blade-chat flex min-h-0 flex-1 flex-col overflow-hidden", classNames?.root),
49212
49361
  children: [
49213
- error61 ? /* @__PURE__ */ jsxs47(
49362
+ error61 ? /* @__PURE__ */ jsxs46(
49214
49363
  "div",
49215
49364
  {
49216
49365
  part: "error-bar",
@@ -49300,8 +49449,8 @@ function ChatView(props) {
49300
49449
  }
49301
49450
 
49302
49451
  // src/components/TopicAssetSubmitDialog.tsx
49303
- import { useRef as useRef29, useState as useState40 } from "react";
49304
- import { jsx as jsx55, jsxs as jsxs48 } from "react/jsx-runtime";
49452
+ import { useRef as useRef30, useState as useState40 } from "react";
49453
+ import { jsx as jsx55, jsxs as jsxs47 } from "react/jsx-runtime";
49305
49454
  function useTopicAssetSubmissionAccess(sessionId) {
49306
49455
  const client = useBladeClient();
49307
49456
  return useAsyncValue(sessionId, async (signal) => {
@@ -49321,7 +49470,7 @@ function TopicAssetSubmitDialog({ sessionId, topicId, path: path2, onClose, onSu
49321
49470
  const [message, setMessage] = useState40("");
49322
49471
  const [error61, setError] = useState40(null);
49323
49472
  const [busy, setBusy] = useState40(false);
49324
- const submitting = useRef29(false);
49473
+ const submitting = useRef30(false);
49325
49474
  const [revision, setRevision] = useState40(0);
49326
49475
  const assets = useAsyncValue(`${sessionId}:${topicId}:${revision}`, async () => {
49327
49476
  const [session, groups, result] = await Promise.all([
@@ -49359,32 +49508,32 @@ function TopicAssetSubmitDialog({ sessionId, topicId, path: path2, onClose, onSu
49359
49508
  };
49360
49509
  return /* @__PURE__ */ jsx55(Dialog, { open: true, onOpenChange: (open2) => {
49361
49510
  if (!open2 && !busy) onClose();
49362
- }, children: /* @__PURE__ */ jsxs48(DialogContent, { className: "max-w-md", children: [
49511
+ }, children: /* @__PURE__ */ jsxs47(DialogContent, { className: "max-w-md", children: [
49363
49512
  /* @__PURE__ */ jsx55(DialogTitle, { children: "\u63D0\u4EA4\u5230\u8D44\u4EA7" }),
49364
49513
  /* @__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" }),
49365
- /* @__PURE__ */ jsxs48("form", { onSubmit: (event) => {
49514
+ /* @__PURE__ */ jsxs47("form", { onSubmit: (event) => {
49366
49515
  event.preventDefault();
49367
49516
  void submit();
49368
49517
  }, className: "flex flex-col gap-4", children: [
49369
49518
  /* @__PURE__ */ jsx55("p", { className: "break-all text-sm text-secondary-foreground", children: path2 }),
49370
- /* @__PURE__ */ jsxs48("label", { className: "flex flex-col gap-1 text-sm", children: [
49519
+ /* @__PURE__ */ jsxs47("label", { className: "flex flex-col gap-1 text-sm", children: [
49371
49520
  "\u76EE\u6807\u6587\u4EF6\u5939",
49372
- /* @__PURE__ */ jsxs48("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: [
49521
+ /* @__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: [
49373
49522
  /* @__PURE__ */ jsx55("option", { value: "", children: "\u8D44\u4EA7\u6839\u76EE\u5F55" }),
49374
49523
  assets.data?.map((item) => /* @__PURE__ */ jsx55("option", { value: item, children: item }, item))
49375
49524
  ] })
49376
49525
  ] }),
49377
- /* @__PURE__ */ jsxs48("label", { className: "flex flex-col gap-1 text-sm", children: [
49526
+ /* @__PURE__ */ jsxs47("label", { className: "flex flex-col gap-1 text-sm", children: [
49378
49527
  "\u8BF4\u660E\uFF08\u53EF\u9009\uFF09",
49379
49528
  /* @__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" })
49380
49529
  ] }),
49381
- assets.error ? /* @__PURE__ */ jsxs48("div", { role: "alert", className: "text-sm text-muted-foreground", children: [
49530
+ assets.error ? /* @__PURE__ */ jsxs47("div", { role: "alert", className: "text-sm text-muted-foreground", children: [
49382
49531
  assets.error instanceof Error ? assets.error.message : "\u8D44\u4EA7\u52A0\u8F7D\u5931\u8D25",
49383
49532
  " ",
49384
49533
  /* @__PURE__ */ jsx55("button", { type: "button", onClick: () => setRevision((n2) => n2 + 1), className: "underline", children: "\u91CD\u8BD5" })
49385
49534
  ] }) : !assets.data ? /* @__PURE__ */ jsx55("output", { className: "text-sm text-muted-foreground", children: "\u6B63\u5728\u52A0\u8F7D\u8D44\u4EA7\u2026" }) : null,
49386
49535
  error61 ? /* @__PURE__ */ jsx55("p", { role: "alert", className: "text-sm text-muted-foreground", children: error61 }) : null,
49387
- /* @__PURE__ */ jsxs48("div", { className: "flex justify-end gap-2", children: [
49536
+ /* @__PURE__ */ jsxs47("div", { className: "flex justify-end gap-2", children: [
49388
49537
  /* @__PURE__ */ jsx55("button", { type: "button", disabled: busy, onClick: onClose, className: "rounded-md border border-border px-3 py-2 text-sm", children: "\u53D6\u6D88" }),
49389
49538
  /* @__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" })
49390
49539
  ] })
@@ -49443,4 +49592,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
49443
49592
  js-yaml/dist/js-yaml.mjs:
49444
49593
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
49445
49594
  */
49446
- //# sourceMappingURL=chunk-T5WGKZN4.js.map
49595
+ //# sourceMappingURL=chunk-67GHJQK5.js.map