Trivial changes & cleanup in talk-agent.
:::: /hoon/talk-agent/app :: ::
:: :: ::
::
-::TODO master changes, incl %notify
-::TODO guardian's todo's apply here too
::TODO make sure glyphs only get bound when joins succeed
:: ...this is a bit troublesome, because failed joins don't actually
:: unsubscribe us.
[%nex ~]
[%det cal]
?. ?=({$';' *} buf) ~
+ ?: ?=($reply -.u.jub) ~
:_ ~
[%txt (runt [14 '-'] `tape`['|' ' ' (tufa `(list @)`buf)])]
==
::
|= {num/$@(@ud {p/@u q/@ud}) sep/(list speech)}
^+ ..sh-work
- ::TODO =- (say (turn ... [%ire - s])) nest-fails on the - ???
+ :: =- (say (turn ... [%ire - s])) nest-fails on the - ???
::TODO what's friendlier, reply-to-null or error?
=/ ser/serial
?@ num
?: =(count 0) 0v0
=+ msg=(deli (dec count) num)
uid:(snag (sub count +(msg)) grams)
- (say (turn sep |=(s/speech [%ire `serial`ser s])))
+ (say (turn sep |=(s/speech [%ire ser s])))
::
::> ||
::> || %displaying-info
=+ lis=~(tr-rend tr settings.she gam)
?~ lis +>.$
%+ sh-fact %mor
- ::TODO? we need to cast, but not if we do =(0 (lent lis)) above instead..
%+ turn `(list tape)`lis
=+ nom=(scag 7 (cite:title our.bol))
|= t/tape
::
|= gam/telegram
^+ +>
- ::TODO is it cool to just assume all messages we print are already stored?
=+ num=(~(got by known) uid.gam)
=. +>.$
:: if the number isn't directly after latest, print it always.
$ire
=+ gam=(recall top.sep)
?~ gam $(sep sep.sep)
- :- %mor
- =- [- $(sep sep.sep) ~]
- :- %tan
- ::TODO in "wrong" order because they get printed in reverse...
- :~ :+ %rose [" " ~ ~]
+ =- mor+[tan+- $(sep sep.sep) ~]
+ %- flop %+ weld
+ [%leaf "in reply to: {(cite:title aut.u.gam)}: "]~
%+ turn (~(tr-text tr sef u.gam) width.cli)
|=(t/tape [%leaf t])
- ::
- [%leaf "in reply to: {(cite:title aut.u.gam)}: "]
- ==
::
$fat
[%mor $(sep sep.sep) tan+(tr-tach tac.sep) ~]
