mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +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';
|
import { exportTextFile } from '../../utils/utils';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
agentId?: number;
|
||||||
|
queryId: number;
|
||||||
llmReq?: any;
|
llmReq?: any;
|
||||||
llmResp?: any;
|
llmResp?: any;
|
||||||
integrateSystem?: string;
|
integrateSystem?: string;
|
||||||
@@ -19,6 +21,8 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const SqlItem: React.FC<Props> = ({
|
const SqlItem: React.FC<Props> = ({
|
||||||
|
agentId,
|
||||||
|
queryId,
|
||||||
llmReq,
|
llmReq,
|
||||||
llmResp,
|
llmResp,
|
||||||
integrateSystem,
|
integrateSystem,
|
||||||
@@ -137,7 +141,7 @@ ${format(sqlInfo.querySQL)}
|
|||||||
if (sqlInfo.querySQL) {
|
if (sqlInfo.querySQL) {
|
||||||
text += getQuerySQLText();
|
text += getQuerySQLText();
|
||||||
}
|
}
|
||||||
exportTextFile(text, 'file.txt');
|
exportTextFile(text, `supersonic-debug-${agentId}-${queryId}.log`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -358,6 +358,8 @@ const ChatItem: React.FC<Props> = ({
|
|||||||
<>
|
<>
|
||||||
{!isMobile && parseInfo?.sqlInfo && isDeveloper && isDebugMode && !isSimpleMode && (
|
{!isMobile && parseInfo?.sqlInfo && isDeveloper && isDebugMode && !isSimpleMode && (
|
||||||
<SqlItem
|
<SqlItem
|
||||||
|
agentId={agentId}
|
||||||
|
queryId={parseInfo.queryId}
|
||||||
llmReq={llmReq}
|
llmReq={llmReq}
|
||||||
llmResp={llmResp}
|
llmResp={llmResp}
|
||||||
integrateSystem={integrateSystem}
|
integrateSystem={integrateSystem}
|
||||||
|
|||||||
Reference in New Issue
Block a user