diff --git a/README.md b/README.md index 5598568..34ae2ef 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,17 @@ -Respo workflow in Calcit-js +Message Buffer for Gemini API ---- > Respo web page based on [calcit-js](https://github.com/calcit-lang/calcit). -Demo https://repo.calcit-lang.org/respo-calcit-workflow/ . +Demo https://r.tiye.me/Termina/msg-buffer/ . -### Usages +Docs https://ai.google.dev/gemini-api/docs/get-started/tutorial?lang=rest#text-and-image_input . -To develop: +Configurations: -```bash -cr js # watching - -yarn # to install vite -yarn vite # watching and running on localhost:3000 -``` - -calcit-js is using [Calcit Editor](https://github.com/calcit-lang/editor). - -To build: - -```bash -yarn vite build -http-server dist/ -``` +- `gemini-key` in localStorage +- `?model=YOUR_MODEL`, defaults to `gemini-1.5-flash` ### Workflow diff --git a/calcit.cirru b/calcit.cirru index 5a55fbd..e93e511 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -6,6 +6,12 @@ :files $ {} |app.comp.container $ %{} :FileEntry :defs $ {} + |*abort-control $ %{} :CodeEntry (:doc |) + :code $ %{} :Expr (:at 1722536593016) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536594378) (:by |rJG4IHzWf) (:text |defatom) + |b $ %{} :Leaf (:at 1722536593016) (:by |rJG4IHzWf) (:text |*abort-control) + |h $ %{} :Leaf (:at 1722536595729) (:by |rJG4IHzWf) (:text |nil) |comp-container $ %{} :CodeEntry (:doc |) :code $ %{} :Expr (:at 1499755354983) (:by nil) :data $ {} @@ -71,6 +77,10 @@ :data $ {} |T $ %{} :Leaf (:at 1722425536183) (:by |rJG4IHzWf) (:text |:loading?) |b $ %{} :Leaf (:at 1722425536799) (:by |rJG4IHzWf) (:text |false) + |s $ %{} :Expr (:at 1722447937428) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447940405) (:by |rJG4IHzWf) (:text |:done?) + |b $ %{} :Leaf (:at 1722447941150) (:by |rJG4IHzWf) (:text |false) |T $ %{} :Expr (:at 1499755354983) (:by nil) :data $ {} |T $ %{} :Leaf (:at 1499755354983) (:by |root) (:text |div) @@ -87,6 +97,7 @@ |j $ %{} :Leaf (:at 1695659810151) (:by |rJG4IHzWf) (:text |css/global) |r $ %{} :Leaf (:at 1695659811823) (:by |rJG4IHzWf) (:text |css/row) |t $ %{} :Leaf (:at 1722411319222) (:by |rJG4IHzWf) (:text |css/fullscreen) + |u $ %{} :Leaf (:at 1722445873663) (:by |rJG4IHzWf) (:text |css/gap8) |n $ %{} :Expr (:at 1722425776469) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722425778013) (:by |rJG4IHzWf) (:text |:style) @@ -96,258 +107,509 @@ |b $ %{} :Expr (:at 1722425778784) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722425780294) (:by |rJG4IHzWf) (:text |:padding) - |b $ %{} :Leaf (:at 1722425785951) (:by |rJG4IHzWf) (:text "|\"8px") - |n $ %{} :Expr (:at 1722410831775) (:by |rJG4IHzWf) + |b $ %{} :Leaf (:at 1722445844636) (:by |rJG4IHzWf) (:text "|\"8px 8px") + |l $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1722410832425) (:by |rJG4IHzWf) (:text |div) - |L $ %{} :Expr (:at 1722410832597) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410833764) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1722410850331) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410853528) (:by |rJG4IHzWf) (:text |:class-name) - |b $ %{} :Expr (:at 1722410862456) (:by |rJG4IHzWf) - :data $ {} - |D $ %{} :Leaf (:at 1722410864666) (:by |rJG4IHzWf) (:text |str-spaced) - |L $ %{} :Leaf (:at 1722411290735) (:by |rJG4IHzWf) (:text |css/column) - |T $ %{} :Leaf (:at 1722410857712) (:by |rJG4IHzWf) (:text |css/flex) - |T $ %{} :Expr (:at 1512359496483) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1552321295613) (:by |rJG4IHzWf) (:text |textarea) - |j $ %{} :Expr (:at 1512359504511) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |css/expand) + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1512359504843) (:by |rJG4IHzWf) (:text |{}) - |j $ %{} :Expr (:at 1512359505095) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |:style) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1512359505740) (:by |rJG4IHzWf) (:text |:value) - |j $ %{} :Expr (:at 1512359518303) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |:flex) + |b $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |2) + |h $ %{} :Expr (:at 1722445847706) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1707416771738) (:by |rJG4IHzWf) (:text |:content) - |j $ %{} :Leaf (:at 1584780914332) (:by |rJG4IHzWf) (:text |state) - |n $ %{} :Expr (:at 1512359562842) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445848855) (:by |rJG4IHzWf) (:text |:padding) + |b $ %{} :Leaf (:at 1722445912821) (:by |rJG4IHzWf) (:text "|\"40px 16px 200px 16px") + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |if) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |:loading?) + |b $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1512359565393) (:by |rJG4IHzWf) (:text |:placeholder) - |j $ %{} :Leaf (:at 1707416774413) (:by |rJG4IHzWf) (:text "|\"Content") - |p $ %{} :Expr (:at 1512359616676) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |{}) + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1695659814960) (:by |rJG4IHzWf) (:text |:class-name) - |j $ %{} :Expr (:at 1512359674211) (:by |rJG4IHzWf) - :data $ {} - |D $ %{} :Leaf (:at 1695659817491) (:by |rJG4IHzWf) (:text |str-spaced) - |T $ %{} :Leaf (:at 1695659820870) (:by |rJG4IHzWf) (:text |css/textarea) - |q $ %{} :Expr (:at 1695659823308) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |<>) + |b $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text "|\"loading...") + |h $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |css/font-fancy) + |l $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |if) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1695659824883) (:by |rJG4IHzWf) (:text |:style) - |b $ %{} :Expr (:at 1695659825265) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |not) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1695659825265) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1695659825265) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1695659825265) (:by |rJG4IHzWf) (:text |:height) - |b $ %{} :Leaf (:at 1695659825265) (:by |rJG4IHzWf) (:text |320) - |h $ %{} :Expr (:at 1722411304003) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |blank?) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411304869) (:by |rJG4IHzWf) (:text |:width) - |b $ %{} :Leaf (:at 1722411306155) (:by |rJG4IHzWf) (:text "|\"100%") - |r $ %{} :Expr (:at 1512359551423) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |:answer) + |b $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1515731637149) (:by |root) (:text |:on-input) - |r $ %{} :Expr (:at 1573355456413) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1573355458962) (:by |rJG4IHzWf) (:text |fn) - |L $ %{} :Expr (:at 1573355459236) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1573355459482) (:by |rJG4IHzWf) (:text |e) - |j $ %{} :Leaf (:at 1573355459980) (:by |rJG4IHzWf) (:text |d!) - |T $ %{} :Expr (:at 1515731639686) (:by |root) + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |{}) + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |comp-md-block) + |b $ %{} :Expr (:at 1722482337736) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1573355463209) (:by |rJG4IHzWf) (:text |d!) - |r $ %{} :Leaf (:at 1584780918978) (:by |rJG4IHzWf) (:text |cursor) - |v $ %{} :Expr (:at 1584780929603) (:by |rJG4IHzWf) + |D $ %{} :Leaf (:at 1722482338700) (:by |rJG4IHzWf) (:text |->) + |T $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |:answer) + |b $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |state) + |b $ %{} :Expr (:at 1722482343883) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482347320) (:by |rJG4IHzWf) (:text |either) + |b $ %{} :Leaf (:at 1722482347683) (:by |rJG4IHzWf) (:text "|\"") + |h $ %{} :Expr (:at 1722482348223) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1584780932163) (:by |rJG4IHzWf) (:text |assoc) - |L $ %{} :Leaf (:at 1584780932805) (:by |rJG4IHzWf) (:text |state) - |P $ %{} :Leaf (:at 1584780935039) (:by |rJG4IHzWf) (:text |:content) - |T $ %{} :Expr (:at 1512359558827) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722483575784) (:by |rJG4IHzWf) (:text |.!replace) + |b $ %{} :Leaf (:at 1722483515004) (:by |rJG4IHzWf) (:text |pattern-spaced-code) + |h $ %{} :Expr (:at 1722482611544) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1512359559399) (:by |rJG4IHzWf) (:text |:value) - |j $ %{} :Leaf (:at 1573355472480) (:by |rJG4IHzWf) (:text |e) - |t $ %{} :Expr (:at 1722411326820) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722411330839) (:by |rJG4IHzWf) (:text |:on-keydown) - |b $ %{} :Expr (:at 1722411331108) (:by |rJG4IHzWf) + |D $ %{} :Leaf (:at 1722482616405) (:by |rJG4IHzWf) (:text |str) + |L $ %{} :Leaf (:at 1722482617960) (:by |rJG4IHzWf) (:text |&newline) + |T $ %{} :Leaf (:at 1722482626312) (:by |rJG4IHzWf) (:text "|\"```") + |h $ %{} :Expr (:at 1722445823902) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722445823902) (:by |rJG4IHzWf) (:text |{}) + |l $ %{} :Expr (:at 1722447914966) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411331377) (:by |rJG4IHzWf) (:text |fn) - |b $ %{} :Expr (:at 1722411331602) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722447915940) (:by |rJG4IHzWf) (:text |if) + |b $ %{} :Expr (:at 1722447920256) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411331806) (:by |rJG4IHzWf) (:text |e) - |b $ %{} :Leaf (:at 1722411332385) (:by |rJG4IHzWf) (:text |d!) - |h $ %{} :Expr (:at 1722411332892) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722447919916) (:by |rJG4IHzWf) (:text |:done?) + |b $ %{} :Leaf (:at 1722447921137) (:by |rJG4IHzWf) (:text |state) + |e $ %{} :Expr (:at 1722482006086) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411333276) (:by |rJG4IHzWf) (:text |if) - |b $ %{} :Expr (:at 1722411342125) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722482007064) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722482007395) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482007688) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722482015893) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482017960) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Leaf (:at 1722482021013) (:by |rJG4IHzWf) (:text |css/row-parted) + |e $ %{} :Expr (:at 1722482010473) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482011312) (:by |rJG4IHzWf) (:text |span) + |b $ %{} :Expr (:at 1722482012316) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482012629) (:by |rJG4IHzWf) (:text |{}) + |h $ %{} :Expr (:at 1722482028826) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1722411342892) (:by |rJG4IHzWf) (:text |and) - |T $ %{} :Expr (:at 1722411333486) (:by |rJG4IHzWf) + |D $ %{} :Leaf (:at 1722482030649) (:by |rJG4IHzWf) (:text |div) + |L $ %{} :Expr (:at 1722482031317) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482031618) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722482032340) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482034831) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Expr (:at 1722482060067) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722482062041) (:by |rJG4IHzWf) (:text |str-spaced) + |T $ %{} :Leaf (:at 1722482037621) (:by |rJG4IHzWf) (:text |css/row-middle) + |T $ %{} :Expr (:at 1722482008623) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411334021) (:by |rJG4IHzWf) (:text |=) - |X $ %{} :Leaf (:at 1722411340670) (:by |rJG4IHzWf) (:text |13) - |b $ %{} :Expr (:at 1722411335832) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722482008623) (:by |rJG4IHzWf) (:text |comp-copy) + |b $ %{} :Expr (:at 1722482008623) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411383431) (:by |rJG4IHzWf) (:text |:keycode) - |b $ %{} :Leaf (:at 1722411338078) (:by |rJG4IHzWf) (:text |e) - |b $ %{} :Expr (:at 1722411343368) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722482008623) (:by |rJG4IHzWf) (:text |:answer) + |b $ %{} :Leaf (:at 1722482008623) (:by |rJG4IHzWf) (:text |state) + |b $ %{} :Expr (:at 1722482101445) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411348276) (:by |rJG4IHzWf) (:text |:meta?) - |b $ %{} :Leaf (:at 1722411348640) (:by |rJG4IHzWf) (:text |e) - |h $ %{} :Expr (:at 1722411354926) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722482101445) (:by |rJG4IHzWf) (:text |=<) + |b $ %{} :Leaf (:at 1722482101445) (:by |rJG4IHzWf) (:text |2) + |h $ %{} :Leaf (:at 1722482101445) (:by |rJG4IHzWf) (:text |nil) + |h $ %{} :Expr (:at 1722482103855) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722482103855) (:by |rJG4IHzWf) (:text |<>) + |b $ %{} :Leaf (:at 1722482103855) (:by |rJG4IHzWf) (:text "|\"Copy raw") + |h $ %{} :Leaf (:at 1722482103855) (:by |rJG4IHzWf) (:text |css/font-fancy) + |h $ %{} :Expr (:at 1722447922037) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447926334) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722447926334) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447926334) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722448135667) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448139058) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Leaf (:at 1722448139381) (:by |rJG4IHzWf) (:text |style-more) + |h $ %{} :Expr (:at 1722447926334) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722411354926) (:by |rJG4IHzWf) (:text |submit-message!) - |b $ %{} :Leaf (:at 1722411354926) (:by |rJG4IHzWf) (:text |cursor) - |h $ %{} :Leaf (:at 1722411354926) (:by |rJG4IHzWf) (:text |state) - |l $ %{} :Leaf (:at 1722411354926) (:by |rJG4IHzWf) (:text |d!) - |b $ %{} :Expr (:at 1722410871827) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722447926334) (:by |rJG4IHzWf) (:text |<>) + |b $ %{} :Leaf (:at 1722448182876) (:by |rJG4IHzWf) (:text "|\"fetching more...") + |h $ %{} :Expr (:at 1722448074846) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722448078258) (:by |rJG4IHzWf) (:text |str-spaced) + |T $ %{} :Leaf (:at 1722447926334) (:by |rJG4IHzWf) (:text |css/font-fancy) + |r $ %{} :Expr (:at 1722536188689) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536196074) (:by |rJG4IHzWf) (:text |comp-message-box) + |b $ %{} :Expr (:at 1722536198436) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536198830) (:by |rJG4IHzWf) (:text |>>) + |b $ %{} :Leaf (:at 1722536199596) (:by |rJG4IHzWf) (:text |states) + |h $ %{} :Leaf (:at 1722536202560) (:by |rJG4IHzWf) (:text |:message-box) + |h $ %{} :Expr (:at 1722536439171) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536439798) (:by |rJG4IHzWf) (:text |fn) + |b $ %{} :Expr (:at 1722536440149) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536443636) (:by |rJG4IHzWf) (:text |text) + |b $ %{} :Leaf (:at 1722536444297) (:by |rJG4IHzWf) (:text |d!) + |h $ %{} :Expr (:at 1722536447091) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536447091) (:by |rJG4IHzWf) (:text |submit-message!) + |b $ %{} :Leaf (:at 1722536447091) (:by |rJG4IHzWf) (:text |cursor) + |h $ %{} :Leaf (:at 1722536447091) (:by |rJG4IHzWf) (:text |state) + |j $ %{} :Leaf (:at 1722536453018) (:by |rJG4IHzWf) (:text |text) + |l $ %{} :Leaf (:at 1722536447091) (:by |rJG4IHzWf) (:text |d!) + |x $ %{} :Expr (:at 1521954055333) (:by |root) + :data $ {} + |D $ %{} :Leaf (:at 1521954057510) (:by |root) (:text |when) + |L $ %{} :Leaf (:at 1521954059290) (:by |root) (:text |dev?) + |T $ %{} :Expr (:at 1507461809635) (:by |root) + :data $ {} + |T $ %{} :Leaf (:at 1507461815046) (:by |root) (:text |comp-reel) + |b $ %{} :Expr (:at 1584780610581) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1584780611347) (:by |rJG4IHzWf) (:text |>>) + |T $ %{} :Leaf (:at 1509727101297) (:by |root) (:text |states) + |j $ %{} :Leaf (:at 1584780613268) (:by |rJG4IHzWf) (:text |:reel) + |j $ %{} :Leaf (:at 1507461840459) (:by |root) (:text |reel) + |r $ %{} :Expr (:at 1507461840980) (:by |root) + :data $ {} + |T $ %{} :Leaf (:at 1507461841342) (:by |root) (:text |{}) + |comp-message-box $ %{} :CodeEntry (:doc |) + :code $ %{} :Expr (:at 1722536204293) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536213982) (:by |rJG4IHzWf) (:text |defcomp) + |b $ %{} :Leaf (:at 1722536204293) (:by |rJG4IHzWf) (:text |comp-message-box) + |h $ %{} :Expr (:at 1722536204293) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536210883) (:by |rJG4IHzWf) (:text |states) + |b $ %{} :Leaf (:at 1722536416126) (:by |rJG4IHzWf) (:text |on-submit) + |l $ %{} :Expr (:at 1722536215653) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722536216305) (:by |rJG4IHzWf) (:text |let) + |L $ %{} :Expr (:at 1722536216555) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Expr (:at 1722536239685) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536240505) (:by |rJG4IHzWf) (:text |cursor) + |b $ %{} :Expr (:at 1722536240674) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536241583) (:by |rJG4IHzWf) (:text |:cursor) + |b $ %{} :Leaf (:at 1722536242541) (:by |rJG4IHzWf) (:text |states) + |T $ %{} :Expr (:at 1722536216714) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536245819) (:by |rJG4IHzWf) (:text |state) + |b $ %{} :Expr (:at 1722536224983) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1722410872432) (:by |rJG4IHzWf) (:text |div) - |L $ %{} :Expr (:at 1722410872598) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536230451) (:by |rJG4IHzWf) (:text |either) + |b $ %{} :Expr (:at 1722536230771) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410872941) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1722425671128) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536231317) (:by |rJG4IHzWf) (:text |:data) + |b $ %{} :Leaf (:at 1722536233169) (:by |rJG4IHzWf) (:text |states) + |h $ %{} :Expr (:at 1722536234482) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536234805) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536235205) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425673819) (:by |rJG4IHzWf) (:text |:class-name) - |b $ %{} :Leaf (:at 1722425680932) (:by |rJG4IHzWf) (:text |css/row-parted) - |h $ %{} :Expr (:at 1722425755822) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536236503) (:by |rJG4IHzWf) (:text |:content) + |b $ %{} :Leaf (:at 1722536237836) (:by |rJG4IHzWf) (:text "|\"") + |T $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |str-spaced) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |css/center) + |h $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |css/flex) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |textarea) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:value) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425757266) (:by |rJG4IHzWf) (:text |:style) - |b $ %{} :Expr (:at 1722425757504) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722425757819) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1722425758075) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722425759091) (:by |rJG4IHzWf) (:text |:padding) - |b $ %{} :Leaf (:at 1722425771738) (:by |rJG4IHzWf) (:text "|\"8px 2px") - |P $ %{} :Expr (:at 1722425647145) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:content) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:placeholder) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text "|\"Content") + |l $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425648598) (:by |rJG4IHzWf) (:text |span) - |b $ %{} :Expr (:at 1722425650909) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425651238) (:by |rJG4IHzWf) (:text |{}) - |T $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |str-spaced) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |css/textarea) + |o $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |button) - |b $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:style) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:height) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |160) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |:class-name) - |b $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |css/button) - |h $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:width) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text "|\"100%") + |q $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:on-input) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |fn) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |:inner-text) - |b $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text "|\"Run") - |l $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |e) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |d!) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |:on-click) - |b $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |d!) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |cursor) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |fn) - |b $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:content) + |l $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |e) - |b $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |d!) - |h $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:value) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |e) + |s $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:on-keydown) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |fn) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |e) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |d!) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |if) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |and) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |;) - |b $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |println) - |h $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |=) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |13) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |:content) - |b $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |state) - |l $ %{} :Expr (:at 1722410839017) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:keycode) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |e) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |submit-message!) - |b $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |cursor) - |h $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |state) - |l $ %{} :Leaf (:at 1722410839017) (:by |rJG4IHzWf) (:text |d!) - |r $ %{} :Expr (:at 1499755354983) (:by nil) - :data $ {} - |T $ %{} :Leaf (:at 1499755354983) (:by |root) (:text |=<) - |j $ %{} :Leaf (:at 1584875384898) (:by |rJG4IHzWf) (:text |8) - |r $ %{} :Leaf (:at 1499755354983) (:by |root) (:text |nil) - |v $ %{} :Expr (:at 1499755354983) (:by nil) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:meta?) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |e) + |l $ %{} :Expr (:at 1722536419205) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536419900) (:by |rJG4IHzWf) (:text |on-submit) + |b $ %{} :Expr (:at 1722536423510) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536424418) (:by |rJG4IHzWf) (:text |:content) + |b $ %{} :Leaf (:at 1722536426394) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Leaf (:at 1722536427678) (:by |rJG4IHzWf) (:text |d!) + |l $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1499755354983) (:by |root) (:text |div) - |f $ %{} :Expr (:at 1512359526483) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |div) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1512359526843) (:by |rJG4IHzWf) (:text |{}) - |j $ %{} :Expr (:at 1535563521753) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |css/row-parted) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1695659829154) (:by |rJG4IHzWf) (:text |:class-name) - |j $ %{} :Leaf (:at 1695659830763) (:by |rJG4IHzWf) (:text |css/expand) - |t $ %{} :Expr (:at 1722425585424) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:style) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:padding) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text "|\"8px 2px") + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1722425586004) (:by |rJG4IHzWf) (:text |if) - |L $ %{} :Expr (:at 1722425587427) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |span) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425589022) (:by |rJG4IHzWf) (:text |:loading?) - |b $ %{} :Leaf (:at 1722425590365) (:by |rJG4IHzWf) (:text |state) - |P $ %{} :Expr (:at 1722425590827) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |l $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |button) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425591440) (:by |rJG4IHzWf) (:text |div) - |X $ %{} :Expr (:at 1722425594684) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425595101) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1722425593022) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:class-name) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |css/button) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425592632) (:by |rJG4IHzWf) (:text |<>) - |b $ %{} :Leaf (:at 1722425617960) (:by |rJG4IHzWf) (:text "|\"loading...") - |h $ %{} :Leaf (:at 1722425833782) (:by |rJG4IHzWf) (:text |css/font-fancy) - |T $ %{} :Expr (:at 1722410770787) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722410775501) (:by |rJG4IHzWf) (:text |if) - |b $ %{} :Expr (:at 1722410801445) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:inner-text) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text "|\"Ask") + |l $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1722410801986) (:by |rJG4IHzWf) (:text |not) - |T $ %{} :Expr (:at 1722410794347) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:on-click) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1722410800699) (:by |rJG4IHzWf) (:text |blank?) - |T $ %{} :Expr (:at 1722410775790) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |fn) + |b $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410790919) (:by |rJG4IHzWf) (:text |:answer) - |b $ %{} :Leaf (:at 1722410792541) (:by |rJG4IHzWf) (:text |state) - |h $ %{} :Expr (:at 1722410802992) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722410803616) (:by |rJG4IHzWf) (:text |div) - |X $ %{} :Expr (:at 1722410820331) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722410820683) (:by |rJG4IHzWf) (:text |{}) - |b $ %{} :Expr (:at 1722410803858) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722425495118) (:by |rJG4IHzWf) (:text |comp-md-block) - |b $ %{} :Expr (:at 1722410807029) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |e) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |d!) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410807029) (:by |rJG4IHzWf) (:text |:answer) - |b $ %{} :Leaf (:at 1722410807029) (:by |rJG4IHzWf) (:text |state) - |h $ %{} :Expr (:at 1722425496759) (:by |rJG4IHzWf) + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |;) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |println) + |h $ %{} :Expr (:at 1722536206569) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |:content) + |b $ %{} :Leaf (:at 1722536206569) (:by |rJG4IHzWf) (:text |state) + |l $ %{} :Expr (:at 1722536434666) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722425497203) (:by |rJG4IHzWf) (:text |{}) - |x $ %{} :Expr (:at 1521954055333) (:by |root) + |T $ %{} :Leaf (:at 1722536434666) (:by |rJG4IHzWf) (:text |on-submit) + |b $ %{} :Expr (:at 1722536434666) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536434666) (:by |rJG4IHzWf) (:text |:content) + |b $ %{} :Leaf (:at 1722536434666) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Leaf (:at 1722536434666) (:by |rJG4IHzWf) (:text |d!) + |get-gemini-key! $ %{} :CodeEntry (:doc |) + :code $ %{} :Expr (:at 1722448309409) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448309409) (:by |rJG4IHzWf) (:text |defn) + |b $ %{} :Leaf (:at 1722448309409) (:by |rJG4IHzWf) (:text |get-gemini-key!) + |h $ %{} :Expr (:at 1722448309409) (:by |rJG4IHzWf) + :data $ {} + |l $ %{} :Expr (:at 1722448313500) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722448315653) (:by |rJG4IHzWf) (:text |let) + |T $ %{} :Expr (:at 1722448316141) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Expr (:at 1722448316282) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1521954057510) (:by |root) (:text |when) - |L $ %{} :Leaf (:at 1521954059290) (:by |root) (:text |dev?) - |T $ %{} :Expr (:at 1507461809635) (:by |root) + |D $ %{} :Leaf (:at 1722448316980) (:by |rJG4IHzWf) (:text |key) + |T $ %{} :Expr (:at 1722448310934) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1507461815046) (:by |root) (:text |comp-reel) - |b $ %{} :Expr (:at 1584780610581) (:by |rJG4IHzWf) - :data $ {} - |D $ %{} :Leaf (:at 1584780611347) (:by |rJG4IHzWf) (:text |>>) - |T $ %{} :Leaf (:at 1509727101297) (:by |root) (:text |states) - |j $ %{} :Leaf (:at 1584780613268) (:by |rJG4IHzWf) (:text |:reel) - |j $ %{} :Leaf (:at 1507461840459) (:by |root) (:text |reel) - |r $ %{} :Expr (:at 1507461840980) (:by |root) + |T $ %{} :Leaf (:at 1722448310934) (:by |rJG4IHzWf) (:text |js/localStorage.getItem) + |b $ %{} :Leaf (:at 1722448310934) (:by |rJG4IHzWf) (:text "|\"gemini-key") + |X $ %{} :Expr (:at 1722448321528) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448320481) (:by |rJG4IHzWf) (:text |if) + |b $ %{} :Expr (:at 1722448323255) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448325686) (:by |rJG4IHzWf) (:text |blank?) + |b $ %{} :Leaf (:at 1722448326631) (:by |rJG4IHzWf) (:text |key) + |h $ %{} :Expr (:at 1722448328093) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448331004) (:by |rJG4IHzWf) (:text |js/alert) + |b $ %{} :Leaf (:at 1722448341536) (:by |rJG4IHzWf) (:text "|\"Required gemini-key in localStorage") + |b $ %{} :Leaf (:at 1722448319448) (:by |rJG4IHzWf) (:text |key) + |pattern-spaced-code $ %{} :CodeEntry (:doc |) + :code $ %{} :Expr (:at 1722483516034) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722483516034) (:by |rJG4IHzWf) (:text |def) + |b $ %{} :Leaf (:at 1722483516034) (:by |rJG4IHzWf) (:text |pattern-spaced-code) + |h $ %{} :Expr (:at 1722483610419) (:by |rJG4IHzWf) + :data $ {} + |5 $ %{} :Leaf (:at 1722483612439) (:by |rJG4IHzWf) (:text |noted) + |D $ %{} :Leaf (:at 1722483610993) (:by |rJG4IHzWf) (:text "|\"temp fix of nested code block") + |T $ %{} :Expr (:at 1722483516034) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722483552376) (:by |rJG4IHzWf) (:text |&raw-code) + |b $ %{} :Leaf (:at 1722483588111) (:by |rJG4IHzWf) (:text "|\"/\\n\\s+```/g") + |pick-model $ %{} :CodeEntry (:doc |) + :code $ %{} :Expr (:at 1722480815830) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722480815830) (:by |rJG4IHzWf) (:text |defn) + |b $ %{} :Leaf (:at 1722480815830) (:by |rJG4IHzWf) (:text |pick-model) + |e $ %{} :Expr (:at 1722480823778) (:by |rJG4IHzWf) + :data $ {} + |h $ %{} :Expr (:at 1722480815830) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722480836949) (:by |rJG4IHzWf) (:text |get-env) + |L $ %{} :Leaf (:at 1722480838937) (:by |rJG4IHzWf) (:text "|\"model") + |T $ %{} :Leaf (:at 1722480820908) (:by |rJG4IHzWf) (:text "|\"gemini-1.5-flash") + |style-more $ %{} :CodeEntry (:doc |) + :code $ %{} :Expr (:at 1722448082591) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448084612) (:by |rJG4IHzWf) (:text |defstyle) + |b $ %{} :Leaf (:at 1722448082591) (:by |rJG4IHzWf) (:text |style-more) + |h $ %{} :Expr (:at 1722448082591) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448085691) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722448085996) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448087023) (:by |rJG4IHzWf) (:text "|\"&") + |b $ %{} :Expr (:at 1722448087274) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448087573) (:by |rJG4IHzWf) (:text |{}) + |b $ %{} :Expr (:at 1722448089779) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448103830) (:by |rJG4IHzWf) (:text |:text-align) + |b $ %{} :Leaf (:at 1722448105242) (:by |rJG4IHzWf) (:text |:center) + |h $ %{} :Expr (:at 1722448108516) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448111955) (:by |rJG4IHzWf) (:text |:background-color) + |b $ %{} :Expr (:at 1722448112162) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1507461841342) (:by |root) (:text |{}) + |T $ %{} :Leaf (:at 1722448112471) (:by |rJG4IHzWf) (:text |hsl) + |b $ %{} :Leaf (:at 1722448112792) (:by |rJG4IHzWf) (:text |0) + |h $ %{} :Leaf (:at 1722448112992) (:by |rJG4IHzWf) (:text |0) + |l $ %{} :Leaf (:at 1722448148883) (:by |rJG4IHzWf) (:text |90) + |l $ %{} :Expr (:at 1722448151431) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448154884) (:by |rJG4IHzWf) (:text |:border-radius) + |b $ %{} :Leaf (:at 1722448172596) (:by |rJG4IHzWf) (:text |12) + |o $ %{} :Expr (:at 1722448158152) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448159438) (:by |rJG4IHzWf) (:text |:margin) + |b $ %{} :Leaf (:at 1722448164453) (:by |rJG4IHzWf) (:text |16) |submit-message! $ %{} :CodeEntry (:doc |) :code $ %{} :Expr (:at 1722409346610) (:by |rJG4IHzWf) :data $ {} @@ -357,11 +619,33 @@ :data $ {} |T $ %{} :Leaf (:at 1722409346610) (:by |rJG4IHzWf) (:text |cursor) |b $ %{} :Leaf (:at 1722409346610) (:by |rJG4IHzWf) (:text |state) + |e $ %{} :Leaf (:at 1722536402711) (:by |rJG4IHzWf) (:text |prompt-test) |h $ %{} :Leaf (:at 1722410766404) (:by |rJG4IHzWf) (:text |d!) |l $ %{} :Expr (:at 1722409347984) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722409349526) (:by |rJG4IHzWf) (:text |hint-fn) |b $ %{} :Leaf (:at 1722409350436) (:by |rJG4IHzWf) (:text |async) + |lT $ %{} :Expr (:at 1722536608603) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536615183) (:by |rJG4IHzWf) (:text |if-let) + |b $ %{} :Expr (:at 1722536611646) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722536620852) (:by |rJG4IHzWf) (:text |abort) + |T $ %{} :Expr (:at 1722536622931) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722536624092) (:by |rJG4IHzWf) (:text |deref) + |T $ %{} :Leaf (:at 1722536611444) (:by |rJG4IHzWf) (:text |*abort-control) + |h $ %{} :Expr (:at 1722536657102) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722536657601) (:by |rJG4IHzWf) (:text |do) + |L $ %{} :Expr (:at 1722536659137) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536663086) (:by |rJG4IHzWf) (:text |js/console.log) + |b $ %{} :Leaf (:at 1722536669226) (:by |rJG4IHzWf) (:text "|\"Aborting prev") + |T $ %{} :Expr (:at 1722536625917) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536631792) (:by |rJG4IHzWf) (:text |.!abort) + |b $ %{} :Leaf (:at 1722536633902) (:by |rJG4IHzWf) (:text |abort) |m $ %{} :Expr (:at 1722410955319) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722410956193) (:by |rJG4IHzWf) (:text |d!) @@ -388,14 +672,21 @@ |T $ %{} :Expr (:at 1722409352561) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722409352561) (:by |rJG4IHzWf) (:text |result) - |b $ %{} :Expr (:at 1722409352561) (:by |rJG4IHzWf) + |b $ %{} :Expr (:at 1722447080517) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722409352561) (:by |rJG4IHzWf) (:text |js-await) - |X $ %{} :Expr (:at 1722410309574) (:by |rJG4IHzWf) + |D $ %{} :Leaf (:at 1722447083217) (:by |rJG4IHzWf) (:text |js-await) + |T $ %{} :Expr (:at 1722410309574) (:by |rJG4IHzWf) :data $ {} |D $ %{} :Leaf (:at 1722410319548) (:by |rJG4IHzWf) (:text |.!post) |T $ %{} :Leaf (:at 1722410311824) (:by |rJG4IHzWf) (:text |axios) - |X $ %{} :Leaf (:at 1722426085194) (:by |rJG4IHzWf) (:text "|\"https://sf.chenyong.life/v1beta/models/gemini-1.5-pro:generateContent") + |X $ %{} :Expr (:at 1722480805746) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722480806471) (:by |rJG4IHzWf) (:text |str) + |T $ %{} :Leaf (:at 1722480859612) (:by |rJG4IHzWf) (:text "|\"https://sf.chenyong.life/v1beta/models/") + |b $ %{} :Expr (:at 1722480809062) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722480815201) (:by |rJG4IHzWf) (:text |pick-model) + |h $ %{} :Leaf (:at 1722480851526) (:by |rJG4IHzWf) (:text "|\":streamGenerateContent") |Z $ %{} :Expr (:at 1722410582786) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722410582786) (:by |rJG4IHzWf) (:text |js-object) @@ -420,10 +711,7 @@ |b $ %{} :Expr (:at 1722410582786) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722410582786) (:by |rJG4IHzWf) (:text |:text) - |b $ %{} :Expr (:at 1722410582786) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1722410582786) (:by |rJG4IHzWf) (:text |:content) - |b $ %{} :Leaf (:at 1722410582786) (:by |rJG4IHzWf) (:text |state) + |b $ %{} :Leaf (:at 1722536405448) (:by |rJG4IHzWf) (:text |prompt-test) |b $ %{} :Expr (:at 1722410320737) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722410323567) (:by |rJG4IHzWf) (:text |js-object) @@ -436,10 +724,13 @@ |b $ %{} :Expr (:at 1722410389535) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722410391267) (:by |rJG4IHzWf) (:text |:key) - |b $ %{} :Expr (:at 1722410392693) (:by |rJG4IHzWf) + |b $ %{} :Expr (:at 1722448303509) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410392693) (:by |rJG4IHzWf) (:text |js/localStorage.getItem) - |b $ %{} :Leaf (:at 1722410392693) (:by |rJG4IHzWf) (:text "|\"gemini-key") + |T $ %{} :Leaf (:at 1722448307986) (:by |rJG4IHzWf) (:text |get-gemini-key!) + |h $ %{} :Expr (:at 1722446159882) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722446161578) (:by |rJG4IHzWf) (:text |:alt) + |b $ %{} :Leaf (:at 1722446164742) (:by |rJG4IHzWf) (:text "|\"sse") |h $ %{} :Expr (:at 1722410402136) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722410403975) (:by |rJG4IHzWf) (:text |:headers) @@ -448,10 +739,90 @@ |T $ %{} :Leaf (:at 1722410406350) (:by |rJG4IHzWf) (:text |js-object) |b $ %{} :Expr (:at 1722410407857) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1722410412167) (:by |rJG4IHzWf) (:text "|\"Content-Type") - |b $ %{} :Leaf (:at 1722410416989) (:by |rJG4IHzWf) (:text "|\"application/json") + |T $ %{} :Leaf (:at 1722446644647) (:by |rJG4IHzWf) (:text |:Accept) + |b $ %{} :Leaf (:at 1722446475024) (:by |rJG4IHzWf) (:text "|\"text/event-stream") + |h $ %{} :Expr (:at 1722446632773) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722446759641) (:by |rJG4IHzWf) (:text |;) + |T $ %{} :Leaf (:at 1722446637165) (:by |rJG4IHzWf) (:text |:Content-Type) + |b $ %{} :Leaf (:at 1722446642044) (:by |rJG4IHzWf) (:text "|\"application/json") + |l $ %{} :Expr (:at 1722446754051) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722446755704) (:by |rJG4IHzWf) (:text |:responseType) + |b $ %{} :Leaf (:at 1722446757664) (:by |rJG4IHzWf) (:text "|\"stream") + |o $ %{} :Expr (:at 1722447153499) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447157927) (:by |rJG4IHzWf) (:text |:adapter) + |b $ %{} :Leaf (:at 1722447160885) (:by |rJG4IHzWf) (:text "|\"fetch") + |q $ %{} :Expr (:at 1722536545338) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536547676) (:by |rJG4IHzWf) (:text |:signal) + |b $ %{} :Expr (:at 1722536551083) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536568465) (:by |rJG4IHzWf) (:text |let) + |b $ %{} :Expr (:at 1722536571830) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Expr (:at 1722536573231) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536575164) (:by |rJG4IHzWf) (:text |abort) + |b $ %{} :Expr (:at 1722536578041) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536579985) (:by |rJG4IHzWf) (:text |new) + |b $ %{} :Leaf (:at 1722536583127) (:by |rJG4IHzWf) (:text |js/AbortController) + |h $ %{} :Expr (:at 1722536586304) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722536587130) (:by |rJG4IHzWf) (:text |reset!) + |b $ %{} :Leaf (:at 1722536592695) (:by |rJG4IHzWf) (:text |*abort-control) + |h $ %{} :Leaf (:at 1722536598645) (:by |rJG4IHzWf) (:text |abort) + |l $ %{} :Expr (:at 1722536884869) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722536890390) (:by |rJG4IHzWf) (:text |.-signal) + |T $ %{} :Leaf (:at 1722536602478) (:by |rJG4IHzWf) (:text |abort) + |X $ %{} :Expr (:at 1722446217609) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722446219380) (:by |rJG4IHzWf) (:text |stream) + |b $ %{} :Expr (:at 1722446220321) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722446222087) (:by |rJG4IHzWf) (:text |.-data) + |b $ %{} :Leaf (:at 1722446223864) (:by |rJG4IHzWf) (:text |result) + |Z $ %{} :Expr (:at 1722447346887) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447350186) (:by |rJG4IHzWf) (:text |reader) + |b $ %{} :Expr (:at 1722447371235) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722447372297) (:by |rJG4IHzWf) (:text |->) + |T $ %{} :Expr (:at 1722447351739) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447357337) (:by |rJG4IHzWf) (:text |.!pipeThrough) + |b $ %{} :Leaf (:at 1722447360433) (:by |rJG4IHzWf) (:text |stream) + |h $ %{} :Expr (:at 1722447361126) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447361685) (:by |rJG4IHzWf) (:text |new) + |b $ %{} :Leaf (:at 1722447367249) (:by |rJG4IHzWf) (:text |js/TextDecoderStream) + |b $ %{} :Expr (:at 1722447373007) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447376155) (:by |rJG4IHzWf) (:text |.!getReader) + |ZT $ %{} :Expr (:at 1722447780638) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447786715) (:by |rJG4IHzWf) (:text |*text) + |b $ %{} :Expr (:at 1722447787121) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447789052) (:by |rJG4IHzWf) (:text |atom) + |b $ %{} :Leaf (:at 1722447789444) (:by |rJG4IHzWf) (:text "|\"") + |a $ %{} :Expr (:at 1722447464352) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722447608856) (:by |rJG4IHzWf) (:text |;) + |T $ %{} :Leaf (:at 1722447466095) (:by |rJG4IHzWf) (:text |reading) + |b $ %{} :Expr (:at 1722447468140) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447468140) (:by |rJG4IHzWf) (:text |js-await) + |b $ %{} :Expr (:at 1722447468140) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447468140) (:by |rJG4IHzWf) (:text |.!read) + |b $ %{} :Leaf (:at 1722447468140) (:by |rJG4IHzWf) (:text |reader) |b $ %{} :Expr (:at 1722410728227) (:by |rJG4IHzWf) :data $ {} + |D $ %{} :Leaf (:at 1722446212290) (:by |rJG4IHzWf) (:text |;) |T $ %{} :Leaf (:at 1722410739218) (:by |rJG4IHzWf) (:text |answer) |b $ %{} :Expr (:at 1722410734329) (:by |rJG4IHzWf) :data $ {} @@ -466,6 +837,7 @@ |u $ %{} :Leaf (:at 1722410734329) (:by |rJG4IHzWf) (:text |.-text) |h $ %{} :Expr (:at 1722409352561) (:by |rJG4IHzWf) :data $ {} + |D $ %{} :Leaf (:at 1722446208836) (:by |rJG4IHzWf) (:text |;) |T $ %{} :Leaf (:at 1722410742738) (:by |rJG4IHzWf) (:text |d!) |b $ %{} :Leaf (:at 1722410745024) (:by |rJG4IHzWf) (:text |cursor) |h $ %{} :Expr (:at 1722425567125) (:by |rJG4IHzWf) @@ -485,6 +857,133 @@ |T $ %{} :Leaf (:at 1722425572698) (:by |rJG4IHzWf) (:text |assoc) |b $ %{} :Leaf (:at 1722425575401) (:by |rJG4IHzWf) (:text |:loading?) |h $ %{} :Leaf (:at 1722425748929) (:by |rJG4IHzWf) (:text |false) + |l $ %{} :Expr (:at 1722447556153) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447562182) (:by |rJG4IHzWf) (:text |apply-args) + |b $ %{} :Expr (:at 1722447563490) (:by |rJG4IHzWf) + :data $ {} + |h $ %{} :Expr (:at 1722447564203) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447564546) (:by |rJG4IHzWf) (:text |fn) + |b $ %{} :Expr (:at 1722447565797) (:by |rJG4IHzWf) + :data $ {} + |h $ %{} :Expr (:at 1722447575042) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447582309) (:by |rJG4IHzWf) (:text |hint-fn) + |b $ %{} :Leaf (:at 1722447583343) (:by |rJG4IHzWf) (:text |async) + |l $ %{} :Expr (:at 1722447592213) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447595070) (:by |rJG4IHzWf) (:text |let) + |b $ %{} :Expr (:at 1722447595500) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Expr (:at 1722447596814) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447600784) (:by |rJG4IHzWf) (:text |info) + |b $ %{} :Expr (:at 1722447601673) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447602889) (:by |rJG4IHzWf) (:text |js-await) + |b $ %{} :Expr (:at 1722447606502) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447606502) (:by |rJG4IHzWf) (:text |.!read) + |b $ %{} :Leaf (:at 1722447606502) (:by |rJG4IHzWf) (:text |reader) + |b $ %{} :Expr (:at 1722447619880) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447620597) (:by |rJG4IHzWf) (:text |value) + |b $ %{} :Expr (:at 1722447620861) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447621780) (:by |rJG4IHzWf) (:text |.-value) + |b $ %{} :Leaf (:at 1722447622281) (:by |rJG4IHzWf) (:text |info) + |h $ %{} :Expr (:at 1722447623740) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447625685) (:by |rJG4IHzWf) (:text |done?) + |b $ %{} :Expr (:at 1722447626040) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447627232) (:by |rJG4IHzWf) (:text |.-done) + |b $ %{} :Leaf (:at 1722447628065) (:by |rJG4IHzWf) (:text |info) + |h $ %{} :Expr (:at 1722447632874) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447633362) (:by |rJG4IHzWf) (:text |if) + |b $ %{} :Leaf (:at 1722447636243) (:by |rJG4IHzWf) (:text |done?) + |h $ %{} :Expr (:at 1722447859215) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |d!) + |b $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |cursor) + |h $ %{} :Expr (:at 1722447859215) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |->) + |b $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Expr (:at 1722447859215) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |:answer) + |h $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |@*text) + |l $ %{} :Expr (:at 1722447859215) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |:loading?) + |h $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |false) + |o $ %{} :Expr (:at 1722447859215) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722447859215) (:by |rJG4IHzWf) (:text |:done?) + |h $ %{} :Leaf (:at 1722448250705) (:by |rJG4IHzWf) (:text |true) + |l $ %{} :Expr (:at 1722447861509) (:by |rJG4IHzWf) + :data $ {} + |D $ %{} :Leaf (:at 1722448041120) (:by |rJG4IHzWf) (:text |let) + |H $ %{} :Expr (:at 1722448042069) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Expr (:at 1722448041599) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |content) + |b $ %{} :Expr (:at 1722448041599) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |->) + |b $ %{} :Expr (:at 1722448041599) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.!slice) + |b $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |value) + |h $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |6) + |h $ %{} :Expr (:at 1722448041599) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |js/JSON.parse) + |l $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.-candidates) + |o $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.-0) + |q $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.-content) + |s $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.-parts) + |t $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.-0) + |u $ %{} :Leaf (:at 1722448041599) (:by |rJG4IHzWf) (:text |.-text) + |J $ %{} :Expr (:at 1722448044752) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448044752) (:by |rJG4IHzWf) (:text |swap!) + |b $ %{} :Leaf (:at 1722448044752) (:by |rJG4IHzWf) (:text |*text) + |h $ %{} :Leaf (:at 1722448044752) (:by |rJG4IHzWf) (:text |str) + |l $ %{} :Leaf (:at 1722448044752) (:by |rJG4IHzWf) (:text |content) + |L $ %{} :Expr (:at 1722447863571) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |d!) + |b $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |cursor) + |h $ %{} :Expr (:at 1722447863571) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |->) + |b $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |state) + |h $ %{} :Expr (:at 1722447863571) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |:answer) + |h $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |@*text) + |l $ %{} :Expr (:at 1722447863571) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |:loading?) + |h $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |false) + |o $ %{} :Expr (:at 1722447863571) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |assoc) + |b $ %{} :Leaf (:at 1722447863571) (:by |rJG4IHzWf) (:text |:done?) + |h $ %{} :Leaf (:at 1722448253956) (:by |rJG4IHzWf) (:text |false) + |T $ %{} :Expr (:at 1722447641142) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722447642246) (:by |rJG4IHzWf) (:text |recur) :ns $ %{} :CodeEntry (:doc |) :code $ %{} :Expr (:at 1499755354983) (:by nil) :data $ {} @@ -505,6 +1004,13 @@ |h $ %{} :Expr (:at 1695659848197) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1695659850247) (:by |rJG4IHzWf) (:text |defstyle) + |u $ %{} :Expr (:at 1722448116666) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448121297) (:by |rJG4IHzWf) (:text |respo.util.format) + |b $ %{} :Leaf (:at 1722448122163) (:by |rJG4IHzWf) (:text |:refer) + |h $ %{} :Expr (:at 1722448122362) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722448122671) (:by |rJG4IHzWf) (:text |hsl) |v $ %{} :Expr (:at 1499755354983) (:by nil) :data $ {} |j $ %{} :Leaf (:at 1540958704705) (:by |root) (:text |respo.core) @@ -553,6 +1059,13 @@ |h $ %{} :Expr (:at 1722425486739) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1722425491341) (:by |rJG4IHzWf) (:text |comp-md-block) + |zY $ %{} :Expr (:at 1722481920058) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722481923050) (:by |rJG4IHzWf) (:text |respo-ui.comp) + |b $ %{} :Leaf (:at 1722481924032) (:by |rJG4IHzWf) (:text |:refer) + |h $ %{} :Expr (:at 1722481924307) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1722481924530) (:by |rJG4IHzWf) (:text |comp-copy) |app.config $ %{} :FileEntry :defs $ {} |dev? $ %{} :CodeEntry (:doc |) diff --git a/compact.cirru b/compact.cirru index 53d62cd..85b6ff4 100644 --- a/compact.cirru +++ b/compact.cirru @@ -6,6 +6,8 @@ :files $ {} |app.comp.container $ %{} :FileEntry :defs $ {} + |*abort-control $ %{} :CodeEntry (:doc |) + :code $ quote (defatom *abort-control nil) |comp-container $ %{} :CodeEntry (:doc |) :code $ quote defcomp comp-container (reel) @@ -14,73 +16,147 @@ states $ :states store cursor $ or (:cursor states) ([]) state $ or (:data states) - {} (:content "\"") (:answer nil) (:loading? false) + {} (:content "\"") (:answer nil) (:loading? false) (:done? false) div {} - :class-name $ str-spaced css/preset css/global css/row css/fullscreen - :style $ {} (:padding "\"8px") + :class-name $ str-spaced css/preset css/global css/row css/fullscreen css/gap8 + :style $ {} (:padding "\"8px 8px") div - {} $ :class-name (str-spaced css/column css/flex) - textarea $ {} - :value $ :content state - :placeholder "\"Content" - :class-name $ str-spaced css/textarea - :style $ {} (:height 320) (:width "\"100%") - :on-input $ fn (e d!) - d! cursor $ assoc state :content (:value e) - :on-keydown $ fn (e d!) - if - and - = 13 $ :keycode e - :meta? e - submit-message! cursor state d! - div - {} (:class-name css/row-parted) - :style $ {} (:padding "\"8px 2px") - span $ {} - button $ {} (:class-name css/button) (:inner-text "\"Run") - :on-click $ fn (e d!) - ; println $ :content state - submit-message! cursor state d! - =< 8 nil - div - {} $ :class-name css/expand + {} (:class-name css/expand) + :style $ {} (:flex 2) (:padding "\"40px 16px 200px 16px") if (:loading? state) div ({}) (<> "\"loading..." css/font-fancy) if not $ blank? (:answer state) div ({}) - comp-md-block (:answer state) ({}) + comp-md-block + -> (:answer state) (either "\"") + .!replace pattern-spaced-code $ str &newline "\"```" + {} + if (:done? state) + div + {} $ :class-name css/row-parted + span $ {} + div + {} $ :class-name (str-spaced css/row-middle) + comp-copy $ :answer state + =< 2 nil + <> "\"Copy raw" css/font-fancy + div + {} $ :class-name style-more + <> "\"fetching more..." $ str-spaced css/font-fancy + comp-message-box (>> states :message-box) + fn (text d!) (submit-message! cursor state text d!) when dev? $ comp-reel (>> states :reel) reel ({}) + |comp-message-box $ %{} :CodeEntry (:doc |) + :code $ quote + defcomp comp-message-box (states on-submit) + let + cursor $ :cursor states + state $ either (:data states) + {} $ :content "\"" + div + {} $ :class-name (str-spaced css/center css/flex) + textarea $ {} + :value $ :content state + :placeholder "\"Content" + :class-name $ str-spaced css/textarea + :style $ {} (:height 160) (:width "\"100%") + :on-input $ fn (e d!) + d! cursor $ assoc state :content (:value e) + :on-keydown $ fn (e d!) + if + and + = 13 $ :keycode e + :meta? e + on-submit (:content state) d! + div + {} (:class-name css/row-parted) + :style $ {} (:padding "\"8px 2px") + span $ {} + button $ {} (:class-name css/button) (:inner-text "\"Ask") + :on-click $ fn (e d!) + ; println $ :content state + on-submit (:content state) d! + |get-gemini-key! $ %{} :CodeEntry (:doc |) + :code $ quote + defn get-gemini-key! () $ let + key $ js/localStorage.getItem "\"gemini-key" + if (blank? key) (js/alert "\"Required gemini-key in localStorage") + , key + |pattern-spaced-code $ %{} :CodeEntry (:doc |) + :code $ quote + def pattern-spaced-code $ noted "\"temp fix of nested code block" (&raw-code "\"/\\n\\s+```/g") + |pick-model $ %{} :CodeEntry (:doc |) + :code $ quote + defn pick-model () $ get-env "\"model" "\"gemini-1.5-flash" + |style-more $ %{} :CodeEntry (:doc |) + :code $ quote + defstyle style-more $ {} + "\"&" $ {} (:text-align :center) + :background-color $ hsl 0 0 90 + :border-radius 12 + :margin 16 |submit-message! $ %{} :CodeEntry (:doc |) :code $ quote - defn submit-message! (cursor state d!) (hint-fn async) + defn submit-message! (cursor state prompt-test d!) (hint-fn async) + if-let + abort $ deref *abort-control + do (js/console.log "\"Aborting prev") (.!abort abort) d! cursor $ -> state (assoc :answer nil) (assoc :loading? true) let result $ js-await - .!post axios "\"https://sf.chenyong.life/v1beta/models/gemini-1.5-pro:generateContent" + .!post axios + str "\"https://sf.chenyong.life/v1beta/models/" (pick-model) "\":streamGenerateContent" js-object $ :contents js-array $ js-object :parts $ js-array - js-object $ :text (:content state) + js-object $ :text prompt-test js-object :params $ js-object - :key $ js/localStorage.getItem "\"gemini-key" - :headers $ js-object ("\"Content-Type" "\"application/json") - answer $ -> result .-data .-candidates .-0 .-content .-parts .-0 .-text - d! cursor $ -> state + :key $ get-gemini-key! + :alt "\"sse" + :headers $ js-object (:Accept "\"text/event-stream") (; :Content-Type "\"application/json") + :responseType "\"stream" + :adapter "\"fetch" + :signal $ let + abort $ new js/AbortController + reset! *abort-control abort + .-signal abort + stream $ .-data result + reader $ -> + .!pipeThrough stream $ new js/TextDecoderStream + .!getReader + *text $ atom "\"" + ; reading $ js-await (.!read reader) + ; answer $ -> result .-data .-candidates .-0 .-content .-parts .-0 .-text + ; d! cursor $ -> state assoc :answer $ w-log answer assoc :loading? false + apply-args () $ fn () (hint-fn async) + let + info $ js-await (.!read reader) + value $ .-value info + done? $ .-done info + if done? + d! cursor $ -> state (assoc :answer @*text) (assoc :loading? false) (assoc :done? true) + let + content $ -> (.!slice value 6) (js/JSON.parse) .-candidates .-0 .-content .-parts .-0 .-text + swap! *text str content + d! cursor $ -> state (assoc :answer @*text) (assoc :loading? false) (assoc :done? false) + recur :ns $ %{} :CodeEntry (:doc |) :code $ quote ns app.comp.container $ :require (respo-ui.css :as css) respo.css :refer $ defstyle + respo.util.format :refer $ hsl respo.core :refer $ defcomp defeffect <> >> div button textarea span input respo.comp.space :refer $ =< reel.comp.reel :refer $ comp-reel app.config :refer $ dev? "\"axios" :default axios respo-md.comp.md :refer $ comp-md-block + respo-ui.comp :refer $ comp-copy |app.config $ %{} :FileEntry :defs $ {} |dev? $ %{} :CodeEntry (:doc |) diff --git a/index.html b/index.html index 61dbff6..f6ca222 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,8 @@
-