diff --git a/webapp/packages/chat-sdk/src/common/type.ts b/webapp/packages/chat-sdk/src/common/type.ts index aa601ab61..09d409ad8 100644 --- a/webapp/packages/chat-sdk/src/common/type.ts +++ b/webapp/packages/chat-sdk/src/common/type.ts @@ -73,8 +73,8 @@ export type EntityDimensionType = { }; export type SqlInfoType = { - s2SQL: string; - correctS2SQL: string; + parsedS2SQL: string; + correctedS2SQL: string; querySQL: string; }; diff --git a/webapp/packages/chat-sdk/src/components/ChatItem/SqlItem.tsx b/webapp/packages/chat-sdk/src/components/ChatItem/SqlItem.tsx index 21cbfd9ba..499c01989 100644 --- a/webapp/packages/chat-sdk/src/components/ChatItem/SqlItem.tsx +++ b/webapp/packages/chat-sdk/src/components/ChatItem/SqlItem.tsx @@ -38,7 +38,7 @@ const SqlItem: React.FC = ({ setSqlType(''); }; - if (!llmReq && !sqlInfo.s2SQL && !sqlInfo.correctS2SQL && !sqlInfo.querySQL) { + if (!llmReq && !sqlInfo.parsedS2SQL && !sqlInfo.correctedS2SQL && !sqlInfo.querySQL) { return null; } @@ -87,25 +87,25 @@ const SqlItem: React.FC = ({ Few-shot示例 )} - {sqlInfo.s2SQL && ( + {sqlInfo.parsedS2SQL && (
{ - setSqlType(sqlType === 's2SQL' ? '' : 's2SQL'); + setSqlType(sqlType === 'parsedS2SQL' ? '' : 'parsedS2SQL'); }} > {queryMode === 'LLM_S2SQL' || queryMode === 'PLAIN_TEXT' ? 'LLM' : 'Rule'}解析S2SQL
)} - {sqlInfo.correctS2SQL && ( + {sqlInfo.correctedS2SQL && (
{ - setSqlType(sqlType === 'correctS2SQL' ? '' : 'correctS2SQL'); + setSqlType(sqlType === 'correctedS2SQL' ? '' : 'correctedS2SQL'); }} > 修正S2SQL