@assistant-ui/react 0.5.100 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (734) hide show
  1. package/dist/api/AssistantRuntime.d.ts +6 -86
  2. package/dist/api/AssistantRuntime.d.ts.map +1 -1
  3. package/dist/api/AssistantRuntime.js +0 -8
  4. package/dist/api/AssistantRuntime.js.map +1 -1
  5. package/dist/api/AssistantRuntime.mjs +0 -8
  6. package/dist/api/AssistantRuntime.mjs.map +1 -1
  7. package/dist/api/AttachmentRuntime.d.ts +4 -16
  8. package/dist/api/AttachmentRuntime.d.ts.map +1 -1
  9. package/dist/api/AttachmentRuntime.js.map +1 -1
  10. package/dist/api/AttachmentRuntime.mjs.map +1 -1
  11. package/dist/api/ComposerRuntime.d.ts +15 -131
  12. package/dist/api/ComposerRuntime.d.ts.map +1 -1
  13. package/dist/api/ComposerRuntime.js +4 -84
  14. package/dist/api/ComposerRuntime.js.map +1 -1
  15. package/dist/api/ComposerRuntime.mjs +4 -84
  16. package/dist/api/ComposerRuntime.mjs.map +1 -1
  17. package/dist/api/ContentPartRuntime.d.ts +2 -6
  18. package/dist/api/ContentPartRuntime.d.ts.map +1 -1
  19. package/dist/api/ContentPartRuntime.js.map +1 -1
  20. package/dist/api/ContentPartRuntime.mjs.map +1 -1
  21. package/dist/api/MessageRuntime.d.ts +8 -19
  22. package/dist/api/MessageRuntime.d.ts.map +1 -1
  23. package/dist/api/MessageRuntime.js +11 -7
  24. package/dist/api/MessageRuntime.js.map +1 -1
  25. package/dist/api/MessageRuntime.mjs +10 -6
  26. package/dist/api/MessageRuntime.mjs.map +1 -1
  27. package/dist/api/RuntimePathTypes.d.ts +33 -33
  28. package/dist/api/RuntimePathTypes.d.ts.map +1 -1
  29. package/dist/api/RuntimePathTypes.js.map +1 -1
  30. package/dist/api/ThreadListItemRuntime.d.ts +12 -8
  31. package/dist/api/ThreadListItemRuntime.d.ts.map +1 -1
  32. package/dist/api/ThreadListItemRuntime.js +10 -6
  33. package/dist/api/ThreadListItemRuntime.js.map +1 -1
  34. package/dist/api/ThreadListItemRuntime.mjs +10 -6
  35. package/dist/api/ThreadListItemRuntime.mjs.map +1 -1
  36. package/dist/api/ThreadListRuntime.d.ts +10 -28
  37. package/dist/api/ThreadListRuntime.d.ts.map +1 -1
  38. package/dist/api/ThreadListRuntime.js +23 -26
  39. package/dist/api/ThreadListRuntime.js.map +1 -1
  40. package/dist/api/ThreadListRuntime.mjs +23 -26
  41. package/dist/api/ThreadListRuntime.mjs.map +1 -1
  42. package/dist/api/ThreadRuntime.d.ts +53 -211
  43. package/dist/api/ThreadRuntime.d.ts.map +1 -1
  44. package/dist/api/ThreadRuntime.js +2 -94
  45. package/dist/api/ThreadRuntime.js.map +1 -1
  46. package/dist/api/ThreadRuntime.mjs +2 -94
  47. package/dist/api/ThreadRuntime.mjs.map +1 -1
  48. package/dist/api/index.d.ts +1 -0
  49. package/dist/api/index.d.ts.map +1 -1
  50. package/dist/api/index.js.map +1 -1
  51. package/dist/context/providers/AssistantRuntimeProvider.d.ts.map +1 -1
  52. package/dist/context/providers/AssistantRuntimeProvider.js +0 -1
  53. package/dist/context/providers/AssistantRuntimeProvider.js.map +1 -1
  54. package/dist/context/providers/AssistantRuntimeProvider.mjs +0 -1
  55. package/dist/context/providers/AssistantRuntimeProvider.mjs.map +1 -1
  56. package/dist/context/providers/TextContentPartProvider.d.ts.map +1 -1
  57. package/dist/context/providers/TextContentPartProvider.js +0 -2
  58. package/dist/context/providers/TextContentPartProvider.js.map +1 -1
  59. package/dist/context/providers/TextContentPartProvider.mjs +0 -2
  60. package/dist/context/providers/TextContentPartProvider.mjs.map +1 -1
  61. package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts +1 -4
  62. package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
  63. package/dist/context/providers/ThreadRuntimeProvider.d.ts.map +1 -1
  64. package/dist/context/providers/ThreadRuntimeProvider.js +1 -13
  65. package/dist/context/providers/ThreadRuntimeProvider.js.map +1 -1
  66. package/dist/context/providers/ThreadRuntimeProvider.mjs +1 -13
  67. package/dist/context/providers/ThreadRuntimeProvider.mjs.map +1 -1
  68. package/dist/context/react/AssistantContext.d.ts +10 -120
  69. package/dist/context/react/AssistantContext.d.ts.map +1 -1
  70. package/dist/context/react/AssistantContext.js +0 -15
  71. package/dist/context/react/AssistantContext.js.map +1 -1
  72. package/dist/context/react/AssistantContext.mjs +0 -11
  73. package/dist/context/react/AssistantContext.mjs.map +1 -1
  74. package/dist/context/react/AttachmentContext.d.ts +32 -48
  75. package/dist/context/react/AttachmentContext.d.ts.map +1 -1
  76. package/dist/context/react/ComposerContext.d.ts +0 -5
  77. package/dist/context/react/ComposerContext.d.ts.map +1 -1
  78. package/dist/context/react/ComposerContext.js +3 -5
  79. package/dist/context/react/ComposerContext.js.map +1 -1
  80. package/dist/context/react/ComposerContext.mjs +2 -3
  81. package/dist/context/react/ComposerContext.mjs.map +1 -1
  82. package/dist/context/react/ContentPartContext.d.ts +0 -5
  83. package/dist/context/react/ContentPartContext.d.ts.map +1 -1
  84. package/dist/context/react/ContentPartContext.js +3 -5
  85. package/dist/context/react/ContentPartContext.js.map +1 -1
  86. package/dist/context/react/ContentPartContext.mjs +2 -3
  87. package/dist/context/react/ContentPartContext.mjs.map +1 -1
  88. package/dist/context/react/MessageContext.d.ts +6 -46
  89. package/dist/context/react/MessageContext.d.ts.map +1 -1
  90. package/dist/context/react/MessageContext.js +2 -6
  91. package/dist/context/react/MessageContext.js.map +1 -1
  92. package/dist/context/react/MessageContext.mjs +2 -4
  93. package/dist/context/react/MessageContext.mjs.map +1 -1
  94. package/dist/context/react/ThreadContext.d.ts +11 -1749
  95. package/dist/context/react/ThreadContext.d.ts.map +1 -1
  96. package/dist/context/react/ThreadContext.js +4 -30
  97. package/dist/context/react/ThreadContext.js.map +1 -1
  98. package/dist/context/react/ThreadContext.mjs +4 -22
  99. package/dist/context/react/ThreadContext.mjs.map +1 -1
  100. package/dist/context/react/ThreadListItemContext.d.ts +6 -24
  101. package/dist/context/react/ThreadListItemContext.d.ts.map +1 -1
  102. package/dist/context/react/index.d.ts +5 -101
  103. package/dist/context/react/index.d.ts.map +1 -1
  104. package/dist/context/react/index.js +0 -38
  105. package/dist/context/react/index.js.map +1 -1
  106. package/dist/context/react/index.mjs +5 -49
  107. package/dist/context/react/index.mjs.map +1 -1
  108. package/dist/context/stores/AssistantToolUIs.d.ts +9 -6
  109. package/dist/context/stores/AssistantToolUIs.d.ts.map +1 -1
  110. package/dist/context/stores/AssistantToolUIs.js.map +1 -1
  111. package/dist/context/stores/AssistantToolUIs.mjs.map +1 -1
  112. package/dist/context/stores/MessageUtils.d.ts +7 -12
  113. package/dist/context/stores/MessageUtils.d.ts.map +1 -1
  114. package/dist/context/stores/MessageUtils.js.map +1 -1
  115. package/dist/context/stores/MessageUtils.mjs.map +1 -1
  116. package/dist/context/stores/ThreadViewport.d.ts +6 -10
  117. package/dist/context/stores/ThreadViewport.d.ts.map +1 -1
  118. package/dist/context/stores/ThreadViewport.js +0 -1
  119. package/dist/context/stores/ThreadViewport.js.map +1 -1
  120. package/dist/context/stores/ThreadViewport.mjs +0 -2
  121. package/dist/context/stores/ThreadViewport.mjs.map +1 -1
  122. package/dist/index.d.ts +0 -1
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +0 -2
  125. package/dist/index.js.map +1 -1
  126. package/dist/index.mjs +0 -1
  127. package/dist/index.mjs.map +1 -1
  128. package/dist/internal.d.ts +1 -0
  129. package/dist/internal.d.ts.map +1 -1
  130. package/dist/internal.js +3 -0
  131. package/dist/internal.js.map +1 -1
  132. package/dist/internal.mjs +2 -0
  133. package/dist/internal.mjs.map +1 -1
  134. package/dist/model-config/useAssistantToolUI.d.ts.map +1 -1
  135. package/dist/model-config/useAssistantToolUI.js.map +1 -1
  136. package/dist/model-config/useAssistantToolUI.mjs.map +1 -1
  137. package/dist/primitive-hooks/contentPart/useContentPartDisplay.d.ts +1 -4
  138. package/dist/primitive-hooks/contentPart/useContentPartDisplay.d.ts.map +1 -1
  139. package/dist/primitive-hooks/contentPart/useContentPartDisplay.js.map +1 -1
  140. package/dist/primitive-hooks/contentPart/useContentPartDisplay.mjs.map +1 -1
  141. package/dist/primitive-hooks/contentPart/useContentPartImage.d.ts +1 -4
  142. package/dist/primitive-hooks/contentPart/useContentPartImage.d.ts.map +1 -1
  143. package/dist/primitive-hooks/contentPart/useContentPartImage.js.map +1 -1
  144. package/dist/primitive-hooks/contentPart/useContentPartImage.mjs.map +1 -1
  145. package/dist/primitive-hooks/contentPart/useContentPartText.d.ts +1 -4
  146. package/dist/primitive-hooks/contentPart/useContentPartText.d.ts.map +1 -1
  147. package/dist/primitive-hooks/contentPart/useContentPartText.js.map +1 -1
  148. package/dist/primitive-hooks/contentPart/useContentPartText.mjs.map +1 -1
  149. package/dist/primitive-hooks/index.d.ts +0 -5
  150. package/dist/primitive-hooks/index.d.ts.map +1 -1
  151. package/dist/primitive-hooks/index.js +1 -11
  152. package/dist/primitive-hooks/index.js.map +1 -1
  153. package/dist/primitive-hooks/index.mjs +0 -5
  154. package/dist/primitive-hooks/index.mjs.map +1 -1
  155. package/dist/primitives/actionBar/ActionBarCopy.d.ts +1 -5
  156. package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
  157. package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
  158. package/dist/primitives/actionBar/ActionBarCopy.mjs.map +1 -1
  159. package/dist/primitives/actionBar/ActionBarEdit.d.ts +0 -4
  160. package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
  161. package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
  162. package/dist/primitives/actionBar/ActionBarEdit.mjs.map +1 -1
  163. package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts +0 -4
  164. package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
  165. package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
  166. package/dist/primitives/actionBar/ActionBarFeedbackNegative.mjs.map +1 -1
  167. package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts +0 -4
  168. package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
  169. package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
  170. package/dist/primitives/actionBar/ActionBarFeedbackPositive.mjs.map +1 -1
  171. package/dist/primitives/actionBar/ActionBarReload.d.ts +0 -4
  172. package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
  173. package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
  174. package/dist/primitives/actionBar/ActionBarReload.mjs.map +1 -1
  175. package/dist/primitives/actionBar/ActionBarRoot.d.ts +0 -4
  176. package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +1 -1
  177. package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
  178. package/dist/primitives/actionBar/ActionBarRoot.mjs.map +1 -1
  179. package/dist/primitives/actionBar/ActionBarSpeak.d.ts +0 -4
  180. package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
  181. package/dist/primitives/actionBar/ActionBarSpeak.js.map +1 -1
  182. package/dist/primitives/actionBar/ActionBarSpeak.mjs.map +1 -1
  183. package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts +0 -4
  184. package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
  185. package/dist/primitives/actionBar/ActionBarStopSpeaking.js.map +1 -1
  186. package/dist/primitives/actionBar/ActionBarStopSpeaking.mjs.map +1 -1
  187. package/dist/primitives/assistantModal/AssistantModalContent.d.ts +0 -4
  188. package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +1 -1
  189. package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
  190. package/dist/primitives/assistantModal/AssistantModalContent.mjs.map +1 -1
  191. package/dist/primitives/assistantModal/AssistantModalRoot.d.ts +0 -4
  192. package/dist/primitives/assistantModal/AssistantModalRoot.d.ts.map +1 -1
  193. package/dist/primitives/assistantModal/AssistantModalRoot.js.map +1 -1
  194. package/dist/primitives/assistantModal/AssistantModalRoot.mjs.map +1 -1
  195. package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts +0 -4
  196. package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +1 -1
  197. package/dist/primitives/assistantModal/AssistantModalTrigger.js.map +1 -1
  198. package/dist/primitives/assistantModal/AssistantModalTrigger.mjs.map +1 -1
  199. package/dist/primitives/branchPicker/BranchPickerCount.d.ts +0 -4
  200. package/dist/primitives/branchPicker/BranchPickerCount.d.ts.map +1 -1
  201. package/dist/primitives/branchPicker/BranchPickerCount.js.map +1 -1
  202. package/dist/primitives/branchPicker/BranchPickerCount.mjs.map +1 -1
  203. package/dist/primitives/branchPicker/BranchPickerNext.d.ts +0 -4
  204. package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
  205. package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
  206. package/dist/primitives/branchPicker/BranchPickerNext.mjs.map +1 -1
  207. package/dist/primitives/branchPicker/BranchPickerNumber.d.ts +0 -4
  208. package/dist/primitives/branchPicker/BranchPickerNumber.d.ts.map +1 -1
  209. package/dist/primitives/branchPicker/BranchPickerNumber.js.map +1 -1
  210. package/dist/primitives/branchPicker/BranchPickerNumber.mjs.map +1 -1
  211. package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +0 -4
  212. package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
  213. package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
  214. package/dist/primitives/branchPicker/BranchPickerPrevious.mjs.map +1 -1
  215. package/dist/primitives/branchPicker/BranchPickerRoot.d.ts +0 -4
  216. package/dist/primitives/branchPicker/BranchPickerRoot.d.ts.map +1 -1
  217. package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
  218. package/dist/primitives/branchPicker/BranchPickerRoot.mjs.map +1 -1
  219. package/dist/primitives/composer/ComposerAddAttachment.d.ts +1 -5
  220. package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
  221. package/dist/primitives/composer/ComposerAddAttachment.js +2 -2
  222. package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
  223. package/dist/primitives/composer/ComposerAddAttachment.mjs +1 -1
  224. package/dist/primitives/composer/ComposerAddAttachment.mjs.map +1 -1
  225. package/dist/primitives/composer/ComposerAttachments.d.ts +0 -4
  226. package/dist/primitives/composer/ComposerAttachments.d.ts.map +1 -1
  227. package/dist/primitives/composer/ComposerAttachments.js.map +1 -1
  228. package/dist/primitives/composer/ComposerAttachments.mjs.map +1 -1
  229. package/dist/primitives/composer/ComposerCancel.d.ts +0 -4
  230. package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
  231. package/dist/primitives/composer/ComposerCancel.js.map +1 -1
  232. package/dist/primitives/composer/ComposerCancel.mjs.map +1 -1
  233. package/dist/primitives/composer/ComposerIf.d.ts +0 -4
  234. package/dist/primitives/composer/ComposerIf.d.ts.map +1 -1
  235. package/dist/primitives/composer/ComposerIf.js.map +1 -1
  236. package/dist/primitives/composer/ComposerIf.mjs.map +1 -1
  237. package/dist/primitives/composer/ComposerInput.d.ts +0 -4
  238. package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
  239. package/dist/primitives/composer/ComposerInput.js.map +1 -1
  240. package/dist/primitives/composer/ComposerInput.mjs.map +1 -1
  241. package/dist/primitives/composer/ComposerRoot.d.ts +0 -1
  242. package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
  243. package/dist/primitives/composer/ComposerRoot.js +2 -2
  244. package/dist/primitives/composer/ComposerRoot.js.map +1 -1
  245. package/dist/primitives/composer/ComposerRoot.mjs +1 -1
  246. package/dist/primitives/composer/ComposerRoot.mjs.map +1 -1
  247. package/dist/primitives/composer/ComposerSend.d.ts +1 -5
  248. package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
  249. package/dist/primitives/composer/ComposerSend.js +2 -2
  250. package/dist/primitives/composer/ComposerSend.js.map +1 -1
  251. package/dist/primitives/composer/ComposerSend.mjs +1 -1
  252. package/dist/primitives/composer/ComposerSend.mjs.map +1 -1
  253. package/dist/primitives/contentPart/ContentPartDisplay.d.ts +0 -4
  254. package/dist/primitives/contentPart/ContentPartDisplay.d.ts.map +1 -1
  255. package/dist/primitives/contentPart/ContentPartDisplay.js.map +1 -1
  256. package/dist/primitives/contentPart/ContentPartDisplay.mjs.map +1 -1
  257. package/dist/primitives/contentPart/ContentPartImage.d.ts +0 -4
  258. package/dist/primitives/contentPart/ContentPartImage.d.ts.map +1 -1
  259. package/dist/primitives/contentPart/ContentPartImage.js.map +1 -1
  260. package/dist/primitives/contentPart/ContentPartImage.mjs.map +1 -1
  261. package/dist/primitives/contentPart/ContentPartInProgress.d.ts +0 -4
  262. package/dist/primitives/contentPart/ContentPartInProgress.d.ts.map +1 -1
  263. package/dist/primitives/contentPart/ContentPartInProgress.js.map +1 -1
  264. package/dist/primitives/contentPart/ContentPartInProgress.mjs.map +1 -1
  265. package/dist/primitives/contentPart/ContentPartText.d.ts +0 -4
  266. package/dist/primitives/contentPart/ContentPartText.d.ts.map +1 -1
  267. package/dist/primitives/contentPart/ContentPartText.js.map +1 -1
  268. package/dist/primitives/contentPart/ContentPartText.mjs.map +1 -1
  269. package/dist/primitives/index.d.ts +0 -7
  270. package/dist/primitives/index.d.ts.map +1 -1
  271. package/dist/primitives/index.js.map +1 -1
  272. package/dist/primitives/index.mjs.map +1 -1
  273. package/dist/primitives/message/MessageAttachments.d.ts +0 -4
  274. package/dist/primitives/message/MessageAttachments.d.ts.map +1 -1
  275. package/dist/primitives/message/MessageAttachments.js +2 -4
  276. package/dist/primitives/message/MessageAttachments.js.map +1 -1
  277. package/dist/primitives/message/MessageAttachments.mjs +2 -4
  278. package/dist/primitives/message/MessageAttachments.mjs.map +1 -1
  279. package/dist/primitives/message/MessageContent.d.ts +0 -4
  280. package/dist/primitives/message/MessageContent.d.ts.map +1 -1
  281. package/dist/primitives/message/MessageContent.js +6 -6
  282. package/dist/primitives/message/MessageContent.js.map +1 -1
  283. package/dist/primitives/message/MessageContent.mjs +7 -7
  284. package/dist/primitives/message/MessageContent.mjs.map +1 -1
  285. package/dist/primitives/message/MessageIf.d.ts +0 -4
  286. package/dist/primitives/message/MessageIf.d.ts.map +1 -1
  287. package/dist/primitives/message/MessageIf.js.map +1 -1
  288. package/dist/primitives/message/MessageIf.mjs.map +1 -1
  289. package/dist/primitives/message/MessageRoot.d.ts +0 -4
  290. package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
  291. package/dist/primitives/message/MessageRoot.js.map +1 -1
  292. package/dist/primitives/message/MessageRoot.mjs.map +1 -1
  293. package/dist/primitives/message/index.d.ts +0 -1
  294. package/dist/primitives/message/index.d.ts.map +1 -1
  295. package/dist/primitives/message/index.js +0 -3
  296. package/dist/primitives/message/index.js.map +1 -1
  297. package/dist/primitives/message/index.mjs +0 -2
  298. package/dist/primitives/message/index.mjs.map +1 -1
  299. package/dist/primitives/thread/ThreadEmpty.d.ts +0 -4
  300. package/dist/primitives/thread/ThreadEmpty.d.ts.map +1 -1
  301. package/dist/primitives/thread/ThreadEmpty.js +2 -2
  302. package/dist/primitives/thread/ThreadEmpty.js.map +1 -1
  303. package/dist/primitives/thread/ThreadEmpty.mjs +1 -1
  304. package/dist/primitives/thread/ThreadEmpty.mjs.map +1 -1
  305. package/dist/primitives/thread/ThreadIf.d.ts +0 -4
  306. package/dist/primitives/thread/ThreadIf.d.ts.map +1 -1
  307. package/dist/primitives/thread/ThreadIf.js.map +1 -1
  308. package/dist/primitives/thread/ThreadIf.mjs.map +1 -1
  309. package/dist/primitives/thread/ThreadMessages.d.ts +0 -4
  310. package/dist/primitives/thread/ThreadMessages.d.ts.map +1 -1
  311. package/dist/primitives/thread/ThreadMessages.js.map +1 -1
  312. package/dist/primitives/thread/ThreadMessages.mjs.map +1 -1
  313. package/dist/primitives/thread/ThreadRoot.d.ts +0 -4
  314. package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
  315. package/dist/primitives/thread/ThreadRoot.js.map +1 -1
  316. package/dist/primitives/thread/ThreadRoot.mjs.map +1 -1
  317. package/dist/primitives/thread/ThreadScrollToBottom.d.ts +0 -4
  318. package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +1 -1
  319. package/dist/primitives/thread/ThreadScrollToBottom.js.map +1 -1
  320. package/dist/primitives/thread/ThreadScrollToBottom.mjs.map +1 -1
  321. package/dist/primitives/thread/ThreadSuggestion.d.ts +0 -4
  322. package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
  323. package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
  324. package/dist/primitives/thread/ThreadSuggestion.mjs.map +1 -1
  325. package/dist/primitives/thread/ThreadViewport.d.ts +0 -4
  326. package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
  327. package/dist/primitives/thread/ThreadViewport.js.map +1 -1
  328. package/dist/primitives/thread/ThreadViewport.mjs.map +1 -1
  329. package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
  330. package/dist/primitives/threadListItem/ThreadListItemArchive.js +3 -2
  331. package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
  332. package/dist/primitives/threadListItem/ThreadListItemArchive.mjs +3 -2
  333. package/dist/primitives/threadListItem/ThreadListItemArchive.mjs.map +1 -1
  334. package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts +14 -0
  335. package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -0
  336. package/dist/primitives/threadListItem/ThreadListItemRoot.js +47 -0
  337. package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -0
  338. package/dist/primitives/threadListItem/ThreadListItemRoot.mjs +23 -0
  339. package/dist/primitives/threadListItem/ThreadListItemRoot.mjs.map +1 -0
  340. package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts +8 -0
  341. package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -0
  342. package/dist/primitives/{message/MessageInProgress.js → threadListItem/ThreadListItemTitle.js} +13 -10
  343. package/dist/primitives/threadListItem/ThreadListItemTitle.js.map +1 -0
  344. package/dist/primitives/threadListItem/ThreadListItemTitle.mjs +14 -0
  345. package/dist/primitives/threadListItem/ThreadListItemTitle.mjs.map +1 -0
  346. package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts +13 -0
  347. package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -0
  348. package/dist/{runtimes/core/subscribeToMainThread.js → primitives/threadListItem/ThreadListItemTrigger.js} +17 -22
  349. package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -0
  350. package/dist/primitives/threadListItem/ThreadListItemTrigger.mjs +21 -0
  351. package/dist/primitives/threadListItem/ThreadListItemTrigger.mjs.map +1 -0
  352. package/dist/primitives/threadListItem/index.d.ts +3 -0
  353. package/dist/primitives/threadListItem/index.d.ts.map +1 -1
  354. package/dist/primitives/threadListItem/index.js +9 -0
  355. package/dist/primitives/threadListItem/index.js.map +1 -1
  356. package/dist/primitives/threadListItem/index.mjs +6 -0
  357. package/dist/primitives/threadListItem/index.mjs.map +1 -1
  358. package/dist/runtimes/attachment/AttachmentAdapter.d.ts +3 -7
  359. package/dist/runtimes/attachment/AttachmentAdapter.d.ts.map +1 -1
  360. package/dist/runtimes/attachment/AttachmentAdapter.js.map +1 -1
  361. package/dist/runtimes/attachment/CompositeAttachmentAdapter.d.ts +2 -6
  362. package/dist/runtimes/attachment/CompositeAttachmentAdapter.d.ts.map +1 -1
  363. package/dist/runtimes/attachment/CompositeAttachmentAdapter.js +1 -2
  364. package/dist/runtimes/attachment/CompositeAttachmentAdapter.js.map +1 -1
  365. package/dist/runtimes/attachment/CompositeAttachmentAdapter.mjs +1 -2
  366. package/dist/runtimes/attachment/CompositeAttachmentAdapter.mjs.map +1 -1
  367. package/dist/runtimes/composer/BaseComposerRuntimeCore.d.ts.map +1 -1
  368. package/dist/runtimes/composer/BaseComposerRuntimeCore.js +0 -6
  369. package/dist/runtimes/composer/BaseComposerRuntimeCore.js.map +1 -1
  370. package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs +0 -6
  371. package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs.map +1 -1
  372. package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts +6 -7
  373. package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts.map +1 -1
  374. package/dist/runtimes/core/BaseThreadRuntimeCore.js +8 -4
  375. package/dist/runtimes/core/BaseThreadRuntimeCore.js.map +1 -1
  376. package/dist/runtimes/core/BaseThreadRuntimeCore.mjs +8 -4
  377. package/dist/runtimes/core/BaseThreadRuntimeCore.mjs.map +1 -1
  378. package/dist/runtimes/core/ComposerRuntimeCore.d.ts +0 -3
  379. package/dist/runtimes/core/ComposerRuntimeCore.d.ts.map +1 -1
  380. package/dist/runtimes/core/ComposerRuntimeCore.js.map +1 -1
  381. package/dist/runtimes/core/ThreadListRuntimeCore.d.ts +7 -10
  382. package/dist/runtimes/core/ThreadListRuntimeCore.d.ts.map +1 -1
  383. package/dist/runtimes/core/ThreadListRuntimeCore.js.map +1 -1
  384. package/dist/runtimes/core/ThreadRuntimeCore.d.ts +30 -17
  385. package/dist/runtimes/core/ThreadRuntimeCore.d.ts.map +1 -1
  386. package/dist/runtimes/core/ThreadRuntimeCore.js.map +1 -1
  387. package/dist/runtimes/core/index.d.ts +1 -2
  388. package/dist/runtimes/core/index.d.ts.map +1 -1
  389. package/dist/runtimes/core/index.js +0 -12
  390. package/dist/runtimes/core/index.js.map +1 -1
  391. package/dist/runtimes/core/index.mjs +0 -5
  392. package/dist/runtimes/core/index.mjs.map +1 -1
  393. package/dist/runtimes/edge/converters/toCoreMessages.d.ts +1 -1
  394. package/dist/runtimes/edge/converters/toCoreMessages.d.ts.map +1 -1
  395. package/dist/runtimes/edge/converters/toCoreMessages.js.map +1 -1
  396. package/dist/runtimes/edge/converters/toCoreMessages.mjs.map +1 -1
  397. package/dist/runtimes/edge/createEdgeRuntimeAPI.d.ts +0 -4
  398. package/dist/runtimes/edge/createEdgeRuntimeAPI.d.ts.map +1 -1
  399. package/dist/runtimes/edge/createEdgeRuntimeAPI.js +0 -2
  400. package/dist/runtimes/edge/createEdgeRuntimeAPI.js.map +1 -1
  401. package/dist/runtimes/edge/createEdgeRuntimeAPI.mjs +0 -2
  402. package/dist/runtimes/edge/createEdgeRuntimeAPI.mjs.map +1 -1
  403. package/dist/runtimes/edge/streams/runResultStream.js +0 -2
  404. package/dist/runtimes/edge/streams/runResultStream.js.map +1 -1
  405. package/dist/runtimes/edge/streams/runResultStream.mjs +0 -2
  406. package/dist/runtimes/edge/streams/runResultStream.mjs.map +1 -1
  407. package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts +3 -16
  408. package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts.map +1 -1
  409. package/dist/runtimes/external-store/ExternalStoreAdapter.js.map +1 -1
  410. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts.map +1 -1
  411. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js +0 -3
  412. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js.map +1 -1
  413. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs +0 -3
  414. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs.map +1 -1
  415. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts +10 -12
  416. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts.map +1 -1
  417. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js +29 -7
  418. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js.map +1 -1
  419. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs +29 -7
  420. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs.map +1 -1
  421. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts +2 -12
  422. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +1 -1
  423. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js +4 -3
  424. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
  425. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs +4 -3
  426. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs.map +1 -1
  427. package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +1 -1
  428. package/dist/runtimes/external-store/ThreadMessageLike.js +2 -0
  429. package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
  430. package/dist/runtimes/external-store/ThreadMessageLike.mjs +2 -0
  431. package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +1 -1
  432. package/dist/runtimes/local/ChatModelAdapter.d.ts +0 -8
  433. package/dist/runtimes/local/ChatModelAdapter.d.ts.map +1 -1
  434. package/dist/runtimes/local/ChatModelAdapter.js.map +1 -1
  435. package/dist/runtimes/local/LocalRuntimeOptions.d.ts +1 -6
  436. package/dist/runtimes/local/LocalRuntimeOptions.d.ts.map +1 -1
  437. package/dist/runtimes/local/LocalRuntimeOptions.js +1 -2
  438. package/dist/runtimes/local/LocalRuntimeOptions.js.map +1 -1
  439. package/dist/runtimes/local/LocalRuntimeOptions.mjs +1 -2
  440. package/dist/runtimes/local/LocalRuntimeOptions.mjs.map +1 -1
  441. package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts +16 -20
  442. package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts.map +1 -1
  443. package/dist/runtimes/local/LocalThreadListRuntimeCore.js +112 -72
  444. package/dist/runtimes/local/LocalThreadListRuntimeCore.js.map +1 -1
  445. package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs +112 -72
  446. package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs.map +1 -1
  447. package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.d.ts +19 -0
  448. package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.d.ts.map +1 -0
  449. package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.js +87 -0
  450. package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.js.map +1 -0
  451. package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.mjs +62 -0
  452. package/dist/runtimes/local/LocalThreadMetadataRuntimeCore.mjs.map +1 -0
  453. package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts +1 -1
  454. package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts.map +1 -1
  455. package/dist/runtimes/local/LocalThreadRuntimeCore.js +15 -11
  456. package/dist/runtimes/local/LocalThreadRuntimeCore.js.map +1 -1
  457. package/dist/runtimes/local/LocalThreadRuntimeCore.mjs +15 -11
  458. package/dist/runtimes/local/LocalThreadRuntimeCore.mjs.map +1 -1
  459. package/dist/styles/index.css.map +1 -1
  460. package/dist/types/AssistantTypes.d.ts +1 -18
  461. package/dist/types/AssistantTypes.d.ts.map +1 -1
  462. package/dist/types/AssistantTypes.js.map +1 -1
  463. package/dist/types/AttachmentTypes.d.ts +1 -1
  464. package/dist/types/AttachmentTypes.d.ts.map +1 -1
  465. package/dist/types/AttachmentTypes.js.map +1 -1
  466. package/dist/types/ContentPartComponentTypes.d.ts +4 -28
  467. package/dist/types/ContentPartComponentTypes.d.ts.map +1 -1
  468. package/dist/types/ContentPartComponentTypes.js.map +1 -1
  469. package/dist/ui/assistant-message.d.ts +1 -10
  470. package/dist/ui/assistant-message.d.ts.map +1 -1
  471. package/dist/ui/assistant-message.js.map +1 -1
  472. package/dist/ui/assistant-message.mjs.map +1 -1
  473. package/dist/ui/composer.d.ts +1 -25
  474. package/dist/ui/composer.d.ts.map +1 -1
  475. package/dist/ui/composer.js.map +1 -1
  476. package/dist/ui/composer.mjs.map +1 -1
  477. package/dist/ui/index.d.ts +6 -14
  478. package/dist/ui/index.d.ts.map +1 -1
  479. package/dist/ui/index.js +0 -4
  480. package/dist/ui/index.js.map +1 -1
  481. package/dist/ui/index.mjs +14 -24
  482. package/dist/ui/index.mjs.map +1 -1
  483. package/dist/ui/thread-welcome.d.ts +5 -17
  484. package/dist/ui/thread-welcome.d.ts.map +1 -1
  485. package/dist/ui/thread-welcome.js.map +1 -1
  486. package/dist/ui/thread-welcome.mjs.map +1 -1
  487. package/dist/ui/thread.d.ts +1 -19
  488. package/dist/ui/thread.d.ts.map +1 -1
  489. package/dist/ui/thread.js.map +1 -1
  490. package/dist/ui/thread.mjs.map +1 -1
  491. package/dist/ui/user-message.d.ts +1 -18
  492. package/dist/ui/user-message.d.ts.map +1 -1
  493. package/dist/ui/user-message.js.map +1 -1
  494. package/dist/ui/user-message.mjs.map +1 -1
  495. package/dist/utils/smooth/SmoothContext.js +2 -2
  496. package/dist/utils/smooth/SmoothContext.js.map +1 -1
  497. package/dist/utils/smooth/SmoothContext.mjs +3 -3
  498. package/dist/utils/smooth/SmoothContext.mjs.map +1 -1
  499. package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
  500. package/dist/utils/smooth/useSmooth.js +0 -1
  501. package/dist/utils/smooth/useSmooth.js.map +1 -1
  502. package/dist/utils/smooth/useSmooth.mjs +0 -1
  503. package/dist/utils/smooth/useSmooth.mjs.map +1 -1
  504. package/package.json +7 -7
  505. package/src/api/AssistantRuntime.ts +3 -25
  506. package/src/api/AttachmentRuntime.ts +4 -16
  507. package/src/api/ComposerRuntime.ts +18 -214
  508. package/src/api/ContentPartRuntime.ts +2 -6
  509. package/src/api/MessageRuntime.ts +16 -20
  510. package/src/api/RuntimePathTypes.ts +26 -26
  511. package/src/api/ThreadListItemRuntime.ts +19 -11
  512. package/src/api/ThreadListRuntime.ts +39 -58
  513. package/src/api/ThreadRuntime.ts +52 -213
  514. package/src/api/index.ts +4 -0
  515. package/src/context/providers/AssistantRuntimeProvider.tsx +0 -1
  516. package/src/context/providers/TextContentPartProvider.tsx +0 -2
  517. package/src/context/providers/ThreadRuntimeProvider.tsx +1 -17
  518. package/src/context/react/AssistantContext.ts +0 -25
  519. package/src/context/react/ComposerContext.ts +1 -1
  520. package/src/context/react/ContentPartContext.ts +1 -1
  521. package/src/context/react/MessageContext.ts +2 -2
  522. package/src/context/react/ThreadContext.ts +5 -42
  523. package/src/context/react/index.ts +2 -125
  524. package/src/context/stores/AssistantToolUIs.ts +9 -2
  525. package/src/context/stores/MessageUtils.ts +6 -6
  526. package/src/context/stores/ThreadViewport.tsx +5 -6
  527. package/src/index.ts +0 -1
  528. package/src/internal.ts +1 -0
  529. package/src/model-config/useAssistantToolUI.tsx +0 -1
  530. package/src/primitive-hooks/contentPart/useContentPartDisplay.tsx +1 -1
  531. package/src/primitive-hooks/contentPart/useContentPartImage.tsx +1 -2
  532. package/src/primitive-hooks/contentPart/useContentPartText.tsx +1 -1
  533. package/src/primitive-hooks/index.ts +0 -5
  534. package/src/primitives/actionBar/ActionBarCopy.tsx +0 -5
  535. package/src/primitives/actionBar/ActionBarEdit.tsx +0 -5
  536. package/src/primitives/actionBar/ActionBarFeedbackNegative.tsx +0 -6
  537. package/src/primitives/actionBar/ActionBarFeedbackPositive.tsx +0 -6
  538. package/src/primitives/actionBar/ActionBarReload.tsx +0 -5
  539. package/src/primitives/actionBar/ActionBarRoot.tsx +0 -5
  540. package/src/primitives/actionBar/ActionBarSpeak.tsx +0 -5
  541. package/src/primitives/actionBar/ActionBarStopSpeaking.tsx +0 -6
  542. package/src/primitives/assistantModal/AssistantModalContent.tsx +1 -7
  543. package/src/primitives/assistantModal/AssistantModalRoot.tsx +0 -6
  544. package/src/primitives/assistantModal/AssistantModalTrigger.tsx +0 -6
  545. package/src/primitives/branchPicker/BranchPickerCount.tsx +0 -5
  546. package/src/primitives/branchPicker/BranchPickerNext.tsx +0 -6
  547. package/src/primitives/branchPicker/BranchPickerNumber.tsx +0 -5
  548. package/src/primitives/branchPicker/BranchPickerPrevious.tsx +1 -6
  549. package/src/primitives/branchPicker/BranchPickerRoot.tsx +0 -5
  550. package/src/primitives/composer/ComposerAddAttachment.tsx +2 -7
  551. package/src/primitives/composer/ComposerAttachments.tsx +0 -6
  552. package/src/primitives/composer/ComposerCancel.tsx +0 -5
  553. package/src/primitives/composer/ComposerIf.tsx +0 -5
  554. package/src/primitives/composer/ComposerInput.tsx +0 -5
  555. package/src/primitives/composer/ComposerRoot.tsx +1 -3
  556. package/src/primitives/composer/ComposerSend.tsx +2 -7
  557. package/src/primitives/contentPart/ContentPartDisplay.tsx +0 -6
  558. package/src/primitives/contentPart/ContentPartImage.tsx +0 -5
  559. package/src/primitives/contentPart/ContentPartInProgress.tsx +0 -6
  560. package/src/primitives/contentPart/ContentPartText.tsx +0 -5
  561. package/src/primitives/index.ts +0 -8
  562. package/src/primitives/message/MessageAttachments.tsx +2 -10
  563. package/src/primitives/message/MessageContent.tsx +7 -15
  564. package/src/primitives/message/MessageIf.tsx +0 -5
  565. package/src/primitives/message/MessageRoot.tsx +0 -5
  566. package/src/primitives/message/index.ts +0 -1
  567. package/src/primitives/thread/ThreadEmpty.tsx +1 -6
  568. package/src/primitives/thread/ThreadIf.tsx +0 -5
  569. package/src/primitives/thread/ThreadMessages.tsx +0 -5
  570. package/src/primitives/thread/ThreadRoot.tsx +0 -5
  571. package/src/primitives/thread/ThreadScrollToBottom.tsx +0 -6
  572. package/src/primitives/thread/ThreadSuggestion.tsx +0 -5
  573. package/src/primitives/thread/ThreadViewport.tsx +0 -5
  574. package/src/primitives/threadListItem/ThreadListItemArchive.ts +3 -2
  575. package/src/primitives/threadListItem/ThreadListItemRoot.tsx +29 -0
  576. package/src/primitives/threadListItem/ThreadListItemTitle.tsx +19 -0
  577. package/src/primitives/threadListItem/ThreadListItemTrigger.ts +25 -0
  578. package/src/primitives/threadListItem/index.ts +4 -1
  579. package/src/runtimes/attachment/AttachmentAdapter.ts +2 -12
  580. package/src/runtimes/attachment/CompositeAttachmentAdapter.ts +1 -1
  581. package/src/runtimes/composer/BaseComposerRuntimeCore.tsx +0 -8
  582. package/src/runtimes/core/BaseThreadRuntimeCore.tsx +11 -5
  583. package/src/runtimes/core/ComposerRuntimeCore.tsx +0 -3
  584. package/src/runtimes/core/ThreadListRuntimeCore.tsx +7 -11
  585. package/src/runtimes/core/ThreadRuntimeCore.tsx +33 -17
  586. package/src/runtimes/core/index.ts +1 -2
  587. package/src/runtimes/edge/converters/toCoreMessages.ts +1 -1
  588. package/src/runtimes/edge/createEdgeRuntimeAPI.ts +0 -6
  589. package/src/runtimes/edge/streams/runResultStream.ts +0 -2
  590. package/src/runtimes/external-store/ExternalStoreAdapter.tsx +3 -17
  591. package/src/runtimes/external-store/ExternalStoreRuntimeCore.tsx +0 -3
  592. package/src/runtimes/external-store/ExternalStoreThreadListRuntimeCore.tsx +39 -7
  593. package/src/runtimes/external-store/ExternalStoreThreadRuntimeCore.tsx +4 -3
  594. package/src/runtimes/external-store/ThreadMessageLike.tsx +4 -3
  595. package/src/runtimes/local/ChatModelAdapter.tsx +0 -9
  596. package/src/runtimes/local/LocalRuntimeOptions.tsx +1 -7
  597. package/src/runtimes/local/LocalThreadListRuntimeCore.tsx +140 -96
  598. package/src/runtimes/local/LocalThreadMetadataRuntimeCore.tsx +79 -0
  599. package/src/runtimes/local/LocalThreadRuntimeCore.tsx +16 -11
  600. package/src/types/AssistantTypes.ts +1 -20
  601. package/src/types/AttachmentTypes.ts +1 -2
  602. package/src/types/ContentPartComponentTypes.tsx +4 -31
  603. package/src/ui/assistant-message.tsx +0 -5
  604. package/src/ui/composer.tsx +0 -5
  605. package/src/ui/index.ts +5 -23
  606. package/src/ui/thread-welcome.tsx +6 -9
  607. package/src/ui/thread.tsx +0 -5
  608. package/src/ui/user-message.tsx +2 -12
  609. package/src/utils/smooth/SmoothContext.tsx +3 -3
  610. package/src/utils/smooth/useSmooth.tsx +0 -1
  611. package/dist/hooks/index.d.ts +0 -3
  612. package/dist/hooks/index.d.ts.map +0 -1
  613. package/dist/hooks/index.js +0 -34
  614. package/dist/hooks/index.js.map +0 -1
  615. package/dist/hooks/index.mjs +0 -8
  616. package/dist/hooks/index.mjs.map +0 -1
  617. package/dist/hooks/useAppendMessage.d.ts +0 -6
  618. package/dist/hooks/useAppendMessage.d.ts.map +0 -1
  619. package/dist/hooks/useAppendMessage.js +0 -42
  620. package/dist/hooks/useAppendMessage.js.map +0 -1
  621. package/dist/hooks/useAppendMessage.mjs +0 -17
  622. package/dist/hooks/useAppendMessage.mjs.map +0 -1
  623. package/dist/hooks/useSwitchToNewThread.d.ts +0 -5
  624. package/dist/hooks/useSwitchToNewThread.d.ts.map +0 -1
  625. package/dist/hooks/useSwitchToNewThread.js +0 -39
  626. package/dist/hooks/useSwitchToNewThread.js.map +0 -1
  627. package/dist/hooks/useSwitchToNewThread.mjs +0 -14
  628. package/dist/hooks/useSwitchToNewThread.mjs.map +0 -1
  629. package/dist/primitive-hooks/actionBar/index.d.ts +0 -34
  630. package/dist/primitive-hooks/actionBar/index.d.ts.map +0 -1
  631. package/dist/primitive-hooks/actionBar/index.js +0 -49
  632. package/dist/primitive-hooks/actionBar/index.js.map +0 -1
  633. package/dist/primitive-hooks/actionBar/index.mjs +0 -20
  634. package/dist/primitive-hooks/actionBar/index.mjs.map +0 -1
  635. package/dist/primitive-hooks/branchPicker/index.d.ts +0 -17
  636. package/dist/primitive-hooks/branchPicker/index.d.ts.map +0 -1
  637. package/dist/primitive-hooks/branchPicker/index.js +0 -40
  638. package/dist/primitive-hooks/branchPicker/index.js.map +0 -1
  639. package/dist/primitive-hooks/branchPicker/index.mjs +0 -12
  640. package/dist/primitive-hooks/branchPicker/index.mjs.map +0 -1
  641. package/dist/primitive-hooks/composer/index.d.ts +0 -17
  642. package/dist/primitive-hooks/composer/index.d.ts.map +0 -1
  643. package/dist/primitive-hooks/composer/index.js +0 -40
  644. package/dist/primitive-hooks/composer/index.js.map +0 -1
  645. package/dist/primitive-hooks/composer/index.mjs +0 -12
  646. package/dist/primitive-hooks/composer/index.mjs.map +0 -1
  647. package/dist/primitive-hooks/message/index.d.ts +0 -5
  648. package/dist/primitive-hooks/message/index.d.ts.map +0 -1
  649. package/dist/primitive-hooks/message/index.js +0 -31
  650. package/dist/primitive-hooks/message/index.js.map +0 -1
  651. package/dist/primitive-hooks/message/index.mjs +0 -6
  652. package/dist/primitive-hooks/message/index.mjs.map +0 -1
  653. package/dist/primitive-hooks/thread/index.d.ts +0 -17
  654. package/dist/primitive-hooks/thread/index.d.ts.map +0 -1
  655. package/dist/primitive-hooks/thread/index.js +0 -40
  656. package/dist/primitive-hooks/thread/index.js.map +0 -1
  657. package/dist/primitive-hooks/thread/index.mjs +0 -12
  658. package/dist/primitive-hooks/thread/index.mjs.map +0 -1
  659. package/dist/primitives/actionBar/types.d.ts +0 -9
  660. package/dist/primitives/actionBar/types.d.ts.map +0 -1
  661. package/dist/primitives/actionBar/types.js +0 -19
  662. package/dist/primitives/actionBar/types.js.map +0 -1
  663. package/dist/primitives/actionBar/types.mjs +0 -1
  664. package/dist/primitives/actionBar/types.mjs.map +0 -1
  665. package/dist/primitives/assistantModal/types.d.ts +0 -4
  666. package/dist/primitives/assistantModal/types.d.ts.map +0 -1
  667. package/dist/primitives/assistantModal/types.js +0 -19
  668. package/dist/primitives/assistantModal/types.js.map +0 -1
  669. package/dist/primitives/assistantModal/types.mjs +0 -1
  670. package/dist/primitives/assistantModal/types.mjs.map +0 -1
  671. package/dist/primitives/attachment/types.d.ts +0 -1
  672. package/dist/primitives/attachment/types.d.ts.map +0 -1
  673. package/dist/primitives/attachment/types.js +0 -2
  674. package/dist/primitives/attachment/types.js.map +0 -1
  675. package/dist/primitives/attachment/types.mjs +0 -1
  676. package/dist/primitives/attachment/types.mjs.map +0 -1
  677. package/dist/primitives/branchPicker/types.d.ts +0 -6
  678. package/dist/primitives/branchPicker/types.d.ts.map +0 -1
  679. package/dist/primitives/branchPicker/types.js +0 -19
  680. package/dist/primitives/branchPicker/types.js.map +0 -1
  681. package/dist/primitives/branchPicker/types.mjs +0 -1
  682. package/dist/primitives/branchPicker/types.mjs.map +0 -1
  683. package/dist/primitives/composer/types.d.ts +0 -6
  684. package/dist/primitives/composer/types.d.ts.map +0 -1
  685. package/dist/primitives/composer/types.js +0 -19
  686. package/dist/primitives/composer/types.js.map +0 -1
  687. package/dist/primitives/composer/types.mjs +0 -1
  688. package/dist/primitives/composer/types.mjs.map +0 -1
  689. package/dist/primitives/contentPart/types.d.ts +0 -5
  690. package/dist/primitives/contentPart/types.d.ts.map +0 -1
  691. package/dist/primitives/contentPart/types.js +0 -19
  692. package/dist/primitives/contentPart/types.js.map +0 -1
  693. package/dist/primitives/contentPart/types.mjs +0 -1
  694. package/dist/primitives/contentPart/types.mjs.map +0 -1
  695. package/dist/primitives/message/MessageInProgress.d.ts +0 -13
  696. package/dist/primitives/message/MessageInProgress.d.ts.map +0 -1
  697. package/dist/primitives/message/MessageInProgress.js.map +0 -1
  698. package/dist/primitives/message/MessageInProgress.mjs +0 -11
  699. package/dist/primitives/message/MessageInProgress.mjs.map +0 -1
  700. package/dist/primitives/message/types.d.ts +0 -5
  701. package/dist/primitives/message/types.d.ts.map +0 -1
  702. package/dist/primitives/message/types.js +0 -19
  703. package/dist/primitives/message/types.js.map +0 -1
  704. package/dist/primitives/message/types.mjs +0 -1
  705. package/dist/primitives/message/types.mjs.map +0 -1
  706. package/dist/primitives/thread/types.d.ts +0 -8
  707. package/dist/primitives/thread/types.d.ts.map +0 -1
  708. package/dist/primitives/thread/types.js +0 -19
  709. package/dist/primitives/thread/types.js.map +0 -1
  710. package/dist/primitives/thread/types.mjs +0 -1
  711. package/dist/primitives/thread/types.mjs.map +0 -1
  712. package/dist/runtimes/core/subscribeToMainThread.d.ts +0 -6
  713. package/dist/runtimes/core/subscribeToMainThread.d.ts.map +0 -1
  714. package/dist/runtimes/core/subscribeToMainThread.js.map +0 -1
  715. package/dist/runtimes/core/subscribeToMainThread.mjs +0 -23
  716. package/dist/runtimes/core/subscribeToMainThread.mjs.map +0 -1
  717. package/src/hooks/index.ts +0 -2
  718. package/src/hooks/useAppendMessage.tsx +0 -19
  719. package/src/hooks/useSwitchToNewThread.tsx +0 -14
  720. package/src/primitive-hooks/actionBar/index.ts +0 -39
  721. package/src/primitive-hooks/branchPicker/index.ts +0 -18
  722. package/src/primitive-hooks/composer/index.ts +0 -17
  723. package/src/primitive-hooks/message/index.ts +0 -4
  724. package/src/primitive-hooks/thread/index.ts +0 -16
  725. package/src/primitives/actionBar/types.ts +0 -8
  726. package/src/primitives/assistantModal/types.ts +0 -3
  727. package/src/primitives/attachment/types.ts +0 -0
  728. package/src/primitives/branchPicker/types.ts +0 -5
  729. package/src/primitives/composer/types.ts +0 -5
  730. package/src/primitives/contentPart/types.ts +0 -4
  731. package/src/primitives/message/MessageInProgress.tsx +0 -22
  732. package/src/primitives/message/types.ts +0 -4
  733. package/src/primitives/thread/types.ts +0 -7
  734. package/src/runtimes/core/subscribeToMainThread.ts +0 -30
@@ -26,12 +26,26 @@ module.exports = __toCommonJS(ThreadListRuntime_exports);
26
26
  var import_LazyMemoizeSubject = require("./subscribable/LazyMemoizeSubject.cjs");
27
27
  var import_ThreadListItemRuntime = require("./ThreadListItemRuntime.cjs");
28
28
  var import_SKIP_UPDATE = require("./subscribable/SKIP_UPDATE.cjs");
29
+ var import_ShallowMemoizeSubject = require("./subscribable/ShallowMemoizeSubject.cjs");
29
30
  var getThreadListState = (threadList) => {
30
31
  return {
32
+ mainThreadId: threadList.mainThread.metadata.threadId,
33
+ newThread: threadList.newThread,
31
34
  threads: threadList.threads,
32
35
  archivedThreads: threadList.archivedThreads
33
36
  };
34
37
  };
38
+ var getThreadListItemState = (threadList, threadId) => {
39
+ if (threadId === void 0) return import_SKIP_UPDATE.SKIP_UPDATE;
40
+ const threadData = threadList.getThreadMetadataById(threadId);
41
+ if (!threadData) return import_SKIP_UPDATE.SKIP_UPDATE;
42
+ return {
43
+ threadId: threadData.threadId,
44
+ title: threadData.title,
45
+ state: threadData.state,
46
+ isMain: threadList.mainThread.metadata.threadId === threadId
47
+ };
48
+ };
35
49
  var THREAD_MANAGER_PATH = {
36
50
  ref: "ThreadList"
37
51
  };
@@ -52,33 +66,18 @@ var ThreadListRuntimeImpl = class {
52
66
  getState() {
53
67
  return this._getState();
54
68
  }
55
- rename(threadId, newTitle) {
56
- return this._core.rename(threadId, newTitle);
57
- }
58
- archive(threadId) {
59
- return this._core.archive(threadId);
60
- }
61
- unarchive(threadId) {
62
- return this._core.unarchive(threadId);
63
- }
64
- delete(threadId) {
65
- return this._core.delete(threadId);
66
- }
67
69
  subscribe(callback) {
68
70
  return this._core.subscribe(callback);
69
71
  }
70
72
  getThreadListItemByIndex(idx) {
71
73
  return new import_ThreadListItemRuntime.ThreadListItemRuntimeImpl(
72
- new import_LazyMemoizeSubject.LazyMemoizeSubject({
74
+ new import_ShallowMemoizeSubject.ShallowMemoizeSubject({
73
75
  path: {
74
76
  ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,
75
77
  threadSelector: { type: "index", index: idx }
76
78
  },
77
79
  getState: () => {
78
- const threads = this._core.threads;
79
- const thread = threads[idx];
80
- if (!thread) return import_SKIP_UPDATE.SKIP_UPDATE;
81
- return thread;
80
+ return getThreadListItemState(this._core, this._core.threads[idx]);
82
81
  },
83
82
  subscribe: (callback) => this._core.subscribe(callback)
84
83
  }),
@@ -87,16 +86,16 @@ var ThreadListRuntimeImpl = class {
87
86
  }
88
87
  getThreadListArchivedItemByIndex(idx) {
89
88
  return new import_ThreadListItemRuntime.ThreadListItemRuntimeImpl(
90
- new import_LazyMemoizeSubject.LazyMemoizeSubject({
89
+ new import_ShallowMemoizeSubject.ShallowMemoizeSubject({
91
90
  path: {
92
91
  ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,
93
92
  threadSelector: { type: "archiveIndex", index: idx }
94
93
  },
95
94
  getState: () => {
96
- const threads = this._core.archivedThreads;
97
- const thread = threads[idx];
98
- if (!thread) return import_SKIP_UPDATE.SKIP_UPDATE;
99
- return thread;
95
+ return getThreadListItemState(
96
+ this._core,
97
+ this._core.archivedThreads[idx]
98
+ );
100
99
  },
101
100
  subscribe: (callback) => this._core.subscribe(callback)
102
101
  }),
@@ -105,15 +104,13 @@ var ThreadListRuntimeImpl = class {
105
104
  }
106
105
  getThreadListItemById(threadId) {
107
106
  return new import_ThreadListItemRuntime.ThreadListItemRuntimeImpl(
108
- new import_LazyMemoizeSubject.LazyMemoizeSubject({
107
+ new import_ShallowMemoizeSubject.ShallowMemoizeSubject({
109
108
  path: {
110
109
  ref: this.path.ref + `${this.path.ref}.threadItems[threadId=${threadId}]`,
111
110
  threadSelector: { type: "threadId", threadId }
112
111
  },
113
112
  getState: () => {
114
- const threadItem = this._core.getThreadMetadataById(threadId);
115
- if (!threadItem) return import_SKIP_UPDATE.SKIP_UPDATE;
116
- return threadItem;
113
+ return getThreadListItemState(this._core, threadId);
117
114
  },
118
115
  subscribe: (callback) => this._core.subscribe(callback)
119
116
  }),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport {\n ThreadListMetadata,\n ThreadListRuntimeCore,\n} from \"../runtimes/core/ThreadListRuntimeCore\";\nimport { Unsubscribe } from \"../types\";\nimport { ThreadListRuntimePath } from \"./RuntimePathTypes\";\nimport {\n ThreadListItemRuntime,\n ThreadListItemRuntimeImpl,\n} from \"./ThreadListItemRuntime\";\nimport { SKIP_UPDATE } from \"./subscribable/SKIP_UPDATE\";\n\nexport type ThreadListState = Readonly<{\n threads: readonly ThreadListMetadata[];\n archivedThreads: readonly ThreadListMetadata[];\n}>;\n\nexport type ThreadListRuntime = Readonly<{\n path: ThreadListRuntimePath;\n getState(): ThreadListState;\n\n /**\n * @deprecated Use `getThreadListItemById(idx).rename(newTitle)` instead. This will be removed in 0.6.0.\n */\n rename(threadId: string, newTitle: string): Promise<void>;\n /**\n * @deprecated Use `getThreadListItemById(idx).archive()` instead. This will be removed in 0.6.0.\n */\n archive(threadId: string): Promise<void>;\n /**\n * @deprecated Use `getThreadListItemById(idx).unarchive()` instead. This will be removed in 0.6.0.\n */\n unarchive(threadId: string): Promise<void>;\n /**\n * @deprecated Use `getThreadListItemById(idx).delete()` instead. This will be removed in 0.6.0.\n */\n delete(threadId: string): Promise<void>;\n\n subscribe(callback: () => void): Unsubscribe;\n\n getThreadListItemById(threadId: string): ThreadListItemRuntime;\n getThreadListItemByIndex(idx: number): ThreadListItemRuntime;\n getThreadListArchivedItemByIndex(idx: number): ThreadListItemRuntime;\n}>;\n\nconst getThreadListState = (\n threadList: ThreadListRuntimeCore,\n): ThreadListState => {\n return {\n threads: threadList.threads,\n archivedThreads: threadList.archivedThreads,\n };\n};\n\nconst THREAD_MANAGER_PATH = {\n ref: \"ThreadList\",\n};\n\nexport type ThreadListRuntimeCoreBinding = ThreadListRuntimeCore;\n\nexport class ThreadListRuntimeImpl implements ThreadListRuntime {\n public get path() {\n return THREAD_MANAGER_PATH;\n }\n\n private _getState;\n constructor(private _core: ThreadListRuntimeCoreBinding) {\n const stateBinding = new LazyMemoizeSubject({\n path: THREAD_MANAGER_PATH,\n getState: () => getThreadListState(_core),\n subscribe: (callback) => _core.subscribe(callback),\n });\n\n this._getState = stateBinding.getState.bind(stateBinding);\n }\n\n public getState(): ThreadListState {\n return this._getState();\n }\n\n public rename(threadId: string, newTitle: string): Promise<void> {\n return this._core.rename(threadId, newTitle);\n }\n\n public archive(threadId: string): Promise<void> {\n return this._core.archive(threadId);\n }\n\n public unarchive(threadId: string): Promise<void> {\n return this._core.unarchive(threadId);\n }\n\n public delete(threadId: string): Promise<void> {\n return this._core.delete(threadId);\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n return this._core.subscribe(callback);\n }\n\n public getThreadListItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new LazyMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,\n threadSelector: { type: \"index\", index: idx },\n },\n getState: () => {\n const threads = this._core.threads;\n const thread = threads[idx];\n if (!thread) return SKIP_UPDATE;\n return thread;\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListArchivedItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new LazyMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,\n threadSelector: { type: \"archiveIndex\", index: idx },\n },\n getState: () => {\n const threads = this._core.archivedThreads;\n const thread = threads[idx];\n if (!thread) return SKIP_UPDATE;\n return thread;\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListItemById(threadId: string) {\n return new ThreadListItemRuntimeImpl(\n new LazyMemoizeSubject({\n path: {\n ref:\n this.path.ref +\n `${this.path.ref}.threadItems[threadId=${threadId}]`,\n threadSelector: { type: \"threadId\", threadId },\n },\n getState: () => {\n const threadItem = this._core.getThreadMetadataById(threadId);\n if (!threadItem) return SKIP_UPDATE;\n return threadItem;\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;AAOnC,mCAGO;AACP,yBAA4B;AAmC5B,IAAM,qBAAqB,CACzB,eACoB;AACpB,SAAO;AAAA,IACL,SAAS,WAAW;AAAA,IACpB,iBAAiB,WAAW;AAAA,EAC9B;AACF;AAEA,IAAM,sBAAsB;AAAA,EAC1B,KAAK;AACP;AAIO,IAAM,wBAAN,MAAyD;AAAA,EAM9D,YAAoB,OAAqC;AAArC;AAClB,UAAM,eAAe,IAAI,6CAAmB;AAAA,MAC1C,MAAM;AAAA,MACN,UAAU,MAAM,mBAAmB,KAAK;AAAA,MACxC,WAAW,CAAC,aAAa,MAAM,UAAU,QAAQ;AAAA,IACnD,CAAC;AAED,SAAK,YAAY,aAAa,SAAS,KAAK,YAAY;AAAA,EAC1D;AAAA,EAbA,IAAW,OAAO;AAChB,WAAO;AAAA,EACT;AAAA,EAEQ;AAAA,EAWD,WAA4B;AACjC,WAAO,KAAK,UAAU;AAAA,EACxB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AO;AAAA,QACT;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EAEO,sBAAsB,UAAkB;AAC7C,WAAO,IAAI;AAAA,MACT,IAAI,6CAAmB;AAAA,QACrB,MAAM;AAAA,UACJ,KACE,KAAK,KAAK,MACV,GAAG,KAAK,KAAK,GAAG,yBAAyB,QAAQ;AAAA,UACnD,gBAAgB,EAAE,MAAM,YAAY,SAAS;AAAA,QAC/C;AAAA,QACA,UAAU,MAAM;AACd,gBAAM,aAAa,KAAK,MAAM,sBAAsB,QAAQ;AAC5D,cAAI,CAAC,WAAY,QAAO;AACxB,iBAAO;AAAA,QACT;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport { ThreadListRuntimeCore } from \"../runtimes/core/ThreadListRuntimeCore\";\nimport { Unsubscribe } from \"../types\";\nimport { ThreadListRuntimePath } from \"./RuntimePathTypes\";\nimport {\n ThreadListItemRuntime,\n ThreadListItemRuntimeImpl,\n ThreadListItemState,\n} from \"./ThreadListItemRuntime\";\nimport { SKIP_UPDATE } from \"./subscribable/SKIP_UPDATE\";\nimport { ShallowMemoizeSubject } from \"./subscribable/ShallowMemoizeSubject\";\n\nexport type ThreadListState = {\n readonly mainThreadId: string;\n readonly newThread: string | undefined;\n readonly threads: readonly string[];\n readonly archivedThreads: readonly string[];\n};\n\nexport type ThreadListRuntime = {\n readonly path: ThreadListRuntimePath;\n getState(): ThreadListState;\n\n subscribe(callback: () => void): Unsubscribe;\n\n getThreadListItemById(threadId: string): ThreadListItemRuntime;\n getThreadListItemByIndex(idx: number): ThreadListItemRuntime;\n getThreadListArchivedItemByIndex(idx: number): ThreadListItemRuntime;\n};\n\nconst getThreadListState = (\n threadList: ThreadListRuntimeCore,\n): ThreadListState => {\n return {\n mainThreadId: threadList.mainThread.metadata.threadId,\n newThread: threadList.newThread,\n threads: threadList.threads,\n archivedThreads: threadList.archivedThreads,\n };\n};\n\nconst getThreadListItemState = (\n threadList: ThreadListRuntimeCore,\n threadId: string | undefined,\n): ThreadListItemState | SKIP_UPDATE => {\n if (threadId === undefined) return SKIP_UPDATE;\n\n const threadData = threadList.getThreadMetadataById(threadId);\n if (!threadData) return SKIP_UPDATE;\n return {\n threadId: threadData.threadId,\n title: threadData.title,\n state: threadData.state,\n isMain: threadList.mainThread.metadata.threadId === threadId,\n };\n};\n\nconst THREAD_MANAGER_PATH = {\n ref: \"ThreadList\",\n};\n\nexport type ThreadListRuntimeCoreBinding = ThreadListRuntimeCore;\n\nexport class ThreadListRuntimeImpl implements ThreadListRuntime {\n public get path() {\n return THREAD_MANAGER_PATH;\n }\n\n private _getState;\n constructor(private _core: ThreadListRuntimeCoreBinding) {\n const stateBinding = new LazyMemoizeSubject({\n path: THREAD_MANAGER_PATH,\n getState: () => getThreadListState(_core),\n subscribe: (callback) => _core.subscribe(callback),\n });\n\n this._getState = stateBinding.getState.bind(stateBinding);\n }\n\n public getState(): ThreadListState {\n return this._getState();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n return this._core.subscribe(callback);\n }\n\n public getThreadListItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,\n threadSelector: { type: \"index\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(this._core, this._core.threads[idx]);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListArchivedItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,\n threadSelector: { type: \"archiveIndex\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(\n this._core,\n this._core.archivedThreads[idx],\n );\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListItemById(threadId: string) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref:\n this.path.ref +\n `${this.path.ref}.threadItems[threadId=${threadId}]`,\n threadSelector: { type: \"threadId\", threadId },\n },\n getState: () => {\n return getThreadListItemState(this._core, threadId);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;AAInC,mCAIO;AACP,yBAA4B;AAC5B,mCAAsC;AAoBtC,IAAM,qBAAqB,CACzB,eACoB;AACpB,SAAO;AAAA,IACL,cAAc,WAAW,WAAW,SAAS;AAAA,IAC7C,WAAW,WAAW;AAAA,IACtB,SAAS,WAAW;AAAA,IACpB,iBAAiB,WAAW;AAAA,EAC9B;AACF;AAEA,IAAM,yBAAyB,CAC7B,YACA,aACsC;AACtC,MAAI,aAAa,OAAW,QAAO;AAEnC,QAAM,aAAa,WAAW,sBAAsB,QAAQ;AAC5D,MAAI,CAAC,WAAY,QAAO;AACxB,SAAO;AAAA,IACL,UAAU,WAAW;AAAA,IACrB,OAAO,WAAW;AAAA,IAClB,OAAO,WAAW;AAAA,IAClB,QAAQ,WAAW,WAAW,SAAS,aAAa;AAAA,EACtD;AACF;AAEA,IAAM,sBAAsB;AAAA,EAC1B,KAAK;AACP;AAIO,IAAM,wBAAN,MAAyD;AAAA,EAM9D,YAAoB,OAAqC;AAArC;AAClB,UAAM,eAAe,IAAI,6CAAmB;AAAA,MAC1C,MAAM;AAAA,MACN,UAAU,MAAM,mBAAmB,KAAK;AAAA,MACxC,WAAW,CAAC,aAAa,MAAM,UAAU,Q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,QACxB,MAAM;AAAA,UACJ,KACE,KAAK,KAAK,MACV,GAAG,KAAK,KAAK,GAAG,yBAAyB,QAAQ;AAAA,UACnD,gBAAgB,EAAE,MAAM,YAAY,SAAS;AAAA,QAC/C;AAAA,QACA,UAAU,MAAM;AACd,iBAAO,uBAAuB,KAAK,OAAO,QAAQ;AAAA,QACpD;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}
@@ -4,12 +4,26 @@ import {
4
4
  ThreadListItemRuntimeImpl
5
5
  } from "./ThreadListItemRuntime.mjs";
6
6
  import { SKIP_UPDATE } from "./subscribable/SKIP_UPDATE.mjs";
7
+ import { ShallowMemoizeSubject } from "./subscribable/ShallowMemoizeSubject.mjs";
7
8
  var getThreadListState = (threadList) => {
8
9
  return {
10
+ mainThreadId: threadList.mainThread.metadata.threadId,
11
+ newThread: threadList.newThread,
9
12
  threads: threadList.threads,
10
13
  archivedThreads: threadList.archivedThreads
11
14
  };
12
15
  };
16
+ var getThreadListItemState = (threadList, threadId) => {
17
+ if (threadId === void 0) return SKIP_UPDATE;
18
+ const threadData = threadList.getThreadMetadataById(threadId);
19
+ if (!threadData) return SKIP_UPDATE;
20
+ return {
21
+ threadId: threadData.threadId,
22
+ title: threadData.title,
23
+ state: threadData.state,
24
+ isMain: threadList.mainThread.metadata.threadId === threadId
25
+ };
26
+ };
13
27
  var THREAD_MANAGER_PATH = {
14
28
  ref: "ThreadList"
15
29
  };
@@ -30,33 +44,18 @@ var ThreadListRuntimeImpl = class {
30
44
  getState() {
31
45
  return this._getState();
32
46
  }
33
- rename(threadId, newTitle) {
34
- return this._core.rename(threadId, newTitle);
35
- }
36
- archive(threadId) {
37
- return this._core.archive(threadId);
38
- }
39
- unarchive(threadId) {
40
- return this._core.unarchive(threadId);
41
- }
42
- delete(threadId) {
43
- return this._core.delete(threadId);
44
- }
45
47
  subscribe(callback) {
46
48
  return this._core.subscribe(callback);
47
49
  }
48
50
  getThreadListItemByIndex(idx) {
49
51
  return new ThreadListItemRuntimeImpl(
50
- new LazyMemoizeSubject({
52
+ new ShallowMemoizeSubject({
51
53
  path: {
52
54
  ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,
53
55
  threadSelector: { type: "index", index: idx }
54
56
  },
55
57
  getState: () => {
56
- const threads = this._core.threads;
57
- const thread = threads[idx];
58
- if (!thread) return SKIP_UPDATE;
59
- return thread;
58
+ return getThreadListItemState(this._core, this._core.threads[idx]);
60
59
  },
61
60
  subscribe: (callback) => this._core.subscribe(callback)
62
61
  }),
@@ -65,16 +64,16 @@ var ThreadListRuntimeImpl = class {
65
64
  }
66
65
  getThreadListArchivedItemByIndex(idx) {
67
66
  return new ThreadListItemRuntimeImpl(
68
- new LazyMemoizeSubject({
67
+ new ShallowMemoizeSubject({
69
68
  path: {
70
69
  ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,
71
70
  threadSelector: { type: "archiveIndex", index: idx }
72
71
  },
73
72
  getState: () => {
74
- const threads = this._core.archivedThreads;
75
- const thread = threads[idx];
76
- if (!thread) return SKIP_UPDATE;
77
- return thread;
73
+ return getThreadListItemState(
74
+ this._core,
75
+ this._core.archivedThreads[idx]
76
+ );
78
77
  },
79
78
  subscribe: (callback) => this._core.subscribe(callback)
80
79
  }),
@@ -83,15 +82,13 @@ var ThreadListRuntimeImpl = class {
83
82
  }
84
83
  getThreadListItemById(threadId) {
85
84
  return new ThreadListItemRuntimeImpl(
86
- new LazyMemoizeSubject({
85
+ new ShallowMemoizeSubject({
87
86
  path: {
88
87
  ref: this.path.ref + `${this.path.ref}.threadItems[threadId=${threadId}]`,
89
88
  threadSelector: { type: "threadId", threadId }
90
89
  },
91
90
  getState: () => {
92
- const threadItem = this._core.getThreadMetadataById(threadId);
93
- if (!threadItem) return SKIP_UPDATE;
94
- return threadItem;
91
+ return getThreadListItemState(this._core, threadId);
95
92
  },
96
93
  subscribe: (callback) => this._core.subscribe(callback)
97
94
  }),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport {\n ThreadListMetadata,\n ThreadListRuntimeCore,\n} from \"../runtimes/core/ThreadListRuntimeCore\";\nimport { Unsubscribe } from \"../types\";\nimport { ThreadListRuntimePath } from \"./RuntimePathTypes\";\nimport {\n ThreadListItemRuntime,\n ThreadListItemRuntimeImpl,\n} from \"./ThreadListItemRuntime\";\nimport { SKIP_UPDATE } from \"./subscribable/SKIP_UPDATE\";\n\nexport type ThreadListState = Readonly<{\n threads: readonly ThreadListMetadata[];\n archivedThreads: readonly ThreadListMetadata[];\n}>;\n\nexport type ThreadListRuntime = Readonly<{\n path: ThreadListRuntimePath;\n getState(): ThreadListState;\n\n /**\n * @deprecated Use `getThreadListItemById(idx).rename(newTitle)` instead. This will be removed in 0.6.0.\n */\n rename(threadId: string, newTitle: string): Promise<void>;\n /**\n * @deprecated Use `getThreadListItemById(idx).archive()` instead. This will be removed in 0.6.0.\n */\n archive(threadId: string): Promise<void>;\n /**\n * @deprecated Use `getThreadListItemById(idx).unarchive()` instead. This will be removed in 0.6.0.\n */\n unarchive(threadId: string): Promise<void>;\n /**\n * @deprecated Use `getThreadListItemById(idx).delete()` instead. This will be removed in 0.6.0.\n */\n delete(threadId: string): Promise<void>;\n\n subscribe(callback: () => void): Unsubscribe;\n\n getThreadListItemById(threadId: string): ThreadListItemRuntime;\n getThreadListItemByIndex(idx: number): ThreadListItemRuntime;\n getThreadListArchivedItemByIndex(idx: number): ThreadListItemRuntime;\n}>;\n\nconst getThreadListState = (\n threadList: ThreadListRuntimeCore,\n): ThreadListState => {\n return {\n threads: threadList.threads,\n archivedThreads: threadList.archivedThreads,\n };\n};\n\nconst THREAD_MANAGER_PATH = {\n ref: \"ThreadList\",\n};\n\nexport type ThreadListRuntimeCoreBinding = ThreadListRuntimeCore;\n\nexport class ThreadListRuntimeImpl implements ThreadListRuntime {\n public get path() {\n return THREAD_MANAGER_PATH;\n }\n\n private _getState;\n constructor(private _core: ThreadListRuntimeCoreBinding) {\n const stateBinding = new LazyMemoizeSubject({\n path: THREAD_MANAGER_PATH,\n getState: () => getThreadListState(_core),\n subscribe: (callback) => _core.subscribe(callback),\n });\n\n this._getState = stateBinding.getState.bind(stateBinding);\n }\n\n public getState(): ThreadListState {\n return this._getState();\n }\n\n public rename(threadId: string, newTitle: string): Promise<void> {\n return this._core.rename(threadId, newTitle);\n }\n\n public archive(threadId: string): Promise<void> {\n return this._core.archive(threadId);\n }\n\n public unarchive(threadId: string): Promise<void> {\n return this._core.unarchive(threadId);\n }\n\n public delete(threadId: string): Promise<void> {\n return this._core.delete(threadId);\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n return this._core.subscribe(callback);\n }\n\n public getThreadListItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new LazyMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,\n threadSelector: { type: \"index\", index: idx },\n },\n getState: () => {\n const threads = this._core.threads;\n const thread = threads[idx];\n if (!thread) return SKIP_UPDATE;\n return thread;\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListArchivedItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new LazyMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,\n threadSelector: { type: \"archiveIndex\", index: idx },\n },\n getState: () => {\n const threads = this._core.archivedThreads;\n const thread = threads[idx];\n if (!thread) return SKIP_UPDATE;\n return thread;\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListItemById(threadId: string) {\n return new ThreadListItemRuntimeImpl(\n new LazyMemoizeSubject({\n path: {\n ref:\n this.path.ref +\n `${this.path.ref}.threadItems[threadId=${threadId}]`,\n threadSelector: { type: \"threadId\", threadId },\n },\n getState: () => {\n const threadItem = this._core.getThreadMetadataById(threadId);\n if (!threadItem) return SKIP_UPDATE;\n return threadItem;\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n}\n"],"mappings":";AAAA,SAAS,0BAA0B;AAOnC;AAAA,EAEE;AAAA,OACK;AACP,SAAS,mBAAmB;AAmC5B,IAAM,qBAAqB,CACzB,eACoB;AACpB,SAAO;AAAA,IACL,SAAS,WAAW;AAAA,IACpB,iBAAiB,WAAW;AAAA,EAC9B;AACF;AAEA,IAAM,sBAAsB;AAAA,EAC1B,KAAK;AACP;AAIO,IAAM,wBAAN,MAAyD;AAAA,EAM9D,YAAoB,OAAqC;AAArC;AAClB,UAAM,eAAe,IAAI,mBAAmB;AAAA,MAC1C,MAAM;AAAA,MACN,UAAU,MAAM,mBAAmB,KAAK;AAAA,MACxC,WAAW,CAAC,aAAa,MAAM,UAAU,QAAQ;AAAA,IACnD,CAAC;AAED,SAAK,YAAY,aAAa,SAAS,KAAK,YAAY;AAAA,EAC1D;AAAA,EAbA,IAAW,OAAO;AAChB,WAAO;AAAA,EACT;AAAA,EAEQ;AAAA,EAWD,WAA4B;AACjC,WAAO,KAAK,UAAU;AAAA,EACxB;AAAA,EAEO,OAAO,UAAkB,UAAiC;AAC/D,WAAO,KAAK,MAAM,OAAO,UAAU,QAAQ;AAAA,EAC7C;AAAA,EAEO,QAAQ,UAAiC;AAC9C,WAAO,KAAK,MAAM,QAAQ,QAAQ;AAAA,EACpC;AAAA,EAEO,UAAU,UAAiC;AAChD,WAAO,KAAK,MAAM,UAAU,QAAQ;AAAA,EACtC;AAAA,EAEO,OAAO,UAAiC;AAC7C,WAAO,KAAK,MAAM,OAAO,QAAQ;AAAA,EACnC;AAAA,EAEO,UAAU,UAAmC;AAClD,WAAO,KAAK,MAAM,UAAU,QAAQ;AAAA,EACtC;AAAA,EAEO,yBAAyB,KAAa;AAC3C,WAAO,IAAI;AAAA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;AACxB,iBAAO;AAAA,QACT;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/api/ThreadListRuntime.ts"],"sourcesContent":["import { LazyMemoizeSubject } from \"./subscribable/LazyMemoizeSubject\";\nimport { ThreadListRuntimeCore } from \"../runtimes/core/ThreadListRuntimeCore\";\nimport { Unsubscribe } from \"../types\";\nimport { ThreadListRuntimePath } from \"./RuntimePathTypes\";\nimport {\n ThreadListItemRuntime,\n ThreadListItemRuntimeImpl,\n ThreadListItemState,\n} from \"./ThreadListItemRuntime\";\nimport { SKIP_UPDATE } from \"./subscribable/SKIP_UPDATE\";\nimport { ShallowMemoizeSubject } from \"./subscribable/ShallowMemoizeSubject\";\n\nexport type ThreadListState = {\n readonly mainThreadId: string;\n readonly newThread: string | undefined;\n readonly threads: readonly string[];\n readonly archivedThreads: readonly string[];\n};\n\nexport type ThreadListRuntime = {\n readonly path: ThreadListRuntimePath;\n getState(): ThreadListState;\n\n subscribe(callback: () => void): Unsubscribe;\n\n getThreadListItemById(threadId: string): ThreadListItemRuntime;\n getThreadListItemByIndex(idx: number): ThreadListItemRuntime;\n getThreadListArchivedItemByIndex(idx: number): ThreadListItemRuntime;\n};\n\nconst getThreadListState = (\n threadList: ThreadListRuntimeCore,\n): ThreadListState => {\n return {\n mainThreadId: threadList.mainThread.metadata.threadId,\n newThread: threadList.newThread,\n threads: threadList.threads,\n archivedThreads: threadList.archivedThreads,\n };\n};\n\nconst getThreadListItemState = (\n threadList: ThreadListRuntimeCore,\n threadId: string | undefined,\n): ThreadListItemState | SKIP_UPDATE => {\n if (threadId === undefined) return SKIP_UPDATE;\n\n const threadData = threadList.getThreadMetadataById(threadId);\n if (!threadData) return SKIP_UPDATE;\n return {\n threadId: threadData.threadId,\n title: threadData.title,\n state: threadData.state,\n isMain: threadList.mainThread.metadata.threadId === threadId,\n };\n};\n\nconst THREAD_MANAGER_PATH = {\n ref: \"ThreadList\",\n};\n\nexport type ThreadListRuntimeCoreBinding = ThreadListRuntimeCore;\n\nexport class ThreadListRuntimeImpl implements ThreadListRuntime {\n public get path() {\n return THREAD_MANAGER_PATH;\n }\n\n private _getState;\n constructor(private _core: ThreadListRuntimeCoreBinding) {\n const stateBinding = new LazyMemoizeSubject({\n path: THREAD_MANAGER_PATH,\n getState: () => getThreadListState(_core),\n subscribe: (callback) => _core.subscribe(callback),\n });\n\n this._getState = stateBinding.getState.bind(stateBinding);\n }\n\n public getState(): ThreadListState {\n return this._getState();\n }\n\n public subscribe(callback: () => void): Unsubscribe {\n return this._core.subscribe(callback);\n }\n\n public getThreadListItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.threadItems[${idx}]`,\n threadSelector: { type: \"index\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(this._core, this._core.threads[idx]);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListArchivedItemByIndex(idx: number) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref: this.path.ref + `${this.path.ref}.archivedThreadItems[${idx}]`,\n threadSelector: { type: \"archiveIndex\", index: idx },\n },\n getState: () => {\n return getThreadListItemState(\n this._core,\n this._core.archivedThreads[idx],\n );\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n\n public getThreadListItemById(threadId: string) {\n return new ThreadListItemRuntimeImpl(\n new ShallowMemoizeSubject({\n path: {\n ref:\n this.path.ref +\n `${this.path.ref}.threadItems[threadId=${threadId}]`,\n threadSelector: { type: \"threadId\", threadId },\n },\n getState: () => {\n return getThreadListItemState(this._core, threadId);\n },\n subscribe: (callback) => this._core.subscribe(callback),\n }),\n this._core,\n );\n }\n}\n"],"mappings":";AAAA,SAAS,0BAA0B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,SAAS,OAAO,IAAI;AAAA,QAC9C;AAAA,QACA,UAAU,MAAM;AACd,iBAAO,uBAAuB,KAAK,OAAO,KAAK,MAAM,QAAQ,GAAG,CAAC;AAAA,QACnE;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EAEO,iCAAiC,KAAa;AACnD,WAAO,IAAI;AAAA,MACT,IAAI,sBAAsB;AAAA,QACxB,MAAM;AAAA,UACJ,KAAK,KAAK,KAAK,MAAM,GAAG,KAAK,KAAK,GAAG,wBAAwB,GAAG;AAAA,UAChE,gBAAgB,EAAE,MAAM,gBAAgB,OAAO,IAAI;AAAA,QACrD;AAAA,QACA,UAAU,MAAM;AACd,iBAAO;AAAA,YACL,KAAK;AAAA,YACL,KAAK,MAAM,gBAAgB,GAAG;AAAA,UAChC;AAAA,QACF;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EAEO,sBAAsB,UAAkB;AAC7C,WAAO,IAAI;AAAA,MACT,IAAI,sBAAsB;AAAA,QACxB,MAAM;AAAA,UACJ,KACE,KAAK,KAAK,MACV,GAAG,KAAK,KAAK,GAAG,yBAAyB,QAAQ;AAAA,UACnD,gBAAgB,EAAE,MAAM,YAAY,SAAS;AAAA,QAC/C;AAAA,QACA,UAAU,MAAM;AACd,iBAAO,uBAAuB,KAAK,OAAO,QAAQ;AAAA,QACpD;AAAA,QACA,WAAW,CAAC,aAAa,KAAK,MAAM,UAAU,QAAQ;AAAA,MACxD,CAAC;AAAA,MACD,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}
@@ -1,10 +1,9 @@
1
- import { AddToolResultOptions, ThreadSuggestion, RuntimeCapabilities, SubmitFeedbackOptions, ThreadRuntimeCore, SpeechState, SubmittedFeedback, ThreadRuntimeEventType } from "../runtimes/core/ThreadRuntimeCore";
1
+ import { ThreadSuggestion, RuntimeCapabilities, ThreadRuntimeCore, SpeechState, ThreadRuntimeEventType, ThreadMetadata } from "../runtimes/core/ThreadRuntimeCore";
2
2
  import { ExportedMessageRepository } from "../runtimes/utils/MessageRepository";
3
3
  import { AppendMessage, ModelConfig, ThreadMessage, Unsubscribe } from "../types";
4
4
  import { MessageRuntime, MessageRuntimeImpl } from "./MessageRuntime";
5
5
  import { SubscribableWithState } from "./subscribable/Subscribable";
6
6
  import { ThreadComposerRuntime, ThreadComposerRuntimeImpl } from "./ComposerRuntime";
7
- import { ComposerRuntimeCore } from "../runtimes/core/ComposerRuntimeCore";
8
7
  import { ThreadRuntimePath } from "./RuntimePathTypes";
9
8
  export type CreateAppendMessage = string | {
10
9
  parentId?: string | null | undefined;
@@ -16,50 +15,80 @@ export type CreateAppendMessage = string | {
16
15
  export type ThreadRuntimeCoreBinding = SubscribableWithState<ThreadRuntimeCore, ThreadRuntimePath> & {
17
16
  outerSubscribe(callback: () => void): Unsubscribe;
18
17
  };
19
- export type ThreadState = Readonly<{
18
+ export type ThreadState = {
20
19
  /**
21
20
  * The thread ID.
21
+ * @deprecated This field is deprecated and will be removed in 0.8.0. Use `metadata.threadId` instead.
22
22
  */
23
- threadId: string;
23
+ readonly threadId: string;
24
+ /**
25
+ * The thread metadata.
26
+ */
27
+ readonly metadata: ThreadMetadata;
24
28
  /**
25
29
  * Whether the thread is disabled. Disabled threads cannot receive new messages.
26
30
  */
27
- isDisabled: boolean;
31
+ readonly isDisabled: boolean;
28
32
  /**
29
33
  * Whether the thread is running. A thread is considered running when there is an active stream connection to the backend.
30
34
  */
31
- isRunning: boolean;
35
+ readonly isRunning: boolean;
32
36
  /**
33
37
  * The capabilities of the thread, such as whether the thread supports editing, branch switching, etc.
34
38
  */
35
- capabilities: RuntimeCapabilities;
39
+ readonly capabilities: RuntimeCapabilities;
36
40
  /**
37
41
  * The messages in the currently selected branch of the thread.
38
42
  */
39
- messages: readonly ThreadMessage[];
43
+ readonly messages: readonly ThreadMessage[];
40
44
  /**
41
45
  * Follow up message suggestions to show the user.
42
46
  */
43
- suggestions: readonly ThreadSuggestion[];
47
+ readonly suggestions: readonly ThreadSuggestion[];
44
48
  /**
45
49
  * Custom extra information provided by the runtime.
46
50
  */
47
- extras: unknown;
51
+ readonly extras: unknown;
48
52
  /**
49
53
  * @deprecated This API is still under active development and might change without notice.
50
54
  */
51
- speech: SpeechState | undefined;
52
- }>;
55
+ readonly speech: SpeechState | undefined;
56
+ };
53
57
  export declare const getThreadState: (runtime: ThreadRuntimeCore) => ThreadState;
54
- export type ThreadRuntime = Readonly<{
58
+ export type ThreadRuntime = {
59
+ /**
60
+ * The selector for the thread runtime.
61
+ */
55
62
  readonly path: ThreadRuntimePath;
63
+ /**
64
+ * The thread composer runtime.
65
+ */
56
66
  readonly composer: ThreadComposerRuntime;
67
+ /**
68
+ * Gets a snapshot of the thread state.
69
+ */
57
70
  getState(): ThreadState;
58
71
  /**
59
- * @deprecated This method will be removed in 0.6.0. Submit feedback if you need this functionality.
72
+ * Append a new message to the thread.
73
+ *
74
+ * @example ```ts
75
+ * // append a new user message with the text "Hello, world!"
76
+ * threadRuntime.append("Hello, world!");
77
+ * ```
78
+ *
79
+ * @example ```ts
80
+ * // append a new assistant message with the text "Hello, world!"
81
+ * threadRuntime.append({
82
+ * role: "assistant",
83
+ * content: [{ type: "text", text: "Hello, world!" }],
84
+ * });
85
+ * ```
60
86
  */
61
- unstable_getCore(): ThreadRuntimeCore;
62
87
  append(message: CreateAppendMessage): void;
88
+ /**
89
+ *
90
+ * @param parentId
91
+ */
63
92
  startRun(parentId: string | null): void;
64
93
  subscribe(callback: () => void): Unsubscribe;
65
94
  cancelRun(): void;
@@ -73,118 +102,11 @@ export type ThreadRuntime = Readonly<{
73
102
  */
74
103
  stopSpeaking: () => void;
75
104
  unstable_on(event: ThreadRuntimeEventType, callback: () => void): Unsubscribe;
76
- /**
77
- * @deprecated Use `getState().capabilities` instead. This will be removed in 0.6.0.
78
- */
79
- capabilities: Readonly<RuntimeCapabilities>;
80
- /**
81
- * @deprecated Use `getState().threadId` instead. This will be removed in 0.6.0.
82
- */
83
- threadId: string;
84
- /**
85
- * @deprecated Use `getState().isDisabled` instead. This will be removed in 0.6.0.
86
- */
87
- isDisabled: boolean;
88
- /**
89
- * @deprecated Use `getState().isRunning` instead. This will be removed in 0.6.0.
90
- */
91
- isRunning: boolean;
92
- /**
93
- * @deprecated Use `getState().messages` instead. This will be removed in 0.6.0.
94
- */
95
- messages: readonly ThreadMessage[];
96
- /**
97
- * @deprecated Use `getState().followupSuggestions` instead. This will be removed in 0.6.0.
98
- */
99
- suggestions: readonly ThreadSuggestion[];
100
- /**
101
- * @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
102
- */
103
- speech: SpeechState | undefined;
104
- /**
105
- * @deprecated Use `getState().extras` instead. This will be removed in 0.6.0.
106
- */
107
- extras: unknown;
108
- /**
109
- * @deprecated Use `getMesssageById(id).getState().branchNumber` / `getMesssageById(id).getState().branchCount` instead. This will be removed in 0.6.0.
110
- */
111
- getBranches: (messageId: string) => readonly string[];
112
- /**
113
- * @deprecated Use `getMesssageById(id).switchToBranch({ options })` instead. This will be removed in 0.6.0.
114
- */
115
- switchToBranch: (branchId: string) => void;
116
- /**
117
- * @deprecated Use `getMesssageById(id).getContentPartByToolCallId(toolCallId).addToolResult({ result })` instead. This will be removed in 0.6.0.
118
- */
119
- addToolResult: (options: AddToolResultOptions) => void;
120
- /**
121
- * @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
122
- */
123
- speak: (messageId: string) => void;
124
- /**
125
- * @deprecated Use `getMesssageById(id).getState().submittedFeedback` instead. This will be removed in 0.6.0.
126
- */
127
- getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
128
- /**
129
- * @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
130
- */
131
- submitFeedback: (feedback: SubmitFeedbackOptions) => void;
132
- /**
133
- * @deprecated Use `getMesssageById(id).composer` instead. This will be removed in 0.6.0.
134
- */
135
- getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
136
- /**
137
- * @deprecated Use `getMesssageById(id).composer.beginEdit()` instead. This will be removed in 0.6.0.
138
- */
139
- beginEdit: (messageId: string) => void;
140
- }>;
141
- export declare class ThreadRuntimeImpl implements Omit<ThreadRuntimeCore, "getMessageById">, ThreadRuntime {
105
+ };
106
+ export declare class ThreadRuntimeImpl implements ThreadRuntime {
142
107
  get path(): ThreadRuntimePath;
143
- /**
144
- * @deprecated Use `getState().threadId` instead. This will be removed in 0.6.0.
145
- */
146
- get threadId(): string;
147
- /**
148
- * @deprecated Use `getState().isDisabled` instead. This will be removed in 0.6.0.
149
- */
150
- get isDisabled(): boolean;
151
- /**
152
- * @deprecated Use `getState().isRunning` instead. This will be removed in 0.6.0.
153
- */
154
- get isRunning(): boolean;
155
- /**
156
- * @deprecated Use `getState().capabilities` instead. This will be removed in 0.6.0.
157
- */
158
- get capabilities(): Readonly<{
159
- switchToBranch: boolean;
160
- edit: boolean;
161
- reload: boolean;
162
- cancel: boolean;
163
- unstable_copy: boolean;
164
- speech: boolean;
165
- attachments: boolean;
166
- feedback: boolean;
167
- }>;
168
- /**
169
- * @deprecated Use `getState().extras` instead. This will be removed in 0.6.0.
170
- */
171
- get extras(): unknown;
172
- /**
173
- * @deprecated Use `getState().followupSuggestions` instead. This will be removed in 0.6.0.
174
- */
175
- get suggestions(): readonly ThreadSuggestion[];
176
- /**
177
- * @deprecated Use `getState().messages` instead. This will be removed in 0.6.0.
178
- */
179
- get messages(): readonly ThreadMessage[];
180
- /**
181
- * @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
182
- */
183
- get speech(): Readonly<{
184
- messageId: string;
185
- status: import("..").SpeechSynthesisAdapter.Status;
186
- }> | undefined;
187
108
  unstable_getCore(): Readonly<{
109
+ metadata: import("..").ThreadMetadataRuntimeCore;
188
110
  getMessageById: (messageId: string) => {
189
111
  parentId: string | null;
190
112
  message: ThreadMessage;
@@ -194,18 +116,17 @@ export declare class ThreadRuntimeImpl implements Omit<ThreadRuntimeCore, "getMe
194
116
  append: (message: AppendMessage) => void;
195
117
  startRun: (parentId: string | null) => void;
196
118
  cancelRun: () => void;
197
- addToolResult: (options: AddToolResultOptions) => void;
119
+ addToolResult: (options: import("..").AddToolResultOptions) => void;
198
120
  speak: (messageId: string) => void;
199
121
  stopSpeaking: () => void;
200
- getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
201
- submitFeedback: (feedback: SubmitFeedbackOptions) => void;
122
+ getSubmittedFeedback: (messageId: string) => import("../runtimes/core/ThreadRuntimeCore").SubmittedFeedback | undefined;
123
+ submitFeedback: (feedback: import("..").SubmitFeedbackOptions) => void;
202
124
  getModelConfig: () => ModelConfig;
203
125
  composer: import("../runtimes/core/ComposerRuntimeCore").ThreadComposerRuntimeCore;
204
- getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
126
+ getEditComposer: (messageId: string) => import("../runtimes/core/ComposerRuntimeCore").ComposerRuntimeCore | undefined;
205
127
  beginEdit: (messageId: string) => void;
206
128
  speech: SpeechState | undefined;
207
129
  capabilities: Readonly<RuntimeCapabilities>;
208
- threadId: string;
209
130
  isDisabled: boolean;
210
131
  messages: readonly ThreadMessage[];
211
132
  suggestions: readonly ThreadSuggestion[];
@@ -218,93 +139,14 @@ export declare class ThreadRuntimeImpl implements Omit<ThreadRuntimeCore, "getMe
218
139
  private _threadBinding;
219
140
  constructor(threadBinding: ThreadRuntimeCoreBinding);
220
141
  readonly composer: ThreadComposerRuntimeImpl;
221
- getState(): Readonly<{
222
- /**
223
- * The thread ID.
224
- */
225
- threadId: string;
226
- /**
227
- * Whether the thread is disabled. Disabled threads cannot receive new messages.
228
- */
229
- isDisabled: boolean;
230
- /**
231
- * Whether the thread is running. A thread is considered running when there is an active stream connection to the backend.
232
- */
233
- isRunning: boolean;
234
- /**
235
- * The capabilities of the thread, such as whether the thread supports editing, branch switching, etc.
236
- */
237
- capabilities: RuntimeCapabilities;
238
- /**
239
- * The messages in the currently selected branch of the thread.
240
- */
241
- messages: readonly ThreadMessage[];
242
- /**
243
- * Follow up message suggestions to show the user.
244
- */
245
- suggestions: readonly ThreadSuggestion[];
246
- /**
247
- * Custom extra information provided by the runtime.
248
- */
249
- extras: unknown;
250
- /**
251
- * @deprecated This API is still under active development and might change without notice.
252
- */
253
- speech: SpeechState | undefined;
254
- }>;
142
+ getState(): ThreadState;
255
143
  append(message: CreateAppendMessage): void;
256
144
  subscribe(callback: () => void): Unsubscribe;
257
- /**
258
- * @derprecated Use `getMesssageById(id).getState().branchNumber` / `getMesssageById(id).getState().branchCount` instead. This will be removed in 0.6.0.
259
- */
260
- getBranches(messageId: string): readonly string[];
261
145
  getModelConfig(): ModelConfig;
262
146
  startRun(parentId: string | null): void;
263
147
  cancelRun(): void;
264
- /**
265
- * @deprecated Use `getMesssageById(id).getContentPartByToolCallId(toolCallId).addToolResult({ result })` instead. This will be removed in 0.6.0.
266
- */
267
- addToolResult(options: AddToolResultOptions): void;
268
- /**
269
- * @deprecated Use `getMesssageById(id).switchToBranch({ options })` instead. This will be removed in 0.6.0.
270
- */
271
- switchToBranch(branchId: string): void;
272
- /**
273
- * @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
274
- */
275
- speak(messageId: string): void;
276
148
  stopSpeaking(): void;
277
- getSubmittedFeedback(messageId: string): Readonly<{
278
- type: "negative" | "positive";
279
- }> | undefined;
280
- /**
281
- * @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
282
- */
283
- submitFeedback(options: SubmitFeedbackOptions): void;
284
- /**
285
- * @deprecated Use `getMesssageById(id).getMessageByIndex(idx).composer` instead. This will be removed in 0.6.0.
286
- */
287
- getEditComposer(messageId: string): Readonly<{
288
- attachments: readonly import("..").Attachment[];
289
- getAttachmentAccept(): string;
290
- addAttachment: (file: File) => Promise<void>;
291
- removeAttachment: (attachmentId: string) => Promise<void>;
292
- isEditing: boolean;
293
- canCancel: boolean;
294
- isEmpty: boolean;
295
- text: string;
296
- setText: (value: string) => void;
297
- role: import("../types/AssistantTypes").MessageRole;
298
- setRole: (role: import("../types/AssistantTypes").MessageRole) => void;
299
- reset: () => void;
300
- send: () => void;
301
- cancel: () => void;
302
- subscribe: (callback: () => void) => Unsubscribe;
303
- }> | undefined;
304
- /**
305
- * @deprecated Use `getMesssageById(id).getMessageByIndex(idx).composer.beginEdit()` instead. This will be removed in 0.6.0.
306
- */
307
- beginEdit(messageId: string): void;
149
+ getSubmittedFeedback(messageId: string): import("../runtimes/core/ThreadRuntimeCore").SubmittedFeedback | undefined;
308
150
  export(): ExportedMessageRepository;
309
151
  import(data: ExportedMessageRepository): void;
310
152
  getMesssageByIndex(idx: number): MessageRuntimeImpl;
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadRuntime.d.ts","sourceRoot":"","sources":["../../src/api/ThreadRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,cAAc,EACd,kBAAkB,EAEnB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAEL,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAsB,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MA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