Copilot query migration (#3057)