Merge branch 'master' into yu/gall-rq-wire-ames-flow-kill

This commit is contained in:
yosoyubik 2022-05-03 14:07:39 +02:00
commit 3a3be391e3

View File

@ -2,8 +2,9 @@
/+ *server, agentio, default-agent, multipart, dbug, verb
|%
+$ card card:agent:gall
+$ state-0
$: :: local
+$ app-state
$: %2
:: local
charges=(map desk charge)
==
:: $cache: impermanent state
@ -11,7 +12,7 @@
by-base=(map term desk)
::
+$ inflated-state
[state-0 cache]
[app-state cache]
:: +lac: toggle verbosity
++ lac &
::
@ -50,12 +51,23 @@
++ on-load
|= =vase
^- (quip card _this)
=+ !<(old=state-0 vase)
=* cha ~(. ch q.byk.bowl)
|^
=+ !<(old=app-states vase)
=? old ?=(?(~ ^) -.old) [%1 old]
=^ cards old
?. ?=(%1 -.old) `old
=/ rein=cage kiln-rein+!>([%base %.y ~ ~])
=/ nuke=cage kiln-uninstall+!>(%hodl)
:_ old(- %2)
:~ [%pass /rein %agent [our.bowl %hood] %poke rein]
[%pass /nuke %agent [our.bowl %hood] %poke nuke]
==
?> ?=(%2 -.old)
=. -.state old
:: inflate-cache needs to be called after the state is set
::
=. +.state inflate-cache
`this
[cards this]
::
++ inflate-cache
^- cache
@ -64,6 +76,22 @@
|= [=desk =charge]
?. ?=(%glob -.href.docket.charge) ~
`:_(desk base.href.docket.charge)
::
+$ app-states
$^ state-0-ket
$% state-0-sig
state-1
app-state
==
::
+$ state-1 [%1 (map desk charge)]
+$ state-0-sig
$: ~
==
::
+$ state-0-ket
$: (map desk charge)
==
--
::
++ on-save !>(-.state)
@ -182,6 +210,8 @@
=^ cards state
?+ wire ~&(bad-docket-take+wire `state)
~ `state
[%rein ~] ~&(%reined `state)
[%nuke ~] ~&(%nuked `state)
[%kiln ~] take-kiln
[%charge @ *] (take-charge i.t.wire t.t.wire)
==