From 6cc88949fd7b41a797d61912846b626f99af4e94 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Thu, 4 Jul 2024 11:17:18 +0200 Subject: [PATCH] small nit --- .../server/functions/query/correct_common_esql_mistakes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/correct_common_esql_mistakes.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/correct_common_esql_mistakes.ts index b22960fccd351..181c919587a61 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/correct_common_esql_mistakes.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/correct_common_esql_mistakes.ts @@ -240,7 +240,7 @@ export function correctCommonEsqlMistakes(query: string): { // gets the index pattern from the FROM command using AST parsing const indexPattern = getIndexPatternFromESQLQuery(formattedCommand); const indexPatternWithFixedQuotes = replaceSingleQuotesWithDoubleQuotes(indexPattern); - formattedCommand = formattedCommand.replace(indexPattern, indexPatternWithFixedQuotes); + formattedCommand = `FROM ${indexPatternWithFixedQuotes}`; break; } case 'WHERE':