File tree Expand file tree Collapse file tree
docs/pages/reference/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { Tabs } from " nextra/components" ;
2- import { Callout } from " nextra/components" ;
31import { PropertyReference , LinkToCopilotCloud } from " @/components" ;
4- import UseCopilotChatShortSnippet from " @/snippets/use-copilot-chat-short-snippet.mdx" ;
52
3+ import { Tabs } from " nextra/components" ;
4+
5+ import { Callout } from " nextra/components" ;
66
77# useCopilotChat
88
@@ -30,9 +30,20 @@ export function YourComponent() {
3030 );
3131}
3232```
33-
34- <UseCopilotChatShortSnippet />
35-
33+
34+ ` useCopilotChat ` returns an object with the following properties:
35+
36+ ``` tsx
37+ const {
38+ visibleMessages, // An array of messages that are currently visible in the chat.
39+ appendMessage, // A function to append a message to the chat.
40+ setMessages, // A function to set the messages in the chat.
41+ deleteMessage, // A function to delete a message from the chat.
42+ reloadMessages, // A function to reload the messages from the API.
43+ stopGeneration, // A function to stop the generation of the next message.
44+ isLoading, // A boolean indicating if the chat is loading.
45+ } = useCopilotChat ();
46+ ```
3647
3748## Parameters
3849
You can’t perform that action at this time.
0 commit comments