Feat: Displays the loading status of the data flow log #9869 (#10347)

### What problem does this PR solve?

Feat: Displays the loading status of the data flow log #9869

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-09-28 19:38:46 +08:00
committed by GitHub
parent f4cc4dbd30
commit 664bc0b961
9 changed files with 121 additions and 56 deletions

View File

@ -416,13 +416,11 @@ export const useUploadCanvasFileWithProgress = (
return { data, loading, uploadCanvasFile: mutateAsync };
};
export const useFetchMessageTrace = (
isStopFetchTrace: boolean,
canvasId?: string,
) => {
export const useFetchMessageTrace = (canvasId?: string) => {
const { id } = useParams();
const queryId = id || canvasId;
const [messageId, setMessageId] = useState('');
const [isStopFetchTrace, setISStopFetchTrace] = useState(false);
const {
data,
@ -442,11 +440,19 @@ export const useFetchMessageTrace = (
message_id: messageId,
});
return data?.data ?? [];
return Array.isArray(data?.data) ? data?.data : [];
},
});
return { data, loading, refetch, setMessageId, messageId };
return {
data,
loading,
refetch,
setMessageId,
messageId,
isStopFetchTrace,
setISStopFetchTrace,
};
};
export const useTestDbConnect = () => {