diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts index c91fd470e0ff1..d6995b0c5ad2e 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts @@ -197,13 +197,6 @@ describe('autocomplete', () => { } }); - describe('meta', () => { - testSuggestions('meta ', ['FUNCTIONS']); - for (const fn of ['functions']) { - testSuggestions(`meta ${fn} `, ['|']); - } - }); - describe('where', () => { const allEvalFns = getFunctionSignaturesByReturnType('where', 'any', { evalMath: true, diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts index 2485b32837a5b..cd672c628979f 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts @@ -62,19 +62,6 @@ export const commandDefinitions: CommandDefinition[] = [ params: [{ name: 'index', type: 'source', wildcards: true }], }, }, - { - name: 'meta', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.metaDoc', { - defaultMessage: 'Returns information about the ES|QL environment', - }), - examples: ['meta functions'], - options: [], - modes: [], - signature: { - multipleParams: false, - params: [{ name: 'functions', type: 'function' }], - }, - }, { name: 'show', description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.showDoc', { diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json index 98bcf3468348e..20a38ac9edb54 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json +++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json @@ -2092,46 +2092,6 @@ ], "warning": [] }, - { - "query": "meta", - "error": [ - "SyntaxError: missing 'functions' at ''" - ], - "warning": [] - }, - { - "query": "meta functions", - "error": [], - "warning": [] - }, - { - "query": "meta functions()", - "error": [ - "SyntaxError: token recognition error at: '('", - "SyntaxError: token recognition error at: ')'" - ], - "warning": [] - }, - { - "query": "meta functions blah", - "error": [ - "SyntaxError: token recognition error at: 'b'", - "SyntaxError: token recognition error at: 'l'", - "SyntaxError: token recognition error at: 'a'", - "SyntaxError: token recognition error at: 'h'" - ], - "warning": [] - }, - { - "query": "meta info", - "error": [ - "SyntaxError: token recognition error at: 'i'", - "SyntaxError: token recognition error at: 'n'", - "SyntaxError: token recognition error at: 'fo'", - "SyntaxError: missing 'functions' at ''" - ], - "warning": [] - }, { "query": "show", "error": [ diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts index 7421621fd941d..099fff5d93641 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts @@ -450,40 +450,8 @@ describe('validation logic', () => { }); }); - describe('meta', () => { - testErrorsAndWarnings('meta', ["SyntaxError: missing 'functions' at ''"]); - testErrorsAndWarnings('meta functions', []); - testErrorsAndWarnings('meta functions()', [ - "SyntaxError: token recognition error at: '('", - "SyntaxError: token recognition error at: ')'", - ]); - testErrorsAndWarnings('meta functions blah', [ - "SyntaxError: token recognition error at: 'b'", - "SyntaxError: token recognition error at: 'l'", - "SyntaxError: token recognition error at: 'a'", - "SyntaxError: token recognition error at: 'h'", - ]); - testErrorsAndWarnings('meta info', [ - "SyntaxError: token recognition error at: 'i'", - "SyntaxError: token recognition error at: 'n'", - "SyntaxError: token recognition error at: 'fo'", - "SyntaxError: missing 'functions' at ''", - ]); - }); - describe('show', () => { testErrorsAndWarnings('show', ["SyntaxError: missing 'info' at ''"]); - testErrorsAndWarnings('show functions', [ - "SyntaxError: token recognition error at: 'f'", - "SyntaxError: token recognition error at: 'u'", - "SyntaxError: token recognition error at: 'n'", - "SyntaxError: token recognition error at: 'c'", - "SyntaxError: token recognition error at: 't'", - "SyntaxError: token recognition error at: 'io'", - "SyntaxError: token recognition error at: 'n'", - "SyntaxError: token recognition error at: 's'", - "SyntaxError: missing 'info' at ''", - ]); testErrorsAndWarnings('show info', []); testErrorsAndWarnings('show numberField', [ "SyntaxError: token recognition error at: 'n'", @@ -1555,22 +1523,6 @@ describe('validation logic', () => { }); }); - it('should call fields callbacks also for meta command', async () => { - const callbackMocks = getCallbackMocks(); - await validateQuery( - `meta functions | keep name`, - getAstAndSyntaxErrors, - undefined, - callbackMocks - ); - expect(callbackMocks.getSources).not.toHaveBeenCalled(); - expect(callbackMocks.getPolicies).not.toHaveBeenCalled(); - expect(callbackMocks.getFieldsFor).toHaveBeenCalledTimes(1); - expect(callbackMocks.getFieldsFor).toHaveBeenLastCalledWith({ - query: 'meta functions', - }); - }); - it('should call fields callbacks also for show command', async () => { const callbackMocks = getCallbackMocks(); await validateQuery( diff --git a/packages/kbn-monaco/src/esql/lib/esql_theme.ts b/packages/kbn-monaco/src/esql/lib/esql_theme.ts index 80f9fc5400989..4b212685e8a59 100644 --- a/packages/kbn-monaco/src/esql/lib/esql_theme.ts +++ b/packages/kbn-monaco/src/esql/lib/esql_theme.ts @@ -48,7 +48,7 @@ export const buildESQlTheme = (): monaco.editor.IStandaloneThemeData => ({ // source commands ...buildRuleGroup( - ['from', 'row', 'show', 'meta'], + ['from', 'row', 'show'], euiThemeVars.euiColorPrimaryText, true // isBold ),