Replace the existing template search field (in the template insertion dialog) with the new TemplateSearchWidget, behind the $wgTemplateDataEnableDiscovery flag. This is a step in unifying the template search and recall feature in TemplateWizard and VisualEditor.
The new widget should behave in (almost) exactly the same way as the existing template search feature, including the optional dependency on CirrusSearch to improve the search behaviour.
This could either be done in an optional way, in which case VE would still have to have its own template-search feature, or it could introduce a new dependency of VisualEditor upon TemplateData. The latter is preferred, but a decision has not yet been made.