Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 28 additions & 26 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
:schema $ quote $ Fn (List respo.schema/CoordKey) ChatState String String Bool
Fn DispatchOp $ -> Unit
-> Unit
:features :js-ffi
:features :io :js-ffi :state
:async
'call-flash-imagen-msg! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn call-flash-imagen-msg! (variant cursor state prompt-text d!)
Expand Down Expand Up @@ -310,7 +310,7 @@
:schema $ quote $ Fn Tag (List respo.schema/CoordKey) ChatState String
Fn DispatchOp $ -> Unit
-> Unit
:features :js-ffi
:features :js-ffi :state
:async
'call-genai-msg! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn call-genai-msg!
Expand Down Expand Up @@ -375,7 +375,7 @@
Ref String
Ref String
-> Unit
:features :js-ffi
:features :js-ffi :state
:async
'call-imagen-4-msg! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn call-imagen-4-msg! (variant cursor state prompt-text d!)
Expand Down Expand Up @@ -426,7 +426,7 @@
:schema $ quote $ Fn Tag (List respo.schema/CoordKey) ChatState String
Fn DispatchOp $ -> Unit
-> Unit
:features :js-ffi
:features :js-ffi :state
:async
'call-openrouter! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn call-openrouter! (cursor state prompt-text provider variant thinking? d! *text)
Expand Down Expand Up @@ -496,7 +496,7 @@
Fn DispatchOp $ -> Unit
Ref String
-> Unit
:features :js-ffi
:features :js-ffi :state
:async
'clear-image-cache! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn clear-image-cache! ()
Expand All @@ -505,7 +505,7 @@
(:some url)
do (browser/object-url-revoke! url) (reset! *image-cache None) &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :js-ffi :state)
'comp-abort $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn comp-abort (t)
span
Expand All @@ -520,7 +520,7 @@
space-x 8
<> "|✕" style-abort-close
:examples $ []
:schema $ quote $ Fn String (-> respo.schema/Element) (:features :js-ffi)
:schema $ quote $ Fn String (-> respo.schema/Element) (:features :js-ffi :state)
'comp-container $ %{} 'CodeEntry (:doc |)
:code $ quote $ defcomp comp-container (reel on-control)
let
Expand Down Expand Up @@ -967,7 +967,7 @@
:schema $ quote $ Fn (reel.typed/State DispatchOp Store)
Fn reel.typed/Control $ -> Unit
-> respo.schema/Component
:features :js-ffi
:features :io :js-ffi :state
'comp-fill $ %{} 'CodeEntry (:doc |)
:code $ quote $ defcomp comp-fill (text)
div
Expand Down Expand Up @@ -1141,7 +1141,7 @@
Fn String Bool Bool
Fn DispatchOp $ -> Unit
-> Unit
, Tag (-> respo.schema/Component) (:generics V) (:features :js-ffi)
, Tag (-> respo.schema/Component) (:generics V) (:features :io :js-ffi :state)
'comp-sessions-modal $ %{} 'CodeEntry (:doc |)
:code $ quote $ defcomp comp-sessions-modal (sessions archived-count on-select on-close on-view-archive)
let
Expand Down Expand Up @@ -1359,7 +1359,7 @@
reset! *gen-ai-new $ Some client
, &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi) (:async)
:schema $ quote $ Fn (-> Unit) (:features :js-ffi :state) (:async)
'ensure-openai! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn ensure-openai! (provider)
let
Expand All @@ -1378,7 +1378,7 @@
reset! *openai $ Some client
, &unit
:examples $ []
:schema $ quote $ Fn Tag (-> Unit) (:features :js-ffi) (:async)
:schema $ quote $ Fn Tag (-> Unit) (:features :js-ffi :state) (:async)
'first-line $ %{} 'CodeEntry
:doc "|last message from error contains a line starts with \"data: \" and an extra error message. In order that JSON is parsed correctly, only first line is used now."
:code $ quote $ defn first-line (tt)
Expand All @@ -1392,7 +1392,7 @@
eprintln "|Dropping some unexpected lines:" $ slice lines 1
.unwrap-or (first lines) |
:examples $ []
:schema $ quote $ Fn String (-> String)
:schema $ quote $ Fn String (-> String) (:features :io)
'genai-new $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn genai-new (module api-key) (raise "|JavaScript GenAI constructor")
:examples $ []
Expand Down Expand Up @@ -1609,6 +1609,7 @@
Fn DispatchOp $ -> Unit
-> Unit
-> respo.schema/RespoListener
:features :io :state
:tests $ [] $ %{} 'TestEntry (:name |fills-draft-and-only-submits-when-requested)
:code $ quote $ let
state $ MessageBoxState :content |old :search? true :think? false :focus-mode? false
Expand Down Expand Up @@ -2035,7 +2036,7 @@
:schema $ quote $ Fn (List respo.schema/CoordKey) ChatState String Bool Bool Tag
Fn DispatchOp $ -> Unit
-> Unit
:features :js-ffi
:features :io :js-ffi :state
:async
'toggle-focus-within! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn toggle-focus-within! (respo-event active?)
Expand Down Expand Up @@ -2175,7 +2176,7 @@
, &unit
, &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :io :js-ffi)
'dispatch! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn dispatch! (op)
when config/dev? $ js/console.log |Dispatch: op
Expand All @@ -2185,7 +2186,7 @@
(reel.typed/Control control) (typed/apply-control updater @*reel control)
, &unit
:examples $ []
:schema $ quote $ Fn schema/ResolvedOp (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn schema/ResolvedOp (-> Unit) (:features :js-ffi :state)
'extension-action $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn extension-action (message)
js-nullish->option $ .-action message
Expand Down Expand Up @@ -2214,7 +2215,7 @@
:schema $ quote $ Fn
Fn $ -> Unit
-> Unit
:features :js-ffi
:features :io :js-ffi :state
'listen-extension! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn listen-extension! ()
js/chrome.runtime.onMessage.addListener $ fn (raw-message sender respond!)
Expand Down Expand Up @@ -2258,7 +2259,7 @@
connect-to-worker!
, &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :io :js-ffi :state)
'main! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn main! ()
let
Expand Down Expand Up @@ -2293,7 +2294,7 @@
println "|App started at" t1 |cost (- t1 t0) |ms
, &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :io :js-ffi :state)
'mount-target $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn mount-target ()
let
Expand All @@ -2316,11 +2317,11 @@
, data
_ $ do (eprintln "|unknown op:" raw) (schema/DispatchOp :unhandled)
:examples $ []
:schema $ quote $ Fn Input (-> schema/DispatchOp) (:generics Input)
:schema $ quote $ Fn Input (-> schema/DispatchOp) (:generics Input) (:features :io)
'on-control! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn on-control! (control) (dispatch! control)
:examples $ []
:schema $ quote $ Fn typed/Control (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn typed/Control (-> Unit) (:features :js-ffi :state)
'persist-storage! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn persist-storage! ()
println "|Saved at" $ :iso $ ffi/date-now-snapshot
Expand All @@ -2330,7 +2331,7 @@
storage .set-item! (:storage-key config/site) (schema/encode-store store)
, &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :io :js-ffi :state)
'reload! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn reload! ()
if
Expand All @@ -2344,22 +2345,22 @@
hud! |error build-errors
, &unit
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :io :js-ffi :state)
'render-app! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn render-app! ()
let
t_start $ ffi/now-ms
println "|Rendering app..."
render-with! (mount-target)
fn () $ comp-container @*reel on-control!
fn () $ comp-container @*reel $ fn (op) (on-control! op)
fn (event)
hint-fn $ Fn *dispatch-op $ -> Unit
dispatch! $ normalize-event event
println "|Rendered in"
- (ffi/now-ms) t_start
, |ms
:examples $ []
:schema $ quote $ Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn (-> Unit) (:features :io :js-ffi :state)
'sync-gemini-key! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn sync-gemini-key! ()
when config/chrome-extension? $ do
Expand Down Expand Up @@ -2672,6 +2673,7 @@
-> Unit
-> respo.schema/RespoListener
:generics T
:features :io :state
:open :decode
:ns $ %{} 'NsEntry (:doc |)
:code $ quote $ ns app.schema
Expand Down Expand Up @@ -2737,7 +2739,7 @@
, :thinking $ match (get changes :thinking)
(:none) (:thinking base)
(:some value) (decode-map-as value 'String)
do (eprintln |unknown-state-to-merge state) state
, state
assoc store :states $ decode-map-as updated-states $ Map Dynamic Dynamic
(:hydrate-storage data) data
(:change-model)
Expand Down Expand Up @@ -2775,7 +2777,7 @@
-> store
assoc :sessions $ []
assoc :current-session-id None
_ $ do (eprintln "|unknown op:" op) store
_ store
:examples $ []
:schema $ quote $ Fn Store app.schema/DispatchOp String Number (-> Store)
:tests $ [] $ %{} 'TestEntry (:name |mixed-cursor-latest-state-merge)
Expand Down
14 changes: 7 additions & 7 deletions deps.cirru
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

{} (:calcit-version |0.42.1)
{} (:calcit-version |0.43.0)
:version |0.0.10
:dependencies $ {} (|Respo/alerts.calcit |0.14.3)
|Respo/reel.calcit |0.11.0
|Respo/respo-markdown.calcit |0.8.2
|Respo/respo-ui.calcit |0.15.2
|Respo/respo.calcit |0.19.5
|calcit-lang/js-ffi |0.2.13
:dependencies $ {} (|Respo/alerts.calcit |0.14.5)
|Respo/reel.calcit |0.11.2
|Respo/respo-markdown.calcit |0.9.2
|Respo/respo-ui.calcit |0.15.4
|Respo/respo.calcit |0.19.10
|calcit-lang/js-ffi |0.2.18
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@calcit/procs": "0.42.1",
"@calcit/procs": "0.43.0",
"@google/genai": "2.23.0",
"@tiye/main-fonts": "0.0.1",
"axios": "1.20.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading