pinokiod 5.1.38 → 5.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/kernel/git.js CHANGED
@@ -580,6 +580,9 @@ class Git {
580
580
  if (idx < 0) return { ok: false, error: "not_found" }
581
581
  const record = entry.checkpoints[idx]
582
582
  entry.checkpoints.splice(idx, 1)
583
+ if (entry.checkpoints.length === 0) {
584
+ delete apps[remoteKey]
585
+ }
583
586
  await this.saveManifest()
584
587
  const hash = record && record.hash ? String(record.hash) : null
585
588
  let fileDeleted = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "5.1.38",
3
+ "version": "5.1.39",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -762,12 +762,13 @@ document.addEventListener("DOMContentLoaded", () => {
762
762
  latestRow.remove()
763
763
  } else {
764
764
  const span = latestRow.querySelector("span")
765
- if (span) span.textContent = `Latest checkpoint: ${new Date(snapshots[0].id).toLocaleString()}`
765
+ if (span) span.textContent = `Latest checkpoint: ${new Date(Number(snapshots[0].id)).toLocaleString()}`
766
766
  }
767
767
  }
768
768
  }
769
769
 
770
770
  const handleDelete = async (snapshotId, btn) => {
771
+ let closeAfterDelete = false
771
772
  const idStr = snapshotId != null ? String(snapshotId).trim() : ""
772
773
  if (!idStr || idStr === "latest") return
773
774
  const installed = installedBySnapshot[idStr] || []
@@ -815,7 +816,16 @@ document.addEventListener("DOMContentLoaded", () => {
815
816
  if (installedBySnapshot && Object.prototype.hasOwnProperty.call(installedBySnapshot, idStr)) {
816
817
  delete installedBySnapshot[idStr]
817
818
  }
818
- updateItemRow(item)
819
+ const remaining = Array.isArray(item.snapshots) ? item.snapshots.length : 0
820
+ if (remaining === 0) {
821
+ const row = document.querySelector(`.backup-row[data-remote-key="${item.remoteKey}"]`)
822
+ if (row) row.remove()
823
+ const idx = items.findIndex((entry) => entry && entry.remoteKey === item.remoteKey)
824
+ if (idx >= 0) items.splice(idx, 1)
825
+ closeAfterDelete = true
826
+ } else {
827
+ updateItemRow(item)
828
+ }
819
829
  } else {
820
830
  const msg = payload && payload.error ? payload.error : "Delete failed"
821
831
  Swal.fire({ icon: "error", title: "Error", text: msg })
@@ -828,6 +838,9 @@ document.addEventListener("DOMContentLoaded", () => {
828
838
  btn.textContent = "Delete"
829
839
  }
830
840
  setLoading(false)
841
+ if (closeAfterDelete) {
842
+ try { Swal.close() } catch (_) {}
843
+ }
831
844
  }
832
845
  }
833
846
 
@@ -1098,7 +1111,7 @@ document.addEventListener("DOMContentLoaded", () => {
1098
1111
  <% const latest = item.snapshots[0]; %>
1099
1112
  <div class="description backup-meta">
1100
1113
  <i class="fa-regular fa-clock"></i>
1101
- <span>Latest checkpoint: <%= new Date(latest.id).toLocaleString() %></span>
1114
+ <span>Latest checkpoint: <%= new Date(Number(latest.id)).toLocaleString() %></span>
1102
1115
  </div>
1103
1116
  <% } %>
1104
1117
  </div>
@@ -1,9 +0,0 @@
1
- [api shell.run]
2
-
3
- The default interactive shell is now zsh.
4
- To update your account to use zsh, please run `chsh -s /bin/zsh`.
5
- For more details, please visit https://support.apple.com/kb/HT208050.
6
- <<PINOKIO_SHELL>>eval "$(conda shell.bash hook)" ; conda deactivate ; conda deactivate ; conda deactivate ; conda activate base && npm install -g opencode-ai@latest
7
-
8
- added 12 packages in 7s
9
- (base) <<PINOKIO_SHELL>>
@@ -1,2 +0,0 @@
1
- 2025-12-23T20:43:16.123Z [memory] {"ts":1766522596108,"step":0,"input":{"ts":"1766522595724"},"args":{"ts":"1766522595724"},"global":{},"local":{},"port":42012}
2
- 2025-12-23T20:43:16.123Z [memory]
@@ -1,9 +0,0 @@
1
- [api shell.run]
2
-
3
- The default interactive shell is now zsh.
4
- To update your account to use zsh, please run `chsh -s /bin/zsh`.
5
- For more details, please visit https://support.apple.com/kb/HT208050.
6
- <<PINOKIO_SHELL>>eval "$(conda shell.bash hook)" ; conda deactivate ; conda deactivate ; conda deactivate ; conda activate base && npm install -g opencode-ai@latest
7
-
8
- added 12 packages in 7s
9
- (base) <<PINOKIO_SHELL>>