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
42 changes: 30 additions & 12 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@
let
abort-controller $ unsafe-coerce abort 'Dynamic
do (js/console.warn |Aborting-prev) (.!abort abort-controller)
, &unit
<> t
=< 8 nil
<> "|✕" style-abort-close
Expand Down Expand Up @@ -627,7 +628,7 @@
:preview $ decode-map-as @*viewing-archive-session 'app.schema/ChatSession
div
{} (:class-name style-archive-close)
:on-click $ fn (e d!) (reset! *viewing-archive-session false)
:on-click $ fn (e d!) (reset! *viewing-archive-session false) &unit
<> "|✕"
; Messages list $ read only
div
Expand Down Expand Up @@ -670,7 +671,7 @@
:inner-text "|All Archived Sessions"
div
{} (:class-name style-archive-close)
:on-click $ fn (e d!) (reset! *archived-sessions false) (reset! *viewing-archive-session false)
:on-click $ fn (e d!) (reset! *archived-sessions false) (reset! *viewing-archive-session false) &unit
<> "|✕"
; List
div
Expand Down Expand Up @@ -701,7 +702,7 @@
div
{} (:role |button)
:style $ {} (:flex |1) (:cursor :pointer) (:min-width 0) (:overflow :hidden)
:on-click $ fn (e d!) (reset! *viewing-archive-session session)
:on-click $ fn (e d!) (reset! *viewing-archive-session session) &unit
div
{} $ :style
{} (:font-size |12px)
Expand All @@ -728,6 +729,7 @@
archive-key $ :archive-key site
js-await $ db-set archive-key (format-cirru-edn new-archives)
d! $ :: :update-archived-count (count new-archives)
, &unit
<> "|✕"
; Else render normal chat view
div
Expand All @@ -742,7 +744,7 @@
div
{} (:class-name css/row-middle) (:title |History) (:role |button) (:aria-label |history-open)
:style $ {} (:cursor :pointer)
:on-click $ fn (e d!) (.show sessions-plugin d!)
:on-click $ fn (e d!) (.show sessions-plugin d!) &unit
div
{} $ :class-name style-history-button
comp-i |clock
Expand Down Expand Up @@ -807,6 +809,7 @@
:on-click $ fn (e d!)
.show reply-plugin d! $ fn (text)
submit-message! cursor state text (:search? message-box-state) (:think? message-box-state) model d!
, &unit
<> |Reply
if (:focus-mode? message-box-state) nil $ a
{} (:class-name style-focus-link) (:inner-text |Focus) (:role |button) (:aria-label |focus-composer)
Expand All @@ -821,6 +824,7 @@
get (>> states :message-box) :cursor
[]
assoc message-box-state :focus-mode? true
, &unit
, nil
if (:loading? state)
div ({}) (comp-abort |Loading...)
Expand All @@ -847,6 +851,7 @@
:on-click $ fn (e d!)
; d! $ :: :change-model
.show model-plugin d!
, &unit
fn (text search? think? d!)
do
when
Expand Down Expand Up @@ -887,6 +892,7 @@
:on-click $ fn (e d!)
when chrome-extension? $ js/chrome.runtime.sendMessage
js-object (:action |fill-text) (:text text)
, &unit
comp-i :send 12 :currentColor
:examples $ []
:schema $ :: 'Dynamic
Expand Down Expand Up @@ -915,6 +921,7 @@
fn () $ .!focus
unsafe-coerce (js/document.querySelector |#message) 'Dynamic
, 0
, &unit
<> $ if
blank? $ :content state
, "|Click to expand and type..." (:content state)
Expand All @@ -928,6 +935,7 @@
:on-input $ fn (e d!)
d! cursor $ assoc state :content
str $ option:unwrap-or (get e :value) |
, &unit
:on-keydown $ fn (e d!)
if
and
Expand All @@ -936,6 +944,7 @@
option:unwrap-or (get e :meta?) false
option:unwrap-or (get e :ctrl?) false
on-submit (:content state) (:search? state) (:think? state) d!
, &unit
:on-focus $ fn (e d!)
let
target $ unsafe-coerce
Expand All @@ -951,6 +960,7 @@
if
not $ unsafe-coerce (.!contains box-class |focus-within) 'Bool
.!add box-class |focus-within
, &unit
:on-blur $ fn (e d!)
let
target $ unsafe-coerce
Expand All @@ -966,6 +976,7 @@
if
unsafe-coerce (.!contains box-class |focus-within) 'Bool
.!remove box-class |focus-within
, &unit
if
not $ :focus-mode? state
do (=< nil 4)
Expand All @@ -980,6 +991,7 @@
:on-click $ fn (e d!)
d! cursor $ assoc state :content |
.!focus $ unsafe-coerce (js/document.querySelector |#message) 'Dynamic
, &unit
span $ {} (:class-name style-clear)
div
{} $ :class-name (str-spaced css/row style-gap12)
Expand All @@ -992,6 +1004,7 @@
:on-click $ fn (e d!)
d! cursor $ assoc state :think?
not $ :think? state
, &unit
input $ {}
:checked $ :think? state
:type |checkbox
Expand All @@ -1005,6 +1018,7 @@
:on-click $ fn (e d!)
d! cursor $ assoc state :search?
not $ :search? state
, &unit
input $ {}
:checked $ :search? state
:type |checkbox
Expand All @@ -1016,6 +1030,7 @@
:inner-text |Submit
:on-click $ fn (e d!)
on-submit (:content state) (:search? state) (:think? state) d!
, &unit
, nil
:examples $ []
:schema $ :: 'Fn
Expand Down Expand Up @@ -1044,7 +1059,7 @@
button
{} (:class-name css/button)
:style $ {} (:cursor :pointer)
:on-click $ fn (e d!) (on-close d!) (on-view-archive d!)
:on-click $ fn (e d!) (on-close d!) (on-view-archive d!) &unit
<> "|View Archive"
if (empty? sessions)
div
Expand All @@ -1071,7 +1086,7 @@
{} (:role |button)
:aria-label $ str |session-select: preview
:style $ {} (:flex |1) (:cursor :pointer) (:min-width 0) (:overflow :hidden)
:on-click $ fn (e d!) (on-select session-id d!) (on-close d!)
:on-click $ fn (e d!) (on-select session-id d!) (on-close d!) &unit
div
{} $ :style
{} (:font-size |12px)
Expand All @@ -1091,6 +1106,7 @@
, 'Dynamic
.!stopPropagation event
d! $ :: :remove-session session-id
, &unit
<> "|✕"
if
> (count sessions) 0
Expand All @@ -1103,9 +1119,9 @@
div
{} $ :class-name (str-spaced css/row css/gap8)
a $ {} (:class-name style-clear) (:inner-text |Data) (:role |button) (:aria-label |sessions-export-data)
:on-click $ fn (e d!) (tab-echo! sessions :edn)
:on-click $ fn (e d!) (tab-echo! sessions :edn) &unit
a $ {} (:class-name style-clear) (:inner-text |Download) (:role |button) (:aria-label |sessions-download)
:on-click $ fn (e d!) (download-sessions! sessions)
:on-click $ fn (e d!) (download-sessions! sessions) &unit
if
> (count sessions) 0
a $ {} (:class-name style-clear) (:inner-text "|Archive all") (:role |button) (:aria-label |sessions-archive-all)
Expand All @@ -1121,6 +1137,7 @@
new-archives $ concat old-archives sessions
js-await $ db-set archive-key (format-cirru-edn new-archives)
d! $ :: :archive-sessions (count new-archives)
, &unit
span $ {}
div $ {}
:style $ {} (:height 200)
Expand Down Expand Up @@ -1786,10 +1803,11 @@
:deepseek-v4-pro $ js-await (call-openrouter! cursor state1 prompt-text |deepseek-v4-pro true d! *text)
:deepseek-v4-flash $ js-await (call-openrouter! cursor state1 prompt-text |deepseek-v4-flash true d! *text)
fn (e)
let
err-text $ str "|Failed to load: " e
d! cursor $ -> state (assoc :answer err-text) (assoc :loading? false) (assoc :done? true)
assoc :messages $ upsert-assistant-message (:messages state) err-text nil
do (js/console.error :msg-buffer-request-failed e)
let
err-text $ str |Failed-to-load: e
d! cursor $ -> state (assoc :answer err-text) (assoc :loading? false) (assoc :done? true)
assoc :messages $ upsert-assistant-message (:messages state) err-text nil
:examples $ []
:schema $ :: 'Fn
{} (:return 'Dynamic)
Expand Down
6 changes: 3 additions & 3 deletions deps.cirru
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

{} (:calcit-version |0.13.33)
{} (:calcit-version |0.13.42)
:version |0.0.3
:dependencies $ {} (|Respo/alerts.calcit |0.10.19)
|Respo/reel.calcit |0.6.7
|Respo/respo-feather.calcit |0.4.4
|Respo/respo-markdown.calcit |0.4.24
|Respo/respo-markdown.calcit |0.4.25
|Respo/respo-ui.calcit |0.7.10
|Respo/respo.calcit |0.16.83
|Respo/respo.calcit |0.16.85
6 changes: 6 additions & 0 deletions history/20260824-upgrade-calcit-01340.md

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

8 changes: 8 additions & 0 deletions history/202608241230-use-explicit-unit-event-handlers.md

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

5 changes: 5 additions & 0 deletions history/202608241245-upgrade-calcit-01341.md

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

9 changes: 9 additions & 0 deletions history/202608241320-upgrade-genai-error-logging.md

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"@calcit/procs": "^0.13.33",
"@google/genai": "^2.13.0",
"@calcit/procs": "^0.13.42",
"@google/genai": "^2.18.0",
"@tiye/main-fonts": "0.0.1",
"axios": "^1.15.0",
"cirru-color": "^0.2.4",
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock

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