@assistant-ui/react 0.14.29 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/client/ExternalThread.js +4 -3
  2. package/dist/client/ExternalThread.js.map +1 -1
  3. package/dist/client/InMemoryThreadList.js +3 -3
  4. package/dist/client/InMemoryThreadList.js.map +1 -1
  5. package/dist/context/index.d.ts +1 -8
  6. package/dist/context/index.js +1 -8
  7. package/dist/hooks/useToolCallElapsed.js +24 -29
  8. package/dist/hooks/useToolCallElapsed.js.map +1 -1
  9. package/dist/index.d.ts +1 -8
  10. package/dist/index.js +1 -8
  11. package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js +3 -3
  12. package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
  13. package/dist/mcp-apps/McpAppRenderer.js +1 -1
  14. package/dist/mcp-apps/McpAppRenderer.js.map +1 -1
  15. package/dist/model-context/makeAssistantVisible.js +26 -25
  16. package/dist/model-context/makeAssistantVisible.js.map +1 -1
  17. package/dist/primitives/actionBar/ActionBarExportMarkdown.js +3 -3
  18. package/dist/primitives/actionBar/ActionBarExportMarkdown.js.map +1 -1
  19. package/dist/primitives/attachment/AttachmentRemove.js +3 -3
  20. package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
  21. package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js +3 -3
  22. package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
  23. package/dist/primitives/composer/ComposerAddAttachment.js +3 -3
  24. package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
  25. package/dist/primitives/composer/ComposerAttachmentDropzone.js +1 -1
  26. package/dist/primitives/composer/ComposerAttachmentDropzone.js.map +1 -1
  27. package/dist/primitives/composer/ComposerInput.js +13 -13
  28. package/dist/primitives/composer/ComposerInput.js.map +1 -1
  29. package/dist/primitives/composer/ComposerQuote.js +1 -1
  30. package/dist/primitives/composer/ComposerQuote.js.map +1 -1
  31. package/dist/primitives/composer/ComposerStopDictation.js +3 -3
  32. package/dist/primitives/composer/ComposerStopDictation.js.map +1 -1
  33. package/dist/primitives/composer/trigger/triggerSelectionResource.d.ts.map +1 -1
  34. package/dist/primitives/composer/trigger/triggerSelectionResource.js +3 -3
  35. package/dist/primitives/composer/trigger/triggerSelectionResource.js.map +1 -1
  36. package/dist/primitives/message/MessagePartsGrouped.d.ts.map +1 -1
  37. package/dist/primitives/message/MessagePartsGrouped.js +67 -89
  38. package/dist/primitives/message/MessagePartsGrouped.js.map +1 -1
  39. package/dist/primitives/message/MessageRoot.js +3 -3
  40. package/dist/primitives/message/MessageRoot.js.map +1 -1
  41. package/dist/primitives/queueItem/QueueItemRemove.js +3 -3
  42. package/dist/primitives/queueItem/QueueItemRemove.js.map +1 -1
  43. package/dist/primitives/queueItem/QueueItemSteer.js +3 -3
  44. package/dist/primitives/queueItem/QueueItemSteer.js.map +1 -1
  45. package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js +1 -1
  46. package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js.map +1 -1
  47. package/dist/primitives/suggestion/SuggestionTrigger.js +16 -15
  48. package/dist/primitives/suggestion/SuggestionTrigger.js.map +1 -1
  49. package/dist/unstable/useComposerInput.js +2 -2
  50. package/dist/unstable/useComposerInput.js.map +1 -1
  51. package/dist/unstable/useComposerInputHistory.js +6 -6
  52. package/dist/unstable/useComposerInputHistory.js.map +1 -1
  53. package/dist/unstable/useMentionAdapter.js +1 -1
  54. package/dist/unstable/useMentionAdapter.js.map +1 -1
  55. package/dist/utils/smooth/SmoothContext.js +3 -3
  56. package/dist/utils/smooth/SmoothContext.js.map +1 -1
  57. package/dist/utils/smooth/useSmooth.js +1 -1
  58. package/dist/utils/smooth/useSmooth.js.map +1 -1
  59. package/dist/utils/useToolArgsFieldStatus.d.ts +2 -2
  60. package/package.json +5 -5
  61. package/src/client/ExternalThread.ts +5 -3
  62. package/src/client/InMemoryThreadList.ts +3 -3
  63. package/src/context/index.ts +0 -44
  64. package/src/hooks/useToolCallElapsed.ts +9 -12
  65. package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.test.tsx +5 -9
  66. package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.ts +1 -1
  67. package/src/mcp-apps/McpAppRenderer.tsx +1 -1
  68. package/src/model-context/makeAssistantVisible.test.tsx +1 -1
  69. package/src/model-context/makeAssistantVisible.tsx +1 -1
  70. package/src/primitives/actionBar/ActionBarExportMarkdown.tsx +1 -1
  71. package/src/primitives/attachment/AttachmentRemove.ts +1 -1
  72. package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.ts +1 -1
  73. package/src/primitives/composer/ComposerAddAttachment.test.tsx +2 -2
  74. package/src/primitives/composer/ComposerAddAttachment.ts +1 -1
  75. package/src/primitives/composer/ComposerAttachmentDropzone.test.tsx +2 -2
  76. package/src/primitives/composer/ComposerAttachmentDropzone.tsx +1 -1
  77. package/src/primitives/composer/ComposerInput.test.tsx +7 -7
  78. package/src/primitives/composer/ComposerInput.tsx +13 -13
  79. package/src/primitives/composer/ComposerQuote.tsx +1 -1
  80. package/src/primitives/composer/ComposerStopDictation.ts +1 -1
  81. package/src/primitives/composer/trigger/triggerSelectionResource.ts +7 -9
  82. package/src/primitives/message/MessagePartsGrouped.tsx +6 -8
  83. package/src/primitives/message/MessageRoot.tsx +1 -1
  84. package/src/primitives/queueItem/QueueItemRemove.ts +1 -1
  85. package/src/primitives/queueItem/QueueItemSteer.ts +1 -1
  86. package/src/primitives/selectionToolbar/SelectionToolbarQuote.tsx +1 -1
  87. package/src/primitives/suggestion/SuggestionTrigger.ts +9 -9
  88. package/src/tests/DataRenderers.test.tsx +1 -1
  89. package/src/tests/RemoteThreadListRuntime.deferredProvider.test.tsx +3 -3
  90. package/src/tests/external-thread-attachments.test.tsx +21 -23
  91. package/src/tests/external-thread-branches.test.tsx +10 -10
  92. package/src/tests/external-thread-parity.test.tsx +18 -20
  93. package/src/tests/local-runtime-queue.test.tsx +29 -34
  94. package/src/tests/messagePartSwitchRace.test.tsx +30 -13
  95. package/src/unstable/useComposerInput.test.tsx +2 -2
  96. package/src/unstable/useComposerInput.ts +2 -2
  97. package/src/unstable/useComposerInputHistory.test.tsx +3 -3
  98. package/src/unstable/useComposerInputHistory.ts +6 -6
  99. package/src/unstable/useMentionAdapter.ts +1 -1
  100. package/src/utils/smooth/SmoothContext.tsx +1 -1
  101. package/src/utils/smooth/useSmooth.test.tsx +1 -1
  102. package/src/utils/smooth/useSmooth.ts +1 -1
  103. package/dist/context/react/utils/createStateHookForRuntime.d.ts +0 -34
  104. package/dist/context/react/utils/createStateHookForRuntime.d.ts.map +0 -1
  105. package/dist/context/react/utils/createStateHookForRuntime.js +0 -21
  106. package/dist/context/react/utils/createStateHookForRuntime.js.map +0 -1
  107. package/dist/legacy-runtime/hooks/AssistantContext.d.ts +0 -74
  108. package/dist/legacy-runtime/hooks/AssistantContext.d.ts.map +0 -1
  109. package/dist/legacy-runtime/hooks/AssistantContext.js +0 -29
  110. package/dist/legacy-runtime/hooks/AssistantContext.js.map +0 -1
  111. package/dist/legacy-runtime/hooks/AttachmentContext.d.ts +0 -1007
  112. package/dist/legacy-runtime/hooks/AttachmentContext.d.ts.map +0 -1
  113. package/dist/legacy-runtime/hooks/AttachmentContext.js +0 -47
  114. package/dist/legacy-runtime/hooks/AttachmentContext.js.map +0 -1
  115. package/dist/legacy-runtime/hooks/ComposerContext.d.ts +0 -141
  116. package/dist/legacy-runtime/hooks/ComposerContext.d.ts.map +0 -1
  117. package/dist/legacy-runtime/hooks/ComposerContext.js +0 -65
  118. package/dist/legacy-runtime/hooks/ComposerContext.js.map +0 -1
  119. package/dist/legacy-runtime/hooks/MessageContext.d.ts +0 -155
  120. package/dist/legacy-runtime/hooks/MessageContext.d.ts.map +0 -1
  121. package/dist/legacy-runtime/hooks/MessageContext.js +0 -68
  122. package/dist/legacy-runtime/hooks/MessageContext.js.map +0 -1
  123. package/dist/legacy-runtime/hooks/MessagePartContext.d.ts +0 -44
  124. package/dist/legacy-runtime/hooks/MessagePartContext.d.ts.map +0 -1
  125. package/dist/legacy-runtime/hooks/MessagePartContext.js +0 -26
  126. package/dist/legacy-runtime/hooks/MessagePartContext.js.map +0 -1
  127. package/dist/legacy-runtime/hooks/ThreadContext.d.ts +0 -139
  128. package/dist/legacy-runtime/hooks/ThreadContext.d.ts.map +0 -1
  129. package/dist/legacy-runtime/hooks/ThreadContext.js +0 -84
  130. package/dist/legacy-runtime/hooks/ThreadContext.js.map +0 -1
  131. package/dist/legacy-runtime/hooks/ThreadListItemContext.d.ts +0 -44
  132. package/dist/legacy-runtime/hooks/ThreadListItemContext.d.ts.map +0 -1
  133. package/dist/legacy-runtime/hooks/ThreadListItemContext.js +0 -26
  134. package/dist/legacy-runtime/hooks/ThreadListItemContext.js.map +0 -1
  135. package/src/context/react/utils/createStateHookForRuntime.ts +0 -82
  136. package/src/legacy-runtime/hooks/AssistantContext.ts +0 -67
  137. package/src/legacy-runtime/hooks/AttachmentContext.ts +0 -99
  138. package/src/legacy-runtime/hooks/ComposerContext.ts +0 -131
  139. package/src/legacy-runtime/hooks/MessageContext.ts +0 -127
  140. package/src/legacy-runtime/hooks/MessagePartContext.ts +0 -32
  141. package/src/legacy-runtime/hooks/ThreadContext.ts +0 -120
  142. package/src/legacy-runtime/hooks/ThreadListItemContext.ts +0 -36
@@ -1,1007 +0,0 @@
1
- import { AttachmentRuntime } from "../runtime/AttachmentRuntime.js";
2
- //#region src/legacy-runtime/hooks/AttachmentContext.d.ts
3
- /**
4
- * @deprecated Use {@link useAui} with `aui.attachment()` instead. See the {@link https://assistant-ui.com/docs/migrations/v0-12 migration guide}.
5
- */
6
- declare function useAttachmentRuntime(options?: {
7
- optional?: false | undefined;
8
- }): AttachmentRuntime;
9
- declare function useAttachmentRuntime(options?: {
10
- optional?: boolean | undefined;
11
- }): AttachmentRuntime | null;
12
- declare function useThreadComposerAttachmentRuntime(options?: {
13
- optional?: false | undefined;
14
- }): AttachmentRuntime<"thread-composer">;
15
- declare function useThreadComposerAttachmentRuntime(options?: {
16
- optional?: boolean | undefined;
17
- }): AttachmentRuntime<"thread-composer"> | null;
18
- declare function useEditComposerAttachmentRuntime(options?: {
19
- optional?: false | undefined;
20
- }): AttachmentRuntime<"edit-composer">;
21
- declare function useEditComposerAttachmentRuntime(options?: {
22
- optional?: boolean | undefined;
23
- }): AttachmentRuntime<"edit-composer"> | null;
24
- declare function useMessageAttachmentRuntime(options?: {
25
- optional?: false | undefined;
26
- }): AttachmentRuntime<"message">;
27
- declare function useMessageAttachmentRuntime(options?: {
28
- optional?: boolean | undefined;
29
- }): AttachmentRuntime<"message"> | null;
30
- /**
31
- * @deprecated Use {@link useAuiState}: `useAuiState((s) => s.attachment)`. See the {@link https://assistant-ui.com/docs/migrations/v0-12 migration guide}.
32
- */
33
- declare const useAttachment: {
34
- (): import("@assistant-ui/core").AttachmentState & {
35
- source: "message" | "thread-composer" | "edit-composer";
36
- };
37
- <TSelected>(selector: (state: import("@assistant-ui/core").AttachmentState & {
38
- source: "message" | "thread-composer" | "edit-composer";
39
- }) => TSelected): TSelected;
40
- <TSelected>(selector: ((state: import("@assistant-ui/core").AttachmentState & {
41
- source: "message" | "thread-composer" | "edit-composer";
42
- }) => TSelected) | undefined): (import("@assistant-ui/core").AttachmentState & {
43
- source: "message" | "thread-composer" | "edit-composer";
44
- }) | TSelected;
45
- (options: {
46
- optional?: false | undefined;
47
- }): import("@assistant-ui/core").AttachmentState & {
48
- source: "message" | "thread-composer" | "edit-composer";
49
- };
50
- (options: {
51
- optional?: boolean | undefined;
52
- }): (import("@assistant-ui/core").AttachmentState & {
53
- source: "message" | "thread-composer" | "edit-composer";
54
- }) | null;
55
- <TSelected>(options: {
56
- optional?: false | undefined;
57
- selector: (state: import("@assistant-ui/core").AttachmentState & {
58
- source: "message" | "thread-composer" | "edit-composer";
59
- }) => TSelected;
60
- }): TSelected;
61
- <TSelected>(options: {
62
- optional?: false | undefined;
63
- selector: ((state: import("@assistant-ui/core").AttachmentState & {
64
- source: "message" | "thread-composer" | "edit-composer";
65
- }) => TSelected) | undefined;
66
- }): (import("@assistant-ui/core").AttachmentState & {
67
- source: "message" | "thread-composer" | "edit-composer";
68
- }) | TSelected;
69
- <TSelected>(options: {
70
- optional?: boolean | undefined;
71
- selector: (state: import("@assistant-ui/core").AttachmentState & {
72
- source: "message" | "thread-composer" | "edit-composer";
73
- }) => TSelected;
74
- }): TSelected | null;
75
- <TSelected>(options: {
76
- optional?: boolean | undefined;
77
- selector: ((state: import("@assistant-ui/core").AttachmentState & {
78
- source: "message" | "thread-composer" | "edit-composer";
79
- }) => TSelected) | undefined;
80
- }): (import("@assistant-ui/core").AttachmentState & {
81
- source: "message" | "thread-composer" | "edit-composer";
82
- }) | TSelected | null;
83
- };
84
- declare const useThreadComposerAttachment: {
85
- (): ({
86
- id: string;
87
- type: "image" | "document" | "file" | (string & {});
88
- name: string;
89
- contentType?: string | undefined;
90
- file?: File;
91
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
92
- } & {
93
- status: import("@assistant-ui/core").PendingAttachmentStatus;
94
- file: File;
95
- } & {
96
- readonly source: "thread-composer";
97
- } & {
98
- source: "thread-composer";
99
- }) | ({
100
- id: string;
101
- type: "image" | "document" | "file" | (string & {});
102
- name: string;
103
- contentType?: string | undefined;
104
- file?: File;
105
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
106
- } & {
107
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
108
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
109
- } & {
110
- readonly source: "thread-composer";
111
- } & {
112
- source: "thread-composer";
113
- });
114
- <TSelected>(selector: (state: ({
115
- id: string;
116
- type: "image" | "document" | "file" | (string & {});
117
- name: string;
118
- contentType?: string | undefined;
119
- file?: File;
120
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
121
- } & {
122
- status: import("@assistant-ui/core").PendingAttachmentStatus;
123
- file: File;
124
- } & {
125
- readonly source: "thread-composer";
126
- } & {
127
- source: "thread-composer";
128
- }) | ({
129
- id: string;
130
- type: "image" | "document" | "file" | (string & {});
131
- name: string;
132
- contentType?: string | undefined;
133
- file?: File;
134
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
135
- } & {
136
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
137
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
138
- } & {
139
- readonly source: "thread-composer";
140
- } & {
141
- source: "thread-composer";
142
- })) => TSelected): TSelected;
143
- <TSelected>(selector: ((state: ({
144
- id: string;
145
- type: "image" | "document" | "file" | (string & {});
146
- name: string;
147
- contentType?: string | undefined;
148
- file?: File;
149
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
150
- } & {
151
- status: import("@assistant-ui/core").PendingAttachmentStatus;
152
- file: File;
153
- } & {
154
- readonly source: "thread-composer";
155
- } & {
156
- source: "thread-composer";
157
- }) | ({
158
- id: string;
159
- type: "image" | "document" | "file" | (string & {});
160
- name: string;
161
- contentType?: string | undefined;
162
- file?: File;
163
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
164
- } & {
165
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
166
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
167
- } & {
168
- readonly source: "thread-composer";
169
- } & {
170
- source: "thread-composer";
171
- })) => TSelected) | undefined): ({
172
- id: string;
173
- type: "image" | "document" | "file" | (string & {});
174
- name: string;
175
- contentType?: string | undefined;
176
- file?: File;
177
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
178
- } & {
179
- status: import("@assistant-ui/core").PendingAttachmentStatus;
180
- file: File;
181
- } & {
182
- readonly source: "thread-composer";
183
- } & {
184
- source: "thread-composer";
185
- }) | ({
186
- id: string;
187
- type: "image" | "document" | "file" | (string & {});
188
- name: string;
189
- contentType?: string | undefined;
190
- file?: File;
191
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
192
- } & {
193
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
194
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
195
- } & {
196
- readonly source: "thread-composer";
197
- } & {
198
- source: "thread-composer";
199
- }) | TSelected;
200
- (options: {
201
- optional?: false | undefined;
202
- }): ({
203
- id: string;
204
- type: "image" | "document" | "file" | (string & {});
205
- name: string;
206
- contentType?: string | undefined;
207
- file?: File;
208
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
209
- } & {
210
- status: import("@assistant-ui/core").PendingAttachmentStatus;
211
- file: File;
212
- } & {
213
- readonly source: "thread-composer";
214
- } & {
215
- source: "thread-composer";
216
- }) | ({
217
- id: string;
218
- type: "image" | "document" | "file" | (string & {});
219
- name: string;
220
- contentType?: string | undefined;
221
- file?: File;
222
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
223
- } & {
224
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
225
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
226
- } & {
227
- readonly source: "thread-composer";
228
- } & {
229
- source: "thread-composer";
230
- });
231
- (options: {
232
- optional?: boolean | undefined;
233
- }): ({
234
- id: string;
235
- type: "image" | "document" | "file" | (string & {});
236
- name: string;
237
- contentType?: string | undefined;
238
- file?: File;
239
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
240
- } & {
241
- status: import("@assistant-ui/core").PendingAttachmentStatus;
242
- file: File;
243
- } & {
244
- readonly source: "thread-composer";
245
- } & {
246
- source: "thread-composer";
247
- }) | ({
248
- id: string;
249
- type: "image" | "document" | "file" | (string & {});
250
- name: string;
251
- contentType?: string | undefined;
252
- file?: File;
253
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
254
- } & {
255
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
256
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
257
- } & {
258
- readonly source: "thread-composer";
259
- } & {
260
- source: "thread-composer";
261
- }) | null;
262
- <TSelected>(options: {
263
- optional?: false | undefined;
264
- selector: (state: ({
265
- id: string;
266
- type: "image" | "document" | "file" | (string & {});
267
- name: string;
268
- contentType?: string | undefined;
269
- file?: File;
270
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
271
- } & {
272
- status: import("@assistant-ui/core").PendingAttachmentStatus;
273
- file: File;
274
- } & {
275
- readonly source: "thread-composer";
276
- } & {
277
- source: "thread-composer";
278
- }) | ({
279
- id: string;
280
- type: "image" | "document" | "file" | (string & {});
281
- name: string;
282
- contentType?: string | undefined;
283
- file?: File;
284
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
285
- } & {
286
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
287
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
288
- } & {
289
- readonly source: "thread-composer";
290
- } & {
291
- source: "thread-composer";
292
- })) => TSelected;
293
- }): TSelected;
294
- <TSelected>(options: {
295
- optional?: false | undefined;
296
- selector: ((state: ({
297
- id: string;
298
- type: "image" | "document" | "file" | (string & {});
299
- name: string;
300
- contentType?: string | undefined;
301
- file?: File;
302
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
303
- } & {
304
- status: import("@assistant-ui/core").PendingAttachmentStatus;
305
- file: File;
306
- } & {
307
- readonly source: "thread-composer";
308
- } & {
309
- source: "thread-composer";
310
- }) | ({
311
- id: string;
312
- type: "image" | "document" | "file" | (string & {});
313
- name: string;
314
- contentType?: string | undefined;
315
- file?: File;
316
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
317
- } & {
318
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
319
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
320
- } & {
321
- readonly source: "thread-composer";
322
- } & {
323
- source: "thread-composer";
324
- })) => TSelected) | undefined;
325
- }): ({
326
- id: string;
327
- type: "image" | "document" | "file" | (string & {});
328
- name: string;
329
- contentType?: string | undefined;
330
- file?: File;
331
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
332
- } & {
333
- status: import("@assistant-ui/core").PendingAttachmentStatus;
334
- file: File;
335
- } & {
336
- readonly source: "thread-composer";
337
- } & {
338
- source: "thread-composer";
339
- }) | ({
340
- id: string;
341
- type: "image" | "document" | "file" | (string & {});
342
- name: string;
343
- contentType?: string | undefined;
344
- file?: File;
345
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
346
- } & {
347
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
348
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
349
- } & {
350
- readonly source: "thread-composer";
351
- } & {
352
- source: "thread-composer";
353
- }) | TSelected;
354
- <TSelected>(options: {
355
- optional?: boolean | undefined;
356
- selector: (state: ({
357
- id: string;
358
- type: "image" | "document" | "file" | (string & {});
359
- name: string;
360
- contentType?: string | undefined;
361
- file?: File;
362
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
363
- } & {
364
- status: import("@assistant-ui/core").PendingAttachmentStatus;
365
- file: File;
366
- } & {
367
- readonly source: "thread-composer";
368
- } & {
369
- source: "thread-composer";
370
- }) | ({
371
- id: string;
372
- type: "image" | "document" | "file" | (string & {});
373
- name: string;
374
- contentType?: string | undefined;
375
- file?: File;
376
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
377
- } & {
378
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
379
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
380
- } & {
381
- readonly source: "thread-composer";
382
- } & {
383
- source: "thread-composer";
384
- })) => TSelected;
385
- }): TSelected | null;
386
- <TSelected>(options: {
387
- optional?: boolean | undefined;
388
- selector: ((state: ({
389
- id: string;
390
- type: "image" | "document" | "file" | (string & {});
391
- name: string;
392
- contentType?: string | undefined;
393
- file?: File;
394
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
395
- } & {
396
- status: import("@assistant-ui/core").PendingAttachmentStatus;
397
- file: File;
398
- } & {
399
- readonly source: "thread-composer";
400
- } & {
401
- source: "thread-composer";
402
- }) | ({
403
- id: string;
404
- type: "image" | "document" | "file" | (string & {});
405
- name: string;
406
- contentType?: string | undefined;
407
- file?: File;
408
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
409
- } & {
410
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
411
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
412
- } & {
413
- readonly source: "thread-composer";
414
- } & {
415
- source: "thread-composer";
416
- })) => TSelected) | undefined;
417
- }): ({
418
- id: string;
419
- type: "image" | "document" | "file" | (string & {});
420
- name: string;
421
- contentType?: string | undefined;
422
- file?: File;
423
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
424
- } & {
425
- status: import("@assistant-ui/core").PendingAttachmentStatus;
426
- file: File;
427
- } & {
428
- readonly source: "thread-composer";
429
- } & {
430
- source: "thread-composer";
431
- }) | ({
432
- id: string;
433
- type: "image" | "document" | "file" | (string & {});
434
- name: string;
435
- contentType?: string | undefined;
436
- file?: File;
437
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
438
- } & {
439
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
440
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
441
- } & {
442
- readonly source: "thread-composer";
443
- } & {
444
- source: "thread-composer";
445
- }) | TSelected | null;
446
- };
447
- declare const useEditComposerAttachment: {
448
- (): ({
449
- id: string;
450
- type: "image" | "document" | "file" | (string & {});
451
- name: string;
452
- contentType?: string | undefined;
453
- file?: File;
454
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
455
- } & {
456
- status: import("@assistant-ui/core").PendingAttachmentStatus;
457
- file: File;
458
- } & {
459
- readonly source: "edit-composer";
460
- } & {
461
- source: "edit-composer";
462
- }) | ({
463
- id: string;
464
- type: "image" | "document" | "file" | (string & {});
465
- name: string;
466
- contentType?: string | undefined;
467
- file?: File;
468
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
469
- } & {
470
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
471
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
472
- } & {
473
- readonly source: "edit-composer";
474
- } & {
475
- source: "edit-composer";
476
- });
477
- <TSelected>(selector: (state: ({
478
- id: string;
479
- type: "image" | "document" | "file" | (string & {});
480
- name: string;
481
- contentType?: string | undefined;
482
- file?: File;
483
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
484
- } & {
485
- status: import("@assistant-ui/core").PendingAttachmentStatus;
486
- file: File;
487
- } & {
488
- readonly source: "edit-composer";
489
- } & {
490
- source: "edit-composer";
491
- }) | ({
492
- id: string;
493
- type: "image" | "document" | "file" | (string & {});
494
- name: string;
495
- contentType?: string | undefined;
496
- file?: File;
497
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
498
- } & {
499
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
500
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
501
- } & {
502
- readonly source: "edit-composer";
503
- } & {
504
- source: "edit-composer";
505
- })) => TSelected): TSelected;
506
- <TSelected>(selector: ((state: ({
507
- id: string;
508
- type: "image" | "document" | "file" | (string & {});
509
- name: string;
510
- contentType?: string | undefined;
511
- file?: File;
512
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
513
- } & {
514
- status: import("@assistant-ui/core").PendingAttachmentStatus;
515
- file: File;
516
- } & {
517
- readonly source: "edit-composer";
518
- } & {
519
- source: "edit-composer";
520
- }) | ({
521
- id: string;
522
- type: "image" | "document" | "file" | (string & {});
523
- name: string;
524
- contentType?: string | undefined;
525
- file?: File;
526
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
527
- } & {
528
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
529
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
530
- } & {
531
- readonly source: "edit-composer";
532
- } & {
533
- source: "edit-composer";
534
- })) => TSelected) | undefined): ({
535
- id: string;
536
- type: "image" | "document" | "file" | (string & {});
537
- name: string;
538
- contentType?: string | undefined;
539
- file?: File;
540
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
541
- } & {
542
- status: import("@assistant-ui/core").PendingAttachmentStatus;
543
- file: File;
544
- } & {
545
- readonly source: "edit-composer";
546
- } & {
547
- source: "edit-composer";
548
- }) | ({
549
- id: string;
550
- type: "image" | "document" | "file" | (string & {});
551
- name: string;
552
- contentType?: string | undefined;
553
- file?: File;
554
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
555
- } & {
556
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
557
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
558
- } & {
559
- readonly source: "edit-composer";
560
- } & {
561
- source: "edit-composer";
562
- }) | TSelected;
563
- (options: {
564
- optional?: false | undefined;
565
- }): ({
566
- id: string;
567
- type: "image" | "document" | "file" | (string & {});
568
- name: string;
569
- contentType?: string | undefined;
570
- file?: File;
571
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
572
- } & {
573
- status: import("@assistant-ui/core").PendingAttachmentStatus;
574
- file: File;
575
- } & {
576
- readonly source: "edit-composer";
577
- } & {
578
- source: "edit-composer";
579
- }) | ({
580
- id: string;
581
- type: "image" | "document" | "file" | (string & {});
582
- name: string;
583
- contentType?: string | undefined;
584
- file?: File;
585
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
586
- } & {
587
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
588
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
589
- } & {
590
- readonly source: "edit-composer";
591
- } & {
592
- source: "edit-composer";
593
- });
594
- (options: {
595
- optional?: boolean | undefined;
596
- }): ({
597
- id: string;
598
- type: "image" | "document" | "file" | (string & {});
599
- name: string;
600
- contentType?: string | undefined;
601
- file?: File;
602
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
603
- } & {
604
- status: import("@assistant-ui/core").PendingAttachmentStatus;
605
- file: File;
606
- } & {
607
- readonly source: "edit-composer";
608
- } & {
609
- source: "edit-composer";
610
- }) | ({
611
- id: string;
612
- type: "image" | "document" | "file" | (string & {});
613
- name: string;
614
- contentType?: string | undefined;
615
- file?: File;
616
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
617
- } & {
618
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
619
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
620
- } & {
621
- readonly source: "edit-composer";
622
- } & {
623
- source: "edit-composer";
624
- }) | null;
625
- <TSelected>(options: {
626
- optional?: false | undefined;
627
- selector: (state: ({
628
- id: string;
629
- type: "image" | "document" | "file" | (string & {});
630
- name: string;
631
- contentType?: string | undefined;
632
- file?: File;
633
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
634
- } & {
635
- status: import("@assistant-ui/core").PendingAttachmentStatus;
636
- file: File;
637
- } & {
638
- readonly source: "edit-composer";
639
- } & {
640
- source: "edit-composer";
641
- }) | ({
642
- id: string;
643
- type: "image" | "document" | "file" | (string & {});
644
- name: string;
645
- contentType?: string | undefined;
646
- file?: File;
647
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
648
- } & {
649
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
650
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
651
- } & {
652
- readonly source: "edit-composer";
653
- } & {
654
- source: "edit-composer";
655
- })) => TSelected;
656
- }): TSelected;
657
- <TSelected>(options: {
658
- optional?: false | undefined;
659
- selector: ((state: ({
660
- id: string;
661
- type: "image" | "document" | "file" | (string & {});
662
- name: string;
663
- contentType?: string | undefined;
664
- file?: File;
665
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
666
- } & {
667
- status: import("@assistant-ui/core").PendingAttachmentStatus;
668
- file: File;
669
- } & {
670
- readonly source: "edit-composer";
671
- } & {
672
- source: "edit-composer";
673
- }) | ({
674
- id: string;
675
- type: "image" | "document" | "file" | (string & {});
676
- name: string;
677
- contentType?: string | undefined;
678
- file?: File;
679
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
680
- } & {
681
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
682
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
683
- } & {
684
- readonly source: "edit-composer";
685
- } & {
686
- source: "edit-composer";
687
- })) => TSelected) | undefined;
688
- }): ({
689
- id: string;
690
- type: "image" | "document" | "file" | (string & {});
691
- name: string;
692
- contentType?: string | undefined;
693
- file?: File;
694
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
695
- } & {
696
- status: import("@assistant-ui/core").PendingAttachmentStatus;
697
- file: File;
698
- } & {
699
- readonly source: "edit-composer";
700
- } & {
701
- source: "edit-composer";
702
- }) | ({
703
- id: string;
704
- type: "image" | "document" | "file" | (string & {});
705
- name: string;
706
- contentType?: string | undefined;
707
- file?: File;
708
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
709
- } & {
710
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
711
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
712
- } & {
713
- readonly source: "edit-composer";
714
- } & {
715
- source: "edit-composer";
716
- }) | TSelected;
717
- <TSelected>(options: {
718
- optional?: boolean | undefined;
719
- selector: (state: ({
720
- id: string;
721
- type: "image" | "document" | "file" | (string & {});
722
- name: string;
723
- contentType?: string | undefined;
724
- file?: File;
725
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
726
- } & {
727
- status: import("@assistant-ui/core").PendingAttachmentStatus;
728
- file: File;
729
- } & {
730
- readonly source: "edit-composer";
731
- } & {
732
- source: "edit-composer";
733
- }) | ({
734
- id: string;
735
- type: "image" | "document" | "file" | (string & {});
736
- name: string;
737
- contentType?: string | undefined;
738
- file?: File;
739
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
740
- } & {
741
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
742
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
743
- } & {
744
- readonly source: "edit-composer";
745
- } & {
746
- source: "edit-composer";
747
- })) => TSelected;
748
- }): TSelected | null;
749
- <TSelected>(options: {
750
- optional?: boolean | undefined;
751
- selector: ((state: ({
752
- id: string;
753
- type: "image" | "document" | "file" | (string & {});
754
- name: string;
755
- contentType?: string | undefined;
756
- file?: File;
757
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
758
- } & {
759
- status: import("@assistant-ui/core").PendingAttachmentStatus;
760
- file: File;
761
- } & {
762
- readonly source: "edit-composer";
763
- } & {
764
- source: "edit-composer";
765
- }) | ({
766
- id: string;
767
- type: "image" | "document" | "file" | (string & {});
768
- name: string;
769
- contentType?: string | undefined;
770
- file?: File;
771
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
772
- } & {
773
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
774
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
775
- } & {
776
- readonly source: "edit-composer";
777
- } & {
778
- source: "edit-composer";
779
- })) => TSelected) | undefined;
780
- }): ({
781
- id: string;
782
- type: "image" | "document" | "file" | (string & {});
783
- name: string;
784
- contentType?: string | undefined;
785
- file?: File;
786
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
787
- } & {
788
- status: import("@assistant-ui/core").PendingAttachmentStatus;
789
- file: File;
790
- } & {
791
- readonly source: "edit-composer";
792
- } & {
793
- source: "edit-composer";
794
- }) | ({
795
- id: string;
796
- type: "image" | "document" | "file" | (string & {});
797
- name: string;
798
- contentType?: string | undefined;
799
- file?: File;
800
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
801
- } & {
802
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
803
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
804
- } & {
805
- readonly source: "edit-composer";
806
- } & {
807
- source: "edit-composer";
808
- }) | TSelected | null;
809
- };
810
- declare const useMessageAttachment: {
811
- (): {
812
- id: string;
813
- type: "image" | "document" | "file" | (string & {});
814
- name: string;
815
- contentType?: string | undefined;
816
- file?: File;
817
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
818
- } & {
819
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
820
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
821
- } & {
822
- readonly source: "message";
823
- } & {
824
- source: "message";
825
- };
826
- <TSelected>(selector: (state: {
827
- id: string;
828
- type: "image" | "document" | "file" | (string & {});
829
- name: string;
830
- contentType?: string | undefined;
831
- file?: File;
832
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
833
- } & {
834
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
835
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
836
- } & {
837
- readonly source: "message";
838
- } & {
839
- source: "message";
840
- }) => TSelected): TSelected;
841
- <TSelected>(selector: ((state: {
842
- id: string;
843
- type: "image" | "document" | "file" | (string & {});
844
- name: string;
845
- contentType?: string | undefined;
846
- file?: File;
847
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
848
- } & {
849
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
850
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
851
- } & {
852
- readonly source: "message";
853
- } & {
854
- source: "message";
855
- }) => TSelected) | undefined): ({
856
- id: string;
857
- type: "image" | "document" | "file" | (string & {});
858
- name: string;
859
- contentType?: string | undefined;
860
- file?: File;
861
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
862
- } & {
863
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
864
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
865
- } & {
866
- readonly source: "message";
867
- } & {
868
- source: "message";
869
- }) | TSelected;
870
- (options: {
871
- optional?: false | undefined;
872
- }): {
873
- id: string;
874
- type: "image" | "document" | "file" | (string & {});
875
- name: string;
876
- contentType?: string | undefined;
877
- file?: File;
878
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
879
- } & {
880
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
881
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
882
- } & {
883
- readonly source: "message";
884
- } & {
885
- source: "message";
886
- };
887
- (options: {
888
- optional?: boolean | undefined;
889
- }): ({
890
- id: string;
891
- type: "image" | "document" | "file" | (string & {});
892
- name: string;
893
- contentType?: string | undefined;
894
- file?: File;
895
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
896
- } & {
897
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
898
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
899
- } & {
900
- readonly source: "message";
901
- } & {
902
- source: "message";
903
- }) | null;
904
- <TSelected>(options: {
905
- optional?: false | undefined;
906
- selector: (state: {
907
- id: string;
908
- type: "image" | "document" | "file" | (string & {});
909
- name: string;
910
- contentType?: string | undefined;
911
- file?: File;
912
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
913
- } & {
914
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
915
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
916
- } & {
917
- readonly source: "message";
918
- } & {
919
- source: "message";
920
- }) => TSelected;
921
- }): TSelected;
922
- <TSelected>(options: {
923
- optional?: false | undefined;
924
- selector: ((state: {
925
- id: string;
926
- type: "image" | "document" | "file" | (string & {});
927
- name: string;
928
- contentType?: string | undefined;
929
- file?: File;
930
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
931
- } & {
932
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
933
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
934
- } & {
935
- readonly source: "message";
936
- } & {
937
- source: "message";
938
- }) => TSelected) | undefined;
939
- }): ({
940
- id: string;
941
- type: "image" | "document" | "file" | (string & {});
942
- name: string;
943
- contentType?: string | undefined;
944
- file?: File;
945
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
946
- } & {
947
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
948
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
949
- } & {
950
- readonly source: "message";
951
- } & {
952
- source: "message";
953
- }) | TSelected;
954
- <TSelected>(options: {
955
- optional?: boolean | undefined;
956
- selector: (state: {
957
- id: string;
958
- type: "image" | "document" | "file" | (string & {});
959
- name: string;
960
- contentType?: string | undefined;
961
- file?: File;
962
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
963
- } & {
964
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
965
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
966
- } & {
967
- readonly source: "message";
968
- } & {
969
- source: "message";
970
- }) => TSelected;
971
- }): TSelected | null;
972
- <TSelected>(options: {
973
- optional?: boolean | undefined;
974
- selector: ((state: {
975
- id: string;
976
- type: "image" | "document" | "file" | (string & {});
977
- name: string;
978
- contentType?: string | undefined;
979
- file?: File;
980
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
981
- } & {
982
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
983
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
984
- } & {
985
- readonly source: "message";
986
- } & {
987
- source: "message";
988
- }) => TSelected) | undefined;
989
- }): ({
990
- id: string;
991
- type: "image" | "document" | "file" | (string & {});
992
- name: string;
993
- contentType?: string | undefined;
994
- file?: File;
995
- content?: import("@assistant-ui/core").ThreadUserMessagePart[];
996
- } & {
997
- status: import("@assistant-ui/core").CompleteAttachmentStatus;
998
- content: import("@assistant-ui/core").ThreadUserMessagePart[];
999
- } & {
1000
- readonly source: "message";
1001
- } & {
1002
- source: "message";
1003
- }) | TSelected | null;
1004
- };
1005
- //#endregion
1006
- export { useAttachment, useAttachmentRuntime, useEditComposerAttachment, useEditComposerAttachmentRuntime, useMessageAttachment, useMessageAttachmentRuntime, useThreadComposerAttachment, useThreadComposerAttachmentRuntime };
1007
- //# sourceMappingURL=AttachmentContext.d.ts.map