@assistant-ui/react 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { FC, PropsWithChildren } from 'react';
3
3
  import { TextareaAutosizeProps } from 'react-textarea-autosize';
4
- import { Message } from 'ai';
5
4
  import { UseChatHelpers } from 'ai/react';
5
+ import { UseBoundStore, StoreApi } from 'zustand';
6
6
 
7
7
  declare const ThreadRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
@@ -36,18 +36,18 @@ type ThreadMessagesProps = {
36
36
  components: {
37
37
  Message: React.ComponentType;
38
38
  UserMessage?: React.ComponentType;
39
- EditingUserMessage?: React.ComponentType;
39
+ EditComposer?: React.ComponentType;
40
40
  AssistantMessage?: React.ComponentType;
41
41
  } | {
42
42
  Message?: React.ComponentType;
43
43
  UserMessage: React.ComponentType;
44
- EditingUserMessage?: React.ComponentType;
44
+ EditComposer?: React.ComponentType;
45
45
  AssistantMessage: React.ComponentType;
46
46
  };
47
47
  };
48
48
  declare const ThreadMessages: FC<ThreadMessagesProps>;
49
49
 
50
- declare namespace index$5 {
50
+ declare namespace index$4 {
51
51
  export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadRoot as Root, ThreadViewport as Viewport };
52
52
  }
53
53
 
@@ -67,19 +67,65 @@ declare const ComposerSend: react.ForwardRefExoticComponent<Pick<Omit<react.Deta
67
67
  asChild?: boolean;
68
68
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
69
69
 
70
- declare const ComposerStop: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
70
+ declare const ComposerCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
71
71
  ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
72
72
  } & {
73
73
  asChild?: boolean;
74
74
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
75
75
 
76
- declare namespace index$4 {
77
- export { ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send, ComposerStop as Stop };
76
+ type ComposerIfFilters = {
77
+ editing: boolean | undefined;
78
+ };
79
+ type ComposerIfProps = PropsWithChildren<RequireAtLeastOne<ComposerIfFilters>>;
80
+ declare const ComposerIf: FC<ComposerIfProps>;
81
+
82
+ declare namespace index$3 {
83
+ export { ComposerCancel as Cancel, ComposerIf as If, ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send };
78
84
  }
79
85
 
86
+ type BranchState = {
87
+ branchId: number;
88
+ branchCount: number;
89
+ };
90
+
91
+ type ComposerState = {
92
+ isEditing: boolean;
93
+ canCancel: boolean;
94
+ edit: () => void;
95
+ send: () => void;
96
+ cancel: () => void;
97
+ value: string;
98
+ setValue: (value: string) => void;
99
+ };
100
+ type ComposerStore = {
101
+ useComposer: UseBoundStore<StoreApi<ComposerState>>;
102
+ };
103
+
104
+ type TextContent = {
105
+ type: "text";
106
+ text: string;
107
+ };
108
+ type ImageContent = {
109
+ type: "image";
110
+ image: string;
111
+ };
112
+ type ThreadUserMessageContent = TextContent | ImageContent;
113
+ type ThreadAssistantMessageContent = TextContent | ImageContent;
114
+ type ThreadUserMessage = {
115
+ id: string;
116
+ role: "user";
117
+ content: ThreadUserMessageContent[];
118
+ };
119
+ type ThreadAssistantMessage = {
120
+ id: string;
121
+ role: "assistant";
122
+ content: ThreadAssistantMessageContent[];
123
+ };
124
+ type ThreadMessage = ThreadUserMessage | ThreadAssistantMessage;
125
+
80
126
  type MessageProviderProps = {
81
127
  children?: React.ReactNode;
82
- message: Message;
128
+ message: ThreadMessage;
83
129
  };
84
130
  declare const MessageProvider: FC<MessageProviderProps>;
85
131
 
@@ -92,7 +138,6 @@ declare const MessageRoot: react.ForwardRefExoticComponent<Pick<Omit<react.Detai
92
138
  type MessageIfFilters = {
93
139
  user: boolean | undefined;
94
140
  assistant: boolean | undefined;
95
- editing: boolean | undefined;
96
141
  hasBranches: boolean | undefined;
97
142
  copied: boolean | undefined;
98
143
  lastOrHover: boolean | undefined;
@@ -104,10 +149,8 @@ declare const MessageIf: FC<MessageIfProps>;
104
149
 
105
150
  declare const MessageContent: FC;
106
151
 
107
- declare const MessageEditableContent: react.ForwardRefExoticComponent<TextareaAutosizeProps & react.RefAttributes<HTMLTextAreaElement>>;
108
-
109
- declare namespace index$3 {
110
- export { MessageContent as Content, MessageEditableContent as EditableContent, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
152
+ declare namespace index$2 {
153
+ export { MessageContent as Content, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
111
154
  }
112
155
 
113
156
  declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
@@ -134,7 +177,7 @@ declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.
134
177
  hideWhenSingleBranch?: boolean;
135
178
  } & react.RefAttributes<HTMLDivElement>>;
136
179
 
137
- declare namespace index$2 {
180
+ declare namespace index$1 {
138
181
  export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
139
182
  }
140
183
 
@@ -144,7 +187,8 @@ declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.Det
144
187
  asChild?: boolean;
145
188
  }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
146
189
  hideWhenBusy?: boolean;
147
- hideWhenNotLastOrHover?: boolean;
190
+ autohide?: "always" | "not-last" | "never";
191
+ autohideFloat?: "always" | "single-branch" | "never";
148
192
  } & react.RefAttributes<HTMLDivElement>>;
149
193
 
150
194
  type ActionBarCopyProps = {
@@ -168,75 +212,40 @@ declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.Det
168
212
  asChild?: boolean;
169
213
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
170
214
 
171
- declare namespace index$1 {
172
- export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
173
- }
174
-
175
- declare const EditBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
176
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
177
- } & {
178
- asChild?: boolean;
179
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
180
-
181
- declare const EditBarSave: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
182
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
183
- } & {
184
- asChild?: boolean;
185
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
186
-
187
- declare const EditBarCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
188
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
189
- } & {
190
- asChild?: boolean;
191
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
192
-
193
215
  declare namespace index {
194
- export { EditBarCancel as Cancel, EditBarRoot as Root, EditBarSave as Save };
216
+ export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
195
217
  }
196
218
 
197
- type ThreadProviderProps = {
219
+ type VercelAIChatAssistantProviderProps = {
198
220
  chat: UseChatHelpers;
199
221
  children: React.ReactNode;
200
222
  };
201
- declare const VercelAIThreadProvider: FC<ThreadProviderProps>;
202
-
203
- type BranchState = {
204
- branchId: number;
205
- branchCount: number;
206
- };
223
+ declare const VercelAIChatAssistantProvider: FC<VercelAIChatAssistantProviderProps>;
207
224
 
208
- type MessageEditState = {
209
- isEditing: false;
210
- } | {
211
- isEditing: true;
212
- value: string;
213
- };
214
- type MessageStore = {
215
- message: Message;
216
- editState: MessageEditState;
217
- setEditState: (value: MessageEditState) => void;
225
+ type MessageState = {
226
+ message: ThreadMessage;
218
227
  branchState: BranchState;
228
+ isLast: boolean;
219
229
  isCopied: boolean;
220
230
  setIsCopied: (value: boolean) => void;
221
231
  isHovering: boolean;
222
232
  setIsHovering: (value: boolean) => void;
223
233
  };
224
- declare const useMessageContext: <Selection>(consumerName: string, selector: (s: MessageStore) => Selection) => Selection;
234
+ type MessageStore = ComposerStore & {
235
+ useMessage: UseBoundStore<StoreApi<MessageState>>;
236
+ };
237
+ declare const useMessageContext: () => MessageStore;
225
238
 
226
239
  declare const useCopyMessage: ({ copiedDuration }: {
227
240
  copiedDuration?: number | undefined;
228
241
  }) => (() => void) | null;
229
242
 
230
- declare const useReloadMessage: () => (() => Promise<void>) | null;
243
+ declare const useReloadMessage: () => (() => void) | null;
231
244
 
232
245
  declare const useBeginMessageEdit: () => (() => void) | null;
233
246
 
234
- declare const useCancelMessageEdit: () => (() => void) | null;
235
-
236
- declare const useSaveMessageEdit: () => (() => void) | null;
237
-
238
247
  declare const useGoToNextBranch: () => (() => void) | null;
239
248
 
240
249
  declare const useGoToPreviousBranch: () => (() => void) | null;
241
250
 
242
- export { index$1 as ActionBarPrimitive, index$2 as BranchPickerPrimitive, index$4 as ComposerPrimitive, index as EditBarPrimitive, index$3 as MessagePrimitive, index$5 as ThreadPrimitive, VercelAIThreadProvider, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCancelMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage, useSaveMessageEdit };
251
+ export { index as ActionBarPrimitive, index$1 as BranchPickerPrimitive, index$3 as ComposerPrimitive, index$2 as MessagePrimitive, index$4 as ThreadPrimitive, VercelAIChatAssistantProvider as VercelAIAssistantProvider, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { FC, PropsWithChildren } from 'react';
3
3
  import { TextareaAutosizeProps } from 'react-textarea-autosize';
4
- import { Message } from 'ai';
5
4
  import { UseChatHelpers } from 'ai/react';
5
+ import { UseBoundStore, StoreApi } from 'zustand';
6
6
 
7
7
  declare const ThreadRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
@@ -36,18 +36,18 @@ type ThreadMessagesProps = {
36
36
  components: {
37
37
  Message: React.ComponentType;
38
38
  UserMessage?: React.ComponentType;
39
- EditingUserMessage?: React.ComponentType;
39
+ EditComposer?: React.ComponentType;
40
40
  AssistantMessage?: React.ComponentType;
41
41
  } | {
42
42
  Message?: React.ComponentType;
43
43
  UserMessage: React.ComponentType;
44
- EditingUserMessage?: React.ComponentType;
44
+ EditComposer?: React.ComponentType;
45
45
  AssistantMessage: React.ComponentType;
46
46
  };
47
47
  };
48
48
  declare const ThreadMessages: FC<ThreadMessagesProps>;
49
49
 
50
- declare namespace index$5 {
50
+ declare namespace index$4 {
51
51
  export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadRoot as Root, ThreadViewport as Viewport };
52
52
  }
53
53
 
@@ -67,19 +67,65 @@ declare const ComposerSend: react.ForwardRefExoticComponent<Pick<Omit<react.Deta
67
67
  asChild?: boolean;
68
68
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
69
69
 
70
- declare const ComposerStop: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
70
+ declare const ComposerCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
71
71
  ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
72
72
  } & {
73
73
  asChild?: boolean;
74
74
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
75
75
 
76
- declare namespace index$4 {
77
- export { ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send, ComposerStop as Stop };
76
+ type ComposerIfFilters = {
77
+ editing: boolean | undefined;
78
+ };
79
+ type ComposerIfProps = PropsWithChildren<RequireAtLeastOne<ComposerIfFilters>>;
80
+ declare const ComposerIf: FC<ComposerIfProps>;
81
+
82
+ declare namespace index$3 {
83
+ export { ComposerCancel as Cancel, ComposerIf as If, ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send };
78
84
  }
79
85
 
86
+ type BranchState = {
87
+ branchId: number;
88
+ branchCount: number;
89
+ };
90
+
91
+ type ComposerState = {
92
+ isEditing: boolean;
93
+ canCancel: boolean;
94
+ edit: () => void;
95
+ send: () => void;
96
+ cancel: () => void;
97
+ value: string;
98
+ setValue: (value: string) => void;
99
+ };
100
+ type ComposerStore = {
101
+ useComposer: UseBoundStore<StoreApi<ComposerState>>;
102
+ };
103
+
104
+ type TextContent = {
105
+ type: "text";
106
+ text: string;
107
+ };
108
+ type ImageContent = {
109
+ type: "image";
110
+ image: string;
111
+ };
112
+ type ThreadUserMessageContent = TextContent | ImageContent;
113
+ type ThreadAssistantMessageContent = TextContent | ImageContent;
114
+ type ThreadUserMessage = {
115
+ id: string;
116
+ role: "user";
117
+ content: ThreadUserMessageContent[];
118
+ };
119
+ type ThreadAssistantMessage = {
120
+ id: string;
121
+ role: "assistant";
122
+ content: ThreadAssistantMessageContent[];
123
+ };
124
+ type ThreadMessage = ThreadUserMessage | ThreadAssistantMessage;
125
+
80
126
  type MessageProviderProps = {
81
127
  children?: React.ReactNode;
82
- message: Message;
128
+ message: ThreadMessage;
83
129
  };
84
130
  declare const MessageProvider: FC<MessageProviderProps>;
85
131
 
@@ -92,7 +138,6 @@ declare const MessageRoot: react.ForwardRefExoticComponent<Pick<Omit<react.Detai
92
138
  type MessageIfFilters = {
93
139
  user: boolean | undefined;
94
140
  assistant: boolean | undefined;
95
- editing: boolean | undefined;
96
141
  hasBranches: boolean | undefined;
97
142
  copied: boolean | undefined;
98
143
  lastOrHover: boolean | undefined;
@@ -104,10 +149,8 @@ declare const MessageIf: FC<MessageIfProps>;
104
149
 
105
150
  declare const MessageContent: FC;
106
151
 
107
- declare const MessageEditableContent: react.ForwardRefExoticComponent<TextareaAutosizeProps & react.RefAttributes<HTMLTextAreaElement>>;
108
-
109
- declare namespace index$3 {
110
- export { MessageContent as Content, MessageEditableContent as EditableContent, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
152
+ declare namespace index$2 {
153
+ export { MessageContent as Content, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
111
154
  }
112
155
 
113
156
  declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
@@ -134,7 +177,7 @@ declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.
134
177
  hideWhenSingleBranch?: boolean;
135
178
  } & react.RefAttributes<HTMLDivElement>>;
136
179
 
137
- declare namespace index$2 {
180
+ declare namespace index$1 {
138
181
  export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
139
182
  }
140
183
 
@@ -144,7 +187,8 @@ declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.Det
144
187
  asChild?: boolean;
145
188
  }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
146
189
  hideWhenBusy?: boolean;
147
- hideWhenNotLastOrHover?: boolean;
190
+ autohide?: "always" | "not-last" | "never";
191
+ autohideFloat?: "always" | "single-branch" | "never";
148
192
  } & react.RefAttributes<HTMLDivElement>>;
149
193
 
150
194
  type ActionBarCopyProps = {
@@ -168,75 +212,40 @@ declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.Det
168
212
  asChild?: boolean;
169
213
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
170
214
 
171
- declare namespace index$1 {
172
- export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
173
- }
174
-
175
- declare const EditBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
176
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
177
- } & {
178
- asChild?: boolean;
179
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
180
-
181
- declare const EditBarSave: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
182
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
183
- } & {
184
- asChild?: boolean;
185
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
186
-
187
- declare const EditBarCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
188
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
189
- } & {
190
- asChild?: boolean;
191
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
192
-
193
215
  declare namespace index {
194
- export { EditBarCancel as Cancel, EditBarRoot as Root, EditBarSave as Save };
216
+ export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
195
217
  }
196
218
 
197
- type ThreadProviderProps = {
219
+ type VercelAIChatAssistantProviderProps = {
198
220
  chat: UseChatHelpers;
199
221
  children: React.ReactNode;
200
222
  };
201
- declare const VercelAIThreadProvider: FC<ThreadProviderProps>;
202
-
203
- type BranchState = {
204
- branchId: number;
205
- branchCount: number;
206
- };
223
+ declare const VercelAIChatAssistantProvider: FC<VercelAIChatAssistantProviderProps>;
207
224
 
208
- type MessageEditState = {
209
- isEditing: false;
210
- } | {
211
- isEditing: true;
212
- value: string;
213
- };
214
- type MessageStore = {
215
- message: Message;
216
- editState: MessageEditState;
217
- setEditState: (value: MessageEditState) => void;
225
+ type MessageState = {
226
+ message: ThreadMessage;
218
227
  branchState: BranchState;
228
+ isLast: boolean;
219
229
  isCopied: boolean;
220
230
  setIsCopied: (value: boolean) => void;
221
231
  isHovering: boolean;
222
232
  setIsHovering: (value: boolean) => void;
223
233
  };
224
- declare const useMessageContext: <Selection>(consumerName: string, selector: (s: MessageStore) => Selection) => Selection;
234
+ type MessageStore = ComposerStore & {
235
+ useMessage: UseBoundStore<StoreApi<MessageState>>;
236
+ };
237
+ declare const useMessageContext: () => MessageStore;
225
238
 
226
239
  declare const useCopyMessage: ({ copiedDuration }: {
227
240
  copiedDuration?: number | undefined;
228
241
  }) => (() => void) | null;
229
242
 
230
- declare const useReloadMessage: () => (() => Promise<void>) | null;
243
+ declare const useReloadMessage: () => (() => void) | null;
231
244
 
232
245
  declare const useBeginMessageEdit: () => (() => void) | null;
233
246
 
234
- declare const useCancelMessageEdit: () => (() => void) | null;
235
-
236
- declare const useSaveMessageEdit: () => (() => void) | null;
237
-
238
247
  declare const useGoToNextBranch: () => (() => void) | null;
239
248
 
240
249
  declare const useGoToPreviousBranch: () => (() => void) | null;
241
250
 
242
- export { index$1 as ActionBarPrimitive, index$2 as BranchPickerPrimitive, index$4 as ComposerPrimitive, index as EditBarPrimitive, index$3 as MessagePrimitive, index$5 as ThreadPrimitive, VercelAIThreadProvider, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCancelMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage, useSaveMessageEdit };
251
+ export { index as ActionBarPrimitive, index$1 as BranchPickerPrimitive, index$3 as ComposerPrimitive, index$2 as MessagePrimitive, index$4 as ThreadPrimitive, VercelAIChatAssistantProvider as VercelAIAssistantProvider, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage };