diff --git a/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx b/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx index 6aaebc926..9f65e9e85 100644 --- a/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx +++ b/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx @@ -218,7 +218,7 @@ export const QueryCopilotPromptbar: React.FC = ({ generateSQLQueryResponse.explanation ? generateSQLQueryResponse.explanation : "N/A" }\r\n`; const currentGeneratedQuery = queryExplanation + generateSQLQueryResponse.sql; - const lastQuery = generatedQuery && query ? `${query}\r\n` : ""; + const lastQuery = query ? `${query}\r\n` : ""; setQuery(`${lastQuery}${currentGeneratedQuery}`); setGeneratedQuery(generateSQLQueryResponse.sql); setGeneratedQueryComments(generateSQLQueryResponse.explanation);