@hanzo/dev 4.1.0 → 4.2.1

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.
Files changed (122) hide show
  1. package/dist/{BinaryViewer-CmFUK4zZ.js → BinaryViewer-BCDMNW2g.js} +19 -19
  2. package/dist/{ChatMarkdown-nvEI7iCv.js → ChatMarkdown-BUidXqSs.js} +2460 -2460
  3. package/dist/{DevicePanel-v5e3sEIf.js → DevicePanel-D-pksK3r.js} +532 -532
  4. package/dist/{DeviceStreamView-CCIfmbxH.js → DeviceStreamView-DsCoOzDV.js} +377 -377
  5. package/dist/{DiffCommentAnnotation-BPTN_2a6.js → DiffCommentAnnotation-2HD5qiyt.js} +227 -227
  6. package/dist/{DiffFileTree-B_br90vY.js → DiffFileTree-CuWvI5hS.js} +13 -13
  7. package/dist/{DiffPanel-V5R5TPuK.js → DiffPanel-Z2QVmBzu.js} +328 -328
  8. package/dist/{DiffWorkerPoolProvider-BwFR-Fc9.js → DiffWorkerPoolProvider-CEfiCIGR.js} +3 -3
  9. package/dist/{DocumentPages-VSn83vty.js → DocumentPages-glImt2JO.js} +3 -3
  10. package/dist/{ExpandedImageDialog-CAorLacL.js → ExpandedImageDialog-iqO3LiIj.js} +404 -404
  11. package/dist/{FileExplorerPane-CeHulcPz.js → FileExplorerPane-GwnRmXEh.js} +4 -4
  12. package/dist/{FilePreviewPanel-BVNLvWOc.js → FilePreviewPanel-CXWpTlfI.js} +1089 -1089
  13. package/dist/{FontFilePreview-Dj8Blcay.js → FontFilePreview-CDydHOXg.js} +2 -2
  14. package/dist/{FontViewer-CLDdwhSr.js → FontViewer-DDt9C5Cb.js} +5 -5
  15. package/dist/{HanzoConnectAccountPages-BEzYfu2l.js → HanzoConnectAccountPages-_sfrtw9j.js} +357 -357
  16. package/dist/{HanzoConnectSidebarSignIn-BhD6-Up5.js → HanzoConnectSidebarSignIn-coFQvyRw.js} +3 -3
  17. package/dist/{Icons-CvSmt8vD.js → Icons-CdegMw5l.js} +1 -1
  18. package/dist/{LargeTextViewer-DfFnYGCw.js → LargeTextViewer-D3RklYQB.js} +8 -8
  19. package/dist/{MermaidDiagram-CTolIzQD.js → MermaidDiagram-sVLnox7j.js} +8 -8
  20. package/dist/{MermaidFilePreview-CP2zP4FU.js → MermaidFilePreview-BmPdNxW5.js} +2 -2
  21. package/dist/{MermaidViewer-BDfYkS9E.js → MermaidViewer-BlKTevTF.js} +3 -3
  22. package/dist/{NotebookPreview-Cybs5uM0.js → NotebookPreview-C0gSEyeO.js} +10 -10
  23. package/dist/{OfficeFilePreview-7JsmSoKU.js → OfficeFilePreview-Ago_DWEt.js} +2 -2
  24. package/dist/{OfficeViewer-CJoojlJK.js → OfficeViewer-DBRqtLet.js} +10 -10
  25. package/dist/{OpenInPicker-BIMWUxBP.js → OpenInPicker-DD_h7VLv.js} +287 -287
  26. package/dist/{OpenXmlOfficeViewer-C24Kj8DM.js → OpenXmlOfficeViewer-B4dxjpba.js} +4 -4
  27. package/dist/{PdfViewer-Cf1iD759.js → PdfViewer-BanXvPmz.js} +16 -16
  28. package/dist/{PreviewFaviconIcon-zFOuzIxe.js → PreviewFaviconIcon-BwYKB-3e.js} +892 -892
  29. package/dist/{PreviewImage-oY5YnuTr.js → PreviewImage-6UU-M6_B.js} +3 -3
  30. package/dist/{PreviewImageContent-n6eLzY99.js → PreviewImageContent-D-00K-A9.js} +3 -3
  31. package/dist/{PreviewPanel-Bo4Lt02m.js → PreviewPanel-CiuHdDv8.js} +489 -489
  32. package/dist/{PreviewPanelShell-DhXLeN5j.js → PreviewPanelShell-Dezxjg0T.js} +71 -71
  33. package/dist/{ProjectIconPickerDialog-D0kFzt8f.js → ProjectIconPickerDialog-LomrzROv.js} +29 -29
  34. package/dist/{ProjectMonogram-D35xrrXQ.js → ProjectMonogram-D21--FQY.js} +1 -1
  35. package/dist/{ProviderAuthTerminal-DfsXnu7A.js → ProviderAuthTerminal-pQXIfodT.js} +3 -3
  36. package/dist/{PullRequestCodeTab-Dv_0kVad.js → PullRequestCodeTab-Cqfh5eN2.js} +476 -476
  37. package/dist/{PullRequestReviewAnnotation-LeuwO-iH.js → PullRequestReviewAnnotation-B4Lp8Ktf.js} +334 -334
  38. package/dist/{ReadOnlySourcePreview-D__IA5g1.js → ReadOnlySourcePreview-7xXUUySV.js} +5 -5
  39. package/dist/{RelativeTime-BMRprQS8.js → RelativeTime-B_yprjav.js} +2 -2
  40. package/dist/{RightPanelResizeHandle-BLbSz-gk.js → RightPanelResizeHandle-PumvYb9P.js} +2 -2
  41. package/dist/{ThemeEditorPanel-CUDdsRsE.js → ThemeEditorPanel-BmXXpaCI.js} +196 -196
  42. package/dist/{ThreadTerminalDrawer-BF3Ix0q_.js → ThreadTerminalDrawer-DCgE3ojz.js} +461 -461
  43. package/dist/{VirtualTablePreview-dajviAfu.js → VirtualTablePreview-mA6DOFwb.js} +1 -1
  44. package/dist/{anchoredCopyToast-DnUtg1n_.js → anchoredCopyToast-BVa_dlBU.js} +2 -2
  45. package/dist/{assetUrls-DkY7vXfM.js → assetUrls-D8lRk7Xd.js} +45 -45
  46. package/dist/{browserLinkTarget-CA46wnQC.js → browserLinkTarget-BbVlDQYx.js} +18 -18
  47. package/dist/builder/api/git.d.ts +32 -4
  48. package/dist/builder/api/git.js +74 -4
  49. package/dist/builder/api/github.d.ts +54 -0
  50. package/dist/builder/api/github.js +103 -1
  51. package/dist/builder/api/models.d.ts +2 -0
  52. package/dist/builder/api/models.js +6 -1
  53. package/dist/builder/api/sandbox.d.ts +2 -0
  54. package/dist/builder/api/sandbox.js +3 -1
  55. package/dist/builder/desk.d.ts +6 -0
  56. package/dist/builder/desk.js +79 -14
  57. package/dist/builder/forge.js +79 -10
  58. package/dist/builder/github-sync.d.ts +70 -0
  59. package/dist/builder/github-sync.js +435 -0
  60. package/dist/builder/mind.d.ts +5 -5
  61. package/dist/builder/mind.js +35 -14
  62. package/dist/builder/pane.d.ts +1 -1
  63. package/dist/builder/pane.js +1 -1
  64. package/dist/builder/panel.js +5 -5
  65. package/dist/builder/preview-fallback.d.ts +47 -0
  66. package/dist/builder/preview-fallback.js +341 -0
  67. package/dist/builder/project.js +17 -4
  68. package/dist/builder/sync.js +27 -4
  69. package/dist/{changedFileKind-D6QYvIez.js → changedFileKind-DrjqPCpz.js} +5 -5
  70. package/dist/{collapsible-DFT41MdC.js → collapsible-CDT6JKbk.js} +1 -1
  71. package/dist/{color-picker-CshqBbpY.js → color-picker-kSVcH92L.js} +16 -16
  72. package/dist/core.js +1 -1
  73. package/dist/{decodeImagePreview-DnfFEjhw.js → decodeImagePreview-ZtWU3urU.js} +2 -2
  74. package/dist/{delimitedPreview-BiEpdYOj.js → delimitedPreview-DbbXcqOT.js} +1 -1
  75. package/dist/{dialog-DhQtWGRa.js → dialog-EmpqFZiK.js} +40 -40
  76. package/dist/{embed-c030vUqM.js → embed-CPWZKyIW.js} +36098 -35677
  77. package/dist/{empty-Bm5EzcG8.js → empty-ChM6gdzn.js} +1 -1
  78. package/dist/{errors-DrFQSJW3.js → errors-D8_Zn8KN.js} +2 -2
  79. package/dist/{fileContextMenu-BBo91omq.js → fileContextMenu-DW94DZj4.js} +54 -54
  80. package/dist/{fileExplorerLabel-AikEChiS.js → fileExplorerLabel-Cfz-3q1U.js} +507 -507
  81. package/dist/{fileSurfaceChrome-Cqkvn8RQ.js → fileSurfaceChrome-BDyKklTq.js} +26 -26
  82. package/dist/{hanzoWebAnalytics-CCxpTzcI.js → hanzoWebAnalytics-B1eETW-7.js} +1 -1
  83. package/dist/index.css +1 -1
  84. package/dist/{input-group-DEJEuwc9.js → input-group-BZ_QN-y7.js} +1 -1
  85. package/dist/{keybindings-C5tK_GAk.js → keybindings-D0pBlT1k.js} +7812 -7806
  86. package/dist/keymap.js +1 -1
  87. package/dist/{lucideIconByName-DUaXKH0V.js → lucideIconByName-CXY44V8P.js} +6835 -6848
  88. package/dist/{mediaReference-Bt_mh-ag.js → mediaReference-3wc4ZfY8.js} +95 -95
  89. package/dist/mediaSource-jW5c7b4r.js +70 -0
  90. package/dist/{modelPickerVisibility-Jue3CLfc.js → modelPickerVisibility-DBTc5r1G.js} +1 -1
  91. package/dist/{network-BbwqRm8c.js → network-wuXD7-is.js} +1 -1
  92. package/dist/{popover-anNQdce7.js → popover-BAyP2Tdr.js} +1 -1
  93. package/dist/{presentation-D9mVPBHm.js → presentation-68y8EAuH.js} +299 -299
  94. package/dist/{previewFailureMessages-BKpsSGX5.js → previewFailureMessages-CFguipaK.js} +3 -3
  95. package/dist/query-BPk2W3QN.js +63 -0
  96. package/dist/{readBinaryPreview-BAQ4fFjm.js → readBinaryPreview-CjZdBNVR.js} +2 -2
  97. package/dist/{refresh-icon-BYx64to1.js → refresh-icon-Vo5ImiQL.js} +1 -1
  98. package/dist/{scroll-area-ChvX8uOh.js → scroll-area-CEoyjC7h.js} +1 -1
  99. package/dist/{select-DumYjny_.js → select-DLFnkZsI.js} +2 -2
  100. package/dist/{session-_kmiSv2A.js → session-Decc4Fo5.js} +1063 -1063
  101. package/dist/{skeleton-CJqwfMSF.js → skeleton-BOKpAZv6.js} +1 -1
  102. package/dist/{switch-COwevwaq.js → switch-DjpPjtQN.js} +2 -2
  103. package/dist/{themePalette-Dl_7omVL.js → themePalette-C-GtwwqV.js} +977 -977
  104. package/dist/{threadSearch-BHyWwcV3.js → threadSearch-CrtCof6n.js} +162 -162
  105. package/dist/{toggle-CEO6qTxB.js → toggle-B4F0EEtI.js} +1 -1
  106. package/dist/{toggle-group-BHovdMDl.js → toggle-group-l8hRPswr.js} +2 -2
  107. package/dist/{use-atom-command-ByoYq_K6.js → use-atom-command-XemtT1Gv.js} +1 -1
  108. package/dist/{useAriaLabelledBy-DPSISlnL.js → useAriaLabelledBy-CibvSz-b.js} +1 -1
  109. package/dist/{useFileMetadata-e7zsixVX.js → useFileMetadata-PesehDX0.js} +33 -33
  110. package/dist/{useFloatingRootContext-CJ9stHca.js → useFloatingRootContext-ppoGvqar.js} +1 -1
  111. package/dist/{useLiveRefresh-BkKJKXhH.js → useLiveRefresh-aHkPuz6N.js} +172 -172
  112. package/dist/{useNextRenderData-CyUmSAgz.js → useNextRenderData-CNhjWfP0.js} +1 -1
  113. package/dist/{useSettings-DYG9Dmro.js → useSettings-B_MtcTyD.js} +139 -139
  114. package/dist/{useTextFieldSpeech-COa9XcRx.js → useTextFieldSpeech-B1wCgLPO.js} +1404 -1404
  115. package/dist/{useTheme-D2ZM1gvV.js → useTheme-WlXpQRKG.js} +4 -4
  116. package/dist/{utils-515nQ17G.js → utils-DtKQl-D3.js} +6184 -6172
  117. package/dist/{wizard-i86ViMRc.js → wizard-DjD4UNew.js} +3 -3
  118. package/dist/{workspaceFocus-BV1_9KiH.js → workspaceFocus-MR1plm6A.js} +144 -144
  119. package/dist/{zap-e0OsRjBR.js → zap-iwsUKtvA.js} +30 -17
  120. package/package.json +1 -1
  121. package/dist/mediaSource-zI7JWid4.js +0 -70
  122. package/dist/query-BxrrBAp6.js +0 -63
@@ -1,4 +1,4 @@
1
- import { gr as e, hr as t, yr as n } from "./utils-515nQ17G.js";
1
+ import { gr as e, hr as t, yr as n } from "./utils-DtKQl-D3.js";
2
2
  import { t as r } from "./observeResize-DRQ9DVLE.js";
3
3
  import { useEffect as i, useEffectEvent as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
4
4
  import { c as l } from "react/compiler-runtime";
@@ -1,6 +1,6 @@
1
1
  import { c as e, n as t } from "./messages-yqmY7G5x.js";
2
- import { Id as n } from "./utils-515nQ17G.js";
3
- import { o as r } from "./presentation-D9mVPBHm.js";
2
+ import { Ld as n } from "./utils-DtKQl-D3.js";
3
+ import { o as r } from "./presentation-68y8EAuH.js";
4
4
  // ../../packages/client-runtime/src/mediaActions.ts
5
5
  function i(e, t = e) {
6
6
  return n(t) ? e.replaceAll("/", "\\") : e;
@@ -1,11 +1,11 @@
1
- import { d as e, m as t, t as n, zn as r } from "./session-_kmiSv2A.js";
1
+ import { d as e, m as t, t as n, zn as r } from "./session-Decc4Fo5.js";
2
2
  import { c as i, n as a, s as o } from "./messages-yqmY7G5x.js";
3
- import { Gh as s, Kh as c, Tf as l, bg as u, cf as d, mf as f, x_ as p } from "./utils-515nQ17G.js";
4
- import { Bo as m, Z as h, go as g } from "./keybindings-C5tK_GAk.js";
5
- import { Gt as _, Ht as v, Kt as y, Ut as b, Wt as x, Y as S } from "./themePalette-Dl_7omVL.js";
6
- import { A as ee, D as C, M as w, O as T, k as E, w as D } from "./mediaReference-Bt_mh-ag.js";
7
- import { r as O } from "./presentation-D9mVPBHm.js";
8
- import { n as k } from "./query-BxrrBAp6.js";
3
+ import { Ef as s, Kh as c, S_ as l, hf as u, lf as d, qh as f, xg as p } from "./utils-DtKQl-D3.js";
4
+ import { Bo as m, Z as h, go as g } from "./keybindings-D0pBlT1k.js";
5
+ import { Gt as _, Ht as v, Kt as y, Ut as b, Wt as x, Y as S } from "./themePalette-C-GtwwqV.js";
6
+ import { A as C, D as ee, M as w, O as T, k as E, w as D } from "./mediaReference-3wc4ZfY8.js";
7
+ import { r as O } from "./presentation-68y8EAuH.js";
8
+ import { n as k } from "./query-BPk2W3QN.js";
9
9
  import { useContext as A } from "react";
10
10
  import { c as j } from "react/compiler-runtime";
11
11
  // ../../packages/shared/src/searchRanking.ts
@@ -74,13 +74,13 @@ function R(e, t) {
74
74
  }
75
75
  return n;
76
76
  }
77
- function te(e, t, n) {
77
+ function z(e, t, n) {
78
78
  if (n <= 0) return;
79
79
  let r = R(e, t);
80
80
  e.length < n ? e.splice(r, 0, t) : r >= n || (e.splice(r, 0, t), e.pop());
81
81
  }
82
82
  // ../../packages/client-runtime/src/state/filesystem.ts
83
- var z = 5e3;
83
+ var te = 5e3;
84
84
  function B(e, t = o) {
85
85
  if (e.sessionError !== null) return {
86
86
  canReadFiles: !1,
@@ -102,11 +102,11 @@ function B(e, t = o) {
102
102
  };
103
103
  }
104
104
  function V(e, t = "", n = !0) {
105
- let r = n && w(e, t), i = r ? C(e) : "";
105
+ let r = n && w(e, t), i = r ? ee(e) : "";
106
106
  return {
107
107
  isBrowsing: r,
108
108
  directoryPath: i,
109
- filterQuery: r && !ee(e) ? T(e) : "",
109
+ filterQuery: r && !C(e) ? T(e) : "",
110
110
  parentPath: r ? E(i) : null,
111
111
  canBrowseUp: r && D(i)
112
112
  };
@@ -187,7 +187,7 @@ function K(e) {
187
187
  browse: d(e, {
188
188
  label: "environment-data:filesystem:browse",
189
189
  tag: h.filesystemBrowse,
190
- idleTtlMs: z,
190
+ idleTtlMs: te,
191
191
  staleTimeMs: 0
192
192
  })
193
193
  };
@@ -207,37 +207,37 @@ function J(e, t) {
207
207
  }
208
208
  // src/state/use-atom-query-runner.ts
209
209
  function Y(e, t) {
210
- let n = j(7), r = A(c), i = typeof t == "string" ? t : t?.label, a = typeof t == "string" ? !0 : t?.reportFailure ?? !0, o = typeof t == "string" ? !0 : t?.reportDefect ?? !0, s = typeof t == "string" ? !1 : t?.refresh ?? !1, l;
211
- return n[0] !== i || n[1] !== e || n[2] !== s || n[3] !== r || n[4] !== o || n[5] !== a ? (l = (t) => {
210
+ let n = j(7), r = A(f), i = typeof t == "string" ? t : t?.label, a = typeof t == "string" ? !0 : t?.reportFailure ?? !0, o = typeof t == "string" ? !0 : t?.reportDefect ?? !0, s = typeof t == "string" ? !1 : t?.refresh ?? !1, c;
211
+ return n[0] !== i || n[1] !== e || n[2] !== s || n[3] !== r || n[4] !== o || n[5] !== a ? (c = (t) => {
212
212
  let n = e(t);
213
- return f(r, n, {
213
+ return u(r, n, {
214
214
  label: i ?? n.label?.[0] ?? "atom query",
215
215
  reportFailure: a,
216
216
  reportDefect: o,
217
217
  refresh: s
218
218
  });
219
- }, n[0] = i, n[1] = e, n[2] = s, n[3] = r, n[4] = o, n[5] = a, n[6] = l) : l = n[6], l;
219
+ }, n[0] = i, n[1] = e, n[2] = s, n[3] = r, n[4] = o, n[5] = a, n[6] = c) : c = n[6], c;
220
220
  }
221
221
  // src/assets/assetUrls.ts
222
222
  var X = _(S.createUrl);
223
223
  function Z(t, n, r) {
224
- let i = j(16), a = J(t, p()), o;
224
+ let i = j(16), a = J(t, l()), o;
225
225
  i[0] !== n || i[1] !== a ? (o = x(n, a), i[0] = n, i[1] = a, i[2] = o) : o = i[2];
226
- let c = o, l = e(t), u;
227
- i[3] !== c || i[4] !== t || i[5] !== n || i[6] !== r ? (u = c !== null || t === null || n === null ? v : r === void 0 ? S.createUrl({
226
+ let s = o, u = e(t), d;
227
+ i[3] !== s || i[4] !== t || i[5] !== n || i[6] !== r ? (d = s !== null || t === null || n === null ? v : r === void 0 ? S.createUrl({
228
228
  environmentId: t,
229
229
  input: { resource: n }
230
230
  }) : X({
231
231
  environmentId: t,
232
232
  input: { resource: n },
233
233
  revision: r
234
- }), i[3] = c, i[4] = t, i[5] = n, i[6] = r, i[7] = u) : u = i[7];
235
- let d = s(u);
236
- if (c !== null) return c;
237
- let f = l._tag === "Some" ? l.value.httpBaseUrl : null, m;
238
- i[8] !== d || i[9] !== f ? (m = b(d, f), i[8] = d, i[9] = f, i[10] = m) : m = i[10];
234
+ }), i[3] = s, i[4] = t, i[5] = n, i[6] = r, i[7] = d) : d = i[7];
235
+ let f = c(d);
236
+ if (s !== null) return s;
237
+ let p = u._tag === "Some" ? u.value.httpBaseUrl : null, m;
238
+ i[8] !== f || i[9] !== p ? (m = b(f, p), i[8] = f, i[9] = p, i[10] = m) : m = i[10];
239
239
  let h;
240
- i[11] === d.waiting ? h = i[12] : (h = d.waiting ? { waiting: !0 } : {}, i[11] = d.waiting, i[12] = h);
240
+ i[11] === f.waiting ? h = i[12] : (h = f.waiting ? { waiting: !0 } : {}, i[11] = f.waiting, i[12] = h);
241
241
  let g;
242
242
  return i[13] !== m || i[14] !== h ? (g = {
243
243
  ...m,
@@ -250,45 +250,45 @@ function Q(t, n) {
250
250
  reportFailure: !1,
251
251
  refresh: !0
252
252
  }, r[0] = o) : o = r[0];
253
- let s = Y(S.createUrl, o), c;
254
- return r[1] !== t || r[2] !== a || r[3] !== s || r[4] !== n ? (c = async () => {
253
+ let c = Y(S.createUrl, o), l;
254
+ return r[1] !== t || r[2] !== a || r[3] !== c || r[4] !== n ? (l = async () => {
255
255
  if (t === null || n === null || a === null) return null;
256
- let e = await s({
256
+ let e = await c({
257
257
  environmentId: t,
258
258
  input: { resource: n }
259
259
  });
260
- if (e._tag === "Failure") throw l(e);
260
+ if (e._tag === "Failure") throw s(e);
261
261
  return y(a, e.value.relativeUrl);
262
- }, r[1] = t, r[2] = a, r[3] = s, r[4] = n, r[5] = c) : c = r[5], c;
262
+ }, r[1] = t, r[2] = a, r[3] = c, r[4] = n, r[5] = l) : l = r[5], l;
263
263
  }
264
264
  function ne(t, n) {
265
265
  let r = j(13), i = e(t), { canReadFiles: a } = J(t), o;
266
266
  r[0] !== a || r[1] !== n ? (o = a ? n : n.filter(ie), r[0] = a, r[1] = n, r[2] = o) : o = r[2];
267
- let c = o, l;
268
- r[3] !== c || r[4] !== t ? (l = S.createUrls({
267
+ let s = o, l;
268
+ r[3] !== s || r[4] !== t ? (l = S.createUrls({
269
269
  environmentId: t,
270
- resources: c
271
- }), r[3] = c, r[4] = t, r[5] = l) : l = r[5];
272
- let d = s(l);
270
+ resources: s
271
+ }), r[3] = s, r[4] = t, r[5] = l) : l = r[5];
272
+ let u = c(l);
273
273
  if (i._tag === "None") {
274
274
  let e;
275
275
  return r[6] === n ? e = r[7] : (e = n.map(re), r[6] = n, r[7] = e), e;
276
276
  }
277
- let f;
278
- if (r[8] !== a || r[9] !== i.value || r[10] !== n || r[11] !== d) {
279
- f = [];
277
+ let d;
278
+ if (r[8] !== a || r[9] !== i.value || r[10] !== n || r[11] !== u) {
279
+ d = [];
280
280
  let e = 0;
281
281
  for (let t of n) {
282
282
  if (!a && $(t)) {
283
- f.push(null);
283
+ d.push(null);
284
284
  continue;
285
285
  }
286
- let n = d[e];
287
- e += 1, f.push(n && u(n) ? y(i.value.httpBaseUrl, n.value.relativeUrl) : null);
286
+ let n = u[e];
287
+ e += 1, d.push(n && p(n) ? y(i.value.httpBaseUrl, n.value.relativeUrl) : null);
288
288
  }
289
- r[8] = a, r[9] = i.value, r[10] = n, r[11] = d, r[12] = f;
290
- } else f = r[12];
291
- return f;
289
+ r[8] = a, r[9] = i.value, r[10] = n, r[11] = u, r[12] = d;
290
+ } else d = r[12];
291
+ return d;
292
292
  }
293
293
  function re() {
294
294
  return null;
@@ -299,4 +299,4 @@ function ie(e) {
299
299
  function $(e) {
300
300
  return e._tag === "workspace-file" || e._tag === "media-file" || e._tag === "draft-workspace-file" || e._tag === "native-app-icon" && e.app._tag === "app-path";
301
301
  }
302
- export { q as a, W as c, U as d, te as f, Y as i, H as l, I as m, Z as n, J as o, M as p, ne as r, G as s, Q as t, V as u };
302
+ export { q as a, W as c, U as d, z as f, Y as i, H as l, I as m, Z as n, J as o, M as p, ne as r, G as s, Q as t, V as u };
@@ -1,13 +1,13 @@
1
- import { i as e } from "./session-_kmiSv2A.js";
1
+ import { i as e } from "./session-Decc4Fo5.js";
2
2
  import { c as t, n } from "./messages-yqmY7G5x.js";
3
- import { Zd as r, ac as i, cc as a, gf as o, mg as s, uc as c } from "./utils-515nQ17G.js";
4
- import { Ed as l, Fo as u, Gt as d, Gy as f, Jd as ee, Pu as te, W as p, Wt as m, _p as ne, ad as re, ef as ie, fy as ae, hp as oe, id as se, kd as ce, pp as le, qu as ue, vg as h, wd as g, xo as de, zu as fe } from "./keybindings-C5tK_GAk.js";
5
- import "./themePalette-Dl_7omVL.js";
6
- import { S as pe, b as me, h as he } from "./mediaReference-Bt_mh-ag.js";
7
- import { Q as ge, ln as _e } from "./threadSearch-BHyWwcV3.js";
8
- import { n as ve, r as ye } from "./useSettings-DYG9Dmro.js";
9
- import { N as be } from "./presentation-D9mVPBHm.js";
10
- import { t as xe } from "./use-atom-command-ByoYq_K6.js";
3
+ import { Qd as r, _f as i, ac as a, cc as o, hg as s, uc as c } from "./utils-DtKQl-D3.js";
4
+ import { Ed as l, Fo as u, Gt as d, Gy as f, Jd as ee, Pu as te, W as p, Wt as m, _p as ne, ad as re, ef as ie, fy as ae, hp as oe, id as se, kd as ce, pp as le, qu as ue, vg as h, wd as g, xo as de, zu as fe } from "./keybindings-D0pBlT1k.js";
5
+ import "./themePalette-C-GtwwqV.js";
6
+ import { S as pe, b as me, h as he } from "./mediaReference-3wc4ZfY8.js";
7
+ import { Q as ge, ln as _e } from "./threadSearch-CrtCof6n.js";
8
+ import { n as ve, r as ye } from "./useSettings-B_MtcTyD.js";
9
+ import { N as be } from "./presentation-68y8EAuH.js";
10
+ import { t as xe } from "./use-atom-command-XemtT1Gv.js";
11
11
  import { c as _ } from "react/compiler-runtime";
12
12
  // ../../packages/shared/src/commandOutput.ts
13
13
  var Se = ne("2026-10-08T00:00:00Z"), Ce = ee(ie(l({
@@ -672,34 +672,34 @@ function Ht(e) {
672
672
  function Ut(e) {
673
673
  let t = new Set(e), n = null;
674
674
  try {
675
- n = i(Q, d);
675
+ n = a(Q, d);
676
676
  } catch (e) {
677
677
  console.warn("Could not read the preferred editor.", e);
678
678
  }
679
679
  if (n && t.has(n)) return n;
680
680
  let r = m.find((e) => t.has(e.id))?.id ?? null;
681
681
  if (r) try {
682
- a(Q, r, d);
682
+ o(Q, r, d);
683
683
  } catch (e) {
684
684
  console.warn("Could not save the preferred editor.", e);
685
685
  }
686
686
  return r ?? null;
687
687
  }
688
- function Wt(r, i, a) {
688
+ function Wt(r, a, o) {
689
689
  let c = _(6), l;
690
690
  c[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { reportFailure: !1 }, c[0] = l) : l = c[0];
691
691
  let d = xe(_e.openInEditor, l), f;
692
- return c[1] !== i || c[2] !== r || c[3] !== d || c[4] !== a ? (f = async (c) => {
692
+ return c[1] !== a || c[2] !== r || c[3] !== d || c[4] !== o ? (f = async (c) => {
693
693
  if (r === null) return s(h(new $({ targetPath: c })));
694
694
  if (!e(r, "orchestration:operate")) return s(h(new u({
695
695
  requiredScope: de,
696
696
  message: n(t("This connection cannot open an editor on this environment."))
697
697
  })));
698
- let l = Ut(i);
698
+ let l = Ut(a);
699
699
  if (!l) return s(h(new Vt({
700
700
  environmentId: r,
701
701
  targetPath: c,
702
- availableEditorIds: i
702
+ availableEditorIds: a
703
703
  })));
704
704
  let f = /^file:\/\//iu.test(c) ? me(c) : null, { line: ee, column: te } = f ? pe("", f.hash) : {}, p = await d({
705
705
  environmentId: r,
@@ -710,11 +710,11 @@ function Wt(r, i, a) {
710
710
  column: te
711
711
  } } : {},
712
712
  editor: l,
713
- ...a ? { projectRoot: a } : {}
713
+ ...o ? { projectRoot: o } : {}
714
714
  }
715
715
  });
716
- return o(p, () => l);
717
- }, c[1] = i, c[2] = r, c[3] = d, c[4] = a, c[5] = f) : f = c[5], f;
716
+ return i(p, () => l);
717
+ }, c[1] = a, c[2] = r, c[3] = d, c[4] = o, c[5] = f) : f = c[5], f;
718
718
  }
719
719
  // src/browser/browserLinkTarget.ts
720
720
  function Gt(e) {
@@ -1,13 +1,18 @@
1
1
  /**
2
- * A repository's files at one revision, from the platform's native git.
2
+ * A repository's files at one revision, and its outbound mirror targets,
3
+ * from the platform's native git.
3
4
  *
4
- * GET /v1/git/repos/{name}/tree?ref=&path= one directory, dirs first
5
- * GET /v1/git/repos/{name}/blob?ref=&path= one file; binary is base64,
6
- * past 1 MiB it is truncated with no content
5
+ * GET /v1/git/repos/{name}/tree?ref=&path= one directory, dirs first
6
+ * GET /v1/git/repos/{name}/blob?ref=&path= one file; binary is base64,
7
+ * past 1 MiB it is truncated with no content
8
+ * GET /v1/git/repos/{name}/targets outbound mirror targets
9
+ * POST /v1/git/repos/{name}/targets attach outbound GitHub mirror + initial sync push
10
+ * POST /v1/git/repos/{name}/link link an existing GitHub repo
7
11
  *
8
12
  * A run pushes its branch to the forge, not here, so a run's files are read
9
13
  * through the run (changes.ts); these read a codebase as the platform holds it.
10
14
  */
15
+ import { type At } from '../address.ts';
11
16
  import { type Target } from './call.ts';
12
17
  export interface Entry {
13
18
  name: string;
@@ -23,6 +28,29 @@ export interface Blob {
23
28
  truncated: boolean;
24
29
  size: number;
25
30
  }
31
+ /** An outbound mirror target attached to a Hanzo Git repository. */
32
+ export interface GitTarget {
33
+ id: string;
34
+ repo: string;
35
+ host: string;
36
+ url: string;
37
+ createdAt: string;
38
+ }
39
+ /**
40
+ * Parse a GitHub repository reference in any form GitHub hands out (`onGitHub`),
41
+ * or in `owner/repo` shorthand (e.g. `hanzoai/dev`).
42
+ */
43
+ export declare function parseGitHubRepo(input: string): At | null;
44
+ export declare function gitTarget(raw: unknown): GitTarget | null;
45
+ /** List outbound mirror targets for a Hanzo Git repository. */
46
+ export declare function listGitTargets(t: Target, name: string, signal?: AbortSignal): Promise<GitTarget[]>;
47
+ /**
48
+ * Attach an outbound GitHub mirror target to a Hanzo Git repository,
49
+ * which also triggers an initial sync push.
50
+ */
51
+ export declare function attachGitHubMirror(t: Target, name: string, url: string): Promise<GitTarget>;
52
+ /** Link an existing GitHub repository to a Hanzo Git repository. */
53
+ export declare function linkGitHubRepo(t: Target, name: string, source: string): Promise<void>;
26
54
  export declare function tree(t: Target, repo: string, ref: string, path?: string): Promise<Entry[]>;
27
55
  /** A tree answer's entries. A run's branch on the forge answers in the same shape. */
28
56
  export declare function entries(raw: unknown): Entry[];
@@ -1,15 +1,85 @@
1
1
  /**
2
- * A repository's files at one revision, from the platform's native git.
2
+ * A repository's files at one revision, and its outbound mirror targets,
3
+ * from the platform's native git.
3
4
  *
4
- * GET /v1/git/repos/{name}/tree?ref=&path= one directory, dirs first
5
- * GET /v1/git/repos/{name}/blob?ref=&path= one file; binary is base64,
6
- * past 1 MiB it is truncated with no content
5
+ * GET /v1/git/repos/{name}/tree?ref=&path= one directory, dirs first
6
+ * GET /v1/git/repos/{name}/blob?ref=&path= one file; binary is base64,
7
+ * past 1 MiB it is truncated with no content
8
+ * GET /v1/git/repos/{name}/targets outbound mirror targets
9
+ * POST /v1/git/repos/{name}/targets attach outbound GitHub mirror + initial sync push
10
+ * POST /v1/git/repos/{name}/link link an existing GitHub repo
7
11
  *
8
12
  * A run pushes its branch to the forge, not here, so a run's files are read
9
13
  * through the run (changes.ts); these read a codebase as the platform holds it.
10
14
  */
15
+ import { ADDRESS, clone, onGitHub } from '../address.js';
11
16
  import { call, query, seg } from './call.js';
12
17
  const str = (v) => (typeof v === 'string' ? v : '');
18
+ const obj = (v) => (v && typeof v === 'object' ? v : {});
19
+ /** GitHub owner/name shorthand segment. */
20
+ const GH_SEG = /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/;
21
+ /**
22
+ * Parse a GitHub repository reference in any form GitHub hands out (`onGitHub`),
23
+ * or in `owner/repo` shorthand (e.g. `hanzoai/dev`).
24
+ */
25
+ export function parseGitHubRepo(input) {
26
+ const s = input.trim();
27
+ if (!s)
28
+ return null;
29
+ const full = onGitHub(s);
30
+ if (full)
31
+ return full;
32
+ const cleaned = s.replace(/\/+$/, '').replace(/\.git$/i, '');
33
+ const parts = cleaned.split('/');
34
+ if (parts.length !== 2)
35
+ return null;
36
+ const [owner, name] = parts;
37
+ return owner && name && GH_SEG.test(owner) && GH_SEG.test(name) ? { owner, name } : null;
38
+ }
39
+ export function gitTarget(raw) {
40
+ const o = obj(raw);
41
+ const url = str(o.url);
42
+ if (!url)
43
+ return null;
44
+ return {
45
+ id: str(o.id),
46
+ repo: str(o.repo),
47
+ host: str(o.host),
48
+ url,
49
+ createdAt: str(o.createdAt),
50
+ };
51
+ }
52
+ /** List outbound mirror targets for a Hanzo Git repository. */
53
+ export async function listGitTargets(t, name, signal) {
54
+ const raw = await call(t, 'GET', `/v1/git/repos/${seg(name)}/targets`, undefined, { signal });
55
+ const rows = Array.isArray(raw) ? raw : Array.isArray(obj(raw).data) ? obj(raw).data : [];
56
+ return rows.map(gitTarget).filter((x) => x !== null);
57
+ }
58
+ /**
59
+ * Attach an outbound GitHub mirror target to a Hanzo Git repository,
60
+ * which also triggers an initial sync push.
61
+ */
62
+ export async function attachGitHubMirror(t, name, url) {
63
+ const at = parseGitHubRepo(url);
64
+ if (!at)
65
+ throw new Error(ADDRESS);
66
+ const cloneUrl = clone(at);
67
+ const raw = await call(t, 'POST', `/v1/git/repos/${seg(name)}/targets`, { url: cloneUrl });
68
+ return (gitTarget(raw) ?? {
69
+ id: '',
70
+ repo: name,
71
+ host: 'github.com',
72
+ url: cloneUrl,
73
+ createdAt: '',
74
+ });
75
+ }
76
+ /** Link an existing GitHub repository to a Hanzo Git repository. */
77
+ export async function linkGitHubRepo(t, name, source) {
78
+ const at = parseGitHubRepo(source);
79
+ if (!at)
80
+ throw new Error(ADDRESS);
81
+ await call(t, 'POST', `/v1/git/repos/${seg(name)}/link`, { source: clone(at) });
82
+ }
13
83
  export async function tree(t, repo, ref, path = '') {
14
84
  return entries(await call(t, 'GET', `/v1/git/repos/${seg(repo)}/tree${query({ ref, path })}`));
15
85
  }
@@ -1,4 +1,6 @@
1
1
  import { type Target } from './call.ts';
2
+ import { attachGitHubMirror, linkGitHubRepo, listGitTargets, parseGitHubRepo, type GitTarget } from './git.ts';
3
+ export { attachGitHubMirror, linkGitHubRepo, listGitTargets, parseGitHubRepo, type GitTarget };
2
4
  export interface Repo {
3
5
  owner: string;
4
6
  name: string;
@@ -174,3 +176,55 @@ export interface Synced {
174
176
  * never duplicates, and the App's webhook keeps them live afterwards.
175
177
  */
176
178
  export declare function syncIssues(t: Target, repo?: string): Promise<Synced>;
179
+ /** A repository created or forked on GitHub through the platform. */
180
+ export interface CreatedRepo {
181
+ full_name: string;
182
+ html_url: string;
183
+ clone_url: string;
184
+ default_branch: string;
185
+ private: boolean;
186
+ existing: boolean;
187
+ }
188
+ export interface CreateRepoInput {
189
+ name: string;
190
+ description?: string;
191
+ private?: boolean;
192
+ org?: string;
193
+ linkRepo?: string;
194
+ }
195
+ export interface ForkRepoInput {
196
+ /** `owner/repo`, GitHub URL, or bare repo name. */
197
+ repo: string;
198
+ org?: string;
199
+ name?: string;
200
+ }
201
+ /**
202
+ * Create a GitHub repository via `POST /v1/provider/github/repos`.
203
+ * When `linkRepo` is provided, the platform also links and syncs that Hanzo Git repo to it.
204
+ * May throw `Refusal` with status 412 or 409 when personal GitHub user OAuth is required.
205
+ */
206
+ export declare function createGitHubRepo(t: Target, input: CreateRepoInput): Promise<CreatedRepo>;
207
+ /**
208
+ * Fork a GitHub repository via `POST /v1/provider/github/fork`.
209
+ * Accepts `owner/repo`, a full GitHub URL (normalized to `owner/repo`), or a bare repo name.
210
+ * May throw `Refusal` with status 412 or 409 when personal GitHub user OAuth is required.
211
+ */
212
+ export declare function forkGitHubRepo(t: Target, input: ForkRepoInput): Promise<CreatedRepo>;
213
+ /**
214
+ * True when creating or forking a GitHub repository failed because the user's
215
+ * personal GitHub account requires user OAuth authorization (HTTP 412 or 409).
216
+ */
217
+ export declare function isGitHubUserOAuthRequired(err: unknown): boolean;
218
+ /** Resolved GitHub identity for a project backed directly by GitHub or via an outbound mirror target. */
219
+ export interface GitHubRepoBadgeInfo {
220
+ owner: string;
221
+ name: string;
222
+ fullName: string;
223
+ htmlUrl: string;
224
+ source: 'repo' | 'target' | 'link';
225
+ }
226
+ /**
227
+ * Resolve a project's GitHub repository from its primary clone URL or outbound mirror targets.
228
+ * Returns null if the project is Hanzo Git only and not yet synced to GitHub.
229
+ */
230
+ export declare function githubRepoFrom(repoUrl: string, targets?: readonly GitTarget[]): GitHubRepoBadgeInfo | null;
@@ -21,9 +21,12 @@
21
21
  * and that page completes it (`complete`, and `landed` in ../back.ts).
22
22
  */
23
23
  import { phrase } from '@hanzo/i18n';
24
- import { call, query, seg } from './call.js';
24
+ import { onGitHub } from '../address.js';
25
+ import { call, query, Refusal, seg } from './call.js';
25
26
  import { codebases } from './codebases.js';
27
+ import { attachGitHubMirror, linkGitHubRepo, listGitTargets, parseGitHubRepo } from './git.js';
26
28
  import { links } from './links.js';
29
+ export { attachGitHubMirror, linkGitHubRepo, listGitTargets, parseGitHubRepo };
27
30
  const str = (v) => (typeof v === 'string' ? v : '');
28
31
  const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : 0);
29
32
  const obj = (v) => v && typeof v === 'object' ? v : {};
@@ -269,3 +272,102 @@ export async function syncIssues(t, repo = '') {
269
272
  truncated: raw.truncated === true,
270
273
  };
271
274
  }
275
+ function createdRepo(raw) {
276
+ const r = obj(raw);
277
+ const full = str(r.full_name);
278
+ const html = str(r.html_url) || (full ? `https://github.com/${full}` : '');
279
+ const cloneUrl = str(r.clone_url) || (full ? `https://github.com/${full}.git` : '');
280
+ return {
281
+ full_name: full,
282
+ html_url: html,
283
+ clone_url: cloneUrl,
284
+ default_branch: str(r.default_branch) || 'main',
285
+ private: r.private === true,
286
+ existing: r.existing === true,
287
+ };
288
+ }
289
+ /**
290
+ * Create a GitHub repository via `POST /v1/provider/github/repos`.
291
+ * When `linkRepo` is provided, the platform also links and syncs that Hanzo Git repo to it.
292
+ * May throw `Refusal` with status 412 or 409 when personal GitHub user OAuth is required.
293
+ */
294
+ export async function createGitHubRepo(t, input) {
295
+ const name = input.name.trim();
296
+ if (!name)
297
+ throw new Error(phrase('Enter a repository name'));
298
+ const body = { name };
299
+ const desc = input.description?.trim();
300
+ if (desc)
301
+ body.description = desc;
302
+ if (input.private !== undefined)
303
+ body.private = input.private;
304
+ const org = input.org?.trim();
305
+ if (org)
306
+ body.org = org;
307
+ const linkRepo = input.linkRepo?.trim();
308
+ if (linkRepo)
309
+ body.linkRepo = linkRepo;
310
+ return createdRepo(await call(t, 'POST', '/v1/provider/github/repos', body));
311
+ }
312
+ /**
313
+ * Fork a GitHub repository via `POST /v1/provider/github/fork`.
314
+ * Accepts `owner/repo`, a full GitHub URL (normalized to `owner/repo`), or a bare repo name.
315
+ * May throw `Refusal` with status 412 or 409 when personal GitHub user OAuth is required.
316
+ */
317
+ export async function forkGitHubRepo(t, input) {
318
+ const rawRepo = input.repo.trim();
319
+ if (!rawRepo)
320
+ throw new Error(phrase('Enter a GitHub repository to fork (owner/repo)'));
321
+ const parsed = onGitHub(rawRepo);
322
+ const repo = parsed ? `${parsed.owner}/${parsed.name}` : rawRepo.replace(/^\/+|\/+$/g, '').replace(/\.git$/i, '');
323
+ const body = { repo };
324
+ const org = input.org?.trim();
325
+ if (org)
326
+ body.org = org;
327
+ const name = input.name?.trim();
328
+ if (name)
329
+ body.name = name;
330
+ return createdRepo(await call(t, 'POST', '/v1/provider/github/fork', body));
331
+ }
332
+ /**
333
+ * True when creating or forking a GitHub repository failed because the user's
334
+ * personal GitHub account requires user OAuth authorization (HTTP 412 or 409).
335
+ */
336
+ export function isGitHubUserOAuthRequired(err) {
337
+ if (err instanceof Refusal)
338
+ return err.status === 412 || err.status === 409;
339
+ if (err && typeof err === 'object' && 'status' in err) {
340
+ const status = err.status;
341
+ return status === 412 || status === 409;
342
+ }
343
+ return false;
344
+ }
345
+ /**
346
+ * Resolve a project's GitHub repository from its primary clone URL or outbound mirror targets.
347
+ * Returns null if the project is Hanzo Git only and not yet synced to GitHub.
348
+ */
349
+ export function githubRepoFrom(repoUrl, targets) {
350
+ const direct = repoUrl ? onGitHub(repoUrl) : null;
351
+ if (direct) {
352
+ return {
353
+ owner: direct.owner,
354
+ name: direct.name,
355
+ fullName: `${direct.owner}/${direct.name}`,
356
+ htmlUrl: `https://github.com/${direct.owner}/${direct.name}`,
357
+ source: 'repo',
358
+ };
359
+ }
360
+ for (const t of targets ?? []) {
361
+ const at = parseGitHubRepo(t.url);
362
+ if (at) {
363
+ return {
364
+ owner: at.owner,
365
+ name: at.name,
366
+ fullName: `${at.owner}/${at.name}`,
367
+ htmlUrl: `https://github.com/${at.owner}/${at.name}`,
368
+ source: 'target',
369
+ };
370
+ }
371
+ }
372
+ return null;
373
+ }
@@ -12,6 +12,8 @@ import { type ModelCatalogEntry } from '@hanzo/ui/models/catalog';
12
12
  import { type Target } from './call.ts';
13
13
  export { ENSO } from '@hanzo/ui/models/catalog';
14
14
  export type Model = ModelCatalogEntry;
15
+ /** Whether a catalog entry is the retired `Enso Free` tier (never surfaced). */
16
+ export declare function isRemovedEnsoFree(m: Pick<Model, 'id' | 'name'>): boolean;
15
17
  export declare function models(t: Target): Promise<Model[]>;
16
18
  /** The payer's plan usage, as `GET /v1/ai/limits` answers it: what a picker marks paused. */
17
19
  export declare function limits(t: Target, signal?: AbortSignal): Promise<unknown>;
@@ -11,8 +11,13 @@
11
11
  import { parseModels } from '@hanzo/ui/models/catalog';
12
12
  import { call } from './call.js';
13
13
  export { ENSO } from '@hanzo/ui/models/catalog';
14
+ /** Whether a catalog entry is the retired `Enso Free` tier (never surfaced). */
15
+ export function isRemovedEnsoFree(m) {
16
+ const id = m.id.trim().toLowerCase().replace(/^hanzo\//, '');
17
+ return id === 'enso-free' || id === 'enso_free' || (m.name ?? '').trim().toLowerCase() === 'enso free';
18
+ }
14
19
  export async function models(t) {
15
- return parseModels(await call(t, 'GET', '/v1/models'));
20
+ return parseModels(await call(t, 'GET', '/v1/models')).filter((m) => !isRemovedEnsoFree(m));
16
21
  }
17
22
  /** The payer's plan usage, as `GET /v1/ai/limits` answers it: what a picker marks paused. */
18
23
  export function limits(t, signal) {
@@ -83,6 +83,8 @@ export interface Node {
83
83
  names: string[];
84
84
  /** A file's text, or '' when it is binary or past the view cap. */
85
85
  text: string;
86
+ /** Base64 bytes when binary and within the view cap (used for inline image previews). */
87
+ base64?: string;
86
88
  binary: boolean;
87
89
  truncated: boolean;
88
90
  }
@@ -202,7 +202,8 @@ export async function read(t, sandbox, path) {
202
202
  const o = (await call(t, 'POST', '/v1/sandbox/read', { id: sandbox, path })) ?? {};
203
203
  const dir = o.dir === true;
204
204
  const names = Array.isArray(o.entries) ? o.entries.filter((n) => typeof n === 'string').sort() : [];
205
- const bytes = !dir && typeof o.data === 'string' ? decode(o.data) : new Uint8Array();
205
+ const rawB64 = !dir && typeof o.data === 'string' ? o.data : '';
206
+ const bytes = rawB64 ? decode(rawB64) : new Uint8Array();
206
207
  const binary = bytes.includes(0);
207
208
  const truncated = bytes.length > CAP;
208
209
  return {
@@ -210,6 +211,7 @@ export async function read(t, sandbox, path) {
210
211
  dir,
211
212
  names,
212
213
  text: binary || truncated ? '' : new TextDecoder().decode(bytes),
214
+ ...(binary && !truncated && rawB64 ? { base64: rawB64 } : {}),
213
215
  binary,
214
216
  truncated,
215
217
  };