Makes chat-cli listen to graph-store rather than chat-store.
Along the way, cuts some features. No longer supports channel creation,
deletion, permission management or inviting. No longer lets you send
messages to multiple targets at once.
No longer displays messages from all joined chats, and no longer lets
you join or leave chats. Instead, chat-cli solely concerns itself with
viewing chat content you're already subscribed to (through use of
Landscape or other rich clients). ;view ~host/chat to start printing
messages for that chat when they come in, ;flee to toggle off. ;view to
see what chats are enabled, ;chats to see all available chats.
The removal of features acknowledges chat-cli's lack of real support for
the modern, group-centric state of userspace.
The intent of ;view ux is to prepare chat-cli for a multi-session
terminal world.
The +command-parser must now produce both a flag and a command noun.
If the flag is true, instantly runs the command from the noun.
If false, maintains standard behavior and only runs it on-return.
Improved the namespacing by dropping the app prefix on types, e.g.
chat-hook-action -> action. Compensated for shadowing by importing the
/sur files behind a face. End result is that a chat-hook-action becomes
an action:hook. Splits chat-json into lib/chat-{hook,store,view}. Uses
^? on changes files in /lib and /sur to discourage deeply nested
importing.
Downgrades unmanaged chat paths to their uglified versions, as used by
web chat. Removes "group-based" indicators and makes them implicit in
shorter paths instead.
Under mysterious conditions, chat-cli might get into a state where its
rendering width is set to zero. This makes sure we set it back to 80
if that's the case.
This commit is mostly just precaution.
During upgrade, we gassed _in_ a map, instead of _by_, causing it to use
set-style sorting, leading to incorrect lookups.
This fixes that upgrade logic, and re-builds the map for existing instances.
Re-enables chat creation, touches up invite logic, and makes everything
work with the new "un/managed" attribute of chats.
Changes the +target type, so requires state transition. We use that
opportunity to clean up our messages mirror (memory reclamation).
"Unmanaged" chats should work the same as they did before.
Group-based chats are secondary citizens, but supported by prepending
"group " to whatever target you want to use. ie:
;join group ~marzod/secret-club :: join a group-based chat
;group ~marzod/secret-club :: target a group-based chat
The latter case should be rarely needed, as glyphs remember this
attribute of their bound target.
Creating a group alongside a chat is supported through:
;create village-with-group /cool-kids
You can then invite to that group (and by extension the associated chat)
by doing:
;invite group /cool-kids ~rinsed-walrus