tarsk 0.5.74 → 0.5.76

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 (167) hide show
  1. package/dist/bundled-skills/skill-creator/scripts/__tests__/quick_validate.test.js +79 -0
  2. package/dist/bundled-skills/skill-creator/scripts/quick_validate.js +78 -65
  3. package/dist/index.js +21828 -13103
  4. package/dist/jelly.webp +0 -0
  5. package/dist/public/assets/account-view-CWtpznW2.js +1 -0
  6. package/dist/public/assets/alert-dialog-BxMfaLuO.js +7 -0
  7. package/dist/public/assets/api-DX1ny6q-.js +2 -0
  8. package/dist/public/assets/async-error-boundary-BX1G17o9.js +1 -0
  9. package/dist/public/assets/async-loading-fallback-V0EaQ_Kn.js +1 -0
  10. package/dist/public/assets/browser-tab-D_5MLhxE.js +12 -0
  11. package/dist/public/assets/button-kWtLAMpB.js +1 -0
  12. package/dist/public/assets/card-B_EASkic.js +1 -0
  13. package/dist/public/assets/chat-dock-context-8K8Ikjgy.js +1 -0
  14. package/dist/public/assets/commit-dialog-CSXPoomw.js +1 -0
  15. package/dist/public/assets/commit-error-dialog-CdcGI69P.js +1 -0
  16. package/dist/public/assets/commit-method-fields-BtEHb0_G.js +1 -0
  17. package/dist/public/assets/context-menu-BcM6I0Sx.js +1 -0
  18. package/dist/public/assets/conversation-history-view-CuzU9qF6.js +1 -0
  19. package/dist/public/assets/create-project-dialog-a6Wgq-Z8.js +2 -0
  20. package/dist/public/assets/create-project-workspace-Dv_lEfZx.js +2 -0
  21. package/dist/public/assets/create-repo-dialog-BTIQ5Nw4.js +1 -0
  22. package/dist/public/assets/{delete-confirm-dialog-3DX1u0Dg.js → delete-confirm-dialog-Dl76vaxb.js} +1 -1
  23. package/dist/public/assets/diff-view-DA1uT9tc.js +4 -0
  24. package/dist/public/assets/dist-C2G92uPn.js +1 -0
  25. package/dist/public/assets/dist-CHhgoHp6.js +1 -0
  26. package/dist/public/assets/dist-CTLFS4dn.js +2 -0
  27. package/dist/public/assets/dist-D-2G8xGB.js +5 -0
  28. package/dist/public/assets/dist-DD4GtbiM.js +1 -0
  29. package/dist/public/assets/{dist-rO95BjzU.js → dist-DoxvnNEY.js} +1 -1
  30. package/dist/public/assets/dist-DsmF-KJ-.js +1 -0
  31. package/dist/public/assets/dist-c_QADQ5u.js +1 -0
  32. package/dist/public/assets/dist-yM5kyz9Q.js +1 -0
  33. package/dist/public/assets/es2015-BlPKkFZZ.js +41 -0
  34. package/dist/public/assets/explorer-monaco-editor-BdZ_bBqh.js +1 -0
  35. package/dist/public/assets/explorer-tab-view-CewTYYOm.js +2 -0
  36. package/dist/public/assets/explorer-tree-C0VDhihz.js +1 -0
  37. package/dist/public/assets/explorer-view-RCfDm3p5.js +76 -0
  38. package/dist/public/assets/git-history-dialog-DL0Trxiz.js +1 -0
  39. package/dist/public/assets/index-B3-5kIOf.js +3658 -0
  40. package/dist/public/assets/index-BLNUy5nZ.css +1 -0
  41. package/dist/public/assets/merged-pr-dialog-BzND8nzx.js +1 -0
  42. package/dist/public/assets/model-list-controls-I67L2x3H.js +1 -0
  43. package/dist/public/assets/onboarding-dialog-DY8v11hv.js +1 -0
  44. package/dist/public/assets/project-coding-view-DxOwsjtt.js +1 -0
  45. package/dist/public/assets/project-danger-zone-view-CkvKOQrl.js +1 -0
  46. package/dist/public/assets/project-env-vars-view-DYLWA7s0.js +1 -0
  47. package/dist/public/assets/project-model-aliases-view-DWu9khLA.js +1 -0
  48. package/dist/public/assets/project-settings-view-DJfmaWn6.js +1 -0
  49. package/dist/public/assets/project-tools-view-BEjBkghz.js +1 -0
  50. package/dist/public/assets/providers-list-view-jMEPJCci.js +1 -0
  51. package/dist/public/assets/pull-request-dialog-B_JCqT53.js +1 -0
  52. package/dist/public/assets/pull-with-changes-dialog-V3_km2zQ.js +1 -0
  53. package/dist/public/assets/push-before-pr-dialog-CarrD3y2.js +1 -0
  54. package/dist/public/assets/radio-group-Dn_pN-pn.js +1 -0
  55. package/dist/public/assets/scroll-area-lkVMElz5.js +1 -0
  56. package/dist/public/assets/settings-general-view-BhrfHGfQ.js +1 -0
  57. package/dist/public/assets/settings-list-DiiYzOxn.js +1 -0
  58. package/dist/public/assets/settings-logs-view-DbKM1SNk.js +5 -0
  59. package/dist/public/assets/settings-mcp-servers-view-4FpPIeYV.js +5 -0
  60. package/dist/public/assets/settings-models-view-CJVeo9ad.js +1 -0
  61. package/dist/public/assets/settings-skills-view-DoRPGbHG.js +3 -0
  62. package/dist/public/assets/settings-slack-view-Cc1NgVkx.js +1 -0
  63. package/dist/public/assets/settings-slash-commands-view-CmlWqqmi.js +1 -0
  64. package/dist/public/assets/settings-statistics-view-DRuyEbcN.js +1 -0
  65. package/dist/public/assets/settings-storage-view-DihbtUYb.js +1 -0
  66. package/dist/public/assets/settings-subagents-view-B2RvxDZI.js +2 -0
  67. package/dist/public/assets/settings-system-prompt-view-CvVbgjNN.js +1 -0
  68. package/dist/public/assets/settings-view-CPUAjTMa.js +2 -0
  69. package/dist/public/assets/slug-utils-CQ8PMWUL.js +1 -0
  70. package/dist/public/assets/store-BSzKIu5G.js +9 -0
  71. package/dist/public/assets/suspense-resource-BFrb_XJX.js +1 -0
  72. package/dist/public/assets/table-A3cgauiZ.js +1 -0
  73. package/dist/public/assets/tasks-view-CvFFLPeD.js +1 -0
  74. package/dist/public/assets/{terminal-panel-DHDoOXAH.js → terminal-panel-DIh6it7K.js} +3 -3
  75. package/dist/public/assets/toggle-group-Q36wRGKA.js +1 -0
  76. package/dist/public/assets/tooltip-Db8UeYxm.js +1 -0
  77. package/dist/public/assets/{use-active-dock-panel-instance-cO_DR87G.js → use-active-dock-panel-instance-DRfRj6MV.js} +1 -1
  78. package/dist/public/assets/use-installed-ai-files-C8nNWGC7.js +1 -0
  79. package/dist/public/assets/{use-suspense-resource-Dkz6ddFN.js → use-suspense-resource-Dakt9lfT.js} +1 -1
  80. package/dist/public/assets/useBaseQuery-34f0-SVd.js +1 -0
  81. package/dist/public/assets/{web-C7jr0n2X.js → web-Bn9n5e7r.js} +1 -1
  82. package/dist/public/assets/{web-D0nlJHDu.js → web-C2KGFouM.js} +1 -1
  83. package/dist/public/assets/{web-jJ1krOD-.js → web-Dk3GAfTy.js} +1 -1
  84. package/dist/public/assets/{web-DPW3m0cL.js → web-DycfRH4j.js} +1 -1
  85. package/dist/public/browser-preview-rpc.js +107 -82
  86. package/dist/public/index.html +26 -33
  87. package/dist/recommended-models.txt +2 -2
  88. package/package.json +6 -6
  89. package/dist/public/assets/Combination-BdvBzSm4.js +0 -41
  90. package/dist/public/assets/account-view-c-UG0JKH.js +0 -1
  91. package/dist/public/assets/alert-dialog-DAHkynVZ.js +0 -7
  92. package/dist/public/assets/api-D1GxdEEp.js +0 -2
  93. package/dist/public/assets/async-error-boundary-DNJqC4BV.js +0 -1
  94. package/dist/public/assets/async-loading-fallback-D2X0o4Qa.js +0 -1
  95. package/dist/public/assets/browser-tab-BKQJKTg8.js +0 -12
  96. package/dist/public/assets/button-B6HDsfd5.js +0 -1
  97. package/dist/public/assets/card-DZGd45nw.js +0 -1
  98. package/dist/public/assets/chat-dock-context-8_5G30KG.js +0 -1
  99. package/dist/public/assets/commit-dialog-OQFa4W6i.js +0 -1
  100. package/dist/public/assets/commit-error-dialog-BFByxoUG.js +0 -1
  101. package/dist/public/assets/commit-method-fields-BihSf23f.js +0 -1
  102. package/dist/public/assets/context-menu-e5jeH0Jl.js +0 -1
  103. package/dist/public/assets/conversation-history-view-BUlO9oJ6.js +0 -1
  104. package/dist/public/assets/create-project-dialog-CY5wIGQV.js +0 -2
  105. package/dist/public/assets/create-project-workspace-ClILToZd.js +0 -1
  106. package/dist/public/assets/create-repo-dialog-CKUQoOaX.js +0 -1
  107. package/dist/public/assets/dialog--0foS3aw.js +0 -1
  108. package/dist/public/assets/diff-view-DLPu21IR.js +0 -4
  109. package/dist/public/assets/dist-Bxyh1Ml_.js +0 -1
  110. package/dist/public/assets/dist-CFXDhuA_.js +0 -5
  111. package/dist/public/assets/dist-CNOCRPxn.js +0 -1
  112. package/dist/public/assets/dist-Cda_ffeR.js +0 -1
  113. package/dist/public/assets/dist-CkQILg8A.js +0 -1
  114. package/dist/public/assets/dist-CqGsum35.js +0 -1
  115. package/dist/public/assets/dist-DjiNKpTV.js +0 -2
  116. package/dist/public/assets/dist-eMdiO0P3.js +0 -1
  117. package/dist/public/assets/explorer-tab-view-nzl0M0Vm.js +0 -2
  118. package/dist/public/assets/explorer-tree-Bkb6dzmf.js +0 -1
  119. package/dist/public/assets/explorer-view-NcArt0_H.js +0 -75
  120. package/dist/public/assets/git-history-dialog-rWkjoaR5.js +0 -1
  121. package/dist/public/assets/index-BOB3ZUQs.js +0 -3386
  122. package/dist/public/assets/index-BdGMz8sL.css +0 -1
  123. package/dist/public/assets/markdown-renderer-BkKibNMs.js +0 -8
  124. package/dist/public/assets/mcp-server-card-DFT7uyRh.js +0 -1
  125. package/dist/public/assets/merged-pr-dialog-BOrFaYk6.js +0 -1
  126. package/dist/public/assets/model-list-controls-CpQjn6i7.js +0 -1
  127. package/dist/public/assets/ndjson-stream-DeGpE5o5.js +0 -2
  128. package/dist/public/assets/onboarding-dialog-HJpyzVWa.js +0 -1
  129. package/dist/public/assets/project-env-vars-view-C9VTTfTo.js +0 -1
  130. package/dist/public/assets/project-model-aliases-view-DKRoV7Gc.js +0 -1
  131. package/dist/public/assets/project-settings-view-BDYqpibk.js +0 -1
  132. package/dist/public/assets/project-tools-view-9WUc4Yca.js +0 -1
  133. package/dist/public/assets/providers-list-view-BgvIWP_0.js +0 -1
  134. package/dist/public/assets/pull-request-dialog-BM1dkFpK.js +0 -1
  135. package/dist/public/assets/pull-with-changes-dialog-Bjl_esir.js +0 -1
  136. package/dist/public/assets/push-before-pr-dialog-Cbc_zaI8.js +0 -1
  137. package/dist/public/assets/query-keys-5QPW6Dv-.js +0 -1
  138. package/dist/public/assets/radio-group-CMW5ku-w.js +0 -1
  139. package/dist/public/assets/scenic-chrome-CbN3vum7.js +0 -1
  140. package/dist/public/assets/scroll-area-BMQFeWmq.js +0 -1
  141. package/dist/public/assets/settings-general-view-BaMVw6kD.js +0 -1
  142. package/dist/public/assets/settings-instructions-view-BRE87H2U.js +0 -1
  143. package/dist/public/assets/settings-list-BpPbGcpS.js +0 -1
  144. package/dist/public/assets/settings-logs-view-Bbue8ZOn.js +0 -5
  145. package/dist/public/assets/settings-mcp-servers-view-BiMCy8sH.js +0 -5
  146. package/dist/public/assets/settings-models-view-BkZtGcUP.js +0 -1
  147. package/dist/public/assets/settings-rules-view-TK7LEC-0.js +0 -8
  148. package/dist/public/assets/settings-skills-view-Bv9Kn55r.js +0 -3
  149. package/dist/public/assets/settings-slack-view-Dy2bFJqU.js +0 -1
  150. package/dist/public/assets/settings-slash-commands-view-DiR1IyMF.js +0 -1
  151. package/dist/public/assets/settings-statistics-view-DX1UVeCJ.js +0 -1
  152. package/dist/public/assets/settings-storage-view-D8tHP8XT.js +0 -1
  153. package/dist/public/assets/settings-subagents-view-Bz7jBhbB.js +0 -2
  154. package/dist/public/assets/settings-system-prompt-view-VHGAqfQk.js +0 -1
  155. package/dist/public/assets/settings-view-QBOhYAyv.js +0 -2
  156. package/dist/public/assets/skeleton-DvLd14RU.js +0 -1
  157. package/dist/public/assets/store-CHF6tOp2.js +0 -9
  158. package/dist/public/assets/suspense-resource-DnYnmTbs.js +0 -1
  159. package/dist/public/assets/switch-P5m18oUl.js +0 -1
  160. package/dist/public/assets/table-MUx4ZxvS.js +0 -1
  161. package/dist/public/assets/tasks-view-l00Nc2fV.js +0 -2
  162. package/dist/public/assets/toggle-group-DMR7z3pz.js +0 -1
  163. package/dist/public/assets/tooltip-BtJG5fZl.js +0 -1
  164. package/dist/public/assets/use-installed-ai-files-CJr_PVcY.js +0 -1
  165. package/dist/public/assets/use-open-chat-dock-panel-B31lwcQF.js +0 -1
  166. package/dist/public/assets/useInfiniteQuery-DUeUxDcu.js +0 -1
  167. package/dist/public/assets/utils-CT-Dw22R.js +0 -1
@@ -1,75 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{t as i}from"./markdown-renderer-BkKibNMs.js";import{B as a,S as o,ot as s,z as c}from"./dist-DjiNKpTV.js";import{r as l}from"./store-CHF6tOp2.js";import{Et as u,Xt as d,Yt as f,dt as p,in as m,jn as h,rt as g,tt as _,vn as v}from"./dist-CNOCRPxn.js";import{t as y}from"./utils-CT-Dw22R.js";import{t as b}from"./button-B6HDsfd5.js";import{ot as ee,zr as x}from"./api-D1GxdEEp.js";import{n as S}from"./async-loading-fallback-D2X0o4Qa.js";import{t as C}from"./use-toast-xpb5jNtN.js";import{n as w}from"./explorer-tab-context-BxUVwWQQ.js";import{t as T}from"./suspense-resource-DnYnmTbs.js";import{t as E}from"./use-suspense-resource-Dkz6ddFN.js";import{In as D,Ln as O,Nn as k,P as te,Pn as A,Un as j,dt as M,ft as N,gt as P,mt as F,pt as I,st as L,ut as R}from"./index-BOB3ZUQs.js";import{t as z}from"./async-error-boundary-DNJqC4BV.js";import{t as B}from"./monaco-setup-DU2h1v3K.js";var V=t(),H=e(n(),1),U=r(),W=o(`explorer.preview`),ne=[{label:`Markdown`,ext:`md`,icon:d},{label:`TypeScript`,ext:`ts`,icon:m},{label:`Text`,ext:`txt`,icon:f}];async function re(e,t){try{let n=await N(e,``),r=new Set(n.entries.map(e=>e.name)),i=`untitled`,a=`${i}.${t}`,o=2;for(;r.has(a);)a=`${i}${o}.${t}`,o++;return a}catch{return`untitled.${t}`}}function G(e){return a(e)===`md`}function K(e){return{ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,json:`json`,md:`markdown`,mdc:`markdown`,css:`css`,scss:`scss`,html:`html`,py:`python`,sh:`shell`,yaml:`yaml`,yml:`yaml`,xml:`xml`,sql:`sql`}[a(e)]??`plaintext`}function q(e,t){return`explorer-file:${e}:${t}`}function J(e){let t=(0,V.c)(11),{threadId:n,path:r,contentKey:i,onContentReady:a}=e,o;t[0]!==r||t[1]!==n?(o=q(n,r),t[0]=r,t[1]=n,t[2]=o):o=t[2];let s;t[3]!==r||t[4]!==n?(s=async()=>{try{return await M(n,r)}catch(e){let t=e;throw Y(`Failed to load explorer file preview`,{threadId:n,path:r},t),t}},t[3]=r,t[4]=n,t[5]=s):s=t[5];let c=E(o,s),l,u;return t[6]!==i||t[7]!==a||t[8]!==c.content?(l=()=>{a({key:i,content:c.content,original:c.content})},u=[a,c.content,i],t[6]=i,t[7]=a,t[8]=c.content,t[9]=l,t[10]=u):(l=t[9],u=t[10]),(0,H.useLayoutEffect)(l,u),null}function Y(e,t,n){W.error(e,{...t,error:n})}function X(e,t){return`explorer-media:${e}:${t}`}function Z(e,t){let n=(0,V.c)(11),r;n[0]!==t||n[1]!==e?(r=X(e,t),n[0]=t,n[1]=e,n[2]=r):r=n[2];let i;n[3]!==t||n[4]!==e?(i=async()=>{try{return await R(e,t)}catch(n){let r=n;throw Y(`Failed to load explorer media preview`,{threadId:e,path:t},r),r}},n[3]=t,n[4]=e,n[5]=i):i=n[5];let a=E(r,i),o;n[6]===a?o=n[7]:(o=URL.createObjectURL(a),n[6]=a,n[7]=o);let s=o,c,l;return n[8]===s?(c=n[9],l=n[10]):(c=()=>()=>{URL.revokeObjectURL(s)},l=[s],n[8]=s,n[9]=c,n[10]=l),(0,H.useEffect)(c,l),s}function ie(e){let t=(0,V.c)(3),{threadId:n,path:r,alt:i}=e,a=Z(n,r),o;return t[0]!==i||t[1]!==a?(o=(0,U.jsx)(`div`,{className:`flex items-center justify-center h-full p-4 overflow-auto`,children:(0,U.jsx)(`img`,{src:a,alt:i,className:`max-w-full max-h-full object-contain`})}),t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function Q(e){let t=(0,V.c)(2),{threadId:n,path:r}=e,i=Z(n,r),a;return t[0]===i?a=t[1]:(a=(0,U.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,U.jsx)(`video`,{src:i,controls:!0,className:`max-w-full max-h-full`})}),t[0]=i,t[1]=a),a}function ae(e){e?.getModel()?.dispose(),e?.dispose()}function oe(e,t){return t?`edit`:G(e.path)?`view`:`edit`}function se(e,t,n,r){let i=t?c(t.path,t.name):null,a=t?.type===`file`&&e&&!i?t:null,o=a?`${e}:${a.path}:${r}`:null,s=n&&n.key===o?n:null;return{selectedMediaType:i,editableFile:a,fileSuspenseKey:o,currentContent:s,fileContent:s?.content??``,originalFileContent:s?.original??``}}function ce(){let e=document.querySelector(`[data-markdown-print-content]`);return e instanceof HTMLElement?e:null}function le(e,t){return`<!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>${e}</title>
7
- <style>
8
- :root {
9
- color-scheme: light;
10
- font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
- line-height: 1.5;
12
- }
13
- * {
14
- box-sizing: border-box;
15
- }
16
- body {
17
- margin: 0;
18
- background: white;
19
- color: black;
20
- }
21
- .markdown-print-shell {
22
- max-width: 900px;
23
- margin: 0 auto;
24
- padding: 32px;
25
- }
26
- img, video, svg {
27
- max-width: 100%;
28
- height: auto;
29
- }
30
- pre {
31
- white-space: pre-wrap;
32
- overflow-wrap: anywhere;
33
- border: 1px solid #d4d4d8;
34
- border-radius: 8px;
35
- padding: 12px;
36
- background: #f4f4f5;
37
- }
38
- code {
39
- white-space: pre-wrap;
40
- overflow-wrap: anywhere;
41
- }
42
- table {
43
- width: 100%;
44
- border-collapse: collapse;
45
- }
46
- th, td {
47
- border: 1px solid #d4d4d8;
48
- padding: 8px;
49
- text-align: left;
50
- }
51
- @page {
52
- margin: 0.75in;
53
- }
54
- @media print {
55
- body {
56
- -webkit-print-color-adjust: exact;
57
- print-color-adjust: exact;
58
- }
59
- .markdown-print-shell {
60
- max-width: none;
61
- padding: 0;
62
- }
63
- }
64
- </style>
65
- </head>
66
- <body>
67
- <main class="markdown-print-shell">${t}</main>
68
- <script>
69
- window.addEventListener("load", () => {
70
- window.focus();
71
- window.print();
72
- }, { once: true });
73
- <\/script>
74
- </body>
75
- </html>`}function ue(e,t){let n=window.open(``,`_blank`,`noopener,noreferrer`);return n?(n.document.open(),n.document.write(le(e,t)),n.document.close(),!0):!1}function de(e){if(typeof window>`u`)return;let t=ce();if(!t){C({title:`Print unavailable`,description:`Couldn't find the markdown preview to print.`,variant:`destructive`});return}ue(e.name??`Markdown document`,t.innerHTML)||C({title:`Print blocked`,description:`Allow pop-ups to print this file.`,variant:`destructive`})}async function fe(e,t){C({title:`PDF created`,description:`Opened ${(await F(e,t.path)).outputPath.split(/[\\/]/).pop()??`the PDF`} in your default app.`})}async function pe(e,t){try{if(!x()){de(t);return}await fe(e,t)}catch(n){Y(`Failed to print markdown file as PDF`,{threadId:e,path:t.path},n),C({title:`PDF export failed`,description:n instanceof Error?n.message:`Failed to convert this markdown file to PDF.`,variant:`destructive`})}}async function me(e,t){try{let n=await re(e,t);return await L(e,``,n),C({title:`Created`,description:`${n} created successfully.`}),n}catch(n){return Y(`Failed to create explorer file`,{threadId:e,extension:t},n),C({title:`Error`,description:`Failed to create file.`,variant:`destructive`}),null}}async function he(e,t){try{await navigator.clipboard.writeText(t),C({title:`Copied`,description:`Repository folder path copied to clipboard.`})}catch(n){Y(`Failed to copy explorer folder path`,{threadId:e,folderPath:t},n),C({title:`Error`,description:`Failed to copy path to clipboard.`,variant:`destructive`})}}async function ge(e,t){try{await I(e,`.`)}catch(n){Y(`Failed to open explorer repository folder`,{threadId:e,folderPath:t},n),C({title:`Error`,description:`Failed to open repository folder.`,variant:`destructive`})}}async function _e(e){try{await P(e.threadId,e.file.path,e.content),e.onSaved({key:e.suspenseKey,content:e.content,original:e.content}),C({title:`Saved`,description:`${e.file.name} saved successfully.`})}catch(t){Y(`Failed to save explorer file`,{threadId:e.threadId,path:e.file.path},t),C({title:`Error`,description:t instanceof Error?t.message:`Failed to save file`,variant:`destructive`})}}function ve(e){let t=(0,V.c)(15),{selectedFile:n,showBackButton:r,onShowTree:i}=e,a;t[0]!==i||t[1]!==r?(a=r&&i?(0,U.jsxs)(b,{variant:`ghost`,size:`icon`,className:`h-8 w-8 shrink-0 text-muted-foreground electrobun-webkit-app-region-no-drag`,onClick:i,children:[(0,U.jsx)(p,{className:`h-4 w-4`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Show file tree`})]}):null,t[0]=i,t[1]=r,t[2]=a):a=t[2];let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=y(s.label,`truncate leading-normal text-foreground`),t[3]=o):o=t[3];let c=n?n.name:`Select a file to edit`,l;t[4]===c?l=t[5]:(l=(0,U.jsx)(`span`,{className:o,children:c}),t[4]=c,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=y(s.compact,`truncate text-muted-foreground`),t[6]=u):u=t[6];let d=n?n.path:`Browse and edit repository files`,f;t[7]===d?f=t[8]:(f=(0,U.jsx)(`span`,{className:u,children:d}),t[7]=d,t[8]=f);let m;t[9]!==l||t[10]!==f?(m=(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[l,f]}),t[9]=l,t[10]=f,t[11]=m):m=t[11];let h;return t[12]!==a||t[13]!==m?(h=(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[a,m]}),t[12]=a,t[13]=m,t[14]=h):h=t[14],h}function ye(e){let t=(0,V.c)(12),{path:n,markdownMode:r,onMarkdownModeChange:i,printing:a,onPrint:o}=e,s;t[0]!==r||t[1]!==o||t[2]!==n||t[3]!==a?(s=G(n)&&r===`view`?(0,U.jsxs)(b,{size:`sm`,variant:`outline`,onClick:o,disabled:a,children:[a?(0,U.jsx)(u,{className:`h-4 w-4 animate-spin`}):(0,U.jsx)(_,{className:`h-4 w-4`}),a?`Printing…`:`Print`]}):null,t[0]=r,t[1]=o,t[2]=n,t[3]=a,t[4]=s):s=t[4];let c;t[5]!==r||t[6]!==i||t[7]!==n?(c=G(n)?(0,U.jsxs)(`div`,{className:`flex rounded-full border border-input bg-background p-0.5`,children:[(0,U.jsx)(b,{size:`sm`,variant:r===`view`?`secondary`:`ghost`,className:`h-7 px-3`,onClick:()=>i(`view`),children:`View`}),(0,U.jsx)(b,{size:`sm`,variant:r===`edit`?`secondary`:`ghost`,className:`h-7 px-3`,onClick:()=>i(`edit`),children:`Edit`})]}):null,t[5]=r,t[6]=i,t[7]=n,t[8]=c):c=t[8];let l;return t[9]!==s||t[10]!==c?(l=(0,U.jsxs)(U.Fragment,{children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function be(e){let t=(0,V.c)(16),{selectedFile:n,editableFile:r,hasLoadedContent:i}=e,a;t[0]!==r||t[1]!==i||t[2]!==e.canSave||t[3]!==e.markdownMode||t[4]!==e.onMarkdownModeChange||t[5]!==e.onPrint||t[6]!==e.onSave||t[7]!==e.printing||t[8]!==e.saving?(a=r&&i?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye,{path:r.path,markdownMode:e.markdownMode,onMarkdownModeChange:e.onMarkdownModeChange,printing:e.printing,onPrint:e.onPrint}),(0,U.jsxs)(b,{size:`sm`,onClick:e.onSave,disabled:e.saving||!e.canSave,children:[e.saving?(0,U.jsx)(u,{className:`h-4 w-4 animate-spin`}):null,`Save`]})]}):null,t[0]=r,t[1]=i,t[2]=e.canSave,t[3]=e.markdownMode,t[4]=e.onMarkdownModeChange,t[5]=e.onPrint,t[6]=e.onSave,t[7]=e.printing,t[8]=e.saving,t[9]=a):a=t[9];let o;t[10]!==e||t[11]!==n?(o=n?null:(0,U.jsxs)(A,{children:[(0,U.jsx)(j,{asChild:!0,children:(0,U.jsxs)(b,{size:`sm`,className:`gap-1.5`,children:[(0,U.jsx)(g,{className:`h-3.5 w-3.5`}),`New file`]})}),(0,U.jsx)(D,{align:`end`,children:ne.map(t=>{let{label:n,ext:r,icon:i}=t;return(0,U.jsxs)(O,{onSelect:()=>e.onNewFile(r),children:[(0,U.jsx)(i,{className:`h-4 w-4`}),n]},r)})})]}),t[10]=e,t[11]=n,t[12]=o):o=t[12];let s;return t[13]!==a||t[14]!==o?(s=(0,U.jsxs)(U.Fragment,{children:[a,o]}),t[13]=a,t[14]=o,t[15]=s):s=t[15],s}function xe(){let e=(0,V.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,U.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-center p-8`,children:[(0,U.jsx)(`h2`,{className:y(s.pageTitle,`text-foreground`),children:`File Explorer`}),(0,U.jsx)(`p`,{className:y(s.pageSubtitle),children:`Browse and edit files`})]}),e[0]=t):t=e[0],t}function $(e){let t=(0,V.c)(14),{mediaType:n,threadId:r,file:i}=e,a=n===`image`?`Failed to load image`:`Failed to load video`,o;t[0]!==i.path||t[1]!==r?(o=()=>{T(X(r,i.path))},t[0]=i.path,t[1]=r,t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,U.jsx)(S,{}),t[3]=s):s=t[3];let c;t[4]!==i.name||t[5]!==i.path||t[6]!==n||t[7]!==r?(c=(0,U.jsx)(H.Suspense,{fallback:s,children:n===`image`?(0,U.jsx)(ie,{threadId:r,path:i.path,alt:i.name}):(0,U.jsx)(Q,{threadId:r,path:i.path})}),t[4]=i.name,t[5]=i.path,t[6]=n,t[7]=r,t[8]=c):c=t[8];let l;return t[9]!==i.path||t[10]!==a||t[11]!==o||t[12]!==c?(l=(0,U.jsx)(z,{fallbackTitle:a,onRetry:o,children:c},i.path),t[9]=i.path,t[10]=a,t[11]=o,t[12]=c,t[13]=l):l=t[13],l}function Se(e){let t=(0,V.c)(20),{threadId:n,file:r,suspenseKey:a,hasLoadedContent:o,fileContent:s,markdownMode:c,resolvedTheme:l,onContentChange:u,onEditorMount:d,onRetry:f}=e,p=a??void 0,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,U.jsx)(S,{}),t[0]=m):m=t[0];let h=a??void 0,g=a??``,_;t[1]!==r.path||t[2]!==u||t[3]!==h||t[4]!==g||t[5]!==n?(_=(0,U.jsx)(H.Suspense,{fallback:m,children:(0,U.jsx)(J,{threadId:n,path:r.path,contentKey:g,onContentReady:u},h)}),t[1]=r.path,t[2]=u,t[3]=h,t[4]=g,t[5]=n,t[6]=_):_=t[6];let v;t[7]!==r.path||t[8]!==s||t[9]!==o||t[10]!==c||t[11]!==u||t[12]!==d||t[13]!==l?(v=o?G(r.path)&&c===`view`?(0,U.jsx)(`div`,{className:`h-full overflow-auto p-6 print:h-auto print:overflow-visible print:p-0`,children:(0,U.jsx)(`div`,{className:`mx-auto max-w-4xl print:max-w-none`,"data-markdown-print-content":!0,children:(0,U.jsx)(i,{content:s,enableMermaid:!0})})}):(0,U.jsx)(B,{height:`100%`,language:K(r.path),value:s,onChange:e=>u(t=>t&&{...t,content:e??``}),onMount:d,theme:l===`dark`?`vs-dark`:`vs-light`,options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:`on`,automaticLayout:!0,fontSize:14,lineNumbers:`on`,renderLineHighlight:`line`,scrollbar:{vertical:`auto`,horizontal:`auto`}}}):(0,U.jsx)(S,{}),t[7]=r.path,t[8]=s,t[9]=o,t[10]=c,t[11]=u,t[12]=d,t[13]=l,t[14]=v):v=t[14];let y;return t[15]!==f||t[16]!==p||t[17]!==_||t[18]!==v?(y=(0,U.jsxs)(z,{fallbackTitle:`Failed to load file`,onRetry:f,children:[_,v]},p),t[15]=f,t[16]=p,t[17]=_,t[18]=v,t[19]=y):y=t[19],y}function Ce(e){let t=(0,V.c)(18);if(e.editableFile){let n;return t[0]!==e.editableFile||t[1]!==e.fileContent||t[2]!==e.fileSuspenseKey||t[3]!==e.hasLoadedContent||t[4]!==e.markdownMode||t[5]!==e.onContentChange||t[6]!==e.onEditorMount||t[7]!==e.onFileLoadRetry||t[8]!==e.resolvedTheme||t[9]!==e.threadId?(n=(0,U.jsx)(Se,{threadId:e.threadId,file:e.editableFile,suspenseKey:e.fileSuspenseKey,hasLoadedContent:e.hasLoadedContent,fileContent:e.fileContent,markdownMode:e.markdownMode,resolvedTheme:e.resolvedTheme,onContentChange:e.onContentChange,onEditorMount:e.onEditorMount,onRetry:e.onFileLoadRetry}),t[0]=e.editableFile,t[1]=e.fileContent,t[2]=e.fileSuspenseKey,t[3]=e.hasLoadedContent,t[4]=e.markdownMode,t[5]=e.onContentChange,t[6]=e.onEditorMount,t[7]=e.onFileLoadRetry,t[8]=e.resolvedTheme,t[9]=e.threadId,t[10]=n):n=t[10],n}if(e.selectedFile?.type===`file`&&e.selectedMediaType===`image`){let n;return t[11]!==e.selectedFile||t[12]!==e.threadId?(n=(0,U.jsx)($,{mediaType:`image`,threadId:e.threadId,file:e.selectedFile}),t[11]=e.selectedFile,t[12]=e.threadId,t[13]=n):n=t[13],n}if(e.selectedFile?.type===`file`&&e.selectedMediaType===`video`){let n;return t[14]!==e.selectedFile||t[15]!==e.threadId?(n=(0,U.jsx)($,{mediaType:`video`,threadId:e.threadId,file:e.selectedFile}),t[14]=e.selectedFile,t[15]=e.threadId,t[16]=n):n=t[16],n}let n;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,U.jsx)(xe,{}),t[17]=n):n=t[17],n}function we(e){let t=(0,V.c)(5),{folderPath:n,copying:r,onOpen:i,onCopy:a}=e,o;return t[0]!==r||t[1]!==n||t[2]!==a||t[3]!==i?(o=(0,U.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 px-4 py-2`,children:n?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,onClick:i,className:y(s.compact,`min-w-0 flex-1 truncate text-left font-mono text-muted-foreground hover:text-foreground hover:underline`),title:n,children:n}),(0,U.jsxs)(b,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,onClick:a,disabled:r,children:[r?(0,U.jsx)(h,{className:`h-3.5 w-3.5`}):(0,U.jsx)(v,{className:`h-3.5 w-3.5`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Copy path`})]})]}):(0,U.jsx)(`p`,{className:y(s.compact,`text-muted-foreground/50 italic`),children:`Loading path...`})}),t[0]=r,t[1]=n,t[2]=a,t[3]=i,t[4]=o):o=t[4],o}function Te({selectedFile:e,showTreeBackButton:t=!1,onShowTree:n,onFileCreated:r}){let{resolvedTheme:i}=te(),a=l(e=>e.selectedThreadId),{triggerExplorerRefresh:o}=w(),c=(0,H.useRef)(null),u=(0,H.useRef)(null),f=(0,H.useRef)(!1),[p,m]=(0,H.useState)(null),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(!1),[y,b]=(0,H.useState)(`edit`),[x,S]=(0,H.useState)(0),[C,E]=(0,H.useState)(null),[D,O]=(0,H.useState)(!1),A=e?.path??null;(0,H.useEffect)(()=>{a&&ee(a).then(E).catch(()=>{})},[a]);let j=async()=>{if(!(!C||D)){O(!0);try{await he(a,C)}finally{O(!1)}}},M=(0,H.useCallback)(async e=>{if(!a)return;let t=await me(a,e);if(!t)return;let n={name:t,path:t,type:`file`};u.current=t,f.current=!0,r?.(n),o()},[a,r,o]),{selectedMediaType:N,editableFile:P,fileSuspenseKey:F,currentContent:I,fileContent:L,originalFileContent:R}=se(a,e,p,x);(0,H.useEffect)(()=>()=>{ae(c.current),c.current=null},[]),(0,H.useEffect)(()=>{if(e?.type===`file`){let t=u.current===e.path;t&&(u.current=null),b(oe(e,t))}else b(`edit`)},[A,a]);async function z(){if(!(!a||!e||!F)){g(!0);try{await _e({threadId:a,file:e,suspenseKey:F,content:L,onSaved:m})}finally{g(!1)}}}async function B(){if(!(!a||!e||_)){v(!0);try{await pe(a,e)}finally{v(!1)}}}let V=(0,H.useCallback)(e=>{c.current=e,f.current&&(f.current=!1,e.focus())},[]);function W(){!a||!P||(T(q(a,P.path)),S(e=>e+1))}return a?(0,U.jsxs)(`div`,{className:`explorer-view-root flex flex-col h-full print:block print:h-auto`,children:[(0,U.jsxs)(k,{className:`justify-between print:hidden`,children:[(0,U.jsx)(ve,{selectedFile:e,showBackButton:t,onShowTree:n}),(0,U.jsx)(`div`,{className:`flex gap-2`,children:(0,U.jsx)(be,{selectedFile:e,editableFile:P,hasLoadedContent:I!==null,markdownMode:y,onMarkdownModeChange:b,printing:_,onPrint:()=>void B(),saving:h,canSave:L!==``&&L!==R,onSave:()=>void z(),onNewFile:e=>void M(e)})})]}),(0,U.jsx)(`div`,{className:`flex-1 overflow-hidden print:overflow-visible print:flex-none`,children:(0,U.jsx)(`div`,{className:`h-full relative overflow-hidden print:h-auto print:overflow-visible`,children:(0,U.jsx)(Ce,{threadId:a,selectedFile:e,selectedMediaType:N,editableFile:P,fileSuspenseKey:F,hasLoadedContent:I!==null,fileContent:L,markdownMode:y,resolvedTheme:i,onContentChange:m,onEditorMount:V,onFileLoadRetry:W})})}),e?null:(0,U.jsx)(we,{folderPath:C,copying:D,onOpen:()=>void ge(a,C),onCopy:()=>void j()})]}):(0,U.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-center`,children:[(0,U.jsx)(d,{className:`h-8 w-8 text-muted-foreground`}),(0,U.jsx)(`p`,{className:s.bodyMuted,children:`Select a thread to browse its files`})]})}export{Te as default};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./react-vendor-Ee0-5T4I.js";import{ot as n}from"./dist-DjiNKpTV.js";import{Et as r}from"./dist-CNOCRPxn.js";import{t as i}from"./utils-CT-Dw22R.js";import{t as a}from"./button-B6HDsfd5.js";import{a as o,i as s,o as c,r as l,s as u,t as d}from"./dialog--0foS3aw.js";var f=e(),p=t();function m(e){let t=(0,f.c)(28),{open:m,onOpenChange:g,commits:_,displayedCommits:v,isLoadingMore:y,onScroll:b,currentBranch:x}=e,S;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,p.jsx)(u,{children:`Commit History`}),t[0]=S):S=t[0];let C;t[1]===x?C=t[2]:(C=(0,p.jsxs)(c,{children:[S,(0,p.jsxs)(s,{children:[`Recent commits on branch `,x]})]}),t[1]=x,t[2]=C);let w;t[3]===v?w=t[4]:(w=v.length>0?v.map(h):(0,p.jsx)(`p`,{className:i(n.bodyMuted,`text-center py-8`),children:`No commits found`}),t[3]=v,t[4]=w);let T;t[5]===y?T=t[6]:(T=y&&(0,p.jsx)(`div`,{className:`p-3 text-center`,children:(0,p.jsx)(r,{className:`h-4 w-4 animate-spin inline`})}),t[5]=y,t[6]=T);let E;t[7]!==_.length||t[8]!==v.length||t[9]!==y?(E=v.length<_.length&&!y&&(0,p.jsx)(`div`,{className:i(n.caption,`p-3 text-center`),children:`Scroll to load more`}),t[7]=_.length,t[8]=v.length,t[9]=y,t[10]=E):E=t[10];let D;t[11]!==w||t[12]!==T||t[13]!==E?(D=(0,p.jsxs)(`div`,{className:`divide-y`,children:[w,T,E]}),t[11]=w,t[12]=T,t[13]=E,t[14]=D):D=t[14];let O;t[15]!==b||t[16]!==D?(O=(0,p.jsx)(`div`,{className:`flex-1 overflow-y-auto border rounded-lg`,onScroll:b,children:D}),t[15]=b,t[16]=D,t[17]=O):O=t[17];let k;t[18]===g?k=t[19]:(k=(0,p.jsx)(o,{children:(0,p.jsx)(a,{onClick:()=>g(!1),children:`Close`})}),t[18]=g,t[19]=k);let A;t[20]!==C||t[21]!==O||t[22]!==k?(A=(0,p.jsxs)(l,{className:`max-w-2xl max-h-[80vh] flex flex-col`,children:[C,O,k]}),t[20]=C,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;return t[24]!==g||t[25]!==m||t[26]!==A?(j=(0,p.jsx)(d,{open:m,onOpenChange:g,children:A}),t[24]=g,t[25]=m,t[26]=A,t[27]=j):j=t[27],j}function h(e){return(0,p.jsxs)(`div`,{className:`p-3 hover:bg-muted/50 transition-colors`,children:[(0,p.jsx)(`p`,{className:i(n.label,`break-words`),children:e.message}),(0,p.jsxs)(`p`,{className:i(n.bodyMuted,`mt-1`),children:[(0,p.jsx)(`span`,{className:n.mono,children:e.hash.substring(0,7)}),` •`,` `,e.author,` • `,new Date(e.date).toLocaleDateString()]})]},e.hash)}export{m as GitHistoryDialog};