shadow-cljs

witek 2025-02-02T10:25:31.146899Z

How can I trigger the :open-file-command ? In my browser application, compiled with shadow-cljs and running in development mode on my machine. Is it possible to require some shadow-cljs internal namespace and invoke some function which then invokes the :open-file-command and opens my editor?

thheller 2025-02-02T12:09:10.483819Z

it is used by this remote API. used when you click a file in the HUD warnings for example https://github.com/thheller/shadow-cljs/blob/eafa54c17ab3ac42cad939cfab7e2dede7fb5f1d/src/main/shadow/cljs/devtools/client/hud.cljs#L20-L39

thheller 2025-02-02T12:10:04.929439Z

you can just make a POST or just use that function

thheller 2025-02-02T12:12:22.046089Z

this is the server side code handling that post. not much going on there. https://github.com/thheller/shadow-cljs/blob/9d97fbe00fe2c0c7b339e9de7e6606f0bb3301f6/src/main/shadow/cljs/devtools/server/web/api.clj#L19-L50