@nextclaw/ui 0.15.3 → 0.15.5

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 (314) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/assets/abnfDiagram-VRR7QNED-BYpK0F5F.js +1 -0
  3. package/dist/assets/aiden0z-pptx-renderer.es-D87ywFdC.js +94 -0
  4. package/dist/assets/api-IlX_CbwU.js +13 -0
  5. package/dist/assets/app-presenter-provider-Bbl_MVbg.js +106 -0
  6. package/dist/assets/app-presenter-provider-D3BuuOyZ.css +1 -0
  7. package/dist/assets/appearance-settings-page-80fLa4-9.js +1 -0
  8. package/dist/assets/arc-DFELHWM2.js +1 -0
  9. package/dist/assets/architecture-TIHT7OUA-ClwVFq-K.js +1 -0
  10. package/dist/assets/architectureDiagram-ZJ3FMSHR-CvRhdovL.js +36 -0
  11. package/dist/assets/array-BqYdCIE6.js +1 -0
  12. package/dist/assets/blockDiagram-677ZJIJ3-DVYNkbR_.js +132 -0
  13. package/dist/assets/{book-open-C3mJGwiy.js → book-open-CN7Shpij.js} +1 -1
  14. package/dist/assets/c4Diagram-LMCZKHZV-B1w-iwRe.js +10 -0
  15. package/dist/assets/channel-BEHOSFc5.js +1 -0
  16. package/dist/assets/channels-list-page-R7M6pzp6.js +8 -0
  17. package/dist/assets/chat-page-152YuwfU.js +1 -0
  18. package/dist/assets/chunk-2Q5K7J3B-DrIhesSX.js +1 -0
  19. package/dist/assets/chunk-32BRIVSS-kG3lg0bC.js +1 -0
  20. package/dist/assets/chunk-52WLFC77-BLeB7iGk.js +10 -0
  21. package/dist/assets/chunk-5FCAYU7R-BQga1Rr7.js +1 -0
  22. package/dist/assets/chunk-5HE753X5-DU81hkcF.js +1 -0
  23. package/dist/assets/chunk-5JV3BV7I-C2bAx0m7.js +1 -0
  24. package/dist/assets/chunk-5TONJI2A-BExIIgWY.js +2 -0
  25. package/dist/assets/chunk-5VM5RSS4-C3XB05yh.js +15 -0
  26. package/dist/assets/chunk-7BUUIJ7U-JiyRtrGu.js +1 -0
  27. package/dist/assets/chunk-BIQX33UG-BZRV20pI.js +1 -0
  28. package/dist/assets/chunk-C7G6YPKG-AsyDSQ9j.js +1 -0
  29. package/dist/assets/chunk-CQNSW5MT-iN-fiXVA.js +1 -0
  30. package/dist/assets/chunk-CYSBUYHQ-DhC_TRzI.js +1 -0
  31. package/dist/assets/chunk-DseTPa7n.js +1 -0
  32. package/dist/assets/chunk-EMLP6XTP-QFLK8R6d.js +1 -0
  33. package/dist/assets/chunk-EX3LRPZG-DzUwhkCz.js +231 -0
  34. package/dist/assets/chunk-FWX5IMBZ-DFelpZBy.js +2 -0
  35. package/dist/assets/chunk-HOUHSVGY-BMPwFEwN.js +1 -0
  36. package/dist/assets/chunk-ICXQ74PX-DH8NJMok.js +2 -0
  37. package/dist/assets/chunk-JG7HCLWE-D-95AsO4.js +2 -0
  38. package/dist/assets/chunk-JWPE2WC7-DIaTv8kx.js +1 -0
  39. package/dist/assets/chunk-KEIR6QF5-A3jEqwzn.js +161 -0
  40. package/dist/assets/chunk-MOJQB5TN-BPFLzWgj.js +88 -0
  41. package/dist/assets/chunk-MOZMSUNE-DR_fzxG0.js +1 -0
  42. package/dist/assets/chunk-OGEWGWER-TIcEoPPH.js +1 -0
  43. package/dist/assets/chunk-OSBZ3O6U-BALNvSfG.js +1 -0
  44. package/dist/assets/chunk-PUDLZKDR-I-EXhf_k.js +156 -0
  45. package/dist/assets/chunk-Q4XR5HBZ-uvIGstBS.js +70 -0
  46. package/dist/assets/chunk-QBLGF6JB-r-TjLdxa.js +1 -0
  47. package/dist/assets/chunk-R7FJI6CG-N-1LDgvy.js +1 -0
  48. package/dist/assets/chunk-RYQCIY6F-jxNASx65.js +1 -0
  49. package/dist/assets/chunk-U6XO7XAA-Cphbuc7q.js +2 -0
  50. package/dist/assets/chunk-V7JOEXUC-BLEuBf1s.js +206 -0
  51. package/dist/assets/chunk-VAUOI2AC-Dpcz6BhT.js +1 -0
  52. package/dist/assets/chunk-VR4S4FIN-BAUbR0ke.js +1 -0
  53. package/dist/assets/chunk-WYO6CB5R-Do6SJrnY.js +127 -0
  54. package/dist/assets/chunk-XXDRQBXY-C2QjjwYX.js +1 -0
  55. package/dist/assets/chunk-Y2CYZVJY-BGrd8tLy.js +1 -0
  56. package/dist/assets/chunk-YOTPTUD7-CQqvMTCr.js +1 -0
  57. package/dist/assets/chunk-ZGVPDNZ5-B7kWWaXv.js +62 -0
  58. package/dist/assets/chunk-ZIRB5QZD-DTU0cDNh.js +32 -0
  59. package/dist/assets/classDiagram-OUVF2IWQ-DESMaY3_.js +1 -0
  60. package/dist/assets/classDiagram-v2-EOCWNBFH-DwOlByYH.js +1 -0
  61. package/dist/assets/config-split-page-BlfvfmTm.js +1 -0
  62. package/dist/assets/confirm-dialog-Dt8Kdbgp.js +5 -0
  63. package/dist/assets/cose-bilkent-JH36ORCC-B9LrtV-q.js +1 -0
  64. package/dist/assets/cynefin-VYW2F7L2-CzjeeOq9.js +1 -0
  65. package/dist/assets/cynefinDiagram-TSTJHNR4-BfjvW4su.js +62 -0
  66. package/dist/assets/cytoscape.esm-CRW8q92n.js +321 -0
  67. package/dist/assets/dagre-DkiXZKkL.js +1 -0
  68. package/dist/assets/dagre-VKFMJZFB-B1pQKQSY.js +4 -0
  69. package/dist/assets/defaultLocale-Cdv9x6q7.js +1 -0
  70. package/dist/assets/desktop-update-config-DreMJu9z.js +1 -0
  71. package/dist/assets/diagram-FQU43EPY-cB4EZdaP.js +3 -0
  72. package/dist/assets/diagram-G47NLZAW-CtW8im1B.js +24 -0
  73. package/dist/assets/diagram-NH7WQ7WH-BDCtrCCm.js +24 -0
  74. package/dist/assets/diagram-OA4YK3LP-DEMJ42Gt.js +30 -0
  75. package/dist/assets/diagram-WEI45ONY-CdCcxSYU.js +41 -0
  76. package/dist/assets/dist-D5ycbwCo.js +41 -0
  77. package/dist/assets/dist-dw-gAfM_.js +1 -0
  78. package/dist/assets/doc-browser-C9u7N9vH.js +1 -0
  79. package/dist/assets/doc-browser-DJQ5XPsi2.js +1 -0
  80. package/dist/assets/doc-browser-context-CCdW9TJf.js +1 -0
  81. package/dist/assets/docx-preview-zis3U0Fa.js +20 -0
  82. package/dist/assets/download-CyPgglKr.js +1 -0
  83. package/dist/assets/ebnfDiagram-CCIWWBDH-DBZETBwE.js +1 -0
  84. package/dist/assets/erDiagram-Q63AITRT-y2zDXprP.js +85 -0
  85. package/dist/assets/eventmodeling-45OFAUF4-C38BqG8w.js +1 -0
  86. package/dist/assets/{external-link-CU0kzzIP.js → external-link-BahW1sl3.js} +1 -1
  87. package/dist/assets/eye-D8gGXMkD.js +1 -0
  88. package/dist/assets/flowDiagram-23GEKE2U-BoKk8RRq.js +1 -0
  89. package/dist/assets/folder-DGWqFDvE.js +1 -0
  90. package/dist/assets/{form-actions-BvCp_0lS.js → form-actions-D2imZLnU.js} +1 -1
  91. package/dist/assets/ganttDiagram-NO4QXBWP-D2DP344e.js +292 -0
  92. package/dist/assets/gitGraph-TEB2WS4Q-IsQHHJuS.js +1 -0
  93. package/dist/assets/gitGraphDiagram-IHSO6WYX-D37uiwA2.js +106 -0
  94. package/dist/assets/graphlib-BcNFQr5y.js +1 -0
  95. package/dist/assets/index-0av6WO9-.css +1 -0
  96. package/dist/assets/index-CT0iYlxV.js +2 -0
  97. package/dist/assets/info-DKCQHKI2-ofy2qlHI.js +1 -0
  98. package/dist/assets/infoDiagram-FWYZ7A6U-CG-WAIRi.js +2 -0
  99. package/dist/assets/init-D8TjIqfm.js +1 -0
  100. package/dist/assets/ishikawaDiagram-FXEZZL3T-WeCTnW0f.js +70 -0
  101. package/dist/assets/journeyDiagram-5HDEW3XC-DUFBW9Td.js +139 -0
  102. package/dist/assets/jszip.min-CP5uPNQa.js +2 -0
  103. package/dist/assets/kanban-definition-HUTT4EX6-B0lxgMpg.js +89 -0
  104. package/dist/assets/katex-wEmrEFTg.js +257 -0
  105. package/dist/assets/line-B78frP_c.js +1 -0
  106. package/dist/assets/linear-C6lVEcb2.js +1 -0
  107. package/dist/assets/loader-circle-DtKek-qG.js +1 -0
  108. package/dist/assets/logo-badge-CuPetu-v.js +1 -0
  109. package/dist/assets/map-Bdri5UL5.js +1 -0
  110. package/dist/assets/mcp-marketplace-page-4qMwFDpz.js +1 -0
  111. package/dist/assets/mcp-marketplace-page-BbxN5aZF.js +9 -0
  112. package/dist/assets/mermaid-parser.core-Cue18vLo.js +4 -0
  113. package/dist/assets/mermaid.core-CXwWRh5i.js +11 -0
  114. package/dist/assets/mindmap-definition-LN4V7U3C-CFxz0P0-.js +96 -0
  115. package/dist/assets/model-config-page-DiJcvBML.js +1 -0
  116. package/dist/assets/ordinal-Cbd8t4LB.js +1 -0
  117. package/dist/assets/packet-7NZHBO7P-Rfopfa1o.js +1 -0
  118. package/dist/assets/path-DzBnMI1r.js +1 -0
  119. package/dist/assets/pegDiagram-2B236MQR-B_Qt9zyT.js +1 -0
  120. package/dist/assets/pie-RZYD4A2V-CJR1xKEv.js +1 -0
  121. package/dist/assets/pieDiagram-ENE6RG2P-CRQdSuwS.js +39 -0
  122. package/dist/assets/plus-BwgE-Zwf.js +1 -0
  123. package/dist/assets/popover-Btp7KVc3.js +1 -0
  124. package/dist/assets/preload-helper-D4M6sveU.js +1 -0
  125. package/dist/assets/provider-models-BoUhFo9R.js +1 -0
  126. package/dist/assets/provider-scoped-model-input-DZMtoAJG.js +1 -0
  127. package/dist/assets/providers-config-page-DfiWveEF.js +1 -0
  128. package/dist/assets/quadrantDiagram-ABIIQ3AL-D5kPpttq.js +7 -0
  129. package/dist/assets/radar-I7S5WNFK-CDg8Z-1r.js +1 -0
  130. package/dist/assets/railroad-3IZDKUUU-BHnNmjxO.js +1 -0
  131. package/dist/assets/railroad-abnf-AHOZXSZD-DGtNcusW.js +1 -0
  132. package/dist/assets/railroad-ebnf-EBAXGLYW-BRFtsQmm.js +1 -0
  133. package/dist/assets/railroad-peg-LSFZ7HO6-Bj5IypCA.js +1 -0
  134. package/dist/assets/railroadDiagram-RFXS5EU6-DGh_TGlQ.js +1 -0
  135. package/dist/assets/react-BY-U3h3t.js +8 -0
  136. package/dist/assets/{refresh-cw-CILd1vAP.js → refresh-cw-Cme5qFej.js} +1 -1
  137. package/dist/assets/remote-BaVECEZw.js +1 -0
  138. package/dist/assets/requirementDiagram-TGXJPOKE-EmFph0H_.js +84 -0
  139. package/dist/assets/rotate-cw-CMRZxIkH.js +1 -0
  140. package/dist/assets/rough.esm-wJ1d3nQl.js +1 -0
  141. package/dist/assets/runtime-config-page-wygwvMB4.js +1 -0
  142. package/dist/assets/sankeyDiagram-HTMAVEWB-BXWB5Ugi.js +40 -0
  143. package/dist/assets/{save-ByJqcPTP.js → save-DNg2yJTS.js} +1 -1
  144. package/dist/assets/{search-DVIV6pfD.js → search-3ykfrAFt.js} +1 -1
  145. package/dist/assets/search-config-page-DrVKa_Ls.js +1 -0
  146. package/dist/assets/secrets-config-page-B39uQ5kF.js +3 -0
  147. package/dist/assets/security-config-BPzet76z.js +1 -0
  148. package/dist/assets/select-B5EecXJt.js +1 -0
  149. package/dist/assets/sequenceDiagram-DBY2YBRQ-ClKnO7v0.js +162 -0
  150. package/dist/assets/setting-row-Qv1Ps79v.js +1 -0
  151. package/dist/assets/{settings-2-CH5shGg_.js → settings-2-D-3um9Az.js} +1 -1
  152. package/dist/assets/sizeCapture-X5ZJPWSS-DSo-t5ou.js +1 -0
  153. package/dist/assets/{skeleton-DeX1FKw7.js → skeleton-BgkzQd4U.js} +1 -1
  154. package/dist/assets/src-Dad2ZbCt.js +1 -0
  155. package/dist/assets/stateDiagram-2N3HPSRC-BvAalBfz.js +1 -0
  156. package/dist/assets/stateDiagram-v2-6OUMAXLB-CfMU38yc.js +1 -0
  157. package/dist/assets/swimlanes-5IMT3BWC-DdVqVa1a.js +2 -0
  158. package/dist/assets/swimlanesDiagram-G3AALYLV-D9Zb9X57.js +8 -0
  159. package/dist/assets/tabs-BVD8gp3y.js +1 -0
  160. package/dist/assets/tag-chip-0qn-f3Bo.js +1 -0
  161. package/dist/assets/timeline-definition-FHXFAJF6-D4ar8IQY.js +120 -0
  162. package/dist/assets/trash-2-cnsMppRC.js +1 -0
  163. package/dist/assets/treeView-QDETBFTQ-Uy7M0WvH.js +1 -0
  164. package/dist/assets/treemap-6X3UGDF4-BJfGV7KX.js +1 -0
  165. package/dist/assets/use-config-D6yx0lb0.js +1 -0
  166. package/dist/assets/use-confirm-dialog-C_o0eQeH.js +1 -0
  167. package/dist/assets/use-viewport-layout-BWav4KCL.js +1 -0
  168. package/dist/assets/vennDiagram-L72KCM5P-CDXJ_i3p.js +34 -0
  169. package/dist/assets/wardley-OPB4EBWU-q263iF3K.js +1 -0
  170. package/dist/assets/wardleyDiagram-EHGQE667-D-dSuT_7.js +78 -0
  171. package/dist/assets/x-B3o1dWR5.js +1 -0
  172. package/dist/assets/xlsx-DUqJhg5u.js +64 -0
  173. package/dist/assets/xychartDiagram-FW5EYKEG-C9JCzsZF.js +7 -0
  174. package/dist/index.html +35 -28
  175. package/package.json +11 -6
  176. package/src/features/chat/components/chat-popover-content.tsx +1 -0
  177. package/src/features/chat/components/conversation/__tests__/chat-conversation-content.test.tsx +13 -0
  178. package/src/features/chat/components/conversation/__tests__/chat-conversation-header-section.test.tsx +21 -11
  179. package/src/features/chat/components/conversation/__tests__/chat-conversation-header.test.tsx +2 -2
  180. package/src/features/chat/components/conversation/__tests__/chat-conversation-workspace-section.test.tsx +28 -1
  181. package/src/features/chat/components/conversation/chat-conversation-content.tsx +5 -4
  182. package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +9 -18
  183. package/src/features/chat/components/conversation/chat-conversation-track.tsx +35 -0
  184. package/src/features/chat/components/conversation/chat-conversation-workspace-section.tsx +2 -0
  185. package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +7 -7
  186. package/src/features/chat/components/layout/chat-sidebar-utility-menu.tsx +3 -14
  187. package/src/features/chat/features/conversation/components/__tests__/session-conversation-input.streaming.test.tsx +20 -1
  188. package/src/features/chat/features/conversation/components/session-conversation-input.tsx +97 -65
  189. package/src/features/chat/features/input/input-surface-plugins/__tests__/slash-command-plugin.test.ts +43 -0
  190. package/src/features/chat/features/input/input-surface-plugins/slash-command-plugin.utils.ts +14 -10
  191. package/src/features/chat/features/input/utils/__tests__/chat-input-bar.utils.test.ts +51 -0
  192. package/src/features/chat/features/input/utils/chat-input-bar.utils.ts +61 -21
  193. package/src/features/chat/features/message/components/__tests__/chat-message-list.container.test.tsx +42 -10
  194. package/src/features/chat/features/message/components/chat-inline-file-preview.tsx +80 -0
  195. package/src/features/chat/features/message/components/chat-message-list.container.tsx +66 -56
  196. package/src/features/chat/features/message/utils/__tests__/chat-message-file-operation.utils.test.ts +30 -0
  197. package/src/features/chat/features/message/utils/chat-message-texts.utils.ts +2 -0
  198. package/src/features/chat/features/session/components/__tests__/chat-sidebar-session-item.test.tsx +37 -0
  199. package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +4 -3
  200. package/src/features/chat/features/session/components/chat-sidebar-session-item.tsx +3 -8
  201. package/src/features/chat/features/session/components/session-header/__tests__/chat-session-header-actions.test.tsx +65 -20
  202. package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +26 -28
  203. package/src/features/chat/features/session/components/session-header/chat-session-project-badge.tsx +3 -3
  204. package/src/features/chat/features/session/components/session-header/chat-session-title-switcher.tsx +3 -3
  205. package/src/features/chat/features/welcome/components/chat-welcome-project-picker.tsx +3 -3
  206. package/src/features/chat/features/welcome/components/chat-welcome-session-type-picker.tsx +3 -3
  207. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +424 -129
  208. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +113 -2
  209. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel.test.tsx +3 -1
  210. package/src/features/chat/features/workspace/components/chat-session-workspace-directory-browser.tsx +197 -44
  211. package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumb-browser.tsx +9 -3
  212. package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumbs.tsx +13 -22
  213. package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +96 -194
  214. package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +239 -1
  215. package/src/features/chat/features/workspace/components/chat-session-workspace-panel-nav.tsx +61 -7
  216. package/src/features/chat/features/workspace/components/chat-session-workspace-panel.tsx +34 -8
  217. package/src/features/chat/features/workspace/components/file-content-preview/use-workspace-file-buffer.ts +42 -0
  218. package/src/features/chat/features/workspace/components/file-content-preview/workspace-document-preview-state.tsx +18 -0
  219. package/src/features/chat/features/workspace/components/file-content-preview/workspace-docx-preview.css +89 -0
  220. package/src/features/chat/features/workspace/components/file-content-preview/workspace-docx-preview.tsx +87 -0
  221. package/src/features/chat/features/workspace/components/file-content-preview/workspace-presentation-preview.tsx +82 -0
  222. package/src/features/chat/features/workspace/components/file-content-preview/workspace-spreadsheet-preview.tsx +180 -0
  223. package/src/features/chat/features/workspace/components/workspace-file-content-preview.tsx +191 -0
  224. package/src/features/chat/features/workspace/hooks/use-chat-conversation-workspace-state.ts +1 -4
  225. package/src/features/chat/features/workspace/utils/__tests__/chat-workspace-panel-view-model.utils.test.ts +157 -13
  226. package/src/features/chat/features/workspace/utils/chat-thread-workspace-session.utils.ts +151 -2
  227. package/src/features/chat/features/workspace/utils/chat-workspace-file-tab-persistence.utils.ts +17 -0
  228. package/src/features/chat/features/workspace/utils/chat-workspace-file-tab.utils.ts +66 -0
  229. package/src/features/chat/features/workspace/utils/chat-workspace-file-viewer.utils.ts +49 -0
  230. package/src/features/chat/features/workspace/utils/chat-workspace-panel-layout.utils.ts +13 -0
  231. package/src/features/chat/features/workspace/utils/chat-workspace-panel-view-model.utils.ts +196 -43
  232. package/src/features/chat/index.ts +1 -0
  233. package/src/features/chat/managers/__tests__/chat-thread-workspace.manager.test.ts +101 -0
  234. package/src/features/chat/managers/__tests__/chat-thread.manager.test.ts +48 -60
  235. package/src/features/chat/managers/chat-session-list.manager.ts +1 -0
  236. package/src/features/chat/managers/chat-thread.manager.ts +137 -162
  237. package/src/features/chat/pages/ncp-chat-page.tsx +1 -2
  238. package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +87 -1
  239. package/src/features/chat/stores/chat-message-layout.store.test.ts +37 -0
  240. package/src/features/chat/stores/chat-message-layout.store.ts +41 -0
  241. package/src/features/chat/stores/chat-thread.store.ts +77 -40
  242. package/src/features/chat/types/chat-input-bar.types.ts +2 -0
  243. package/src/features/settings/pages/__tests__/appearance-settings-page.test.tsx +25 -8
  244. package/src/features/settings/pages/appearance-settings-page.tsx +92 -13
  245. package/src/index.css +36 -2
  246. package/src/shared/components/__tests__/file-type-icon.test.tsx +61 -0
  247. package/src/shared/components/common/__tests__/brand-header.test.tsx +17 -7
  248. package/src/shared/components/common/brand-header.tsx +34 -34
  249. package/src/shared/components/doc-browser/__tests__/doc-browser-context.test.tsx +19 -0
  250. package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +16 -0
  251. package/src/shared/components/doc-browser/doc-browser-context.tsx +1 -0
  252. package/src/shared/components/doc-browser/doc-browser.tsx +11 -3
  253. package/src/shared/components/doc-browser/managers/doc-browser.manager.ts +5 -0
  254. package/src/shared/components/doc-browser/stores/doc-browser.store.ts +6 -1
  255. package/src/shared/components/doc-browser/types/doc-browser.types.ts +2 -0
  256. package/src/shared/components/doc-browser/utils/doc-browser-state.utils.ts +11 -0
  257. package/src/shared/components/file-type-icon.tsx +272 -0
  258. package/src/shared/components/resizable-right-panel/__tests__/resizable-right-panel.test.tsx +22 -0
  259. package/src/shared/components/resizable-right-panel/resizable-right-panel.tsx +17 -2
  260. package/src/shared/components/ui/tab-strip/__tests__/compact-tab-strip.test.tsx +38 -0
  261. package/src/shared/components/ui/tab-strip/compact-tab-strip.tsx +82 -2
  262. package/src/shared/hooks/use-server-path-read.ts +10 -5
  263. package/src/shared/lib/api/__tests__/server-path.utils.test.ts +28 -0
  264. package/src/shared/lib/api/types.ts +3 -3
  265. package/src/shared/lib/api/utils/server-path.utils.ts +20 -20
  266. package/src/shared/lib/i18n/locales/en-US/chat.json +25 -1
  267. package/src/shared/lib/i18n/locales/en-US/core.json +6 -0
  268. package/src/shared/lib/i18n/locales/zh-CN/chat.json +25 -1
  269. package/src/shared/lib/i18n/locales/zh-CN/core.json +6 -0
  270. package/src/shared/lib/session-project/__tests__/workspace-file-breadcrumb.test.ts +1 -4
  271. package/src/shared/lib/session-project/workspace-file-breadcrumb.utils.ts +1 -18
  272. package/dist/assets/api-iNBpppzj.js +0 -13
  273. package/dist/assets/appearance-settings-page-DMffQFR3.js +0 -1
  274. package/dist/assets/channels-list-page-CCtp0BRS.js +0 -8
  275. package/dist/assets/chat-page-H5a0dWvO.js +0 -1
  276. package/dist/assets/config-split-page-CrOJgB-Y.js +0 -1
  277. package/dist/assets/confirm-dialog-Chv50USy.js +0 -5
  278. package/dist/assets/desktop-update-config-KzTuXRf_.js +0 -1
  279. package/dist/assets/dist-BunzmC4B.js +0 -1
  280. package/dist/assets/dist-ChmGwvtK.js +0 -1
  281. package/dist/assets/doc-browser-DNRL4Zvd.js +0 -1
  282. package/dist/assets/doc-browser-Dg0pmkOg.js +0 -1
  283. package/dist/assets/doc-browser-context-BHY-0FSD.js +0 -1
  284. package/dist/assets/es2015-DQZ5JWwK.js +0 -41
  285. package/dist/assets/i18n-provider-Cu8XyZb_.js +0 -1
  286. package/dist/assets/index-CzfBdvK1.css +0 -1
  287. package/dist/assets/index-DGqHne1Q.js +0 -104
  288. package/dist/assets/loader-circle-CDSFuzmk.js +0 -1
  289. package/dist/assets/mcp-marketplace-page-BeEQK0DL.js +0 -9
  290. package/dist/assets/mcp-marketplace-page-D6idOTLp.js +0 -1
  291. package/dist/assets/model-config-page-bNNo-XyG.js +0 -1
  292. package/dist/assets/plus-D4DsdLN-.js +0 -1
  293. package/dist/assets/provider-scoped-model-input-IlgQCsoT.js +0 -1
  294. package/dist/assets/providers-config-page-wLo6CAJw.js +0 -1
  295. package/dist/assets/react-BPIsQIlO.js +0 -8
  296. package/dist/assets/remote-uKEYp7AR.js +0 -1
  297. package/dist/assets/rotate-cw-wPFPg1kH.js +0 -1
  298. package/dist/assets/runtime-config-page-DDn1sP4G.js +0 -1
  299. package/dist/assets/search-config-page-B-Cf4iiB.js +0 -1
  300. package/dist/assets/secrets-config-page-DPKsY8Iw.js +0 -3
  301. package/dist/assets/security-config-e9SSBlKr.js +0 -1
  302. package/dist/assets/select-BdgczSNw.js +0 -1
  303. package/dist/assets/setting-row-BkTVUTKx.js +0 -1
  304. package/dist/assets/side-dock-BsBvcJ9i.js +0 -3
  305. package/dist/assets/switch-Cv8Ekb3x.js +0 -1
  306. package/dist/assets/tag-chip-RB9uKcoC.js +0 -1
  307. package/dist/assets/tooltip-oQlEN-l6.js +0 -1
  308. package/dist/assets/use-config-l3W7y8Qz.js +0 -1
  309. package/dist/assets/use-confirm-dialog-BAxaVOJI.js +0 -1
  310. package/dist/assets/x-BBMffEN0.js +0 -1
  311. package/src/features/chat/components/layout/__tests__/chat-sidebar-utility-menu.test.tsx +0 -55
  312. /package/dist/assets/{config-hints-C_iP1zl_.js → config-hints-LxG80Uj5.js} +0 -0
  313. /package/dist/assets/{host-capabilities-9bB_998Z.js → host-capabilities-CFbAfrrA.js} +0 -0
  314. /package/dist/assets/{middleware-BILWbJE4.js → middleware-CAXxl-af.js} +0 -0
@@ -2,7 +2,6 @@ import { useMemo } from "react";
2
2
  import type {
3
3
  ChatFileOpenActionViewModel,
4
4
  ChatFileOperationBlockViewModel,
5
- ChatFilePreviewViewer,
6
5
  } from "@nextclaw/agent-chat-ui";
7
6
  import {
8
7
  ChatMessageMarkdown,
@@ -11,6 +10,11 @@ import {
11
10
  import type { ChatWorkspaceFileTab } from "@/features/chat/stores/chat-thread.store";
12
11
  import { ChatSessionWorkspaceDirectoryBrowser } from "./chat-session-workspace-directory-browser";
13
12
  import { ChatSessionWorkspaceFileBreadcrumbs } from "./chat-session-workspace-file-breadcrumbs";
13
+ import {
14
+ resolveWorkspaceFileContentKind,
15
+ WorkspaceFileContentPreview,
16
+ type WorkspaceFileContentKind,
17
+ } from "./workspace-file-content-preview";
14
18
  import { useServerPathBrowse } from "@/shared/hooks/use-server-path-browse";
15
19
  import { useServerPathRead } from "@/shared/hooks/use-server-path-read";
16
20
  import { buildServerPathContentUrl } from "@/shared/lib/api";
@@ -21,6 +25,7 @@ import {
21
25
  import { t } from "@/shared/lib/i18n";
22
26
  import { buildWorkspaceFileBreadcrumb } from "@/shared/lib/session-project";
23
27
  import { cn } from "@/shared/lib/utils";
28
+ import { resolveWorkspaceFileViewer } from "@/features/chat/features/workspace/utils/chat-workspace-file-viewer.utils";
24
29
 
25
30
  function inferPreviewKind(params: {
26
31
  path: string;
@@ -32,40 +37,10 @@ function inferPreviewKind(params: {
32
37
  return /\.mdx?$/i.test(params.path) ? "markdown" : "text";
33
38
  }
34
39
 
35
- function resolveFilePreviewViewer(params: {
36
- path: string;
37
- viewer?: ChatFilePreviewViewer | null;
38
- }): "source" | "rendered" {
39
- return params.viewer === "rendered" && /\.html?$/i.test(params.path) ? "rendered" : "source";
40
- }
41
-
42
- type ContentUrlPreviewKind = "image" | "audio" | "video" | "pdf" | "html" | "other";
43
-
44
- function resolveContentUrlPreviewKind(params: {
45
- path: string;
46
- mimeType?: string | null;
47
- }): ContentUrlPreviewKind {
48
- const mime = params.mimeType?.trim().toLowerCase() ?? "";
49
- const path = params.path.trim().toLowerCase();
50
- if (mime.startsWith("image/") || /\.(avif|bmp|gif|heic|heif|ico|jpe?g|png|svg|tiff?|webp)$/i.test(path)) {
51
- return "image";
52
- }
53
- if (mime.startsWith("audio/") || /\.(aac|flac|m4a|mp3|ogg|opus|wav|weba)$/i.test(path)) {
54
- return "audio";
55
- }
56
- if (mime.startsWith("video/") || /\.(avi|m4v|mkv|mov|mp4|webm|wmv)$/i.test(path)) {
57
- return "video";
58
- }
59
- if (mime.includes("pdf") || path.endsWith(".pdf")) {
60
- return "pdf";
61
- }
62
- if (mime.includes("html") || /\.html?$/i.test(path)) {
63
- return "html";
64
- }
65
- return "other";
66
- }
67
-
68
- function appendPreviewRefreshVersion(url: string, refreshVersion: number): string {
40
+ function appendPreviewRefreshVersion(
41
+ url: string,
42
+ refreshVersion: number,
43
+ ): string {
69
44
  if (refreshVersion <= 0) {
70
45
  return url;
71
46
  }
@@ -76,10 +51,10 @@ function buildPreviewBlock(params: {
76
51
  path: string;
77
52
  text: string;
78
53
  languageHint?: string | null;
79
- line?: number | null;
54
+ startLine?: number | null;
80
55
  }): ChatFileOperationBlockViewModel {
81
- const { languageHint, line, path, text } = params;
82
- const startLine = line ?? 1;
56
+ const { languageHint, path, startLine, text } = params;
57
+ const normalizedStartLine = startLine ?? 1;
83
58
  return {
84
59
  key: `preview:${path}`,
85
60
  path,
@@ -87,13 +62,13 @@ function buildPreviewBlock(params: {
87
62
  lines: buildPreviewLines({
88
63
  text,
89
64
  kind: "context",
90
- oldStartLine: startLine,
91
- newStartLine: startLine,
65
+ oldStartLine: normalizedStartLine,
66
+ newStartLine: normalizedStartLine,
92
67
  }),
93
68
  rawText: text,
94
69
  languageHint: languageHint ?? null,
95
- oldStartLine: startLine,
96
- newStartLine: startLine,
70
+ oldStartLine: normalizedStartLine,
71
+ newStartLine: normalizedStartLine,
97
72
  };
98
73
  }
99
74
 
@@ -179,122 +154,21 @@ function WorkspaceDiffBody({
179
154
 
180
155
  function WorkspaceCodeSurface({
181
156
  block,
157
+ targetColumn,
158
+ targetLine,
182
159
  }: {
183
160
  block: ChatFileOperationBlockViewModel;
184
- }) {
185
- return <div className="h-full overflow-auto custom-scrollbar bg-white"><FileOperationCodeSurface block={block} layout="workspace" /></div>;
186
- }
187
-
188
- function WorkspaceHtmlRenderedPreview({
189
- src,
190
- }: {
191
- src: string;
161
+ targetColumn?: number | null;
162
+ targetLine?: number | null;
192
163
  }) {
193
164
  return (
194
- <iframe
195
- allowFullScreen
196
- className="h-full w-full border-0 bg-white"
197
- data-testid="workspace-html-preview"
198
- src={src}
199
- title={t("chatWorkspaceHtmlPreviewTitle")}
200
- />
201
- );
202
- }
203
-
204
- function WorkspaceContentUrlPreview({
205
- contentUrl,
206
- kind,
207
- label,
208
- }: {
209
- contentUrl: string;
210
- kind: ContentUrlPreviewKind;
211
- label: string;
212
- }) {
213
- if (kind === "image") {
214
- return (
215
- <div className="flex h-full items-center justify-center overflow-auto custom-scrollbar bg-white p-4">
216
- <img
217
- src={contentUrl}
218
- alt={label}
219
- className="max-h-full max-w-full object-contain"
220
- data-testid="workspace-content-image"
221
- />
222
- </div>
223
- );
224
- }
225
- if (kind === "audio") {
226
- return (
227
- <div className="flex h-full items-center justify-center bg-white px-6">
228
- <audio
229
- controls
230
- preload="metadata"
231
- aria-label={label}
232
- className="w-full max-w-xl"
233
- data-testid="workspace-content-audio"
234
- src={contentUrl}
235
- />
236
- </div>
237
- );
238
- }
239
- if (kind === "video") {
240
- return (
241
- <div className="flex h-full items-center justify-center bg-black">
242
- <video
243
- controls
244
- playsInline
245
- preload="metadata"
246
- aria-label={label}
247
- className="max-h-full max-w-full"
248
- data-testid="workspace-content-video"
249
- src={contentUrl}
250
- />
251
- </div>
252
- );
253
- }
254
- if (kind === "pdf" || kind === "html") {
255
- return (
256
- <iframe
257
- allowFullScreen
258
- className="h-full w-full border-0 bg-white"
259
- data-testid={kind === "pdf" ? "workspace-content-pdf" : "workspace-html-preview"}
260
- src={contentUrl}
261
- title={label}
165
+ <div className="h-full overflow-auto custom-scrollbar bg-white">
166
+ <FileOperationCodeSurface
167
+ block={block}
168
+ layout="workspace"
169
+ targetColumn={targetColumn}
170
+ targetLine={targetLine}
262
171
  />
263
- );
264
- }
265
- return (
266
- <div
267
- className="flex h-full flex-col items-center justify-center gap-4 px-6 text-center"
268
- data-testid="workspace-content-unsupported"
269
- >
270
- <div className="max-w-sm space-y-1.5">
271
- <p className="truncate text-sm font-medium text-foreground" title={label}>
272
- {label}
273
- </p>
274
- <p className="text-sm text-muted-foreground">
275
- {t("chatWorkspacePreviewUnsupported")}
276
- </p>
277
- <p className="text-xs leading-5 text-muted-foreground/80">
278
- {t("chatWorkspacePreviewUnsupportedHint")}
279
- </p>
280
- </div>
281
- <div className="flex flex-wrap items-center justify-center gap-2">
282
- <a
283
- href={contentUrl}
284
- download={label}
285
- className="inline-flex h-8 items-center rounded-lg border border-border bg-card px-3 text-xs font-medium text-foreground transition-colors hover:bg-muted"
286
- >
287
- {t("chatWorkspacePreviewDownload")}
288
- </a>
289
- <a
290
- href={contentUrl}
291
- target="_blank"
292
- rel="noreferrer"
293
- className="inline-flex h-8 items-center rounded-lg bg-primary px-3 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90"
294
- >
295
- {t("chatWorkspacePreviewOpenExternally")}
296
- </a>
297
- </div>
298
172
  </div>
299
173
  );
300
174
  }
@@ -304,29 +178,33 @@ function WorkspacePreviewBody({
304
178
  contentUrlKind,
305
179
  contentLabel,
306
180
  directoryQuery,
181
+ fileBasePath,
307
182
  onFileOpen,
308
183
  previewBlock,
309
184
  previewKind,
185
+ previewViewer,
310
186
  previewQuery,
311
187
  previewText,
312
- previewUrl,
313
- previewViewer,
188
+ targetColumn,
189
+ targetLine,
314
190
  }: {
315
191
  contentUrl: string | null;
316
- contentUrlKind: ContentUrlPreviewKind | null;
192
+ contentUrlKind: WorkspaceFileContentKind | null;
317
193
  contentLabel: string;
318
194
  directoryQuery: ReturnType<typeof useServerPathBrowse> | null | undefined;
195
+ fileBasePath: string | null;
319
196
  onFileOpen: (action: ChatFileOpenActionViewModel) => void;
320
197
  previewBlock: ChatFileOperationBlockViewModel | null;
321
198
  previewKind: "text" | "markdown" | "binary";
199
+ previewViewer: "source" | "rendered" | null;
322
200
  previewQuery: ReturnType<typeof useServerPathRead> | null | undefined;
323
201
  previewText: string | null;
324
- previewUrl: string | null;
325
- previewViewer: "source" | "rendered";
202
+ targetColumn?: number | null;
203
+ targetLine?: number | null;
326
204
  }) {
327
205
  if (contentUrl && contentUrlKind) {
328
206
  return (
329
- <WorkspaceContentUrlPreview
207
+ <WorkspaceFileContentPreview
330
208
  contentUrl={contentUrl}
331
209
  kind={contentUrlKind}
332
210
  label={contentLabel}
@@ -375,11 +253,7 @@ function WorkspacePreviewBody({
375
253
  );
376
254
  }
377
255
 
378
- if (previewViewer === "rendered" && previewUrl) {
379
- return <WorkspaceHtmlRenderedPreview src={previewUrl} />;
380
- }
381
-
382
- if (previewKind === "markdown" && previewText) {
256
+ if (previewKind === "markdown" && previewViewer !== "source" && previewText) {
383
257
  return (
384
258
  <div className="h-full overflow-auto custom-scrollbar px-5 py-4">
385
259
  <ChatMessageMarkdown
@@ -390,13 +264,22 @@ function WorkspacePreviewBody({
390
264
  copiedCodeLabel: t("chatCodeCopied"),
391
265
  }}
392
266
  onFileOpen={onFileOpen}
267
+ resolveFileContentUrl={(action) =>
268
+ buildServerPathContentUrl(action.path, fileBasePath)
269
+ }
393
270
  />
394
271
  </div>
395
272
  );
396
273
  }
397
274
 
398
275
  if (previewBlock) {
399
- return <WorkspaceCodeSurface block={previewBlock} />;
276
+ return (
277
+ <WorkspaceCodeSurface
278
+ block={previewBlock}
279
+ targetColumn={targetColumn}
280
+ targetLine={targetLine}
281
+ />
282
+ );
400
283
  }
401
284
 
402
285
  return <WorkspaceFilePreviewStatus text={t("chatWorkspacePreviewEmpty")} />;
@@ -407,6 +290,7 @@ type ChatSessionWorkspaceFilePreviewProps = {
407
290
  refreshVersion?: number;
408
291
  sessionProjectRoot: string | null;
409
292
  sessionWorkingDir: string | null;
293
+ showBreadcrumbs?: boolean;
410
294
  onFileOpen: (action: ChatFileOpenActionViewModel) => void;
411
295
  };
412
296
 
@@ -415,14 +299,16 @@ export function ChatSessionWorkspaceFilePreview({
415
299
  refreshVersion = 0,
416
300
  sessionProjectRoot,
417
301
  sessionWorkingDir,
302
+ showBreadcrumbs = true,
418
303
  onFileOpen,
419
304
  }: ChatSessionWorkspaceFilePreviewProps) {
420
305
  const isPreviewMode = file.viewMode === "preview";
421
- const contentUrl = file.contentUrl?.trim() || null;
422
- const usesServerPath = isPreviewMode && !contentUrl;
306
+ const suppliedContentUrl = file.contentUrl?.trim() || null;
307
+ const usesServerPath = isPreviewMode && !suppliedContentUrl;
423
308
  const previewQuery = useServerPathRead({
424
309
  path: file.path,
425
310
  basePath: sessionWorkingDir,
311
+ line: file.line,
426
312
  enabled: usesServerPath,
427
313
  });
428
314
  const directoryQuery = useServerPathBrowse({
@@ -435,14 +321,15 @@ export function ChatSessionWorkspaceFilePreview({
435
321
  () => (file.viewMode === "diff" ? buildDiffBlock(file) : null),
436
322
  [file],
437
323
  );
438
- const previewText =
439
- isPreviewMode ? previewQuery?.data?.text ?? file.rawText ?? null : null;
324
+ const previewText = isPreviewMode
325
+ ? (previewQuery?.data?.text ?? file.rawText ?? null)
326
+ : null;
440
327
  const previewKind = inferPreviewKind({
441
328
  path: previewQuery?.data?.resolvedPath ?? file.path,
442
329
  serverKind: previewQuery?.data?.kind,
443
330
  });
444
- const contentUrlKind = contentUrl
445
- ? resolveContentUrlPreviewKind({
331
+ const suppliedContentKind = suppliedContentUrl
332
+ ? resolveWorkspaceFileContentKind({
446
333
  path: file.path,
447
334
  mimeType: file.mimeType,
448
335
  })
@@ -452,17 +339,32 @@ export function ChatSessionWorkspaceFilePreview({
452
339
  previewQuery?.data?.resolvedPath ??
453
340
  file.path;
454
341
  const previewPathKind = directoryQuery?.data ? "directory" : "file";
455
- const previewViewer = resolveFilePreviewViewer({
342
+ const previewViewer = resolveWorkspaceFileViewer(
343
+ resolvedPath,
344
+ file.previewViewer,
345
+ );
346
+ const localContentKind = resolveWorkspaceFileContentKind({
456
347
  path: resolvedPath,
457
- viewer: file.previewViewer,
458
348
  });
459
- const previewUrl =
460
- previewViewer === "rendered" && previewQuery?.data?.resolvedPath
461
- ? appendPreviewRefreshVersion(
462
- buildServerPathContentUrl(previewQuery.data.resolvedPath),
463
- refreshVersion,
464
- )
349
+ const localContentUrlCandidate = buildServerPathContentUrl(
350
+ file.path,
351
+ sessionWorkingDir,
352
+ );
353
+ const shouldRenderLocalContent = Boolean(
354
+ !suppliedContentUrl &&
355
+ isPreviewMode &&
356
+ localContentUrlCandidate &&
357
+ file.previewViewer !== "source" &&
358
+ localContentKind !== "other" &&
359
+ (localContentKind !== "html" || previewViewer === "rendered"),
360
+ );
361
+ const localContentUrl =
362
+ shouldRenderLocalContent && localContentUrlCandidate
363
+ ? appendPreviewRefreshVersion(localContentUrlCandidate, refreshVersion)
465
364
  : null;
365
+ const contentUrl = suppliedContentUrl ?? localContentUrl;
366
+ const contentUrlKind =
367
+ suppliedContentKind ?? (localContentUrl ? localContentKind : null);
466
368
  const previewBlock = useMemo(() => {
467
369
  if (!isPreviewMode || !previewText || contentUrl) {
468
370
  return null;
@@ -471,18 +373,18 @@ export function ChatSessionWorkspaceFilePreview({
471
373
  path: previewQuery?.data?.resolvedPath ?? file.path,
472
374
  text: previewText,
473
375
  languageHint: previewQuery?.data?.languageHint ?? null,
474
- line: file.line,
376
+ startLine: previewQuery?.data?.startLine ?? 1,
475
377
  });
476
378
  }, [
477
379
  contentUrl,
478
- file.line,
479
380
  file.path,
480
381
  isPreviewMode,
481
382
  previewQuery?.data?.languageHint,
482
383
  previewQuery?.data?.resolvedPath,
384
+ previewQuery?.data?.startLine,
483
385
  previewText,
484
386
  ]);
485
- const isTruncated = Boolean(previewQuery?.data?.truncated);
387
+ const isTextPreviewTruncated = !contentUrl && Boolean(previewQuery?.data?.truncated);
486
388
  const breadcrumbBasePath = sessionProjectRoot ?? sessionWorkingDir;
487
389
  const breadcrumb = useMemo(
488
390
  () =>
@@ -490,15 +392,11 @@ export function ChatSessionWorkspaceFilePreview({
490
392
  path: resolvedPath,
491
393
  kind: previewPathKind,
492
394
  sessionProjectRoot: breadcrumbBasePath,
493
- line: file.line,
494
- column: file.column,
495
- truncated: isTruncated,
395
+ truncated: isTextPreviewTruncated,
496
396
  }),
497
397
  [
498
398
  breadcrumbBasePath,
499
- file.column,
500
- file.line,
501
- isTruncated,
399
+ isTextPreviewTruncated,
502
400
  previewPathKind,
503
401
  resolvedPath,
504
402
  ],
@@ -506,10 +404,12 @@ export function ChatSessionWorkspaceFilePreview({
506
404
 
507
405
  return (
508
406
  <div className="flex h-full min-h-0 flex-col bg-white">
509
- <ChatSessionWorkspaceFileBreadcrumbs
510
- breadcrumb={breadcrumb}
511
- onFileOpen={onFileOpen}
512
- />
407
+ {showBreadcrumbs ? (
408
+ <ChatSessionWorkspaceFileBreadcrumbs
409
+ breadcrumb={breadcrumb}
410
+ onFileOpen={onFileOpen}
411
+ />
412
+ ) : null}
513
413
 
514
414
  <div className="flex-1 min-h-0 overflow-hidden">
515
415
  {file.viewMode === "diff" ? (
@@ -520,13 +420,15 @@ export function ChatSessionWorkspaceFilePreview({
520
420
  contentUrlKind={contentUrlKind}
521
421
  contentLabel={file.label?.trim() || resolvedPath}
522
422
  directoryQuery={directoryQuery}
423
+ fileBasePath={sessionWorkingDir}
523
424
  onFileOpen={onFileOpen}
524
425
  previewBlock={previewBlock}
525
426
  previewKind={previewKind}
427
+ previewViewer={previewViewer}
526
428
  previewQuery={previewQuery}
527
429
  previewText={previewText}
528
- previewUrl={previewUrl}
529
- previewViewer={previewViewer}
430
+ targetColumn={file.column}
431
+ targetLine={file.line}
530
432
  />
531
433
  )}
532
434
  </div>