tarsk 0.5.49 → 0.5.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -3
- package/dist/index.js +10869 -8554
- package/dist/public/assets/{account-view-DxHV7OtO.js → account-view-CGokQA1o.js} +1 -1
- package/dist/public/assets/api-BRrGio-B.js +1 -0
- package/dist/public/assets/browser-tab-B3BybVD0.js +1 -0
- package/dist/public/assets/commit-dialog-BLzHl6oN.js +1 -0
- package/dist/public/assets/context-menu-yKNgVtVk.js +1 -0
- package/dist/public/assets/create-repo-dialog-DHFloJc3.js +1 -0
- package/dist/public/assets/{dialogs-config-BEazgV7k.js → dialogs-config-BF_RyK5j.js} +14 -14
- package/dist/public/assets/diff-view-DONeogdk.js +3 -0
- package/dist/public/assets/explorer-tab-view-C1Dex751.js +2 -0
- package/dist/public/assets/{explorer-tree-CiPMm5ck.js → explorer-tree-BmsrsMXJ.js} +1 -1
- package/dist/public/assets/explorer-view-1fAca9It.js +1 -0
- package/dist/public/assets/git-history-dialog-DXsSt3e0.js +1 -0
- package/dist/public/assets/git-ops-button-Cj3j4bvy.js +2 -0
- package/dist/public/assets/history-view-COEFPP2U.js +9 -0
- package/dist/public/assets/index-Dsj5zHdU.js +73 -0
- package/dist/public/assets/index-DzUALYN4.css +1 -0
- package/dist/public/assets/mcp-server-card-3bFOnHFO.js +1 -0
- package/dist/public/assets/merged-pr-dialog-C5vgSXwq.js +1 -0
- package/dist/public/assets/model-star-rating-GWRgO9pY.js +1 -0
- package/dist/public/assets/onboarding-B_n7I3ri.js +1 -0
- package/dist/public/assets/project-settings-view-DsVEiQM_.js +1 -0
- package/dist/public/assets/providers-list-view-BT5XZP-F.js +1 -0
- package/dist/public/assets/pull-request-dialog-BO_7fALs.js +1 -0
- package/dist/public/assets/pull-with-changes-dialog-DQSC-HUH.js +1 -0
- package/dist/public/assets/push-before-pr-dialog-B9evx_c7.js +1 -0
- package/dist/public/assets/radio-group-CNuRXtN5.js +1 -0
- package/dist/public/assets/react-vendor-D-z0br-z.js +16 -0
- package/dist/public/assets/settings-general-view-BaTUBgdM.js +1 -0
- package/dist/public/assets/settings-instructions-view-Bit7tYRh.js +1 -0
- package/dist/public/assets/settings-list-Cc_0YmxB.js +1 -0
- package/dist/public/assets/settings-mcp-servers-view-BcuuyWhI.js +5 -0
- package/dist/public/assets/{settings-models-skeleton-Cse6L-Nd.js → settings-models-skeleton-BfIx9XDs.js} +1 -1
- package/dist/public/assets/{settings-models-view-BAxf3eJq.js → settings-models-view-CNFB1Iqn.js} +1 -1
- package/dist/public/assets/settings-rules-view-BvelCH4j.js +8 -0
- package/dist/public/assets/settings-skills-view-DV-cA6cj.js +3 -0
- package/dist/public/assets/settings-slash-commands-view-CKxQnzse.js +1 -0
- package/dist/public/assets/settings-subagents-view-DAl5Db-p.js +2 -0
- package/dist/public/assets/{settings-system-prompt-view-B1vc2cgC.js → settings-system-prompt-view-BdwsxqMo.js} +1 -1
- package/dist/public/assets/settings-view-BxiazdKG.js +2 -0
- package/dist/public/assets/{skeleton-6mGMglV0.js → skeleton-DJZ5x6e0.js} +1 -1
- package/dist/public/assets/{slug-utils-BT1eqWhW.js → slug-utils-D4uxO5qv.js} +1 -1
- package/dist/public/assets/{tabs-iUSYYupj.js → tabs-TGCt-ze0.js} +1 -1
- package/dist/public/assets/{terminal-panel-DIpnKR-N.js → terminal-panel-Bh_CKydu.js} +2 -2
- package/dist/public/assets/todos-view-DDSSplmi.js +17 -0
- package/dist/public/assets/{ui-components-kSaUEA_X.js → ui-components-JEH8JAJ7.js} +1 -1
- package/dist/public/assets/{use-deferred-search-DGJskNBr.js → use-deferred-search-BZg7Bt7W.js} +1 -1
- package/dist/public/assets/{utils-CECQ_-6N.js → utils-H-1x3dmp.js} +1 -1
- package/dist/public/assets/{vosk-speech-CgILeNJR.js → vosk-speech-FJiKHPe4.js} +2 -2
- package/dist/public/assets/{web-DGalafxk.js → web-B4cuelyi.js} +1 -1
- package/dist/public/assets/{web-BD1sqxMq.js → web-CQpWcSn8.js} +1 -1
- package/dist/public/assets/{web-BWAZk7ug.js → web-Cq4yC7dg.js} +1 -1
- package/dist/public/assets/{web-Dt5YgbhM.js → web-DOZOaJlj.js} +1 -1
- package/dist/public/index.html +8 -8
- package/package.json +1 -1
- package/dist/public/assets/api-Dhzdgb40.js +0 -1
- package/dist/public/assets/browser-tab-qhf-xKwZ.js +0 -1
- package/dist/public/assets/commit-dialog-DcVXFOBP.js +0 -1
- package/dist/public/assets/context-menu-PIC-g8wy.js +0 -1
- package/dist/public/assets/create-repo-dialog-CsjpTBPU.js +0 -1
- package/dist/public/assets/diff-view-CGEl0YbC.js +0 -3
- package/dist/public/assets/explorer-tab-view--ib_BjId.js +0 -2
- package/dist/public/assets/explorer-view-odyQutTO.js +0 -1
- package/dist/public/assets/git-history-dialog-qUZ7Qsp4.js +0 -1
- package/dist/public/assets/git-ops-button-Bced-_39.js +0 -2
- package/dist/public/assets/history-view-BMVTxWTg.js +0 -9
- package/dist/public/assets/index-C7FLshNp.css +0 -1
- package/dist/public/assets/index-_SOdLUMq.js +0 -73
- package/dist/public/assets/mcp-server-card-ChdAZekt.js +0 -1
- package/dist/public/assets/merged-pr-dialog-DAXqT4Xe.js +0 -1
- package/dist/public/assets/model-star-rating-BzpXBjSo.js +0 -1
- package/dist/public/assets/onboarding-Bi5MieW-.js +0 -1
- package/dist/public/assets/project-settings-view-CHV6lJG4.js +0 -1
- package/dist/public/assets/providers-list-view-Dgid2Wui.js +0 -1
- package/dist/public/assets/pull-request-dialog-BFgRF5AH.js +0 -1
- package/dist/public/assets/pull-with-changes-dialog-oGP-j8Yw.js +0 -1
- package/dist/public/assets/push-before-pr-dialog-BQ0QC6Qu.js +0 -1
- package/dist/public/assets/radio-group-n9qyUxmu.js +0 -1
- package/dist/public/assets/react-vendor-iDwBzcYF.js +0 -16
- package/dist/public/assets/settings-general-view-Vwi9J6Tn.js +0 -1
- package/dist/public/assets/settings-instructions-view-8YIr0PO3.js +0 -1
- package/dist/public/assets/settings-list-owWkHWxE.js +0 -1
- package/dist/public/assets/settings-mcp-servers-view-CCXW_uet.js +0 -5
- package/dist/public/assets/settings-rules-view-D3KLTKVZ.js +0 -8
- package/dist/public/assets/settings-skills-view-DaqOna-w.js +0 -3
- package/dist/public/assets/settings-slash-commands-view-CN8_DTYX.js +0 -1
- package/dist/public/assets/settings-subagents-view-BIejA-ck.js +0 -2
- package/dist/public/assets/settings-view-DLBIkYoA.js +0 -2
- package/dist/public/assets/todos-view-BK6i_oPT.js +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Mi as t,Pi as n,Uo as r,X as i,an as a,ds as o,fo as s,ms as c,ns as l,ta as u}from"./dialogs-config-BF_RyK5j.js";import{C as d,D as f,S as p,v as m}from"./history-view-COEFPP2U.js";import{F as h}from"./index-Dsj5zHdU.js";import{t as g}from"./skeleton-DJZ5x6e0.js";var _=e(c(),1),v=o();function y(){let[e,o]=(0,_.useState)(null),[c,y]=(0,_.useState)(!0);(0,_.useEffect)(()=>{b();let e=()=>{document.visibilityState===`visible`&&b()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]);async function b(){y(!0);try{o(await i())}catch(e){h({title:`Error`,description:e instanceof Error?e.message:`Failed to load account info`,variant:`destructive`})}finally{y(!1)}}function x(){a(`https://buy.stripe.com/14AcN6feK0Jjbheb2H3Nm03?client_reference_id=${e?.clientReferenceId??``}`)}function S(){a(`https://buy.stripe.com/9B67sMd6CgIh70Y0o33Nm04?client_reference_id=${e?.clientReferenceId??``}`)}if(c)return(0,v.jsx)(f,{children:(0,v.jsxs)(m,{children:[(0,v.jsxs)(`div`,{className:`mb-6`,children:[(0,v.jsx)(g,{className:`h-8 w-32 mb-2`}),(0,v.jsx)(g,{className:`h-4 w-64`})]}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsxs)(`div`,{className:`flex gap-4`,children:[(0,v.jsxs)(`div`,{className:`flex-1 rounded-xl border bg-card p-5 space-y-2`,children:[(0,v.jsx)(g,{className:`h-4 w-20`}),(0,v.jsx)(g,{className:`h-9 w-28`})]}),(0,v.jsxs)(`div`,{className:`flex-1 rounded-xl border bg-card p-5 space-y-3`,children:[(0,v.jsx)(g,{className:`h-4 w-24`}),(0,v.jsx)(g,{className:`h-6 w-32`}),(0,v.jsx)(g,{className:`h-4 w-full`})]})]}),(0,v.jsxs)(`div`,{className:`space-y-3`,children:[(0,v.jsx)(g,{className:`h-4 w-24`}),(0,v.jsxs)(`div`,{className:`rounded-xl border bg-card p-5 flex items-center justify-between gap-4`,children:[(0,v.jsxs)(`div`,{className:`space-y-1 flex-1`,children:[(0,v.jsx)(g,{className:`h-5 w-28`}),(0,v.jsx)(g,{className:`h-4 w-64`})]}),(0,v.jsx)(g,{className:`h-9 w-28 shrink-0`})]}),(0,v.jsxs)(`div`,{className:`rounded-xl border bg-card p-5 flex items-center justify-between gap-4`,children:[(0,v.jsxs)(`div`,{className:`space-y-1 flex-1`,children:[(0,v.jsx)(g,{className:`h-5 w-36`}),(0,v.jsx)(g,{className:`h-4 w-56`}),(0,v.jsx)(g,{className:`h-4 w-32`})]}),(0,v.jsx)(g,{className:`h-9 w-24 shrink-0`})]})]})]})]})});let C=e?.plan===`unlimited-pro`;return(0,v.jsx)(f,{children:(0,v.jsxs)(m,{children:[(0,v.jsx)(p,{title:`Account`,description:`Manage your Tarsk plan and prompt balance.`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsxs)(`div`,{className:`flex gap-4`,children:[(0,v.jsxs)(`div`,{className:`flex-1 rounded-xl border bg-card p-5 space-y-2`,children:[(0,v.jsxs)(`div`,{className:n(u.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,v.jsx)(s,{className:`h-4 w-4`}),`Balance`]}),(0,v.jsx)(`div`,{className:`flex items-end gap-2`,children:C?(0,v.jsx)(`span`,{className:u.stat,children:`Unlimited`}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:u.stat,children:e?.promptsRemaining.toLocaleString()??0}),(0,v.jsx)(`span`,{className:`${u.caption} mb-1`,children:`prompts remaining`})]})})]}),(0,v.jsxs)(`div`,{className:`flex-1 rounded-xl border bg-card p-5 space-y-3`,children:[(0,v.jsxs)(`div`,{className:n(u.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,v.jsx)(r,{className:`h-4 w-4`}),`Current Plan`]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:u.label,children:C?`Unlimited Pro`:`Pay as you go`}),C&&(0,v.jsx)(`span`,{className:n(u.compact,`rounded-full bg-primary/10 px-2 py-0.5 font-medium text-primary`),children:`Active`})]}),(0,v.jsx)(`p`,{className:u.bodyMuted,children:C?`You have unlimited prompts with no restrictions.`:`Purchase prompts as needed. Upgrade to Pro for unlimited access.`})]})]}),!C&&(0,v.jsxs)(`div`,{className:`space-y-3`,children:[(0,v.jsx)(d,{title:`Add Prompts`,className:`mb-0`}),(0,v.jsxs)(`div`,{className:`rounded-xl border bg-card p-5 flex items-center justify-between gap-4`,children:[(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,v.jsx)(`span`,{className:u.label,children:`1,000 Prompts`})}),(0,v.jsx)(`p`,{className:u.bodyMuted,children:`Top up your balance with 1,000 additional prompts for $5.`})]}),(0,v.jsx)(t,{onClick:x,className:`shrink-0`,children:`Top Up Balance`})]}),(0,v.jsxs)(`div`,{className:`rounded-xl border bg-card p-5 flex items-center justify-between gap-4`,children:[(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(r,{className:`h-4 w-4 text-primary`}),(0,v.jsx)(`span`,{className:u.label,children:`Unlimited Pro Plan`})]}),(0,v.jsx)(`p`,{className:u.bodyMuted,children:`Unlimited prompts for $100 and lifetime access to Tarsk.`}),(0,v.jsxs)(`ul`,{className:n(u.bodyMuted,`space-y-0.5`),children:[(0,v.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,v.jsx)(l,{className:`h-3 w-3 text-primary`}),`Unlimited prompts`]}),(0,v.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,v.jsx)(l,{className:`h-3 w-3 text-primary`}),`Priority access`]})]})]}),(0,v.jsx)(t,{onClick:S,className:`shrink-0`,children:`Purchase`})]})]})]})]})})}export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$n as e,Jn as t,Qn as n,Yn as r,Zn as i,er as a,qn as o}from"./dialogs-config-BF_RyK5j.js";async function s(e,n,i=!1){return r(`api/threads/${t(e)}/explorer?path=${encodeURIComponent(n)}&recursive=${i}`)}async function c(e,n){return r(`api/threads/${t(e)}/ai-file?path=${encodeURIComponent(n)}`)}async function l(e,n,r){return a(`api/threads/${t(e)}/ai-file`,{path:n,content:r})}async function u(e,n){return o(`api/threads/${t(e)}/explorer?path=${encodeURIComponent(n)}`)}async function d(e,r,i){return n(`api/threads/${t(e)}/explorer`,{path:r,newName:i})}async function f(n,r,i){return e(`api/threads/${t(n)}/explorer/file`,{dirPath:r,name:i})}async function p(e,n){return i(`api/threads/${t(e)}/explorer/media?path=${encodeURIComponent(n)}`)}async function m(n,r,i){return e(`api/threads/${t(n)}/explorer/folder`,{dirPath:r,name:i})}async function h(n,r){return e(`api/threads/${t(n)}/explorer/open`,{path:r})}export{c as a,d as c,p as i,l,m as n,s as o,u as r,h as s,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Bo as t,Fr as n,Ir as r,Lr as i,Pa as a,Pi as o,Ra as s,Rr as c,Yr as l,an as u,co as d,ds as f,fs as p,ms as m,qa as h,ta as g,tr as _}from"./dialogs-config-BF_RyK5j.js";import{_ as v,b as y,j as b,m as x,n as S,z as C}from"./index-Dsj5zHdU.js";var w=p(),T=e(m(),1),E=f();function D(e){let t=e.trim();return t?(!t.startsWith(`http://`)&&!t.startsWith(`https://`)&&(t=`http://${t}`),t):``}function O(e){return e?e.querySelector(`electrobun-webview`):null}function k(e){e.webviewId!=null&&(e.toggleHidden(!0),e.togglePassthrough(!0))}function A(e){e.webviewId!=null&&(e.toggleHidden(!1),e.togglePassthrough(!1),e.syncDimensions(!0))}function j(e,t){let n=!1,r=0;function i(){if(!n){if(e.webviewId==null){r=requestAnimationFrame(i);return}t&&e.getAttribute(`src`)!==t&&e.loadURL(t),A(e)}}return r=requestAnimationFrame(i),function(){n=!0,cancelAnimationFrame(r)}}function M(e){let t=(0,w.c)(9),{onClick:i,label:a,children:o,isActive:s}=e,l=`p-1.5 rounded transition-colors ${s!==void 0&&s?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground hover:bg-background/50`}`,u;t[0]!==o||t[1]!==i||t[2]!==l?(u=(0,E.jsx)(c,{asChild:!0,children:(0,E.jsx)(`button`,{type:`button`,onClick:i,className:l,children:o})}),t[0]=o,t[1]=i,t[2]=l,t[3]=u):u=t[3];let d;t[4]===a?d=t[5]:(d=(0,E.jsx)(r,{children:a}),t[4]=a,t[5]=d);let f;return t[6]!==u||t[7]!==d?(f=(0,E.jsxs)(n,{children:[u,d]}),t[6]=u,t[7]=d,t[8]=f):f=t[8],f}function N(){let{activeMainTab:e}=b(),{devServerUrl:n}=y(),{browserResetTrigger:r,browserDeviceMode:c,setBrowserDeviceMode:f}=S(),p=C(e=>e.selectedProjectId),m=C(e=>e.projects).find(e=>e.projectId===p),[w,N]=(0,T.useState)(``),[P,F]=(0,T.useState)(``),[I,L]=(0,T.useState)(``),[R,z]=(0,T.useState)(c),B=(0,T.useRef)(null),V=(0,T.useRef)(I),H=(0,T.useRef)(null),U=(0,T.useRef)(null),W=_(),G=x(),K=W&&e===`browser`&&!!P,[q,J]=(0,T.useState)(K);V.current=I,(0,T.useEffect)(()=>{z(c)},[c]);function Y(e){z(e),f(e)}function X(){return B.current??O(U.current)}(0,T.useLayoutEffect)(()=>{if(!W)return;if(K){J(!0);return}let e=X();e&&k(e);let t=requestAnimationFrame(()=>{J(!1)});return function(){cancelAnimationFrame(t)}},[K,W,P]),(0,T.useEffect)(()=>{F(``),L(``),N(``);let e=B.current;e&&(e.src=``),H.current&&(H.current.src=``)},[r]),(0,T.useEffect)(()=>{if(!n)return;let e=D(n);N(e),F(e),L(e)},[n]);let Z=(0,T.useCallback)(e=>{B.current=e,e&&j(e,V.current)},[]);(0,T.useLayoutEffect)(()=>{if(!W||!q)return;let e=X();!e||e.webviewId==null||A(e)},[q,W,P,R]),(0,T.useEffect)(()=>{let e=X();if(!(!W||!e||!I||!q))return j(e,I)},[I,W,P,q]),(0,T.useEffect)(()=>{let e=X();if(!W||!e||!q)return;function t(e){let t=typeof e.detail==`string`?e.detail:P;t&&(F(t),L(``),N(t))}function n(e){let t=typeof e.detail==`string`?e.detail:P;t&&(F(t),N(t))}function r(e){let t=e.detail,n=typeof t==`string`?t:typeof t==`object`&&t&&`url`in t?String(t.url):``;n&&u(n)}return e.on(`did-navigate`,t),e.on(`did-navigate-in-page`,n),e.on(`new-window-open`,r),function(){e.off(`did-navigate`,t),e.off(`did-navigate-in-page`,n),e.off(`new-window-open`,r)}},[P,W,q]);function Q(e){let t=D(e);t&&(N(t),F(t),L(t))}function ee(e){e.key===`Enter`&&Q(w)}function te(){if(W){let e=X();e&&e.reload();return}let e=H.current;if(!e)return;let t=e.src;e.src=``,requestAnimationFrame(()=>{e.src=t})}let $={desktop:{width:`100%`,height:`100%`},tablet:{width:`768px`,height:`1024px`},mobile:{width:`375px`,height:`667px`}}[R];function ne(){return W?q?(0,T.createElement)(`electrobun-webview`,{ref:Z,src:P,preload:G,renderer:`native`,className:`block h-full w-full bg-background`}):null:(0,E.jsx)(`iframe`,{ref:H,src:P,className:`h-full w-full border-none`,title:`Browser`})}return(0,E.jsx)(i,{children:(0,E.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,E.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-border px-3 py-2`,children:[(0,E.jsx)(l,{type:`text`,value:w,onChange:e=>N(e.target.value),onKeyDown:ee,placeholder:`Enter URL...`,className:o(`flex-1 rounded-full bg-muted font-mono`),spellCheck:!1}),P&&(0,E.jsx)(M,{onClick:te,label:`Refresh page`,children:(0,E.jsx)(h,{size:15})}),P&&(0,E.jsxs)(`div`,{className:`flex items-center rounded-md bg-muted p-0.5`,children:[(0,E.jsx)(M,{onClick:()=>Y(`desktop`),label:`Desktop view`,isActive:R===`desktop`,children:(0,E.jsx)(d,{size:15})}),(0,E.jsx)(M,{onClick:()=>Y(`tablet`),label:`Tablet view`,isActive:R===`tablet`,children:(0,E.jsx)(a,{size:15})}),(0,E.jsx)(M,{onClick:()=>Y(`mobile`),label:`Mobile view`,isActive:R===`mobile`,children:(0,E.jsx)(s,{size:15})})]}),P&&(0,E.jsx)(M,{onClick:()=>void u(P),label:`Open in external browser`,children:(0,E.jsx)(t,{size:15})})]}),P?(0,E.jsx)(`div`,{ref:U,className:`flex min-h-0 flex-1 items-center justify-center bg-background`,children:(0,E.jsx)(`div`,{className:`overflow-hidden border border-border bg-background shadow-sm ${R===`desktop`?`h-full w-full rounded-none border-0 shadow-none`:`rounded-lg`}`,style:{width:$.width,height:$.height,maxWidth:`100%`,maxHeight:`100%`},children:ne()})}):(0,E.jsx)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-6 text-muted-foreground`,children:p&&m?.runCommand?(0,E.jsx)(v,{projectId:p,runCommand:m.runCommand,large:!0}):(0,E.jsx)(`p`,{className:g.body,children:`Enter a URL to browse`})})]})})}export{N as BrowserTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$r as e,Fr as t,Ir as n,La as r,Lr as i,Mi as a,Qr as o,Rr as s,Xr as c,ds as l,ei as u,fs as d,ho as f,ni as p,qr as m,ta as h,ti as g}from"./dialogs-config-BF_RyK5j.js";import{a as _}from"./onboarding-B_n7I3ri.js";import{L as v}from"./index-Dsj5zHdU.js";var y=d(),b=l();function x(l){let d=(0,y.c)(47),{open:x,onOpenChange:S,commitMessage:C,onCommitMessageChange:w,autoGenerateCommitMessage:T,onAutoGenerateChange:E,isGeneratingMessage:D,isLoading:O,onGenerateMessage:k,onCommit:A,currentBranch:j}=l,M;d[0]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,b.jsx)(p,{children:`Commit Changes`}),d[0]=M):M=d[0];let N;d[1]===j?N=d[2]:(N=(0,b.jsxs)(g,{children:[M,(0,b.jsxs)(e,{children:[`Enter a commit message for your changes on branch `,j]})]}),d[1]=j,d[2]=N);let P;d[3]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(m,{htmlFor:`commit-message`,children:`Commit Message`}),d[3]=P):P=d[3];let F;d[4]===w?F=d[5]:(F=e=>w(e.target.value),d[4]=w,d[5]=F);let I;d[6]!==C||d[7]!==F?(I=(0,b.jsx)(v,{id:`commit-message`,placeholder:`Enter commit message...`,value:C,onChange:F,className:`pr-10 h-full min-h-[14rem] resize-none`}),d[6]=C,d[7]=F,d[8]=I):I=d[8];let L=D||O,R;d[9]===D?R=d[10]:(R=D?(0,b.jsx)(f,{className:`h-3.5 w-3.5 animate-spin`}):(0,b.jsx)(r,{className:`h-3.5 w-3.5`}),d[9]=D,d[10]=R);let z;d[11]!==k||d[12]!==L||d[13]!==R?(z=(0,b.jsx)(s,{asChild:!0,children:(0,b.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute top-2 right-2 h-6 w-6`,onClick:k,disabled:L,children:R})}),d[11]=k,d[12]=L,d[13]=R,d[14]=z):z=d[14];let B=D?`Generating commit message...`:`Generate commit message with AI`,V;d[15]===B?V=d[16]:(V=(0,b.jsx)(n,{children:B}),d[15]=B,d[16]=V);let H;d[17]!==V||d[18]!==z?(H=(0,b.jsx)(i,{children:(0,b.jsxs)(t,{children:[z,V]})}),d[17]=V,d[18]=z,d[19]=H):H=d[19];let U;d[20]!==H||d[21]!==I?(U=(0,b.jsx)(`div`,{className:`grid gap-4 py-4 flex-1 min-h-0`,children:(0,b.jsxs)(`div`,{className:`grid gap-2 flex-1 min-h-0`,children:[P,(0,b.jsxs)(`div`,{className:`relative flex-1 min-h-0`,children:[I,H]})]})}),d[20]=H,d[21]=I,d[22]=U):U=d[22];let W;d[23]===E?W=d[24]:(W=e=>E(e===!0),d[23]=E,d[24]=W);let G;d[25]!==T||d[26]!==W?(G=(0,b.jsx)(_,{id:`auto-generate`,checked:T,onCheckedChange:W}),d[25]=T,d[26]=W,d[27]=G):G=d[27];let K;d[28]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,b.jsx)(m,{htmlFor:`auto-generate`,className:h.labelNormal,children:`Auto generate commit messages`}),d[28]=K):K=d[28];let q;d[29]===G?q=d[30]:(q=(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[G,K]}),d[29]=G,d[30]=q);let J;d[31]!==C||d[32]!==O?(J=O||!C.trim(),d[31]=C,d[32]=O,d[33]=J):J=d[33];let Y=O?`Committing...`:`Commit`,X;d[34]!==A||d[35]!==J||d[36]!==Y?(X=(0,b.jsx)(u,{children:(0,b.jsx)(a,{onClick:A,disabled:J,children:Y})}),d[34]=A,d[35]=J,d[36]=Y,d[37]=X):X=d[37];let Z;d[38]!==U||d[39]!==q||d[40]!==X||d[41]!==N?(Z=(0,b.jsxs)(o,{className:`flex max-w-2xl flex-col max-md:top-[max(1rem,env(safe-area-inset-top,0px))] max-md:max-h-[calc(100dvh-2rem)] max-md:translate-y-0 max-md:overflow-y-auto max-md:data-[state=closed]:slide-out-to-top max-md:data-[state=open]:slide-in-from-top max-md:data-[state=closed]:slide-out-to-left-0 max-md:data-[state=open]:slide-in-from-left-0 max-md:data-[state=closed]:zoom-out-100 max-md:data-[state=open]:zoom-in-100 md:h-[min(36rem,85dvh)]`,children:[N,U,q,X]}),d[38]=U,d[39]=q,d[40]=X,d[41]=N,d[42]=Z):Z=d[42];let Q;return d[43]!==S||d[44]!==x||d[45]!==Z?(Q=(0,b.jsx)(c,{open:x,onOpenChange:S,children:Z}),d[43]=S,d[44]=x,d[45]=Z,d[46]=Q):Q=d[46],Q}export{x as CommitDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{$o as t,Pi as n,ds as r,fs as i,ms as a,ns as o,qo as s,ta as c}from"./dialogs-config-BF_RyK5j.js";import{A as l,C as u,D as d,E as f,O as p,S as m,T as h,b as g,j as _,k as v,w as y,x as b}from"./react-vendor-D-z0br-z.js";var x=i(),S=e(a(),1),C=r(),w=d,T=_,E=S.forwardRef((e,r)=>{let i=(0,x.c)(14),a,o,s,u;i[0]===e?(a=i[1],o=i[2],s=i[3],u=i[4]):({className:o,inset:s,children:a,...u}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=u);let d;i[5]!==o||i[6]!==s?(d=n(n(c.body,`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`),s&&`pl-8`,o),i[5]=o,i[6]=s,i[7]=d):d=i[7];let f;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,C.jsx)(t,{className:`ml-auto h-4 w-4`}),i[8]=f):f=i[8];let p;return i[9]!==a||i[10]!==u||i[11]!==r||i[12]!==d?(p=(0,C.jsxs)(l,{ref:r,className:d,...u,children:[a,f]}),i[9]=a,i[10]=u,i[11]=r,i[12]=d,i[13]=p):p=i[13],p});E.displayName=l.displayName;var D=S.forwardRef((e,t)=>{let r=(0,x.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=n(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,i),r[3]=i,r[4]=o);let s;return r[5]!==a||r[6]!==t||r[7]!==o?(s=(0,C.jsx)(v,{ref:t,className:o,...a}),r[5]=a,r[6]=t,r[7]=o,r[8]=s):s=r[8],s});D.displayName=v.displayName;var O=S.forwardRef((e,t)=>{let r=(0,x.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=n(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,i),r[3]=i,r[4]=o);let s;return r[5]!==a||r[6]!==t||r[7]!==o?(s=(0,C.jsx)(h,{children:(0,C.jsx)(b,{ref:t,className:o,...a})}),r[5]=a,r[6]=t,r[7]=o,r[8]=s):s=r[8],s});O.displayName=b.displayName;var k=S.forwardRef((e,t)=>{let r=(0,x.c)(11),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:i,inset:a,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let s;r[4]!==i||r[5]!==a?(s=n(n(c.body,`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`),a&&`pl-8`,i),r[4]=i,r[5]=a,r[6]=s):s=r[6];let l;return r[7]!==o||r[8]!==t||r[9]!==s?(l=(0,C.jsx)(m,{ref:t,className:s,...o}),r[7]=o,r[8]=t,r[9]=s,r[10]=l):l=r[10],l});k.displayName=m.displayName;var A=S.forwardRef((e,t)=>{let r=(0,x.c)(14),i,a,s,l;r[0]===e?(i=r[1],a=r[2],s=r[3],l=r[4]):({className:s,children:a,checked:i,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=l);let d;r[5]===s?d=r[6]:(d=n(n(c.body,`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`),s),r[5]=s,r[6]=d);let f;r[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,C.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,C.jsx)(u,{children:(0,C.jsx)(o,{className:`h-4 w-4`})})}),r[7]=f):f=r[7];let p;return r[8]!==i||r[9]!==a||r[10]!==l||r[11]!==t||r[12]!==d?(p=(0,C.jsxs)(g,{ref:t,className:d,checked:i,...l,children:[f,a]}),r[8]=i,r[9]=a,r[10]=l,r[11]=t,r[12]=d,r[13]=p):p=r[13],p});A.displayName=g.displayName;var j=S.forwardRef((e,t)=>{let r=(0,x.c)(12),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:a,children:i,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let l;r[4]===a?l=r[5]:(l=n(n(c.body,`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`),a),r[4]=a,r[5]=l);let d;r[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,C.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,C.jsx)(u,{children:(0,C.jsx)(s,{className:`h-2 w-2 fill-current`})})}),r[6]=d):d=r[6];let p;return r[7]!==i||r[8]!==o||r[9]!==t||r[10]!==l?(p=(0,C.jsxs)(f,{ref:t,className:l,...o,children:[d,i]}),r[7]=i,r[8]=o,r[9]=t,r[10]=l,r[11]=p):p=r[11],p});j.displayName=f.displayName;var M=S.forwardRef((e,t)=>{let r=(0,x.c)(11),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:i,inset:a,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let s;r[4]!==i||r[5]!==a?(s=n(n(c.body,`px-2 py-1.5 font-semibold text-foreground`),a&&`pl-8`,i),r[4]=i,r[5]=a,r[6]=s):s=r[6];let l;return r[7]!==o||r[8]!==t||r[9]!==s?(l=(0,C.jsx)(y,{ref:t,className:s,...o}),r[7]=o,r[8]=t,r[9]=s,r[10]=l):l=r[10],l});M.displayName=y.displayName;var N=S.forwardRef((e,t)=>{let r=(0,x.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=n(`-mx-1 my-1 h-px bg-border`,i),r[3]=i,r[4]=o);let s;return r[5]!==a||r[6]!==t||r[7]!==o?(s=(0,C.jsx)(p,{ref:t,className:o,...a}),r[5]=a,r[6]=t,r[7]=o,r[8]=s):s=r[8],s});N.displayName=p.displayName;var P=e=>{let t=(0,x.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=n(c.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,C.jsx)(`span`,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o};P.displayName=`ContextMenuShortcut`;export{T as a,N as i,O as n,k as r,w as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$r as e,Mi as t,Qr as n,Xr as r,Yr as i,ds as a,ei as o,fs as s,ni as c,qr as l,ta as u,ti as d}from"./dialogs-config-BF_RyK5j.js";import{a as f}from"./onboarding-B_n7I3ri.js";import{L as p}from"./index-Dsj5zHdU.js";var m=s(),h=a();function g(a){let s=(0,m.c)(48),{open:g,onOpenChange:_,repoName:v,onRepoNameChange:y,repoDescription:b,onRepoDescriptionChange:x,isPrivateRepo:S,onPrivateRepoChange:C,isLoading:w,onCreateRepo:T}=a,E;s[0]!==_||s[1]!==x||s[2]!==y?(E=e=>{e||(y(``),x(``)),_(e)},s[0]=_,s[1]=x,s[2]=y,s[3]=E):E=s[3];let D;s[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,h.jsxs)(d,{children:[(0,h.jsx)(c,{children:`Create GitHub Repository`}),(0,h.jsx)(e,{children:`Create a new GitHub repository and push your local repository`})]}),s[4]=D):D=s[4];let O;s[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,h.jsx)(l,{htmlFor:`repo-name`,children:`Repository Name (optional)`}),s[5]=O):O=s[5];let k;s[6]===y?k=s[7]:(k=e=>y(e.target.value),s[6]=y,s[7]=k);let A;s[8]!==v||s[9]!==k?(A=(0,h.jsxs)(`div`,{className:`grid gap-2`,children:[O,(0,h.jsx)(i,{id:`repo-name`,placeholder:`Leave empty to use current folder name`,value:v,onChange:k})]}),s[8]=v,s[9]=k,s[10]=A):A=s[10];let j;s[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,h.jsx)(l,{htmlFor:`repo-description`,children:`Description (optional)`}),s[11]=j):j=s[11];let M;s[12]===x?M=s[13]:(M=e=>x(e.target.value),s[12]=x,s[13]=M);let N;s[14]!==b||s[15]!==M?(N=(0,h.jsxs)(`div`,{className:`grid gap-2`,children:[j,(0,h.jsx)(p,{id:`repo-description`,placeholder:`Enter repository description...`,value:b,onChange:M,rows:3})]}),s[14]=b,s[15]=M,s[16]=N):N=s[16];let P;s[17]===C?P=s[18]:(P=e=>C(e===!0),s[17]=C,s[18]=P);let F;s[19]!==S||s[20]!==P?(F=(0,h.jsx)(f,{id:`repo-private`,checked:S,onCheckedChange:P}),s[19]=S,s[20]=P,s[21]=F):F=s[21];let I;s[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(l,{htmlFor:`repo-private`,className:u.labelNormal,children:`Private repository`}),s[22]=I):I=s[22];let L;s[23]===F?L=s[24]:(L=(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[F,I]}),s[23]=F,s[24]=L);let R;s[25]!==L||s[26]!==A||s[27]!==N?(R=(0,h.jsxs)(`div`,{className:`grid gap-4 py-4`,children:[A,N,L]}),s[25]=L,s[26]=A,s[27]=N,s[28]=R):R=s[28];let z;s[29]===_?z=s[30]:(z=()=>_(!1),s[29]=_,s[30]=z);let B;s[31]!==w||s[32]!==z?(B=(0,h.jsx)(t,{variant:`outline`,onClick:z,disabled:w,children:`Cancel`}),s[31]=w,s[32]=z,s[33]=B):B=s[33];let V=w?`Creating...`:`Create & Push`,H;s[34]!==w||s[35]!==T||s[36]!==V?(H=(0,h.jsx)(t,{onClick:T,disabled:w,children:V}),s[34]=w,s[35]=T,s[36]=V,s[37]=H):H=s[37];let U;s[38]!==B||s[39]!==H?(U=(0,h.jsxs)(o,{children:[B,H]}),s[38]=B,s[39]=H,s[40]=U):U=s[40];let W;s[41]!==R||s[42]!==U?(W=(0,h.jsxs)(n,{children:[D,R,U]}),s[41]=R,s[42]=U,s[43]=W):W=s[43];let G;return s[44]!==g||s[45]!==E||s[46]!==W?(G=(0,h.jsx)(r,{open:g,onOpenChange:E,children:W}),s[44]=g,s[45]=E,s[46]=W,s[47]=G):G=s[47],G}export{g as CreateRepoDialog};
|