diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml index a5fc143..6149498 100644 --- a/.github/workflows/upload.yaml +++ b/.github/workflows/upload.yaml @@ -42,8 +42,30 @@ jobs: - name: Build site run: yarn vite build --base=./ + - name: Select deployment path + id: deploy-path + env: + EVENT_NAME: ${{ github.event_name }} + REPOSITORY: ${{ github.repository }} + run: | + if [ "$EVENT_NAME" = "pull_request" ]; then + echo "dest=rsync-user@tiye.me:/web-assets/repo/${REPOSITORY}/pr" >> "$GITHUB_OUTPUT" + else + echo "dest=rsync-user@tiye.me:/web-assets/repo/${REPOSITORY}" >> "$GITHUB_OUTPUT" + fi + + - name: Prepare deployment directory + env: + DEPLOY_KEY: ${{ secrets.rsync_private_key }} + DEPLOY_DEST: ${{ steps.deploy-path.outputs.dest }} + run: | + key_file="$RUNNER_TEMP/deploy_key" + printf '%s\n' "$DEPLOY_KEY" > "$key_file" + chmod 600 "$key_file" + deploy_path="${DEPLOY_DEST#*:}" + ssh -i "$key_file" -o StrictHostKeyChecking=no rsync-user@tiye.me "mkdir -p -- '$deploy_path'" + - name: Deploy to server - if: github.event_name == 'push' && github.ref == 'refs/heads/main' id: deploy uses: Pendect/action-rsyncer@v2.0.0 env: @@ -53,8 +75,7 @@ jobs: options: '' ssh_options: '' src: 'dist/*' - dest: 'rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}' + dest: ${{ steps.deploy-path.outputs.dest }} - name: Display status from deploy - if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: echo "${{ steps.deploy.outputs.status }}" diff --git a/calcit.cirru b/calcit.cirru index a754c56..f3bac47 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -2,7 +2,7 @@ {} (:about "|Machine-generated snapshot. Do not edit directly — changes will be overwritten. Use `cr query` to inspect and `cr edit`/`cr tree` to modify. Run `cr docs agents --full` first. Manual edits must follow format and schema conventions, then run `cr edit format`.") (:package |app) (:version |0.0.1) :entries $ {} :default $ {} (:description |) (:init-fn 'app.main/main!) (:mode :js) (:reload-fn 'app.main/reload!) - :modules $ [] |respo.calcit/ |memof/ |respo-ui.calcit/ |reel.calcit/ |respo-markdown.calcit/ |alerts.calcit/ |respo-feather.calcit/ + :modules $ [] |respo.calcit/ |respo-ui.calcit/ |reel.calcit/ |respo-markdown.calcit/ |alerts.calcit/ |respo-feather.calcit/ :type-slots $ {} :files $ {} |app.comp.container $ %{} 'FileEntry @@ -280,7 +280,9 @@ :config $ js-object :thinkingConfig $ if think? js-object (:thinkingLevel |high) (:includeThoughts true) - js-object (:thinkingLevel |minimal) (:includeThoughts false) + js-object + :thinkingLevel $ if (= model |gemini-3.7-flash) |low |minimal + :includeThoughts false :tools $ if > unsafe-coerce @@ -651,11 +653,11 @@ not $ blank? thinking div {} $ :class-name style-thinking - memof1-call comp-md-block thinking $ {} (:class-name style-md-content) + memo-comp-by thinking comp-md-block thinking $ {} (:class-name style-md-content) if (= role :assistant) if (json-pattern? content) pre $ {} (:class-name style-code-content) (:inner-text content) - memof1-call comp-md-block content $ {} (:class-name style-md-content) + memo-comp-by content comp-md-block content $ {} (:class-name style-md-content) pre $ {} (:class-name style-message-text) (:inner-text content) ; Render archived sessions list div @@ -776,11 +778,11 @@ not $ blank? thinking div {} $ :class-name style-thinking - memof1-call comp-md-block thinking $ {} (:class-name style-md-content) + memo-comp-by thinking comp-md-block thinking $ {} (:class-name style-md-content) if (= role :assistant) if (json-pattern? content) pre $ {} (:class-name style-code-content) (:inner-text content) - memof1-call comp-md-block content $ {} (:class-name style-md-content) + memo-comp-by content comp-md-block content $ {} (:class-name style-md-content) pre $ {} (:class-name style-message-text) (:inner-text content) if and (= role :assistant) @@ -1804,7 +1806,7 @@ ns app.comp.container $ :require (respo-ui.css :as css) respo.css :refer $ defstyle respo.util.format :refer $ hsl - respo.core :refer $ defcomp defeffect <> >> list-> div button textarea span input a pre img + respo.core :refer $ defcomp defeffect <> >> list-> div button textarea span input a pre img memo-comp-by respo.comp.space :refer $ =< respo.comp.inspect :refer $ comp-inspect reel.comp.reel :refer $ comp-reel @@ -1814,7 +1816,6 @@ respo-ui.comp :refer $ comp-copy style-close |../extension/get-selected :refer $ get-selected |../lib/db :refer $ db-get db-set - memof.once :refer $ memof1-call |../lib/image :refer $ base64ToBlob feather.core :refer $ comp-i respo-alerts.core :refer $ [] use-modal-menu use-prompt use-drawer @@ -1998,13 +1999,17 @@ let t_start $ unsafe-coerce (js/Date.now) 'Number println "|Rendering app..." - render! mount-target (comp-container @*reel) dispatch! + render-with! mount-target + fn () $ comp-container @*reel + , dispatch! println "|Rendered in" - unsafe-coerce (js/Date.now) 'Number , t_start , |ms - render! mount-target (comp-container @*reel) dispatch! + render-with! mount-target + fn () $ comp-container @*reel + , dispatch! :examples $ [] :schema $ :: 'Dynamic |sync-gemini-key! $ %{} 'CodeEntry (:doc |) @@ -2029,7 +2034,7 @@ :ns $ %{} 'NsEntry (:doc |) :code $ quote ns app.main $ :require - respo.core :refer $ render! clear-cache! + respo.core :refer $ render-with! clear-cache! app.comp.container :refer $ comp-container submit-message! *archived-sessions *viewing-archive-session app.updater :refer $ updater app.schema :as schema diff --git a/deps.cirru b/deps.cirru index 2c6923b..8579892 100644 --- a/deps.cirru +++ b/deps.cirru @@ -1,5 +1,5 @@ -{} (:calcit-version |0.13.18) +{} (:calcit-version |0.13.19) :version |0.0.1 :dependencies $ {} (|Respo/alerts.calcit |0.10.17) |Respo/reel.calcit |0.6.6 @@ -7,4 +7,3 @@ |Respo/respo-markdown.calcit |0.4.22 |Respo/respo-ui.calcit |0.7.7 |Respo/respo.calcit |0.16.72 - |calcit-lang/memof |a132abef2900e629dc01688fba2d3e5b133791b2 diff --git a/package.json b/package.json index 038ffc8..2e50677 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "dependencies": { - "@calcit/procs": "^0.13.18", - "@google/genai": "^2.12.0", + "@calcit/procs": "^0.13.19", + "@google/genai": "^2.13.0", "@tiye/main-fonts": "0.0.1", "axios": "^1.15.0", "cirru-color": "^0.2.4", diff --git a/vite.config.mjs b/vite.config.mjs index ff17b8f..2117e71 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -17,7 +17,6 @@ export default defineConfig({ if ( id.includes("/node_modules/respo") || id.includes("/node_modules/reel") || - id.includes("/node_modules/memof") || id.includes("/node_modules/@calcit/procs") ) { return "vendor-core"; diff --git a/yarn.lock b/yarn.lock index a4d7bf2..d386f78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,14 +5,14 @@ __metadata: version: 8 cacheKey: 10c0 -"@calcit/procs@npm:^0.13.18": - version: 0.13.18 - resolution: "@calcit/procs@npm:0.13.18" +"@calcit/procs@npm:^0.13.19": + version: 0.13.19 + resolution: "@calcit/procs@npm:0.13.19" dependencies: "@calcit/ternary-tree": "npm:0.0.26" "@cirru/parser.ts": "npm:^0.0.9" "@cirru/writer.ts": "npm:^0.1.9" - checksum: 10c0/30fde5e31695686819bfade1154a1f969bac14bb2b881c1241677cd4af12dd78a82f8853398472edf04042bd98045919c1e8e1a37205e1cbfe0a609ef9beb84b + checksum: 10c0/72f17208989f8e2e78462cce625b88fcb5c1635eb04a219f49c954a7c4abc7b0c1bce186d325978a4067d3840e02f3cbf913958828a5a4c543f00bc524c9a9fd languageName: node linkType: hard @@ -65,9 +65,9 @@ __metadata: languageName: node linkType: hard -"@google/genai@npm:^2.12.0": - version: 2.12.0 - resolution: "@google/genai@npm:2.12.0" +"@google/genai@npm:^2.13.0": + version: 2.17.1 + resolution: "@google/genai@npm:2.17.1" dependencies: google-auth-library: "npm:^10.3.0" p-retry: "npm:^4.6.2" @@ -78,7 +78,7 @@ __metadata: peerDependenciesMeta: "@modelcontextprotocol/sdk": optional: true - checksum: 10c0/c3a2f3f6c8a6f236bf6f09fc6d50a90c616f9e7ea22be0922e39aa44ebda9161ae566789b4cfd2b57599b5079e045b89dd997070899f5504249650f75c8775f9 + checksum: 10c0/f94efe55f23a10a1b54d0297a607747acc98d5ad1e26a4dabbc7a81869ef68bc15b2c056517b7870fa866fdb6aa77c7c39e8ce407e89dcac26ec363fb6a96aa2 languageName: node linkType: hard @@ -1573,8 +1573,8 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: - "@calcit/procs": "npm:^0.13.18" - "@google/genai": "npm:^2.12.0" + "@calcit/procs": "npm:^0.13.19" + "@google/genai": "npm:^2.13.0" "@tiye/main-fonts": "npm:0.0.1" axios: "npm:^1.15.0" bottom-tip: "npm:^0.1.5"