The terminal hyperlink thing seems quite useful. Kitty has some magic where if you click a hyperlink over a direct ssh connection it shows you a menu that has some options like download or download/open in editor/reupload when done. I haven't checked the details yet how it determines that you are in an ssh session.
See here for an overview:
https://github.com/albertz/wiki/blob/master/terminal-escape-...
There are a couple of non-standard extensions, e.g. by iTerm:
https://iterm2.com/documentation-escape-codes.html https://iterm2.com/documentation-images.html
Some of them are pretty complicated to standardize. E.g. see this discussion on simple image support:
https://gitlab.freedesktop.org/terminal-wg/specifications/-/...