Papercut: Add a banner if metered connection is detected
A nice feature for the download manager would be to warn the user if the connection is metered.
busctl get-property org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager org.freedesktop.NetworkManager Metered
This returns a u (uint32) enum value:
- 0 (NM_METERED_UNKNOWN)
- 1 (NM_METERED_YES)
- 2 (NM_METERED_NO)
- 3 (NM_METERED_GUESS_YES)
- 4 (NM_METERED_GUESS_NO)
This could be displayed as a banner. Which maybe also helpful for the chat view if the user is using an online provider and is offline (NM_CONNECTIVITY_*).
Hi, I'll have to think about this one cause it would require the Flatpak to have an additional permission
system-talk-name org.freedesktop.NetworkManager
Good to know. I did not think about the implication for the sandbox. Sounds quite far reaching. Maybe this is something that should be brought up in flatpaks issue tracker?
Don't worry about it, I control the Flatpak so if I really wanted to I could add the permission.
Of course if I did that it would have to go through review by the Flathub team, they would probably accept it but I'm still unsure if I want to add further permissions to Alpaca.
My point is that the permission would allow changing adding network configuration, right? Afaik checking network state in a flatpak should be possible without the possibility to make hostile network config changes. And if there is no low permission way to check, maybe the flatpak devs should talk about it.
Is it really useful as you will download the model only once and after that it will be offline and if you use api it does not use much data to show a banner it creates more complication. This is totally my view.
Maybe this can be useful to also show error screens when the user goes to "Available Models" and they're completely offline.
Still, I'm not sure if I want to add another permission to Alpaca, I'll think about it