Skip to content

Commit 16e7c21

Browse files
stratoulaniros1
authored andcommitted
[ES|QL] Do not ask for extensions when the editor is empty (#235302)
## Summary We should not ask for the extensions when the query is empty. <img width="1075" height="463" alt="image" src="https://github.com/user-attachments/assets/7c53e30e-4ddb-47c2-b70c-7b8cac678efa" />
1 parent 3eba310 commit 16e7c21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/platform/packages/private/kbn-esql-editor/src/esql_editor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,9 @@ const ESQLEditorInternal = function ESQLEditor({
553553
getJoinIndices,
554554
getTimeseriesIndices: kibana.services?.esql?.getTimeseriesIndicesAutocomplete,
555555
getEditorExtensions: async (queryString: string) => {
556-
if (activeSolutionId) {
556+
// Only fetch recommendations if there's an active solutionId and a non-empty query
557+
// Otherwise the route will return an error
558+
if (activeSolutionId && queryString.trim() !== '') {
557559
return (
558560
(await kibana.services?.esql?.getEditorExtensionsAutocomplete(
559561
queryString,

0 commit comments

Comments
 (0)