mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(feature)(chat-sdk) modify export log file name (#1484)
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user