"use client"; import type { AssistantCloud } from "assistant-cloud"; import type { AssistantRuntime } from "@assistant-ui/core"; import { useRemoteThreadListRuntime } from "../runtime-cores/remote-thread-list/useRemoteThreadListRuntime"; import { useCloudThreadListAdapter } from "../runtime-cores/remote-thread-list/adapter/cloud"; type ThreadData = { externalId: string; }; type CloudThreadListAdapter = { cloud: AssistantCloud; runtimeHook: () => AssistantRuntime; create?(): Promise; delete?(threadId: string): Promise; }; export function useCloudThreadListRuntime({ runtimeHook, ...adapterOptions }: CloudThreadListAdapter) { const adapter = useCloudThreadListAdapter(adapterOptions); return useRemoteThreadListRuntime({ runtimeHook, adapter, allowNesting: true, }); }