tarsk 0.5.71 → 0.5.72

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 (172) hide show
  1. package/dist/index.js +83963 -83321
  2. package/dist/public/assets/Combination-lwI_j-mU.js +41 -0
  3. package/dist/public/assets/account-view-C_WBVXA3.js +1 -0
  4. package/dist/public/assets/alert-dialog-FQ5_FqBX.js +7 -0
  5. package/dist/public/assets/api-ODizoHnY.js +2 -0
  6. package/dist/public/assets/async-error-boundary-DCDTsNTO.js +1 -0
  7. package/dist/public/assets/async-loading-fallback-C173aA9v.js +1 -0
  8. package/dist/public/assets/browser-overlay-block-CiDtkfup.js +1 -0
  9. package/dist/public/assets/browser-tab-Cl9d7ESj.js +12 -0
  10. package/dist/public/assets/button-sfGyFWfz.js +1 -0
  11. package/dist/public/assets/card-D5k0GHxM.js +1 -0
  12. package/dist/public/assets/chat-dock-context-DIyMsJHM.js +1 -0
  13. package/dist/public/assets/chunk-QFMPRPBF-COsSkB7x.js +3 -0
  14. package/dist/public/assets/commit-dialog-Bmh1QdHK.js +1 -0
  15. package/dist/public/assets/commit-error-dialog-Dpu8C-0w.js +1 -0
  16. package/dist/public/assets/commit-method-fields-CYzy7rmY.js +1 -0
  17. package/dist/public/assets/context-menu-Bo0OMC7-.js +1 -0
  18. package/dist/public/assets/conversation-history-view-COFXqD0e.js +1 -0
  19. package/dist/public/assets/create-project-dialog-DQ4AbwQP.js +6 -0
  20. package/dist/public/assets/create-project-workspace-BiRMezO9.js +1 -0
  21. package/dist/public/assets/create-repo-dialog-CYiCHWgi.js +1 -0
  22. package/dist/public/assets/delete-confirm-dialog-B99gEJN8.js +1 -0
  23. package/dist/public/assets/dialog-CP2cYR59.js +1 -0
  24. package/dist/public/assets/diff-view-Cnuntc3l.js +4 -0
  25. package/dist/public/assets/dist-BZvmHCxP.js +5 -0
  26. package/dist/public/assets/dist-CSssbxDI.js +1 -0
  27. package/dist/public/assets/dist-CWnEmdyL.js +1 -0
  28. package/dist/public/assets/dist-CWq9XRXF.js +1 -0
  29. package/dist/public/assets/dist-DIjomljy.js +1 -0
  30. package/dist/public/assets/dist-DiMgghKn.js +1 -0
  31. package/dist/public/assets/dist-DjKXDRW7.js +1 -0
  32. package/dist/public/assets/dist-DrpdKPSI.js +1 -0
  33. package/dist/public/assets/dist-OixawqbU.js +1 -0
  34. package/dist/public/assets/dist-ZlK7I-y-.js +2 -0
  35. package/dist/public/assets/dist-mdooLpmq.js +1 -0
  36. package/dist/public/assets/explorer-tab-context-BxUVwWQQ.js +1 -0
  37. package/dist/public/assets/explorer-tab-view-BoCoREoE.js +2 -0
  38. package/dist/public/assets/explorer-tree-DvD1-WW3.js +1 -0
  39. package/dist/public/assets/explorer-view-B4WJUy7s.js +75 -0
  40. package/dist/public/assets/git-history-dialog-DHdzijZS.js +1 -0
  41. package/dist/public/assets/index-Bmkj1Qwa.js +3380 -0
  42. package/dist/public/assets/index-DPMRI86E.css +1 -0
  43. package/dist/public/assets/main-tab-context-Byl1LybL.js +1 -0
  44. package/dist/public/assets/markdown-renderer-Dx9-Ljv0.js +8 -0
  45. package/dist/public/assets/mcp-server-card-DPNG9Up7.js +1 -0
  46. package/dist/public/assets/merged-pr-dialog-CEvS2z8D.js +1 -0
  47. package/dist/public/assets/model-list-controls-ChoemIJa.js +1 -0
  48. package/dist/public/assets/{monaco-D1hpqXQ0.js → monaco-lJcjGRXq.js} +189 -199
  49. package/dist/public/assets/monaco-setup-DU2h1v3K.js +11 -0
  50. package/dist/public/assets/onboarding-dialog-DCull5p_.js +1 -0
  51. package/dist/public/assets/pending-changes-Bn-0ak1d.js +1 -0
  52. package/dist/public/assets/project-env-vars-view-DTGwl4wr.js +1 -0
  53. package/dist/public/assets/project-model-aliases-view-CEDz_6NW.js +1 -0
  54. package/dist/public/assets/project-settings-view-DniUno1i.js +1 -0
  55. package/dist/public/assets/project-tools-view-DknCaJu_.js +1 -0
  56. package/dist/public/assets/providers-list-view-D_n1Ai6S.js +1 -0
  57. package/dist/public/assets/pull-request-dialog-BkQBaJkw.js +1 -0
  58. package/dist/public/assets/pull-with-changes-dialog-rKmqSi73.js +1 -0
  59. package/dist/public/assets/push-before-pr-dialog-BeEx6Po_.js +1 -0
  60. package/dist/public/assets/query-keys-5QPW6Dv-.js +1 -0
  61. package/dist/public/assets/radio-group-CU59hGiA.js +1 -0
  62. package/dist/public/assets/react-vendor-Ee0-5T4I.js +9 -0
  63. package/dist/public/assets/scroll-area-nbNFO91g.js +1 -0
  64. package/dist/public/assets/settings-general-view-CVHlxpTM.js +1 -0
  65. package/dist/public/assets/settings-instructions-view-Bpx_dUaJ.js +1 -0
  66. package/dist/public/assets/settings-list-PMi8ZniW.js +1 -0
  67. package/dist/public/assets/settings-logs-view-64Aq1hEw.js +5 -0
  68. package/dist/public/assets/settings-mcp-servers-view-B84c4h47.js +5 -0
  69. package/dist/public/assets/settings-models-view-DdRC4YXo.js +1 -0
  70. package/dist/public/assets/settings-rules-view-CGLh95Ta.js +8 -0
  71. package/dist/public/assets/settings-skills-view-DeVnXDl-.js +3 -0
  72. package/dist/public/assets/settings-slack-view-OFNrG_DW.js +1 -0
  73. package/dist/public/assets/settings-slash-commands-view-DOo0BimH.js +1 -0
  74. package/dist/public/assets/settings-statistics-view-DpaSoVqG.js +1 -0
  75. package/dist/public/assets/settings-storage-view-DlyXWB__.js +1 -0
  76. package/dist/public/assets/settings-subagents-view-D7o69YzB.js +2 -0
  77. package/dist/public/assets/settings-system-prompt-view-BFGfrXfe.js +1 -0
  78. package/dist/public/assets/settings-view-Dw1Zh2Qn.js +2 -0
  79. package/dist/public/assets/skeleton-DvLd14RU.js +1 -0
  80. package/dist/public/assets/sorting-DqwxPMRN.js +1 -0
  81. package/dist/public/assets/store-Be_7VK0D.js +8 -0
  82. package/dist/public/assets/switch-pIBaqatj.js +1 -0
  83. package/dist/public/assets/table-B2TDbGGl.js +1 -0
  84. package/dist/public/assets/tasks-view-FR7c1qFr.js +2 -0
  85. package/dist/public/assets/{terminal-panel-CiCkzKHm.js → terminal-panel-DBZpuMz9.js} +3 -3
  86. package/dist/public/assets/toggle-group-BiUqOiP6.js +1 -0
  87. package/dist/public/assets/tooltip-B6ziVyTv.js +1 -0
  88. package/dist/public/assets/{use-active-dock-panel-instance-BAHb-cSH.js → use-active-dock-panel-instance-CcCdDHzX.js} +1 -1
  89. package/dist/public/assets/use-browser-overlay-block-DyprQSIG.js +1 -0
  90. package/dist/public/assets/use-deferred-search-Dgxosq55.js +1 -0
  91. package/dist/public/assets/use-installed-ai-files-BNrsyACe.js +1 -0
  92. package/dist/public/assets/use-open-chat-dock-panel-D1D5bnsL.js +1 -0
  93. package/dist/public/assets/use-settings-page-loading-BTySlInF.js +1 -0
  94. package/dist/public/assets/use-suspense-resource-Dkz6ddFN.js +1 -0
  95. package/dist/public/assets/use-toast-xpb5jNtN.js +1 -0
  96. package/dist/public/assets/useInfiniteQuery-DUeUxDcu.js +1 -0
  97. package/dist/public/assets/utils-CT-Dw22R.js +1 -0
  98. package/dist/public/assets/{web-CkSlG6TA.js → web-C5UYr_H-.js} +1 -1
  99. package/dist/public/assets/{web-2RomPZ8n.js → web-DaSLtaQ7.js} +1 -1
  100. package/dist/public/assets/{web-DGsiH272.js → web-Rx_XWVAQ.js} +1 -1
  101. package/dist/public/assets/{web-BRo_4CM5.js → web-iwWEZ1P2.js} +1 -1
  102. package/dist/public/index.html +37 -19
  103. package/dist/recommended-models.txt +2 -2
  104. package/package.json +3 -4
  105. package/dist/public/assets/account-view-P4Y5-Gf7.js +0 -1
  106. package/dist/public/assets/alert-dialog-CQsuxtcP.js +0 -1
  107. package/dist/public/assets/async-error-boundary-DajcyqVg.js +0 -1
  108. package/dist/public/assets/browser-tab-DLvnuyhT.js +0 -12
  109. package/dist/public/assets/card-BDQUHsPD.js +0 -1
  110. package/dist/public/assets/chat-dock-context-CUdrQKFm.js +0 -1
  111. package/dist/public/assets/commit-dialog-C98fYJ1d.js +0 -1
  112. package/dist/public/assets/commit-error-dialog-DjFWRUYh.js +0 -1
  113. package/dist/public/assets/commit-method-fields-CPKi4MLF.js +0 -1
  114. package/dist/public/assets/context-menu-D4UmleM5.js +0 -1
  115. package/dist/public/assets/conversation-history-view-CFq844ge.js +0 -1
  116. package/dist/public/assets/create-project-dialog-Du4yuSgt.js +0 -6
  117. package/dist/public/assets/create-project-workspace-Cw58bBNY.js +0 -1
  118. package/dist/public/assets/create-repo-dialog-DaCI6QrX.js +0 -1
  119. package/dist/public/assets/delete-confirm-dialog-V9X76h-2.js +0 -1
  120. package/dist/public/assets/diff-view-CzWiyJDW.js +0 -4
  121. package/dist/public/assets/explorer-tab-context-BdjTEbFh.js +0 -1
  122. package/dist/public/assets/explorer-tab-view-BbukFEig.js +0 -2
  123. package/dist/public/assets/explorer-tree-CKwkrTpU.js +0 -1
  124. package/dist/public/assets/explorer-view-DxvRAs1j.js +0 -75
  125. package/dist/public/assets/git-history-dialog-BIl7cN5L.js +0 -1
  126. package/dist/public/assets/index-BH6Ht-w_.js +0 -3356
  127. package/dist/public/assets/index-DpGlIV5v.css +0 -1
  128. package/dist/public/assets/interactive-BrHVRHmQ.js +0 -21
  129. package/dist/public/assets/main-tab-context-zQSuRQQG.js +0 -1
  130. package/dist/public/assets/markdown-renderer-BcGbfUdk.js +0 -8
  131. package/dist/public/assets/mcp-server-card-D8gWLGuB.js +0 -1
  132. package/dist/public/assets/merged-pr-dialog-BcMvxAAS.js +0 -1
  133. package/dist/public/assets/model-list-controls-8f6YNzoF.js +0 -1
  134. package/dist/public/assets/monaco-setup-B_kQVsDW.js +0 -1
  135. package/dist/public/assets/onboarding-CQV3cOCc.js +0 -46
  136. package/dist/public/assets/project-env-vars-view-DHLrARmp.js +0 -1
  137. package/dist/public/assets/project-model-aliases-view-NaGeOnLB.js +0 -1
  138. package/dist/public/assets/project-settings-view-DYx0Ejz_.js +0 -1
  139. package/dist/public/assets/project-tools-view-Dwh-9yLK.js +0 -1
  140. package/dist/public/assets/providers-list-view-BgHPRsyZ.js +0 -1
  141. package/dist/public/assets/pull-request-dialog-jiDTjl9S.js +0 -1
  142. package/dist/public/assets/pull-with-changes-dialog-tz5BKYLX.js +0 -1
  143. package/dist/public/assets/push-before-pr-dialog-CsCEcu3D.js +0 -1
  144. package/dist/public/assets/query-keys-CbACxUOr.js +0 -1
  145. package/dist/public/assets/react-vendor-CVjuv5OI.js +0 -22
  146. package/dist/public/assets/settings-general-view-DFuR-GEd.js +0 -1
  147. package/dist/public/assets/settings-instructions-view-DyHQ7P84.js +0 -1
  148. package/dist/public/assets/settings-list-CqAk8BOe.js +0 -1
  149. package/dist/public/assets/settings-logs-view-NuI1wC43.js +0 -5
  150. package/dist/public/assets/settings-mcp-servers-view-CzbsCA0X.js +0 -5
  151. package/dist/public/assets/settings-models-view-DC-v64Ua.js +0 -1
  152. package/dist/public/assets/settings-rules-view-F1cdLdbY.js +0 -8
  153. package/dist/public/assets/settings-skills-view-Ba8LIeWY.js +0 -3
  154. package/dist/public/assets/settings-slack-view-DQUSFcUo.js +0 -1
  155. package/dist/public/assets/settings-slash-commands-view-BRBxLk4J.js +0 -1
  156. package/dist/public/assets/settings-statistics-view-4uiJ9rwT.js +0 -1
  157. package/dist/public/assets/settings-storage-view-CuAI5fWL.js +0 -1
  158. package/dist/public/assets/settings-subagents-view-pSxxHmFV.js +0 -2
  159. package/dist/public/assets/settings-system-prompt-view-CrFpAHz1.js +0 -1
  160. package/dist/public/assets/settings-view-_YIXCuoG.js +0 -2
  161. package/dist/public/assets/skeleton-CJSNEi3C.js +0 -1
  162. package/dist/public/assets/store-fffs6-y9.js +0 -8
  163. package/dist/public/assets/table-Cb2C1rQy.js +0 -1
  164. package/dist/public/assets/tasks-view-f5xX4AVx.js +0 -2
  165. package/dist/public/assets/ui-components-DioWsrht.js +0 -1
  166. package/dist/public/assets/use-deferred-search-0sV7mSzX.js +0 -1
  167. package/dist/public/assets/use-installed-ai-files-D7Y1gZYc.js +0 -1
  168. package/dist/public/assets/use-open-chat-dock-panel-zpT9rr8C.js +0 -1
  169. package/dist/public/assets/use-settings-page-loading-BU2CDnfE.js +0 -1
  170. package/dist/public/assets/use-suspense-resource-BxOFFoEK.js +0 -1
  171. package/dist/public/assets/use-toast-hxHsVv6a.js +0 -1
  172. package/dist/public/assets/utils-SsF94Pkg.js +0 -1
@@ -0,0 +1,75 @@
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-Dx9-Ljv0.js";import{R as a,at as o,x as s,z as c}from"./dist-ZlK7I-y-.js";import{r as l}from"./store-Be_7VK0D.js";import{An as u,Et as d,Xt as f,Zt as p,an as m,dt as ee,rt as te,tt as ne,yn as re}from"./dist-DIjomljy.js";import{t as h}from"./utils-CT-Dw22R.js";import{t as g}from"./button-sfGyFWfz.js";import{Ir as _,ot as ie}from"./api-ODizoHnY.js";import{n as v}from"./async-loading-fallback-C173aA9v.js";import{t as y}from"./use-toast-xpb5jNtN.js";import{n as ae}from"./explorer-tab-context-BxUVwWQQ.js";import{t as b}from"./suspense-resource-DnYnmTbs.js";import{t as x}from"./use-suspense-resource-Dkz6ddFN.js";import{P as oe,Tn as S,Vn as C,dt as w,ft as T,gn as se,ht as ce,lt as E,ot as le,pt as ue,ut as D,vn as de,yn as fe}from"./index-Bmkj1Qwa.js";import{t as O}from"./async-error-boundary-DCDTsNTO.js";import{t as pe}from"./monaco-setup-DU2h1v3K.js";var k=t(),A=e(n(),1),j=r(),M=s(`explorer.preview`),N=[{label:`Markdown`,ext:`md`,icon:p},{label:`TypeScript`,ext:`ts`,icon:m},{label:`Text`,ext:`txt`,icon:f}];async function P(e,t){try{let n=await w(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 F(e){return c(e)===`md`}function I(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`}[c(e)]??`plaintext`}function L(e,t){return`explorer-file:${e}:${t}`}function R(e){let t=(0,k.c)(11),{threadId:n,path:r,contentKey:i,onContentReady:a}=e,o;t[0]!==r||t[1]!==n?(o=L(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 D(n,r)}catch(e){let t=e;throw z(`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=x(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,A.useLayoutEffect)(l,u),null}function z(e,t,n){M.error(e,{...t,error:n})}function B(e,t){return`explorer-media:${e}:${t}`}function V(e,t){let n=(0,k.c)(11),r;n[0]!==t||n[1]!==e?(r=B(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 E(e,t)}catch(n){let r=n;throw z(`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=x(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,A.useEffect)(c,l),s}function me(e){let t=(0,k.c)(3),{threadId:n,path:r,alt:i}=e,a=V(n,r),o;return t[0]!==i||t[1]!==a?(o=(0,j.jsx)(`div`,{className:`flex items-center justify-center h-full p-4 overflow-auto`,children:(0,j.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 he(e){let t=(0,k.c)(2),{threadId:n,path:r}=e,i=V(n,r),a;return t[0]===i?a=t[1]:(a=(0,j.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,j.jsx)(`video`,{src:i,controls:!0,className:`max-w-full max-h-full`})}),t[0]=i,t[1]=a),a}function H({selectedFile:e,showTreeBackButton:t=!1,onShowTree:n,onFileCreated:r}){let{resolvedTheme:s}=oe(),c=l(e=>e.selectedThreadId),{triggerExplorerRefresh:f}=ae(),m=(0,A.useRef)(null),x=(0,A.useRef)(null),w=(0,A.useRef)(!1),[E,D]=(0,A.useState)(null),[k,M]=(0,A.useState)(!1),[V,H]=(0,A.useState)(!1),[U,W]=(0,A.useState)(`edit`),[ge,_e]=(0,A.useState)(0),[G,ve]=(0,A.useState)(null),[K,q]=(0,A.useState)(!1),ye=e?.path??null;(0,A.useEffect)(()=>{c&&ie(c).then(ve).catch(()=>{})},[c]);let be=async()=>{if(!(!G||K)){q(!0);try{await navigator.clipboard.writeText(G),y({title:`Copied`,description:`Repository folder path copied to clipboard.`})}catch(e){z(`Failed to copy explorer folder path`,{threadId:c,folderPath:G},e),y({title:`Error`,description:`Failed to copy path to clipboard.`,variant:`destructive`})}finally{q(!1)}}},xe=async()=>{if(c)try{await T(c,`.`)}catch(e){z(`Failed to open explorer repository folder`,{threadId:c,folderPath:G},e),y({title:`Error`,description:`Failed to open repository folder.`,variant:`destructive`})}},Se=(0,A.useCallback)(async e=>{if(c)try{let t=await P(c,e);await le(c,``,t);let n={name:t,path:t,type:`file`};x.current=t,w.current=!0,r?.(n),f(),y({title:`Created`,description:`${t} created successfully.`})}catch(t){z(`Failed to create explorer file`,{threadId:c,extension:e},t),y({title:`Error`,description:`Failed to create file.`,variant:`destructive`})}},[c,r,f]),J=e?a(e.path,e.name):null,Y=e?.type===`file`&&c&&!J?e:null,X=Y?`${c}:${Y.path}:${ge}`:null,Z=E&&E.key===X?E:null,Q=Z?.content??``,Ce=Z?.original??``;(0,A.useEffect)(()=>()=>{m.current&&=(m.current.getModel()?.dispose(),m.current.dispose(),null)},[]),(0,A.useEffect)(()=>{e?.type===`file`?x.current===e.path?(x.current=null,W(`edit`)):W(F(e.path)?`view`:`edit`):W(`edit`)},[ye,c]);async function $(){if(!(!c||!e||!X)){M(!0);try{await ce(c,e.path,Q),D({key:X,content:Q,original:Q}),y({title:`Saved`,description:`${e.name} saved successfully.`})}catch(t){z(`Failed to save explorer file`,{threadId:c,path:e.path},t),y({title:`Error`,description:t instanceof Error?t.message:`Failed to save file`,variant:`destructive`})}finally{M(!1)}}}async function we(){if(!(!c||!e||V)){H(!0);try{if(!_()){if(typeof window>`u`)return;let t=document.querySelector(`[data-markdown-print-content]`);if(!(t instanceof HTMLElement)){y({title:`Print unavailable`,description:`Couldn't find the markdown preview to print.`,variant:`destructive`});return}let n=`<!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.name??`Markdown document`}</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.innerHTML}</main>
68
+ <script>
69
+ window.addEventListener("load", () => {
70
+ window.focus();
71
+ window.print();
72
+ }, { once: true });
73
+ <\/script>
74
+ </body>
75
+ </html>`,r=window.open(``,`_blank`,`noopener,noreferrer`);if(!r){y({title:`Print blocked`,description:`Allow pop-ups to print this file.`,variant:`destructive`});return}r.document.open(),r.document.write(n),r.document.close();return}y({title:`PDF created`,description:`Opened ${(await ue(c,e.path)).outputPath.split(/[\\/]/).pop()??`the PDF`} in your default app.`})}catch(t){z(`Failed to print markdown file as PDF`,{threadId:c,path:e.path},t),y({title:`PDF export failed`,description:t instanceof Error?t.message:`Failed to convert this markdown file to PDF.`,variant:`destructive`})}finally{H(!1)}}}function Te(){!c||!Y||(b(L(c,Y.path)),_e(e=>e+1))}return c?(0,j.jsxs)(`div`,{className:`explorer-view-root flex flex-col h-full print:block print:h-auto`,children:[(0,j.jsxs)(C,{className:`justify-between print:hidden`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[t&&n?(0,j.jsxs)(g,{variant:`ghost`,size:`icon`,className:`h-8 w-8 shrink-0 text-muted-foreground electrobun-webkit-app-region-no-drag`,onClick:n,children:[(0,j.jsx)(ee,{className:`h-4 w-4`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Show file tree`})]}):null,(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:h(o.label,`truncate leading-normal text-foreground`),children:e?e.name:`Select a file to edit`}),(0,j.jsx)(`span`,{className:h(o.compact,`truncate text-muted-foreground`),children:e?e.path:`Browse and edit repository files`})]})]}),(0,j.jsxs)(`div`,{className:`flex gap-2`,children:[Y&&Z?(0,j.jsxs)(j.Fragment,{children:[F(Y.path)&&U===`view`?(0,j.jsxs)(g,{size:`sm`,variant:`outline`,onClick:()=>void we(),disabled:V,children:[V?(0,j.jsx)(d,{className:`h-4 w-4 animate-spin`}):(0,j.jsx)(ne,{className:`h-4 w-4`}),V?`Printing…`:`Print`]}):null,F(Y.path)?(0,j.jsxs)(`div`,{className:`flex rounded-full border border-input bg-background p-0.5`,children:[(0,j.jsx)(g,{size:`sm`,variant:U===`view`?`secondary`:`ghost`,className:`h-7 px-3`,onClick:()=>W(`view`),children:`View`}),(0,j.jsx)(g,{size:`sm`,variant:U===`edit`?`secondary`:`ghost`,className:`h-7 px-3`,onClick:()=>W(`edit`),children:`Edit`})]}):null,(0,j.jsxs)(g,{size:`sm`,onClick:()=>void $(),disabled:k||!Q||Q===Ce,children:[k?(0,j.jsx)(d,{className:`h-4 w-4 animate-spin`}):null,`Save`]})]}):null,e?null:(0,j.jsxs)(se,{children:[(0,j.jsx)(S,{asChild:!0,children:(0,j.jsxs)(g,{size:`sm`,className:`gap-1.5`,children:[(0,j.jsx)(te,{className:`h-3.5 w-3.5`}),`New file`]})}),(0,j.jsx)(de,{align:`end`,children:N.map(({label:e,ext:t,icon:n})=>(0,j.jsxs)(fe,{onSelect:()=>void Se(t),children:[(0,j.jsx)(n,{className:`h-4 w-4`}),e]},t))})]})]})]}),(0,j.jsx)(`div`,{className:`flex-1 overflow-hidden print:overflow-visible print:flex-none`,children:(0,j.jsx)(`div`,{className:`h-full relative overflow-hidden print:h-auto print:overflow-visible`,children:Y?(0,j.jsxs)(O,{fallbackTitle:`Failed to load file`,onRetry:Te,children:[(0,j.jsx)(A.Suspense,{fallback:(0,j.jsx)(v,{}),children:(0,j.jsx)(R,{threadId:c,path:Y.path,contentKey:X??``,onContentReady:D},X??void 0)}),Z?F(Y.path)&&U===`view`?(0,j.jsx)(`div`,{className:`h-full overflow-auto p-6 print:h-auto print:overflow-visible print:p-0`,children:(0,j.jsx)(`div`,{className:`mx-auto max-w-4xl print:max-w-none`,"data-markdown-print-content":!0,children:(0,j.jsx)(i,{content:Q,enableMermaid:!0})})}):(0,j.jsx)(pe,{height:`100%`,language:I(Y.path),value:Q,onChange:e=>D(t=>t&&{...t,content:e??``}),onMount:e=>{m.current=e,w.current&&(w.current=!1,e.focus())},theme:s===`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,j.jsx)(v,{})]},X??void 0):e?.type===`file`&&J===`image`?(0,j.jsx)(O,{fallbackTitle:`Failed to load image`,onRetry:()=>{!c||!e||b(B(c,e.path))},children:(0,j.jsx)(A.Suspense,{fallback:(0,j.jsx)(v,{}),children:(0,j.jsx)(me,{threadId:c,path:e.path,alt:e.name})})},e.path):e?.type===`file`&&J===`video`?(0,j.jsx)(O,{fallbackTitle:`Failed to load video`,onRetry:()=>{!c||!e||b(B(c,e.path))},children:(0,j.jsx)(A.Suspense,{fallback:(0,j.jsx)(v,{}),children:(0,j.jsx)(he,{threadId:c,path:e.path})})},e.path):(0,j.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-center p-8`,children:[(0,j.jsx)(`h2`,{className:h(o.pageTitle,`text-foreground`),children:`File Explorer`}),(0,j.jsx)(`p`,{className:h(o.pageSubtitle),children:`Browse and edit files`})]})})}),e?null:(0,j.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 px-4 py-2`,children:G?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`button`,{type:`button`,onClick:()=>void xe(),className:h(o.compact,`min-w-0 flex-1 truncate text-left font-mono text-muted-foreground hover:text-foreground hover:underline`),title:G,children:G}),(0,j.jsxs)(g,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,onClick:()=>void be(),disabled:K,children:[K?(0,j.jsx)(u,{className:`h-3.5 w-3.5`}):(0,j.jsx)(re,{className:`h-3.5 w-3.5`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Copy path`})]})]}):(0,j.jsx)(`p`,{className:h(o.compact,`text-muted-foreground/50 italic`),children:`Loading path...`})})]}):(0,j.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-center`,children:[(0,j.jsx)(p,{className:`h-8 w-8 text-muted-foreground`}),(0,j.jsx)(`p`,{className:o.bodyMuted,children:`Select a thread to browse its files`})]})}export{H as default};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./react-vendor-Ee0-5T4I.js";import{at as n}from"./dist-ZlK7I-y-.js";import{Et as r}from"./dist-DIjomljy.js";import{t as i}from"./utils-CT-Dw22R.js";import{t as a}from"./button-sfGyFWfz.js";import{a as o,i as s,o as c,r as l,s as u,t as d}from"./dialog-CP2cYR59.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};