@automattic/agenttic-ui 0.1.9 → 0.1.11

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 (406) hide show
  1. package/README.md +281 -350
  2. package/dist/_basePickBy-Co6w2C-t.js +151 -0
  3. package/dist/_baseUniq-BbhifY2s.js +614 -0
  4. package/dist/abap-Y8Dl9g_6.js +6 -0
  5. package/dist/actionscript-3-DZzbMeqX.js +6 -0
  6. package/dist/ada-vP6ak0IW.js +6 -0
  7. package/dist/andromeeda-uXNdzNpk.js +4 -0
  8. package/dist/angular-html-BmadGEgW.js +32 -0
  9. package/dist/angular-ts-D-QQnnGT.js +21 -0
  10. package/dist/apache-BUjz-sD2.js +6 -0
  11. package/dist/apex-D_wPycVx.js +6 -0
  12. package/dist/apl-sitt7C8I.js +16 -0
  13. package/dist/applescript-BPx7YFFu.js +6 -0
  14. package/dist/ara-Z2fSOxSw.js +6 -0
  15. package/dist/arc-DMQNivgh.js +83 -0
  16. package/dist/architecture-O4VJ6CD3-CrsUkgBe.js +5 -0
  17. package/dist/architectureDiagram-KFL7JDKH-BCeU_Tkj.js +4665 -0
  18. package/dist/asciidoc-B-pCoB3G.js +6 -0
  19. package/dist/asm-BTWLY5ym.js +6 -0
  20. package/dist/astro-DHnp0xIo.js +18 -0
  21. package/dist/aurora-x-BwoVEUWZ.js +4 -0
  22. package/dist/awk-Fb0P9dkn.js +6 -0
  23. package/dist/ayu-dark-CxPZkpb2.js +4 -0
  24. package/dist/ballerina-oZK-YekG.js +6 -0
  25. package/dist/bat-0FvbqU9S.js +6 -0
  26. package/dist/beancount-DEfTbbFX.js +6 -0
  27. package/dist/berry-PwsHPR_K.js +6 -0
  28. package/dist/bibtex-EULQRLY5.js +6 -0
  29. package/dist/bicep-DFU2oTl7.js +6 -0
  30. package/dist/blade-OPzGcV14.js +20 -0
  31. package/dist/blockDiagram-ZYB65J3Q-eNfG2owp.js +2265 -0
  32. package/dist/bsl-NkNNwerW.js +8 -0
  33. package/dist/c-eeMepfLm.js +6 -0
  34. package/dist/c4Diagram-AAMF2YG6-CEVcZg_d.js +1581 -0
  35. package/dist/cadence-DMRWHJp4.js +6 -0
  36. package/dist/cairo-DM6WF2e3.js +8 -0
  37. package/dist/catppuccin-frappe-DlGpEc12.js +4 -0
  38. package/dist/catppuccin-latte-DDI4I_Rd.js +4 -0
  39. package/dist/catppuccin-macchiato-BBzuZG5U.js +4 -0
  40. package/dist/catppuccin-mocha-CwrFPXRy.js +4 -0
  41. package/dist/channel-DwkBtswx.js +5 -0
  42. package/dist/chunk-ANTBXLJU-DjsG4Faa.js +9 -0
  43. package/dist/chunk-FHKO5MBM-DvgpKHah.js +15 -0
  44. package/dist/chunk-GLLZNHP4-BS9MWsNn.js +19 -0
  45. package/dist/chunk-JBRWN2VN-BB1oFn95.js +1376 -0
  46. package/dist/chunk-LXBSTHXV-DoWWvL-R.js +1382 -0
  47. package/dist/chunk-NRVI72HA-CN8BG5Yn.js +20 -0
  48. package/dist/chunk-OMD6QJNC-D7UKmZm8.js +64 -0
  49. package/dist/chunk-WVR4S24B-D3bw0yi4.js +8 -0
  50. package/dist/clarity-BseSxcHx.js +6 -0
  51. package/dist/classDiagram-3BZAVTQC-DhpbenB7.js +16 -0
  52. package/dist/classDiagram-v2-QTMF73CY-DhpbenB7.js +16 -0
  53. package/dist/clojure-CXJfHrL3.js +6 -0
  54. package/dist/clone-DmrWxu_i.js +8 -0
  55. package/dist/cmake-BJz8BOTU.js +6 -0
  56. package/dist/cobol-4A8XjHhj.js +10 -0
  57. package/dist/codeowners-Bt9yU6NX.js +6 -0
  58. package/dist/codeql-DHkodjjI.js +6 -0
  59. package/dist/coffee-Dl27lzbd.js +8 -0
  60. package/dist/common-lisp-EVqT9Zhp.js +6 -0
  61. package/dist/components/AgentUI.d.ts +20 -1
  62. package/dist/components/AgentUI.d.ts.map +1 -1
  63. package/dist/components/AgentUIContainer.d.ts +8 -0
  64. package/dist/components/AgentUIContainer.d.ts.map +1 -0
  65. package/dist/components/animations/index.d.ts +0 -1
  66. package/dist/components/animations/index.d.ts.map +1 -1
  67. package/dist/components/chat/AnimatedPlaceholder.d.ts +8 -0
  68. package/dist/components/chat/AnimatedPlaceholder.d.ts.map +1 -0
  69. package/dist/components/chat/Chat.d.ts +1 -1
  70. package/dist/components/chat/Chat.d.ts.map +1 -1
  71. package/dist/components/chat/ChatFooter.d.ts +4 -2
  72. package/dist/components/chat/ChatFooter.d.ts.map +1 -1
  73. package/dist/components/chat/ChatFooter.stories.d.ts +73 -0
  74. package/dist/components/chat/ChatFooter.stories.d.ts.map +1 -0
  75. package/dist/components/chat/ChatHeader.d.ts +2 -1
  76. package/dist/components/chat/ChatHeader.d.ts.map +1 -1
  77. package/dist/components/chat/ChatInput.d.ts +5 -2
  78. package/dist/components/chat/ChatInput.d.ts.map +1 -1
  79. package/dist/components/chat/ChatInput.stories.d.ts +41 -1
  80. package/dist/components/chat/ChatInput.stories.d.ts.map +1 -1
  81. package/dist/components/chat/MessageActions.d.ts.map +1 -1
  82. package/dist/components/chat/Messages.d.ts +2 -2
  83. package/dist/components/chat/Messages.d.ts.map +1 -1
  84. package/dist/components/chat/Messages.stories.d.ts +2 -2
  85. package/dist/components/chat/Notice.d.ts +3 -1
  86. package/dist/components/chat/Notice.d.ts.map +1 -1
  87. package/dist/components/chat/Notice.stories.d.ts +3 -0
  88. package/dist/components/chat/Notice.stories.d.ts.map +1 -1
  89. package/dist/components/chat/Suggestions.d.ts +2 -0
  90. package/dist/components/chat/Suggestions.d.ts.map +1 -1
  91. package/dist/components/composable/AgentUIConversationView.d.ts +8 -0
  92. package/dist/components/composable/AgentUIConversationView.d.ts.map +1 -0
  93. package/dist/components/composable/AgentUIFooter.d.ts +7 -0
  94. package/dist/components/composable/AgentUIFooter.d.ts.map +1 -0
  95. package/dist/components/composable/AgentUIHeader.d.ts +5 -0
  96. package/dist/components/composable/AgentUIHeader.d.ts.map +1 -0
  97. package/dist/components/composable/AgentUIInput.d.ts +9 -0
  98. package/dist/components/composable/AgentUIInput.d.ts.map +1 -0
  99. package/dist/components/composable/AgentUIMessages.d.ts +5 -0
  100. package/dist/components/composable/AgentUIMessages.d.ts.map +1 -0
  101. package/dist/components/composable/AgentUINotice.d.ts +5 -0
  102. package/dist/components/composable/AgentUINotice.d.ts.map +1 -0
  103. package/dist/components/composable/AgentUISuggestions.d.ts +6 -0
  104. package/dist/components/composable/AgentUISuggestions.d.ts.map +1 -0
  105. package/dist/components/icons/ZoomIcon.d.ts +3 -0
  106. package/dist/components/icons/ZoomIcon.d.ts.map +1 -0
  107. package/dist/components/icons/ZoomIconFilled.d.ts +3 -0
  108. package/dist/components/icons/ZoomIconFilled.d.ts.map +1 -0
  109. package/dist/components/ui/button.d.ts +3 -2
  110. package/dist/components/ui/button.d.ts.map +1 -1
  111. package/dist/components/ui/button.stories.d.ts +15 -4
  112. package/dist/components/ui/button.stories.d.ts.map +1 -1
  113. package/dist/components/views/CompactView.d.ts +6 -2
  114. package/dist/components/views/CompactView.d.ts.map +1 -1
  115. package/dist/components/views/ConversationView.d.ts +3 -2
  116. package/dist/components/views/ConversationView.d.ts.map +1 -1
  117. package/dist/context/AgentUIContext.d.ts +41 -0
  118. package/dist/context/AgentUIContext.d.ts.map +1 -0
  119. package/dist/coq-B0L9upzn.js +6 -0
  120. package/dist/cpp-Cj177cuW.js +18 -0
  121. package/dist/crystal-ymVvJzbZ.js +18 -0
  122. package/dist/csharp-DmxfTLWR.js +6 -0
  123. package/dist/css-CECN5uSL.js +6 -0
  124. package/dist/csv-CmYOceLb.js +6 -0
  125. package/dist/cue-ZzumE7IT.js +6 -0
  126. package/dist/cypher-jpdmjtA6.js +6 -0
  127. package/dist/cytoscape.esm-ZmItrg9y.js +18731 -0
  128. package/dist/d-CBagWSwH.js +6 -0
  129. package/dist/dagre-2BBEFEWP-DWbEdWsD.js +447 -0
  130. package/dist/dark-plus-pUHDTVV0.js +4 -0
  131. package/dist/dart-6ObCrKr9.js +6 -0
  132. package/dist/dax-CcDT-8dH.js +6 -0
  133. package/dist/defaultLocale-D7EN2tov.js +171 -0
  134. package/dist/desktop-B93p9R9O.js +6 -0
  135. package/dist/diagram-4IRLE6MV-Q8q6qm5n.js +534 -0
  136. package/dist/diagram-GUPCWM2R-B8VhFieT.js +143 -0
  137. package/dist/diagram-RP2FKANI-CYWUKKLB.js +221 -0
  138. package/dist/diff-BxzP2J8R.js +6 -0
  139. package/dist/docker-CsHqm9tx.js +6 -0
  140. package/dist/dotenv-BMjVjUL1.js +6 -0
  141. package/dist/dracula-BtZx2Kac.js +4 -0
  142. package/dist/dracula-soft-BKa-aqBv.js +4 -0
  143. package/dist/dream-maker-PAx17jaB.js +6 -0
  144. package/dist/edge-_LvgTcmu.js +12 -0
  145. package/dist/elixir-BTCUAmQk.js +8 -0
  146. package/dist/elm-BtNbw_Cd.js +8 -0
  147. package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
  148. package/dist/erDiagram-HZWUO2LU-CC0RhTpv.js +842 -0
  149. package/dist/erb-D0PIpZCP.js +10 -0
  150. package/dist/erlang-xM7DPKQj.js +8 -0
  151. package/dist/everforest-dark-DMCBqXCK.js +4 -0
  152. package/dist/everforest-light-BbXl82Em.js +4 -0
  153. package/dist/fennel-N4WcXuKx.js +6 -0
  154. package/dist/fish-B6QqlqeT.js +6 -0
  155. package/dist/flowDiagram-THRYKUMA-B00E_hY6.js +1627 -0
  156. package/dist/fluent-BMXUxfv1.js +6 -0
  157. package/dist/fortran-fixed-form-DUsA-VGo.js +8 -0
  158. package/dist/fortran-free-form-DPIT_jbP.js +6 -0
  159. package/dist/fsharp-BTdsmEUN.js +8 -0
  160. package/dist/ganttDiagram-WV7ZQ7D5-Cv2vsghm.js +2499 -0
  161. package/dist/gdresource-DLfsylRW.js +10 -0
  162. package/dist/gdscript-9lm8qppb.js +6 -0
  163. package/dist/gdshader-Bk8fF6yr.js +6 -0
  164. package/dist/genie-DzUvd7U9.js +6 -0
  165. package/dist/gherkin-DHRaV0YP.js +6 -0
  166. package/dist/git-commit-Bd32YZ0K.js +8 -0
  167. package/dist/git-rebase-ZWUFO_T4.js +8 -0
  168. package/dist/gitGraph-ZV4HHKMB-Bj31zYat.js +5 -0
  169. package/dist/gitGraphDiagram-OJR772UL-BGrYC5q0.js +712 -0
  170. package/dist/github-dark-DenFmJkN.js +4 -0
  171. package/dist/github-dark-default-BJPUVz4H.js +4 -0
  172. package/dist/github-dark-dimmed-DUshB20C.js +4 -0
  173. package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
  174. package/dist/github-light-JYsPkUQd.js +4 -0
  175. package/dist/github-light-default-D99KPAby.js +4 -0
  176. package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
  177. package/dist/gleam-Bv284lvN.js +6 -0
  178. package/dist/glimmer-js-CkxRszZZ.js +14 -0
  179. package/dist/glimmer-ts-Bi6BYQCn.js +14 -0
  180. package/dist/glsl-CkUcVZNK.js +8 -0
  181. package/dist/gnuplot-yPG9-sE_.js +6 -0
  182. package/dist/go-ChxJuLYK.js +6 -0
  183. package/dist/graph-DaSuptw6.js +247 -0
  184. package/dist/graphql-BLaPX4fU.js +14 -0
  185. package/dist/groovy-CJQTphOW.js +6 -0
  186. package/dist/gruvbox-dark-hard-C2ND4cMr.js +4 -0
  187. package/dist/gruvbox-dark-medium-C8k4c8au.js +4 -0
  188. package/dist/gruvbox-dark-soft-xx9Q6FaG.js +4 -0
  189. package/dist/gruvbox-light-hard-BpUXv5in.js +4 -0
  190. package/dist/gruvbox-light-medium-D3XFCoU1.js +4 -0
  191. package/dist/gruvbox-light-soft-u7hpfz6Z.js +4 -0
  192. package/dist/hack-Bx1jMtBC.js +10 -0
  193. package/dist/haml-6FagfhCM.js +10 -0
  194. package/dist/handlebars-Bd5Y4M6I.js +14 -0
  195. package/dist/haskell-WeIwNIP6.js +6 -0
  196. package/dist/haxe-TztHsm5T.js +6 -0
  197. package/dist/hcl-D438OF-I.js +6 -0
  198. package/dist/hjson-DYBUbqOl.js +6 -0
  199. package/dist/hlsl-Bk8TCZNL.js +6 -0
  200. package/dist/hooks/useMultiTimeout.d.ts +11 -0
  201. package/dist/hooks/useMultiTimeout.d.ts.map +1 -0
  202. package/dist/houston-BDYrDoDW.js +4 -0
  203. package/dist/html-7XVNRwN7.js +10 -0
  204. package/dist/html-derivative-BNxZ5Yf6.js +8 -0
  205. package/dist/http-WC357zBG.js +14 -0
  206. package/dist/hxml-GbqSQCLa.js +8 -0
  207. package/dist/hy-Brt5EZ7-.js +6 -0
  208. package/dist/imba-CimUv-Uh.js +6 -0
  209. package/dist/index-DR9mkSeU.js +29474 -0
  210. package/dist/index.css +1 -1
  211. package/dist/index.d.ts +22 -1
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +41 -2371
  214. package/dist/info-63CPKGFF-DnZM8nKQ.js +5 -0
  215. package/dist/infoDiagram-DDUCL6P7-ClQolrbt.js +24 -0
  216. package/dist/ini-BZIuRIvJ.js +6 -0
  217. package/dist/init-DjUOC4st.js +16 -0
  218. package/dist/java-DY6VlHhP.js +6 -0
  219. package/dist/javascript-Dp1Jmi5H.js +6 -0
  220. package/dist/jinja-WEhOU5ES.js +11 -0
  221. package/dist/jison-c2JI40PB.js +8 -0
  222. package/dist/journeyDiagram-FFXJYRFH-P_IVMTj2.js +836 -0
  223. package/dist/json-DxJze_jm.js +6 -0
  224. package/dist/json5-BT4Fjg39.js +6 -0
  225. package/dist/jsonc-CHjZD8gR.js +6 -0
  226. package/dist/jsonl-BGuvDmy9.js +6 -0
  227. package/dist/jsonnet-Bx2cfsXg.js +6 -0
  228. package/dist/jssm-BcADi6EI.js +6 -0
  229. package/dist/jsx-BtKADgXT.js +6 -0
  230. package/dist/julia-DcoDQokW.js +16 -0
  231. package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
  232. package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
  233. package/dist/kanagawa-wave-CQwozSzG.js +4 -0
  234. package/dist/kanban-definition-KOZQBZVT-Uk8JKe_b.js +720 -0
  235. package/dist/kotlin-ByBMgTeR.js +6 -0
  236. package/dist/kusto-VWFLl2T0.js +6 -0
  237. package/dist/laserwave-6a00oqik.js +4 -0
  238. package/dist/latex-MZCpjnva.js +8 -0
  239. package/dist/layout-BHKAMNdk.js +1324 -0
  240. package/dist/lean-DXqEE_d1.js +6 -0
  241. package/dist/less-B1GLI2Di.js +6 -0
  242. package/dist/light-plus-CZuVqSLX.js +4 -0
  243. package/dist/linear-UAzexi4b.js +255 -0
  244. package/dist/liquid-3HHuHOZ2.js +14 -0
  245. package/dist/llvm-6RQLId6G.js +6 -0
  246. package/dist/log-Al8wyEFV.js +6 -0
  247. package/dist/logo-DBa4JDzV.js +6 -0
  248. package/dist/lua-kX5WP_P5.js +8 -0
  249. package/dist/luau-BeoZWRh5.js +6 -0
  250. package/dist/make-CsMclxtr.js +6 -0
  251. package/dist/markdown-CiI2E98D.js +6 -0
  252. package/dist/marko-L-KhXzqZ.js +14 -0
  253. package/dist/material-theme-D6KBX41T.js +4 -0
  254. package/dist/material-theme-darker-CkRroheE.js +4 -0
  255. package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
  256. package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
  257. package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
  258. package/dist/matlab-BOAaUVP0.js +6 -0
  259. package/dist/mdc-DPBWa7dN.js +12 -0
  260. package/dist/mdx-BOhZZUJ8.js +6 -0
  261. package/dist/mermaid-B0ixDHKN.js +6 -0
  262. package/dist/mermaid-parser.core-FuzJzmL7.js +12921 -0
  263. package/dist/mermaid.core-D7qBd055.js +14002 -0
  264. package/dist/min-dark-C7ak0t6c.js +4 -0
  265. package/dist/min-light-CKFxVcPp.js +4 -0
  266. package/dist/mindmap-definition-LNHGMQRG-D1C2-kkn.js +3229 -0
  267. package/dist/mipsasm-CTx18fBl.js +6 -0
  268. package/dist/mojo-BD611d7o.js +6 -0
  269. package/dist/monokai-C1KBYcO0.js +4 -0
  270. package/dist/move-653S600C.js +6 -0
  271. package/dist/narrat-DmhDCBs-.js +6 -0
  272. package/dist/nextflow-D1Zd9cNl.js +6 -0
  273. package/dist/nginx-5vhPAEw3.js +8 -0
  274. package/dist/night-owl-Bm2rzalh.js +4 -0
  275. package/dist/nim-Fi8wNe6i.js +20 -0
  276. package/dist/nix-ceY58Dty.js +6 -0
  277. package/dist/nord-CC5OiUXg.js +4 -0
  278. package/dist/nushell-Be2rueDv.js +6 -0
  279. package/dist/objective-c-Itk8tzmv.js +6 -0
  280. package/dist/objective-cpp-DGt5UKRO.js +6 -0
  281. package/dist/ocaml-eSVK32Eg.js +6 -0
  282. package/dist/one-dark-pro-DTA3VF0_.js +4 -0
  283. package/dist/one-light-D9sNaUtq.js +4 -0
  284. package/dist/ordinal-DfAQgscy.js +61 -0
  285. package/dist/packet-HUATNLJX-B5EJOyma.js +5 -0
  286. package/dist/pascal-xy8pJNns.js +6 -0
  287. package/dist/perl-BoEn6HmT.js +16 -0
  288. package/dist/php-BRU9zhoN.js +18 -0
  289. package/dist/pie-WTHONI2E-Bl1BKqE7.js +5 -0
  290. package/dist/pieDiagram-DBDJKBY4-BkVTsR1n.js +161 -0
  291. package/dist/plastic-CSTz3KZp.js +4 -0
  292. package/dist/plsql-pVbGZfOv.js +6 -0
  293. package/dist/po-BNfHvqmm.js +6 -0
  294. package/dist/poimandres-C-VADXHD.js +4 -0
  295. package/dist/polar-CAZahv3u.js +6 -0
  296. package/dist/postcss-05aHdL-n.js +6 -0
  297. package/dist/powerquery-DI9HkTvs.js +6 -0
  298. package/dist/powershell-Clc4ydu-.js +6 -0
  299. package/dist/prisma-FZjmVtSl.js +6 -0
  300. package/dist/prolog-C5-yg4TO.js +6 -0
  301. package/dist/proto-MmCPeFAD.js +6 -0
  302. package/dist/pug-CJWI-qSo.js +12 -0
  303. package/dist/puppet-CUJHmnxV.js +6 -0
  304. package/dist/purescript-rUfGld-4.js +6 -0
  305. package/dist/python-BFNSHbwJ.js +6 -0
  306. package/dist/qml-D3ATcgGh.js +8 -0
  307. package/dist/qmldir-BInDYbpo.js +6 -0
  308. package/dist/qss-AeJTysr_.js +6 -0
  309. package/dist/quadrantDiagram-YPSRARAO-D1el8UE7.js +1024 -0
  310. package/dist/r-Bm0uF0U2.js +6 -0
  311. package/dist/racket-B83wSAja.js +6 -0
  312. package/dist/radar-NJJJXTRR-Ba8Estdw.js +5 -0
  313. package/dist/raku-nEQ4ZJJ7.js +6 -0
  314. package/dist/razor-BPFYEoc9.js +10 -0
  315. package/dist/red-7y8PH7HH.js +4 -0
  316. package/dist/reg-m_s_Kiip.js +6 -0
  317. package/dist/regexp-BazyLpPg.js +6 -0
  318. package/dist/rel-BcRfyd6Q.js +6 -0
  319. package/dist/requirementDiagram-EGVEC5DT-DL1bEAjs.js +852 -0
  320. package/dist/riscv-Ce8MAQLP.js +6 -0
  321. package/dist/rose-pine-Cr4kwgAY.js +4 -0
  322. package/dist/rose-pine-dawn-ClRRUdXX.js +4 -0
  323. package/dist/rose-pine-moon-ucNn3Gm8.js +4 -0
  324. package/dist/rst-B6mPMsKo.js +22 -0
  325. package/dist/ruby-DInklMmU.js +30 -0
  326. package/dist/rust-CLzF9zIN.js +6 -0
  327. package/dist/sankeyDiagram-HRAUVNP4-Dyr3TqRu.js +810 -0
  328. package/dist/sas-fpEvgATw.js +8 -0
  329. package/dist/sass-DxHp5rTx.js +6 -0
  330. package/dist/scala-D4grkFkl.js +6 -0
  331. package/dist/scheme-BCRWuEm4.js +6 -0
  332. package/dist/scss-B1FaCqwR.js +8 -0
  333. package/dist/sdbl-B7T8abf4.js +6 -0
  334. package/dist/sequenceDiagram-4MX5Z3NR-CaMVkEvG.js +2283 -0
  335. package/dist/shaderlab-Cr62-Wb4.js +8 -0
  336. package/dist/shellscript-InADTalH.js +6 -0
  337. package/dist/shellsession-DiDJNQdy.js +8 -0
  338. package/dist/slack-dark-i7wN4OET.js +4 -0
  339. package/dist/slack-ochin-ndHf0LoP.js +4 -0
  340. package/dist/smalltalk-BlI1_OkM.js +6 -0
  341. package/dist/snazzy-light-BlSJXAu4.js +4 -0
  342. package/dist/solarized-dark-UTmkh7lw.js +4 -0
  343. package/dist/solarized-light-BheCkDPT.js +4 -0
  344. package/dist/solidity-CneOhxmR.js +6 -0
  345. package/dist/soy-LybuU3Y_.js +8 -0
  346. package/dist/sparql-B0KWFEri.js +8 -0
  347. package/dist/splunk-CRXR8A9s.js +6 -0
  348. package/dist/sql-Cn_v3PB0.js +6 -0
  349. package/dist/ssh-config-DP-hNVbF.js +6 -0
  350. package/dist/stata-B8c5fTjX.js +8 -0
  351. package/dist/stateDiagram-UUKSUZ4H-D-xTiq6H.js +263 -0
  352. package/dist/stateDiagram-v2-EYPG3UTE-BK5bFTpp.js +16 -0
  353. package/dist/stylus-CyKEU1Ej.js +6 -0
  354. package/dist/svelte-BjDUPxZ1.js +14 -0
  355. package/dist/swift-_uF_96_m.js +6 -0
  356. package/dist/synthwave-84-NU3C_KFZ.js +4 -0
  357. package/dist/system-verilog-BCm7smPJ.js +6 -0
  358. package/dist/systemd-C-4qm6XH.js +6 -0
  359. package/dist/talonscript-CFF3LF_O.js +6 -0
  360. package/dist/tasl-Cg_WBUAe.js +6 -0
  361. package/dist/tcl-DN7buRTF.js +6 -0
  362. package/dist/templ-Brj2RH7A.js +12 -0
  363. package/dist/terraform-DGvcn9zM.js +6 -0
  364. package/dist/tex-CmrLTxbG.js +8 -0
  365. package/dist/timeline-definition-3HZDQTIS-DbCuAY-N.js +801 -0
  366. package/dist/tokyo-night-DP4TmcQl.js +4 -0
  367. package/dist/toml-DY62mUL_.js +6 -0
  368. package/dist/treemap-75Q7IDZK-RcudvwLc.js +5 -0
  369. package/dist/ts-tags-CZMzuZh-.js +41 -0
  370. package/dist/tsv-BtvSkaG0.js +6 -0
  371. package/dist/tsx-B8rCNbgL.js +6 -0
  372. package/dist/turtle-_H59FV7D.js +6 -0
  373. package/dist/twig-GjIxYqCX.js +18 -0
  374. package/dist/types/index.d.ts +7 -2
  375. package/dist/types/index.d.ts.map +1 -1
  376. package/dist/typescript-mg6ATTE8.js +6 -0
  377. package/dist/typespec-Djmco60m.js +6 -0
  378. package/dist/typst-D_1QKWns.js +6 -0
  379. package/dist/v-BW14IZv7.js +6 -0
  380. package/dist/vala-uxaPR7d1.js +6 -0
  381. package/dist/vb-D8_c5-KN.js +6 -0
  382. package/dist/verilog-B-bybjPF.js +6 -0
  383. package/dist/vesper-BckBta1U.js +4 -0
  384. package/dist/vhdl-CUlNa8ac.js +6 -0
  385. package/dist/viml-DsfA-sWm.js +6 -0
  386. package/dist/vitesse-black-BoGvW84i.js +4 -0
  387. package/dist/vitesse-dark-Cym-eLtO.js +4 -0
  388. package/dist/vitesse-light-CcmG315c.js +4 -0
  389. package/dist/vue-D-ba2-Rx.js +31 -0
  390. package/dist/vue-html-Dn2ZoOSz.js +10 -0
  391. package/dist/vue-vine-Jmfkm6lF.js +20 -0
  392. package/dist/vyper-CPQuu50u.js +6 -0
  393. package/dist/wasm-BBXxrAl7.js +6 -0
  394. package/dist/wasm-DQxwEHae.js +7 -0
  395. package/dist/wenyan-pbVjoM9_.js +6 -0
  396. package/dist/wgsl-DY4iK1q1.js +6 -0
  397. package/dist/wikitext-Z-MoUasO.js +6 -0
  398. package/dist/wit-CQMQOlTg.js +6 -0
  399. package/dist/wolfram-Dz4KXISs.js +6 -0
  400. package/dist/xml-C2J0sS9M.js +8 -0
  401. package/dist/xsl-BmSZphgC.js +8 -0
  402. package/dist/xychartDiagram-FDP5SA34-NGeBTA9Y.js +1340 -0
  403. package/dist/yaml-DaO7k5B1.js +6 -0
  404. package/dist/zenscript-CxBjpf9c.js +6 -0
  405. package/dist/zig-Vm0PO9wB.js +6 -0
  406. package/package.json +4 -4
package/README.md CHANGED
@@ -10,316 +10,345 @@ npm install @automattic/agenttic-ui
10
10
 
11
11
  ## Key Features
12
12
 
13
- - Pure UI components with no agent communication logic
14
- - Floating and embedded chat variants
15
- - Smooth animations and drag-and-drop positioning
16
- - Message actions and markdown rendering
17
- - TypeScript support with comprehensive types
18
- - Storybook component documentation
19
- - Modular component architecture for custom layouts
13
+ - Pure UI components with no agent communication logic
14
+ - Composable architecture for complete layout flexibility
15
+ - Floating and embedded chat variants
16
+ - Controlled input support for external value management
17
+ - Smooth animations and drag-and-drop positioning
18
+ - Message actions and markdown rendering
19
+ - Request cancellation UI with stop button functionality
20
+ - TypeScript support with comprehensive types
21
+ - Storybook component documentation
20
22
 
21
23
  ## Quick Start
22
24
 
23
- ### Complete Chat Interface
25
+ ### Complete Chat Interface (Convenience API)
24
26
 
25
27
  ```tsx
26
28
  import { useAgentChat } from '@automattic/agenttic-client';
27
29
  import { AgentUI } from '@automattic/agenttic-ui';
28
30
 
29
31
  function ChatApplication() {
30
- const {
31
- messages,
32
- isProcessing,
33
- error,
34
- onSubmit,
35
- suggestions,
36
- clearSuggestions,
37
- messageRenderer
38
- } = useAgentChat({
39
- agentId: 'big-sky',
40
- sessionId: 'my-session'
41
- });
42
-
43
- return (
44
- <AgentUI
45
- messages={messages}
46
- isProcessing={isProcessing}
47
- error={error}
48
- onSubmit={onSubmit}
49
- suggestions={suggestions}
50
- clearSuggestions={clearSuggestions}
51
- messageRenderer={messageRenderer}
52
- variant="floating"
53
- placeholder="Ask me anything..."
54
- />
55
- );
32
+ const {
33
+ messages,
34
+ isProcessing,
35
+ error,
36
+ onSubmit,
37
+ abortCurrentRequest,
38
+ suggestions,
39
+ clearSuggestions,
40
+ messageRenderer,
41
+ } = useAgentChat( {
42
+ agentId: 'big-sky',
43
+ sessionId: 'my-session',
44
+ } );
45
+
46
+ return (
47
+ <AgentUI
48
+ messages={ messages }
49
+ isProcessing={ isProcessing }
50
+ error={ error }
51
+ onSubmit={ onSubmit }
52
+ onStop={ abortCurrentRequest }
53
+ suggestions={ suggestions }
54
+ clearSuggestions={ clearSuggestions }
55
+ messageRenderer={ messageRenderer }
56
+ variant="floating"
57
+ placeholder="Ask me anything..."
58
+ />
59
+ );
56
60
  }
57
61
  ```
58
62
 
59
- ### Embedded Chat
63
+ ### Composable Architecture
64
+
65
+ For complete control over layout and component ordering:
60
66
 
61
67
  ```tsx
62
- <AgentUI
63
- messages={messages}
64
- isProcessing={isProcessing}
65
- error={error}
66
- onSubmit={onSubmit}
67
- variant="embedded"
68
- placeholder="How can I help you?"
69
- />
70
- ```
68
+ import { AgentUI } from '@automattic/agenttic-ui';
71
69
 
72
- ## Core Components
70
+ function CustomChatLayout() {
71
+ return (
72
+ <AgentUI.Container
73
+ messages={ messages }
74
+ isProcessing={ isProcessing }
75
+ error={ error }
76
+ onSubmit={ onSubmit }
77
+ onStop={ abortCurrentRequest }
78
+ variant="embedded"
79
+ >
80
+ <AgentUI.ConversationView>
81
+ <AgentUI.Header />
82
+ <AgentUI.Messages />
83
+ <AgentUI.Footer>
84
+ <AgentUI.Notice />
85
+ <AgentUI.Input />
86
+ </AgentUI.Footer>
87
+ <AgentUI.Suggestions />
88
+ </AgentUI.ConversationView>
89
+ </AgentUI.Container>
90
+ );
91
+ }
92
+ ```
73
93
 
74
- ### AgentUI
94
+ ### Controlled Input
75
95
 
76
- The main component that provides a complete chat interface.
96
+ External control of input value and changes:
77
97
 
78
98
  ```tsx
79
- interface AgentUIProps {
80
- // Core chat data
81
- messages: Message[];
82
- isProcessing: boolean;
83
- error?: string | null;
84
- onSubmit: (message: string) => void;
85
-
86
- // UI configuration
87
- variant?: 'floating' | 'embedded';
88
- placeholder?: string;
89
- triggerIcon?: React.ReactNode;
90
- notice?: NoticeConfig;
91
- emptyView?: React.ReactNode;
92
-
93
- // Chat state management (floating variant)
94
- floatingChatState?: ChatState;
95
- onOpen?: () => void;
96
- onExpand?: () => void;
97
- onClose?: () => void;
98
-
99
- // Suggestions
100
- suggestions?: Suggestion[];
101
- clearSuggestions?: () => void;
102
-
103
- // Message rendering
104
- messageRenderer?: ComponentType<{ children: string }>;
105
-
106
- // Styling
107
- className?: string;
108
- style?: React.CSSProperties;
99
+ function ExternallyControlledChat() {
100
+ const [ inputValue, setInputValue ] = useState( '' );
101
+
102
+ return (
103
+ <AgentUI
104
+ messages={ messages }
105
+ isProcessing={ isProcessing }
106
+ onSubmit={ onSubmit }
107
+ inputValue={ inputValue }
108
+ onInputChange={ setInputValue }
109
+ variant="embedded"
110
+ />
111
+ );
109
112
  }
110
113
  ```
111
114
 
112
- **Variants:**
113
- - `floating` - Draggable chat widget with collapsed/compact/expanded states
114
- - `embedded` - Fixed chat interface for integration in existing layouts
115
+ ## Architecture
115
116
 
116
- ### Individual Components
117
+ ### AgentUI Components
117
118
 
118
- For custom chat layouts, use individual components:
119
+ **AgentUI** - Convenience wrapper with default layout
120
+ **AgentUI.Container** - Root container with state management and context
121
+ **AgentUI.ConversationView** - Conversation layout wrapper
122
+ **AgentUI.Header** - Chat header with close/expand buttons
123
+ **AgentUI.Messages** - Message history display
124
+ **AgentUI.Footer** - Footer wrapper for input and notice
125
+ **AgentUI.Input** - Text input with auto-resize
126
+ **AgentUI.Notice** - Error and notification display
127
+ **AgentUI.Suggestions** - Quick action suggestions
119
128
 
120
- ```tsx
121
- import {
122
- Chat,
123
- Messages,
124
- Message,
125
- ChatInput,
126
- Suggestions
127
- } from '@automattic/agenttic-ui';
129
+ ### AgentUIProps Interface
128
130
 
129
- function CustomChat() {
130
- return (
131
- <div className="my-chat-container">
132
- <Messages messages={messages} messageRenderer={messageRenderer} />
133
- <Suggestions
134
- suggestions={suggestions}
135
- onSuggestionClick={onSubmit}
136
- onClear={clearSuggestions}
137
- />
138
- <ChatInput
139
- value={inputValue}
140
- onChange={setInputValue}
141
- onSubmit={onSubmit}
142
- placeholder="Type a message..."
143
- isProcessing={isProcessing}
144
- />
145
- </div>
146
- );
131
+ ```tsx
132
+ interface AgentUIProps {
133
+ // Core chat data
134
+ messages: Message[];
135
+ isProcessing: boolean;
136
+ error?: string | null;
137
+ onSubmit: ( message: string ) => void;
138
+ onStop?: () => void;
139
+
140
+ // UI configuration
141
+ variant?: 'floating' | 'embedded';
142
+ placeholder?: string | string[];
143
+ triggerIcon?: React.ReactNode;
144
+ notice?: NoticeConfig;
145
+ emptyView?: React.ReactNode;
146
+
147
+ // Chat state management (floating variant)
148
+ floatingChatState?: ChatState;
149
+ onOpen?: () => void;
150
+ onExpand?: () => void;
151
+ onClose?: () => void;
152
+
153
+ // Suggestions
154
+ suggestions?: Suggestion[];
155
+ clearSuggestions?: () => void;
156
+
157
+ // Message rendering
158
+ messageRenderer?: ComponentType< { children: string } >;
159
+
160
+ // Controlled input (optional)
161
+ inputValue?: string;
162
+ onInputChange?: ( value: string ) => void;
163
+
164
+ // Styling
165
+ className?: string;
166
+ style?: React.CSSProperties;
147
167
  }
148
168
  ```
149
169
 
150
- ## Component APIs
170
+ ## Usage Patterns
151
171
 
152
- ### Chat
172
+ ### Flexible Component Ordering
153
173
 
154
- Main chat component supporting both floating and embedded variants.
174
+ Place suggestions anywhere in your layout:
155
175
 
156
176
  ```tsx
157
- <Chat
158
- messages={messages}
159
- isProcessing={isProcessing}
160
- error={error}
161
- onSubmit={onSubmit}
162
- variant="floating"
163
- placeholder="Ask anything..."
164
- suggestions={suggestions}
165
- clearSuggestions={clearSuggestions}
166
- messageRenderer={messageRenderer}
167
- />
177
+ <AgentUI.Container {...props}>
178
+ <AgentUI.ConversationView>
179
+ <AgentUI.Messages />
180
+ <AgentUI.Suggestions /> {/* Above input */}
181
+ <AgentUI.Footer>
182
+ <AgentUI.Input />
183
+ </AgentUI.Footer>
184
+ </AgentUI.ConversationView>
185
+ </AgentUI.Container>
186
+
187
+ // Or below input:
188
+ <AgentUI.Container {...props}>
189
+ <AgentUI.ConversationView>
190
+ <AgentUI.Messages />
191
+ <AgentUI.Footer>
192
+ <AgentUI.Input />
193
+ </AgentUI.Footer>
194
+ <AgentUI.Suggestions /> {/* Below input */}
195
+ </AgentUI.ConversationView>
196
+ </AgentUI.Container>
168
197
  ```
169
198
 
170
- ### Messages
199
+ ### Individual Components
171
200
 
172
- Container for displaying message history.
201
+ Use individual components for complete customization:
173
202
 
174
203
  ```tsx
175
- <Messages
176
- messages={messages}
177
- messageRenderer={messageRenderer}
178
- emptyView={<div>No messages yet</div>}
179
- />
204
+ import {
205
+ Messages,
206
+ Message,
207
+ ChatInput,
208
+ Suggestions,
209
+ } from '@automattic/agenttic-ui';
210
+
211
+ function FullyCustomChat() {
212
+ return (
213
+ <div className="my-chat-container">
214
+ <Messages
215
+ messages={ messages }
216
+ messageRenderer={ messageRenderer }
217
+ />
218
+ <ChatInput
219
+ value={ inputValue }
220
+ onChange={ setInputValue }
221
+ onSubmit={ onSubmit }
222
+ placeholder="Type a message..."
223
+ isProcessing={ isProcessing }
224
+ />
225
+ <Suggestions
226
+ suggestions={ suggestions }
227
+ onSuggestionClick={ onSubmit }
228
+ onClear={ clearSuggestions }
229
+ />
230
+ </div>
231
+ );
232
+ }
180
233
  ```
181
234
 
182
- ### Message
235
+ ### Request Cancellation
183
236
 
184
- Individual message component with action support.
237
+ Stop button appears automatically during processing:
185
238
 
186
239
  ```tsx
187
- <Message
188
- message={message}
189
- messageRenderer={messageRenderer}
190
- showIcon={true}
240
+ <AgentUI
241
+ isProcessing={ isProcessing }
242
+ onStop={ abortCurrentRequest }
243
+ // Submit button becomes stop button when processing
191
244
  />
192
245
  ```
193
246
 
194
- ### ChatInput
195
-
196
- Text input with auto-resize and submit handling.
247
+ ### Custom Message Renderer
197
248
 
198
249
  ```tsx
199
- <ChatInput
200
- value={value}
201
- onChange={setValue}
202
- onSubmit={handleSubmit}
203
- onKeyDown={handleKeyDown}
204
- placeholder="Type a message..."
205
- isProcessing={false}
206
- textareaRef={textareaRef}
207
- />
250
+ import { ReactMarkdown } from 'react-markdown';
251
+
252
+ const customRenderer = ( { children }: { children: string } ) => (
253
+ <ReactMarkdown remarkPlugins={ [ remarkGfm ] }>{ children }</ReactMarkdown>
254
+ );
255
+
256
+ <AgentUI messageRenderer={ customRenderer } />;
208
257
  ```
209
258
 
210
- ### Suggestions
259
+ ### Chat State Control
211
260
 
212
- Quick action suggestions for users.
261
+ For floating variant, control state externally:
213
262
 
214
263
  ```tsx
215
- <Suggestions
216
- suggestions={[
217
- { id: '1', label: 'Help me code', prompt: 'Can you help me write code?' },
218
- { id: '2', label: 'Explain concept', prompt: 'Explain this concept to me' }
219
- ]}
220
- onSuggestionClick={onSubmit}
221
- onClear={clearSuggestions}
222
- />
264
+ const [ chatState, setChatState ] = useState< ChatState >( 'collapsed' );
265
+
266
+ <AgentUI
267
+ variant="floating"
268
+ floatingChatState={ chatState }
269
+ onOpen={ () => setChatState( 'compact' ) }
270
+ onExpand={ () => setChatState( 'expanded' ) }
271
+ onClose={ () => setChatState( 'collapsed' ) }
272
+ />;
223
273
  ```
224
274
 
225
275
  ## Hooks
226
276
 
227
277
  ### useChat
228
278
 
229
- Manages chat state for floating variant.
279
+ Manages floating chat state:
230
280
 
231
281
  ```tsx
232
282
  const {
233
- state, // 'collapsed' | 'compact' | 'expanded'
234
- setState,
235
- isOpen, // boolean
236
- open, // () => void
237
- close, // () => void
238
- toggle // () => void
239
- } = useChat(initialState);
283
+ state, // 'collapsed' | 'compact' | 'expanded'
284
+ setState,
285
+ isOpen, // boolean
286
+ open, // () => void
287
+ close, // () => void
288
+ toggle, // () => void
289
+ } = useChat( initialState );
240
290
  ```
241
291
 
242
292
  ### useInput
243
293
 
244
- Manages text input state with auto-resize and keyboard handling.
294
+ Manages input state with auto-resize:
245
295
 
246
296
  ```tsx
247
- const {
248
- value,
249
- setValue,
250
- clear,
251
- textareaRef,
252
- handleKeyDown,
253
- adjustHeight
254
- } = useInput({
255
- value: inputValue,
256
- setValue: setInputValue,
257
- onSubmit: handleSubmit,
258
- isProcessing: false
259
- });
260
- ```
261
-
262
- ## Icons
263
-
264
- Pre-built icon components for consistent UI:
265
-
266
- ```tsx
267
- import {
268
- ThumbsUpIcon,
269
- ThumbsDownIcon,
270
- CopyIcon,
271
- StopIcon,
272
- ArrowUpIcon,
273
- XIcon,
274
- BigSkyIcon,
275
- StylesIcon
276
- } from '@automattic/agenttic-ui';
297
+ const { value, setValue, clear, textareaRef, handleKeyDown, adjustHeight } =
298
+ useInput( {
299
+ value: inputValue,
300
+ setValue: setInputValue,
301
+ onSubmit: handleSubmit,
302
+ isProcessing: false,
303
+ } );
277
304
  ```
278
305
 
279
306
  ## Type Definitions
280
307
 
281
308
  ```tsx
282
309
  interface Message {
283
- id: string;
284
- role: 'user' | 'agent';
285
- content: Array<{
286
- type: 'text' | 'image_url' | 'component';
287
- text?: string;
288
- image_url?: string;
289
- component?: React.ComponentType;
290
- componentProps?: any;
291
- }>;
292
- timestamp: number;
293
- archived: boolean;
294
- showIcon: boolean;
295
- icon?: string;
296
- actions?: MessageAction[];
310
+ id: string;
311
+ role: 'user' | 'agent';
312
+ content: Array< {
313
+ type: 'text' | 'image_url' | 'component';
314
+ text?: string;
315
+ image_url?: string;
316
+ component?: React.ComponentType;
317
+ componentProps?: any;
318
+ } >;
319
+ timestamp: number;
320
+ archived: boolean;
321
+ showIcon: boolean;
322
+ icon?: string;
323
+ actions?: MessageAction[];
297
324
  }
298
325
 
299
326
  interface MessageAction {
300
- id: string;
301
- icon: React.ReactNode;
302
- label: string;
303
- onClick: (message: Message) => void | Promise<void>;
304
- tooltip?: string;
305
- disabled?: boolean;
327
+ id: string;
328
+ icon?: React.ReactNode;
329
+ label: string;
330
+ onClick: ( message: Message ) => void | Promise< void >;
331
+ tooltip?: string;
332
+ disabled?: boolean;
333
+ pressed?: boolean;
334
+ showLabel?: boolean;
306
335
  }
307
336
 
308
337
  interface Suggestion {
309
- id: string;
310
- label: string;
311
- prompt: string;
338
+ id: string;
339
+ label: string;
340
+ prompt: string;
312
341
  }
313
342
 
314
343
  interface NoticeConfig {
315
- icon?: React.ReactNode;
316
- message: string;
317
- action?: {
318
- label: string;
319
- onClick: () => void;
320
- };
321
- dismissible?: boolean;
322
- onDismiss?: () => void;
344
+ icon?: React.ReactNode;
345
+ message: string;
346
+ action?: {
347
+ label: string;
348
+ onClick: () => void;
349
+ };
350
+ dismissible?: boolean;
351
+ onDismiss?: () => void;
323
352
  }
324
353
 
325
354
  type ChatState = 'collapsed' | 'compact' | 'expanded';
@@ -329,131 +358,46 @@ type ChatState = 'collapsed' | 'compact' | 'expanded';
329
358
 
330
359
  ### CSS Import
331
360
 
332
- Components automatically import their styles. For manual control:
333
-
334
- ```css
335
- /* In your CSS */
336
- @import '@automattic/agenttic-ui/index.css';
337
- ```
338
-
339
361
  ```tsx
340
- // In JavaScript/TypeScript
341
362
  import '@automattic/agenttic-ui/index.css';
342
363
  ```
343
364
 
344
365
  ### CSS Scoping
345
366
 
346
- All AgentUI styles are scoped to the `.agenttic` class to prevent conflicts with host applications. This ensures that the component styles don't interfere with your existing styles.
367
+ All styles are scoped to `.agenttic` class to prevent conflicts.
347
368
 
348
369
  ### Customization
349
370
 
350
- Override CSS custom properties to theme the entire chat or specific areas:
371
+ Override CSS custom properties:
351
372
 
352
373
  ```css
353
- /* Global theming */
354
374
  .agenttic {
355
- --color-primary: #your-brand-color;
356
- --color-background: #ffffff;
357
- --color-foreground: #000000;
358
- /* ...other custom properties as needed. */
375
+ --color-primary: #your-brand-color;
376
+ --color-background: #ffffff;
377
+ --color-foreground: #000000;
359
378
  }
360
379
 
361
- /* Target specific UI areas, e.g. the chat footer as seen in Big Sky embedded site spec. */
362
- .agenttic [data-slot="chat-footer"] {
363
- --color-background: oklch(1 0 0);
364
- --color-foreground: oklch(0.241 0 0);
365
- --color-primary: #your-brand-color;
366
- --color-primary-foreground: oklch(1 0 0);
367
- --color-muted: oklch(0.925 0 0);
368
- --color-muted-foreground: oklch(0.6 0 0);
380
+ .agenttic [data-slot='chat-footer'] {
381
+ --color-background: oklch( 1 0 0 );
382
+ --color-primary: #your-brand-color;
369
383
  }
370
384
  ```
371
385
 
372
- This approach allows granular theming of specific areas without affecting other parts of the application.
373
-
374
- ## Advanced Usage
375
-
376
- ### Custom Message Renderer
377
-
378
- Provide a custom markdown renderer:
379
-
380
- ```tsx
381
- import { ReactMarkdown } from 'react-markdown';
382
-
383
- const customRenderer = ({ children }: { children: string }) => (
384
- <ReactMarkdown
385
- remarkPlugins={[remarkGfm]}
386
- components={{
387
- code: ({ children }) => <code className="custom-code">{children}</code>
388
- }}
389
- >
390
- {children}
391
- </ReactMarkdown>
392
- );
393
-
394
- <AgentUI
395
- messages={messages}
396
- messageRenderer={customRenderer}
397
- // ... other props
398
- />
399
- ```
400
-
401
- ### Message Actions
402
-
403
- Messages can include interactive actions:
404
-
405
- ```tsx
406
- const messagesWithActions = messages.map(message => ({
407
- ...message,
408
- actions: message.role === 'agent' ? [
409
- {
410
- id: 'copy',
411
- icon: <CopyIcon />,
412
- label: 'Copy',
413
- onClick: () => navigator.clipboard.writeText(message.content[0].text)
414
- },
415
- {
416
- id: 'feedback',
417
- icon: <ThumbsUpIcon />,
418
- label: 'Good response',
419
- onClick: () => console.log('Positive feedback')
420
- }
421
- ] : []
422
- }));
423
- ```
424
-
425
- ### Controlled Chat State
426
-
427
- For floating variant, control the chat state externally:
428
-
429
- ```tsx
430
- const [chatState, setChatState] = useState<ChatState>('collapsed');
431
-
432
- <AgentUI
433
- variant="floating"
434
- floatingChatState={chatState}
435
- onOpen={() => setChatState('compact')}
436
- onExpand={() => setChatState('expanded')}
437
- onClose={() => setChatState('collapsed')}
438
- // ... other props
439
- />
440
- ```
441
-
442
- ### Custom Empty View
386
+ ## Icons
443
387
 
444
- Provide custom content when there are no messages:
388
+ Pre-built icon components:
445
389
 
446
390
  ```tsx
447
- <AgentUI
448
- messages={[]}
449
- emptyView={
450
- <div className="welcome-message">
451
- <h3>Welcome to AI Assistant</h3>
452
- <p>I'm here to help you with any questions.</p>
453
- </div>
454
- }
455
- // ... other props
456
- />
391
+ import {
392
+ ThumbsUpIcon,
393
+ ThumbsDownIcon,
394
+ CopyIcon,
395
+ StopIcon,
396
+ ArrowUpIcon,
397
+ XIcon,
398
+ BigSkyIcon,
399
+ StylesIcon,
400
+ } from '@automattic/agenttic-ui';
457
401
  ```
458
402
 
459
403
  ## Development
@@ -475,32 +419,19 @@ pnpm type-check
475
419
  pnpm storybook
476
420
  ```
477
421
 
478
- ## Storybook Documentation
479
-
480
- Interactive component documentation is available via Storybook:
481
-
482
- ```bash
483
- pnpm storybook
484
- ```
485
-
486
- Visit `http://localhost:6006` to explore component examples and documentation.
487
-
488
422
  ## Integration with agenttic-client
489
423
 
490
- This UI package is designed to work seamlessly with `@automattic/agenttic-client`:
491
-
492
424
  ```tsx
493
425
  import { useAgentChat } from '@automattic/agenttic-client';
494
426
  import { AgentUI } from '@automattic/agenttic-ui';
495
427
 
496
428
  function App() {
497
- const agentProps = useAgentChat({
498
- agentId: 'big-sky',
499
- // ... configuration
500
- });
429
+ const agentProps = useAgentChat( {
430
+ agentId: 'big-sky',
431
+ } );
501
432
 
502
- return <AgentUI {...agentProps} variant="floating" />;
433
+ return <AgentUI { ...agentProps } variant="floating" />;
503
434
  }
504
435
  ```
505
436
 
506
- The `useAgentChat` hook returns props that match the `AgentUI` interface perfectly, making integration seamless.
437
+ The `useAgentChat` hook returns props that match the `AgentUI` interface.