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

Function useChangingChat

packages/ai-preact/tests/use-chat.test.ts:154–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

use-chat.test.tsFile · 0.70

Calls 2

useChatFunction · 0.90

Tested by

no test coverage detected