MCPcopy
hub / github.com/TanStack/ai / useChangingChat

Function useChangingChat

packages/ai-react/tests/use-chat.test.ts:153–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151 }
152
153 function useChangingChat() {
154 const [id, setId] = useState('old-chat')
155 const chat = useChat({
156 connection: createMockConnectionAdapter(),
157 id,
158 persistence,
159 })
160
161 return { ...chat, setId }
162 }
163
164 const { result } = renderHook(() => useChangingChat())
165

Callers 1

use-chat.test.tsFile · 0.70

Calls 2

useChatFunction · 0.90

Tested by

no test coverage detected