Skip to content

[ES|QL] Build function arguments suggestions from hints#246736

Merged
sddonne merged 25 commits intoelastic:mainfrom
sddonne:hints-2
Dec 22, 2025
Merged

[ES|QL] Build function arguments suggestions from hints#246736
sddonne merged 25 commits intoelastic:mainfrom
sddonne:hints-2

Conversation

@sddonne
Copy link
Contributor

@sddonne sddonne commented Dec 17, 2025

Closes #237794

Summary

For some special function arguments ES is now providing information about how to resolve them. For instance, functions that accepts inference endpoints.

image image

This PR adds support for the inference_endpoint hint, and an easy way to extend it to other hints.

@sddonne sddonne changed the title [ES|QL] Parameters from hints - V2 [ES|QL] Build function arguments suggestions from hints Dec 19, 2025
@sddonne sddonne added Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v9.4.0 release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Dec 19, 2025
@sddonne sddonne marked this pull request as ready for review December 19, 2025 12:36
@sddonne sddonne requested a review from a team as a code owner December 19, 2025 12:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great and is very close to what I had in mind, thanks for trying this approach!

serverlessOnly: true,
preview: true,
snapshotOnly: true,
snapshotOnly: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to true because we dont want to suggest it yet at kibana

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed, 0714374

* custom autocompletion handlers.
*
* For each hint we need to provide:
* - a suggestionResolver to generate the autocomplettion items to shown for that param.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* - a suggestionResolver to generate the autocomplettion items to shown for that param.
* - a suggestionResolver to generate the autocompletion items for this param.

*
* Important!
* Be mindful while implementing context resolvers, context is shared by the command and all functions used within it.
* If the data you need is already present, don't overwrite it, preffer merging it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If the data you need is already present, don't overwrite it, preffer merging it.
* If the data you need is already present, don't overwrite it, prefer merging it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this test

'entityType'
);

describe('function parameters built from hints', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (the built is confusing me)

Suggested change
describe('function parameters built from hints', () => {
describe('function parameters autocomplete from hints', () => {

@sddonne sddonne enabled auto-merge (squash) December 22, 2025 10:30
@sddonne sddonne merged commit d8d8d55 into elastic:main Dec 22, 2025
13 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #48 / Dataset Quality Dataset quality alerting "before all" hook in "Dataset quality alerting"
  • [job] [logs] Scout: [ platform / streams_app ] plugin / should handle network failures during a processor creation
  • [job] [logs] Scout: [ platform / streams_app ] plugin / stateful - Stream data processing - error handling and recovery - should handle network failures during a processor creation
  • [job] [logs] Jest Integration Tests #9 / Uprade package install version with package installed with a previous format install version should upgrade package install version for outdated packages

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
unifiedSearch 587 588 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/esql-language 614 619 +5

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 4.3MB 4.3MB +2.0KB
Unknown metric groups

API count

id before after diff
@kbn/esql-language 816 821 +5

History

mbondyra added a commit to mbondyra/kibana that referenced this pull request Dec 22, 2025
…d_step_back

* commit '51756d2722200a991607658d48ecda50aeb04a7d': (76 commits)
  [Synthetics] Fix SyncGlobalParamsSpaces flaky test (elastic#246487)
  [Synthetics] Fix useSyntheticsRules test (elastic#247259)
  [ES|QL] Fix index editor flaky test (elastic#247233)
  [ResponseOps][Reporting] Fix "failed to decrypt apiKey" error while disabling/enabling scheduled reports (elastic#247236)
  [Console] Update console definitions (main) (elastic#247214)
  [ES|QL] Esql indentation shortcut on the editor (elastic#247234)
  [Streams] Use original request for rules client when in default space (elastic#247014)
  Consolidate and improve unflattenObject (elastic#246725)
  [scout] use svl mode to run api-int tests (elastic#247223)
  SIEM Readiness V2 (elastic#245776)
  [ObsPresentation][A11y] Fix asset details flyout header announcement (elastic#246872)
  [Streams] Add abort support and silent mode for stream description generation (elastic#247082)
  [SLO] Add environment context to SLO feedback button (elastic#247221)
  Ignore the reason and retry systematically (elastic#246830)
  Update dependency @types/moment-duration-format to ^2.2.7 (main) (elastic#242221)
  [Streams 🌊 ] Add explicit waits for data grid rows before clicking expand button (elastic#246919)
  [Security Solution][Entity Analytics][Risk Scoring] Handle special characters in ESQL query for risk scoring (elastic#247060)
  [ML] Data frame analytics: Updates page headers (elastic#247097)
  [ES|QL] Build function arguments suggestions from hints (elastic#246736)
  Update dependency @hey-api/openapi-ts to v0.88.1 (main) (elastic#247210)
  ...
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 6, 2026
Closes elastic#237794

## Summary
For some special function arguments ES is now providing information
about how to resolve them. For instance, functions that accepts
inference endpoints.

<img width="1169" height="301" alt="image"
src="https://github.com/user-attachments/assets/9d3e212c-11dd-4a84-abfc-324587ea7c50"
/>
<img width="1163" height="261" alt="image"
src="https://github.com/user-attachments/assets/9900a836-f82c-4d03-9126-bd63156fd2b6"
/>

This PR adds support for the `inference_endpoint` hint, and an easy way
to extend it to other hints.

---------

Co-authored-by: Stratou <efstratia.kalafateli@elastic.co>
dej611 pushed a commit to dej611/kibana that referenced this pull request Jan 8, 2026
Closes elastic#237794

## Summary
For some special function arguments ES is now providing information
about how to resolve them. For instance, functions that accepts
inference endpoints.

<img width="1169" height="301" alt="image"
src="https://github.com/user-attachments/assets/9d3e212c-11dd-4a84-abfc-324587ea7c50"
/>
<img width="1163" height="261" alt="image"
src="https://github.com/user-attachments/assets/9900a836-f82c-4d03-9126-bd63156fd2b6"
/>

This PR adds support for the `inference_endpoint` hint, and an easy way
to extend it to other hints.

---------

Co-authored-by: Stratou <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:ESQL ES|QL related features in Kibana t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ES|QL] Support hints on the editor

3 participants