/// What the chat stack's groups ask of the workspace that hosts them; each /// change syncs with the open-chat set. class ChatStackGroupActions { const ChatStackGroupActions({ required this.join, required this.leave, required this.rename, required this.ungroup, required this.closeAll, }); /// Puts [sessionIds] in [group] (making it when new); the open chats then /// take [order]. final void Function(List sessionIds, String group, List order) join; /// Takes [sessionIds] out of their group; the open chats take [order]. final void Function(List sessionIds, List order) leave; /// Renames a group (a name in use merges the two). final void Function(String from, String to) rename; /// Dissolves a group, its chats staying open, with Undo. final void Function(String group) ungroup; /// Closes every chat in a group, with Undo. final void Function(String group) closeAll; }