Skip to content

Commit c3deb78

Browse files
fix(docs): copilot textarea auto generated docs
1 parent 7b475ac commit c3deb78

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

docs/pages/reference/hooks/useCopilotChat.mdx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Tabs } from "nextra/components";
2-
import { Callout } from "nextra/components";
31
import { 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

0 commit comments

Comments
 (0)