feat: add OperateDropdown and send debug message #918 (#1095)

### What problem does this PR solve?
feat: add OperateDropdown
feat: send debug message #918 

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-07 19:27:27 +08:00
committed by GitHub
parent 59efba3d87
commit 706985c188
19 changed files with 335 additions and 362 deletions

View File

@ -64,7 +64,7 @@ export const useSetFlow = () => {
);
queryClient.invalidateQueries({ queryKey: ['fetchFlowList'] });
}
return data?.retcode;
return data;
},
});

View File

@ -206,14 +206,14 @@ export const useSendMessageWithSse = (
//#region chat hooks
export const useScrollToBottom = (id?: string) => {
export const useScrollToBottom = (messages?: unknown) => {
const ref = useRef<HTMLDivElement>(null);
const scrollToBottom = useCallback(() => {
if (id) {
if (messages) {
ref.current?.scrollIntoView({ behavior: 'instant' });
}
}, [id]);
}, [messages]); // If the message changes, scroll to the bottom
useEffect(() => {
scrollToBottom();