Add :pages to :default-queries in config

I was actually thinking about this and I think this feature would have a ton of potential for great uses.

For example, imagine I want to add a button to all my pages that says “Open in VS Code” and when pressing the button, it opens the Logseq page in VS Code. I could simply have the following query appear on all pages:

#+BEGIN_QUERY
 {
:query [:find (pull ?f [:file/path])
      :in $ ?current-page
      :where
      [?p :block/name ?current-page]
      [?p :block/file ?f]
]
:inputs [:current-page]
:result-transform (fn [results] (map :file/path results))
:view (fn [result]
       [:div.flex.flex-col
        (for [file result]
          [:a {:href (str "vscode://file" file)} "Open in vs code"])])
}
#+END_QUERY

I can easily see how this idea could be expanded to have custom UI elements added to pages and a lot of interesting pieces of functionality.