Debugger Continuity (FE) (#3318)

This commit is contained in:
Jonathan Dobson
2025-08-29 13:30:53 -04:00
committed by GitHub
parent 410343276d
commit 47d51be796
13 changed files with 767 additions and 25 deletions

View File

@@ -0,0 +1,25 @@
import { getClient } from "@/api/AxiosClient";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { useQuery } from "@tanstack/react-query";
type Props = {
workflowPermanentId?: string;
};
function useDebugSessionBlockOutputsQuery({ workflowPermanentId }: Props) {
const credentialGetter = useCredentialGetter();
return useQuery<{ [k: string]: { extracted_information: unknown } }>({
queryKey: ["block-outputs", workflowPermanentId],
queryFn: async () => {
const client = await getClient(credentialGetter, "sans-api-v1");
const result = await client
.get(`/debug-session/${workflowPermanentId}/block-outputs`)
.then((response) => response.data);
return result;
},
enabled: !!workflowPermanentId,
});
}
export { useDebugSessionBlockOutputsQuery };