@patternfly/chatbot 6.5.0-prerelease.8 → 6.5.0

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 (315) hide show
  1. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +9 -1
  2. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +9 -2
  3. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +38 -0
  4. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +29 -2
  5. package/dist/cjs/CodeModal/CodeModal.d.ts +2 -0
  6. package/dist/cjs/CodeModal/CodeModal.js +53 -12
  7. package/dist/cjs/DeepThinking/DeepThinking.d.ts +13 -0
  8. package/dist/cjs/DeepThinking/DeepThinking.js +31 -3
  9. package/dist/cjs/DeepThinking/DeepThinking.test.js +80 -0
  10. package/dist/cjs/MarkdownContent/MarkdownContent.d.ts +44 -0
  11. package/dist/cjs/MarkdownContent/MarkdownContent.js +181 -0
  12. package/dist/cjs/MarkdownContent/MarkdownContent.test.d.ts +1 -0
  13. package/dist/cjs/MarkdownContent/MarkdownContent.test.js +192 -0
  14. package/dist/cjs/MarkdownContent/index.d.ts +2 -0
  15. package/dist/cjs/MarkdownContent/index.js +23 -0
  16. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.d.ts +3 -1
  17. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.js +15 -4
  18. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.test.d.ts +1 -0
  19. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.test.js +131 -0
  20. package/dist/cjs/Message/ErrorMessage/ErrorMessage.d.ts +15 -1
  21. package/dist/cjs/Message/ErrorMessage/ErrorMessage.js +5 -3
  22. package/dist/cjs/Message/ErrorMessage/ErrorMessage.test.d.ts +1 -0
  23. package/dist/cjs/Message/ErrorMessage/ErrorMessage.test.js +30 -0
  24. package/dist/cjs/Message/LinkMessage/LinkMessage.d.ts +5 -1
  25. package/dist/cjs/Message/LinkMessage/LinkMessage.js +4 -3
  26. package/dist/cjs/Message/ListMessage/OrderedListMessage.d.ts +9 -1
  27. package/dist/cjs/Message/ListMessage/OrderedListMessage.js +2 -1
  28. package/dist/cjs/Message/ListMessage/UnorderedListMessage.d.ts +7 -1
  29. package/dist/cjs/Message/ListMessage/UnorderedListMessage.js +2 -1
  30. package/dist/cjs/Message/Message.d.ts +20 -3
  31. package/dist/cjs/Message/Message.js +7 -160
  32. package/dist/cjs/Message/Message.test.js +129 -2
  33. package/dist/cjs/Message/MessageAndActions/MessageAndActions.d.ts +14 -0
  34. package/dist/cjs/Message/MessageAndActions/MessageAndActions.js +22 -0
  35. package/dist/cjs/Message/MessageAndActions/MessageAndActions.test.d.ts +1 -0
  36. package/dist/cjs/Message/MessageAndActions/MessageAndActions.test.js +25 -0
  37. package/dist/cjs/Message/MessageAndActions/index.d.ts +1 -0
  38. package/dist/cjs/Message/MessageAndActions/index.js +17 -0
  39. package/dist/cjs/Message/MessageAttachments/MessageAttachmentItem.d.ts +13 -0
  40. package/dist/cjs/Message/MessageAttachments/MessageAttachmentItem.js +22 -0
  41. package/dist/cjs/Message/MessageAttachments/MessageAttachmentItem.test.d.ts +1 -0
  42. package/dist/cjs/Message/MessageAttachments/MessageAttachmentItem.test.js +25 -0
  43. package/dist/cjs/Message/MessageAttachments/MessageAttachmentsContainer.d.ts +13 -0
  44. package/dist/cjs/Message/MessageAttachments/MessageAttachmentsContainer.js +22 -0
  45. package/dist/cjs/Message/MessageAttachments/MessageAttachmentsContainer.test.d.ts +1 -0
  46. package/dist/cjs/Message/MessageAttachments/MessageAttachmentsContainer.test.js +25 -0
  47. package/dist/cjs/Message/MessageAttachments/index.d.ts +2 -0
  48. package/dist/cjs/Message/MessageAttachments/index.js +18 -0
  49. package/dist/cjs/Message/MessageInput.d.ts +1 -1
  50. package/dist/cjs/Message/MessageInput.js +3 -1
  51. package/dist/cjs/Message/MessageLoading.d.ts +13 -4
  52. package/dist/cjs/Message/MessageLoading.js +19 -5
  53. package/dist/cjs/Message/MessageLoading.test.d.ts +1 -0
  54. package/dist/cjs/Message/MessageLoading.test.js +25 -0
  55. package/dist/cjs/Message/QuickResponse/QuickResponse.js +3 -2
  56. package/dist/cjs/Message/QuickResponse/QuickResponse.test.d.ts +1 -0
  57. package/dist/cjs/Message/QuickResponse/QuickResponse.test.js +109 -0
  58. package/dist/cjs/Message/QuickResponse/index.d.ts +1 -0
  59. package/dist/cjs/Message/QuickResponse/index.js +17 -0
  60. package/dist/cjs/Message/QuickStarts/QuickStartTile.d.ts +1 -1
  61. package/dist/cjs/Message/QuickStarts/QuickStartTile.js +3 -2
  62. package/dist/cjs/Message/QuickStarts/index.d.ts +2 -0
  63. package/dist/cjs/Message/QuickStarts/index.js +18 -0
  64. package/dist/cjs/Message/TableMessage/TableMessage.d.ts +6 -1
  65. package/dist/cjs/Message/TableMessage/TableMessage.js +3 -2
  66. package/dist/cjs/Message/TextMessage/TextMessage.d.ts +8 -1
  67. package/dist/cjs/Message/TextMessage/TextMessage.js +3 -2
  68. package/dist/cjs/Message/UserFeedback/UserFeedback.d.ts +3 -1
  69. package/dist/cjs/Message/UserFeedback/UserFeedback.js +8 -6
  70. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +1 -1
  71. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +3 -2
  72. package/dist/cjs/Message/UserFeedback/index.d.ts +2 -0
  73. package/dist/cjs/Message/UserFeedback/index.js +18 -0
  74. package/dist/cjs/Message/index.d.ts +8 -0
  75. package/dist/cjs/Message/index.js +8 -0
  76. package/dist/cjs/MessageBar/MessageBar.d.ts +4 -0
  77. package/dist/cjs/MessageBar/MessageBar.js +20 -5
  78. package/dist/cjs/MessageBar/MessageBar.test.js +8 -0
  79. package/dist/cjs/Onboarding/Onboarding.d.ts +36 -0
  80. package/dist/cjs/Onboarding/Onboarding.js +37 -0
  81. package/dist/cjs/Onboarding/Onboarding.test.d.ts +1 -0
  82. package/dist/cjs/Onboarding/Onboarding.test.js +80 -0
  83. package/dist/cjs/Onboarding/index.d.ts +2 -0
  84. package/dist/cjs/Onboarding/index.js +23 -0
  85. package/dist/cjs/ResponseActions/ResponseActions.d.ts +7 -0
  86. package/dist/cjs/ResponseActions/ResponseActions.js +28 -7
  87. package/dist/cjs/ResponseActions/ResponseActions.test.js +67 -12
  88. package/dist/cjs/ResponseActions/ResponseActionsGroups.d.ts +13 -0
  89. package/dist/cjs/ResponseActions/ResponseActionsGroups.js +22 -0
  90. package/dist/cjs/ResponseActions/ResponseActionsGroups.test.d.ts +1 -0
  91. package/dist/cjs/ResponseActions/ResponseActionsGroups.test.js +25 -0
  92. package/dist/cjs/ResponseActions/index.d.ts +1 -0
  93. package/dist/cjs/ResponseActions/index.js +1 -0
  94. package/dist/cjs/ToolCall/ToolCall.d.ts +11 -0
  95. package/dist/cjs/ToolCall/ToolCall.js +24 -3
  96. package/dist/cjs/ToolCall/ToolCall.test.js +57 -0
  97. package/dist/cjs/ToolResponse/ToolResponse.d.ts +17 -0
  98. package/dist/cjs/ToolResponse/ToolResponse.js +49 -3
  99. package/dist/cjs/ToolResponse/ToolResponse.test.js +100 -0
  100. package/dist/cjs/index.d.ts +4 -0
  101. package/dist/cjs/index.js +7 -1
  102. package/dist/css/main.css +268 -30
  103. package/dist/css/main.css.map +1 -1
  104. package/dist/dynamic/MarkdownContent/package.json +1 -0
  105. package/dist/dynamic/Onboarding/package.json +1 -0
  106. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +9 -1
  107. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +10 -3
  108. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +38 -0
  109. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +30 -3
  110. package/dist/esm/CodeModal/CodeModal.d.ts +2 -0
  111. package/dist/esm/CodeModal/CodeModal.js +54 -13
  112. package/dist/esm/DeepThinking/DeepThinking.d.ts +13 -0
  113. package/dist/esm/DeepThinking/DeepThinking.js +28 -3
  114. package/dist/esm/DeepThinking/DeepThinking.test.js +80 -0
  115. package/dist/esm/MarkdownContent/MarkdownContent.d.ts +44 -0
  116. package/dist/esm/MarkdownContent/MarkdownContent.js +174 -0
  117. package/dist/esm/MarkdownContent/MarkdownContent.test.d.ts +1 -0
  118. package/dist/esm/MarkdownContent/MarkdownContent.test.js +187 -0
  119. package/dist/esm/MarkdownContent/index.d.ts +2 -0
  120. package/dist/esm/MarkdownContent/index.js +2 -0
  121. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.d.ts +3 -1
  122. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.js +15 -4
  123. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.test.d.ts +1 -0
  124. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.test.js +126 -0
  125. package/dist/esm/Message/ErrorMessage/ErrorMessage.d.ts +15 -1
  126. package/dist/esm/Message/ErrorMessage/ErrorMessage.js +3 -3
  127. package/dist/esm/Message/ErrorMessage/ErrorMessage.test.d.ts +1 -0
  128. package/dist/esm/Message/ErrorMessage/ErrorMessage.test.js +25 -0
  129. package/dist/esm/Message/LinkMessage/LinkMessage.d.ts +5 -1
  130. package/dist/esm/Message/LinkMessage/LinkMessage.js +4 -3
  131. package/dist/esm/Message/ListMessage/OrderedListMessage.d.ts +9 -1
  132. package/dist/esm/Message/ListMessage/OrderedListMessage.js +2 -1
  133. package/dist/esm/Message/ListMessage/UnorderedListMessage.d.ts +7 -1
  134. package/dist/esm/Message/ListMessage/UnorderedListMessage.js +2 -1
  135. package/dist/esm/Message/Message.d.ts +20 -3
  136. package/dist/esm/Message/Message.js +8 -161
  137. package/dist/esm/Message/Message.test.js +129 -2
  138. package/dist/esm/Message/MessageAndActions/MessageAndActions.d.ts +14 -0
  139. package/dist/esm/Message/MessageAndActions/MessageAndActions.js +18 -0
  140. package/dist/esm/Message/MessageAndActions/MessageAndActions.test.d.ts +1 -0
  141. package/dist/esm/Message/MessageAndActions/MessageAndActions.test.js +20 -0
  142. package/dist/esm/Message/MessageAndActions/index.d.ts +1 -0
  143. package/dist/esm/Message/MessageAndActions/index.js +1 -0
  144. package/dist/esm/Message/MessageAttachments/MessageAttachmentItem.d.ts +13 -0
  145. package/dist/esm/Message/MessageAttachments/MessageAttachmentItem.js +18 -0
  146. package/dist/esm/Message/MessageAttachments/MessageAttachmentItem.test.d.ts +1 -0
  147. package/dist/esm/Message/MessageAttachments/MessageAttachmentItem.test.js +20 -0
  148. package/dist/esm/Message/MessageAttachments/MessageAttachmentsContainer.d.ts +13 -0
  149. package/dist/esm/Message/MessageAttachments/MessageAttachmentsContainer.js +18 -0
  150. package/dist/esm/Message/MessageAttachments/MessageAttachmentsContainer.test.d.ts +1 -0
  151. package/dist/esm/Message/MessageAttachments/MessageAttachmentsContainer.test.js +20 -0
  152. package/dist/esm/Message/MessageAttachments/index.d.ts +2 -0
  153. package/dist/esm/Message/MessageAttachments/index.js +2 -0
  154. package/dist/esm/Message/MessageInput.d.ts +1 -1
  155. package/dist/esm/Message/MessageInput.js +1 -1
  156. package/dist/esm/Message/MessageLoading.d.ts +13 -4
  157. package/dist/esm/Message/MessageLoading.js +16 -4
  158. package/dist/esm/Message/MessageLoading.test.d.ts +1 -0
  159. package/dist/esm/Message/MessageLoading.test.js +20 -0
  160. package/dist/esm/Message/QuickResponse/QuickResponse.js +3 -2
  161. package/dist/esm/Message/QuickResponse/QuickResponse.test.d.ts +1 -0
  162. package/dist/esm/Message/QuickResponse/QuickResponse.test.js +104 -0
  163. package/dist/esm/Message/QuickResponse/index.d.ts +1 -0
  164. package/dist/esm/Message/QuickResponse/index.js +1 -0
  165. package/dist/esm/Message/QuickStarts/QuickStartTile.d.ts +1 -1
  166. package/dist/esm/Message/QuickStarts/QuickStartTile.js +1 -1
  167. package/dist/esm/Message/QuickStarts/index.d.ts +2 -0
  168. package/dist/esm/Message/QuickStarts/index.js +2 -0
  169. package/dist/esm/Message/TableMessage/TableMessage.d.ts +6 -1
  170. package/dist/esm/Message/TableMessage/TableMessage.js +3 -2
  171. package/dist/esm/Message/TextMessage/TextMessage.d.ts +8 -1
  172. package/dist/esm/Message/TextMessage/TextMessage.js +3 -2
  173. package/dist/esm/Message/UserFeedback/UserFeedback.d.ts +3 -1
  174. package/dist/esm/Message/UserFeedback/UserFeedback.js +7 -7
  175. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +1 -1
  176. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +1 -2
  177. package/dist/esm/Message/UserFeedback/index.d.ts +2 -0
  178. package/dist/esm/Message/UserFeedback/index.js +2 -0
  179. package/dist/esm/Message/index.d.ts +8 -0
  180. package/dist/esm/Message/index.js +8 -0
  181. package/dist/esm/MessageBar/MessageBar.d.ts +4 -0
  182. package/dist/esm/MessageBar/MessageBar.js +20 -5
  183. package/dist/esm/MessageBar/MessageBar.test.js +8 -0
  184. package/dist/esm/Onboarding/Onboarding.d.ts +36 -0
  185. package/dist/esm/Onboarding/Onboarding.js +30 -0
  186. package/dist/esm/Onboarding/Onboarding.test.d.ts +1 -0
  187. package/dist/esm/Onboarding/Onboarding.test.js +75 -0
  188. package/dist/esm/Onboarding/index.d.ts +2 -0
  189. package/dist/esm/Onboarding/index.js +2 -0
  190. package/dist/esm/ResponseActions/ResponseActions.d.ts +7 -0
  191. package/dist/esm/ResponseActions/ResponseActions.js +28 -7
  192. package/dist/esm/ResponseActions/ResponseActions.test.js +67 -12
  193. package/dist/esm/ResponseActions/ResponseActionsGroups.d.ts +13 -0
  194. package/dist/esm/ResponseActions/ResponseActionsGroups.js +18 -0
  195. package/dist/esm/ResponseActions/ResponseActionsGroups.test.d.ts +1 -0
  196. package/dist/esm/ResponseActions/ResponseActionsGroups.test.js +20 -0
  197. package/dist/esm/ResponseActions/index.d.ts +1 -0
  198. package/dist/esm/ResponseActions/index.js +1 -0
  199. package/dist/esm/ToolCall/ToolCall.d.ts +11 -0
  200. package/dist/esm/ToolCall/ToolCall.js +21 -3
  201. package/dist/esm/ToolCall/ToolCall.test.js +57 -0
  202. package/dist/esm/ToolResponse/ToolResponse.d.ts +17 -0
  203. package/dist/esm/ToolResponse/ToolResponse.js +46 -3
  204. package/dist/esm/ToolResponse/ToolResponse.test.js +100 -0
  205. package/dist/esm/index.d.ts +4 -0
  206. package/dist/esm/index.js +4 -0
  207. package/dist/tsconfig.tsbuildinfo +1 -1
  208. package/package.json +13 -3
  209. package/patternfly-docs/content/extensions/chatbot/chatbot.md +57 -0
  210. package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +12 -12
  211. package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +1 -1
  212. package/patternfly-docs/content/extensions/chatbot/examples/Customizing Messages/Customizing Messages.md +1 -1
  213. package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +1 -0
  214. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomStructure.tsx +102 -0
  215. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithDeepThinking.tsx +25 -11
  216. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +14 -1
  217. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownDeepThinking.tsx +26 -0
  218. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownToolCall.tsx +29 -0
  219. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownToolResponse.tsx +200 -0
  220. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMultipleActionGroups.tsx +61 -0
  221. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithPersistedActions.tsx +22 -0
  222. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +11 -0
  223. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolCall.tsx +14 -1
  224. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx +222 -105
  225. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +123 -14
  226. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +1 -0
  227. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithSearchActions.tsx +198 -0
  228. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarIndicatorThinking.tsx +15 -0
  229. package/patternfly-docs/content/extensions/chatbot/examples/UI/CompactOnboarding.tsx +141 -0
  230. package/patternfly-docs/content/extensions/chatbot/examples/UI/Onboarding.tsx +151 -0
  231. package/patternfly-docs/content/extensions/chatbot/examples/UI/RH-Hat-Image.svg +9 -0
  232. package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +67 -29
  233. package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +18 -18
  234. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +33 -19
  235. package/patternfly-docs/patternfly-docs.config.js +1 -1
  236. package/patternfly-docs/patternfly-docs.source.js +1 -1
  237. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +43 -0
  238. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +95 -0
  239. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +51 -15
  240. package/src/ChatbotHeader/ChatbotHeader.scss +4 -0
  241. package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +56 -14
  242. package/src/ChatbotModal/ChatbotModal.scss +3 -0
  243. package/src/CodeModal/CodeModal.tsx +71 -26
  244. package/src/DeepThinking/DeepThinking.scss +1 -1
  245. package/src/DeepThinking/DeepThinking.test.tsx +109 -0
  246. package/src/DeepThinking/DeepThinking.tsx +54 -5
  247. package/src/MarkdownContent/MarkdownContent.test.tsx +207 -0
  248. package/src/MarkdownContent/MarkdownContent.tsx +269 -0
  249. package/src/MarkdownContent/index.ts +2 -0
  250. package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +13 -0
  251. package/src/Message/CodeBlockMessage/CodeBlockMessage.test.tsx +171 -0
  252. package/src/Message/CodeBlockMessage/CodeBlockMessage.tsx +17 -4
  253. package/src/Message/ErrorMessage/ErrorMessage.test.tsx +38 -0
  254. package/src/Message/ErrorMessage/ErrorMessage.tsx +17 -2
  255. package/src/Message/LinkMessage/LinkMessage.scss +5 -0
  256. package/src/Message/LinkMessage/LinkMessage.tsx +24 -2
  257. package/src/Message/ListMessage/ListMessage.scss +8 -0
  258. package/src/Message/ListMessage/OrderedListMessage.tsx +16 -2
  259. package/src/Message/ListMessage/UnorderedListMessage.tsx +12 -2
  260. package/src/Message/Message.scss +11 -7
  261. package/src/Message/Message.test.tsx +202 -2
  262. package/src/Message/Message.tsx +129 -241
  263. package/src/Message/MessageAndActions/MessageAndActions.test.tsx +23 -0
  264. package/src/Message/MessageAndActions/MessageAndActions.tsx +22 -0
  265. package/src/Message/MessageAndActions/index.ts +1 -0
  266. package/src/Message/MessageAttachments/MessageAttachmentItem.test.tsx +23 -0
  267. package/src/Message/MessageAttachments/MessageAttachmentItem.tsx +25 -0
  268. package/src/Message/MessageAttachments/MessageAttachmentsContainer.test.tsx +23 -0
  269. package/src/Message/MessageAttachments/MessageAttachmentsContainer.tsx +25 -0
  270. package/src/Message/MessageAttachments/index.ts +2 -0
  271. package/src/Message/MessageInput.tsx +1 -1
  272. package/src/Message/MessageLoading.test.tsx +23 -0
  273. package/src/Message/MessageLoading.tsx +17 -2
  274. package/src/Message/QuickResponse/QuickResponse.scss +3 -1
  275. package/src/Message/QuickResponse/QuickResponse.test.tsx +131 -0
  276. package/src/Message/QuickResponse/QuickResponse.tsx +3 -2
  277. package/src/Message/QuickResponse/index.ts +1 -0
  278. package/src/Message/QuickStarts/QuickStartTile.tsx +1 -1
  279. package/src/Message/QuickStarts/index.ts +2 -0
  280. package/src/Message/TableMessage/TableMessage.scss +13 -1
  281. package/src/Message/TableMessage/TableMessage.tsx +18 -2
  282. package/src/Message/TextMessage/TextMessage.scss +12 -0
  283. package/src/Message/TextMessage/TextMessage.tsx +29 -2
  284. package/src/Message/UserFeedback/UserFeedback.scss +28 -1
  285. package/src/Message/UserFeedback/UserFeedback.tsx +23 -13
  286. package/src/Message/UserFeedback/UserFeedbackComplete.tsx +1 -4
  287. package/src/Message/UserFeedback/index.ts +2 -0
  288. package/src/Message/index.ts +8 -0
  289. package/src/MessageBar/AttachButton.scss +0 -1
  290. package/src/MessageBar/MessageBar.scss +48 -6
  291. package/src/MessageBar/MessageBar.test.tsx +12 -0
  292. package/src/MessageBar/MessageBar.tsx +38 -4
  293. package/src/MessageBar/MicrophoneButton.scss +0 -1
  294. package/src/MessageBar/SendButton.scss +0 -1
  295. package/src/MessageBar/StopButton.scss +0 -1
  296. package/src/Onboarding/Onboarding.scss +101 -0
  297. package/src/Onboarding/Onboarding.test.tsx +148 -0
  298. package/src/Onboarding/Onboarding.tsx +126 -0
  299. package/src/Onboarding/index.ts +3 -0
  300. package/src/ResponseActions/ResponseActions.scss +12 -1
  301. package/src/ResponseActions/ResponseActions.test.tsx +111 -12
  302. package/src/ResponseActions/ResponseActions.tsx +44 -10
  303. package/src/ResponseActions/ResponseActionsGroups.test.tsx +23 -0
  304. package/src/ResponseActions/ResponseActionsGroups.tsx +28 -0
  305. package/src/ResponseActions/index.ts +1 -0
  306. package/src/ToolCall/ToolCall.scss +1 -1
  307. package/src/ToolCall/ToolCall.test.tsx +91 -0
  308. package/src/ToolCall/ToolCall.tsx +49 -4
  309. package/src/ToolResponse/ToolResponse.scss +13 -3
  310. package/src/ToolResponse/ToolResponse.test.tsx +119 -0
  311. package/src/ToolResponse/ToolResponse.tsx +82 -7
  312. package/src/index.ts +6 -0
  313. package/src/main.scss +2 -0
  314. package/tsconfig.json +1 -1
  315. package/patternfly-docs/content/extensions/chatbot/about-chatbot.md +0 -44
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  # Sidenav top-level section
3
3
  # should be the same for all markdown files
4
- section: PatternFly-AI
4
+ section: extensions
5
5
  subsection: ChatBot
6
6
  # Sidenav secondary level section
7
7
  # should be the same for all markdown files
@@ -53,6 +53,7 @@ import FileDropZone from '@patternfly/chatbot/dist/dynamic/FileDropZone';
53
53
  import { PreviewAttachment } from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
54
54
  import ChatbotAlert from '@patternfly/chatbot/dist/dynamic/ChatbotAlert';
55
55
  import TermsOfUse from '@patternfly/chatbot/dist/dynamic/TermsOfUse';
56
+ import Onboarding from '@patternfly/chatbot/dist/dynamic/Onboarding';
56
57
  import {
57
58
  ChatbotHeader,
58
59
  ChatbotHeaderCloseButton,
@@ -73,7 +74,7 @@ import { BellIcon, CalendarAltIcon, ClipboardIcon, CodeIcon, ThumbtackIcon, Uplo
73
74
  import { useDropzone } from 'react-dropzone';
74
75
 
75
76
  import ChatbotConversationHistoryNav from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
76
- import { DropdownItem, DropdownList, Checkbox } from '@patternfly/react-core';
77
+ import { Button, DropdownItem, DropdownList, Checkbox, MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
77
78
 
78
79
  import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
79
80
  import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
@@ -85,7 +86,8 @@ import PFHorizontalLogoReverse from './PF-HorizontalLogo-Reverse.svg';
85
86
  import userAvatar from '../Messages/user_avatar.svg';
86
87
  import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
87
88
  import termsAndConditionsHeader from './PF-TermsAndConditionsHeader.svg';
88
- import { CloseIcon, SearchIcon, OutlinedCommentsIcon } from '@patternfly/react-icons';
89
+ import onboardingHeader from './RH-Hat-Image.svg';
90
+ import { CloseIcon, SearchIcon, OutlinedCommentsIcon, FilterIcon, SortAmountDownIcon } from '@patternfly/react-icons';
89
91
  import { FunctionComponent, FormEvent, useState, useRef, MouseEvent, isValidElement, cloneElement, Children, ReactNode, Ref, MouseEvent as ReactMouseEvent, CSSProperties, useEffect} from 'react';
90
92
  import FilePreview from '@patternfly/chatbot/dist/dynamic/FilePreview';
91
93
 
@@ -93,7 +95,7 @@ import FilePreview from '@patternfly/chatbot/dist/dynamic/FilePreview';
93
95
 
94
96
  ### Container
95
97
 
96
- The PatternFly ChatBot is a separate window that overlays or is embedded within other UI content. This container can be shown and hidden via [the ChatBot toggle.](/patternfly-ai/chatbot/ui#toggle)
98
+ The PatternFly ChatBot is a separate window that overlays or is embedded within other UI content. This container can be shown and hidden via [the ChatBot toggle.](/extensions/chatbot/ui#toggle)
97
99
 
98
100
  The `<Chatbot>` component is the container that encompasses the ChatBot experience. It adapts to various display modes (overlay/default, docked, fullscreen, and embedded) and supports both light and dark themes.
99
101
 
@@ -105,7 +107,7 @@ The "embedded" display mode is meant to be used within a [PatternFly page](/comp
105
107
 
106
108
  ### Content and message box
107
109
 
108
- The `<ChatbotContent>` component is the container that is placed within the `<Chatbot>`, between the [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) and [`<ChatbotFooter>`.](/patternfly-ai/chatbot/ui#footer)
110
+ The `<ChatbotContent>` component is the container that is placed within the `<Chatbot>`, between the [`<ChatbotHeader>`](/extensions/chatbot/ui#header) and [`<ChatbotFooter>`.](/extensions/chatbot/ui#footer)
109
111
 
110
112
  `<ChatbotContent>` usually contains a `<ChatbotMessageBox>` for displaying messages.
111
113
 
@@ -123,11 +125,11 @@ Your code structure should look like this:
123
125
  </Chatbot>
124
126
  ```
125
127
 
126
- **Note**: When messages update, it is important to announce new messages to users of assistive technology. To do this, make sure to set the `announcement` prop on `<MessageBox>` whenever you display a new message in `<MessageBox>`. You can view this in action in our [basic ChatBot](/patternfly-ai/chatbot/overview/demo#basic-chatbot) and [embedded ChatBot](/patternfly-ai/chatbot/overview/demo#embedded-chatbot) demos.
128
+ **Note**: When messages update, it is important to announce new messages to users of assistive technology. To do this, make sure to set the `announcement` prop on `<MessageBox>` whenever you display a new message in `<MessageBox>`. You can view this in action in our [basic ChatBot](/extensions/chatbot/overview/demo#basic-chatbot) and [embedded ChatBot](/extensions/chatbot/overview/demo#embedded-chatbot) demos.
127
129
 
128
130
  ### Welcome message
129
131
 
130
- To introduce users to the ChatBot experience, display a welcome message before they input their first message. This brief message should follow our [conversation design guidelines](/patternfly-ai/conversation-design) to welcome users to the ChatBot experience and encourage them to interact.
132
+ To introduce users to the ChatBot experience, display a welcome message before they input their first message. This brief message should follow our [conversation design guidelines](/ai/conversation-design) to welcome users to the ChatBot experience and encourage them to interact.
131
133
 
132
134
  This message can be dismissed once a user sends their first message. To change the arrangement of the message within the message box, specify the `position` in the `<MessageBox>` component.
133
135
 
@@ -147,7 +149,7 @@ To provide users with a more specific direction, you can also include optional w
147
149
 
148
150
  To provide page context, we recommend using a "Skip to chatbot" button. This allows you to skip past other content on the page, directly to the ChatBot content, using a [PatternFly skip to content component](/components/skip-to-content). To display this button, you must tab into the main window.
149
151
 
150
- When using default or docked modes, we recommend putting focus on the toggle if the ChatBot is closed, and the ChatBot when it is open. For fullscreen and embedded, we recommend putting the focus on the first focusable item in the ChatBot, such as a menu toggle. This can be seen in our more fully-featured demos for the [default, embedded, and fullscreen ChatBot](/patternfly-ai/chatbot/overview/demo#basic-chatbot) and the [embedded ChatBot](/patternfly-ai/chatbot/overview/demo#embedded-chatbot).
152
+ When using default or docked modes, we recommend putting focus on the toggle if the ChatBot is closed, and the ChatBot when it is open. For fullscreen and embedded, we recommend putting the focus on the first focusable item in the ChatBot, such as a menu toggle. This can be seen in our more fully-featured demos for the [default, embedded, and fullscreen ChatBot](/extensions/chatbot/overview/demo#basic-chatbot) and the [embedded ChatBot](/extensions/chatbot/overview/demo#embedded-chatbot).
151
153
 
152
154
  ```js file="./SkipToContent.tsx" isFullscreen
153
155
 
@@ -226,7 +228,7 @@ There are a variety of options and customizations you can make to the header, to
226
228
  In this example, select the respective checkbox to toggle these features:
227
229
 
228
230
  - **Menu:** Users can select the menu toggle to open a menu of additional options or actions.
229
- - **New chat button:** Used to start a new chat session. The header button can be used in addition to or in place of a new chat button within the [conversation history drawer](/patternfly-ai/chatbot/ui/#drawer-with-search-and-new-chat-button).
231
+ - **New chat button:** Used to start a new chat session. The header button can be used in addition to or in place of a new chat button within the [conversation history drawer](/extensions/chatbot/ui/#drawer-with-search-and-new-chat-button).
230
232
  - **Left-aligned logo**
231
233
  - **Centered logo**
232
234
  - **Selector dropdown:** Users can choose from preselected options in a dropdown menu. For example, they can toggle between AI models.
@@ -283,7 +285,7 @@ To disable the send button in the following example, select the "Disable send bu
283
285
 
284
286
  You can change the behavior of the attach button to open a menu, rather than the default file viewer for your operating system. This menu can display different actions related to attachments.
285
287
 
286
- Attachments can also be added to the ChatBot via [drag and drop.](/patternfly-ai/chatbot/messages#attachment-dropzone)
288
+ Attachments can also be added to the ChatBot via [drag and drop.](/extensions/chatbot/messages#attachment-dropzone)
287
289
 
288
290
  ```js file="./ChatbotMessageBarAttach.tsx"
289
291
 
@@ -314,6 +316,16 @@ To enable the stop button, set `hasStopButton` to `true` and pass in a `handleSt
314
316
 
315
317
  ```
316
318
 
319
+ ### Message bar with AI indicator styles
320
+
321
+ To add a more pronounced AI indicator style to the message bar, pass `hasAiIndicator` to the `<MessageBar>` component. You can also enable a "thinking" animation by passing in `isThinking`.
322
+
323
+ This example shows a simplified method of handling the "thinking" animation: after a user sends a message, the `isThinking` property is set to `true` to trigger the animation, then returns to `false` after 10 seconds to halt the animation.
324
+
325
+ ```ts file="./ChatbotMessageBarIndicatorThinking.tsx" isBeta
326
+
327
+ ```
328
+
317
329
  ## Navigation
318
330
 
319
331
  ### Side nav in a drawer
@@ -342,7 +354,7 @@ The code structure will look like this:
342
354
  </Chatbot>
343
355
  ```
344
356
 
345
- The conversation history drawer looks different depending on the `displayMode` of the parent `<Chatbot>`. (As shown in the [main ChatBot demo](/patternfly-ai/chatbot/overview/demo#basic-chatbot).):
357
+ The conversation history drawer looks different depending on the `displayMode` of the parent `<Chatbot>`. (As shown in the [main ChatBot demo](/extensions/chatbot/overview/demo#basic-chatbot).):
346
358
 
347
359
  - `Default` and `docked` display modes display the conversation history on top of the rest of the ChatBot content, with a PatternFly backdrop between the drawer panel and drawer content.
348
360
  - `Fullscreen` and `embedded` display modes display the conversation history in line with the drawer content.
@@ -359,6 +371,16 @@ Both the search input field and "New chat" buttons are optional. The `reverseBut
359
371
 
360
372
  ```
361
373
 
374
+ ### Drawer with search actions
375
+
376
+ You can customize the search experience within the conversation history drawer via the `searchActionStart` and `searchActionEnd` props, which provide additional search controls before and after the input field. These props are useful for adding filtering, sorting, or other search-related functionality.
377
+
378
+ You can also add a visual divider between the drawer head and the title by setting `hasDrawerHeadDivider` to `true`.
379
+
380
+ ```ts file="./ChatbotHeaderDrawerWithSearchActions.tsx"
381
+
382
+ ```
383
+
362
384
  ### Drawer with conversation actions
363
385
 
364
386
  Actions can be added to conversations with `menuItems`. Optionally, you can also add a `className` to the menu via `menuClassName`, change the default aria-label and tooltip content via `label`, or add an `onSelect` callback for when a user selects an item.
@@ -414,24 +436,6 @@ The drawer can also be used to display a list of basic menu items.
414
436
 
415
437
  ```
416
438
 
417
- ### Terms of use
418
-
419
- Based on the [PatternFly modal](/components/modal), this modal adapts to the ChatBot display mode and is meant to display terms and conditions for using a ChatBot in your project. The image in the header can be toggled on or off depending on whether the `image` and `altText` props are provided.
420
-
421
- This example also includes an example of how to use [skip to content](/patternfly-ai/chatbot/ui#skip-to-content). When the terms of use modal is open, focus is placed on the terms of use container. When it is closed, focus is placed on the ChatBot. In a real example with a functioning ChatBot toggle, you would also want to place focus on the toggle when appropriate.
422
-
423
- ```js file="./TermsOfUse.tsx" isFullscreen
424
-
425
- ```
426
-
427
- ### Compact terms of use
428
-
429
- To apply compact styling to the terms of use modal, pass `isCompact` to `<TermsOfUse>`. This will remove the header image and adjust the spacing of text, so that there is less white space in the modal.
430
-
431
- ```js file="./TermsOfUseCompact.tsx" isFullscreen
432
-
433
- ```
434
-
435
439
  ### Settings
436
440
 
437
441
  To contain user preference controls and other ChatBot setting options, you can create a separate settings page that can accept any number of buttons, dropdown menus, toggles, labels, and so on. This settings page will render all components appropriately within all 4 display modes.
@@ -459,3 +463,37 @@ Based on the [PatternFly modal](/components/modal), this modal adapts to the Cha
459
463
  ```js file="./ChatbotModal.tsx" isFullscreen
460
464
 
461
465
  ```
466
+
467
+ ### Onboarding
468
+
469
+ You can use the onboarding modal to introduce users to your ChatBot and provide necessary information. The title, image, and body text are customizable.
470
+
471
+ ```js file="./Onboarding.tsx" isFullscreen
472
+
473
+ ```
474
+
475
+ ### Compact onboarding
476
+
477
+ To make the onboarding modal compact, with less spacing, pass `isCompact` to the `<Onboarding>` component.
478
+
479
+ ```js file="./CompactOnboarding.tsx" isFullscreen
480
+
481
+ ```
482
+
483
+ ### Terms of use
484
+
485
+ Based on the [PatternFly modal](/components/modal), this modal adapts to the ChatBot display mode and is meant to display terms and conditions for using a ChatBot in your project. The image in the header can be toggled on or off depending on whether the `image` and `altText` props are provided.
486
+
487
+ This example also includes an example of how to use [skip to content](/extensions/chatbot/ui#skip-to-content). When the terms of use modal is open, focus is placed on the terms of use container. When it is closed, focus is placed on the ChatBot. In a real example with a functioning ChatBot toggle, you would also want to place focus on the toggle when appropriate.
488
+
489
+ ```js file="./TermsOfUse.tsx" isFullscreen
490
+
491
+ ```
492
+
493
+ ### Compact terms of use
494
+
495
+ To apply compact styling to the terms of use modal, pass `isCompact` to `<TermsOfUse>`. This will remove the header image and adjust the spacing of text, so that there is less white space in the modal.
496
+
497
+ ```js file="./TermsOfUseCompact.tsx" isFullscreen
498
+
499
+ ```
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  # Sidenav top-level section
3
3
  # should be the same for all markdown files
4
- section: PatternFly-AI
4
+ section: extensions
5
5
  subsection: ChatBot
6
6
  # Sidenav secondary level section
7
7
  # should be the same for all markdown files
@@ -68,7 +68,7 @@ It is also important to announce when new content appears onscreen for accessibi
68
68
 
69
69
  This demo shows auto-scrolling functionality, which automatically scrolls to the bottom of the active chat.
70
70
 
71
- To enable auto-scroll behavior pass the `enableSmartScroll` prop to the [`<MessageBox>`](/patternfly-ai/chatbot/ui#message-box) component.
71
+ To enable auto-scroll behavior pass the `enableSmartScroll` prop to the [`<MessageBox>`](/extensions/chatbot/ui#message-box) component.
72
72
 
73
73
  When enabled:
74
74
 
@@ -88,11 +88,11 @@ When using `ref`, the `<MessageBox>` component exposes the following methods:
88
88
 
89
89
  This demo includes broader ChatBot features, including:
90
90
 
91
- 1. A [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
92
- 2. A `<ChatbotContent>` and [`<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
91
+ 1. A [`<ChatbotToggle>`](/extensions/chatbot/ui#toggle) that controls the [`<Chatbot>`](/extensions/chatbot/ui#container) container.
92
+ 2. A `<ChatbotContent>` and [`<MessageBox>`](/extensions/chatbot/ui#content-and-message-box) with:
93
93
  - A `<ChatbotWelcomePrompt>`
94
94
  - An initial user message and initial bot message
95
- 3. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
95
+ 3. A [`<ChatbotFooter>`](/extensions/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/extensions/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
96
96
 
97
97
  ```js file="./ChatbotScrolling.tsx" isFullscreen
98
98
 
@@ -102,24 +102,24 @@ This demo includes broader ChatBot features, including:
102
102
 
103
103
  This demo displays unique attachment features, including:
104
104
 
105
- 1. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) components that contain:
106
- - An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) with an attachment.
107
- - The ability to preview or edit the attachment using the [`<PreviewAttachment>` and `<AttachmentEdit>` components.](/patternfly-ai/chatbot/messages##file-attachments)
105
+ 1. [`<ChatbotContent>` and `<MessageBox>`](/extensions/chatbot/ui#content-and-message-box) components that contain:
106
+ - An initial [user `<Message>`](/extensions/chatbot/messages#user-messages) with an attachment.
107
+ - The ability to preview or edit the attachment using the [`<PreviewAttachment>` and `<AttachmentEdit>` components.](/extensions/chatbot/messages##file-attachments)
108
108
  - A [PatternFly `<Alert>`](/components/alert), customized to be sticky within the ChatBot window, which provides success or error messages for attachments.
109
109
  2. `<ChatbotContent>` and `<ChatbotFooter>`, wrapped in a `<FileDropZone>` component to support drag and drop attachments. The footer also:
110
- - Displays attached files, using a [`<FileDetailsLabel>`](/patternfly-ai/chatbot/messages#attachment-label) component.
110
+ - Displays attached files, using a [`<FileDetailsLabel>`](/extensions/chatbot/messages#attachment-label) component.
111
111
  - Demonstrates custom handling of file uploads, using the `handleAttach` in `<MessageBar>` and `handleFileDrop` in `<FileDropZone>`.
112
112
 
113
113
  This demo includes broader ChatBot features, including:
114
114
 
115
- 1. A [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
116
- 2. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) that updates based on the display mode, with sub-components (including a `<ChatbotHeaderTitle>`).
115
+ 1. A [`<ChatbotToggle>`](/extensions/chatbot/ui#toggle) that controls the [`<Chatbot>`](/extensions/chatbot/ui#container) container.
116
+ 2. A [`<ChatbotHeader>`](/extensions/chatbot/ui#header) that updates based on the display mode, with sub-components (including a `<ChatbotHeaderTitle>`).
117
117
  3. The ability to swap display modes via the `<ChatbotHeaderOptionsDropdown>`
118
- 4. A `<ChatbotContent>` and [`<MessageBox>`](/patternfly-ai/chatbot/uir#content-and-message-box) with:
118
+ 4. A `<ChatbotContent>` and [`<MessageBox>`](/extensions/chatbot/uir#content-and-message-box) with:
119
119
  - A `<ChatbotWelcomePrompt>`
120
120
  - The ability to preview or edit the attachment.
121
121
  - An initial bot message
122
- 5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
122
+ 5. A [`<ChatbotFooter>`](/extensions/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/extensions/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
123
123
 
124
124
  ```js file="./ChatbotAttachment.tsx" isFullscreen
125
125
 
@@ -129,21 +129,21 @@ This demo includes broader ChatBot features, including:
129
129
 
130
130
  This demo displays unique attachment features, including:
131
131
 
132
- 1. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) components that contain:
132
+ 1. [`<ChatbotContent>` and `<MessageBox>`](/extensions/chatbot/ui#content-and-message-box) components that contain:
133
133
  - A PatternFly [`<Alert>`](/components/alert) to provide success or error messages for attachments.
134
134
  2. `<ChatbotContent>` and `<ChatbotFooter>`, wrapped in a `<FileDropZone>` component to support drag and drop attachments. The footer also:
135
135
 
136
- - Displays attached files, using a [`<FileDetailsLabel>`](/patternfly-ai/chatbot/ui#attachment-label) component.
136
+ - Displays attached files, using a [`<FileDetailsLabel>`](/extensions/chatbot/ui#attachment-label) component.
137
137
  - Demonstrates custom handling of file uploads, using the `handleAttach` in `<MessageBar>` and `handleFileDrop` in `<FileDropZone>`.
138
138
  - Demonstrates how to define the `attachMenuProps` in the `<MessageBar>` to create a menu that allows users to select the source of an item they're attaching.
139
139
 
140
140
  This demo includes broader ChatBot features, including:
141
141
 
142
- 1. A [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
143
- 2. A `<ChatbotContent>` and [`<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
142
+ 1. A [`<ChatbotToggle>`](/extensions/chatbot/ui#toggle) that controls the [`<Chatbot>`](/extensions/chatbot/ui#container) container.
143
+ 2. A `<ChatbotContent>` and [`<MessageBox>`](/extensions/chatbot/ui#content-and-message-box) with:
144
144
  - A `<ChatbotWelcomePrompt>`
145
145
  - An initial user message and initial bot message
146
- 3. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
146
+ 3. A [`<ChatbotFooter>`](/extensions/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/extensions/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
147
147
 
148
148
  ```js file="./ChatbotAttachmentMenu.tsx" isFullscreen
149
149
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  # Sidenav top-level section
3
3
  # should be the same for all markdown files
4
- section: PatternFly-AI
4
+ section: extensions
5
5
  subsection: ChatBot
6
6
  # Sidenav secondary level section
7
7
  # should be the same for all markdown files
@@ -52,6 +52,20 @@ import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
52
52
  import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
53
53
  import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
54
54
  import { BarsIcon } from '@patternfly/react-icons/dist/esm/icons/bars-icon';
55
+ import { CopyIcon } from '@patternfly/react-icons/dist/esm/icons/copy-icon';
56
+ import { WrenchIcon } from '@patternfly/react-icons/dist/esm/icons/wrench-icon';
57
+ import {
58
+ Button,
59
+ DescriptionList,
60
+ DescriptionListDescription,
61
+ DescriptionListGroup,
62
+ DescriptionListTerm,
63
+ ExpandableSection,
64
+ ExpandableSectionVariant,
65
+ Flex,
66
+ FlexItem,
67
+ Label
68
+ } from '@patternfly/react-core';
55
69
  import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
56
70
  import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
57
71
  import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
@@ -59,31 +73,31 @@ import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
59
73
  import userAvatar from '../Messages/user_avatar.svg';
60
74
  import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
61
75
  import { getTrackingProviders } from "@patternfly/chatbot/dist/dynamic/tracking";
62
- import { useEffect,useCallback, useRef, useState, FunctionComponent, MouseEvent } from 'react';
76
+ import { useEffect,useCallback, useRef, useState, FunctionComponent, MouseEvent, MouseEvent as ReactMouseEvent } from 'react';
63
77
  import saveAs from 'file-saver';
64
78
 
65
79
  ### Basic ChatBot
66
80
 
67
81
  This demo displays a basic ChatBot, which includes:
68
82
 
69
- 1. The [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>` container.](/patternfly-ai/chatbot/ui#container)
70
- 2. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>` that changes its presentation depending on the display mode.
83
+ 1. The [`<ChatbotToggle>`](/extensions/chatbot/ui#toggle) that controls the [`<Chatbot>` container.](/extensions/chatbot/ui#container)
84
+ 2. A [`<ChatbotHeader>`](/extensions/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>` that changes its presentation depending on the display mode.
71
85
  3. The ability to swap display modes via `<ChatbotHeaderOptionsDropdown>`
72
- 4. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
86
+ 4. [`<ChatbotContent>` and `<MessageBox>`](/extensions/chatbot/ui#content-and-message-box) with:
73
87
 
74
88
  - A `<ChatbotWelcomePrompt>`
75
- - An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) and an initial bot message with [message actions.](/patternfly-ai/chatbot/messages#message-actions)
89
+ - An initial [user `<Message>`](/extensions/chatbot/messages#user-messages) and an initial bot message with [message actions.](/extensions/chatbot/messages#message-actions)
76
90
  - Logic for enabling auto-scrolling to the most recent message whenever a new message is sent or received using a `scrollToBottomRef`
77
91
 
78
- 5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
92
+ 5. A [`<ChatbotFooter>`](/extensions/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/extensions/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
79
93
 
80
- - [Speech to text.](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
94
+ - [Speech to text.](/extensions/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
81
95
  - Sending a message to the ChatBot.
82
96
  - Receiving a response from a backend AI tool with a loading message state.
83
97
 
84
- 6. A [`<ChatbotConversationHistoryNav>`](/patternfly-ai/chatbot/ui#navigation) toggled open and closed by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
98
+ 6. A [`<ChatbotConversationHistoryNav>`](/extensions/chatbot/ui#navigation) toggled open and closed by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
85
99
 
86
- 7. A "Skip to chatbot" button that allows you to skip to the chatbot content via the [PatternFly skip to content component](/patternfly-ai/chatbot/ui#skip-to-content). To display this button you must tab into the main window.
100
+ 7. A "Skip to chatbot" button that allows you to skip to the chatbot content via the [PatternFly skip to content component](/extensions/chatbot/ui#skip-to-content). To display this button you must tab into the main window.
87
101
 
88
102
  ```js file="./Chatbot.tsx" isFullscreen
89
103
 
@@ -102,17 +116,17 @@ This demo displays a basic compact ChatBot
102
116
  This demo displays an embedded ChatBot. Embedded ChatBots are meant to be placed within a page in your product. This demo includes:
103
117
 
104
118
  1. A [PatternFly page](/components/page) with a sidebar, "Skip to chatbot" button, and masthead. To display the "Skip to chatbot" button you must tab into the main window.
105
- 2. A [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
106
- 3. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>`
107
- 4. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
119
+ 2. A [`<Chatbot>`](/extensions/chatbot/ui#container) container.
120
+ 3. A [`<ChatbotHeader>`](/extensions/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>`
121
+ 4. [`<ChatbotContent>` and `<MessageBox>`](/extensions/chatbot/ui#content-and-message-box) with:
108
122
  - A `<ChatbotWelcomePrompt>`
109
- - An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) and an initial bot message with [message actions.](/patternfly-ai/chatbot/messages/#message-actions)
123
+ - An initial [user `<Message>`](/extensions/chatbot/messages#user-messages) and an initial bot message with [message actions.](/extensions/chatbot/messages/#message-actions)
110
124
  - Logic for enabling auto-scrolling to the most recent message whenever a new message is sent or received using a `scrollToBottomRef`
111
- 5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
112
- - [Speech to text.](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
125
+ 5. A [`<ChatbotFooter>`](/extensions/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/extensions/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
126
+ - [Speech to text.](/extensions/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
113
127
  - Sending a message to the ChatBot.
114
128
  - Receiving a response from a backend AI tool with a loading message state.
115
- 6. A [`<ChatbotConversationHistoryNav>`](/patternfly-ai/chatbot/ui#navigation) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
129
+ 6. A [`<ChatbotConversationHistoryNav>`](/extensions/chatbot/ui#navigation) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
116
130
 
117
131
  ```js file="./EmbeddedChatbot.tsx" isFullscreen
118
132
 
@@ -133,7 +147,7 @@ This demo displays a ChatBot in a static, inline drawer. This demo includes:
133
147
 
134
148
  ### Primary color background
135
149
 
136
- This demo displays an embedded ChatBot with a [primary background color](/design-foundations/colors#background-colors). This example includes the same features as the [Embedded ChatBot demo](/patternfly-ai/chatbot/overview/demo/#embedded-chatbot)&mdash;the only differences are that the background color is adjusted via the `isPrimary` prop and some of the sample Messages have changed. You can use the same logic to adjust the background color in any ChatBot layout.
150
+ This demo displays an embedded ChatBot with a [primary background color](/design-foundations/colors#background-colors). This example includes the same features as the [Embedded ChatBot demo](/extensions/chatbot/overview/demo/#embedded-chatbot)&mdash;the only differences are that the background color is adjusted via the `isPrimary` prop and some of the sample Messages have changed. You can use the same logic to adjust the background color in any ChatBot layout.
137
151
 
138
152
  ```js file="./WhiteEmbeddedChatbot.tsx" isFullscreen
139
153
 
@@ -143,7 +157,7 @@ This demo displays an embedded ChatBot with a [primary background color](/design
143
157
 
144
158
  This demo showcases how the ChatBot can be rendered in different display modes to suit various application layouts. It demonstrates how to dynamically change the page structure in response to the user's selection. This demo includes:
145
159
 
146
- 1. The ability to switch between overlay, drawer, and fullscreen modes using the [`<ChatbotHeaderOptionsDropdown>`](/patternfly-ai/chatbot/ui#header-options) in the header.
160
+ 1. The ability to switch between overlay, drawer, and fullscreen modes using the [`<ChatbotHeaderOptionsDropdown>`](/extensions/chatbot/ui#header-options) in the header.
147
161
  2. A conditional page layout that renders the ChatBot for each display mode option:
148
162
  - **Overlay:** As a floating window on top of the page content.
149
163
  - **Drawer:** Inside an inline PatternFly `<Drawer>` as a side panel.
@@ -1,6 +1,6 @@
1
1
  // This module is shared between NodeJS and babelled ES5
2
2
  module.exports = {
3
- sideNavItems: [{ section: 'PatternFly-AI' }],
3
+ sideNavItems: [{ section: 'extensions' }],
4
4
  topNavItems: [],
5
5
  hasThemeSwitcher: true,
6
6
  hasRTLSwitcher: true,
@@ -8,7 +8,7 @@ module.exports = (sourceMD, sourceProps) => {
8
8
 
9
9
  // Parse md files
10
10
  const contentBase = path.join(__dirname, './content');
11
- sourceMD(path.join(contentBase, 'extensions/**/*.md'), 'PatternFly-AI');
11
+ sourceMD(path.join(contentBase, 'extensions/**/*.md'), 'Extensions');
12
12
 
13
13
  /**
14
14
  If you want to parse content from node_modules instead of providing a relative/absolute path,
@@ -7,6 +7,11 @@
7
7
  border-radius: var(--pf-t--global--border--radius--medium);
8
8
  }
9
9
 
10
+ .pf-chatbot__heading-divider {
11
+ padding-inline-start: var(--pf-t--global--spacer--lg);
12
+ padding-inline-end: var(--pf-t--global--spacer--lg);
13
+ }
14
+
10
15
  // Drawer title
11
16
  // ----------------------------------------------------------------------------
12
17
  .pf-chatbot__heading-container {
@@ -28,11 +33,26 @@
28
33
  justify-content: flex-start;
29
34
  gap: var(--pf-t--global--spacer--gap--text-to-element--default);
30
35
  }
36
+
37
+ // Drawer search and actions
38
+ .pf-chatbot__history-search-actions {
39
+ .pf-v6-c-button.pf-m-control {
40
+ --pf-v6-c-button--m-control--PaddingInlineStart: var(--pf-t--global--spacer--control--horizontal--compact);
41
+ --pf-v6-c-button--m-control--PaddingInlineEnd: var(--pf-t--global--spacer--control--horizontal--compact);
42
+ }
43
+ }
44
+
45
+ .pf-chatbot__input {
46
+ width: 100%;
47
+ }
48
+
31
49
  // Drawer menu
32
50
  // ----------------------------------------------------------------------------
33
51
  .pf-v6-c-menu {
34
52
  --pf-v6-c-menu--PaddingBlockStart: 0;
35
53
  --pf-v6-c-menu--BackgroundColor: var(--pf-t--global--background--color--floating--default);
54
+ // override high contrast style
55
+ --pf-v6-c-menu--BorderWidth: 0;
36
56
  overflow: initial;
37
57
  position: relative;
38
58
  }
@@ -56,6 +76,8 @@
56
76
  .pf-chatbot__menu-item {
57
77
  --pf-v6-c-menu__item--PaddingInlineStart: var(--pf-t--global--spacer--sm);
58
78
  --pf-v6-c-menu__item--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
79
+ // override high contrast style
80
+ --pf-v6-c-menu__list-item--BorderWidth: 0;
59
81
  padding-block-start: var(--pf-t--global--spacer--xs);
60
82
  padding-block-end: var(--pf-t--global--spacer--xs);
61
83
  color: var(--pf-t--global--text--color--regular);
@@ -63,6 +85,17 @@
63
85
  font-weight: var(--pf-t--global--font--weight--body--default);
64
86
  border-radius: var(--pf-t--global--border--radius--small);
65
87
  }
88
+
89
+ li.pf-chatbot__menu-item:hover::after {
90
+ position: absolute;
91
+ inset: 0;
92
+ pointer-events: none;
93
+ content: '';
94
+ border: var(--pf-t--global--border--width--action--plain--hover) solid
95
+ var(--pf-t--global--border--color--high-contrast);
96
+ border-radius: inherit;
97
+ }
98
+
66
99
  // allows focus state to have border radius
67
100
  .pf-v6-c-menu__list-item.pf-chatbot__menu-item {
68
101
  overflow: hidden;
@@ -76,6 +109,16 @@
76
109
  background-color: var(--pf-t--global--background--color--action--plain--clicked);
77
110
  }
78
111
 
112
+ li.pf-chatbot__menu-item--active::after {
113
+ position: absolute;
114
+ inset: 0;
115
+ pointer-events: none;
116
+ content: '';
117
+ border: var(--pf-t--global--border--width--action--plain--clicked) solid
118
+ var(--pf-t--global--border--color--high-contrast);
119
+ border-radius: inherit;
120
+ }
121
+
79
122
  button.pf-chatbot__menu-item--active {
80
123
  background-color: initial;
81
124
  }
@@ -592,6 +592,101 @@ describe('ChatbotConversationHistoryNav', () => {
592
592
  expect(screen.getByRole('dialog', { name: /Chat history I am a sample search/i })).toBeInTheDocument();
593
593
  });
594
594
 
595
+ it('Does not render search actions by default', () => {
596
+ const handleSearch = jest.fn();
597
+ const groupedConversations: { [key: string]: Conversation[] } = {
598
+ Today: [...initialConversations, { id: '2', text: 'Chatbot extension' }]
599
+ };
600
+
601
+ render(
602
+ <ChatbotConversationHistoryNav
603
+ onDrawerToggle={onDrawerToggle}
604
+ isDrawerOpen={true}
605
+ displayMode={ChatbotDisplayMode.fullscreen}
606
+ setIsDrawerOpen={jest.fn()}
607
+ reverseButtonOrder={false}
608
+ conversations={groupedConversations}
609
+ handleTextInputChange={handleSearch}
610
+ />
611
+ );
612
+
613
+ const searchInput = screen.getByPlaceholderText(/Search/i);
614
+
615
+ expect(searchInput.parentElement?.previousElementSibling).toBeNull();
616
+ expect(searchInput.parentElement?.nextElementSibling).toBeNull();
617
+ });
618
+
619
+ it('Renders with action at start when searchActionStart is passed', () => {
620
+ const handleSearch = jest.fn();
621
+ const groupedConversations: { [key: string]: Conversation[] } = {
622
+ Today: [...initialConversations, { id: '2', text: 'Chatbot extension' }]
623
+ };
624
+
625
+ render(
626
+ <ChatbotConversationHistoryNav
627
+ onDrawerToggle={onDrawerToggle}
628
+ isDrawerOpen={true}
629
+ displayMode={ChatbotDisplayMode.fullscreen}
630
+ setIsDrawerOpen={jest.fn()}
631
+ reverseButtonOrder={false}
632
+ conversations={groupedConversations}
633
+ handleTextInputChange={handleSearch}
634
+ searchActionStart={<div>Search action start test</div>}
635
+ />
636
+ );
637
+
638
+ expect(screen.getByText('Search action start test')).toBeVisible();
639
+ });
640
+
641
+ it('Renders with action at end when searchActionEnd is passed', () => {
642
+ const handleSearch = jest.fn();
643
+ const groupedConversations: { [key: string]: Conversation[] } = {
644
+ Today: [...initialConversations, { id: '2', text: 'Chatbot extension' }]
645
+ };
646
+
647
+ render(
648
+ <ChatbotConversationHistoryNav
649
+ onDrawerToggle={onDrawerToggle}
650
+ isDrawerOpen={true}
651
+ displayMode={ChatbotDisplayMode.fullscreen}
652
+ setIsDrawerOpen={jest.fn()}
653
+ reverseButtonOrder={false}
654
+ handleTextInputChange={handleSearch}
655
+ conversations={groupedConversations}
656
+ searchActionEnd={<div>Search action end test</div>}
657
+ />
658
+ );
659
+
660
+ expect(screen.getByText('Search action end test')).toBeVisible();
661
+ });
662
+
663
+ it('Overrides default search input and actions when searchToolbar is passed', () => {
664
+ const handleSearch = jest.fn();
665
+ const groupedConversations: { [key: string]: Conversation[] } = {
666
+ Today: [...initialConversations, { id: '2', text: 'Chatbot extension' }]
667
+ };
668
+
669
+ render(
670
+ <ChatbotConversationHistoryNav
671
+ onDrawerToggle={onDrawerToggle}
672
+ isDrawerOpen={true}
673
+ displayMode={ChatbotDisplayMode.fullscreen}
674
+ setIsDrawerOpen={jest.fn()}
675
+ reverseButtonOrder={false}
676
+ conversations={groupedConversations}
677
+ handleTextInputChange={handleSearch}
678
+ searchActionStart={<div>Search action start test</div>}
679
+ searchActionEnd={<div>Search action end test</div>}
680
+ searchToolbar={<div>Custom toolbar</div>}
681
+ />
682
+ );
683
+
684
+ expect(screen.queryByPlaceholderText(/Search/i)).not.toBeInTheDocument();
685
+ expect(screen.queryByText('Search action start test')).not.toBeInTheDocument();
686
+ expect(screen.queryByText('Search action end test')).not.toBeInTheDocument();
687
+ expect(screen.getByText('Custom toolbar')).toBeInTheDocument();
688
+ });
689
+
595
690
  it('overrides nav title heading level when navTitleProps.headingLevel is passed', () => {
596
691
  render(
597
692
  <ChatbotConversationHistoryNav