mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-16 04:28:38 +00:00
13 lines
300 B
TypeScript
13 lines
300 B
TypeScript
import { useContext } from "react"
|
|
|
|
import { chatMessageContext } from "./ChatMessageProvider"
|
|
|
|
export const useChatMessage = () => {
|
|
const context = useContext(chatMessageContext)
|
|
|
|
if (!context) {
|
|
throw new Error("useChatMessage must be used within a ChatMessageProvider")
|
|
}
|
|
|
|
return context
|
|
}
|