From f68564ba553dabc5fe43c609f52c581624c32d9b Mon Sep 17 00:00:00 2001 From: tiye Date: Mon, 21 Oct 2024 21:56:03 +0800 Subject: [PATCH] fix invisible empty state --- calcit.cirru | 25 +++++++++++++------------ compact.cirru | 9 ++++----- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/calcit.cirru b/calcit.cirru index 4ffb0d6..9c11e69 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -1766,8 +1766,8 @@ :data $ {} |T $ %{} :Leaf (:at 1729360299061) (:by |rJG4IHzWf) (:text |::) |b $ %{} :Leaf (:at 1729360299061) (:by |rJG4IHzWf) (:text |:item) - |h $ %{} :Leaf (:at 1729360996001) (:by |rJG4IHzWf) (:text |:claude) - |l $ %{} :Leaf (:at 1729360326714) (:by |rJG4IHzWf) (:text "|\"Claude") + |h $ %{} :Leaf (:at 1729517109263) (:by |rJG4IHzWf) (:text |:claude) + |l $ %{} :Leaf (:at 1729517105732) (:by |rJG4IHzWf) (:text "|\"Claude") |l $ %{} :Expr (:at 1729360299061) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1729360299061) (:by |rJG4IHzWf) (:text |::) @@ -1855,10 +1855,14 @@ |b $ %{} :Expr (:at 1729360661362) (:by |rJG4IHzWf) :data $ {} |D $ %{} :Leaf (:at 1729360662707) (:by |rJG4IHzWf) (:text |turn-str) - |T $ %{} :Expr (:at 1729360656731) (:by |rJG4IHzWf) + |T $ %{} :Expr (:at 1729516963082) (:by |rJG4IHzWf) :data $ {} - |T $ %{} :Leaf (:at 1729360659395) (:by |rJG4IHzWf) (:text |:model) - |b $ %{} :Leaf (:at 1729360660167) (:by |rJG4IHzWf) (:text |state) + |D $ %{} :Leaf (:at 1729516966274) (:by |rJG4IHzWf) (:text |or) + |T $ %{} :Expr (:at 1729360656731) (:by |rJG4IHzWf) + :data $ {} + |T $ %{} :Leaf (:at 1729360659395) (:by |rJG4IHzWf) (:text |:model) + |b $ %{} :Leaf (:at 1729360660167) (:by |rJG4IHzWf) (:text |state) + |b $ %{} :Leaf (:at 1729516969293) (:by |rJG4IHzWf) (:text "|\"Gemini") |h $ %{} :Expr (:at 1728102616259) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1728102616259) (:by |rJG4IHzWf) (:text |:class-name) @@ -3040,13 +3044,10 @@ |o $ %{} :Expr (:at 1728103361255) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1729360703921) (:by |rJG4IHzWf) (:text |case-default) - |a $ %{} :Expr (:at 1729360955332) (:by |rJG4IHzWf) + |a $ %{} :Expr (:at 1729360947362) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1729360957836) (:by |rJG4IHzWf) (:text |w-js-log) - |T $ %{} :Expr (:at 1729360947362) (:by |rJG4IHzWf) - :data $ {} - |T $ %{} :Leaf (:at 1729360948288) (:by |rJG4IHzWf) (:text |:model) - |b $ %{} :Leaf (:at 1729360949878) (:by |rJG4IHzWf) (:text |state) + |T $ %{} :Leaf (:at 1729360948288) (:by |rJG4IHzWf) (:text |:model) + |b $ %{} :Leaf (:at 1729360949878) (:by |rJG4IHzWf) (:text |state) |d $ %{} :Expr (:at 1729360694408) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1729360694408) (:by |rJG4IHzWf) (:text |call-gemini-msg!) @@ -3056,7 +3057,7 @@ |o $ %{} :Leaf (:at 1729360694408) (:by |rJG4IHzWf) (:text |d!) |h $ %{} :Expr (:at 1729360683058) (:by |rJG4IHzWf) :data $ {} - |D $ %{} :Leaf (:at 1729360683649) (:by |rJG4IHzWf) (:text |:anthropic) + |D $ %{} :Leaf (:at 1729517120516) (:by |rJG4IHzWf) (:text |:claude) |T $ %{} :Expr (:at 1728103381694) (:by |rJG4IHzWf) :data $ {} |T $ %{} :Leaf (:at 1728103381102) (:by |rJG4IHzWf) (:text |call-anthropic-msg!) diff --git a/compact.cirru b/compact.cirru index 2fa5aeb..78ed854 100644 --- a/compact.cirru +++ b/compact.cirru @@ -245,7 +245,8 @@ div {} $ :class-name (str-spaced style-message-list) a $ {} - :inner-text $ turn-str (:model state) + :inner-text $ turn-str + or (:model state) "\"Gemini" :class-name $ str-spaced style-a-toggler css/font-fancy :style $ {} :opacity $ if (= model :anthropic) 1 0.3 @@ -424,10 +425,8 @@ |submit-message! $ %{} :CodeEntry (:doc |) :code $ quote defn submit-message! (cursor state prompt-text model d!) (hint-fn async) - case-default - w-js-log $ :model state - call-gemini-msg! cursor state prompt-text d! - :anthropic $ call-anthropic-msg! cursor state prompt-text d! + case-default (:model state) (call-gemini-msg! cursor state prompt-text d!) + :claude $ call-anthropic-msg! cursor state prompt-text d! :deepinfra $ call-deepinfra-msg! cursor state prompt-text d! :ns $ %{} :CodeEntry (:doc |) :code $ quote