MCPcopy Index your code
hub / github.com/TanStack/ai / current

Function current

packages/ai-solid/tests/test-utils.ts:31–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 return {
30 result: {
31 get current() {
32 const hook = rendered.result
33 return {
34 messages: hook.messages(),
35 isLoading: hook.isLoading(),
36 error: hook.error(),
37 status: hook.status(),
38 isSubscribed: hook.isSubscribed(),
39 connectionStatus: hook.connectionStatus(),
40 sessionGenerating: hook.sessionGenerating(),
41 sendMessage: hook.sendMessage,
42 append: hook.append,
43 reload: hook.reload,
44 stop: hook.stop,
45 clear: hook.clear,
46 setMessages: hook.setMessages,
47 addToolResult: hook.addToolResult,
48 addToolApprovalResponse: hook.addToolApprovalResponse,
49 }
50 },
51 },
52 rerender: (_newOptions?: UseChatOptions) => {
53 // SolidJS doesn't have a rerender concept in the same way React does

Callers

nothing calls this directly

Calls 4

messagesMethod · 0.80
isSubscribedMethod · 0.80
errorMethod · 0.65
statusMethod · 0.45

Tested by

no test coverage detected