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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Demo:<https://r.tiye.me/Termina/msg-buffer/>。Gemini 文档:<https://ai.goo

## 对使用者的影响

本地开发使用正式 Calcit 和 `@calcit/procs` **0.44.0**。升级后请重装依赖,分别重建网页与扩展资源,并刷新。页面 HUD、模型名称、请求配置和存档格式保持原行为。
本地开发使用正式 Calcit 和 `@calcit/procs` **0.47.1**。升级后请重装依赖,分别重建网页与扩展资源,并刷新。页面 HUD、模型名称、请求配置和存档格式保持原行为。

模块使用已发布的 Respo 0.19.13、UI 0.15.7、JS FFI 0.2.19、Reel 0.11.5、Alerts 0.14.8、Markdown 0.9.5 和 Router 0.12.11。
模块使用已发布的 Respo 0.20.1、UI 0.16.7、JS FFI 0.2.26、Reel 0.11.11、Alerts 0.14.13、Markdown 0.9.11 和 Router 0.12.19。

## 迁移合同

Expand All @@ -26,7 +26,7 @@ SDK 响应、可空 DOM 和 object URL 保留原受检边界及清理行为。

## 开发和验证

使用 Node.js 24、Yarn 4.18.0、Calcit 0.44.0,文件为 `calcit.cirru`、`deps.cirru`。
使用 Node.js 24、Yarn 4.18.0、Calcit 0.47.1,文件为 `calcit.cirru`、`deps.cirru`。

```sh
caps --strict --ci
Expand Down
22 changes: 13 additions & 9 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@
{} (:class-name style-delete-button) (:role |button)
:on-click $ fn (e d!) (hint-fn Async)
let
proceed? $ js/confirm "|Delete this archived session?"
proceed? $ contract/expect-bool |confirm $ js/confirm "|Delete this archived session?"
when proceed? $ let
new-archives $ filter
let
Expand Down Expand Up @@ -918,7 +918,7 @@
comp-message-box
decode-map-as (>> states :message-box) (Map Tag Dynamic)
a $ {}
:inner-text $ or (to-string model) |-
:inner-text $ to-string model
:role |button
:aria-label $ str |model-picker: $ to-string model
:class-name $ str-spaced style-a-toggler
Expand Down Expand Up @@ -1147,7 +1147,7 @@
let
history-items $ .foldl sessions 0 $ fn (acc session)
hint-fn $ Fn Number ChatSession $ -> Number
+ acc $ .len $ or (:messages session) ([])
+ acc $ .len $ :messages session
div
{} $ :class-name $ str-spaced css/column css/gap8 style-sessions-list
show (> archived-count 0)
Expand Down Expand Up @@ -1233,7 +1233,8 @@
a $ {} (:class-name style-clear) (:inner-text "|Archive all") (:role |button) (:aria-label |sessions-archive-all)
:on-click $ fn (e d!) (hint-fn Async)
let
proceed? $ js/confirm $ str "|Archive " (.len sessions) "| sessions and clear active view?"
proceed? $ contract/expect-bool |confirm $ js/confirm
str "|Archive " (.len sessions) "| sessions and clear active view?"
when proceed? $ let
archive-key $ :archive-key site
raw $ let
Expand Down Expand Up @@ -1434,7 +1435,7 @@
:schema $ quote $ Fn (-> String) (:features :js-ffi)
'js-present-dynamic? $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn js-present-dynamic? (value)
if (js/Boolean value) true false
contract/expect-bool |Boolean $ js/Boolean value
:examples $ []
:schema $ quote $ Fn T (-> Bool) (:generics T) (:features :js-ffi)
'json-pattern? $ %{} 'CodeEntry (:doc |)
Expand Down Expand Up @@ -1671,13 +1672,13 @@
:code $ quote $ defn save-current-session (store state)
let
messages $ :messages state
model $ either (:model state) :gemini
model $ :model state
if
> (.len messages) 0
let
new-session $ create-session messages model
updated-session $ assoc new-session :is-history? true
sessions $ or (:sessions store) ([])
sessions $ :sessions store
assoc store :sessions $ append sessions updated-session
, store
:examples $ []
Expand Down Expand Up @@ -2275,7 +2276,9 @@
js/window.addEventListener |dblclick $ fn (event) (.!preventDefault event)
js/window.addEventListener |wheel
fn (event)
if (.-ctrlKey event) (.!preventDefault event)
if
contract/expect-bool |ctrlKey $ js/Boolean $ .-ctrlKey event
.!preventDefault event
js-object $ :passive false
hydrate-storage-later! $ fn ()
js/window.addEventListener |beforeunload $ fn (event) (persist-storage!)
Expand Down Expand Up @@ -2335,7 +2338,7 @@
'reload! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn reload! ()
if
not $ if (js/Boolean build-errors) true false
not $ contract/expect-bool |build-errors $ js/Boolean build-errors
do (remove-watch! *reel :changes) (remove-watch! *archived-sessions :changes) (remove-watch! *viewing-archive-session :changes) (clear-cache!)
add-watch! *reel :changes $ fn (reel prev) (render-app!)
add-watch! *archived-sessions :changes $ fn (s prev) (render-app!)
Expand Down Expand Up @@ -2392,6 +2395,7 @@
js-ffi.shared :as ffi
js-ffi.browser :as browser
reel.typed :as typed
js-ffi.contract :as contract
'app.schema $ %{} 'FileEntry
:defs $ {}
'ChatMessage $ %{} 'CodeEntry (:doc |)
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.44.0)
{} (:calcit-version |0.47.1)
:version |0.0.10
:dependencies $ {} (|Respo/alerts.calcit |0.14.8)
|Respo/reel.calcit |0.11.5
|Respo/respo-markdown.calcit |0.9.5
|Respo/respo-ui.calcit |0.15.7
|Respo/respo.calcit |0.19.13
|calcit-lang/js-ffi |0.2.19
:dependencies $ {} (|Respo/alerts.calcit |0.14.13)
|Respo/reel.calcit |0.11.11
|Respo/respo-markdown.calcit |0.9.11
|Respo/respo-ui.calcit |0.16.7
|Respo/respo.calcit |0.20.1
|calcit-lang/js-ffi |0.2.26
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.44.0",
"@calcit/procs": "0.47.1",
"@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.