tarsk 0.5.62 → 0.5.63

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 (78) hide show
  1. package/dist/index.js +1380 -785
  2. package/dist/public/assets/{account-view-D2h4wMCJ.js → account-view-DPMOlh3s.js} +1 -1
  3. package/dist/public/assets/{alert-dialog-BpJafkQ6.js → alert-dialog-tR8jdoK3.js} +1 -1
  4. package/dist/public/assets/{api-DkhEo8tW.js → api-D3kM9pkY.js} +1 -1
  5. package/dist/public/assets/{async-error-boundary-DR57nNXL.js → async-error-boundary-D2YxNX8i.js} +1 -1
  6. package/dist/public/assets/{browser-tab-B15D-jTw.js → browser-tab-DBH__fWh.js} +2 -2
  7. package/dist/public/assets/{chat-dock-context-4ZMIlxAn.js → chat-dock-context-DX0woD8r.js} +1 -1
  8. package/dist/public/assets/{commit-dialog-CQH8QaWp.js → commit-dialog-vGBCFWUk.js} +1 -1
  9. package/dist/public/assets/{commit-method-fields-DYBEHZAP.js → commit-method-fields-CENlG_Jk.js} +1 -1
  10. package/dist/public/assets/{context-menu-cv7nzOcn.js → context-menu-D6nrl6uV.js} +1 -1
  11. package/dist/public/assets/{conversation-history-view-BnhR9dL8.js → conversation-history-view-D_Umzlgd.js} +1 -1
  12. package/dist/public/assets/{create-project-dialog-DCehjzue.js → create-project-dialog-IjrZazJK.js} +1 -1
  13. package/dist/public/assets/{create-repo-dialog-CVYlw8JI.js → create-repo-dialog-LRokjKAU.js} +1 -1
  14. package/dist/public/assets/{delete-confirm-dialog-DoRgqETX.js → delete-confirm-dialog-Tv1Y9rIn.js} +1 -1
  15. package/dist/public/assets/diff-view-BzR1KSU4.js +4 -0
  16. package/dist/public/assets/explorer-tab-view-BtQAqAoR.js +2 -0
  17. package/dist/public/assets/explorer-tree-gTgMdTOW.js +1 -0
  18. package/dist/public/assets/{explorer-view-B5nGnzAV.js → explorer-view-DhR2CWcz.js} +2 -2
  19. package/dist/public/assets/{git-history-dialog-De7D-B_f.js → git-history-dialog-Do8XlsHv.js} +1 -1
  20. package/dist/public/assets/git-ops-button-BIOoGOW9.js +2 -0
  21. package/dist/public/assets/index-BdDEzAzX.js +3307 -0
  22. package/dist/public/assets/index-zilB0ZSo.css +1 -0
  23. package/dist/public/assets/{mcp-server-card-DofWLHvo.js → mcp-server-card-9_PXQg51.js} +1 -1
  24. package/dist/public/assets/{merged-pr-dialog-CLaSLBzZ.js → merged-pr-dialog-U1CBegRj.js} +1 -1
  25. package/dist/public/assets/{model-list-controls-CRnIzfdp.js → model-list-controls-DGHp3GfD.js} +1 -1
  26. package/dist/public/assets/{monaco-setup-VhLB0diG.js → monaco-setup-Xkv0hjl5.js} +1 -1
  27. package/dist/public/assets/onboarding-_okRJRpU.js +46 -0
  28. package/dist/public/assets/{project-env-vars-view-wQPOiCa_.js → project-env-vars-view-CSk-mKm9.js} +1 -1
  29. package/dist/public/assets/{project-model-aliases-view-CMEFOKJj.js → project-model-aliases-view-D6gdA6SJ.js} +1 -1
  30. package/dist/public/assets/project-settings-view-soRLv3YG.js +1 -0
  31. package/dist/public/assets/{project-tools-view-C7rQgJBp.js → project-tools-view-Bm1kgBnS.js} +1 -1
  32. package/dist/public/assets/providers-list-view-C8euNoea.js +1 -0
  33. package/dist/public/assets/pull-request-dialog-Cy-OBkM4.js +1 -0
  34. package/dist/public/assets/{pull-with-changes-dialog-BIkrgGiK.js → pull-with-changes-dialog-p3MYq6XE.js} +1 -1
  35. package/dist/public/assets/{push-before-pr-dialog-CMGZ4nuF.js → push-before-pr-dialog-DHehHLoc.js} +1 -1
  36. package/dist/public/assets/{react-vendor-DgnPMVt4.js → react-vendor-DM3Nejio.js} +1 -1
  37. package/dist/public/assets/{settings-general-view-W0AXfWxp.js → settings-general-view-B9oGXpm4.js} +1 -1
  38. package/dist/public/assets/{settings-instructions-view-Dd3mwKFL.js → settings-instructions-view-Dgiq0-Fz.js} +1 -1
  39. package/dist/public/assets/{settings-list-Cyr7e0Le.js → settings-list-CdCYY9x_.js} +1 -1
  40. package/dist/public/assets/{settings-logs-view-CGbS3tw4.js → settings-logs-view-BCAw_cxd.js} +1 -1
  41. package/dist/public/assets/settings-mcp-servers-view-Br5owe39.js +5 -0
  42. package/dist/public/assets/settings-models-view--e7dI-H6.js +1 -0
  43. package/dist/public/assets/{settings-rules-view-BnOeQFrJ.js → settings-rules-view-DD0_kkS8.js} +1 -1
  44. package/dist/public/assets/{settings-skills-view-BvvWBK7C.js → settings-skills-view-DDIvFArL.js} +1 -1
  45. package/dist/public/assets/{settings-slack-view-CnCzVPQp.js → settings-slack-view-C0yGN7-a.js} +1 -1
  46. package/dist/public/assets/{settings-slash-commands-view-Ds7RbQGD.js → settings-slash-commands-view-B-Ehi4Vm.js} +1 -1
  47. package/dist/public/assets/{settings-statistics-view-BI6827hL.js → settings-statistics-view-BFsn_ndY.js} +1 -1
  48. package/dist/public/assets/{settings-storage-view-Dp1y_kDe.js → settings-storage-view-3J7APTHD.js} +1 -1
  49. package/dist/public/assets/{settings-subagents-view-Cco1I1-K.js → settings-subagents-view-YFveKNiL.js} +1 -1
  50. package/dist/public/assets/{settings-system-prompt-view-DZKKUgRY.js → settings-system-prompt-view-BR4bBXdt.js} +1 -1
  51. package/dist/public/assets/settings-view-Cg3qC1kg.js +2 -0
  52. package/dist/public/assets/{slug-utils-DVB1L0_r.js → slug-utils-DN3CLvnc.js} +1 -1
  53. package/dist/public/assets/tasks-view-COnDzVI9.js +2 -0
  54. package/dist/public/assets/{terminal-panel-B5SzvdGO.js → terminal-panel-rUTBECZC.js} +1 -1
  55. package/dist/public/assets/{ui-components-CuWavb_S.js → ui-components-BLrzr-Yo.js} +1 -1
  56. package/dist/public/assets/{use-active-dock-panel-instance-CKEkba2q.js → use-active-dock-panel-instance-HODVGwTg.js} +1 -1
  57. package/dist/public/assets/{use-installed-ai-files-CTaDJ775.js → use-installed-ai-files-D_mfpPto.js} +1 -1
  58. package/dist/public/assets/{web-Du8iyq0K.js → web-BGcPHAdQ.js} +1 -1
  59. package/dist/public/assets/{web-CaXKZtWk.js → web-D6UAh7QL.js} +1 -1
  60. package/dist/public/assets/{web-BNUbWWwf.js → web-DMLNawO_.js} +1 -1
  61. package/dist/public/assets/{web-CHZVpVHH.js → web-D_jEgLdF.js} +1 -1
  62. package/dist/public/index.html +7 -7
  63. package/dist/recommended-models.txt +11 -11
  64. package/package.json +2 -1
  65. package/dist/public/assets/diff-view-B1xi9U57.js +0 -4
  66. package/dist/public/assets/explorer-tab-view-DssrHe9f.js +0 -2
  67. package/dist/public/assets/explorer-tree-B2SnBNoL.js +0 -1
  68. package/dist/public/assets/git-ops-button-DJYzg_I5.js +0 -2
  69. package/dist/public/assets/index-3N_2bBI0.css +0 -1
  70. package/dist/public/assets/index-cAZJlfDA.js +0 -3307
  71. package/dist/public/assets/onboarding-Dy7KG3M5.js +0 -46
  72. package/dist/public/assets/project-settings-view-BeKBKcaZ.js +0 -1
  73. package/dist/public/assets/providers-list-view-DqSw6lqh.js +0 -1
  74. package/dist/public/assets/pull-request-dialog-CX10DwW3.js +0 -1
  75. package/dist/public/assets/settings-mcp-servers-view-C3IkdzkJ.js +0 -5
  76. package/dist/public/assets/settings-models-view-DV2YF3YN.js +0 -1
  77. package/dist/public/assets/settings-view-Ckzg0maK.js +0 -2
  78. package/dist/public/assets/tasks-view-tS75bdWk.js +0 -2
@@ -1 +1 @@
1
- import{g as e,gt as t,h as n}from"./index-cAZJlfDA.js";var r=class extends t{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(e=n.Heavy){return e===n.Medium?[43]:e===n.Light?[20]:[61]}patternForNotification(t=e.Success){return t===e.Warning?[30,40,30,50,60]:t===e.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
1
+ import{_ as e,_t as t,g as n}from"./index-BdDEzAzX.js";var r=class extends t{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(e=n.Heavy){return e===n.Medium?[43]:e===n.Light?[20]:[61]}patternForNotification(t=e.Success){return t===e.Warning?[30,40,30,50,60]:t===e.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
@@ -1 +1 @@
1
- import{d as e,f as t,gt as n,u as r}from"./index-cAZJlfDA.js";var i=class extends n{async stopAndHideScanner(){console.log(window.OSBarcodeWebScanner),window.OSBarcodeWebScanner&&(await window.OSBarcodeWebScanner.stop(),window.OSBarcodeWebScanner=null),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`none`}buildScannerElement(){if(document.getElementById(`cap-os-barcode-scanner-container`)){document.getElementById(`cap-os-barcode-scanner-container`).className=`scanner-container-display`;return}let e=document.body.appendChild(document.createElement(`div`));e.id=`cap-os-barcode-scanner-container`;let t=document.createElement(`div`);t.id=`cap-os-barcode-scanner-container-dialog`,t.className=`scanner-dialog`;let n=document.createElement(`div`);n.className=`scanner-dialog-inner`;let r=document.createElement(`span`);r.id=`cap-os-barcode-scanner-close-button`,r.className=`close-button`,r.innerHTML=`×`,n.appendChild(r);let i=document.createElement(`p`);i.innerHTML=` `,n.appendChild(i);let a=document.createElement(`div`);a.className=`scanner-container-full-width`,a.id=`cap-os-barcode-scanner-container-scanner`,n.appendChild(a),t.appendChild(n),e.appendChild(t)}async scanBarcode(n){return this.buildScannerElement(),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`block`,new Promise((i,a)=>{let o={facingMode:n.cameraDirection===1?`environment`:`user`,hasScannerButton:!1,scanButton:n.scanButton===void 0?!1:n.scanButton,showScanLine:!1,scanInstructions:n.scanInstructions?n.scanInstructions:``,orientation:n.scanOrientation?n.scanOrientation:r.PORTRAIT,showCameraSelection:n.web?.showCameraSelection?n.web.showCameraSelection:!1,typeHint:n.hint===17?void 0:n.hint,scannerFPS:n.web?.scannerFPS?n.web.scannerFPS:50},s=!1,c=document.getElementById(`cap-os-barcode-scanner-close-button`);c&&(c.onclick=async()=>{s||(s=!0,await this.stopAndHideScanner(),a(Error(`Couldn’t scan because the process was cancelled.`)))});let l=document.getElementById(`cap-os-barcode-scanner-container-scanner`);if(!l)throw Error(`Scanner Element is required for web`);window.OSBarcodeWebScanner=new t(l.id,{formatsToSupport:o.typeHint===void 0?void 0:[o.typeHint],verbose:void 0});let u={fps:o.scannerFPS,qrbox:l.getBoundingClientRect().width*(9/16)-10,aspectRatio:16/9,videoConstraints:{focusMode:`continuous`,height:{min:576,ideal:1920},deviceId:void 0,facingMode:o.facingMode}};window.OSBarcodeWebScanner.start({facingMode:o.facingMode},u,(t,n)=>{this.stopAndHideScanner(),i({ScanResult:t,format:n.result.format?.format??e.ALL})},e=>{[`NotFoundException`,`No barcode or QR code detected`,`No MultiFormat Readers were able to detect the code`].find(t=>e.indexOf(t)!==-1)||(this.stopAndHideScanner(),console.error(`[Scanner Web Error] ${e}`),a(e))})})}};export{i as CapacitorBarcodeScannerWeb};
1
+ import{_t as e,d as t,f as n,p as r}from"./index-BdDEzAzX.js";var i=class extends e{async stopAndHideScanner(){console.log(window.OSBarcodeWebScanner),window.OSBarcodeWebScanner&&(await window.OSBarcodeWebScanner.stop(),window.OSBarcodeWebScanner=null),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`none`}buildScannerElement(){if(document.getElementById(`cap-os-barcode-scanner-container`)){document.getElementById(`cap-os-barcode-scanner-container`).className=`scanner-container-display`;return}let e=document.body.appendChild(document.createElement(`div`));e.id=`cap-os-barcode-scanner-container`;let t=document.createElement(`div`);t.id=`cap-os-barcode-scanner-container-dialog`,t.className=`scanner-dialog`;let n=document.createElement(`div`);n.className=`scanner-dialog-inner`;let r=document.createElement(`span`);r.id=`cap-os-barcode-scanner-close-button`,r.className=`close-button`,r.innerHTML=`×`,n.appendChild(r);let i=document.createElement(`p`);i.innerHTML=` `,n.appendChild(i);let a=document.createElement(`div`);a.className=`scanner-container-full-width`,a.id=`cap-os-barcode-scanner-container-scanner`,n.appendChild(a),t.appendChild(n),e.appendChild(t)}async scanBarcode(e){return this.buildScannerElement(),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`block`,new Promise((i,a)=>{let o={facingMode:e.cameraDirection===1?`environment`:`user`,hasScannerButton:!1,scanButton:e.scanButton===void 0?!1:e.scanButton,showScanLine:!1,scanInstructions:e.scanInstructions?e.scanInstructions:``,orientation:e.scanOrientation?e.scanOrientation:t.PORTRAIT,showCameraSelection:e.web?.showCameraSelection?e.web.showCameraSelection:!1,typeHint:e.hint===17?void 0:e.hint,scannerFPS:e.web?.scannerFPS?e.web.scannerFPS:50},s=!1,c=document.getElementById(`cap-os-barcode-scanner-close-button`);c&&(c.onclick=async()=>{s||(s=!0,await this.stopAndHideScanner(),a(Error(`Couldn’t scan because the process was cancelled.`)))});let l=document.getElementById(`cap-os-barcode-scanner-container-scanner`);if(!l)throw Error(`Scanner Element is required for web`);window.OSBarcodeWebScanner=new r(l.id,{formatsToSupport:o.typeHint===void 0?void 0:[o.typeHint],verbose:void 0});let u={fps:o.scannerFPS,qrbox:l.getBoundingClientRect().width*(9/16)-10,aspectRatio:16/9,videoConstraints:{focusMode:`continuous`,height:{min:576,ideal:1920},deviceId:void 0,facingMode:o.facingMode}};window.OSBarcodeWebScanner.start({facingMode:o.facingMode},u,(e,t)=>{this.stopAndHideScanner(),i({ScanResult:e,format:t.result.format?.format??n.ALL})},e=>{[`NotFoundException`,`No barcode or QR code detected`,`No MultiFormat Readers were able to detect the code`].find(t=>e.indexOf(t)!==-1)||(this.stopAndHideScanner(),console.error(`[Scanner Web Error] ${e}`),a(e))})})}};export{i as CapacitorBarcodeScannerWeb};
@@ -22,17 +22,17 @@
22
22
  <meta name="apple-mobile-web-app-title" content="Tarsk" />
23
23
 
24
24
  <title>Tarsk</title>
25
- <script type="module" crossorigin src="/assets/index-cAZJlfDA.js"></script>
25
+ <script type="module" crossorigin src="/assets/index-BdDEzAzX.js"></script>
26
26
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
27
27
  <link rel="modulepreload" crossorigin href="/assets/monaco-D1hpqXQ0.js">
28
28
  <link rel="modulepreload" crossorigin href="/assets/interactive-WtOIgeV4.js">
29
- <link rel="modulepreload" crossorigin href="/assets/onboarding-Dy7KG3M5.js">
30
- <link rel="modulepreload" crossorigin href="/assets/api-DkhEo8tW.js">
31
- <link rel="modulepreload" crossorigin href="/assets/react-vendor-DgnPMVt4.js">
32
- <link rel="modulepreload" crossorigin href="/assets/alert-dialog-BpJafkQ6.js">
29
+ <link rel="modulepreload" crossorigin href="/assets/onboarding-_okRJRpU.js">
30
+ <link rel="modulepreload" crossorigin href="/assets/api-D3kM9pkY.js">
31
+ <link rel="modulepreload" crossorigin href="/assets/react-vendor-DM3Nejio.js">
32
+ <link rel="modulepreload" crossorigin href="/assets/alert-dialog-tR8jdoK3.js">
33
33
  <link rel="modulepreload" crossorigin href="/assets/use-toast-BFQ85Ly5.js">
34
34
  <link rel="modulepreload" crossorigin href="/assets/store-CSyJjyNs.js">
35
- <link rel="modulepreload" crossorigin href="/assets/chat-dock-context-4ZMIlxAn.js">
35
+ <link rel="modulepreload" crossorigin href="/assets/chat-dock-context-DX0woD8r.js">
36
36
  <link rel="modulepreload" crossorigin href="/assets/explorer-tab-context-8bs_tiCO.js">
37
37
  <link rel="modulepreload" crossorigin href="/assets/main-tab-context-DHeKIUsf.js">
38
38
  <link rel="modulepreload" crossorigin href="/assets/use-suspense-resource-rX-GqyWi.js">
@@ -41,7 +41,7 @@
41
41
  <link rel="modulepreload" crossorigin href="/assets/thread-tool-blocks-BfowiaTH.js">
42
42
  <link rel="modulepreload" crossorigin href="/assets/utils-Rlf65JHq.js">
43
43
  <link rel="stylesheet" crossorigin href="/assets/monaco-BQve5vfS.css">
44
- <link rel="stylesheet" crossorigin href="/assets/index-3N_2bBI0.css">
44
+ <link rel="stylesheet" crossorigin href="/assets/index-zilB0ZSo.css">
45
45
  </head>
46
46
  <body class="font-sans antialiased">
47
47
  <div id="root"></div>
@@ -1,14 +1,14 @@
1
1
  [
2
- "Claude Haiku 4.5",
3
- "Claude Sonnet 5",
4
- "Claude Opus 4.8",
5
- "Claude Fable 5",
6
- "GPT 5.6 Sol",
2
+ "DeepSeek V4 Flash",
7
3
  "GPT 5.6 Luna",
8
- "Qwen3.7 Max",
9
- "Gemini 3.5 Flash",
10
- "Kimi K2.6",
11
- "Deepseek V4 Pro",
12
- "GLM-5.2",
13
- "Grok 4.5"
4
+ "GPT 5.5",
5
+ "DeepSeek V4 Pro",
6
+ "Kimi K2.7 Code",
7
+ "MiMo V2.5 Pro",
8
+ "GLM 5.2",
9
+ "Gemini 3.7 Flash",
10
+ "Claude Opus 5",
11
+ "GPT 5.6 Sol",
12
+ "Grok 4.6",
13
+ "GPT 5.6 Terra"
14
14
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tarsk",
3
- "version": "0.5.62",
3
+ "version": "0.5.63",
4
4
  "description": "CLI for Tarsk - Project Threads Manager",
5
5
  "keywords": [
6
6
  "cli",
@@ -35,6 +35,7 @@
35
35
  "test": "env -u TARSK_DEBUG vp test run",
36
36
  "benchmark:observations": "bun scripts/benchmark-observations.ts",
37
37
  "dump:conversation": "bun scripts/dump-conversation.ts",
38
+ "get-recommended-models": "bun scripts/get-recommended-models.ts",
38
39
  "web": "MODE=development bun run build:server && bun dist/index.js",
39
40
  "api-serve-462": "bun run build:server && MODE=development bun dist/index.js --debug",
40
41
  "electrobun:dev:signed": "bunx electrobun dev",
@@ -1,4 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Ci as t,Fr as n,Ft as r,Jn as i,Mt as a,Nt as o,Ti as s,U as c,ct as l,f as u,fn as d,ft as f,i as p,nt as m,pn as h,tt as g,ut as _,wi as v}from"./interactive-WtOIgeV4.js";import{f as y}from"./react-vendor-DgnPMVt4.js";import{A as b,Ct as x,D as S,In as C,Ji as w,Oi as T,St as E,T as D,Tt as O,Un as k,Xi as A,aa as j,bt as M,f as N,ht as P,j as F,k as I,wo as L,wr as R}from"./onboarding-Dy7KG3M5.js";import{c as z}from"./monaco-D1hpqXQ0.js";import{I as ee,L as te,n as B,q as V,r as ne}from"./store-CSyJjyNs.js";import{n as re,t as ie}from"./use-suspense-resource-rX-GqyWi.js";import{n as ae}from"./utils-Rlf65JHq.js";import{A as oe,Ct as se,G as H,Nt as U,O as ce,U as le,V as ue,at as de,j as W,k as G,q as fe}from"./index-cAZJlfDA.js";import{a as pe,n as me,r as K,t as q}from"./context-menu-cv7nzOcn.js";import{t as J}from"./async-error-boundary-DR57nNXL.js";import"./monaco-setup-VhLB0diG.js";var Y=e(s(),1),X=v(),Z=t();function Q(e){let t=(0,X.c)(12),{children:r,title:i,subtitle:a,headerAction:o,footer:s}=e,c;t[0]!==o||t[1]!==a||t[2]!==i?(c=(i||a||o)&&(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1 border-b border-sidebar-border px-4 py-6`,children:[(i||o)&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:i&&(0,Z.jsx)(`span`,{className:n.sectionTitle,children:i})}),o&&(0,Z.jsx)(`div`,{className:`flex items-center gap-2 ml-auto`,children:o})]}),a]}),t[0]=o,t[1]=a,t[2]=i,t[3]=c):c=t[3];let l;t[4]===r?l=t[5]:(l=(0,Z.jsx)(P,{className:`min-h-0 flex-1`,children:r}),t[4]=r,t[5]=l);let u;t[6]===s?u=t[7]:(u=s&&(0,Z.jsx)(`div`,{className:`border-t border-sidebar-border`,children:s}),t[6]=s,t[7]=u);let d;return t[8]!==c||t[9]!==l||t[10]!==u?(d=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col`,children:[c,l,u]}),t[8]=c,t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function $(e){let t=(0,X.c)(30),{node:n,level:r,renderNode:i,defaultOpen:a,indent:o,childContainerClassName:s,openState:c,onToggle:l,forceOpenIds:u}=e,d=!!(n.children&&n.children.length>0),f,p,m;if(t[0]!==a||t[1]!==u||t[2]!==d||t[3]!==r||t[4]!==n||t[5]!==l||t[6]!==c||t[7]!==i){f=u?.has(n.id)||(c[n.id]??a);let e;t[11]!==n.id||t[12]!==l?(e=()=>l(n.id),t[11]=n.id,t[12]=l,t[13]=e):e=t[13];let o=e;p=`min-w-0`,m=i(n,{isOpen:f,level:r,toggle:o,hasChildren:d}),t[0]=a,t[1]=u,t[2]=d,t[3]=r,t[4]=n,t[5]=l,t[6]=c,t[7]=i,t[8]=f,t[9]=p,t[10]=m}else f=t[8],p=t[9],m=t[10];let h;t[14]!==s||t[15]!==a||t[16]!==u||t[17]!==d||t[18]!==o||t[19]!==f||t[20]!==r||t[21]!==n.children||t[22]!==l||t[23]!==c||t[24]!==i?(h=d&&f&&(0,Z.jsx)(`div`,{style:{paddingLeft:o},className:s,children:n.children.map(e=>(0,Z.jsx)($,{node:e,level:r+1,renderNode:i,defaultOpen:a,indent:o,childContainerClassName:s,openState:c,onToggle:l,forceOpenIds:u},e.id))}),t[14]=s,t[15]=a,t[16]=u,t[17]=d,t[18]=o,t[19]=f,t[20]=r,t[21]=n.children,t[22]=l,t[23]=c,t[24]=i,t[25]=h):h=t[25];let g;return t[26]!==p||t[27]!==m||t[28]!==h?(g=(0,Z.jsxs)(`div`,{className:p,children:[m,h]}),t[26]=p,t[27]=m,t[28]=h,t[29]=g):g=t[29],g}function he(e){let t=(0,X.c)(31),{nodes:n,renderNode:r,resetKey:i,defaultOpen:a,forceOpenIds:o,initialOpenIds:s,indent:c,childContainerClassName:l,className:u}=e,d=a===void 0?!1:a,f=c===void 0?16:c,m;t[0]===s?m=t[1]:(m=()=>{let e={};if(s)for(let t of s)e[t]=!0;return e},t[0]=s,t[1]=m);let[h,g]=(0,Y.useState)(m),[_,v]=(0,Y.useState)(i);if(i!==_){v(i);let e={};if(s)for(let t of s)e[t]=!0;g(e)}let y;t[2]===o?y=t[3]:(y=o?new Set(o):void 0,t[2]=o,t[3]=y);let b=y,x,S;t[4]===o?(x=t[5],S=t[6]):(x=()=>{o?.length&&g(e=>{let t={...e},n=!1;for(let e of o)t[e]!==!0&&(t[e]=!0,n=!0);return n?t:e})},S=[o],t[4]=o,t[5]=x,t[6]=S),(0,Y.useEffect)(x,S);let C;t[7]===d?C=t[8]:(C=e=>{g(t=>({...t,[e]:!(t[e]??d)}))},t[7]=d,t[8]=C);let w=C,T;t[9]===u?T=t[10]:(T=p(`min-w-0`,u),t[9]=u,t[10]=T);let E;if(t[11]!==l||t[12]!==d||t[13]!==b||t[14]!==w||t[15]!==f||t[16]!==n||t[17]!==h||t[18]!==r){let e;t[20]!==l||t[21]!==d||t[22]!==b||t[23]!==w||t[24]!==f||t[25]!==h||t[26]!==r?(e=e=>(0,Z.jsx)($,{node:e,level:0,renderNode:r,defaultOpen:d,indent:f,childContainerClassName:l,openState:h,onToggle:w,forceOpenIds:b},e.id),t[20]=l,t[21]=d,t[22]=b,t[23]=w,t[24]=f,t[25]=h,t[26]=r,t[27]=e):e=t[27],E=n.map(e),t[11]=l,t[12]=d,t[13]=b,t[14]=w,t[15]=f,t[16]=n,t[17]=h,t[18]=r,t[19]=E}else E=t[19];let D;return t[28]!==T||t[29]!==E?(D=(0,Z.jsx)(`div`,{className:T,children:E}),t[28]=T,t[29]=E,t[30]=D):D=t[30],D}function ge(e){let t=[],n={};return e.forEach((e,r)=>{let i=e.path.split(`/`),a=t,o=``;for(let e=0;e<i.length-1;e++){if(o=o?`${o}/${i[e]}`:i[e],!n[o]){let t={id:`dir:${o}`,name:i[e],children:[]};n[o]=t,a.push(t)}a=n[o].children}a.push({id:`file:${e.path}`,name:i[i.length-1],fileIndex:r,status:e.status})}),t}var _e={added:`text-green-500`,deleted:`text-red-500`,untracked:`text-green-500`,renamed:`text-blue-500`,modified:`text-orange-500`},ve={added:`A`,deleted:`D`,untracked:`U`,renamed:`R`,modified:`M`};function ye(e){return p(p(n.compact,`status-badge font-mono font-semibold`),_e[e]??`text-orange-500`)}function be(e){return ve[e]??`M`}function xe(e){let t=(0,X.c)(22),{treeData:i,files:s,error:l,selectedFileIndex:u,onFileSelect:f,onRevertFile:m}=e,{setStats:h}=ue(),g;t[0]===s?g=t[1]:(g=s.reduce(Te,0),t[0]=s,t[1]=g);let _=g,v;t[2]===s?v=t[3]:(v=s.reduce(Se,0),t[2]=s,t[3]=v);let y=v,b,x;if(t[4]!==s.length||t[5]!==h||t[6]!==_||t[7]!==y?(b=()=>{h({fileCount:s.length,additions:_,deletions:y})},x=[s.length,_,y,h],t[4]=s.length,t[5]=h,t[6]=_,t[7]=y,t[8]=b,t[9]=x):(b=t[8],x=t[9]),(0,Y.useEffect)(b,x),l){let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=p(n.compact,`text-destructive text-center`),t[10]=e):e=t[10];let r;return t[11]===l?r=t[12]:(r=(0,Z.jsx)(Q,{children:(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-4 pt-7 pb-2`,children:(0,Z.jsx)(`p`,{className:e,children:l})})}),t[11]=l,t[12]=r),r}if(s.length===0){let e;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Q,{children:(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-4 pt-7 pb-2`,children:(0,Z.jsx)(`p`,{className:p(n.compact,n.bodyMuted,`text-center`),children:`No changes to review`})})}),t[13]=e):e=t[13],e}let S;t[14]!==s||t[15]!==f||t[16]!==m||t[17]!==u?(S=(e,t)=>{let{isOpen:i,toggle:l}=t,h=!!e.children,g=(0,Z.jsxs)(N,{onClick:()=>{h?l():e.fileIndex!==void 0&&f(e.fileIndex)},selected:!h&&e.fileIndex===u,className:p(n.conversationBody,`gap-1.5`),children:[h?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(d,{className:p(`h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform`,i&&`rotate-90`)}),i?(0,Z.jsx)(o,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}):(0,Z.jsx)(a,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}):(0,Z.jsx)(r,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`truncate flex-1 min-w-0`,children:e.name}),!h&&e.status&&(0,Z.jsx)(`span`,{className:ye(e.status),children:be(e.status)})]});return h?g:(0,Z.jsxs)(q,{children:[(0,Z.jsx)(pe,{asChild:!0,children:(0,Z.jsx)(`div`,{children:g})}),(0,Z.jsx)(me,{children:(0,Z.jsxs)(K,{onClick:()=>{e.fileIndex!==void 0&&m?.(s[e.fileIndex])},children:[(0,Z.jsx)(c,{className:`mr-2 h-3.5 w-3.5`}),`Revert Change`]})})]})},t[14]=s,t[15]=f,t[16]=m,t[17]=u,t[18]=S):S=t[18];let C;return t[19]!==S||t[20]!==i?(C=(0,Z.jsx)(Q,{children:(0,Z.jsx)(`div`,{className:`px-1 pt-3 pb-2`,children:(0,Z.jsx)(he,{nodes:i,defaultOpen:!0,indent:16,childContainerClassName:`ml-4 border-l border-sidebar-border pl-2`,renderNode:S})})}),t[19]=S,t[20]=i,t[21]=C):C=t[21],C}function Se(e,t){return e+t.hunks.reduce(Ce,0)}function Ce(e,t){return e+t.changes.filter(we).length}function we(e){return e.type===`delete`}function Te(e,t){return e+t.hunks.reduce(Ee,0)}function Ee(e,t){return e+t.changes.filter(De).length}function De(e){return e.type===`add`}function Oe(e){let t=(0,X.c)(36),{open:r,lineNumber:i,lineContent:a,initialComment:o,isEditing:s,onSave:c,onDelete:l,onClose:u}=e,[d,f]=(0,Y.useState)((o===void 0?``:o)??``),m;t[0]!==c||t[1]!==d?(m=()=>{d.trim()&&c(d.trim())},t[0]=c,t[1]=d,t[2]=m):m=t[2];let h=m,g;t[3]===h?g=t[4]:(g=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),h())},t[3]=h,t[4]=g);let _=g,v;t[5]===u?v=t[6]:(v=e=>{e||u()},t[5]=u,t[6]=v);let y;t[7]===i?y=t[8]:(y=(0,Z.jsx)(b,{children:(0,Z.jsxs)(F,{children:[`Comment on line `,i]})}),t[7]=i,t[8]=y);let x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=p(n.compact,`font-mono rounded bg-muted px-3 py-2 text-muted-foreground overflow-x-auto whitespace-pre`),t[9]=x):x=t[9];let C=a||` `,w;t[10]===C?w=t[11]:(w=(0,Z.jsx)(`div`,{className:x,children:C}),t[10]=C,t[11]=w);let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>f(e.target.value),t[12]=T):T=t[12];let E;t[13]!==_||t[14]!==d?(E=(0,Z.jsx)(H,{autoFocus:!0,placeholder:`Add a comment... (Cmd+Enter to save)`,value:d,onChange:T,onKeyDown:_,rows:12,className:`resize-none text-base`}),t[13]=_,t[14]=d,t[15]=E):E=t[15];let O;t[16]!==s||t[17]!==l?(O=s&&l&&(0,Z.jsx)(L,{variant:`destructive`,size:`sm`,onClick:l,className:`mr-auto`,children:`Delete`}),t[16]=s,t[17]=l,t[18]=O):O=t[18];let k;t[19]===d?k=t[20]:(k=d.trim(),t[19]=d,t[20]=k);let A=!k,j;t[21]!==h||t[22]!==A?(j=(0,Z.jsx)(L,{size:`sm`,onClick:h,disabled:A,children:`Save`}),t[21]=h,t[22]=A,t[23]=j):j=t[23];let M;t[24]!==O||t[25]!==j?(M=(0,Z.jsxs)(I,{className:`gap-2 sm:gap-0`,children:[O,j]}),t[24]=O,t[25]=j,t[26]=M):M=t[26];let N;t[27]!==E||t[28]!==M||t[29]!==y||t[30]!==w?(N=(0,Z.jsxs)(S,{className:`max-w-2xl`,children:[y,w,E,M]}),t[27]=E,t[28]=M,t[29]=y,t[30]=w,t[31]=N):N=t[31];let P;return t[32]!==r||t[33]!==N||t[34]!==v?(P=(0,Z.jsx)(D,{open:r,onOpenChange:v,children:N}),t[32]=r,t[33]=N,t[34]=v,t[35]=P):P=t[35],P}function ke(e){let t=B(),n=ne(e=>e.diffComments),r=(0,Y.useMemo)(()=>n[e]??[],[n,e]),i=(0,Y.useCallback)(r=>{let i=n[e]??[],a=typeof r==`function`?r(i):r;t({type:V.SetDiffComments,threadId:e,comments:a})},[t,e,n]),a=(0,Y.useRef)(!1);return(0,Y.useEffect)(()=>{if((n[e]??[]).length>0){a.current=!0;return}R(e).then(n=>{n.diffComments&&n.diffComments.length>0&&t({type:V.SetDiffComments,threadId:e,comments:n.diffComments}),a.current=!0}).catch(()=>{a.current=!0})},[e]),(0,Y.useEffect)(()=>{a.current&&T(e,{diffComments:r}).catch(()=>{})},[e,r]),{comments:r,setComments:i}}function Ae(e,t){return`git-diff:${e}:${t}`}function je(){return Error(`Loading review changes timed out. Please try again.`)}async function Me(e,t=15e3){return Promise.race([w(e),new Promise((e,n)=>{window.setTimeout(()=>n(je()),t)})])}var Ne=2;function Pe(e,t){return t<=0?{min:e,max:e}:{min:e,max:e+t-1}}function Fe(e,t){return{startLine:Math.max(1,e-Ne),endLine:t+Ne}}function Ie(e){if(e.hunks.length===0)return null;let t=1/0,n=0,r=1/0,i=0;for(let a of e.hunks){let e=Pe(a.oldStart,a.oldLines),o=Pe(a.newStart,a.newLines);t=Math.min(t,e.min),n=Math.max(n,e.max),r=Math.min(r,o.min),i=Math.max(i,o.max)}return t===1/0||r===1/0?null:{original:Fe(t,n),modified:Fe(r,i)}}function Le(e,t,n){if(e.length===0)return``;let r=e.endsWith(`
2
- `),i=e.split(`
3
- `);return r&&i.length>0&&i[i.length-1]===``&&i.pop(),i.slice(Math.max(0,t-1),Math.max(t-1,n)).join(`
4
- `)}function Re(e){let t=Ie(e);return t?t.original.startLine<=1||t.modified.startLine<=1:!0}function ze(e,t){return t?e-t.startLine+1:e}function Be(e,t){return t?t.startLine+e-1:e}function Ve(e){return{ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,json:`json`,md:`markdown`,css:`css`,scss:`scss`,html:`html`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,kt:`kotlin`,swift:`swift`,c:`c`,cpp:`cpp`,h:`c`,hpp:`cpp`,sh:`shell`,yaml:`yaml`,yml:`yaml`,xml:`xml`,sql:`sql`}[e.split(`.`).pop()??``]||`plaintext`}function He(e){let t=(0,X.c)(34),{comments:n,activeCommentIndex:r,isFullView:i,selectedFileIndex:a,files:o,selectedFile:s,onLineGutterClick:c}=e,l=(0,Y.useRef)(null),u=(0,Y.useRef)(n),d=(0,Y.useRef)(r),f;t[0]!==o||t[1]!==i||t[2]!==a?(f={isFullView:i,selectedFileIndex:a,files:o},t[0]=o,t[1]=i,t[2]=a,t[3]=f):f=t[3];let p=(0,Y.useRef)(f),m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m={original:[],modified:[]},t[4]=m):m=t[4];let h=(0,Y.useRef)(m),g=(0,Y.useRef)(null),_=(0,Y.useRef)(!0),v,y;t[5]===n?(v=t[6],y=t[7]):(v=()=>{u.current=n},y=[n],t[5]=n,t[6]=v,t[7]=y),(0,Y.useEffect)(v,y);let b,x;t[8]===r?(b=t[9],x=t[10]):(b=()=>{d.current=r},x=[r],t[8]=r,t[9]=b,t[10]=x),(0,Y.useEffect)(b,x);let S,C;t[11]!==o||t[12]!==i||t[13]!==a?(S=()=>{p.current={isFullView:i,selectedFileIndex:a,files:o}},C=[i,a,o],t[11]=o,t[12]=i,t[13]=a,t[14]=S,t[15]=C):(S=t[14],C=t[15]),(0,Y.useEffect)(S,C);let w;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{if(!_.current)return;let e=l.current;if(!e)return;let{isFullView:t,selectedFileIndex:n,files:r}=p.current,i=u.current,a=d.current,o=r[n];if(!o)return;let s=(e,r)=>{let s=t?null:Ie(o),c=s?r===`original`?s.original:s.modified:null,l=i.filter(e=>e.fileIndex===n&&e.side===r),u=new Set(l.map(e=>ze(e.lineNumber,c))),d=e.getModel()?.getLineCount()??0,f=[];for(let e=1;e<=d;e++)u.has(e)||f.push({range:{startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1},options:{isWholeLine:!0,glyphMarginClassName:`diff-gutter-add-comment`,glyphMarginHoverMessage:{value:`$(add) Click to add a comment`},stickiness:z.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}});let p=l.map(e=>{let t=ze(e.lineNumber,c);if(t<1)return null;let n=i.indexOf(e)===a;return{range:{startLineNumber:t,startColumn:1,endLineNumber:t,endColumn:1},options:{isWholeLine:!0,className:n?`diff-comment-active-line`:`diff-comment-marked-line`,glyphMarginClassName:n?`diff-comment-glyph-active`:`diff-comment-glyph`,glyphMarginHoverMessage:{value:e.comment},stickiness:z.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}}).filter(We);f.push(...p);let m=r===`original`?h.current.original:h.current.modified,g=e.deltaDecorations(m,f);r===`original`?h.current.original=g:h.current.modified=g};s(e.getOriginalEditor(),`original`),s(e.getModifiedEditor(),`modified`)},t[16]=w):w=t[16];let T=w,E;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(E=()=>{let e=g.current;g.current=null,e?.original?.dispose(),e?.modified?.dispose()},t[17]=E):E=t[17];let D=E,O;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{T()},t[18]=O):O=t[18];let k;t[19]!==r||t[20]!==n||t[21]!==i||t[22]!==s||t[23]!==a?(k=[T,n,r,a,i,s],t[19]=r,t[20]=n,t[21]=i,t[22]=s,t[23]=a,t[24]=k):k=t[24],(0,Y.useEffect)(O,k);let A;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>()=>{l.current=null,h.current={original:[],modified:[]},D()},t[25]=A):A=t[25];let j;t[26]===a?j=t[27]:(j=[a,D],t[26]=a,t[27]=j),(0,Y.useEffect)(A,j);let M,N;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>()=>{_.current=!1,l.current=null,h.current={original:[],modified:[]},D()},N=[D],t[28]=M,t[29]=N):(M=t[28],N=t[29]),(0,Y.useEffect)(M,N);let P;t[30]===c?P=t[31]:(P=e=>{l.current=e;let t=e.getModel();g.current=t?{original:t.original,modified:t.modified}:null;let n=Ue,r=(e,t)=>{e.onMouseDown(r=>{if(!r.target?.position||!n(r.target.type))return;let i=r.target.position.lineNumber,{isFullView:a,selectedFileIndex:o,files:s}=p.current,l=s[o];if(!l)return;let d=a?null:Ie(l),f=Be(i,d?t===`original`?d.original:d.modified:null),m=e.getModel()?.getLineContent(i)??``;c({existing:u.current.find(e=>e.fileIndex===o&&e.lineNumber===f&&e.side===t),lineNumber:f,lineContent:m,side:t})})};r(e.getOriginalEditor(),`original`),r(e.getModifiedEditor(),`modified`),setTimeout(()=>{l.current===e&&T()},150)},t[30]=c,t[31]=P);let F=P,I;return t[32]===F?I=t[33]:(I={diffEditorRef:l,applyAllDecorations:T,handleEditorDidMount:F},t[32]=F,t[33]=I),I}function Ue(e){return e===z.MouseTargetType.GUTTER_GLYPH_MARGIN||e===z.MouseTargetType.GUTTER_LINE_NUMBERS||e===z.MouseTargetType.GUTTER_LINE_DECORATIONS||e===z.MouseTargetType.GUTTER_VIEW_ZONE}function We(e){return e!==null}function Ge(e){let t=(0,X.c)(6),{onRetry:r}=e,[i,a]=(0,Y.useState)(!1),o,s;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=window.setTimeout(()=>{a(!0)},15e3);return()=>{window.clearTimeout(e)}},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,Y.useEffect)(o,s),!i){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(M,{label:`Loading review changes...`}),t[2]=e):e=t[2],e}let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:n.bodyMuted,children:`Loading review changes is taking longer than expected.`}),t[3]=c):c=t[3];let l;return t[4]===r?l=t[5]:(l=(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,Z.jsxs)(`div`,{className:`space-y-4 text-center`,children:[c,(0,Z.jsx)(L,{variant:`outline`,onClick:r,children:`Retry`})]})}),t[4]=r,t[5]=l),l}function Ke(e,t,n){return`git-media:${e}:${t}:${n}`}function qe(e,t,n){let r=(0,X.c)(13),i;r[0]!==t||r[1]!==e||r[2]!==n?(i=Ke(e,t,n),r[0]=t,r[1]=e,r[2]=n,r[3]=i):i=r[3];let a;r[4]!==t||r[5]!==e||r[6]!==n?(a=()=>A(e,t,n),r[4]=t,r[5]=e,r[6]=n,r[7]=a):a=r[7];let o=ie(i,a),s;r[8]===o?s=r[9]:(s=URL.createObjectURL(o),r[8]=o,r[9]=s);let c=s,l,u;return r[10]===c?(l=r[11],u=r[12]):(l=()=>()=>{URL.revokeObjectURL(c)},u=[c],r[10]=c,r[11]=l,r[12]=u),(0,Y.useEffect)(l,u),c}function Je(e){let t=(0,X.c)(9),{threadId:r,filePath:i,version:a,label:o}=e,s=qe(r,i,a),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=p(n.caption,`px-3 py-1.5 border-b text-muted-foreground bg-muted/30`),t[0]=c):c=t[0];let l;t[1]===o?l=t[2]:(l=(0,Z.jsx)(`div`,{className:c,children:o}),t[1]=o,t[2]=l);let u=`${o} - ${i}`,d;t[3]!==s||t[4]!==u?(d=(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-4 overflow-auto bg-background`,children:(0,Z.jsx)(`img`,{src:s,alt:u,className:`max-w-full max-h-full object-contain`})}),t[3]=s,t[4]=u,t[5]=d):d=t[5];let f;return t[6]!==l||t[7]!==d?(f=(0,Z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[l,d]}),t[6]=l,t[7]=d,t[8]=f):f=t[8],f}function Ye(e){let t=(0,X.c)(23),{threadId:n,file:r}=e,i=r.status===`modified`||r.status===`deleted`||r.status===`renamed`,a=r.status===`modified`||r.status===`added`||r.status===`untracked`||r.status===`renamed`;if(i&&a){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(M,{label:`Loading before...`}),t[0]=e):e=t[0];let i=r.status===`renamed`&&r.oldPath?r.oldPath:r.path,a;t[1]!==i||t[2]!==n?(a=(0,Z.jsx)(`div`,{className:`flex-1 border-r border-border`,children:(0,Z.jsx)(Y.Suspense,{fallback:e,children:(0,Z.jsx)(Je,{threadId:n,filePath:i,version:`old`,label:`Before`})})}),t[1]=i,t[2]=n,t[3]=a):a=t[3];let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(M,{label:`Loading after...`}),t[4]=o):o=t[4];let s;t[5]!==r.path||t[6]!==n?(s=(0,Z.jsx)(`div`,{className:`flex-1`,children:(0,Z.jsx)(Y.Suspense,{fallback:o,children:(0,Z.jsx)(Je,{threadId:n,filePath:r.path,version:`new`,label:`After`})})}),t[5]=r.path,t[6]=n,t[7]=s):s=t[7];let c;return t[8]!==a||t[9]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex h-full`,children:[a,s]}),t[8]=a,t[9]=s,t[10]=c):c=t[10],c}let o=a?`new`:`old`,s=a?`Added`:`Deleted`,c;t[11]===s?c=t[12]:(c=s.toLowerCase(),t[11]=s,t[12]=c);let l=`Loading ${c} image...`,u;t[13]===l?u=t[14]:(u=(0,Z.jsx)(M,{label:l}),t[13]=l,t[14]=u);let d;t[15]!==r.path||t[16]!==s||t[17]!==n||t[18]!==o?(d=(0,Z.jsx)(Je,{threadId:n,filePath:r.path,version:o,label:s}),t[15]=r.path,t[16]=s,t[17]=n,t[18]=o,t[19]=d):d=t[19];let f;return t[20]!==u||t[21]!==d?(f=(0,Z.jsx)(`div`,{className:`flex h-full flex-col`,children:(0,Z.jsx)(Y.Suspense,{fallback:u,children:d})}),t[20]=u,t[21]=d,t[22]=f):f=t[22],f}function Xe(e){let t=(0,X.c)(70),{threadId:r,selectedFile:i,selectedFileIndex:a,isImageFile:o,diffOriginal:s,diffModified:c,resolvedTheme:v,onEditorMount:b,diffEditorOptions:S,isPanelCollapsed:C,showTreeBackButton:w,onShowTree:T,onTogglePanel:D,isFullView:k,onToggleFullView:A,comments:j,activeCommentIndex:M,onPrevComment:N,onNextComment:P,onFixComments:F,isChatOpen:I,onOpenChat:R,onCloseChat:z}=e,B=ne(Ze),V;t[0]===B?V=t[1]:(V=e=>ee(e,B),t[0]=B,t[1]=V);let re=ne(V),ie;t[2]===B?ie=t[3]:(ie=e=>te(e,B),t[2]=B,t[3]=ie);let ae=ne(ie),oe=C&&`h-auto py-3 flex-col items-start gap-3 md:flex-row md:items-center md:h-[71px] md:py-0 md:gap-2 justify-between`,se;t[4]===oe?se=t[5]:(se=p(`bg-transparent`,oe),t[4]=oe,t[5]=se);let H;t[6]!==C||t[7]!==T||t[8]!==D||t[9]!==w?(H=w?(0,Z.jsxs)(L,{variant:`ghost`,size:`icon`,className:`h-8 w-8 text-muted-foreground shrink-0`,onClick:T,children:[(0,Z.jsx)(g,{className:`h-4 w-4`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:`Show file tree`})]}):(0,Z.jsxs)(L,{variant:`ghost`,size:`icon`,className:`h-8 w-8 text-muted-foreground shrink-0`,onClick:D,children:[C?(0,Z.jsx)(g,{className:`h-4 w-4`}):(0,Z.jsx)(m,{className:`h-4 w-4`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:`Toggle file tree`})]}),t[6]=C,t[7]=T,t[8]=D,t[9]=w,t[10]=H):H=t[10];let ce;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(ce=p(n.label,`text-foreground`),t[11]=ce):ce=t[11];let ue=i?i.path:`Review Changes`,W;t[12]===ue?W=t[13]:(W=(0,Z.jsx)(`span`,{className:ce,children:ue}),t[12]=ue,t[13]=W);let G;t[14]!==H||t[15]!==W?(G=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[H,W]}),t[14]=H,t[15]=W,t[16]=G):G=t[16];let pe=C&&`ml-0`,me=!C&&`ml-auto`,K;t[17]!==pe||t[18]!==me?(K=p(`flex items-center gap-2`,pe,me,`md:ml-auto`),t[17]=pe,t[18]=me,t[19]=K):K=t[19];let q;t[20]!==k||t[21]!==o||t[22]!==A||t[23]!==i?(q=!o&&(0,Z.jsx)(L,{variant:`ghost`,size:`sm`,onClick:A,disabled:!i,className:p(n.compact,`h-8 gap-1 px-2`),children:k?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(l,{className:`h-3 w-3`}),` Show changes only`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{className:`h-3 w-3`}),` Show full file`]})}),t[20]=k,t[21]=o,t[22]=A,t[23]=i,t[24]=q):q=t[24];let J;t[25]!==M||t[26]!==j.length||t[27]!==P||t[28]!==N?(J=j.length>0&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(E,{children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsx)(L,{variant:`ghost`,size:`icon`,className:`h-8 w-8 rounded-full`,onClick:N,disabled:(M??0)===0,children:(0,Z.jsx)(h,{className:`h-3 w-3`})})}),(0,Z.jsx)(x,{children:`Previous comment`})]}),(0,Z.jsx)(`span`,{className:p(n.caption,`whitespace-nowrap`),children:j.length===1?`1 Comment`:`Comment ${(M??0)+1} of ${j.length}`}),(0,Z.jsxs)(E,{children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsx)(L,{variant:`ghost`,size:`icon`,className:`h-8 w-8 rounded-full`,onClick:P,disabled:(M??0)===j.length-1,children:(0,Z.jsx)(d,{className:`h-3 w-3`})})}),(0,Z.jsx)(x,{children:`Next comment`})]})]}),t[25]=M,t[26]=j.length,t[27]=P,t[28]=N,t[29]=J):J=t[29];let Y;t[30]!==j.length||t[31]!==F?(Y=j.length>0&&(0,Z.jsxs)(E,{children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsxs)(L,{size:`sm`,onClick:F,className:p(n.compact,`h-8 gap-1 px-3 bg-foreground text-background hover:bg-foreground/90`),children:[(0,Z.jsx)(_,{className:`h-3 w-3`}),`Fix all comments`]})}),(0,Z.jsx)(x,{children:`Send all comments to Tarsk for resolution`})]}),t[30]=j.length,t[31]=F,t[32]=Y):Y=t[32];let Q;t[33]!==K||t[34]!==q||t[35]!==J||t[36]!==Y?(Q=(0,Z.jsxs)(`div`,{className:K,children:[q,J,Y]}),t[33]=K,t[34]=q,t[35]=J,t[36]=Y,t[37]=Q):Q=t[37];let $;t[38]!==Q||t[39]!==se||t[40]!==G?($=(0,Z.jsxs)(U,{className:se,children:[G,Q]}),t[38]=Q,t[39]=se,t[40]=G,t[41]=$):$=t[41];let he;t[42]!==S||t[43]!==c||t[44]!==s||t[45]!==o||t[46]!==b||t[47]!==v||t[48]!==i||t[49]!==a||t[50]!==r?(he=o&&i?(0,Z.jsx)(Ye,{threadId:r,file:i}):(0,Z.jsx)(y,{height:`100%`,language:Ve(i?.path||``),original:s,modified:c,keepCurrentOriginalModel:!0,keepCurrentModifiedModel:!0,theme:v===`dark`?`vs-dark`:`vs-light`,onMount:b,options:S},`diff-${a}`),t[42]=S,t[43]=c,t[44]=s,t[45]=o,t[46]=b,t[47]=v,t[48]=i,t[49]=a,t[50]=r,t[51]=he):he=t[51];let ge;t[52]!==re||t[53]!==B||t[54]!==I||t[55]!==z||t[56]!==ae?(ge=I&&(0,Z.jsxs)(`div`,{className:`pointer-events-auto w-[min(100%,48rem)] rounded-2xl bg-background/50 p-4 backdrop-blur-md`,children:[(0,Z.jsx)(`div`,{className:`mb-3 flex items-center justify-end`,children:(0,Z.jsxs)(L,{variant:`ghost`,size:`icon`,className:`h-8 w-8`,onClick:z,children:[(0,Z.jsx)(u,{className:`h-4 w-4`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:`Close chat`})]})}),(0,Z.jsx)(de,{paneId:B,conversationId:re,children:(0,Z.jsx)(fe,{children:(0,Z.jsx)(le,{messages:ae})})})]}),t[52]=re,t[53]=B,t[54]=I,t[55]=z,t[56]=ae,t[57]=ge):ge=t[57];let _e;t[58]!==I||t[59]!==R?(_e=!I&&(0,Z.jsxs)(E,{children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsxs)(L,{size:`icon`,className:`pointer-events-auto h-12 w-12 rounded-full shadow-lg`,onClick:R,children:[(0,Z.jsx)(_,{className:`h-5 w-5`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:`Open review chat`})]})}),(0,Z.jsx)(x,{children:`Chat about this diff`})]}),t[58]=I,t[59]=R,t[60]=_e):_e=t[60];let ve;t[61]!==ge||t[62]!==_e?(ve=(0,Z.jsxs)(`div`,{className:`pointer-events-none absolute bottom-4 right-4 z-20 flex flex-col items-end gap-3`,children:[ge,_e]}),t[61]=ge,t[62]=_e,t[63]=ve):ve=t[63];let ye;t[64]!==he||t[65]!==ve?(ye=(0,Z.jsxs)(`div`,{className:`flex-1 bg-transparent relative`,children:[he,ve]}),t[64]=he,t[65]=ve,t[66]=ye):ye=t[66];let be;return t[67]!==$||t[68]!==ye?(be=(0,Z.jsxs)(`div`,{className:`diff-editor-panel flex h-full min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden bg-transparent`,children:[$,ye]}),t[67]=$,t[68]=ye,t[69]=be):be=t[69],be}function Ze(e){return e.focusedPane}function Qe(){let e=(0,X.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(ce,{withHandle:!0,className:`z-10 shrink-0`}),e[0]=t):t=e[0],t}function $e(e){let t=(0,X.c)(8),{isMobile:n,mobileShowTree:r,panelRef:i,onPanelCollapse:a,onPanelExpand:o,fileTreePanel:s,diffEditorPanel:c}=e,l;return t[0]!==c||t[1]!==s||t[2]!==n||t[3]!==r||t[4]!==a||t[5]!==o||t[6]!==i?(l=(0,Z.jsx)(`div`,{className:`diff-body flex min-h-0 w-full flex-1 overflow-hidden`,children:n?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:p(`flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden`,!r&&`hidden`),children:s}),(0,Z.jsx)(`div`,{className:p(`flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden`,r&&`hidden`),children:c})]}):(0,Z.jsxs)(oe,{direction:`horizontal`,children:[(0,Z.jsx)(G,{ref:i,defaultSize:25,minSize:12,maxSize:40,collapsible:!0,collapsedSize:0,onCollapse:a,onExpand:o,className:`overflow-hidden border-r border-transparent`,children:s}),(0,Z.jsx)(Qe,{}),(0,Z.jsx)(G,{className:`overflow-hidden border-l border-border bg-transparent`,children:c})]})}),t[0]=c,t[1]=s,t[2]=n,t[3]=r,t[4]=a,t[5]=o,t[6]=i,t[7]=l):l=t[7],l}var et=i(`app.diff-view.ui`);function tt({threadId:e,onExit:t,loadVersion:n,cachedState:r,onCachedStateChange:i}){let a=ie(Ae(e,n),()=>Me(e)),o=B(),s=ne(e=>e.projectModelSelections),{resolvedTheme:c}=ae(),l=W(),{fetchUnifiedStatus:u}=se(),[d,f]=(0,Y.useState)(r?.files??a.files??[]),[p,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(r?.selectedFileIndex??0),[_,v]=(0,Y.useState)(!1),[y,b]=(0,Y.useState)(!1),[x,S]=(0,Y.useState)(!1),[T,E]=(0,Y.useState)(!0),D=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{f(a.files??[]),g(e=>{let t=r?.selectedFileIndex??e,n=Math.max((a.files?.length??1)-1,0);return Math.min(t,n)})},[r?.selectedFileIndex,a.files]),(0,Y.useEffect)(()=>{E(!0)},[e]);let O=(0,Y.useCallback)(e=>{g(e),l&&E(!1)},[l]);(0,Y.useEffect)(()=>{i&&i(e=>{let t=d,n=Math.max(t.length-1,0),r=Math.min(h,n);return e?.files===t&&e.selectedFileIndex===r?e:{files:t,selectedFileIndex:r}})},[d,i,h]);let A=(0,Y.useCallback)(()=>{E(!0)},[]),M=l&&!T,{comments:N,setComments:P}=ke(e),[F,I]=(0,Y.useState)(null),[L,R]=(0,Y.useState)(null),[z,ee]=(0,Y.useState)(null),te=(0,Y.useCallback)(()=>{D.current&&(y?D.current.expand():D.current.collapse())},[y]),re=(0,Y.useCallback)(async()=>{if(e){m(null);try{let t=await w(e);f(t.files||[]),g(e=>{let n=t.files||[],r=Math.max(n.length-1,0);return Math.min(e,r)})}catch(e){m(e instanceof Error?e.message:`Failed to load diff`)}}},[e]),oe=(0,Y.useCallback)(async t=>{try{await j(e,t.path),await Promise.all([re(),u(!0)])}catch(e){m(e instanceof Error?e.message:`Failed to revert file`)}},[e,re,u]),H=(0,Y.useMemo)(()=>ge(d),[d]),U=d[h],ce=U?.isBinary??!1,le=U?_?U.oldContent:(()=>{let e=Ie(U);return e?Le(U.oldContent,e.original.startLine,e.original.endLine):U.oldContent})():``,ue=U?_?U.newContent:(()=>{let e=Ie(U);return e?Le(U.newContent,e.modified.startLine,e.modified.endLine):U.newContent})():``,{diffEditorRef:de,applyAllDecorations:G,handleEditorDidMount:fe}=He({comments:N,activeCommentIndex:F,isFullView:_,selectedFileIndex:h,files:d,selectedFile:U,onLineGutterClick:(0,Y.useCallback)(({existing:e,lineNumber:t,lineContent:n,side:r})=>{e?ee(e):R({lineNumber:t,lineContent:n,side:r})},[])}),pe=(0,Y.useCallback)(e=>{if(L&&U){let t={id:`comment-${Date.now()}`,filePath:U.path,fileIndex:h,lineNumber:L.lineNumber,lineContent:L.lineContent,comment:e,side:L.side};P(e=>[...e,t]),R(null)}else z&&(P(t=>t.map(t=>t.id===z.id?{...t,comment:e}:t)),ee(null))},[L,z,U,h,P]),me=(0,Y.useCallback)(()=>{z&&(P(e=>e.filter(e=>e.id!==z.id)),ee(null))},[z,P]),K=(0,Y.useCallback)(e=>{if(N.length===0)return;let t=(e%N.length+N.length)%N.length,n=N[t];I(t),g(n.fileIndex),l&&E(!1),setTimeout(()=>{let e=de.current;if(!e)return;let t=d[n.fileIndex];if(!t)return;let r=_?null:Ie(t),i=r?n.side===`original`?r.original:r.modified:null,a=ze(n.lineNumber,i);(n.side===`original`?e.getOriginalEditor():e.getModifiedEditor()).revealLineInCenter(Math.max(1,a)),G()},100)},[N,d,_,G,l]),q=(0,Y.useCallback)(()=>{K((F??0)-1)},[K,F]),J=(0,Y.useCallback)(()=>{K((F??-1)+1)},[K,F]),X=(0,Y.useCallback)(async()=>{let n=s[e];if(!n)try{let e=await k(),t=Object.values(e).flat();if(t.length>0)n=t[0];else{et.error(`No models available to process comments`);return}}catch(e){et.error(`Failed to load models:`,e);return}let r=n.id,i=n.provider;try{let{prompt:n}=await C(e,N);P([]),o({type:V.SetPendingChatMessage,message:{threadId:e,message:n,model:r,provider:i}}),t()}catch(e){et.error(`Failed to fix comments:`,e),typeof window<`u`&&window.alert(`Failed to process comments. Please try again.`)}},[N,s,o,e,t,P]),Q={readOnly:!0,renderSideBySide:!l,ignoreTrimWhitespace:!1,renderOverviewRuler:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},folding:!1,glyphMargin:!0,lineNumbers:U&&(_||Re(U))?`on`:`off`,diffWordWrap:`on`,originalEditable:!1,automaticLayout:!0};return(0,Z.jsxs)(`div`,{className:`diff-view-root flex h-full min-h-0 w-full flex-col`,children:[(0,Z.jsx)($e,{isMobile:l,mobileShowTree:T,panelRef:D,onPanelCollapse:()=>b(!0),onPanelExpand:()=>b(!1),fileTreePanel:(0,Z.jsx)(`div`,{className:`flex h-full min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden`,children:(0,Z.jsx)(xe,{treeData:H,files:d,error:p,selectedFileIndex:h,onFileSelect:O,onRevertFile:oe})}),diffEditorPanel:(0,Z.jsx)(Xe,{threadId:e,selectedFile:U,selectedFileIndex:h,isImageFile:ce,diffOriginal:le,diffModified:ue,resolvedTheme:c,onEditorMount:fe,diffEditorOptions:Q,isPanelCollapsed:y,showTreeBackButton:M,onShowTree:A,onTogglePanel:te,isFullView:_,onToggleFullView:()=>v(e=>!e),comments:N,activeCommentIndex:F,onPrevComment:q,onNextComment:J,onFixComments:X,isChatOpen:x,onOpenChat:()=>S(!0),onCloseChat:()=>S(!1)})}),(0,Z.jsx)(Oe,{open:L!==null||z!==null,lineNumber:z?.lineNumber??L?.lineNumber??0,lineContent:z?.lineContent??L?.lineContent??``,initialComment:z?.comment,isEditing:z!==null,onSave:pe,onDelete:me,onClose:()=>{R(null),ee(null)}},`${z?.id??``}-${L?.lineNumber??``}-${L?.side??``}`)]})}function nt(e){let t=(0,X.c)(23),[n,r]=(0,Y.useState)(0),[i,a]=(0,Y.useState)(0),o=(0,Y.useRef)(0),s=!!e.cachedState,c;t[0]===e.threadId?c=t[1]:(c=()=>{r(t=>(re(Ae(e.threadId,t)),t+1)),a(it)},t[0]=e.threadId,t[1]=c);let l=c,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{a(0),r(0),o.current=0},t[2]=u):u=t[2];let d;t[3]===e.threadId?d=t[4]:(d=[e.threadId],t[3]=e.threadId,t[4]=d),(0,Y.useEffect)(u,d);let f,p;t[5]!==e.refreshTrigger||t[6]!==e.threadId?(f=()=>{!e.refreshTrigger||e.refreshTrigger<=o.current||(o.current=e.refreshTrigger,r(t=>(re(Ae(e.threadId,t)),t+1)),a(rt))},p=[e.refreshTrigger,e.threadId],t[5]=e.refreshTrigger,t[6]=e.threadId,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,Y.useEffect)(f,p);let m=`${e.threadId}:${i}`,h;t[9]!==l||t[10]!==s?(h=s?null:(0,Z.jsx)(Ge,{onRetry:l}),t[9]=l,t[10]=s,t[11]=h):h=t[11];let g=`${e.threadId}:${n}`,_;t[12]!==n||t[13]!==e||t[14]!==g?(_=(0,Z.jsx)(tt,{...e,loadVersion:n},g),t[12]=n,t[13]=e,t[14]=g,t[15]=_):_=t[15];let v;t[16]!==h||t[17]!==_?(v=(0,Z.jsx)(Y.Suspense,{fallback:h,children:_}),t[16]=h,t[17]=_,t[18]=v):v=t[18];let y;return t[19]!==l||t[20]!==m||t[21]!==v?(y=(0,Z.jsx)(J,{fallbackTitle:`Failed to load review changes`,onRetry:l,children:v},m),t[19]=l,t[20]=m,t[21]=v,t[22]=y):y=t[22],y}function rt(e){return e+1}function it(e){return e+1}export{nt as DiffView,nt as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/explorer-tree-B2SnBNoL.js","assets/rolldown-runtime-aKtaBQYM.js","assets/index-cAZJlfDA.js","assets/monaco-D1hpqXQ0.js","assets/monaco-BQve5vfS.css","assets/api-DkhEo8tW.js","assets/onboarding-Dy7KG3M5.js","assets/interactive-WtOIgeV4.js","assets/alert-dialog-BpJafkQ6.js","assets/react-vendor-DgnPMVt4.js","assets/use-toast-BFQ85Ly5.js","assets/chat-dock-context-4ZMIlxAn.js","assets/store-CSyJjyNs.js","assets/explorer-tab-context-8bs_tiCO.js","assets/main-tab-context-DHeKIUsf.js","assets/use-suspense-resource-rX-GqyWi.js","assets/local-tool-blocks-DlqmJ7__.js","assets/ndjson-stream-DeGpE5o5.js","assets/thread-tool-blocks-BfowiaTH.js","assets/utils-Rlf65JHq.js","assets/index-3N_2bBI0.css","assets/async-error-boundary-DR57nNXL.js","assets/card-xQfAy2Rx.js","assets/context-menu-cv7nzOcn.js","assets/ui-components-CuWavb_S.js","assets/explorer-view-B5nGnzAV.js","assets/monaco-setup-VhLB0diG.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Ci as t,Fr as n,Ti as r,_ as i,i as a}from"./interactive-WtOIgeV4.js";import{bt as o,ht as ee,xt as te}from"./onboarding-Dy7KG3M5.js";import{l as s}from"./monaco-D1hpqXQ0.js";import{r as c}from"./store-CSyJjyNs.js";import{t as l}from"./use-toast-BFQ85Ly5.js";import{n as u}from"./explorer-tab-context-8bs_tiCO.js";import{$ as d,A as f,O as p,Q as m,St as h,X as g,Y as _,Z as v,j as y,k as b}from"./index-cAZJlfDA.js";import{t as x}from"./async-error-boundary-DR57nNXL.js";var S=e(r(),1),C=t(),w=(0,S.lazy)(()=>s(()=>import(`./explorer-tree-B2SnBNoL.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]))),ne=(0,S.lazy)(()=>s(()=>import(`./explorer-view-B5nGnzAV.js`),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26])));function T(){let e=c(e=>e.selectedThreadId),t=y(),[r,s]=(0,S.useState)(null),[T,E]=(0,S.useState)(!0),[D,O]=(0,S.useState)(null),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),N=(0,S.useRef)(0),{pendingExplorerPath:P,setPendingExplorerPath:F,explorerClearPath:I,setExplorerClearPath:L,triggerExplorerRefresh:R}=u();(0,S.useEffect)(()=>{function e(e){d(e.dataTransfer)&&e.preventDefault()}return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[]),(0,S.useEffect)(()=>{E(!0)},[e]);let z=(0,S.useCallback)(e=>{s(e),t&&E(!1)},[t]),B=(0,S.useCallback)(()=>{E(!0)},[]),V=(0,S.useCallback)(e=>{s(e),t&&E(!1)},[t]);(0,S.useEffect)(()=>{P&&(s({name:P.split(`/`).pop()??P,path:P,type:`file`}),t&&E(!1),F(null))},[t,P,F]),(0,S.useEffect)(()=>{I&&(r&&(r.path===I||r.path.startsWith(I+`/`))&&(s(null),t&&E(!0)),L(null))},[I,t,r,L]);function H(){N.current=0,M(!1)}function U(e){d(e.dataTransfer)&&(N.current+=1,M(!0))}function W(e){d(e.dataTransfer)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function G(e){d(e.dataTransfer)&&(N.current=Math.max(0,N.current-1),N.current===0&&M(!1))}function K(e){if(!d(e.dataTransfer))return;e.preventDefault(),H();let{files:t,skippedFolders:n}=m(e.dataTransfer);n>0&&l({title:`Folders skipped`,description:`Only files can be copied. Drop individual files instead of folders.`}),t.length!==0&&O({files:t,dirPath:``})}let q=(0,S.useCallback)((e,t)=>{N.current=0,M(!1),O({files:e,dirPath:t})},[]);async function J(){if(!(!D||!e||k)){A(!0);try{let{copied:t,failures:n}=await v(e,D.dirPath,D.files);t.length>0&&R(),l(g(D,t.length,n))}finally{A(!1),O(null)}}}let Y={onDragEnter:U,onDragOver:W,onDragLeave:G,onDrop:K},X=j?(0,C.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-50 flex items-center justify-center bg-background/70`,children:(0,C.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border-2 border-dashed border-primary bg-background px-6 py-4`,children:[(0,C.jsx)(i,{className:`h-4 w-4 text-primary`}),(0,C.jsx)(`span`,{className:n.label,children:`Drop files to copy them into the repository`})]})}):null,Z=(0,C.jsx)(ee,{className:`h-full`,children:e?(0,C.jsx)(h,{threadId:e,children:(0,C.jsx)(x,{fallbackTitle:`Failed to load files`,children:(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(te,{}),children:(0,C.jsx)(w,{threadId:e,selectedPath:r?.path??null,onNodeSelect:z,onFilesDrop:q})})})}):(0,C.jsx)(`p`,{className:a(n.caption,`px-3 py-4 text-center`),children:`No thread selected.`})}),Q=(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(o,{}),children:(0,C.jsx)(ne,{selectedFile:r,showTreeBackButton:t&&!T,onShowTree:B,onFileCreated:V})}),$=(0,C.jsx)(_,{pendingDrop:D,dropCopying:k,onConfirm:()=>{J()},onDismiss:()=>{O(null)}});return t?(0,C.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,C.jsx)(`div`,{className:a(`flex-1 min-h-0 overflow-hidden`,!T&&`hidden`),children:Z}),(0,C.jsx)(`div`,{className:a(`flex-1 min-h-0 overflow-hidden`,T&&`hidden`),children:Q})]}):(0,C.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,C.jsxs)(f,{direction:`horizontal`,className:`flex-1 overflow-hidden`,children:[(0,C.jsx)(b,{defaultSize:25,minSize:15,maxSize:50,className:`overflow-hidden border-r border-border`,children:Z}),(0,C.jsx)(p,{withHandle:!0}),(0,C.jsx)(b,{className:`overflow-hidden`,children:Q})]})]})}export{T as default};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Ci as t,Fr as n,Ft as r,Mt as i,Nt as a,Ti as o,fn as s,i as c,mn as l,wi as u,z as d}from"./interactive-WtOIgeV4.js";import{f,x as p,xt as m,yt as h}from"./onboarding-Dy7KG3M5.js";import{t as g}from"./use-toast-BFQ85Ly5.js";import{a as _,c as v,i as y,n as b,r as x,t as S}from"./alert-dialog-BpJafkQ6.js";import{n as C}from"./explorer-tab-context-8bs_tiCO.js";import{l as w,n as T,o as E,r as D,s as O,t as k}from"./api-DkhEo8tW.js";import{n as A,t as j}from"./use-suspense-resource-rX-GqyWi.js";import{$ as M,Ct as N,Q as P,_t as ee,rt as te,vt as F,yt as I}from"./index-cAZJlfDA.js";import{a as L,i as R,n as z,r as B,t as ne}from"./context-menu-cv7nzOcn.js";import{t as re}from"./async-error-boundary-DR57nNXL.js";import{t as V}from"./ui-components-CuWavb_S.js";var H=u(),U=e(o(),1),W=t(),G=U.forwardRef((e,t)=>{let n=(0,H.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=c(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,W.jsx)(V,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});G.displayName=V.displayName;var K=U.forwardRef((e,t)=>{let n=(0,H.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsx)(d,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=c(`flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==t||n[8]!==o?(s=(0,W.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[a,(0,W.jsx)(V.Input,{ref:t,className:o,...i})]}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});K.displayName=V.Input.displayName;var q=U.forwardRef((e,t)=>{let n=(0,H.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=c(`max-h-[300px] overflow-y-auto overflow-x-hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,W.jsx)(V.List,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});q.displayName=V.List.displayName;var J=U.forwardRef((e,t)=>{let r=(0,H.c)(4),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=c(n.bodyMuted,`py-6 text-center`),r[0]=i):i=r[0];let a;return r[1]!==e||r[2]!==t?(a=(0,W.jsx)(V.Empty,{ref:t,className:i,...e}),r[1]=e,r[2]=t,r[3]=a):a=r[3],a});J.displayName=V.Empty.displayName;var Y=U.forwardRef((e,t)=>{let n=(0,H.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=c(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,W.jsx)(V.Group,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});Y.displayName=V.Group.displayName;var ie=U.forwardRef((e,t)=>{let n=(0,H.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=c(`-mx-1 h-px bg-divider`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,W.jsx)(V.Separator,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});ie.displayName=V.Separator.displayName;var ae=U.forwardRef((e,t)=>{let r=(0,H.c)(9),i,a;r[0]===e?(i=r[1],a=r[2]):({className:i,...a}=e,r[0]=e,r[1]=i,r[2]=a);let o;r[3]===i?o=r[4]:(o=c(c(n.body,`relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`),i),r[3]=i,r[4]=o);let s;return r[5]!==a||r[6]!==t||r[7]!==o?(s=(0,W.jsx)(V.Item,{ref:t,className:o,...a}),r[5]=a,r[6]=t,r[7]=o,r[8]=s):s=r[8],s});ae.displayName=V.Item.displayName;var oe=e=>{let t=(0,H.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=c(n.compact,`ml-auto tracking-widest text-muted-foreground`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,W.jsx)(`span`,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o};oe.displayName=`CommandShortcut`;var X=100,se=500;function Z(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean)}function ce(e,t){return t.length===0?!0:t.every(t=>e.haystack.includes(t))}function le(e,t,n){if(t.length===0)return[];let r=[];for(let n of e)if(ce(n,t)&&(r.push(n.node),r.length>=se))break;return r.sort((e,t)=>ue(e,t,n)).slice(0,X)}function ue(e,t,n){let r=n.trim().toLowerCase(),i=e.name.toLowerCase(),a=t.name.toLowerCase(),o=r?i.startsWith(r):!1;return o===(r?a.startsWith(r):!1)?e.type===t.type?e.path.localeCompare(t.path):e.type===`folder`?-1:1:o?-1:1}function de(e){let t=(0,H.c)(38),{items:r,isReady:a,onRequestIndex:o,onOpenChange:s,onSelect:l}=e,u=a===void 0?!1:a,d=(0,U.useRef)(null),f=(0,U.useRef)(!1),m=(0,U.useRef)(!1),[h,g]=(0,U.useState)(!1),[_,v]=(0,U.useState)(``),y=(0,U.useDeferredValue)(_),b;t[0]===o?b=t[1]:(b=function(){m.current||(m.current=!0,o())},t[0]=o,t[1]=b);let x=b,S;t[2]!==y||t[3]!==r?(S=le(r,Z(y),y),t[2]=y,t[3]=r,t[4]=S):S=t[4];let C=S,w,T;t[5]!==s||t[6]!==_?(w=()=>{let e=_.trim().length>0;g(e),f.current!==e&&(f.current=e,s(e))},T=[s,_],t[5]=s,t[6]=_,t[7]=w,t[8]=T):(w=t[7],T=t[8]),(0,U.useEffect)(w,T);let E;t[9]===s?E=t[10]:(E=function(e){e||v(``),g(e),s(e),e&&requestAnimationFrame(()=>d.current?.focus())},t[9]=s,t[10]=E);let D=E,O;t[11]!==s||t[12]!==l?(O=function(e){l(e),g(!1),s(!1),v(``)},t[11]=s,t[12]=l,t[13]=O):O=t[13];let k=O,A;t[14]===x?A=t[15]:(A=e=>{x(),v(e.target.value)},t[14]=x,t[15]=A);let j;t[16]!==_||t[17]!==x||t[18]!==A?(j=(0,W.jsx)(I,{asChild:!0,children:(0,W.jsx)(`div`,{className:`bg-transparent`,children:(0,W.jsx)(p,{ref:d,value:_,onPointerDown:x,onChange:A,placeholder:`Search files and folders`,className:`pr-[4px]`})})}),t[16]=_,t[17]=x,t[18]=A,t[19]=j):j=t[19];let M;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(M=c(n.compact,`py-4`),t[20]=M):M=t[20];let N=u?`No matches found.`:`Indexing files and folders...`,P;t[21]===N?P=t[22]:(P=(0,W.jsx)(J,{className:M,children:N}),t[21]=N,t[22]=P);let L;if(t[23]!==k||t[24]!==C){let e;t[26]===k?e=t[27]:(e=e=>(0,W.jsxs)(ae,{value:e.path,onSelect:()=>k(e),className:e.ignored?`opacity-50`:void 0,children:[e.type===`folder`?(0,W.jsx)(i,{className:`h-4 w-4 text-muted-foreground`}):(0,W.jsx)(te,{filename:e.name}),(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`div`,{className:`truncate`,children:e.name}),(0,W.jsx)(`div`,{className:c(n.compact,`truncate text-muted-foreground`),children:e.path})]})]},e.path),t[26]=k,t[27]=e),L=C.map(e),t[23]=k,t[24]=C,t[25]=L}else L=t[25];let R;t[28]===L?R=t[29]:(R=(0,W.jsx)(Y,{children:L}),t[28]=L,t[29]=R);let z;t[30]!==P||t[31]!==R?(z=(0,W.jsx)(F,{align:`start`,side:`bottom`,sideOffset:4,onOpenAutoFocus:Q,className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,W.jsx)(G,{shouldFilter:!1,children:(0,W.jsxs)(q,{children:[P,R]})})}),t[30]=P,t[31]=R,t[32]=z):z=t[32];let B;return t[33]!==D||t[34]!==h||t[35]!==z||t[36]!==j?(B=(0,W.jsxs)(ee,{open:h,onOpenChange:D,children:[j,z]}),t[33]=D,t[34]=h,t[35]=z,t[36]=j,t[37]=B):B=t[37],B}function Q(e){return e.preventDefault()}function fe(e,t,n){return`explorer-dir:${e}:${t}:${n}`}function pe(e){let t=(0,H.c)(12),{threadId:n,dirPath:r,version:i,children:a}=e,o;t[0]!==r||t[1]!==n||t[2]!==i?(o=fe(n,r,i),t[0]=r,t[1]=n,t[2]=i,t[3]=o):o=t[3];let s;t[4]!==r||t[5]!==n?(s=()=>E(n,r).then(me),t[4]=r,t[5]=n,t[6]=s):s=t[6];let c=j(o,s),l;t[7]!==a||t[8]!==c?(l=a(c),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;return t[10]===l?u=t[11]:(u=(0,W.jsx)(W.Fragment,{children:l}),t[10]=l,t[11]=u),u}function me(e){return e.entries}function he(e){let t=(0,H.c)(17),{defaultValue:r,onCommit:i,onCancel:a,level:o,basePadding:s,icon:c}=e,l=(0,U.useRef)(null),u,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{l.current?.focus(),l.current?.select()},d=[],t[0]=u,t[1]=d):(u=t[0],d=t[1]),(0,U.useEffect)(u,d);let p;t[2]!==a||t[3]!==i?(p=function(e){if(e.key===`Enter`){let e=l.current?.value.trim()??``;e?i(e):a()}else e.key===`Escape`&&a()},t[2]=a,t[3]=i,t[4]=p):p=t[4];let m=p,h;t[5]!==a||t[6]!==i?(h=function(){let e=l.current?.value.trim()??``;e?i(e):a()},t[5]=a,t[6]=i,t[7]=h):h=t[7];let g=h,_;t[8]!==r||t[9]!==g||t[10]!==m?(_=(0,W.jsx)(`input`,{ref:l,defaultValue:r,onKeyDown:m,onBlur:g,className:`flex-1 min-w-0 bg-transparent outline-none border border-border rounded px-1 text-base`,onClick:$}),t[8]=r,t[9]=g,t[10]=m,t[11]=_):_=t[11];let v;return t[12]!==s||t[13]!==c||t[14]!==o||t[15]!==_?(v=(0,W.jsxs)(f,{level:o,basePadding:s,className:n.conversationBody,children:[c,_]}),t[12]=s,t[13]=c,t[14]=o,t[15]=_,t[16]=v):v=t[16],v}function $(e){return e.stopPropagation()}function ge(e){return e.map(e=>({node:e,haystack:`${e.name} ${e.path}`.toLowerCase()}))}function _e(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(0,t):``}var ve=(0,U.memo)(function e({node:t,level:o,threadId:u,selectedPath:d,expandedPaths:p,getDirVersion:m,renamingPath:_,newItemIn:v,onToggleFolder:y,onSelectNode:b,onStartRename:x,onCommitRename:S,onCancelRename:C,onDelete:w,onOpen:T,onCopyReference:E,onNewFile:D,onNewFolder:O,onCommitNewItem:k,onCancelNewItem:A,dropTargetPath:j,onFolderDropTargetChange:N,onFilesDrop:ee}){let F=p.has(t.path),I=_===t.path,re=v?.dirPath===t.path&&F,V=j===t.path;return t.type===`folder`?(0,W.jsxs)(ne,{children:[(0,W.jsx)(L,{asChild:!0,children:(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(f,{level:o,basePadding:10,selected:d===t.path,className:c(n.conversationBody,t.ignored&&`opacity-50`,V&&`bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-primary`),onClick:e=>{e.stopPropagation(),y(t)},onDragOver:e=>{M(e.dataTransfer)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`,V||N(t.path))},onDragLeave:e=>{M(e.dataTransfer)&&(e.currentTarget.contains(e.relatedTarget)||V&&N(null))},onDrop:e=>{if(!M(e.dataTransfer))return;e.preventDefault(),e.stopPropagation(),N(null);let{files:n,skippedFolders:r}=P(e.dataTransfer);r>0&&g({title:`Folders skipped`,description:`Only files can be copied. Drop individual files instead of folders.`}),n.length>0&&ee(n,t.path)},children:[(0,W.jsx)(`span`,{className:`text-muted-foreground w-3 flex-shrink-0`,children:F?(0,W.jsx)(l,{className:`h-3 w-3`}):(0,W.jsx)(s,{className:`h-3 w-3`})}),I?(0,W.jsxs)(W.Fragment,{children:[F?(0,W.jsx)(a,{className:`h-4 w-4 flex-shrink-0`}):(0,W.jsx)(i,{className:`h-4 w-4 flex-shrink-0`}),(0,W.jsx)(`input`,{autoFocus:!0,defaultValue:t.name,onKeyDown:e=>{if(e.key===`Enter`){let n=e.target.value.trim();n?S(t,n):C()}else e.key===`Escape`&&C()},onBlur:e=>{let n=e.target.value.trim();n?S(t,n):C()},onClick:e=>e.stopPropagation(),className:`flex-1 min-w-0 bg-transparent outline-none border border-border rounded px-1 text-base`})]}):(0,W.jsxs)(W.Fragment,{children:[F?(0,W.jsx)(a,{className:`h-4 w-4 flex-shrink-0`}):(0,W.jsx)(i,{className:`h-4 w-4 flex-shrink-0`}),(0,W.jsx)(`span`,{className:`flex-1 truncate`,children:t.name})]})]}),F&&(0,W.jsx)(`div`,{children:(0,W.jsx)(U.Suspense,{fallback:(0,W.jsx)(h,{}),children:(0,W.jsx)(pe,{threadId:u,dirPath:t.path,version:m(t.path),children:t=>(0,W.jsxs)(W.Fragment,{children:[re&&(0,W.jsx)(he,{defaultValue:``,level:o+1,basePadding:v.type===`folder`?10:22,icon:v.type===`folder`?(0,W.jsx)(i,{className:`h-4 w-4 flex-shrink-0`}):(0,W.jsx)(r,{className:`h-4 w-4 flex-shrink-0 text-muted-foreground`}),onCommit:k,onCancel:A}),t.map(t=>(0,W.jsx)(e,{node:t,level:o+1,threadId:u,selectedPath:d,expandedPaths:p,getDirVersion:m,renamingPath:_,newItemIn:v,onToggleFolder:y,onSelectNode:b,onStartRename:x,onCommitRename:S,onCancelRename:C,onDelete:w,onOpen:T,onCopyReference:E,onNewFile:D,onNewFolder:O,onCommitNewItem:k,onCancelNewItem:A,dropTargetPath:j,onFolderDropTargetChange:N,onFilesDrop:ee},t.path))]})})})})]})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(B,{onSelect:()=>T(t),children:`Open`}),(0,W.jsx)(R,{}),(0,W.jsx)(B,{onSelect:()=>D(t.path),children:`New File...`}),(0,W.jsx)(B,{onSelect:()=>O(t.path),children:`New Folder...`}),(0,W.jsx)(R,{}),(0,W.jsx)(B,{onSelect:()=>E(t),children:`Copy Reference`}),(0,W.jsx)(B,{onSelect:()=>x(t),children:`Rename...`}),(0,W.jsx)(B,{onSelect:()=>w(t),className:`text-destructive focus:text-destructive`,children:`Delete`})]})]}):(0,W.jsxs)(ne,{children:[(0,W.jsx)(L,{asChild:!0,children:(0,W.jsxs)(f,{level:o,basePadding:22,selected:d===t.path,className:c(n.conversationBody,t.ignored&&`opacity-50`),onClick:()=>b(t),children:[(0,W.jsx)(te,{filename:t.name}),I?(0,W.jsx)(`input`,{autoFocus:!0,defaultValue:t.name,onKeyDown:e=>{if(e.key===`Enter`){let n=e.target.value.trim();n?S(t,n):C()}else e.key===`Escape`&&C()},onBlur:e=>{let n=e.target.value.trim();n?S(t,n):C()},onClick:e=>e.stopPropagation(),className:`flex-1 min-w-0 bg-transparent outline-none border border-border rounded px-1 text-base`}):(0,W.jsx)(`span`,{className:`flex-1 truncate`,children:t.name})]})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(B,{onSelect:()=>T(t),children:`Open`}),(0,W.jsx)(R,{}),(0,W.jsx)(B,{onSelect:()=>D(_e(t.path)),children:`New File...`}),(0,W.jsx)(B,{onSelect:()=>O(_e(t.path)),children:`New Folder...`}),(0,W.jsx)(R,{}),(0,W.jsx)(B,{onSelect:()=>E(t),children:`Copy Reference`}),(0,W.jsx)(B,{onSelect:()=>x(t),children:`Rename...`}),(0,W.jsx)(B,{onSelect:()=>w(t),className:`text-destructive focus:text-destructive`,children:`Delete`})]})]})}),ye=new Map;function be({threadId:e,selectedPath:t,onNodeSelect:n,onFilesDrop:a}){let[o,s]=(0,U.useState)(()=>new Map([[``,0]])),[c,l]=(0,U.useState)(new Set),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null),[h,j]=(0,U.useState)(null),[M,P]=(0,U.useState)(null),[ee,te]=(0,U.useState)(!1),[F,I]=(0,U.useState)([]),[R,V]=(0,U.useState)(!1),[H,G]=(0,U.useState)(!1),K=(0,U.useRef)(null),q=(0,U.useRef)(0),J=(0,U.useRef)(null),{explorerRefreshTick:Y,pendingExplorerPath:ie,setExplorerClearPath:ae}=C(),{fetchUnifiedStatus:oe}=N(),X=(0,U.useMemo)(()=>`${e}:${Y}`,[Y,e]),se=(0,U.useCallback)(e=>{(0,U.startTransition)(()=>{te(t=>t===e?t:e)})},[]),Z=(0,U.useCallback)(async()=>{if(!e)return;let t=ye.get(X);if(t){I(t),V(!0);return}if(K.current!==X){K.current=X,I([]),V(!1);try{let t=ge((await E(e,``,!0)).entries);ye.set(X,t),I(t),V(!0)}catch{I([]),V(!1)}finally{K.current===X&&(K.current=null)}}},[X,e]),ce=(0,U.useCallback)(()=>{G(!0)},[]),le=(0,U.useCallback)(()=>{ye.delete(X),I([]),V(!1)},[X]),ue=(0,U.useCallback)(()=>{le(),H&&Z()},[le,Z,H]),Q=(0,U.useCallback)(e=>o.get(e)??0,[o]),me=(0,U.useCallback)(e=>{s(t=>{let n=new Map(t);return n.set(e,(t.get(e)??0)+1),n})},[]),$=(0,U.useCallback)(t=>{e&&(A(fe(e,t,Q(t))),me(t))},[me,Q,e]),be=(0,U.useCallback)(t=>{if(!e)return;let n=t.path.split(`/`);t.type===`file`&&n.pop();let r=[],i=``;for(let e of n)i=i?`${i}/${e}`:e,r.push(i);l(e=>{let t=new Set(e);for(let e of r)t.add(e);return t})},[e]);(0,U.useEffect)(()=>{if(!e)return;let t=J.current!==null&&J.current!==e;J.current=e,t&&(s(new Map([[``,0]])),l(new Set),d(null),p(null),q.current=Y)},[Y,e]),(0,U.useEffect)(()=>{!e||Y<=q.current||(q.current=Y,s(t=>{let n=new Set([``]);for(let e of c)n.add(e);let r=new Map(t);for(let i of n){let n=t.get(i)??0;A(fe(e,i,n)),r.set(i,n+1)}return r}))},[Y,c,e]),(0,U.useEffect)(()=>{I([]),V(!1),G(!1),K.current=null},[X]),(0,U.useEffect)(()=>{!H||!e||Z()},[Z,H,e]),(0,U.useEffect)(()=>{if(!ie||!e)return;let t=ie.split(`/`);t.pop();let n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);if(n.length!==0){l(e=>{let t=new Set(e);for(let e of n)t.add(e);return t});for(let e of n)s(t=>{if(t.has(e))return t;let n=new Map(t);return n.set(e,0),n})}},[ie,e]);function xe(e){c.has(e.path)?l(t=>{let n=new Set(t);return n.delete(e.path),n}):(l(t=>new Set(t).add(e.path)),s(t=>{if(t.has(e.path))return t;let n=new Map(t);return n.set(e.path,0),n}))}function Se(e){j(e)}async function Ce(t){try{await O(e,t.path)}catch{g({title:`Error`,description:`Failed to open "${t.name}"`,variant:`destructive`})}}async function we(e){try{await navigator.clipboard.writeText(e.path);let t=g({title:`Copied`,description:`Reference copied to clipboard.`});window.setTimeout(()=>{t.dismiss()},2e3)}catch{g({title:`Error`,description:`Failed to copy reference for "${e.name}"`,variant:`destructive`})}}async function Te(){if(!h)return;let t=h;j(null);try{await D(e,t.path),ae(t.path),$(_e(t.path)),ue(),oe(!0),l(e=>{let n=new Set(e);for(let e of n)(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n}),s(e=>{let n=new Map(e);for(let e of n.keys())(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n})}catch{g({title:`Error`,description:`Failed to move "${t.name}" to trash`,variant:`destructive`})}}function Ee(e){p(null),d(e.path)}async function De(t,n){if(n===t.name){d(null);return}d(null);try{await w(e,t.path,n),$(_e(t.path)),ue(),oe(!0),t.type===`folder`&&(l(e=>{let n=new Set(e);for(let e of n)(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n}),s(e=>{let n=new Map(e);for(let e of n.keys())(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n}))}catch{g({title:`Error`,description:`Failed to rename "${t.name}"`,variant:`destructive`})}}function Oe(e){d(null),c.has(e)||(l(t=>new Set(t).add(e)),s(t=>{if(t.has(e))return t;let n=new Map(t);return n.set(e,0),n})),p({dirPath:e,type:`file`})}function ke(e){d(null),c.has(e)||(l(t=>new Set(t).add(e)),s(t=>{if(t.has(e))return t;let n=new Map(t);return n.set(e,0),n})),p({dirPath:e,type:`folder`})}async function Ae(t){if(!f)return;let{dirPath:n,type:r}=f;p(null);try{r===`file`?await k(e,n,t):await T(e,n,t),$(n),ue(),oe(!0)}catch{g({title:`Error`,description:`Failed to create ${r} "${t}"`,variant:`destructive`})}}function je(){p(null)}let Me=(0,U.useCallback)((e,t)=>{a?.(e,t)},[a]);function Ne(e){be(e),e.type===`file`&&n(e)}let Pe=f?.dirPath===``?(0,W.jsx)(he,{defaultValue:``,level:0,basePadding:f.type===`folder`?10:22,icon:f.type===`folder`?(0,W.jsx)(i,{className:`h-4 w-4 flex-shrink-0`}):(0,W.jsx)(r,{className:`h-4 w-4 flex-shrink-0 text-muted-foreground`}),onCommit:Ae,onCancel:je}):null;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(S,{open:h!==null,onOpenChange:e=>!e&&j(null),children:(0,W.jsxs)(y,{children:[(0,W.jsx)(v,{children:`Move to Trash`}),(0,W.jsxs)(_,{children:[`Move “`,h?.name,`” to trash?`]}),(0,W.jsxs)(`div`,{className:`flex gap-3 justify-end`,children:[(0,W.jsx)(x,{children:`Cancel`}),(0,W.jsx)(b,{onClick:()=>void Te(),children:`Move to Trash`})]})]})}),(0,W.jsx)(`div`,{className:`border-b border-border px-2 py-2`,children:(0,W.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,W.jsx)(de,{items:F,isReady:R,onRequestIndex:ce,onOpenChange:se,onSelect:e=>Ne(e)},X)})})}),(0,W.jsxs)(ne,{children:[(0,W.jsx)(L,{asChild:!0,disabled:ee,children:(0,W.jsx)(`div`,{className:`py-2 min-h-full`,children:(0,W.jsx)(re,{fallbackTitle:`Failed to load files`,onRetry:()=>$(``),children:(0,W.jsx)(U.Suspense,{fallback:(0,W.jsx)(m,{}),children:(0,W.jsx)(pe,{threadId:e,dirPath:``,version:Q(``),children:r=>(0,W.jsxs)(W.Fragment,{children:[Pe,r.map(r=>(0,W.jsx)(ve,{node:r,level:0,threadId:e,selectedPath:t,expandedPaths:c,getDirVersion:Q,renamingPath:u,newItemIn:f,onToggleFolder:xe,onSelectNode:n,onStartRename:Ee,onCommitRename:De,onCancelRename:()=>d(null),onDelete:Se,onOpen:Ce,onCopyReference:we,onNewFile:Oe,onNewFolder:ke,onCommitNewItem:Ae,onCancelNewItem:je,dropTargetPath:M,onFolderDropTargetChange:P,onFilesDrop:Me},r.path))]})})})})})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(B,{onSelect:()=>Oe(``),children:`New File...`}),(0,W.jsx)(B,{onSelect:()=>ke(``),children:`New Folder...`})]})]})]})}export{be as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/commit-dialog-CQH8QaWp.js","assets/index-cAZJlfDA.js","assets/rolldown-runtime-aKtaBQYM.js","assets/monaco-D1hpqXQ0.js","assets/monaco-BQve5vfS.css","assets/api-DkhEo8tW.js","assets/onboarding-Dy7KG3M5.js","assets/interactive-WtOIgeV4.js","assets/alert-dialog-BpJafkQ6.js","assets/react-vendor-DgnPMVt4.js","assets/use-toast-BFQ85Ly5.js","assets/chat-dock-context-4ZMIlxAn.js","assets/store-CSyJjyNs.js","assets/explorer-tab-context-8bs_tiCO.js","assets/main-tab-context-DHeKIUsf.js","assets/use-suspense-resource-rX-GqyWi.js","assets/local-tool-blocks-DlqmJ7__.js","assets/ndjson-stream-DeGpE5o5.js","assets/thread-tool-blocks-BfowiaTH.js","assets/utils-Rlf65JHq.js","assets/index-3N_2bBI0.css","assets/pull-request-dialog-CX10DwW3.js","assets/create-repo-dialog-CVYlw8JI.js","assets/git-history-dialog-De7D-B_f.js","assets/push-before-pr-dialog-CMGZ4nuF.js","assets/pull-with-changes-dialog-BIkrgGiK.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Ci as t,Ct as n,Fr as r,G as i,Jn as a,Ot as o,Qt as s,Ti as c,_ as l,d as u,dn as d,ei as f,en as p,i as m,jt as h,kt as g,mt as _,wi as v,wn as y,xn as b}from"./interactive-WtOIgeV4.js";import{$i as x,Ct as S,Fr as C,Gi as w,Ki as T,Mr as E,Oi as D,St as O,Tt as ee,Yi as k,Zi as A,Zn as j,ea as M,f as te,fr as N,ia as P,na as ne,oa as F,qi as I,ra as re,ta as L,wo as ie,wt as R}from"./onboarding-Dy7KG3M5.js";import{l as z}from"./monaco-D1hpqXQ0.js";import{n as ae,q as B,r as oe}from"./store-CSyJjyNs.js";import{t as V}from"./use-toast-BFQ85Ly5.js";import{At as se,Ct as ce,Dt as le,F as ue,I as de,J as fe,L as H,Mt as pe,Ot as U,P as me,R as he,Tt as ge,a as _e,jt as ve,o as ye,s as be}from"./index-cAZJlfDA.js";var xe=v(),W=e(c(),1),G=t();function K(e){return!e.hasChanges&&e.defaultBranchBehind>0}function Se(e){return e.prExists&&e.prState===`OPEN`&&!e.hasChanges&&!e.hasUnpushedCommits}function q(e){return e.hasUnpushedCommits&&e.prExists}function Ce(e,t){return t?`Creating PR`:e.hasChanges?`Commit`:q(e)?`Update PR`:Se(e)?`Open PR`:e.commitsAheadOfDefault&&!e.prExists&&!e.hasChanges?`Create PR`:K(e)?`Sync`:`Commit`}function we(e,t,n=!1){return t||n||e.hasChanges||q(e)||Se(e)||e.commitsAheadOfDefault&&!e.prExists&&!e.hasChanges||!e.hasChanges&&!e.hasUnpushedCommits&&!K(e)?null:K(e)?(0,G.jsx)(y,{className:`h-3.5 w-3.5`}):(0,G.jsx)(g,{className:`h-3.5 w-3.5`})}function J(e){if(e.hasChanges)return e.changedFilesCount>0?`Commit ${e.changedFilesCount} changed file${e.changedFilesCount===1?``:`s`}`:`No changes to commit`;if(q(e))return`Update pull request with unpushed commits`;if(Se(e))return`View pull request in GitHub`;if(e.commitsAheadOfDefault&&!e.prExists&&!e.hasChanges)return`Create pull request for committed changes`;if(K(e)){let t=e.defaultBranch??`main`,n=`${e.defaultBranchBehind} commit${e.defaultBranchBehind===1?``:`s`} behind origin/${t}`,r=e.defaultBranchAhead>0?`, ${e.defaultBranchAhead} commit${e.defaultBranchAhead===1?``:`s`} ahead`:``;return e.currentBranch===e.defaultBranch?`Your branch is ${n}${r}. Click to pull the latest changes.`:`Your branch "${e.currentBranch}" is ${n}${r}. Click to rebase onto the latest ${t}.`}return`No actions available`}function Te(e,t,n=!1){return t||n?!0:Se(e)||e.commitsAheadOfDefault&&!e.prExists&&!e.hasChanges||K(e)?!1:!e.hasChanges&&!e.hasUnpushedCommits}function Ee(e){return e.hasChanges||Se(e)||q(e)||K(e)||e.commitsAheadOfDefault&&!e.prExists&&!e.hasChanges}function Y(e){let t=(0,xe.c)(104),{branchStatus:a,remoteUrl:c,hasRemoteBranch:f,hasUnpushedCommits:h,canCreateRepo:v,repoUrl:x,isRefreshing:C,isCreatingPR:w,hasChanges:T,commitsAheadOfDefault:E,prExists:D,defaultBranch:k,defaultBranchAhead:A,defaultBranchBehind:j,gitUser:M,isDirectCommitMode:te,autoGenerateCommitMessage:N,isLoading:P,isLoadingHistory:ne,isQuickCommitting:F,onFetch:I,onPull:re,onPush:L,onOpenHistory:z,onCreatePR:ae,onCreateRepo:B,onViewInGitHub:oe,onQuickCommit:V,onSyncWithDefault:ce,onOpenChange:ue,open:de,layout:fe}=e,H=w===void 0?!1:w,me=fe===void 0?`bar`:fe,_e=!!k&&!!c&&j>0,ye=!T&&!P,be;t[0]!==H||t[1]!==C?(be=H||C?(0,G.jsx)(_,{className:`h-4 w-4 shrink-0 animate-spin`}):(0,G.jsx)(d,{className:`h-4 w-4 shrink-0`}),t[0]=H,t[1]=C,t[2]=be):be=t[2];let W=be,K;t[3]!==H||t[4]!==P||t[5]!==C||t[6]!==me||t[7]!==W?(K=(0,G.jsx)(pe,{asChild:!0,children:me===`sidebar`?(0,G.jsx)(ie,{variant:`ghost`,size:`icon-sm`,className:`shrink-0 text-muted-foreground`,disabled:P||H,"aria-label":`Git Ops`,children:W}):me===`bar`?(0,G.jsx)(`button`,{type:`button`,className:`flex h-full shrink-0 items-center rounded-r-full pr-3 pl-0.5 disabled:opacity-50`,disabled:P||H,"aria-label":`Git Ops`,children:H||C?(0,G.jsx)(_,{className:m(he,`animate-spin`)}):(0,G.jsx)(d,{className:he})}):(0,G.jsxs)(ie,{variant:`outline`,size:`sm`,className:`h-8 w-full justify-start gap-2 rounded-md px-1`,disabled:P||H,children:[(0,G.jsx)(`span`,{children:`Git Ops`}),H||C?(0,G.jsx)(_,{className:`h-3.5 w-3.5 animate-spin`}):(0,G.jsx)(d,{className:`h-3.5 w-3.5`})]})}),t[3]=H,t[4]=P,t[5]=C,t[6]=me,t[7]=W,t[8]=K):K=t[8];let Se=me===`sidebar`?`start`:`end`,q;t[9]!==a||t[10]!==c?(q=a===`Behind`&&(0,G.jsxs)(`div`,{className:m(r.compact,`px-2 py-1 text-amber-600`),children:[`Branch is behind `,c?`origin`:`remote`]}),t[9]=a,t[10]=c,t[11]=q):q=t[11];let Ce;t[12]===M?Ce=t[13]:(Ce=M&&(0,G.jsxs)(`div`,{className:m(r.compact,`px-2 py-1 text-muted-foreground`),children:[(0,G.jsx)(`span`,{className:`font-medium`,children:`User:`}),` `,M]}),t[12]=M,t[13]=Ce);let we;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,G.jsx)(se,{}),t[14]=we):we=t[14];let J;t[15]!==ye||t[16]!==k||t[17]!==A||t[18]!==j||t[19]!==T||t[20]!==ce||t[21]!==_e?(J=_e&&(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsxs)(U,{onClick:()=>{ye&&ce()},className:ye?``:`opacity-50 cursor-not-allowed`,children:[(0,G.jsx)(i,{className:`h-3.5 w-3.5 mr-2`}),`Sync with `,k,(0,G.jsxs)(`span`,{className:`ml-auto flex items-center gap-2 pl-3 text-xs tabular-nums text-muted-foreground`,children:[A>0&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,G.jsx)(b,{className:`h-3 w-3`}),A]}),j>0&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,G.jsx)(y,{className:`h-3 w-3`}),j]})]})]})}),(0,G.jsx)(S,{side:`right`,children:T?`Commit or stash changes before syncing with the default branch`:`Pull latest changes from origin/${k} onto your current branch`})]})}),t[15]=ye,t[16]=k,t[17]=A,t[18]=j,t[19]=T,t[20]=ce,t[21]=_e,t[22]=J):J=t[22];let Te;t[23]!==N||t[24]!==T||t[25]!==P||t[26]!==F||t[27]!==V?(Te=T&&N&&(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsxs)(U,{onClick:V,disabled:P||F,children:[F?(0,G.jsx)(_,{className:`h-3.5 w-3.5 mr-2 animate-spin`}):(0,G.jsx)(u,{className:`h-3.5 w-3.5 mr-2`}),`Quick Commit`,(0,G.jsx)(ve,{children:`⌘⇧C`})]})}),(0,G.jsx)(S,{side:`right`,children:`Generate the commit message and commit`})]})}),t[23]=N,t[24]=T,t[25]=P,t[26]=F,t[27]=V,t[28]=Te):Te=t[28];let Ee;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,G.jsx)(p,{className:`h-3.5 w-3.5 mr-2`}),t[29]=Ee):Ee=t[29];let Y;t[30]!==P||t[31]!==I?(Y=(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsxs)(U,{onClick:I,disabled:P,children:[Ee,`Fetch`]})}),t[30]=P,t[31]=I,t[32]=Y):Y=t[32];let X;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,G.jsx)(S,{side:`right`,children:`Download latest information from remote without merging changes`}),t[33]=X):X=t[33];let De;t[34]===Y?De=t[35]:(De=(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[Y,X]})}),t[34]=Y,t[35]=De);let Z;t[36]!==f||t[37]!==P||t[38]!==re?(Z=()=>{f&&!P&&re()},t[36]=f,t[37]=P,t[38]=re,t[39]=Z):Z=t[39];let Oe=!f||P?`opacity-50 cursor-not-allowed`:``,ke;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,G.jsx)(y,{className:`h-3.5 w-3.5 mr-2`}),t[40]=ke):ke=t[40];let Ae;t[41]!==Z||t[42]!==Oe?(Ae=(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsxs)(U,{onClick:Z,className:Oe,children:[ke,`Pull`]})}),t[41]=Z,t[42]=Oe,t[43]=Ae):Ae=t[43];let je=f?`Pull latest changes from remote`:`No remote branch to pull from`,Me;t[44]===je?Me=t[45]:(Me=(0,G.jsx)(S,{side:`right`,children:je}),t[44]=je,t[45]=Me);let Ne;t[46]!==Ae||t[47]!==Me?(Ne=(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[Ae,Me]})}),t[46]=Ae,t[47]=Me,t[48]=Ne):Ne=t[48];let Pe;t[49]!==f||t[50]!==P||t[51]!==L?(Pe=!f&&(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsxs)(U,{onClick:L,disabled:P,children:[(0,G.jsx)(l,{className:`h-3.5 w-3.5 mr-2`}),`Push Branch to Remote`]})}),(0,G.jsx)(S,{side:`right`,children:`Create remote branch and push local commits`})]})}),t[49]=f,t[50]=P,t[51]=L,t[52]=Pe):Pe=t[52];let Fe;t[53]!==h||t[54]!==P||t[55]!==L?(Fe=()=>{h&&!P&&L()},t[53]=h,t[54]=P,t[55]=L,t[56]=Fe):Fe=t[56];let Q=!h||P?`opacity-50 cursor-not-allowed`:``,Ie;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,G.jsx)(l,{className:`h-3.5 w-3.5 mr-2`}),t[57]=Ie):Ie=t[57];let Le;t[58]!==Fe||t[59]!==Q?(Le=(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsxs)(U,{onClick:Fe,className:Q,children:[Ie,`Push Commits`]})}),t[58]=Fe,t[59]=Q,t[60]=Le):Le=t[60];let Re=h?P?`Push in progress...`:`Push your uncommitted commits to the remote branch`:`No commits to push - your branch is up to date with remote`,ze;t[61]===Re?ze=t[62]:(ze=(0,G.jsx)(S,{side:`right`,children:Re}),t[61]=Re,t[62]=ze);let $;t[63]!==Le||t[64]!==ze?($=(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[Le,ze]})}),t[63]=Le,t[64]=ze,t[65]=$):$=t[65];let Be=P||ne,Ve;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,G.jsx)(n,{className:`h-3.5 w-3.5 mr-2`}),t[66]=Ve):Ve=t[66];let He;t[67]!==z||t[68]!==Be?(He=(0,G.jsxs)(U,{onClick:z,disabled:Be,children:[Ve,`History`]}),t[67]=z,t[68]=Be,t[69]=He):He=t[69];let Ue;t[70]!==E||t[71]!==T||t[72]!==te||t[73]!==P||t[74]!==ae||t[75]!==D?(Ue=!te&&E&&!D&&!T&&(0,G.jsxs)(U,{onClick:ae,disabled:P,children:[(0,G.jsx)(g,{className:`h-3.5 w-3.5 mr-2`}),`Create Pull Request`,(0,G.jsx)(ve,{children:`⌘⇧P`})]}),t[70]=E,t[71]=T,t[72]=te,t[73]=P,t[74]=ae,t[75]=D,t[76]=Ue):Ue=t[76];let We;t[77]!==v||t[78]!==P||t[79]!==B?(We=v&&(0,G.jsxs)(U,{onClick:B,disabled:P,children:[(0,G.jsx)(o,{className:`h-3.5 w-3.5 mr-2`}),`Create Repo`]}),t[77]=v,t[78]=P,t[79]=B,t[80]=We):We=t[80];let Ge;t[81]!==P||t[82]!==oe||t[83]!==x?(Ge=x&&(0,G.jsxs)(U,{onClick:oe,disabled:P,children:[(0,G.jsx)(s,{className:`h-3.5 w-3.5 mr-2`}),`View in GitHub`,(0,G.jsx)(ve,{children:`⌘⇧G`})]}),t[81]=P,t[82]=oe,t[83]=x,t[84]=Ge):Ge=t[84];let Ke;t[85]!==Te||t[86]!==De||t[87]!==Ne||t[88]!==Pe||t[89]!==$||t[90]!==He||t[91]!==Ue||t[92]!==We||t[93]!==Ge||t[94]!==Se||t[95]!==q||t[96]!==Ce||t[97]!==J?(Ke=(0,G.jsxs)(le,{align:Se,children:[q,Ce,we,J,Te,De,Ne,Pe,$,He,Ue,We,Ge]}),t[85]=Te,t[86]=De,t[87]=Ne,t[88]=Pe,t[89]=$,t[90]=He,t[91]=Ue,t[92]=We,t[93]=Ge,t[94]=Se,t[95]=q,t[96]=Ce,t[97]=J,t[98]=Ke):Ke=t[98];let qe;return t[99]!==ue||t[100]!==de||t[101]!==Ke||t[102]!==K?(qe=(0,G.jsxs)(ge,{open:de,onOpenChange:ue,children:[K,Ke]}),t[99]=ue,t[100]=de,t[101]=Ke,t[102]=K,t[103]=qe):qe=t[103],qe}var X=(0,W.lazy)(()=>z(()=>import(`./commit-dialog-CQH8QaWp.js`).then(e=>({default:e.CommitDialog})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),De=(0,W.lazy)(()=>z(()=>import(`./pull-request-dialog-CX10DwW3.js`).then(e=>({default:e.PullRequestDialog})),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),Z=(0,W.lazy)(()=>z(()=>import(`./create-repo-dialog-CVYlw8JI.js`).then(e=>({default:e.CreateRepoDialog})),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),Oe=(0,W.lazy)(()=>z(()=>import(`./git-history-dialog-De7D-B_f.js`).then(e=>({default:e.GitHistoryDialog})),__vite__mapDeps([23,6,2,7]))),ke=(0,W.lazy)(()=>z(()=>import(`./push-before-pr-dialog-CMGZ4nuF.js`).then(e=>({default:e.PushBeforePRDialog})),__vite__mapDeps([24,6,2,7]))),Ae=(0,W.lazy)(()=>z(()=>import(`./pull-with-changes-dialog-BIkrgGiK.js`).then(e=>({default:e.PullWithChangesDialog})),__vite__mapDeps([25,6,2,7])));function je(){return null}function Me(e){let t=(0,xe.c)(67),{isLoading:n,currentBranch:r,commit:i,pullRequest:a,pushBeforePR:o,createRepo:s,history:c,pullWithChanges:l}=e,u;t[0]!==i.autoGenerate||t[1]!==i.isGenerating||t[2]!==i.isOpen||t[3]!==i.message||t[4]!==i.onAutoGenerateChange||t[5]!==i.onCommit||t[6]!==i.onGenerateMessage||t[7]!==i.onMessageChange||t[8]!==i.onOpenChange||t[9]!==r||t[10]!==n?(u=i.isOpen&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(je,{}),children:(0,G.jsx)(X,{open:i.isOpen,onOpenChange:i.onOpenChange,commitMessage:i.message,onCommitMessageChange:i.onMessageChange,autoGenerateCommitMessage:i.autoGenerate,onAutoGenerateChange:i.onAutoGenerateChange,isGeneratingMessage:i.isGenerating,isLoading:n,onGenerateMessage:i.onGenerateMessage,onCommit:i.onCommit,currentBranch:r})}),t[0]=i.autoGenerate,t[1]=i.isGenerating,t[2]=i.isOpen,t[3]=i.message,t[4]=i.onAutoGenerateChange,t[5]=i.onCommit,t[6]=i.onGenerateMessage,t[7]=i.onMessageChange,t[8]=i.onOpenChange,t[9]=r,t[10]=n,t[11]=u):u=t[11];let d;t[12]!==r||t[13]!==n||t[14]!==a.autoGenerate||t[15]!==a.createBranchAfterPR||t[16]!==a.description||t[17]!==a.isGeneratingInfo||t[18]!==a.isOpen||t[19]!==a.onAutoGenerateChange||t[20]!==a.onCreateBranchAfterPRChange||t[21]!==a.onCreatePR||t[22]!==a.onDescriptionChange||t[23]!==a.onGenerateInfo||t[24]!==a.onOpenChange||t[25]!==a.onTitleChange||t[26]!==a.title?(d=a.isOpen&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(je,{}),children:(0,G.jsx)(De,{open:a.isOpen,onOpenChange:a.onOpenChange,prTitle:a.title,onPrTitleChange:a.onTitleChange,prDescription:a.description,onPrDescriptionChange:a.onDescriptionChange,isGeneratingPRInfo:a.isGeneratingInfo,isLoading:n,onGeneratePRInfo:a.onGenerateInfo,onCreatePR:a.onCreatePR,currentBranch:r,autoGeneratePRInfo:a.autoGenerate,onAutoGeneratePRInfoChange:a.onAutoGenerateChange,createBranchAfterPR:a.createBranchAfterPR,onCreateBranchAfterPRChange:a.onCreateBranchAfterPRChange})}),t[12]=r,t[13]=n,t[14]=a.autoGenerate,t[15]=a.createBranchAfterPR,t[16]=a.description,t[17]=a.isGeneratingInfo,t[18]=a.isOpen,t[19]=a.onAutoGenerateChange,t[20]=a.onCreateBranchAfterPRChange,t[21]=a.onCreatePR,t[22]=a.onDescriptionChange,t[23]=a.onGenerateInfo,t[24]=a.onOpenChange,t[25]=a.onTitleChange,t[26]=a.title,t[27]=d):d=t[27];let f;t[28]!==n||t[29]!==o.isOpen||t[30]!==o.onCancel||t[31]!==o.onOpenChange||t[32]!==o.onPushAndCreatePR?(f=o.isOpen&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(je,{}),children:(0,G.jsx)(ke,{open:o.isOpen,onOpenChange:o.onOpenChange,isLoading:n,onPushAndCreatePR:o.onPushAndCreatePR,onCancel:o.onCancel})}),t[28]=n,t[29]=o.isOpen,t[30]=o.onCancel,t[31]=o.onOpenChange,t[32]=o.onPushAndCreatePR,t[33]=f):f=t[33];let p;t[34]!==s.description||t[35]!==s.isOpen||t[36]!==s.isPrivate||t[37]!==s.name||t[38]!==s.onCreateRepo||t[39]!==s.onDescriptionChange||t[40]!==s.onNameChange||t[41]!==s.onOpenChange||t[42]!==s.onPrivateChange||t[43]!==n?(p=s.isOpen&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(je,{}),children:(0,G.jsx)(Z,{open:s.isOpen,onOpenChange:s.onOpenChange,repoName:s.name,onRepoNameChange:s.onNameChange,repoDescription:s.description,onRepoDescriptionChange:s.onDescriptionChange,isPrivateRepo:s.isPrivate,onPrivateRepoChange:s.onPrivateChange,isLoading:n,onCreateRepo:s.onCreateRepo})}),t[34]=s.description,t[35]=s.isOpen,t[36]=s.isPrivate,t[37]=s.name,t[38]=s.onCreateRepo,t[39]=s.onDescriptionChange,t[40]=s.onNameChange,t[41]=s.onOpenChange,t[42]=s.onPrivateChange,t[43]=n,t[44]=p):p=t[44];let m;t[45]!==r||t[46]!==c.commits||t[47]!==c.displayedCommits||t[48]!==c.isLoadingMore||t[49]!==c.isOpen||t[50]!==c.onOpenChange||t[51]!==c.onScroll?(m=c.isOpen&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(je,{}),children:(0,G.jsx)(Oe,{open:c.isOpen,onOpenChange:c.onOpenChange,commits:c.commits,displayedCommits:c.displayedCommits,isLoadingMore:c.isLoadingMore,onScroll:c.onScroll,currentBranch:r})}),t[45]=r,t[46]=c.commits,t[47]=c.displayedCommits,t[48]=c.isLoadingMore,t[49]=c.isOpen,t[50]=c.onOpenChange,t[51]=c.onScroll,t[52]=m):m=t[52];let h;t[53]!==n||t[54]!==l.isOpen||t[55]!==l.onCancel||t[56]!==l.onCommitFirst||t[57]!==l.onOpenChange||t[58]!==l.onStashAndPull?(h=l.isOpen&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(je,{}),children:(0,G.jsx)(Ae,{open:l.isOpen,onOpenChange:l.onOpenChange,onCommitFirst:l.onCommitFirst,onStashAndPull:l.onStashAndPull,onCancel:l.onCancel,isLoading:n})}),t[53]=n,t[54]=l.isOpen,t[55]=l.onCancel,t[56]=l.onCommitFirst,t[57]=l.onOpenChange,t[58]=l.onStashAndPull,t[59]=h):h=t[59];let g;return t[60]!==u||t[61]!==d||t[62]!==f||t[63]!==p||t[64]!==m||t[65]!==h?(g=(0,G.jsxs)(G.Fragment,{children:[u,d,f,p,m,h]}),t[60]=u,t[61]=d,t[62]=f,t[63]=p,t[64]=m,t[65]=h,t[66]=g):g=t[66],g}function Ne(e){let t=e.split(`/`);return t.length>=2?{provider:t[0],model:t.slice(1).join(`/`)}:{provider:void 0,model:e}}var Pe=a(`app.use-ai-generation.hook`);function Fe(e,t,n){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(!1),s=()=>n?.id?n.provider?{provider:n.provider,model:n.id}:Ne(n.id):{provider:void 0,model:void 0};return{isGeneratingMessage:r,isGeneratingPRInfo:a,generateCommitMessageWithAI:(0,W.useCallback)(async()=>{if(!e)return null;try{i(!0);let{provider:t,model:n}=s();return await T(e,n,t)}catch(e){return Pe.error(`Failed to generate commit message:`,e),V({title:`Error`,description:e instanceof Error?e.message:`Failed to generate commit message`,variant:`destructive`}),null}finally{i(!1)}},[e,n]),generatePRInfoWithAI:(0,W.useCallback)(async()=>{if(!e)return null;try{o(!0);let{provider:t,model:n}=s();return await I(e,n,t)}catch(e){return Pe.error(`Failed to generate PR info:`,e),V({title:`Error`,description:e instanceof Error?e.message:`Failed to generate PR info`,variant:`destructive`}),null}finally{o(!1)}},[e,n])}}function Q(e){return e?!0:(V({title:`Error`,description:`No thread selected`,variant:`destructive`}),!1)}async function Ie(e,t,n,r){r&&(await D(e,{title:r}),n({type:B.UpdateThreadTitle,projectId:t,threadId:e,title:r}))}var Le=2e3,Re=6;function ze(e,t){let n=0;e.current!==null&&clearInterval(e.current),e.current=setInterval(async()=>{if(n++,n>=Re){e.current!==null&&(clearInterval(e.current),e.current=null);return}await t(!0)},Le)}var $=a(`app.git-ops-button.ui`),Be=10;function Ve(e){let{projectId:t,threadId:n,projectName:r,dispatch:i,aiGeneration:a,unifiedGitStatus:o}=e,[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(!1),[d,f]=(0,W.useState)(!1),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(``),[_,v]=(0,W.useState)(``),[y,b]=(0,W.useState)(``),[S,T]=(0,W.useState)(!1),[D,O]=(0,W.useState)(null),ee=(0,W.useRef)(!1),te=(0,W.useRef)(!1),I=(0,W.useRef)(_),ie=(0,W.useRef)(y);I.current=_,ie.current=y;let[R,z]=(0,W.useState)(!1),[ae,oe]=(0,W.useState)([]),[se,ce]=(0,W.useState)(!1),[le,ue]=(0,W.useState)([]),[de,fe]=(0,W.useState)(!1),[H,pe]=(0,W.useState)(!1),[U,me]=(0,W.useState)(``),[he,ge]=(0,W.useState)(``),[ve,xe]=(0,W.useState)(``),[G,K]=(0,W.useState)(!1),[Se,q]=(0,W.useState)(!1),[Ce,we]=(0,W.useState)(!1),[J,Te]=(0,W.useState)(!1),Ee=(0,W.useRef)(!1),Y=(0,W.useRef)(null);(0,W.useEffect)(()=>()=>{Y.current!==null&&(clearInterval(Y.current),Y.current=null)},[]);async function X(){E();let e=await N();i({type:B.SetProjects,projects:e.projects,cloneRootPath:e.cloneRootPath})}async function De(){if(Z.createBranchAfterPR)try{V({title:`New branch created`,description:`Created new branch "${(await M(n)).branchName}" from the latest default branch`}),await o.fetchUnifiedStatus(!0),X()}catch(e){$.error(`Failed to create new branch after PR:`,e),V({title:`Failed to create new branch`,description:e instanceof Error?e.message:`Unknown error occurred`,variant:`destructive`})}}let[Z,Oe]=(0,W.useState)(()=>ye());(0,W.useEffect)(()=>{H&&r&&!U&&me(r)},[H,r,U]),(0,W.useEffect)(()=>{be(Z)},[Z]);function ke(){G||(K(!0),j().then(e=>xe(e)).catch(()=>{}))}function Ae(e){Te(e),e&&(ke(),o.fetchUnifiedStatus(!0))}(0,W.useEffect)(()=>{l&&o.prExists&&o.prState===`OPEN`&&u(!1)},[o.prExists,o.prState,l]),(0,W.useEffect)(()=>{if(!l)return;let e=setTimeout(()=>{u(!1)},15e3);return()=>clearTimeout(e)},[l]),(0,W.useEffect)(()=>{let e=o.prExists&&o.prState===`OPEN`&&!o.hasChanges&&!o.hasUnpushedCommits;e&&!Ee.current&&X(),Ee.current=e},[o.hasChanges,o.hasUnpushedCommits,o.prExists,o.prState]);async function je(){if(h.trim()&&Q(n))try{c(!0),await x(n,h),g(``),f(!1),await o.fetchUnifiedStatus(!0),X(),V({title:`Changes committed successfully`,description:`Your changes have been committed to '${o.currentBranch}'.`}),Ce&&(we(!1),await He())}catch(e){$.error(`Failed to commit:`,e),V({title:`Commit failed`,description:e instanceof Error?e.message:`Failed to commit changes`,variant:`destructive`})}finally{c(!1)}}async function Me(){if(!Q(n))return;let e=o.prUrl;if(!e)try{e=(await A(n)).url}catch(e){$.error(`Failed to fetch pull request URL:`,e),V({title:`Could not open pull request`,description:e instanceof Error?e.message:`Failed to fetch pull request URL`,variant:`destructive`});return}if(!e){V({title:`Could not open pull request`,description:`Pull request URL is unavailable. Try refreshing git status.`,variant:`destructive`});return}try{await C(e)}catch(e){$.error(`Failed to open pull request:`,e),V({title:`Could not open pull request`,description:e instanceof Error?e.message:`Failed to open URL in browser`,variant:`destructive`})}}async function Ne(){if(o.hasChanges){f(!0);return}if(o.hasUnpushedCommits&&o.prExists){let e=o.prState;try{e=(await A(n)).state??e}catch(e){$.warn(`Could not refresh pull request state before update:`,e)}if(e===`MERGED`){_e();return}await Re();return}if(o.prExists&&o.prState===`OPEN`&&!o.hasChanges&&!o.hasUnpushedCommits){await Me();return}if(o.commitsAheadOfDefault&&!o.prExists&&!o.hasChanges){m(!0);return}if(o.defaultBranchBehind>0){await Ge();return}}async function Pe(){let e=await a.generateCommitMessageWithAI();e&&g(e)}async function Fe(){if(Q(n))try{c(!0);let e=await a.generateCommitMessageWithAI();if(!e){V({title:`Quick Commit failed`,description:`Could not generate commit message`,variant:`destructive`});return}await x(n,e),await o.fetchUnifiedStatus(!0),X(),V({title:`Changes committed successfully`,description:`Committed: ${e}`})}catch(e){$.error(`Quick commit failed:`,e),V({title:`Quick Commit failed`,description:e instanceof Error?e.message:`Failed to commit changes`,variant:`destructive`})}finally{c(!1)}}async function Le(){if(Q(n))try{c(!0),await ne(n),await o.fetchUnifiedStatus()}catch(e){$.error(`Failed to fetch:`,e)}finally{c(!1)}}async function Re(){if(Q(n))try{c(!0),await P(n),await o.fetchUnifiedStatus(!0),X(),o.hasRemoteBranch?V({title:`Branch pushed successfully`,description:`Your branch '${o.currentBranch}' has been pushed to the remote.`}):V({title:`Push completed`,description:`Changes have been pushed successfully.`})}catch(e){$.error(`Failed to push:`,e),V({title:`Push failed`,description:e instanceof Error?e.message:`Failed to push to remote`,variant:`destructive`})}finally{c(!1)}}async function Ve(){if(Q(n)){if(o.hasChanges){q(!0);return}await He()}}async function He(){try{c(!0),await re(n),await o.fetchUnifiedStatus(!0),X(),V({title:`Pull successful`,description:`Latest changes have been pulled from remote.`})}catch(e){$.error(`Failed to pull:`,e),V({title:`Pull failed`,description:e instanceof Error?e.message:`Failed to pull from remote`,variant:`destructive`})}finally{c(!1)}}function Ue(){q(!1),we(!0),f(!0)}async function We(){q(!1),await He()}async function Ge(){if(Q(n))try{c(!0),await F(n),await o.fetchUnifiedStatus(!0),X(),V({title:`Branch synced successfully`,description:`Your branch '${o.currentBranch}' has been synced with the latest changes`})}catch(e){$.error(`[sync] ✗ Failed to sync branch:`,e),V({title:`Sync failed`,description:e instanceof Error?e.message:`Failed to sync with default branch`,variant:`destructive`})}finally{c(!1)}}async function Ke(){if(Q(n))try{c(!0),u(!0);let e=await L(n,_,y);await Ie(n,t,i,e.title??_),e.prUrl&&await C(e.prUrl),v(``),b(``),m(!1),await o.fetchUnifiedStatus(!0),X(),await De(),ze(Y,o.fetchUnifiedStatus)}catch(e){$.error(`Failed to create PR:`,e);let t=e instanceof Error?e.message:`Failed to create PR`;t.includes(`push the current branch`)||t.includes(`--head flag`)?(m(!1),Ye({title:_,description:y})):(u(!1),V({title:`Create PR Failed`,description:t,variant:`destructive`}))}finally{c(!1)}}async function qe(){if(Q(n))try{c(!0);let e=await w(n,U,he,Z.privateRepositoryDefault);e.repoUrl&&setTimeout(()=>{C(e.repoUrl)},3e3),me(``),ge(``),pe(!1),await o.fetchUnifiedStatus(),X()}catch(e){$.error(`Failed to create repo:`,e)}finally{c(!1)}}async function Je(){let e=await a.generatePRInfoWithAI();e&&(v(e.title),b(e.description),V({title:`Success`,description:`PR title and description generated`}))}async function Ye(e){let r=e??D;if(!(!n||!r))try{c(!0),u(!0);try{await P(n)}catch(e){let t=e?.message??``;if(t.includes(`non-fast-forward`)||t.includes(`Updates were rejected because the tip of your current branch is behind`)){V({title:`Syncing branch before push`,description:`Your branch is behind remote. Pulling latest changes first...`});try{await F(n),await P(n)}catch{throw e}}else throw e}let e=await L(n,r.title,r.description);await Ie(n,t,i,e.title??r.title),e.prUrl&&await C(e.prUrl),v(``),b(``),O(null),T(!1),await o.fetchUnifiedStatus(!0),X(),await De(),ze(Y,o.fetchUnifiedStatus)}catch(e){$.error(`Failed to push and create PR:`,e);let t=e instanceof Error?e.message:`Failed to push and create PR`;u(!1),V({title:`Push & Create PR Failed`,description:t,variant:`destructive`})}finally{c(!1)}}async function Xe(){if(Q(n))try{ce(!0);let e=await k(n,100);oe(e),ue(e.slice(0,Be)),z(!0)}catch(e){$.error(`Failed to fetch git history:`,e)}finally{ce(!1)}}function Ze(){de||(fe(!0),setTimeout(()=>{let e=le.length+Be;ue(ae.slice(0,e)),fe(!1)},300))}function Qe(e){let t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<100&&le.length<ae.length&&!de&&Ze()}function $e(){o.repoUrl&&C(o.repoUrl)}function et(){T(!1),O(null)}return{isLoading:s,isCreatingPR:l,isCommitDialogOpen:d,setIsCommitDialogOpen:f,isPRDialogOpen:p,setIsPRDialogOpen:m,commitMessage:h,setCommitMessage:g,prTitle:_,setPrTitle:v,prDescription:y,setPrDescription:b,isPushBeforePRDialogOpen:S,setIsPushBeforePRDialogOpen:T,prGenerationRef:ee,commitGenerationRef:te,prTitleRef:I,prDescriptionRef:ie,isHistoryDialogOpen:R,setIsHistoryDialogOpen:z,commits:ae,displayedCommits:le,isLoadingHistory:se,isLoadingMore:de,isRepoDialogOpen:H,setIsRepoDialogOpen:pe,repoName:U,setRepoName:me,repoDescription:he,setRepoDescription:ge,gitUser:ve,isPullWithChangesDialogOpen:Se,setIsPullWithChangesDialogOpen:q,isGitOpsMenuOpen:J,userPrefs:Z,setUserPrefsState:Oe,handleGitOpsMenuOpenChange:Ae,handleCommit:je,handleOpenPullRequest:Me,handleMainButtonClick:Ne,handleGenerateCommitMessage:Pe,handleQuickCommit:Fe,handleFetch:Le,handlePush:Re,handlePull:Ve,handleSyncBranch:Ge,handleCreatePR:Ke,handleCreateRepo:qe,handleGeneratePRInfo:Je,handlePushAndCreatePR:Ye,handleOpenHistory:Xe,handleScroll:Qe,handleViewInGitHub:$e,handleCancelPushBeforePR:et,handleCommitFirstAndPull:Ue,handleStashAndPull:We}}function He(e){let t=(0,xe.c)(29),{threadId:n,aiGeneration:r,isCommitDialogOpen:i,commitMessage:a,setCommitMessage:o,autoGenerateCommitMessage:s,commitGenerationRef:c,isPRDialogOpen:l,prTitleRef:u,prDescriptionRef:d,setPrTitle:f,setPrDescription:p,autoGeneratePRInfo:m,prGenerationRef:h}=e,g;t[0]!==r||t[1]!==s||t[2]!==c||t[3]!==a||t[4]!==i||t[5]!==o||t[6]!==n?(g=()=>{if(!i){c.current=!1;return}i&&s&&!a.trim()&&n&&!c.current&&(c.current=!0,(async function(){let e=await r.generateCommitMessageWithAI();e&&o(e)})())},t[0]=r,t[1]=s,t[2]=c,t[3]=a,t[4]=i,t[5]=o,t[6]=n,t[7]=g):g=t[7];let _;t[8]!==r.generateCommitMessageWithAI||t[9]!==s||t[10]!==a||t[11]!==i||t[12]!==n?(_=[i,s,n,r.generateCommitMessageWithAI,a],t[8]=r.generateCommitMessageWithAI,t[9]=s,t[10]=a,t[11]=i,t[12]=n,t[13]=_):_=t[13],(0,W.useEffect)(g,_);let v;t[14]!==r||t[15]!==m||t[16]!==l||t[17]!==d||t[18]!==h||t[19]!==u||t[20]!==p||t[21]!==f||t[22]!==n?(v=()=>{if(!l){h.current=!1;return}l&&m&&!u.current.trim()&&!d.current.trim()&&n&&!h.current&&(h.current=!0,(async function(){let e=await r.generatePRInfoWithAI();e&&(f(e.title),p(e.description))})())},t[14]=r,t[15]=m,t[16]=l,t[17]=d,t[18]=h,t[19]=u,t[20]=p,t[21]=f,t[22]=n,t[23]=v):v=t[23];let y;t[24]!==r.generatePRInfoWithAI||t[25]!==m||t[26]!==l||t[27]!==n?(y=[l,m,n,r.generatePRInfoWithAI],t[24]=r.generatePRInfoWithAI,t[25]=m,t[26]=l,t[27]=n,t[28]=y):y=t[28],(0,W.useEffect)(v,y)}function Ue(e){let{unifiedGitStatus:t,autoGenerateCommitMessage:n,isLoading:r,isCreatingPR:i,isDirectCommitMode:a,onQuickCommit:o,onCreatePR:s,onViewInGitHub:c,onOpenGitOpsMenu:l}=e,u=(0,W.useRef)(o),d=(0,W.useRef)(s),f=(0,W.useRef)(c),p=(0,W.useRef)(l);u.current=o,d.current=s,f.current=c,p.current=l,(0,W.useEffect)(()=>{function e(e){let o=e.key.toLowerCase();if((e.metaKey||e.ctrlKey)&&e.shiftKey&&!e.altKey){if(o===`c`){t.hasChanges&&n&&!r&&(e.preventDefault(),u.current());return}if(o===`p`){t.commitsAheadOfDefault&&!t.prExists&&!t.hasChanges&&!r&&!a&&(e.preventDefault(),d.current());return}if(o===`g`){t.repoUrl&&!r&&(e.preventDefault(),f.current());return}o===`b`&&!r&&!i&&(e.preventDefault(),p.current())}}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t.commitsAheadOfDefault,t.hasChanges,t.prExists,t.repoUrl,n,r,i,a])}function We(e){let t=(0,xe.c)(173),{projectId:n,threadId:i,layout:a}=e,o=a===void 0?`bar`:a,s=ae(),c=fe(),l;t[0]===i?l=t[1]:(l=e=>e.projectModelSelections[i],t[0]=i,t[1]=l);let u=oe(l),d;t[2]===n?d=t[3]:(d=e=>e.projects.find(e=>e.projectId===n),t[2]=n,t[3]=d);let p=oe(d),g=ce(),_=Fe(i,n,u),v=p?.commitMethod===f.Direct,y=p?.name,b;t[4]!==_||t[5]!==s||t[6]!==n||t[7]!==y||t[8]!==i||t[9]!==g?(b={projectId:n,threadId:i,projectName:y,dispatch:s,aiGeneration:_,unifiedGitStatus:g},t[4]=_,t[5]=s,t[6]=n,t[7]=y,t[8]=i,t[9]=g,t[10]=b):b=t[10];let x=Ve(b),C;t[11]!==x.commitGenerationRef||t[12]!==x.commitMessage||t[13]!==x.isCommitDialogOpen||t[14]!==x.isPRDialogOpen||t[15]!==x.prDescriptionRef||t[16]!==x.prGenerationRef||t[17]!==x.prTitleRef||t[18]!==x.setCommitMessage||t[19]!==x.setPrDescription||t[20]!==x.setPrTitle||t[21]!==x.userPrefs.autoGenerateCommitMessage||t[22]!==x.userPrefs.autoGeneratePRInfo||t[23]!==_||t[24]!==i?(C={threadId:i,aiGeneration:_,isCommitDialogOpen:x.isCommitDialogOpen,commitMessage:x.commitMessage,setCommitMessage:x.setCommitMessage,autoGenerateCommitMessage:x.userPrefs.autoGenerateCommitMessage,commitGenerationRef:x.commitGenerationRef,isPRDialogOpen:x.isPRDialogOpen,prTitleRef:x.prTitleRef,prDescriptionRef:x.prDescriptionRef,setPrTitle:x.setPrTitle,setPrDescription:x.setPrDescription,autoGeneratePRInfo:x.userPrefs.autoGeneratePRInfo,prGenerationRef:x.prGenerationRef},t[11]=x.commitGenerationRef,t[12]=x.commitMessage,t[13]=x.isCommitDialogOpen,t[14]=x.isPRDialogOpen,t[15]=x.prDescriptionRef,t[16]=x.prGenerationRef,t[17]=x.prTitleRef,t[18]=x.setCommitMessage,t[19]=x.setPrDescription,t[20]=x.setPrTitle,t[21]=x.userPrefs.autoGenerateCommitMessage,t[22]=x.userPrefs.autoGeneratePRInfo,t[23]=_,t[24]=i,t[25]=C):C=t[25],He(C);let w;t[26]===x?w=t[27]:(w=()=>x.setIsPRDialogOpen(!0),t[26]=x,t[27]=w);let T;t[28]===x?T=t[29]:(T=()=>{x.isLoading||x.isCreatingPR||x.handleGitOpsMenuOpenChange(!0)},t[28]=x,t[29]=T);let E;t[30]!==x.handleQuickCommit||t[31]!==x.handleViewInGitHub||t[32]!==x.isCreatingPR||t[33]!==x.isLoading||t[34]!==x.userPrefs.autoGenerateCommitMessage||t[35]!==v||t[36]!==w||t[37]!==T||t[38]!==g?(E={unifiedGitStatus:g,autoGenerateCommitMessage:x.userPrefs.autoGenerateCommitMessage,isLoading:x.isLoading,isCreatingPR:x.isCreatingPR,isDirectCommitMode:v,onQuickCommit:x.handleQuickCommit,onCreatePR:w,onViewInGitHub:x.handleViewInGitHub,onOpenGitOpsMenu:T},t[30]=x.handleQuickCommit,t[31]=x.handleViewInGitHub,t[32]=x.isCreatingPR,t[33]=x.isLoading,t[34]=x.userPrefs.autoGenerateCommitMessage,t[35]=v,t[36]=w,t[37]=T,t[38]=g,t[39]=E):E=t[39],Ue(E);let D;if(t[40]!==x||t[41]!==_.isGeneratingMessage||t[42]!==v||t[43]!==o||t[44]!==c||t[45]!==g){let e=Ee(g),n=Te(g,x.isLoading,x.isCreatingPR),i=x.isLoading||x.isCreatingPR,a=n&&!i,s;t[47]!==x.isCreatingPR||t[48]!==g?(s=Ce(g,x.isCreatingPR),t[47]=x.isCreatingPR,t[48]=g,t[49]=s):s=t[49];let l=s,u;t[50]!==x.isCreatingPR||t[51]!==x.isLoading||t[52]!==g?(u=we(g,x.isCreatingPR,x.isLoading)??(0,G.jsx)(h,{className:`h-4 w-4 shrink-0`}),t[50]=x.isCreatingPR,t[51]=x.isLoading,t[52]=g,t[53]=u):u=t[53];let d=u,f=c&&!e?H:me,p=g.defaultBranch??null,y=_.isGeneratingMessage&&x.isLoading,b,C,w,T,E,k;t[54]===x?(b=t[55],C=t[56],w=t[57],T=t[58],E=t[59],k=t[60]):(b=()=>void x.handleFetch(),C=()=>void x.handlePull(),w=()=>void x.handlePush(),T=()=>void x.handleOpenHistory(),E=()=>x.setIsPRDialogOpen(!0),k=()=>x.setIsRepoDialogOpen(!0),t[54]=x,t[55]=b,t[56]=C,t[57]=w,t[58]=T,t[59]=E,t[60]=k);let A,j;t[61]===x?(A=t[62],j=t[63]):(A=()=>void x.handleQuickCommit(),j=()=>void x.handleSyncBranch(),t[61]=x,t[62]=A,t[63]=j);let M;t[64]!==x.gitUser||t[65]!==x.handleGitOpsMenuOpenChange||t[66]!==x.handleViewInGitHub||t[67]!==x.isCreatingPR||t[68]!==x.isGitOpsMenuOpen||t[69]!==x.isLoading||t[70]!==x.isLoadingHistory||t[71]!==x.userPrefs.autoGenerateCommitMessage||t[72]!==v||t[73]!==o||t[74]!==p||t[75]!==y||t[76]!==b||t[77]!==C||t[78]!==w||t[79]!==T||t[80]!==E||t[81]!==k||t[82]!==A||t[83]!==j||t[84]!==g.canCreateRepo||t[85]!==g.commitsAheadOfDefault||t[86]!==g.defaultBranchAhead||t[87]!==g.defaultBranchBehind||t[88]!==g.hasChanges||t[89]!==g.hasRemoteBranch||t[90]!==g.hasUnpushedCommits||t[91]!==g.isRefreshing||t[92]!==g.prExists||t[93]!==g.remoteUrl||t[94]!==g.repoUrl||t[95]!==g.status?(M=(0,G.jsx)(Y,{branchStatus:g.status,remoteUrl:g.remoteUrl,hasRemoteBranch:g.hasRemoteBranch,hasUnpushedCommits:g.hasUnpushedCommits,canCreateRepo:g.canCreateRepo,repoUrl:g.repoUrl,isRefreshing:g.isRefreshing,isCreatingPR:x.isCreatingPR,hasChanges:g.hasChanges,commitsAheadOfDefault:g.commitsAheadOfDefault,prExists:g.prExists,defaultBranch:p,defaultBranchAhead:g.defaultBranchAhead,defaultBranchBehind:g.defaultBranchBehind,gitUser:x.gitUser,isDirectCommitMode:v,autoGenerateCommitMessage:x.userPrefs.autoGenerateCommitMessage,isLoading:x.isLoading,isLoadingHistory:x.isLoadingHistory,isQuickCommitting:y,onFetch:b,onPull:C,onPush:w,onOpenHistory:T,onCreatePR:E,onCreateRepo:k,onViewInGitHub:x.handleViewInGitHub,onQuickCommit:A,onSyncWithDefault:j,open:x.isGitOpsMenuOpen,onOpenChange:x.handleGitOpsMenuOpenChange,layout:o}),t[64]=x.gitUser,t[65]=x.handleGitOpsMenuOpenChange,t[66]=x.handleViewInGitHub,t[67]=x.isCreatingPR,t[68]=x.isGitOpsMenuOpen,t[69]=x.isLoading,t[70]=x.isLoadingHistory,t[71]=x.userPrefs.autoGenerateCommitMessage,t[72]=v,t[73]=o,t[74]=p,t[75]=y,t[76]=b,t[77]=C,t[78]=w,t[79]=T,t[80]=E,t[81]=k,t[82]=A,t[83]=j,t[84]=g.canCreateRepo,t[85]=g.commitsAheadOfDefault,t[86]=g.defaultBranchAhead,t[87]=g.defaultBranchBehind,t[88]=g.hasChanges,t[89]=g.hasRemoteBranch,t[90]=g.hasUnpushedCommits,t[91]=g.isRefreshing,t[92]=g.prExists,t[93]=g.remoteUrl,t[94]=g.repoUrl,t[95]=g.status,t[96]=M):M=t[96];let N=M;D=o===`sidebar`?(0,G.jsxs)(`div`,{className:`flex w-full min-w-0 items-center`,children:[(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsx)(te,{asChild:!0,className:`min-w-0 flex-1`,children:(0,G.jsx)(`button`,{type:`button`,className:m(`min-w-0 w-full justify-start`,e&&`border-transparent bg-brand !text-white hover:bg-brand/90 hover:!text-white dark:bg-brand dark:hover:bg-brand/90`,e&&a&&`cursor-default opacity-50 hover:bg-brand hover:!text-white`,!e&&a&&`cursor-default`),disabled:i,"aria-disabled":n,onClick:n?void 0:x.handleMainButtonClick,children:(0,G.jsxs)(`span`,{className:m(`flex min-w-0 flex-1 items-center gap-2`,!e&&a&&`text-muted-foreground opacity-50`,e&&`font-medium text-white`),children:[d,(0,G.jsx)(`span`,{className:m(r.body,`truncate`),children:l})]})})})}),(0,G.jsx)(S,{side:`right`,children:J(g)})]})}),N]}):o===`bar`?(0,G.jsxs)(`div`,{className:m(f,de,ue,`group min-w-0 gap-0 px-0`,e&&`border-transparent bg-brand !text-white hover:bg-brand/90 hover:!text-white dark:bg-brand dark:hover:bg-brand/90`,e&&a&&`cursor-default opacity-50 hover:bg-brand hover:!text-white`),children:[(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsx)(`button`,{type:`button`,className:m(r.compact,`flex min-w-0 flex-1 items-center gap-1.5 rounded-l-full pl-3 pr-0.5 disabled:opacity-50`,a&&`cursor-default`,e&&`text-white`),disabled:i,"aria-disabled":n,onClick:n?void 0:x.handleMainButtonClick,children:(0,G.jsxs)(`span`,{className:m(`inline-flex min-w-0 items-center gap-1.5 truncate`,e&&`font-medium`,!e&&a&&`opacity-50`),children:[d,(0,G.jsx)(`span`,{className:`truncate`,children:l})]})})}),(0,G.jsx)(S,{side:`top`,children:J(g)})]})}),N]}):(0,G.jsxs)(`div`,{className:m(`flex w-full flex-col gap-1 items-stretch [&_button]:w-full [&_button]:justify-start`),children:[(0,G.jsx)(R,{children:(0,G.jsxs)(O,{children:[(0,G.jsx)(ee,{asChild:!0,children:(0,G.jsx)(ie,{variant:`outline`,size:`sm`,className:m(`h-8 gap-1.5 rounded-md border`,e&&`border-transparent bg-brand !text-white hover:bg-brand/90 hover:!text-white dark:bg-brand dark:hover:bg-brand/90`,a&&`cursor-default hover:bg-background hover:text-foreground`),disabled:i,"aria-disabled":n,onClick:n?void 0:x.handleMainButtonClick,children:(0,G.jsxs)(`span`,{className:m(`inline-flex items-center gap-1.5`,e&&`text-white`,a&&!e&&`text-muted-foreground opacity-50`,a&&e&&`opacity-50`),children:[d,l]})})}),(0,G.jsx)(S,{children:J(g)})]})}),N]}),t[40]=x,t[41]=_.isGeneratingMessage,t[42]=v,t[43]=o,t[44]=c,t[45]=g,t[46]=D}else D=t[46];let k;t[97]===x?k=t[98]:(k=e=>x.setUserPrefsState(t=>({...t,autoGenerateCommitMessage:e})),t[97]=x,t[98]=k);let A;t[99]!==x.commitMessage||t[100]!==x.handleCommit||t[101]!==x.handleGenerateCommitMessage||t[102]!==x.isCommitDialogOpen||t[103]!==x.setCommitMessage||t[104]!==x.setIsCommitDialogOpen||t[105]!==x.userPrefs.autoGenerateCommitMessage||t[106]!==_.isGeneratingMessage||t[107]!==k?(A={isOpen:x.isCommitDialogOpen,onOpenChange:x.setIsCommitDialogOpen,message:x.commitMessage,onMessageChange:x.setCommitMessage,autoGenerate:x.userPrefs.autoGenerateCommitMessage,onAutoGenerateChange:k,isGenerating:_.isGeneratingMessage,onGenerateMessage:x.handleGenerateCommitMessage,onCommit:x.handleCommit},t[99]=x.commitMessage,t[100]=x.handleCommit,t[101]=x.handleGenerateCommitMessage,t[102]=x.isCommitDialogOpen,t[103]=x.setCommitMessage,t[104]=x.setIsCommitDialogOpen,t[105]=x.userPrefs.autoGenerateCommitMessage,t[106]=_.isGeneratingMessage,t[107]=k,t[108]=A):A=t[108];let j;t[109]===x?j=t[110]:(j=e=>x.setUserPrefsState(t=>({...t,autoGeneratePRInfo:e})),t[109]=x,t[110]=j);let M;t[111]===x?M=t[112]:(M=e=>x.setUserPrefsState(t=>({...t,createBranchAfterPR:e})),t[111]=x,t[112]=M);let N;t[113]!==x.handleCreatePR||t[114]!==x.handleGeneratePRInfo||t[115]!==x.isPRDialogOpen||t[116]!==x.prDescription||t[117]!==x.prTitle||t[118]!==x.setIsPRDialogOpen||t[119]!==x.setPrDescription||t[120]!==x.setPrTitle||t[121]!==x.userPrefs.autoGeneratePRInfo||t[122]!==x.userPrefs.createBranchAfterPR||t[123]!==_.isGeneratingPRInfo||t[124]!==j||t[125]!==M?(N={isOpen:x.isPRDialogOpen,onOpenChange:x.setIsPRDialogOpen,title:x.prTitle,onTitleChange:x.setPrTitle,description:x.prDescription,onDescriptionChange:x.setPrDescription,isGeneratingInfo:_.isGeneratingPRInfo,onGenerateInfo:x.handleGeneratePRInfo,onCreatePR:x.handleCreatePR,autoGenerate:x.userPrefs.autoGeneratePRInfo,onAutoGenerateChange:j,createBranchAfterPR:x.userPrefs.createBranchAfterPR,onCreateBranchAfterPRChange:M},t[113]=x.handleCreatePR,t[114]=x.handleGeneratePRInfo,t[115]=x.isPRDialogOpen,t[116]=x.prDescription,t[117]=x.prTitle,t[118]=x.setIsPRDialogOpen,t[119]=x.setPrDescription,t[120]=x.setPrTitle,t[121]=x.userPrefs.autoGeneratePRInfo,t[122]=x.userPrefs.createBranchAfterPR,t[123]=_.isGeneratingPRInfo,t[124]=j,t[125]=M,t[126]=N):N=t[126];let P;t[127]===x?P=t[128]:(P=()=>x.handlePushAndCreatePR(),t[127]=x,t[128]=P);let ne;t[129]!==x.handleCancelPushBeforePR||t[130]!==x.isPushBeforePRDialogOpen||t[131]!==x.setIsPushBeforePRDialogOpen||t[132]!==P?(ne={isOpen:x.isPushBeforePRDialogOpen,onOpenChange:x.setIsPushBeforePRDialogOpen,onPushAndCreatePR:P,onCancel:x.handleCancelPushBeforePR},t[129]=x.handleCancelPushBeforePR,t[130]=x.isPushBeforePRDialogOpen,t[131]=x.setIsPushBeforePRDialogOpen,t[132]=P,t[133]=ne):ne=t[133];let F;t[134]===x?F=t[135]:(F=e=>x.setUserPrefsState(t=>({...t,privateRepositoryDefault:e})),t[134]=x,t[135]=F);let I;t[136]!==x.handleCreateRepo||t[137]!==x.isRepoDialogOpen||t[138]!==x.repoDescription||t[139]!==x.repoName||t[140]!==x.setIsRepoDialogOpen||t[141]!==x.setRepoDescription||t[142]!==x.setRepoName||t[143]!==x.userPrefs.privateRepositoryDefault||t[144]!==F?(I={isOpen:x.isRepoDialogOpen,onOpenChange:x.setIsRepoDialogOpen,name:x.repoName,onNameChange:x.setRepoName,description:x.repoDescription,onDescriptionChange:x.setRepoDescription,isPrivate:x.userPrefs.privateRepositoryDefault,onPrivateChange:F,onCreateRepo:x.handleCreateRepo},t[136]=x.handleCreateRepo,t[137]=x.isRepoDialogOpen,t[138]=x.repoDescription,t[139]=x.repoName,t[140]=x.setIsRepoDialogOpen,t[141]=x.setRepoDescription,t[142]=x.setRepoName,t[143]=x.userPrefs.privateRepositoryDefault,t[144]=F,t[145]=I):I=t[145];let re;t[146]!==x.commits||t[147]!==x.displayedCommits||t[148]!==x.handleScroll||t[149]!==x.isHistoryDialogOpen||t[150]!==x.isLoadingMore||t[151]!==x.setIsHistoryDialogOpen?(re={isOpen:x.isHistoryDialogOpen,onOpenChange:x.setIsHistoryDialogOpen,commits:x.commits,displayedCommits:x.displayedCommits,isLoadingMore:x.isLoadingMore,onScroll:x.handleScroll},t[146]=x.commits,t[147]=x.displayedCommits,t[148]=x.handleScroll,t[149]=x.isHistoryDialogOpen,t[150]=x.isLoadingMore,t[151]=x.setIsHistoryDialogOpen,t[152]=re):re=t[152];let L;t[153]===x?L=t[154]:(L=()=>x.setIsPullWithChangesDialogOpen(!1),t[153]=x,t[154]=L);let z;t[155]!==x.handleCommitFirstAndPull||t[156]!==x.handleStashAndPull||t[157]!==x.isPullWithChangesDialogOpen||t[158]!==x.setIsPullWithChangesDialogOpen||t[159]!==L?(z={isOpen:x.isPullWithChangesDialogOpen,onOpenChange:x.setIsPullWithChangesDialogOpen,onCommitFirst:x.handleCommitFirstAndPull,onStashAndPull:x.handleStashAndPull,onCancel:L},t[155]=x.handleCommitFirstAndPull,t[156]=x.handleStashAndPull,t[157]=x.isPullWithChangesDialogOpen,t[158]=x.setIsPullWithChangesDialogOpen,t[159]=L,t[160]=z):z=t[160];let B;t[161]!==x.isLoading||t[162]!==A||t[163]!==N||t[164]!==ne||t[165]!==I||t[166]!==re||t[167]!==z||t[168]!==g.currentBranch?(B=(0,G.jsx)(Me,{isLoading:x.isLoading,currentBranch:g.currentBranch,commit:A,pullRequest:N,pushBeforePR:ne,createRepo:I,history:re,pullWithChanges:z}),t[161]=x.isLoading,t[162]=A,t[163]=N,t[164]=ne,t[165]=I,t[166]=re,t[167]=z,t[168]=g.currentBranch,t[169]=B):B=t[169];let V;return t[170]!==D||t[171]!==B?(V=(0,G.jsxs)(G.Fragment,{children:[D,B]}),t[170]=D,t[171]=B,t[172]=V):V=t[172],V}export{We as GitOpsButton};