-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[ES|QL] Fix nested editor marker leaks in autocomplete and introduce a shared autocomplete parsing boundary #260618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stratoula
merged 15 commits into
elastic:main
from
bartoval:esql-marker-cleanup-assignment
Apr 13, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a315d3c
Fix editor marker cleanup for autocomplete
bartoval 8fa03b5
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval e20190c
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval ac38612
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval c1723af
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval ff555da
add USER AGENT cleanup and friends
bartoval c2b2335
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval 42fc7a6
clean regex
bartoval 95dbbf1
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval 5b2e4fd
share trailing command regex util
bartoval f05be4b
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine 2cd0a4a
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval a9a1376
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval 02fe816
Merge branch 'main' into esql-marker-cleanup-assignment
bartoval a819bd5
clean dead import
bartoval File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,6 @@ import type { | |
| import { suggestForExpression } from '../../definitions/utils'; | ||
| import type { MapParameters } from '../../definitions/utils/autocomplete/map_expression'; | ||
| import { getCommandMapExpressionSuggestions } from '../../definitions/utils/autocomplete/map_expression'; | ||
| import { EDITOR_MARKER } from '../../definitions/constants'; | ||
| import { | ||
| pipeCompleteItem, | ||
| assignCompletionItem, | ||
|
|
@@ -85,7 +84,7 @@ function getPosition( | |
| return { position: CompletionPosition.AFTER_COMMAND }; | ||
| } | ||
|
|
||
| const expressionRoot = prompt?.text !== EDITOR_MARKER ? prompt : undefined; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested this by hand, I found no side effects |
||
| const expressionRoot = prompt; | ||
|
|
||
| // (function, literal, or existing column) - handle as primaryExpression | ||
| if (isFunctionExpression(expressionRoot) || isLiteral(prompt) || isExistingColumn) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the missing part of the task