Ideally, you would let the user use the goto anything panel and try working with on_activated. If that is for whatever reason not sufficient, you could also work with global states and try to hook the input view of the panel (yes, that is a view too), but I’m unsure how reliable that is. It has been a while since I had to mess with these.
Manually traversing the project folders to fill your own quick panel has the downsides of being slow and not respecting ST’s multiple pattern settings to in- and exclude files and folders. It could be emulated but would still be bothersome.