Roo-Code/webview-ui/src/components/ui/chat/useChatInput.ts

13 lines
288 B
TypeScript

import { useContext } from "react"
import { chatInputContext } from "./ChatInputProvider"
export const useChatInput = () => {
const context = useContext(chatInputContext)
if (!context) {
throw new Error("useChatInput must be used within a ChatInputProvider")
}
return context
}