(feature)(chat-sdk) modify export log file name (#1484)

This commit is contained in:
williamhliu
2024-07-30 15:40:29 +08:00
committed by GitHub
parent e571ca1f55
commit b45f3d0663
2 changed files with 7 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ import { SqlInfoType } from '../../common/type';
import { exportTextFile } from '../../utils/utils';
type Props = {
agentId?: number;
queryId: number;
llmReq?: any;
llmResp?: any;
integrateSystem?: string;
@@ -19,6 +21,8 @@ type Props = {
};
const SqlItem: React.FC<Props> = ({
agentId,
queryId,
llmReq,
llmResp,
integrateSystem,
@@ -137,7 +141,7 @@ ${format(sqlInfo.querySQL)}
if (sqlInfo.querySQL) {
text += getQuerySQLText();
}
exportTextFile(text, 'file.txt');
exportTextFile(text, `supersonic-debug-${agentId}-${queryId}.log`);
};
return (

View File

@@ -358,6 +358,8 @@ const ChatItem: React.FC<Props> = ({
<>
{!isMobile && parseInfo?.sqlInfo && isDeveloper && isDebugMode && !isSimpleMode && (
<SqlItem
agentId={agentId}
queryId={parseInfo.queryId}
llmReq={llmReq}
llmResp={llmResp}
integrateSystem={integrateSystem}