Feat: Add the user_id field to the agent log table and the embedded page. (#13596)

### What problem does this PR solve?

Feat: Add the `user_id` field to the agent log table and the embedded
page.
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2026-03-13 19:06:18 +08:00
committed by GitHub
parent cc7e94ffb6
commit cb49cd30c4
6 changed files with 63 additions and 23 deletions

View File

@@ -26,7 +26,7 @@ import {
useRef,
useState,
} from 'react';
import { useParams } from 'react-router';
import { useParams, useSearchParams } from 'react-router';
import { v4 as uuid } from 'uuid';
import { BeginId } from '../constant';
import { AgentChatLogContext } from '../context';
@@ -272,6 +272,10 @@ export const useSendAgentMessage = ({
removeFile,
} = useSetUploadResponseData();
const [searchParams] = useSearchParams();
const userId = searchParams.get('userId');
const { stopMessage } = useStopMessage();
const stopConversation = useCallback(() => {
@@ -315,6 +319,10 @@ export const useSendAgentMessage = ({
if (releaseMode) {
params.release = releaseMode;
}
if (userId) {
params.user_id = userId;
}
}
try {
@@ -341,12 +349,13 @@ export const useSendAgentMessage = ({
beginParams,
uploadResponseList,
sessionId,
releaseMode,
userId,
send,
clearUploadResponseList,
setValue,
removeLatestMessage,
refetch,
releaseMode,
],
);