File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
src/platform/packages/shared/kbn-esql-ast/src Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,10 @@ export async function autocomplete(
5555 }
5656 // FROM something /
5757 else if ( indexes . length > 0 && / \s $ / . test ( innerText ) && ! isRestartingExpression ( innerText ) ) {
58- suggestions . push ( metadataSuggestion ) ;
58+ suggestions . push ( { ... pipeCompleteItem , sortText : '0' } ) ;
5959 suggestions . push ( commaCompleteItem ) ;
60- suggestions . push ( pipeCompleteItem ) ;
60+ suggestions . push ( metadataSuggestion ) ;
61+
6162 suggestions . push (
6263 ...( await getRecommendedQueriesSuggestions (
6364 context ?. editorExtensions ?? { recommendedFields : [ ] , recommendedQueries : [ ] } ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const metadataSuggestion: ISuggestionItem = withAutoSuggest({
3232 detail : i18n . translate ( 'kbn-esql-ast.esql.definitions.metadataDoc' , {
3333 defaultMessage : 'Metadata' ,
3434 } ) ,
35- sortText : '1 ' ,
35+ sortText : 'C ' ,
3636} ) ;
3737
3838export const getMetadataSuggestions = ( command : ESQLAstAllCommands , queryText : string ) => {
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ export async function additionalSourcesSuggestions(
181181 filterText : fragment ,
182182 text : fragment + ' | ' ,
183183 rangeToReplace,
184+ sortText : '0' ,
184185 } ) ,
185186 withAutoSuggest ( {
186187 ...commaCompleteItem ,
You can’t perform that action at this time.
0 commit comments