@assistant-ui/react 0.7.91 → 0.8.1

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 (304) hide show
  1. package/dist/cloud/auiV0.js.map +1 -1
  2. package/dist/cloud/auiV0.mjs.map +1 -1
  3. package/dist/index.d.ts +0 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +0 -1
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/internal.d.ts +0 -1
  10. package/dist/internal.d.ts.map +1 -1
  11. package/dist/internal.js +0 -3
  12. package/dist/internal.js.map +1 -1
  13. package/dist/internal.mjs +0 -2
  14. package/dist/internal.mjs.map +1 -1
  15. package/dist/model-context/ModelContextTypes.d.ts +11 -0
  16. package/dist/model-context/ModelContextTypes.d.ts.map +1 -1
  17. package/dist/model-context/ModelContextTypes.js.map +1 -1
  18. package/dist/model-context/ModelContextTypes.mjs.map +1 -1
  19. package/dist/model-context/makeAssistantVisible.d.ts.map +1 -1
  20. package/dist/model-context/makeAssistantVisible.js +4 -2
  21. package/dist/model-context/makeAssistantVisible.js.map +1 -1
  22. package/dist/model-context/makeAssistantVisible.mjs +4 -2
  23. package/dist/model-context/makeAssistantVisible.mjs.map +1 -1
  24. package/dist/primitives/contentPart/index.d.ts +0 -1
  25. package/dist/primitives/contentPart/index.d.ts.map +1 -1
  26. package/dist/primitives/contentPart/index.js +0 -3
  27. package/dist/primitives/contentPart/index.js.map +1 -1
  28. package/dist/primitives/contentPart/index.mjs +0 -2
  29. package/dist/primitives/contentPart/index.mjs.map +1 -1
  30. package/dist/primitives/index.d.ts +0 -1
  31. package/dist/primitives/index.d.ts.map +1 -1
  32. package/dist/primitives/index.js +0 -3
  33. package/dist/primitives/index.js.map +1 -1
  34. package/dist/primitives/index.mjs +0 -2
  35. package/dist/primitives/index.mjs.map +1 -1
  36. package/dist/primitives/message/MessageContent.d.ts +1 -2
  37. package/dist/primitives/message/MessageContent.d.ts.map +1 -1
  38. package/dist/primitives/message/MessageContent.js +2 -7
  39. package/dist/primitives/message/MessageContent.js.map +1 -1
  40. package/dist/primitives/message/MessageContent.mjs +2 -7
  41. package/dist/primitives/message/MessageContent.mjs.map +1 -1
  42. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.d.ts.map +1 -1
  43. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js +1 -3
  44. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
  45. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs +1 -3
  46. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs.map +1 -1
  47. package/dist/runtimes/edge/converters/toCoreMessages.d.ts.map +1 -1
  48. package/dist/runtimes/edge/converters/toCoreMessages.js +1 -6
  49. package/dist/runtimes/edge/converters/toCoreMessages.js.map +1 -1
  50. package/dist/runtimes/edge/converters/toCoreMessages.mjs +1 -6
  51. package/dist/runtimes/edge/converters/toCoreMessages.mjs.map +1 -1
  52. package/dist/runtimes/edge/converters/toLanguageModelMessages.js.map +1 -1
  53. package/dist/runtimes/edge/converters/toLanguageModelMessages.mjs.map +1 -1
  54. package/dist/runtimes/external-store/ThreadMessageLike.d.ts +2 -2
  55. package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +1 -1
  56. package/dist/runtimes/external-store/ThreadMessageLike.js +0 -3
  57. package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
  58. package/dist/runtimes/external-store/ThreadMessageLike.mjs +0 -3
  59. package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +1 -1
  60. package/dist/runtimes/remote-thread-list/adapter/cloud.d.ts.map +1 -1
  61. package/dist/runtimes/remote-thread-list/adapter/cloud.js +1 -7
  62. package/dist/runtimes/remote-thread-list/adapter/cloud.js.map +1 -1
  63. package/dist/runtimes/remote-thread-list/adapter/cloud.mjs +1 -7
  64. package/dist/runtimes/remote-thread-list/adapter/cloud.mjs.map +1 -1
  65. package/dist/types/AssistantTypes.d.ts +3 -7
  66. package/dist/types/AssistantTypes.d.ts.map +1 -1
  67. package/dist/types/AssistantTypes.js.map +1 -1
  68. package/dist/types/ContentPartComponentTypes.d.ts +1 -3
  69. package/dist/types/ContentPartComponentTypes.d.ts.map +1 -1
  70. package/dist/types/ContentPartComponentTypes.js.map +1 -1
  71. package/dist/types/index.d.ts +1 -1
  72. package/dist/types/index.d.ts.map +1 -1
  73. package/dist/types/index.js.map +1 -1
  74. package/package.json +1 -21
  75. package/src/cloud/auiV0.ts +1 -1
  76. package/src/index.ts +0 -1
  77. package/src/internal.ts +0 -1
  78. package/src/model-context/ModelContextTypes.ts +19 -0
  79. package/src/model-context/makeAssistantVisible.tsx +4 -2
  80. package/src/primitives/contentPart/index.ts +0 -1
  81. package/src/primitives/index.ts +0 -1
  82. package/src/primitives/message/MessageContent.tsx +0 -9
  83. package/src/runtimes/composer/DefaultEditComposerRuntimeCore.tsx +1 -3
  84. package/src/runtimes/edge/converters/toCoreMessages.ts +11 -14
  85. package/src/runtimes/edge/converters/toLanguageModelMessages.ts +2 -2
  86. package/src/runtimes/external-store/ThreadMessageLike.tsx +0 -6
  87. package/src/runtimes/remote-thread-list/adapter/cloud.tsx +4 -13
  88. package/src/types/AssistantTypes.ts +4 -9
  89. package/src/types/ContentPartComponentTypes.tsx +0 -4
  90. package/src/types/index.ts +0 -2
  91. package/dist/primitives/contentPart/ContentPartDisplay.d.ts +0 -9
  92. package/dist/primitives/contentPart/ContentPartDisplay.d.ts.map +0 -1
  93. package/dist/primitives/contentPart/ContentPartDisplay.js +0 -37
  94. package/dist/primitives/contentPart/ContentPartDisplay.js.map +0 -1
  95. package/dist/primitives/contentPart/ContentPartDisplay.mjs +0 -13
  96. package/dist/primitives/contentPart/ContentPartDisplay.mjs.map +0 -1
  97. package/dist/primitives/contentPart/useContentPartDisplay.d.ts +0 -8
  98. package/dist/primitives/contentPart/useContentPartDisplay.d.ts.map +0 -1
  99. package/dist/primitives/contentPart/useContentPartDisplay.js +0 -42
  100. package/dist/primitives/contentPart/useContentPartDisplay.js.map +0 -1
  101. package/dist/primitives/contentPart/useContentPartDisplay.mjs +0 -18
  102. package/dist/primitives/contentPart/useContentPartDisplay.mjs.map +0 -1
  103. package/dist/styles/index.css +0 -1261
  104. package/dist/styles/index.css.map +0 -1
  105. package/dist/styles/modal.css +0 -143
  106. package/dist/styles/modal.css.map +0 -1
  107. package/dist/styles/tailwindcss/base-components.css +0 -69
  108. package/dist/styles/tailwindcss/base-components.css.json +0 -48
  109. package/dist/styles/tailwindcss/modal.css +0 -29
  110. package/dist/styles/tailwindcss/modal.css.json +0 -26
  111. package/dist/styles/tailwindcss/thread.css +0 -262
  112. package/dist/styles/tailwindcss/thread.css.json +0 -183
  113. package/dist/styles/themes/default.css +0 -64
  114. package/dist/styles/themes/default.css.json +0 -46
  115. package/dist/styles/themes/shadcn-extras.css +0 -4
  116. package/dist/styles/themes/shadcn-extras.css.json +0 -5
  117. package/dist/tailwindcss/index.d.ts +0 -49
  118. package/dist/tailwindcss/index.d.ts.map +0 -1
  119. package/dist/tailwindcss/index.js +0 -189
  120. package/dist/tailwindcss/index.js.map +0 -1
  121. package/dist/tailwindcss/index.mjs +0 -181
  122. package/dist/tailwindcss/index.mjs.map +0 -1
  123. package/dist/ui/assistant-action-bar.d.ts +0 -24
  124. package/dist/ui/assistant-action-bar.d.ts.map +0 -1
  125. package/dist/ui/assistant-action-bar.js +0 -193
  126. package/dist/ui/assistant-action-bar.js.map +0 -1
  127. package/dist/ui/assistant-action-bar.mjs +0 -181
  128. package/dist/ui/assistant-action-bar.mjs.map +0 -1
  129. package/dist/ui/assistant-message.d.ts +0 -13
  130. package/dist/ui/assistant-message.d.ts.map +0 -1
  131. package/dist/ui/assistant-message.js +0 -107
  132. package/dist/ui/assistant-message.js.map +0 -1
  133. package/dist/ui/assistant-message.mjs +0 -77
  134. package/dist/ui/assistant-message.mjs.map +0 -1
  135. package/dist/ui/assistant-modal.d.ts +0 -23
  136. package/dist/ui/assistant-modal.d.ts.map +0 -1
  137. package/dist/ui/assistant-modal.js +0 -126
  138. package/dist/ui/assistant-modal.js.map +0 -1
  139. package/dist/ui/assistant-modal.mjs +0 -99
  140. package/dist/ui/assistant-modal.mjs.map +0 -1
  141. package/dist/ui/attachment-ui.d.ts +0 -12
  142. package/dist/ui/attachment-ui.d.ts.map +0 -1
  143. package/dist/ui/attachment-ui.js +0 -170
  144. package/dist/ui/attachment-ui.js.map +0 -1
  145. package/dist/ui/attachment-ui.mjs +0 -160
  146. package/dist/ui/attachment-ui.mjs.map +0 -1
  147. package/dist/ui/base/CircleStopIcon.d.ts +0 -3
  148. package/dist/ui/base/CircleStopIcon.d.ts.map +0 -1
  149. package/dist/ui/base/CircleStopIcon.js +0 -45
  150. package/dist/ui/base/CircleStopIcon.js.map +0 -1
  151. package/dist/ui/base/CircleStopIcon.mjs +0 -20
  152. package/dist/ui/base/CircleStopIcon.mjs.map +0 -1
  153. package/dist/ui/base/avatar.d.ts +0 -12
  154. package/dist/ui/base/avatar.d.ts.map +0 -1
  155. package/dist/ui/base/avatar.js +0 -69
  156. package/dist/ui/base/avatar.js.map +0 -1
  157. package/dist/ui/base/avatar.mjs +0 -31
  158. package/dist/ui/base/avatar.mjs.map +0 -1
  159. package/dist/ui/base/button.d.ts +0 -16
  160. package/dist/ui/base/button.d.ts.map +0 -1
  161. package/dist/ui/base/button.js +0 -66
  162. package/dist/ui/base/button.js.map +0 -1
  163. package/dist/ui/base/button.mjs +0 -40
  164. package/dist/ui/base/button.mjs.map +0 -1
  165. package/dist/ui/base/dialog.d.ts +0 -9
  166. package/dist/ui/base/dialog.d.ts.map +0 -1
  167. package/dist/ui/base/dialog.js +0 -80
  168. package/dist/ui/base/dialog.js.map +0 -1
  169. package/dist/ui/base/dialog.mjs +0 -40
  170. package/dist/ui/base/dialog.mjs.map +0 -1
  171. package/dist/ui/base/index.d.ts +0 -6
  172. package/dist/ui/base/index.d.ts.map +0 -1
  173. package/dist/ui/base/index.js +0 -55
  174. package/dist/ui/base/index.js.map +0 -1
  175. package/dist/ui/base/index.mjs +0 -25
  176. package/dist/ui/base/index.mjs.map +0 -1
  177. package/dist/ui/base/tooltip-icon-button.d.ts +0 -17
  178. package/dist/ui/base/tooltip-icon-button.d.ts.map +0 -1
  179. package/dist/ui/base/tooltip-icon-button.js +0 -44
  180. package/dist/ui/base/tooltip-icon-button.js.map +0 -1
  181. package/dist/ui/base/tooltip-icon-button.mjs +0 -19
  182. package/dist/ui/base/tooltip-icon-button.mjs.map +0 -1
  183. package/dist/ui/base/tooltip.d.ts +0 -6
  184. package/dist/ui/base/tooltip.d.ts.map +0 -1
  185. package/dist/ui/base/tooltip.js +0 -57
  186. package/dist/ui/base/tooltip.js.map +0 -1
  187. package/dist/ui/base/tooltip.mjs +0 -20
  188. package/dist/ui/base/tooltip.mjs.map +0 -1
  189. package/dist/ui/branch-picker.d.ts +0 -15
  190. package/dist/ui/branch-picker.d.ts.map +0 -1
  191. package/dist/ui/branch-picker.js +0 -89
  192. package/dist/ui/branch-picker.js.map +0 -1
  193. package/dist/ui/branch-picker.mjs +0 -69
  194. package/dist/ui/branch-picker.mjs.map +0 -1
  195. package/dist/ui/composer.d.ts +0 -25
  196. package/dist/ui/composer.d.ts.map +0 -1
  197. package/dist/ui/composer.js +0 -168
  198. package/dist/ui/composer.js.map +0 -1
  199. package/dist/ui/composer.mjs +0 -138
  200. package/dist/ui/composer.mjs.map +0 -1
  201. package/dist/ui/content-part.d.ts +0 -7
  202. package/dist/ui/content-part.d.ts.map +0 -1
  203. package/dist/ui/content-part.js +0 -61
  204. package/dist/ui/content-part.js.map +0 -1
  205. package/dist/ui/content-part.mjs +0 -27
  206. package/dist/ui/content-part.mjs.map +0 -1
  207. package/dist/ui/edit-composer.d.ts +0 -22
  208. package/dist/ui/edit-composer.d.ts.map +0 -1
  209. package/dist/ui/edit-composer.js +0 -77
  210. package/dist/ui/edit-composer.js.map +0 -1
  211. package/dist/ui/edit-composer.mjs +0 -57
  212. package/dist/ui/edit-composer.mjs.map +0 -1
  213. package/dist/ui/index.d.ts +0 -75
  214. package/dist/ui/index.d.ts.map +0 -1
  215. package/dist/ui/index.js +0 -86
  216. package/dist/ui/index.js.map +0 -1
  217. package/dist/ui/index.mjs +0 -38
  218. package/dist/ui/index.mjs.map +0 -1
  219. package/dist/ui/thread-config.d.ts +0 -162
  220. package/dist/ui/thread-config.d.ts.map +0 -1
  221. package/dist/ui/thread-config.js +0 -63
  222. package/dist/ui/thread-config.js.map +0 -1
  223. package/dist/ui/thread-config.mjs +0 -41
  224. package/dist/ui/thread-config.mjs.map +0 -1
  225. package/dist/ui/thread-list-item.d.ts +0 -13
  226. package/dist/ui/thread-list-item.d.ts.map +0 -1
  227. package/dist/ui/thread-list-item.js +0 -94
  228. package/dist/ui/thread-list-item.js.map +0 -1
  229. package/dist/ui/thread-list-item.mjs +0 -64
  230. package/dist/ui/thread-list-item.mjs.map +0 -1
  231. package/dist/ui/thread-list.d.ts +0 -27
  232. package/dist/ui/thread-list.d.ts.map +0 -1
  233. package/dist/ui/thread-list.js +0 -91
  234. package/dist/ui/thread-list.js.map +0 -1
  235. package/dist/ui/thread-list.mjs +0 -61
  236. package/dist/ui/thread-list.mjs.map +0 -1
  237. package/dist/ui/thread-welcome.d.ts +0 -21
  238. package/dist/ui/thread-welcome.d.ts.map +0 -1
  239. package/dist/ui/thread-welcome.js +0 -101
  240. package/dist/ui/thread-welcome.js.map +0 -1
  241. package/dist/ui/thread-welcome.mjs +0 -81
  242. package/dist/ui/thread-welcome.mjs.map +0 -1
  243. package/dist/ui/thread.d.ts +0 -30
  244. package/dist/ui/thread.d.ts.map +0 -1
  245. package/dist/ui/thread.js +0 -152
  246. package/dist/ui/thread.js.map +0 -1
  247. package/dist/ui/thread.mjs +0 -125
  248. package/dist/ui/thread.mjs.map +0 -1
  249. package/dist/ui/user-action-bar.d.ts +0 -16
  250. package/dist/ui/user-action-bar.d.ts.map +0 -1
  251. package/dist/ui/user-action-bar.js +0 -63
  252. package/dist/ui/user-action-bar.js.map +0 -1
  253. package/dist/ui/user-action-bar.mjs +0 -43
  254. package/dist/ui/user-action-bar.mjs.map +0 -1
  255. package/dist/ui/user-message.d.ts +0 -13
  256. package/dist/ui/user-message.d.ts.map +0 -1
  257. package/dist/ui/user-message.js +0 -96
  258. package/dist/ui/user-message.js.map +0 -1
  259. package/dist/ui/user-message.mjs +0 -65
  260. package/dist/ui/user-message.mjs.map +0 -1
  261. package/dist/ui/utils/withDefaults.d.ts +0 -7
  262. package/dist/ui/utils/withDefaults.d.ts.map +0 -1
  263. package/dist/ui/utils/withDefaults.js +0 -66
  264. package/dist/ui/utils/withDefaults.js.map +0 -1
  265. package/dist/ui/utils/withDefaults.mjs +0 -30
  266. package/dist/ui/utils/withDefaults.mjs.map +0 -1
  267. package/src/primitives/contentPart/ContentPartDisplay.tsx +0 -20
  268. package/src/primitives/contentPart/useContentPartDisplay.tsx +0 -21
  269. package/src/styles/base.css +0 -37
  270. package/src/styles/index.css +0 -4
  271. package/src/styles/modal.css +0 -1
  272. package/src/styles/tailwindcss/base-components.css +0 -69
  273. package/src/styles/tailwindcss/modal.css +0 -29
  274. package/src/styles/tailwindcss/thread.css +0 -262
  275. package/src/styles/themes/default.css +0 -64
  276. package/src/styles/themes/shadcn-extras.css +0 -4
  277. package/src/tailwindcss/index.ts +0 -149
  278. package/src/ui/assistant-action-bar.tsx +0 -301
  279. package/src/ui/assistant-message.tsx +0 -96
  280. package/src/ui/assistant-modal.tsx +0 -146
  281. package/src/ui/attachment-ui.tsx +0 -211
  282. package/src/ui/base/CircleStopIcon.tsx +0 -17
  283. package/src/ui/base/avatar.tsx +0 -41
  284. package/src/ui/base/button.tsx +0 -42
  285. package/src/ui/base/dialog.tsx +0 -113
  286. package/src/ui/base/index.ts +0 -15
  287. package/src/ui/base/tooltip-icon-button.tsx +0 -29
  288. package/src/ui/base/tooltip.tsx +0 -22
  289. package/src/ui/branch-picker.tsx +0 -117
  290. package/src/ui/composer.tsx +0 -210
  291. package/src/ui/content-part.tsx +0 -23
  292. package/src/ui/edit-composer.tsx +0 -98
  293. package/src/ui/index.ts +0 -98
  294. package/src/ui/thread-config.tsx +0 -246
  295. package/src/ui/thread-list-item.tsx +0 -91
  296. package/src/ui/thread-list.tsx +0 -78
  297. package/src/ui/thread-welcome.tsx +0 -140
  298. package/src/ui/thread.tsx +0 -176
  299. package/src/ui/user-action-bar.tsx +0 -66
  300. package/src/ui/user-message.tsx +0 -92
  301. package/src/ui/utils/withDefaults.tsx +0 -35
  302. package/tailwindcss/README.md +0 -1
  303. package/tailwindcss/package-lock.json +0 -6
  304. package/tailwindcss/package.json +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/index.ts"],"sourcesContent":["/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport { ThreadConfigProvider } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport { useThreadConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { ThreadConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { ThreadWelcomeConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { UserMessageConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { AssistantMessageConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { StringsConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { SuggestionConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { ThreadConfigProviderProps } from \"./thread-config\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as AssistantActionBar } from \"./assistant-action-bar\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as AssistantMessage } from \"./assistant-message\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as AssistantModal } from \"./assistant-modal\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as BranchPicker } from \"./branch-picker\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as Composer } from \"./composer\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ContentPart } from \"./content-part\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport {\n default as AttachmentUI, // TODO name collision with Attachment\n} from \"./attachment-ui\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as EditComposer } from \"./edit-composer\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as Thread } from \"./thread\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ThreadList } from \"./thread-list\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ThreadListItem } from \"./thread-list-item\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ThreadWelcome } from \"./thread-welcome\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as UserMessage } from \"./user-message\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as UserActionBar } from \"./user-action-bar\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAAqC;AAGrC,IAAAA,wBAAgC;AA0BhC,kCAA8C;AAK9C,+BAA4C;AAK5C,6BAA0C;AAK1C,2BAAwC;AAKxC,sBAAoC;AAKpC,0BAAuC;AAKvC,2BAEO;AAKP,2BAAwC;AAKxC,oBAAkC;AAKlC,yBAAsC;AAKtC,8BAA0C;AAK1C,4BAAyC;AAKzC,0BAAuC;AAKvC,6BAAyC;","names":["import_thread_config"]}
package/dist/ui/index.mjs DELETED
@@ -1,38 +0,0 @@
1
- // src/ui/index.ts
2
- import { ThreadConfigProvider } from "./thread-config.mjs";
3
- import { useThreadConfig } from "./thread-config.mjs";
4
- import { default as default2 } from "./assistant-action-bar.mjs";
5
- import { default as default3 } from "./assistant-message.mjs";
6
- import { default as default4 } from "./assistant-modal.mjs";
7
- import { default as default5 } from "./branch-picker.mjs";
8
- import { default as default6 } from "./composer.mjs";
9
- import { default as default7 } from "./content-part.mjs";
10
- import {
11
- default as default8
12
- } from "./attachment-ui.mjs";
13
- import { default as default9 } from "./edit-composer.mjs";
14
- import { default as default10 } from "./thread.mjs";
15
- import { default as default11 } from "./thread-list.mjs";
16
- import { default as default12 } from "./thread-list-item.mjs";
17
- import { default as default13 } from "./thread-welcome.mjs";
18
- import { default as default14 } from "./user-message.mjs";
19
- import { default as default15 } from "./user-action-bar.mjs";
20
- export {
21
- default2 as AssistantActionBar,
22
- default3 as AssistantMessage,
23
- default4 as AssistantModal,
24
- default8 as AttachmentUI,
25
- default5 as BranchPicker,
26
- default6 as Composer,
27
- default7 as ContentPart,
28
- default9 as EditComposer,
29
- default10 as Thread,
30
- ThreadConfigProvider,
31
- default11 as ThreadList,
32
- default12 as ThreadListItem,
33
- default13 as ThreadWelcome,
34
- default15 as UserActionBar,
35
- default14 as UserMessage,
36
- useThreadConfig
37
- };
38
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/index.ts"],"sourcesContent":["/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport { ThreadConfigProvider } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport { useThreadConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { ThreadConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { ThreadWelcomeConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { UserMessageConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { AssistantMessageConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { StringsConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { SuggestionConfig } from \"./thread-config\";\n\n/** @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`. */\nexport type { ThreadConfigProviderProps } from \"./thread-config\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as AssistantActionBar } from \"./assistant-action-bar\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as AssistantMessage } from \"./assistant-message\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as AssistantModal } from \"./assistant-modal\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as BranchPicker } from \"./branch-picker\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as Composer } from \"./composer\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ContentPart } from \"./content-part\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport {\n default as AttachmentUI, // TODO name collision with Attachment\n} from \"./attachment-ui\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as EditComposer } from \"./edit-composer\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as Thread } from \"./thread\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ThreadList } from \"./thread-list\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ThreadListItem } from \"./thread-list-item\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as ThreadWelcome } from \"./thread-welcome\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as UserMessage } from \"./user-message\";\n\n/**\n * @deprecated This export was moved to `@assistant-ui/react-ui`. Use the migration codemod to update your code, by running `npx assistant-ui upgrade`.\n */\nexport { default as UserActionBar } from \"./user-action-bar\";\n"],"mappings":";AACA,SAAS,4BAA4B;AAGrC,SAAS,uBAAuB;AA0BhC,SAAoB,WAAXA,gBAAqC;AAK9C,SAAoB,WAAXA,gBAAmC;AAK5C,SAAoB,WAAXA,gBAAiC;AAK1C,SAAoB,WAAXA,gBAA+B;AAKxC,SAAoB,WAAXA,gBAA2B;AAKpC,SAAoB,WAAXA,gBAA8B;AAKvC;AAAA,EACa,WAAXA;AAAA,OACK;AAKP,SAAoB,WAAXA,gBAA+B;AAKxC,SAAoB,WAAXA,iBAAyB;AAKlC,SAAoB,WAAXA,iBAA6B;AAKtC,SAAoB,WAAXA,iBAAiC;AAK1C,SAAoB,WAAXA,iBAAgC;AAKzC,SAAoB,WAAXA,iBAA8B;AAKvC,SAAoB,WAAXA,iBAAgC;","names":["default"]}
@@ -1,162 +0,0 @@
1
- import { ComponentType, FC, PropsWithChildren, ReactNode } from "react";
2
- import { AssistantRuntime } from "../api/AssistantRuntime";
3
- import { AvatarProps } from "./base/avatar";
4
- import { EmptyContentPartComponent, TextContentPartComponent, ToolCallContentPartProps } from "../types";
5
- import { AssistantToolUI } from "../model-context";
6
- export type SuggestionConfig = {
7
- text?: ReactNode | undefined;
8
- prompt: string;
9
- };
10
- export type ThreadWelcomeConfig = {
11
- message?: string | null | undefined;
12
- suggestions?: SuggestionConfig[] | undefined;
13
- };
14
- export type UserMessageConfig = {
15
- allowEdit?: boolean | undefined;
16
- };
17
- export type AssistantMessageConfig = {
18
- allowReload?: boolean | undefined;
19
- allowCopy?: boolean | undefined;
20
- allowSpeak?: boolean | undefined;
21
- allowFeedbackPositive?: boolean | undefined;
22
- allowFeedbackNegative?: boolean | undefined;
23
- components?: {
24
- Text?: TextContentPartComponent | undefined;
25
- Empty?: EmptyContentPartComponent | undefined;
26
- ToolFallback?: ComponentType<ToolCallContentPartProps> | undefined;
27
- Footer?: ComponentType | undefined;
28
- } | undefined;
29
- };
30
- export type BranchPickerConfig = {
31
- allowBranchPicker?: boolean | undefined;
32
- };
33
- export type ComposerConfig = {
34
- allowAttachments?: boolean | undefined;
35
- };
36
- export type StringsConfig = {
37
- assistantModal?: {
38
- open: {
39
- button: {
40
- tooltip?: string | undefined;
41
- };
42
- };
43
- closed: {
44
- button: {
45
- tooltip?: string | undefined;
46
- };
47
- };
48
- };
49
- threadList?: {
50
- new?: {
51
- label?: string | undefined;
52
- };
53
- item?: {
54
- title?: {
55
- fallback?: string | undefined;
56
- };
57
- archive?: {
58
- tooltip?: string | undefined;
59
- };
60
- };
61
- };
62
- thread?: {
63
- scrollToBottom?: {
64
- tooltip?: string | undefined;
65
- };
66
- };
67
- welcome?: {
68
- message?: string | undefined;
69
- };
70
- userMessage?: {
71
- edit?: {
72
- tooltip?: string | undefined;
73
- };
74
- };
75
- assistantMessage?: {
76
- reload?: {
77
- tooltip?: string | undefined;
78
- };
79
- copy?: {
80
- tooltip?: string | undefined;
81
- };
82
- speak?: {
83
- tooltip?: string | undefined;
84
- stop?: {
85
- tooltip?: string | undefined;
86
- };
87
- };
88
- feedback?: {
89
- positive?: {
90
- tooltip?: string | undefined;
91
- };
92
- negative?: {
93
- tooltip?: string | undefined;
94
- };
95
- };
96
- };
97
- branchPicker?: {
98
- previous?: {
99
- tooltip?: string | undefined;
100
- };
101
- next?: {
102
- tooltip?: string | undefined;
103
- };
104
- };
105
- composer?: {
106
- send?: {
107
- tooltip?: string | undefined;
108
- } | undefined;
109
- cancel?: {
110
- tooltip?: string | undefined;
111
- } | undefined;
112
- addAttachment?: {
113
- tooltip?: string | undefined;
114
- } | undefined;
115
- removeAttachment?: {
116
- tooltip?: string | undefined;
117
- };
118
- input?: {
119
- placeholder?: string | undefined;
120
- };
121
- };
122
- editComposer?: {
123
- send?: {
124
- label?: string | undefined;
125
- };
126
- cancel?: {
127
- label?: string | undefined;
128
- };
129
- };
130
- code?: {
131
- header?: {
132
- copy?: {
133
- tooltip?: string | undefined;
134
- };
135
- };
136
- };
137
- };
138
- export type ThreadConfig = {
139
- runtime?: AssistantRuntime | undefined;
140
- assistantAvatar?: AvatarProps | undefined;
141
- welcome?: ThreadWelcomeConfig | undefined;
142
- assistantMessage?: AssistantMessageConfig | undefined;
143
- userMessage?: UserMessageConfig | undefined;
144
- branchPicker?: BranchPickerConfig | undefined;
145
- composer?: ComposerConfig | undefined;
146
- strings?: StringsConfig | undefined;
147
- tools?: AssistantToolUI[] | undefined;
148
- components?: {
149
- UserMessage?: ComponentType | undefined;
150
- AssistantMessage?: ComponentType | undefined;
151
- EditComposer?: ComponentType | undefined;
152
- Composer?: ComponentType | undefined;
153
- ThreadWelcome?: ComponentType | undefined;
154
- MessagesFooter?: ComponentType | undefined;
155
- } | undefined;
156
- };
157
- export declare const useThreadConfig: () => Omit<ThreadConfig, "runtime">;
158
- export type ThreadConfigProviderProps = PropsWithChildren<{
159
- config?: ThreadConfig | undefined;
160
- }>;
161
- export declare const ThreadConfigProvider: FC<ThreadConfigProviderProps>;
162
- //# sourceMappingURL=thread-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"thread-config.d.ts","sourceRoot":"","sources":["../../src/ui/thread-config.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,EAAE,EACF,iBAAiB,EACjB,SAAS,EAGV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5C,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5C,UAAU,CAAC,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AC;QACrC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;QAC1C,cAAc,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;KAC5C,GACD,SAAS,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,IAAI,CAAC,YAAY,EAAE,SAAS,CAE9D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACxD,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC,CAAC,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmC9D,CAAC"}
@@ -1,63 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/ui/thread-config.tsx
22
- var thread_config_exports = {};
23
- __export(thread_config_exports, {
24
- ThreadConfigProvider: () => ThreadConfigProvider,
25
- useThreadConfig: () => useThreadConfig
26
- });
27
- module.exports = __toCommonJS(thread_config_exports);
28
- var import_react = require("react");
29
- var import_context = require("../context/index.js");
30
- var import_AssistantContext = require("../context/react/AssistantContext.js");
31
- var import_jsx_runtime = require("react/jsx-runtime");
32
- var ThreadConfigContext = (0, import_react.createContext)({});
33
- var useThreadConfig = () => {
34
- return (0, import_react.useContext)(ThreadConfigContext);
35
- };
36
- var ThreadConfigProvider = ({
37
- children,
38
- config
39
- }) => {
40
- const hasAssistant = !!(0, import_AssistantContext.useAssistantRuntime)({ optional: true });
41
- const hasConfig = config && Object.keys(config).length > 0;
42
- const outerConfig = useThreadConfig();
43
- if (hasConfig && Object.keys(outerConfig).length > 0) {
44
- throw new Error(
45
- "You are providing ThreadConfig to several nested components. Please provide all configuration to the same component."
46
- );
47
- }
48
- const configProvider = hasConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThreadConfigContext.Provider, { value: config, children }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
49
- if (!config?.runtime) return configProvider;
50
- if (hasAssistant) {
51
- throw new Error(
52
- "You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed."
53
- );
54
- }
55
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.AssistantRuntimeProvider, { runtime: config.runtime, children: configProvider });
56
- };
57
- ThreadConfigProvider.displayName = "ThreadConfigProvider";
58
- // Annotate the CommonJS export names for ESM import in node:
59
- 0 && (module.exports = {
60
- ThreadConfigProvider,
61
- useThreadConfig
62
- });
63
- //# sourceMappingURL=thread-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/thread-config.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ComponentType,\n FC,\n PropsWithChildren,\n ReactNode,\n createContext,\n useContext,\n} from \"react\";\n\nimport { AssistantRuntime } from \"../api/AssistantRuntime\";\nimport { AvatarProps } from \"./base/avatar\";\nimport {\n EmptyContentPartComponent,\n TextContentPartComponent,\n ToolCallContentPartProps,\n} from \"../types\";\nimport { AssistantRuntimeProvider } from \"../context\";\nimport { AssistantToolUI } from \"../model-context\";\nimport { useAssistantRuntime } from \"../context/react/AssistantContext\";\n\nexport type SuggestionConfig = {\n text?: ReactNode | undefined;\n prompt: string;\n};\n\nexport type ThreadWelcomeConfig = {\n message?: string | null | undefined;\n suggestions?: SuggestionConfig[] | undefined;\n};\n\nexport type UserMessageConfig = {\n allowEdit?: boolean | undefined;\n};\n\nexport type AssistantMessageConfig = {\n allowReload?: boolean | undefined;\n allowCopy?: boolean | undefined;\n allowSpeak?: boolean | undefined;\n allowFeedbackPositive?: boolean | undefined;\n allowFeedbackNegative?: boolean | undefined;\n components?:\n | {\n Text?: TextContentPartComponent | undefined;\n Empty?: EmptyContentPartComponent | undefined;\n ToolFallback?: ComponentType<ToolCallContentPartProps> | undefined;\n Footer?: ComponentType | undefined;\n }\n | undefined;\n};\n\nexport type BranchPickerConfig = {\n allowBranchPicker?: boolean | undefined;\n};\n\nexport type ComposerConfig = {\n allowAttachments?: boolean | undefined;\n};\n\nexport type StringsConfig = {\n assistantModal?: {\n open: {\n button: {\n tooltip?: string | undefined;\n };\n };\n closed: {\n button: {\n tooltip?: string | undefined;\n };\n };\n };\n threadList?: {\n new?: {\n label?: string | undefined;\n };\n item?: {\n title?: {\n fallback?: string | undefined;\n };\n archive?: {\n tooltip?: string | undefined;\n };\n };\n };\n thread?: {\n scrollToBottom?: {\n tooltip?: string | undefined;\n };\n };\n welcome?: {\n message?: string | undefined;\n };\n userMessage?: {\n edit?: {\n tooltip?: string | undefined;\n };\n };\n assistantMessage?: {\n reload?: {\n tooltip?: string | undefined;\n };\n copy?: {\n tooltip?: string | undefined;\n };\n speak?: {\n tooltip?: string | undefined;\n stop?: {\n tooltip?: string | undefined;\n };\n };\n feedback?: {\n positive?: {\n tooltip?: string | undefined;\n };\n negative?: {\n tooltip?: string | undefined;\n };\n };\n };\n branchPicker?: {\n previous?: {\n tooltip?: string | undefined;\n };\n next?: {\n tooltip?: string | undefined;\n };\n };\n composer?: {\n send?:\n | {\n tooltip?: string | undefined;\n }\n | undefined;\n cancel?:\n | {\n tooltip?: string | undefined;\n }\n | undefined;\n addAttachment?:\n | {\n tooltip?: string | undefined;\n }\n | undefined;\n removeAttachment?: {\n tooltip?: string | undefined;\n };\n input?: {\n placeholder?: string | undefined;\n };\n };\n editComposer?: {\n send?: {\n label?: string | undefined;\n };\n cancel?: {\n label?: string | undefined;\n };\n };\n code?: {\n header?: {\n copy?: {\n tooltip?: string | undefined;\n };\n };\n };\n};\n\nconst ThreadConfigContext = createContext<ThreadConfig>({});\n\nexport type ThreadConfig = {\n runtime?: AssistantRuntime | undefined;\n\n assistantAvatar?: AvatarProps | undefined;\n\n welcome?: ThreadWelcomeConfig | undefined;\n assistantMessage?: AssistantMessageConfig | undefined;\n userMessage?: UserMessageConfig | undefined;\n\n branchPicker?: BranchPickerConfig | undefined;\n\n composer?: ComposerConfig | undefined;\n\n strings?: StringsConfig | undefined;\n\n tools?: AssistantToolUI[] | undefined; // TODO add AssistantTool support\n\n components?:\n | {\n UserMessage?: ComponentType | undefined;\n AssistantMessage?: ComponentType | undefined;\n EditComposer?: ComponentType | undefined;\n Composer?: ComponentType | undefined;\n ThreadWelcome?: ComponentType | undefined;\n MessagesFooter?: ComponentType | undefined;\n }\n | undefined;\n};\n\nexport const useThreadConfig = (): Omit<ThreadConfig, \"runtime\"> => {\n return useContext(ThreadConfigContext);\n};\n\nexport type ThreadConfigProviderProps = PropsWithChildren<{\n config?: ThreadConfig | undefined;\n}>;\n\nexport const ThreadConfigProvider: FC<ThreadConfigProviderProps> = ({\n children,\n config,\n}) => {\n const hasAssistant = !!useAssistantRuntime({ optional: true });\n\n const hasConfig = config && Object.keys(config).length > 0;\n const outerConfig = useThreadConfig();\n\n if (hasConfig && Object.keys(outerConfig).length > 0) {\n throw new Error(\n \"You are providing ThreadConfig to several nested components. Please provide all configuration to the same component.\",\n );\n }\n\n const configProvider = hasConfig ? (\n <ThreadConfigContext.Provider value={config}>\n {children}\n </ThreadConfigContext.Provider>\n ) : (\n <>{children}</>\n );\n\n if (!config?.runtime) return configProvider;\n\n if (hasAssistant) {\n throw new Error(\n \"You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed.\",\n );\n }\n return (\n <AssistantRuntimeProvider runtime={config.runtime}>\n {configProvider}\n </AssistantRuntimeProvider>\n );\n};\n\nThreadConfigProvider.displayName = \"ThreadConfigProvider\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAOO;AASP,qBAAyC;AAEzC,8BAAoC;AA4MhC;AAvDJ,IAAM,0BAAsB,4BAA4B,CAAC,CAAC;AA+BnD,IAAM,kBAAkB,MAAqC;AAClE,aAAO,yBAAW,mBAAmB;AACvC;AAMO,IAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,CAAC,KAAC,6CAAoB,EAAE,UAAU,KAAK,CAAC;AAE7D,QAAM,YAAY,UAAU,OAAO,KAAK,MAAM,EAAE,SAAS;AACzD,QAAM,cAAc,gBAAgB;AAEpC,MAAI,aAAa,OAAO,KAAK,WAAW,EAAE,SAAS,GAAG;AACpD,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,iBAAiB,YACrB,4CAAC,oBAAoB,UAApB,EAA6B,OAAO,QAClC,UACH,IAEA,2EAAG,UAAS;AAGd,MAAI,CAAC,QAAQ,QAAS,QAAO;AAE7B,MAAI,cAAc;AAChB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SACE,4CAAC,2CAAyB,SAAS,OAAO,SACvC,0BACH;AAEJ;AAEA,qBAAqB,cAAc;","names":[]}
@@ -1,41 +0,0 @@
1
- "use client";
2
-
3
- // src/ui/thread-config.tsx
4
- import {
5
- createContext,
6
- useContext
7
- } from "react";
8
- import { AssistantRuntimeProvider } from "../context/index.mjs";
9
- import { useAssistantRuntime } from "../context/react/AssistantContext.mjs";
10
- import { Fragment, jsx } from "react/jsx-runtime";
11
- var ThreadConfigContext = createContext({});
12
- var useThreadConfig = () => {
13
- return useContext(ThreadConfigContext);
14
- };
15
- var ThreadConfigProvider = ({
16
- children,
17
- config
18
- }) => {
19
- const hasAssistant = !!useAssistantRuntime({ optional: true });
20
- const hasConfig = config && Object.keys(config).length > 0;
21
- const outerConfig = useThreadConfig();
22
- if (hasConfig && Object.keys(outerConfig).length > 0) {
23
- throw new Error(
24
- "You are providing ThreadConfig to several nested components. Please provide all configuration to the same component."
25
- );
26
- }
27
- const configProvider = hasConfig ? /* @__PURE__ */ jsx(ThreadConfigContext.Provider, { value: config, children }) : /* @__PURE__ */ jsx(Fragment, { children });
28
- if (!config?.runtime) return configProvider;
29
- if (hasAssistant) {
30
- throw new Error(
31
- "You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed."
32
- );
33
- }
34
- return /* @__PURE__ */ jsx(AssistantRuntimeProvider, { runtime: config.runtime, children: configProvider });
35
- };
36
- ThreadConfigProvider.displayName = "ThreadConfigProvider";
37
- export {
38
- ThreadConfigProvider,
39
- useThreadConfig
40
- };
41
- //# sourceMappingURL=thread-config.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/thread-config.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ComponentType,\n FC,\n PropsWithChildren,\n ReactNode,\n createContext,\n useContext,\n} from \"react\";\n\nimport { AssistantRuntime } from \"../api/AssistantRuntime\";\nimport { AvatarProps } from \"./base/avatar\";\nimport {\n EmptyContentPartComponent,\n TextContentPartComponent,\n ToolCallContentPartProps,\n} from \"../types\";\nimport { AssistantRuntimeProvider } from \"../context\";\nimport { AssistantToolUI } from \"../model-context\";\nimport { useAssistantRuntime } from \"../context/react/AssistantContext\";\n\nexport type SuggestionConfig = {\n text?: ReactNode | undefined;\n prompt: string;\n};\n\nexport type ThreadWelcomeConfig = {\n message?: string | null | undefined;\n suggestions?: SuggestionConfig[] | undefined;\n};\n\nexport type UserMessageConfig = {\n allowEdit?: boolean | undefined;\n};\n\nexport type AssistantMessageConfig = {\n allowReload?: boolean | undefined;\n allowCopy?: boolean | undefined;\n allowSpeak?: boolean | undefined;\n allowFeedbackPositive?: boolean | undefined;\n allowFeedbackNegative?: boolean | undefined;\n components?:\n | {\n Text?: TextContentPartComponent | undefined;\n Empty?: EmptyContentPartComponent | undefined;\n ToolFallback?: ComponentType<ToolCallContentPartProps> | undefined;\n Footer?: ComponentType | undefined;\n }\n | undefined;\n};\n\nexport type BranchPickerConfig = {\n allowBranchPicker?: boolean | undefined;\n};\n\nexport type ComposerConfig = {\n allowAttachments?: boolean | undefined;\n};\n\nexport type StringsConfig = {\n assistantModal?: {\n open: {\n button: {\n tooltip?: string | undefined;\n };\n };\n closed: {\n button: {\n tooltip?: string | undefined;\n };\n };\n };\n threadList?: {\n new?: {\n label?: string | undefined;\n };\n item?: {\n title?: {\n fallback?: string | undefined;\n };\n archive?: {\n tooltip?: string | undefined;\n };\n };\n };\n thread?: {\n scrollToBottom?: {\n tooltip?: string | undefined;\n };\n };\n welcome?: {\n message?: string | undefined;\n };\n userMessage?: {\n edit?: {\n tooltip?: string | undefined;\n };\n };\n assistantMessage?: {\n reload?: {\n tooltip?: string | undefined;\n };\n copy?: {\n tooltip?: string | undefined;\n };\n speak?: {\n tooltip?: string | undefined;\n stop?: {\n tooltip?: string | undefined;\n };\n };\n feedback?: {\n positive?: {\n tooltip?: string | undefined;\n };\n negative?: {\n tooltip?: string | undefined;\n };\n };\n };\n branchPicker?: {\n previous?: {\n tooltip?: string | undefined;\n };\n next?: {\n tooltip?: string | undefined;\n };\n };\n composer?: {\n send?:\n | {\n tooltip?: string | undefined;\n }\n | undefined;\n cancel?:\n | {\n tooltip?: string | undefined;\n }\n | undefined;\n addAttachment?:\n | {\n tooltip?: string | undefined;\n }\n | undefined;\n removeAttachment?: {\n tooltip?: string | undefined;\n };\n input?: {\n placeholder?: string | undefined;\n };\n };\n editComposer?: {\n send?: {\n label?: string | undefined;\n };\n cancel?: {\n label?: string | undefined;\n };\n };\n code?: {\n header?: {\n copy?: {\n tooltip?: string | undefined;\n };\n };\n };\n};\n\nconst ThreadConfigContext = createContext<ThreadConfig>({});\n\nexport type ThreadConfig = {\n runtime?: AssistantRuntime | undefined;\n\n assistantAvatar?: AvatarProps | undefined;\n\n welcome?: ThreadWelcomeConfig | undefined;\n assistantMessage?: AssistantMessageConfig | undefined;\n userMessage?: UserMessageConfig | undefined;\n\n branchPicker?: BranchPickerConfig | undefined;\n\n composer?: ComposerConfig | undefined;\n\n strings?: StringsConfig | undefined;\n\n tools?: AssistantToolUI[] | undefined; // TODO add AssistantTool support\n\n components?:\n | {\n UserMessage?: ComponentType | undefined;\n AssistantMessage?: ComponentType | undefined;\n EditComposer?: ComponentType | undefined;\n Composer?: ComponentType | undefined;\n ThreadWelcome?: ComponentType | undefined;\n MessagesFooter?: ComponentType | undefined;\n }\n | undefined;\n};\n\nexport const useThreadConfig = (): Omit<ThreadConfig, \"runtime\"> => {\n return useContext(ThreadConfigContext);\n};\n\nexport type ThreadConfigProviderProps = PropsWithChildren<{\n config?: ThreadConfig | undefined;\n}>;\n\nexport const ThreadConfigProvider: FC<ThreadConfigProviderProps> = ({\n children,\n config,\n}) => {\n const hasAssistant = !!useAssistantRuntime({ optional: true });\n\n const hasConfig = config && Object.keys(config).length > 0;\n const outerConfig = useThreadConfig();\n\n if (hasConfig && Object.keys(outerConfig).length > 0) {\n throw new Error(\n \"You are providing ThreadConfig to several nested components. Please provide all configuration to the same component.\",\n );\n }\n\n const configProvider = hasConfig ? (\n <ThreadConfigContext.Provider value={config}>\n {children}\n </ThreadConfigContext.Provider>\n ) : (\n <>{children}</>\n );\n\n if (!config?.runtime) return configProvider;\n\n if (hasAssistant) {\n throw new Error(\n \"You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed.\",\n );\n }\n return (\n <AssistantRuntimeProvider runtime={config.runtime}>\n {configProvider}\n </AssistantRuntimeProvider>\n );\n};\n\nThreadConfigProvider.displayName = \"ThreadConfigProvider\";\n"],"mappings":";;;AAEA;AAAA,EAKE;AAAA,EACA;AAAA,OACK;AASP,SAAS,gCAAgC;AAEzC,SAAS,2BAA2B;AA4MhC,SAIA,UAJA;AAvDJ,IAAM,sBAAsB,cAA4B,CAAC,CAAC;AA+BnD,IAAM,kBAAkB,MAAqC;AAClE,SAAO,WAAW,mBAAmB;AACvC;AAMO,IAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,CAAC,CAAC,oBAAoB,EAAE,UAAU,KAAK,CAAC;AAE7D,QAAM,YAAY,UAAU,OAAO,KAAK,MAAM,EAAE,SAAS;AACzD,QAAM,cAAc,gBAAgB;AAEpC,MAAI,aAAa,OAAO,KAAK,WAAW,EAAE,SAAS,GAAG;AACpD,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,iBAAiB,YACrB,oBAAC,oBAAoB,UAApB,EAA6B,OAAO,QAClC,UACH,IAEA,gCAAG,UAAS;AAGd,MAAI,CAAC,QAAQ,QAAS,QAAO;AAE7B,MAAI,cAAc;AAChB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SACE,oBAAC,4BAAyB,SAAS,OAAO,SACvC,0BACH;AAEJ;AAEA,qBAAqB,cAAc;","names":[]}
@@ -1,13 +0,0 @@
1
- import { type FC } from "react";
2
- import { TooltipIconButton } from "./base/tooltip-icon-button";
3
- declare const ThreadListItem: FC;
4
- declare const exports: {
5
- Root: import("react").ForwardRefExoticComponent<Partial<Omit<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
6
- asChild?: boolean;
7
- }, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">> & import("react").RefAttributes<HTMLDivElement>>;
8
- Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
9
- Archive: import("react").ForwardRefExoticComponent<Partial<TooltipIconButton.Props> & import("react").RefAttributes<HTMLButtonElement>>;
10
- };
11
- declare const _default: typeof ThreadListItem & typeof exports;
12
- export default _default;
13
- //# sourceMappingURL=thread-list-item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"thread-list-item.d.ts","sourceRoot":"","sources":["../../src/ui/thread-list-item.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAItE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,QAAA,MAAM,cAAc,EAAE,EASrB,CAAC;AA+DF,QAAA,MAAM,OAAO;;;;;;CAIZ,CAAC;wBAEuD,OAAO,cAAc,GAC5E,OAAO,OAAO;AADhB,wBACiB"}
@@ -1,94 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/ui/thread-list-item.tsx
32
- var thread_list_item_exports = {};
33
- __export(thread_list_item_exports, {
34
- default: () => thread_list_item_default
35
- });
36
- module.exports = __toCommonJS(thread_list_item_exports);
37
- var import_react = require("react");
38
- var import_lucide_react = require("lucide-react");
39
- var import_withDefaults = require("./utils/withDefaults.js");
40
- var import_tooltip_icon_button = require("./base/tooltip-icon-button.js");
41
- var import_primitives = require("../primitives/index.js");
42
- var import_thread_config = require("./thread-config.js");
43
- var import_classnames = __toESM(require("classnames"));
44
- var import_jsx_runtime = require("react/jsx-runtime");
45
- var ThreadListItem = () => {
46
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ThreadListItemRoot, { children: [
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThreadListItemTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThreadListItemTitle, {}) }),
48
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThreadListItemArchive, {})
49
- ] });
50
- };
51
- var ThreadListItemRoot = (0, import_withDefaults.withDefaults)(import_primitives.ThreadListItemPrimitive.Root, {
52
- className: "aui-thread-list-item"
53
- });
54
- ThreadListItemRoot.displayName = "ThreadListItemRoot";
55
- var ThreadListItemTrigger = (0, import_withDefaults.withDefaults)(import_primitives.ThreadListItemPrimitive.Trigger, {
56
- className: "aui-thread-list-item-trigger"
57
- });
58
- var ThreadListItemTitle = (0, import_react.forwardRef)(({ className, ...props }, ref) => {
59
- const config = (0, import_thread_config.useThreadConfig)();
60
- const fallback = config.strings?.threadList?.item?.title?.fallback ?? "New Chat";
61
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
- "p",
63
- {
64
- ref,
65
- className: (0, import_classnames.default)("aui-thread-list-item-title", className),
66
- ...props,
67
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.ThreadListItemPrimitive.Title, { fallback })
68
- }
69
- );
70
- });
71
- ThreadListItemTitle.displayName = "ThreadListItemTitle";
72
- var ThreadListItemArchive = (0, import_react.forwardRef)(({ className, ...props }, ref) => {
73
- const config = (0, import_thread_config.useThreadConfig)();
74
- const tooltip = config.strings?.threadList?.item?.archive?.tooltip ?? "Archive thread";
75
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.ThreadListItemPrimitive.Archive, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
- import_tooltip_icon_button.TooltipIconButton,
77
- {
78
- ref,
79
- className: (0, import_classnames.default)("aui-thread-list-item-archive", className),
80
- variant: "ghost",
81
- tooltip,
82
- ...props,
83
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArchiveIcon, {})
84
- }
85
- ) });
86
- });
87
- ThreadListItemArchive.displayName = "ThreadListItemArchive";
88
- var exports2 = {
89
- Root: ThreadListItemRoot,
90
- Title: ThreadListItemTitle,
91
- Archive: ThreadListItemArchive
92
- };
93
- var thread_list_item_default = Object.assign(ThreadListItem, exports2);
94
- //# sourceMappingURL=thread-list-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/thread-list-item.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, forwardRef, type FC } from \"react\";\nimport { ArchiveIcon } from \"lucide-react\";\n\nimport { withDefaults } from \"./utils/withDefaults\";\nimport { TooltipIconButton } from \"./base/tooltip-icon-button\";\nimport { ThreadListItemPrimitive } from \"../primitives\";\nimport { useThreadConfig } from \"./thread-config\";\nimport classNames from \"classnames\";\n\nconst ThreadListItem: FC = () => {\n return (\n <ThreadListItemRoot>\n <ThreadListItemTrigger>\n <ThreadListItemTitle />\n </ThreadListItemTrigger>\n <ThreadListItemArchive />\n </ThreadListItemRoot>\n );\n};\n\nconst ThreadListItemRoot = withDefaults(ThreadListItemPrimitive.Root, {\n className: \"aui-thread-list-item\",\n});\n\nThreadListItemRoot.displayName = \"ThreadListItemRoot\";\n\nconst ThreadListItemTrigger = withDefaults(ThreadListItemPrimitive.Trigger, {\n className: \"aui-thread-list-item-trigger\",\n});\n\nnamespace ThreadListItemPrimitiveTitle {\n export type Element = HTMLParagraphElement;\n export type Props = ComponentPropsWithoutRef<\"p\">;\n}\n\nconst ThreadListItemTitle = forwardRef<\n ThreadListItemPrimitiveTitle.Element,\n ThreadListItemPrimitiveTitle.Props\n>(({ className, ...props }, ref) => {\n const config = useThreadConfig();\n const fallback =\n config.strings?.threadList?.item?.title?.fallback ?? \"New Chat\";\n\n return (\n <p\n ref={ref}\n className={classNames(\"aui-thread-list-item-title\", className)}\n {...props}\n >\n <ThreadListItemPrimitive.Title fallback={fallback} />\n </p>\n );\n});\n\nThreadListItemTitle.displayName = \"ThreadListItemTitle\";\n\nconst ThreadListItemArchive = forwardRef<\n HTMLButtonElement,\n Partial<TooltipIconButton.Props>\n>(({ className, ...props }, ref) => {\n const config = useThreadConfig();\n const tooltip =\n config.strings?.threadList?.item?.archive?.tooltip ?? \"Archive thread\";\n\n return (\n <ThreadListItemPrimitive.Archive asChild>\n <TooltipIconButton\n ref={ref}\n className={classNames(\"aui-thread-list-item-archive\", className)}\n variant=\"ghost\"\n tooltip={tooltip}\n {...props}\n >\n <ArchiveIcon />\n </TooltipIconButton>\n </ThreadListItemPrimitive.Archive>\n );\n});\n\nThreadListItemArchive.displayName = \"ThreadListItemArchive\";\n\nconst exports = {\n Root: ThreadListItemRoot,\n Title: ThreadListItemTitle,\n Archive: ThreadListItemArchive,\n};\n\nexport default Object.assign(ThreadListItem, exports) as typeof ThreadListItem &\n typeof exports;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA8D;AAC9D,0BAA4B;AAE5B,0BAA6B;AAC7B,iCAAkC;AAClC,wBAAwC;AACxC,2BAAgC;AAChC,wBAAuB;AAInB;AAFJ,IAAM,iBAAqB,MAAM;AAC/B,SACE,6CAAC,sBACC;AAAA,gDAAC,yBACC,sDA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on } from "lucide-react";
6
- import { withDefaults } from "./utils/withDefaults.mjs";
7
- import { TooltipIconButton } from "./base/tooltip-icon-button.mjs";
8
- import { ThreadListItemPrimitive } from "../primitives/index.mjs";
9
- import { useThreadConfig } from "./thread-config.mjs";
10
- import classNames from "classnames";
11
- import { jsx, jsxs } from "react/jsx-runtime";
12
- var ThreadListItem = () => {
13
- return /* @__PURE__ */ jsxs(ThreadListItemRoot, { children: [
14
- /* @__PURE__ */ jsx(ThreadListItemTrigger, { children: /* @__PURE__ */ jsx(ThreadListItemTitle, {}) }),
15
- /* @__PURE__ */ jsx(ThreadListItemArchive, {})
16
- ] });
17
- };
18
- var ThreadListItemRoot = withDefaults(ThreadListItemPrimitive.Root, {
19
- className: "aui-thread-list-item"
20
- });
21
- ThreadListItemRoot.displayName = "ThreadListItemRoot";
22
- var ThreadListItemTrigger = withDefaults(ThreadListItemPrimitive.Trigger, {
23
- className: "aui-thread-list-item-trigger"
24
- });
25
- var ThreadListItemTitle = forwardRef(({ className, ...props }, ref) => {
26
- const config = useThreadConfig();
27
- const fallback = config.strings?.threadList?.item?.title?.fallback ?? "New Chat";
28
- return /* @__PURE__ */ jsx(
29
- "p",
30
- {
31
- ref,
32
- className: classNames("aui-thread-list-item-title", className),
33
- ...props,
34
- children: /* @__PURE__ */ jsx(ThreadListItemPrimitive.Title, { fallback })
35
- }
36
- );
37
- });
38
- ThreadListItemTitle.displayName = "ThreadListItemTitle";
39
- var ThreadListItemArchive = forwardRef(({ className, ...props }, ref) => {
40
- const config = useThreadConfig();
41
- const tooltip = config.strings?.threadList?.item?.archive?.tooltip ?? "Archive thread";
42
- return /* @__PURE__ */ jsx(ThreadListItemPrimitive.Archive, { asChild: true, children: /* @__PURE__ */ jsx(
43
- TooltipIconButton,
44
- {
45
- ref,
46
- className: classNames("aui-thread-list-item-archive", className),
47
- variant: "ghost",
48
- tooltip,
49
- ...props,
50
- children: /* @__PURE__ */ jsx(ArchiveIcon, {})
51
- }
52
- ) });
53
- });
54
- ThreadListItemArchive.displayName = "ThreadListItemArchive";
55
- var exports = {
56
- Root: ThreadListItemRoot,
57
- Title: ThreadListItemTitle,
58
- Archive: ThreadListItemArchive
59
- };
60
- var thread_list_item_default = Object.assign(ThreadListItem, exports);
61
- export {
62
- thread_list_item_default as default
63
- };
64
- //# sourceMappingURL=thread-list-item.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/thread-list-item.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, forwardRef, type FC } from \"react\";\nimport { ArchiveIcon } from \"lucide-react\";\n\nimport { withDefaults } from \"./utils/withDefaults\";\nimport { TooltipIconButton } from \"./base/tooltip-icon-button\";\nimport { ThreadListItemPrimitive } from \"../primitives\";\nimport { useThreadConfig } from \"./thread-config\";\nimport classNames from \"classnames\";\n\nconst ThreadListItem: FC = () => {\n return (\n <ThreadListItemRoot>\n <ThreadListItemTrigger>\n <ThreadListItemTitle />\n </ThreadListItemTrigger>\n <ThreadListItemArchive />\n </ThreadListItemRoot>\n );\n};\n\nconst ThreadListItemRoot = withDefaults(ThreadListItemPrimitive.Root, {\n className: \"aui-thread-list-item\",\n});\n\nThreadListItemRoot.displayName = \"ThreadListItemRoot\";\n\nconst ThreadListItemTrigger = withDefaults(ThreadListItemPrimitive.Trigger, {\n className: \"aui-thread-list-item-trigger\",\n});\n\nnamespace ThreadListItemPrimitiveTitle {\n export type Element = HTMLParagraphElement;\n export type Props = ComponentPropsWithoutRef<\"p\">;\n}\n\nconst ThreadListItemTitle = forwardRef<\n ThreadListItemPrimitiveTitle.Element,\n ThreadListItemPrimitiveTitle.Props\n>(({ className, ...props }, ref) => {\n const config = useThreadConfig();\n const fallback =\n config.strings?.threadList?.item?.title?.fallback ?? \"New Chat\";\n\n return (\n <p\n ref={ref}\n className={classNames(\"aui-thread-list-item-title\", className)}\n {...props}\n >\n <ThreadListItemPrimitive.Title fallback={fallback} />\n </p>\n );\n});\n\nThreadListItemTitle.displayName = \"ThreadListItemTitle\";\n\nconst ThreadListItemArchive = forwardRef<\n HTMLButtonElement,\n Partial<TooltipIconButton.Props>\n>(({ className, ...props }, ref) => {\n const config = useThreadConfig();\n const tooltip =\n config.strings?.threadList?.item?.archive?.tooltip ?? \"Archive thread\";\n\n return (\n <ThreadListItemPrimitive.Archive asChild>\n <TooltipIconButton\n ref={ref}\n className={classNames(\"aui-thread-list-item-archive\", className)}\n variant=\"ghost\"\n tooltip={tooltip}\n {...props}\n >\n <ArchiveIcon />\n </TooltipIconButton>\n </ThreadListItemPrimitive.Archive>\n );\n});\n\nThreadListItemArchive.displayName = \"ThreadListItemArchive\";\n\nconst exports = {\n Root: ThreadListItemRoot,\n Title: ThreadListItemTitle,\n Archive: ThreadListItemArchive,\n};\n\nexport default Object.assign(ThreadListItem, exports) as typeof ThreadListItem &\n typeof exports;\n"],"mappings":";;;AAEA,SAAmC,kBAA2B;AAC9D,SAAS,mBAAmB;AAE5B,SAAS,oBAAoB;AAC7B,SAAS,yBAAyB;AAClC,SAAS,+BAA+B;AACxC,SAAS,uBAAuB;AAChC,OAAO,gBAAgB;AAInB,SAEI,KAFJ;AAFJ,IAAM,iBAAqB,MAAM;AAC/B,SACE,qBAAC,sBACC;AAAA,wBAAC,yBACC,8BAAC,uBAAoB,GACvB;AAAA,IACA,oBAAC,yBAAsB;AAAA,KACzB;AAEJ;AAEA,IAAM,qBAAqB,aAAa,wBAAwB,MAAM;AAAA,EACpE,WAAW;AACb,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAM,wBAAwB,aAAa,wBAAwB,SAAS;AAAA,EAC1E,WAAW;AACb,CAAC;AAOD,IAAM,sBAAsB,WAG1B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,QAAM,SAAS,gBAAgB;AAC/B,QAAM,WACJ,OAAO,SAAS,YAAY,MAAM,OAAO,YAAY;AAEvD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,WAAW,8BAA8B,SAAS;AAAA,MAC5D,GAAG;AAAA,MAEJ,8BAAC,wBAAwB,OAAxB,EAA8B,UAAoB;AAAA;AAAA,EACrD;AAEJ,CAAC;AAED,oBAAoB,cAAc;AAElC,IAAM,wBAAwB,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,QAAM,SAAS,gBAAgB;AAC/B,QAAM,UACJ,OAAO,SAAS,YAAY,MAAM,SAAS,WAAW;AAExD,SACE,oBAAC,wBAAwB,SAAxB,EAAgC,SAAO,MACtC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,WAAW,gCAAgC,SAAS;AAAA,MAC/D,SAAQ;AAAA,MACR;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAC,eAAY;AAAA;AAAA,EACf,GACF;AAEJ,CAAC;AAED,sBAAsB,cAAc;AAEpC,IAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AACX;AAEA,IAAO,2BAAQ,OAAO,OAAO,gBAAgB,OAAO;","names":[]}
@@ -1,27 +0,0 @@
1
- import { type FC } from "react";
2
- import { ThreadListPrimitive } from "../primitives";
3
- declare const ThreadList: FC;
4
- declare namespace ThreadListItems {
5
- type Props = {
6
- /**
7
- * Optional custom components to override default thread list items
8
- */
9
- components?: Partial<ThreadListPrimitive.Items.Props["components"]>;
10
- };
11
- }
12
- declare const ThreadListItems: FC<ThreadListItems.Props>;
13
- declare const exports: {
14
- Root: import("react").ForwardRefExoticComponent<Partial<Omit<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
15
- asChild?: boolean;
16
- }, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">> & import("react").RefAttributes<HTMLDivElement>>;
17
- New: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
18
- asChild?: boolean;
19
- }, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
20
- variant?: "default" | "outline" | "ghost" | null | undefined;
21
- size?: "default" | "icon" | null | undefined;
22
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLButtonElement>>;
23
- Items: FC<ThreadListItems.Props>;
24
- };
25
- declare const _default: typeof ThreadList & typeof exports;
26
- export default _default;
27
- //# sourceMappingURL=thread-list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"thread-list.d.ts","sourceRoot":"","sources":["../../src/ui/thread-list.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,QAAA,MAAM,UAAU,EAAE,EAOjB,CAAC;AA8BF,kBAAU,eAAe,CAAC;IACxB,KAAY,KAAK,GAAG;QAClB;;WAEG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;KACrE,CAAC;CACH;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAS9C,CAAC;AAIF,QAAA,MAAM,OAAO;;;;;;;;;;;CAIZ,CAAC;wBAEmD,OAAO,UAAU,GACpE,OAAO,OAAO;AADhB,wBACiB"}