tarsk 0.5.35 → 0.5.37

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 +28 -15
  2. package/dist/public/assets/{account-view-k5jIArY-.js → account-view-Cn4P1srV.js} +1 -1
  3. package/dist/public/assets/api-DWU0D34A.js +1 -0
  4. package/dist/public/assets/{browser-tab-C9kJT-C5.js → browser-tab-DeoHDVON.js} +1 -1
  5. package/dist/public/assets/commit-dialog-CWb_KVrD.js +1 -0
  6. package/dist/public/assets/context-menu-C7FTMa2c.js +1 -0
  7. package/dist/public/assets/create-repo-dialog-BCPrWkIv.js +1 -0
  8. package/dist/public/assets/{dialogs-config-B4TDFSrS.js → dialogs-config-DZKtVbNK.js} +14 -14
  9. package/dist/public/assets/diff-view-DL3hFREY.js +3 -0
  10. package/dist/public/assets/explorer-tab-view-DAs4rpHu.js +2 -0
  11. package/dist/public/assets/{explorer-tree-uXbr6cCI.js → explorer-tree-BV1LcznV.js} +1 -1
  12. package/dist/public/assets/explorer-view-BGSxs_-F.js +1 -0
  13. package/dist/public/assets/git-history-dialog-Bqv0bD41.js +1 -0
  14. package/dist/public/assets/git-ops-button-DZzOCOr8.js +2 -0
  15. package/dist/public/assets/history-view-jX3PPID6.js +9 -0
  16. package/dist/public/assets/index-CbJ3v0Sr.js +65 -0
  17. package/dist/public/assets/index-jIBJk8xl.css +1 -0
  18. package/dist/public/assets/mcp-server-card-CTCrhFIS.js +1 -0
  19. package/dist/public/assets/merged-pr-dialog-B2qqrQ1g.js +1 -0
  20. package/dist/public/assets/onboarding-CxtzQldG.js +1 -0
  21. package/dist/public/assets/project-settings-view-B7RBOfiB.js +1 -0
  22. package/dist/public/assets/providers-list-view-BQFttbEU.js +1 -0
  23. package/dist/public/assets/pull-request-dialog-BIRSLJAA.js +1 -0
  24. package/dist/public/assets/pull-with-changes-dialog-LUgd2a4S.js +1 -0
  25. package/dist/public/assets/push-before-pr-dialog-CFmgu9H_.js +1 -0
  26. package/dist/public/assets/radio-group-Bd8YbtFD.js +1 -0
  27. package/dist/public/assets/{react-vendor-unlDVFpU.js → react-vendor-Ba8DSNiO.js} +5 -5
  28. package/dist/public/assets/settings-general-view-CH-51vI0.js +1 -0
  29. package/dist/public/assets/settings-instructions-view-D9HZldUk.js +1 -0
  30. package/dist/public/assets/settings-list-CKPEGohm.js +1 -0
  31. package/dist/public/assets/settings-mcp-servers-view-o2gqb0qo.js +5 -0
  32. package/dist/public/assets/{settings-models-skeleton-B_56ozbA.js → settings-models-skeleton-l966LEN8.js} +1 -1
  33. package/dist/public/assets/{settings-models-view-ms828HDa.js → settings-models-view-m-MDG6JH.js} +1 -1
  34. package/dist/public/assets/settings-rules-view-tG9JJQzK.js +8 -0
  35. package/dist/public/assets/settings-skills-view-DLyWp1pq.js +2 -0
  36. package/dist/public/assets/settings-slash-commands-view-B7OCA_J1.js +1 -0
  37. package/dist/public/assets/settings-subagents-view-CSkVwd-J.js +2 -0
  38. package/dist/public/assets/settings-system-prompt-view-Br6r4RXb.js +1 -0
  39. package/dist/public/assets/settings-view-rUCFRiPR.js +2 -0
  40. package/dist/public/assets/skeleton-qzmFgKhS.js +1 -0
  41. package/dist/public/assets/{terminal-panel-Bm5ECpK_.js → terminal-panel-D3Ru16FT.js} +2 -2
  42. package/dist/public/assets/{ui-components-BZYnvMGc.js → ui-components-f8jJJzEo.js} +1 -1
  43. package/dist/public/assets/{utils-umVhs9to.js → utils-BlXPFbY9.js} +1 -1
  44. package/dist/public/assets/{whisper-wasm-Cq5Ofwpd.js → whisper-wasm-EGutPGND.js} +2 -2
  45. package/dist/public/index.html +12 -9
  46. package/package.json +1 -1
  47. package/dist/public/assets/api-OCjPhv01.js +0 -1
  48. package/dist/public/assets/commit-dialog-8Ce6d3H8.js +0 -1
  49. package/dist/public/assets/context-menu-CMsWrzLD.js +0 -1
  50. package/dist/public/assets/create-repo-dialog-CVUtteNS.js +0 -1
  51. package/dist/public/assets/diff-view-DGfmGlB_.js +0 -3
  52. package/dist/public/assets/explorer-tab-view-CCXVTkVu.js +0 -2
  53. package/dist/public/assets/explorer-view-CupxzDId.js +0 -1
  54. package/dist/public/assets/git-history-dialog-BCGOZ6ua.js +0 -1
  55. package/dist/public/assets/git-ops-button-BV9X3fo-.js +0 -2
  56. package/dist/public/assets/history-view-Ds_0e_bx.js +0 -7
  57. package/dist/public/assets/index-C0lTt0ZK.css +0 -1
  58. package/dist/public/assets/index-DOsSr4dl.js +0 -65
  59. package/dist/public/assets/mcp-server-card-DrUUKNXv.js +0 -1
  60. package/dist/public/assets/merged-pr-dialog-DqWSFdCH.js +0 -1
  61. package/dist/public/assets/onboarding-DfL8a0LZ.js +0 -1
  62. package/dist/public/assets/project-settings-view-Cd_l3Lfy.js +0 -1
  63. package/dist/public/assets/providers-list-view-VXhgM3vp.js +0 -1
  64. package/dist/public/assets/pull-request-dialog-DZXTHHuh.js +0 -1
  65. package/dist/public/assets/pull-with-changes-dialog-CYQrwzcw.js +0 -1
  66. package/dist/public/assets/push-before-pr-dialog-D-ZnRpJi.js +0 -1
  67. package/dist/public/assets/radio-group-c0sU992r.js +0 -1
  68. package/dist/public/assets/settings-general-view-DI-lvP0L.js +0 -1
  69. package/dist/public/assets/settings-instructions-view-kUG32_dT.js +0 -1
  70. package/dist/public/assets/settings-list-CUbZrggr.js +0 -1
  71. package/dist/public/assets/settings-mcp-servers-view-DmxUO42I.js +0 -5
  72. package/dist/public/assets/settings-rules-view-Xx0ymfnQ.js +0 -8
  73. package/dist/public/assets/settings-skills-view-DvPPdsi_.js +0 -2
  74. package/dist/public/assets/settings-slash-commands-view-BULIAW2o.js +0 -1
  75. package/dist/public/assets/settings-subagents-view-B7FcLaZT.js +0 -2
  76. package/dist/public/assets/settings-system-prompt-view-66zf0gRc.js +0 -1
  77. package/dist/public/assets/settings-view-B4CMq7it.js +0 -2
  78. package/dist/public/assets/skeleton-BvSNJL9q.js +0 -1
package/dist/index.js CHANGED
@@ -5859,14 +5859,25 @@ async function fetchLocalModels(apiUrl, apiKey) {
5859
5859
  if (apiKey?.trim()) {
5860
5860
  headers.Authorization = `Bearer ${apiKey.trim()}`;
5861
5861
  }
5862
- const response = await fetch(`${baseUrl}/models`, {
5863
- method: "GET",
5864
- headers
5865
- });
5862
+ let response;
5863
+ try {
5864
+ response = await fetch(`${baseUrl}/models`, {
5865
+ method: "GET",
5866
+ headers
5867
+ });
5868
+ } catch (error) {
5869
+ const detail = error instanceof Error ? error.message : "Unknown error";
5870
+ throw new Error(`Could not reach local API at ${baseUrl}/models: ${detail}`);
5871
+ }
5866
5872
  if (!response.ok) {
5867
5873
  throw new Error(`Local API error: ${response.status} ${response.statusText}`);
5868
5874
  }
5869
- const data = await response.json();
5875
+ let data;
5876
+ try {
5877
+ data = await response.json();
5878
+ } catch {
5879
+ throw new Error(`Local API returned an invalid response from ${baseUrl}/models`);
5880
+ }
5870
5881
  const models = data.data ?? [];
5871
5882
  return models.filter((item) => Boolean(item.id)).map((item) => ({
5872
5883
  id: item.id,
@@ -11943,15 +11954,18 @@ function extractAssistantContent(events, fallback) {
11943
11954
  if (lastTextBlock) {
11944
11955
  return lastTextBlock;
11945
11956
  }
11946
- if (assistantChunks.length === 0) {
11947
- const lastError = [...events].reverse().find((e) => e.type === "error");
11948
- if (lastError && typeof lastError.content === "string" && lastError.content.trim().length > 0) {
11949
- return lastError.content;
11950
- }
11951
- return fallback;
11952
- }
11953
11957
  const combined = assistantChunks.join("");
11954
- return combined.trim().length > 0 ? combined : fallback;
11958
+ if (combined.trim().length > 0) {
11959
+ return combined;
11960
+ }
11961
+ const lastError = [...events].reverse().find((e) => e.type === "error");
11962
+ if (lastError && typeof lastError.content === "string" && lastError.content.trim().length > 0) {
11963
+ return lastError.content;
11964
+ }
11965
+ if (lastError?.error?.message?.trim()) {
11966
+ return lastError.error.message;
11967
+ }
11968
+ return fallback;
11955
11969
  }
11956
11970
 
11957
11971
  // src/features/chat/chat-post.route.ts
@@ -27169,7 +27183,6 @@ import path6 from "path";
27169
27183
  var args = process.argv.slice(2);
27170
27184
  var isDebug = args.includes("--debug");
27171
27185
  var isServerOnly = args.includes("--server");
27172
- var shouldOpenBrowser = args.includes("--open");
27173
27186
  if (!isDebug) {
27174
27187
  console.log = () => {
27175
27188
  };
@@ -27203,5 +27216,5 @@ if (!isDebug) {
27203
27216
  var isDevelopment = process.env.MODE === "development";
27204
27217
  await startTarskServer({
27205
27218
  isDebug,
27206
- openBrowser: !isServerOnly && (shouldOpenBrowser || !isDevelopment)
27219
+ openBrowser: !isServerOnly && !isDevelopment
27207
27220
  });
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Gt as t,K as n,Ti as r,Wa as i,ga as a,ii as o,mo as s,ni as c,ro as l,vi as u}from"./dialogs-config-B4TDFSrS.js";import{C as d,D as f,S as p,v as m}from"./history-view-Ds_0e_bx.js";import{E as h}from"./index-DOsSr4dl.js";import{t as g}from"./skeleton-BvSNJL9q.js";var _=e(s(),1),v=r();function y(){let[e,r]=(0,_.useState)(null),[s,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{r(await n())}catch(e){h({title:`Error`,description:e instanceof Error?e.message:`Failed to load account info`,variant:`destructive`})}finally{y(!1)}}function x(){t(`https://buy.stripe.com/14AcN6feK0Jjbheb2H3Nm03?client_reference_id=${e?.clientReferenceId??``}`)}function S(){t(`https://buy.stripe.com/9B67sMd6CgIh70Y0o33Nm04?client_reference_id=${e?.clientReferenceId??``}`)}if(s)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:o(u.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,v.jsx)(a,{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:o(u.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,v.jsx)(i,{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:o(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)(c,{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)(i,{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:o(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)(c,{onClick:S,className:`shrink-0`,children:`Purchase`})]})]})]})]})})}export{y as default};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Ca as t,Jt as n,Y as r,Za as i,ci as a,ji as o,ui as s,uo as c,wi as l,xo as u}from"./dialogs-config-DZKtVbNK.js";import{C as d,D as f,S as p,v as m}from"./history-view-jX3PPID6.js";import{E as h}from"./index-CbJ3v0Sr.js";import{t as g}from"./skeleton-qzmFgKhS.js";var _=e(u(),1),v=o();function y(){let[e,o]=(0,_.useState)(null),[u,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 r())}catch(e){h({title:`Error`,description:e instanceof Error?e.message:`Failed to load account info`,variant:`destructive`})}finally{y(!1)}}function x(){n(`https://buy.stripe.com/14AcN6feK0Jjbheb2H3Nm03?client_reference_id=${e?.clientReferenceId??``}`)}function S(){n(`https://buy.stripe.com/9B67sMd6CgIh70Y0o33Nm04?client_reference_id=${e?.clientReferenceId??``}`)}if(u)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:s(l.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,v.jsx)(t,{className:`h-4 w-4`}),`Balance`]}),(0,v.jsx)(`div`,{className:`flex items-end gap-2`,children:C?(0,v.jsx)(`span`,{className:l.stat,children:`Unlimited`}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:l.stat,children:e?.promptsRemaining.toLocaleString()??0}),(0,v.jsx)(`span`,{className:`${l.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:s(l.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,v.jsx)(i,{className:`h-4 w-4`}),`Current Plan`]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:l.label,children:C?`Unlimited Pro`:`Pay as you go`}),C&&(0,v.jsx)(`span`,{className:s(l.compact,`rounded-full bg-primary/10 px-2 py-0.5 font-medium text-primary`),children:`Active`})]}),(0,v.jsx)(`p`,{className:l.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:l.label,children:`1,000 Prompts`})}),(0,v.jsx)(`p`,{className:l.bodyMuted,children:`Top up your balance with 1,000 additional prompts for $5.`})]}),(0,v.jsx)(a,{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)(i,{className:`h-4 w-4 text-primary`}),(0,v.jsx)(`span`,{className:l.label,children:`Unlimited Pro Plan`})]}),(0,v.jsx)(`p`,{className:l.bodyMuted,children:`Unlimited prompts for $100 and lifetime access to Tarsk.`}),(0,v.jsxs)(`ul`,{className:s(l.bodyMuted,`space-y-0.5`),children:[(0,v.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,v.jsx)(c,{className:`h-3 w-3 text-primary`}),`Unlimited prompts`]}),(0,v.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,v.jsx)(c,{className:`h-3 w-3 text-primary`}),`Priority access`]})]})]}),(0,v.jsx)(a,{onClick:S,className:`shrink-0`,children:`Purchase`})]})]})]})]})})}export{y as default};
@@ -0,0 +1 @@
1
+ import{In as e,Ln as t,Mn as n,Nn as r,Pn as i,Rn as a,zn as o}from"./dialogs-config-DZKtVbNK.js";async function s(e,t,n=!1){return i(`api/threads/${r(e)}/explorer?path=${encodeURIComponent(t)}&recursive=${n}`)}async function c(e,t){return i(`api/threads/${r(e)}/ai-file?path=${encodeURIComponent(t)}`)}async function l(e,t,n){return o(`api/threads/${r(e)}/ai-file`,{path:t,content:n})}async function u(e,t){return n(`api/threads/${r(e)}/explorer?path=${encodeURIComponent(t)}`)}async function d(e,n,i){return t(`api/threads/${r(e)}/explorer`,{path:n,newName:i})}async function f(e,t,n){return a(`api/threads/${r(e)}/explorer/file`,{dirPath:t,name:n})}async function p(t,n){return e(`api/threads/${r(t)}/explorer/media?path=${encodeURIComponent(n)}`)}async function m(e,t,n){return a(`api/threads/${r(e)}/explorer/folder`,{dirPath:t,name:n})}export{c as a,l as c,p as i,m as n,s as o,u as r,d as s,f as t};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{Bi as t,En as n,Gi as r,Gt as i,Ti as a,Va as o,ar as s,br as c,ea as l,fa as u,fo as d,ii as f,ir as p,mo as m,or as h,rr as g,vi as _}from"./dialogs-config-B4TDFSrS.js";import{C as v,f as y,j as b}from"./index-DOsSr4dl.js";var x=d(),S=e(m(),1),C=a();function w(e){let t=e.trim();return t?(!t.startsWith(`http://`)&&!t.startsWith(`https://`)&&(t=`http://${t}`),t):``}function T(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),e.toggleHidden(!1),e.syncDimensions(!0)}}return r=requestAnimationFrame(i),function(){n=!0,cancelAnimationFrame(r)}}function E(e){let t=(0,x.c)(9),{onClick:n,label:r,children:i,isActive:a}=e,o=`p-1.5 rounded transition-colors ${a!==void 0&&a?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground hover:bg-background/50`}`,s;t[0]!==i||t[1]!==n||t[2]!==o?(s=(0,C.jsx)(h,{asChild:!0,children:(0,C.jsx)(`button`,{type:`button`,onClick:n,className:o,children:i})}),t[0]=i,t[1]=n,t[2]=o,t[3]=s):s=t[3];let c;t[4]===r?c=t[5]:(c=(0,C.jsx)(p,{children:r}),t[4]=r,t[5]=c);let l;return t[6]!==s||t[7]!==c?(l=(0,C.jsxs)(g,{children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function D(){let{activeMainTab:e,devServerUrl:a,browserResetTrigger:d}=v(),p=b(e=>e.selectedProjectId),m=b(e=>e.projects).find(e=>e.projectId===p),[h,g]=(0,S.useState)(``),[x,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(`desktop`),M=(0,S.useRef)(null),N=(0,S.useRef)(O),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=n(),L=e===`browser`;N.current=O,(0,S.useEffect)(()=>{D(``),k(``),g(``);let e=M.current;e&&(e.src=``),P.current&&(P.current.src=``)},[d]),(0,S.useEffect)(()=>{if(!a)return;let e=w(a);g(e),D(e),k(e)},[a]);let R=(0,S.useCallback)(e=>{M.current=e,e&&T(e,N.current)},[]);(0,S.useEffect)(()=>{let e=M.current;if(!(!I||!e||!O))return T(e,O)},[O,I,x]),(0,S.useEffect)(()=>{let e=M.current;!I||!e||(e.toggleHidden(!L),L&&requestAnimationFrame(()=>{e.syncDimensions(!0)}))},[L,I,x]),(0,S.useEffect)(()=>{let e=F.current,t=M.current;if(!I||!e||!t)return;let n=new IntersectionObserver(e=>{let n=e.some(e=>e.isIntersecting);t.toggleHidden(!n),n&&t.syncDimensions(!0)},{threshold:0});return n.observe(e),function(){n.disconnect()}},[I,x]),(0,S.useEffect)(()=>{let e=M.current;if(!I||!e)return;function t(e){let t=typeof e.detail==`string`?e.detail:x;t&&(D(t),k(``),g(t))}function n(e){let t=typeof e.detail==`string`?e.detail:x;t&&(D(t),g(t))}function r(e){let t=e.detail,n=typeof t==`string`?t:typeof t==`object`&&t&&`url`in t?String(t.url):``;n&&i(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)}},[x,I]);function z(e){let t=w(e);t&&(g(t),D(t),k(t))}function B(e){e.key===`Enter`&&z(h)}function V(){if(I){let e=M.current;e&&e.reload();return}let e=P.current;if(!e)return;let t=e.src;e.src=``,requestAnimationFrame(()=>{e.src=t})}let H={desktop:{width:`100%`,height:`100%`},tablet:{width:`768px`,height:`1024px`},mobile:{width:`375px`,height:`667px`}}[A];function U(){return I?(0,S.createElement)(`electrobun-webview`,{ref:R,src:x,renderer:`native`,className:`block h-full w-full bg-background`}):(0,C.jsx)(`iframe`,{ref:P,src:x,className:`h-full w-full border-none`,title:`Browser`})}return(0,C.jsx)(s,{children:(0,C.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,C.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-border px-3 py-2`,children:[(0,C.jsx)(c,{type:`text`,value:h,onChange:e=>g(e.target.value),onKeyDown:B,placeholder:`Enter URL...`,className:f(`flex-1 rounded-full bg-muted font-mono`),spellCheck:!1}),x&&(0,C.jsx)(E,{onClick:V,label:`Refresh page`,children:(0,C.jsx)(l,{size:15})}),x&&(0,C.jsxs)(`div`,{className:`flex items-center rounded-md bg-muted p-0.5`,children:[(0,C.jsx)(E,{onClick:()=>j(`desktop`),label:`Desktop view`,isActive:A===`desktop`,children:(0,C.jsx)(u,{size:15})}),(0,C.jsx)(E,{onClick:()=>j(`tablet`),label:`Tablet view`,isActive:A===`tablet`,children:(0,C.jsx)(t,{size:15})}),(0,C.jsx)(E,{onClick:()=>j(`mobile`),label:`Mobile view`,isActive:A===`mobile`,children:(0,C.jsx)(r,{size:15})})]}),x&&(0,C.jsx)(E,{onClick:()=>void i(x),label:`Open in external browser`,children:(0,C.jsx)(o,{size:15})})]}),x?(0,C.jsx)(`div`,{ref:F,className:`flex min-h-0 flex-1 items-center justify-center bg-background`,children:(0,C.jsx)(`div`,{className:`overflow-hidden border border-border bg-background shadow-sm ${A===`desktop`?`h-full w-full rounded-none border-0 shadow-none`:`rounded-lg`}`,style:{width:H.width,height:H.height,maxWidth:`100%`,maxHeight:`100%`},children:U()})}):(0,C.jsx)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-6 text-muted-foreground`,children:p&&m?.runCommand?(0,C.jsx)(y,{projectId:p,runCommand:m.runCommand,large:!0}):(0,C.jsx)(`p`,{className:_.body,children:`Enter a URL to browse`})})]})})}export{D as BrowserTab};
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{An as t,Er as n,Ja as r,Jt as i,Ki as a,Zi as o,fr as s,hr as c,ji as l,mr as u,oa as d,pr as f,ui as p,wi as m,xo as h,ya as g,yo as _}from"./dialogs-config-DZKtVbNK.js";import{C as v,d as y,j as b}from"./index-CbJ3v0Sr.js";var x=_(),S=e(h(),1),C=l();function w(e){let t=e.trim();return t?(!t.startsWith(`http://`)&&!t.startsWith(`https://`)&&(t=`http://${t}`),t):``}function T(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),e.toggleHidden(!1),e.syncDimensions(!0)}}return r=requestAnimationFrame(i),function(){n=!0,cancelAnimationFrame(r)}}function E(e){let t=(0,x.c)(9),{onClick:n,label:r,children:i,isActive:a}=e,o=`p-1.5 rounded transition-colors ${a!==void 0&&a?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground hover:bg-background/50`}`,l;t[0]!==i||t[1]!==n||t[2]!==o?(l=(0,C.jsx)(c,{asChild:!0,children:(0,C.jsx)(`button`,{type:`button`,onClick:n,className:o,children:i})}),t[0]=i,t[1]=n,t[2]=o,t[3]=l):l=t[3];let u;t[4]===r?u=t[5]:(u=(0,C.jsx)(f,{children:r}),t[4]=r,t[5]=u);let d;return t[6]!==l||t[7]!==u?(d=(0,C.jsxs)(s,{children:[l,u]}),t[6]=l,t[7]=u,t[8]=d):d=t[8],d}function D(){let{activeMainTab:e,devServerUrl:s,browserResetTrigger:c}=v(),l=b(e=>e.selectedProjectId),f=b(e=>e.projects).find(e=>e.projectId===l),[h,_]=(0,S.useState)(``),[x,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(`desktop`),M=(0,S.useRef)(null),N=(0,S.useRef)(O),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=t(),L=e===`browser`;N.current=O,(0,S.useEffect)(()=>{D(``),k(``),_(``);let e=M.current;e&&(e.src=``),P.current&&(P.current.src=``)},[c]),(0,S.useEffect)(()=>{if(!s)return;let e=w(s);_(e),D(e),k(e)},[s]);let R=(0,S.useCallback)(e=>{M.current=e,e&&T(e,N.current)},[]);(0,S.useEffect)(()=>{let e=M.current;if(!(!I||!e||!O))return T(e,O)},[O,I,x]),(0,S.useEffect)(()=>{let e=M.current;!I||!e||(e.toggleHidden(!L),L&&requestAnimationFrame(()=>{e.syncDimensions(!0)}))},[L,I,x]),(0,S.useEffect)(()=>{let e=F.current,t=M.current;if(!I||!e||!t)return;let n=new IntersectionObserver(e=>{let n=e.some(e=>e.isIntersecting);t.toggleHidden(!n),n&&t.syncDimensions(!0)},{threshold:0});return n.observe(e),function(){n.disconnect()}},[I,x]),(0,S.useEffect)(()=>{let e=M.current;if(!I||!e)return;function t(e){let t=typeof e.detail==`string`?e.detail:x;t&&(D(t),k(``),_(t))}function n(e){let t=typeof e.detail==`string`?e.detail:x;t&&(D(t),_(t))}function r(e){let t=e.detail,n=typeof t==`string`?t:typeof t==`object`&&t&&`url`in t?String(t.url):``;n&&i(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)}},[x,I]);function z(e){let t=w(e);t&&(_(t),D(t),k(t))}function B(e){e.key===`Enter`&&z(h)}function V(){if(I){let e=M.current;e&&e.reload();return}let e=P.current;if(!e)return;let t=e.src;e.src=``,requestAnimationFrame(()=>{e.src=t})}let H={desktop:{width:`100%`,height:`100%`},tablet:{width:`768px`,height:`1024px`},mobile:{width:`375px`,height:`667px`}}[A];function U(){return I?(0,S.createElement)(`electrobun-webview`,{ref:R,src:x,renderer:`native`,className:`block h-full w-full bg-background`}):(0,C.jsx)(`iframe`,{ref:P,src:x,className:`h-full w-full border-none`,title:`Browser`})}return(0,C.jsx)(u,{children:(0,C.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,C.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-border px-3 py-2`,children:[(0,C.jsx)(n,{type:`text`,value:h,onChange:e=>_(e.target.value),onKeyDown:B,placeholder:`Enter URL...`,className:p(`flex-1 rounded-full bg-muted font-mono`),spellCheck:!1}),x&&(0,C.jsx)(E,{onClick:V,label:`Refresh page`,children:(0,C.jsx)(d,{size:15})}),x&&(0,C.jsxs)(`div`,{className:`flex items-center rounded-md bg-muted p-0.5`,children:[(0,C.jsx)(E,{onClick:()=>j(`desktop`),label:`Desktop view`,isActive:A===`desktop`,children:(0,C.jsx)(g,{size:15})}),(0,C.jsx)(E,{onClick:()=>j(`tablet`),label:`Tablet view`,isActive:A===`tablet`,children:(0,C.jsx)(a,{size:15})}),(0,C.jsx)(E,{onClick:()=>j(`mobile`),label:`Mobile view`,isActive:A===`mobile`,children:(0,C.jsx)(o,{size:15})})]}),x&&(0,C.jsx)(E,{onClick:()=>void i(x),label:`Open in external browser`,children:(0,C.jsx)(r,{size:15})})]}),x?(0,C.jsx)(`div`,{ref:F,className:`flex min-h-0 flex-1 items-center justify-center bg-background`,children:(0,C.jsx)(`div`,{className:`overflow-hidden border border-border bg-background shadow-sm ${A===`desktop`?`h-full w-full rounded-none border-0 shadow-none`:`rounded-lg`}`,style:{width:H.width,height:H.height,maxWidth:`100%`,maxHeight:`100%`},children:U()})}):(0,C.jsx)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-6 text-muted-foreground`,children:l&&f?.runCommand?(0,C.jsx)(y,{projectId:l,runCommand:f.runCommand,large:!0}):(0,C.jsx)(`p`,{className:m.body,children:`Enter a URL to browse`})})]})})}export{D as BrowserTab};
@@ -0,0 +1 @@
1
+ import{Ar as e,Dr as ee,Ea as te,Mr as t,Or as n,Xi as r,ci as i,fr as a,hr as o,ji as s,jr as c,kr as l,mr as u,pr as d,wi as f,wr as p,yo as m}from"./dialogs-config-DZKtVbNK.js";import{n as ne}from"./onboarding-CxtzQldG.js";import{O as h}from"./index-CbJ3v0Sr.js";var g=m(),_=s();function v(s){let m=(0,g.c)(57),{open:v,onOpenChange:y,commitMessage:b,onCommitMessageChange:x,autoGenerateCommitMessage:S,onAutoGenerateChange:C,isGeneratingMessage:w,isLoading:T,onGenerateMessage:E,onCommit:D,currentBranch:O}=s,k;m[0]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,_.jsx)(t,{children:`Commit Changes`}),m[0]=k):k=m[0];let A;m[1]===O?A=m[2]:(A=(0,_.jsxs)(c,{children:[k,(0,_.jsxs)(l,{children:[`Enter a commit message for your changes on branch `,O]})]}),m[1]=O,m[2]=A);let j;m[3]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(p,{htmlFor:`commit-message`,children:`Commit Message`}),m[3]=j):j=m[3];let M;m[4]===x?M=m[5]:(M=e=>x(e.target.value),m[4]=x,m[5]=M);let N;m[6]!==b||m[7]!==M?(N=(0,_.jsx)(h,{id:`commit-message`,placeholder:`Enter commit message...`,value:b,onChange:M,rows:4,className:`pr-10`}),m[6]=b,m[7]=M,m[8]=N):N=m[8];let P=w||T,F;m[9]===w?F=m[10]:(F=w?(0,_.jsx)(te,{className:`h-3.5 w-3.5 animate-spin`}):(0,_.jsx)(r,{className:`h-3.5 w-3.5`}),m[9]=w,m[10]=F);let I;m[11]!==E||m[12]!==P||m[13]!==F?(I=(0,_.jsx)(o,{asChild:!0,children:(0,_.jsx)(i,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute top-2 right-2 h-6 w-6`,onClick:E,disabled:P,children:F})}),m[11]=E,m[12]=P,m[13]=F,m[14]=I):I=m[14];let L=w?`Generating commit message...`:`Generate commit message with AI`,R;m[15]===L?R=m[16]:(R=(0,_.jsx)(d,{children:L}),m[15]=L,m[16]=R);let z;m[17]!==R||m[18]!==I?(z=(0,_.jsx)(u,{children:(0,_.jsxs)(a,{children:[I,R]})}),m[17]=R,m[18]=I,m[19]=z):z=m[19];let B;m[20]!==z||m[21]!==N?(B=(0,_.jsxs)(`div`,{className:`grid gap-2`,children:[j,(0,_.jsxs)(`div`,{className:`relative`,children:[N,z]})]}),m[20]=z,m[21]=N,m[22]=B):B=m[22];let V;m[23]===C?V=m[24]:(V=e=>C(e===!0),m[23]=C,m[24]=V);let H;m[25]!==S||m[26]!==V?(H=(0,_.jsx)(ne,{id:`auto-generate`,checked:S,onCheckedChange:V}),m[25]=S,m[26]=V,m[27]=H):H=m[27];let U;m[28]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(p,{htmlFor:`auto-generate`,className:f.labelNormal,children:`Auto generate commit messages`}),m[28]=U):U=m[28];let W;m[29]===H?W=m[30]:(W=(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[H,U]}),m[29]=H,m[30]=W);let G;m[31]!==B||m[32]!==W?(G=(0,_.jsxs)(`div`,{className:`grid gap-4 py-4`,children:[B,W]}),m[31]=B,m[32]=W,m[33]=G):G=m[33];let K;m[34]===y?K=m[35]:(K=()=>y(!1),m[34]=y,m[35]=K);let q;m[36]!==T||m[37]!==K?(q=(0,_.jsx)(i,{variant:`outline`,onClick:K,disabled:T,children:`Cancel`}),m[36]=T,m[37]=K,m[38]=q):q=m[38];let J;m[39]!==b||m[40]!==T?(J=T||!b.trim(),m[39]=b,m[40]=T,m[41]=J):J=m[41];let Y=T?`Committing...`:`Commit`,X;m[42]!==D||m[43]!==J||m[44]!==Y?(X=(0,_.jsx)(i,{onClick:D,disabled:J,children:Y}),m[42]=D,m[43]=J,m[44]=Y,m[45]=X):X=m[45];let Z;m[46]!==q||m[47]!==X?(Z=(0,_.jsxs)(e,{children:[q,X]}),m[46]=q,m[47]=X,m[48]=Z):Z=m[48];let Q;m[49]!==G||m[50]!==A||m[51]!==Z?(Q=(0,_.jsxs)(n,{children:[A,G,Z]}),m[49]=G,m[50]=A,m[51]=Z,m[52]=Q):Q=m[52];let $;return m[53]!==y||m[54]!==v||m[55]!==Q?($=(0,_.jsx)(ee,{open:v,onOpenChange:y,children:Q}),m[53]=y,m[54]=v,m[55]=Q,m[56]=$):$=m[56],$}export{v as CommitDialog};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{ji as t,no as n,so as r,ui as i,uo as a,wi as o,xo as s,yo as c}from"./dialogs-config-DZKtVbNK.js";import{_ as l,b as u,d,f,g as p,h as m,m as h,p as g,u as _,v,x as y,y as b}from"./react-vendor-Ba8DSNiO.js";var x=c(),S=e(s(),1),C=t(),w=l,T=y,E=S.forwardRef((e,t)=>{let n=(0,x.c)(14),a,s,c,l;n[0]===e?(a=n[1],s=n[2],c=n[3],l=n[4]):({className:s,inset:c,children:a,...l}=e,n[0]=e,n[1]=a,n[2]=s,n[3]=c,n[4]=l);let d;n[5]!==s||n[6]!==c?(d=i(i(o.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`),c&&`pl-8`,s),n[5]=s,n[6]=c,n[7]=d):d=n[7];let f;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,C.jsx)(r,{className:`ml-auto h-4 w-4`}),n[8]=f):f=n[8];let p;return n[9]!==a||n[10]!==l||n[11]!==t||n[12]!==d?(p=(0,C.jsxs)(u,{ref:t,className:d,...l,children:[a,f]}),n[9]=a,n[10]=l,n[11]=t,n[12]=d,n[13]=p):p=n[13],p});E.displayName=u.displayName;var D=S.forwardRef((e,t)=>{let n=(0,x.c)(9),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=i(`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`,r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==t||n[7]!==o?(s=(0,C.jsx)(b,{ref:t,className:o,...a}),n[5]=a,n[6]=t,n[7]=o,n[8]=s):s=n[8],s});D.displayName=b.displayName;var O=S.forwardRef((e,t)=>{let n=(0,x.c)(9),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=i(`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`,r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==t||n[7]!==o?(s=(0,C.jsx)(m,{children:(0,C.jsx)(d,{ref:t,className:o,...a})}),n[5]=a,n[6]=t,n[7]=o,n[8]=s):s=n[8],s});O.displayName=d.displayName;var k=S.forwardRef((e,t)=>{let n=(0,x.c)(11),r,a,s;n[0]===e?(r=n[1],a=n[2],s=n[3]):({className:r,inset:a,...s}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=s);let c;n[4]!==r||n[5]!==a?(c=i(i(o.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`,r),n[4]=r,n[5]=a,n[6]=c):c=n[6];let l;return n[7]!==s||n[8]!==t||n[9]!==c?(l=(0,C.jsx)(f,{ref:t,className:c,...s}),n[7]=s,n[8]=t,n[9]=c,n[10]=l):l=n[10],l});k.displayName=f.displayName;var A=S.forwardRef((e,t)=>{let n=(0,x.c)(14),r,s,c,l;n[0]===e?(r=n[1],s=n[2],c=n[3],l=n[4]):({className:c,children:s,checked:r,...l}=e,n[0]=e,n[1]=r,n[2]=s,n[3]=c,n[4]=l);let u;n[5]===c?u=n[6]:(u=i(i(o.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`),c),n[5]=c,n[6]=u);let d;n[7]===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)(g,{children:(0,C.jsx)(a,{className:`h-4 w-4`})})}),n[7]=d):d=n[7];let f;return n[8]!==r||n[9]!==s||n[10]!==l||n[11]!==t||n[12]!==u?(f=(0,C.jsxs)(_,{ref:t,className:u,checked:r,...l,children:[d,s]}),n[8]=r,n[9]=s,n[10]=l,n[11]=t,n[12]=u,n[13]=f):f=n[13],f});A.displayName=_.displayName;var j=S.forwardRef((e,t)=>{let r=(0,x.c)(12),a,s,c;r[0]===e?(a=r[1],s=r[2],c=r[3]):({className:s,children:a,...c}=e,r[0]=e,r[1]=a,r[2]=s,r[3]=c);let l;r[4]===s?l=r[5]:(l=i(i(o.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[4]=s,r[5]=l);let u;r[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,C.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,C.jsx)(g,{children:(0,C.jsx)(n,{className:`h-2 w-2 fill-current`})})}),r[6]=u):u=r[6];let d;return r[7]!==a||r[8]!==c||r[9]!==t||r[10]!==l?(d=(0,C.jsxs)(p,{ref:t,className:l,...c,children:[u,a]}),r[7]=a,r[8]=c,r[9]=t,r[10]=l,r[11]=d):d=r[11],d});j.displayName=p.displayName;var M=S.forwardRef((e,t)=>{let n=(0,x.c)(11),r,a,s;n[0]===e?(r=n[1],a=n[2],s=n[3]):({className:r,inset:a,...s}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=s);let c;n[4]!==r||n[5]!==a?(c=i(i(o.body,`px-2 py-1.5 font-semibold text-foreground`),a&&`pl-8`,r),n[4]=r,n[5]=a,n[6]=c):c=n[6];let l;return n[7]!==s||n[8]!==t||n[9]!==c?(l=(0,C.jsx)(h,{ref:t,className:c,...s}),n[7]=s,n[8]=t,n[9]=c,n[10]=l):l=n[10],l});M.displayName=h.displayName;var N=S.forwardRef((e,t)=>{let n=(0,x.c)(9),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=i(`-mx-1 my-1 h-px bg-border`,r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==t||n[7]!==o?(s=(0,C.jsx)(v,{ref:t,className:o,...a}),n[5]=a,n[6]=t,n[7]=o,n[8]=s):s=n[8],s});N.displayName=v.displayName;var P=e=>{let t=(0,x.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(o.compact,`ml-auto tracking-widest text-muted-foreground`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,C.jsx)(`span`,{className:a,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s};P.displayName=`ContextMenuShortcut`;export{T as a,N as i,O as n,k as r,w as t};
@@ -0,0 +1 @@
1
+ import{Ar as e,Dr as t,Er as n,Mr as r,Or as i,ci as a,ji as o,jr as s,kr as c,wi as l,wr as u,yo as d}from"./dialogs-config-DZKtVbNK.js";import{n as f}from"./onboarding-CxtzQldG.js";import{O as p}from"./index-CbJ3v0Sr.js";var m=d(),h=o();function g(o){let d=(0,m.c)(48),{open:g,onOpenChange:_,repoName:v,onRepoNameChange:y,repoDescription:b,onRepoDescriptionChange:x,isPrivateRepo:S,onPrivateRepoChange:C,isLoading:w,onCreateRepo:T}=o,E;d[0]!==_||d[1]!==x||d[2]!==y?(E=e=>{e||(y(``),x(``)),_(e)},d[0]=_,d[1]=x,d[2]=y,d[3]=E):E=d[3];let D;d[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,h.jsxs)(s,{children:[(0,h.jsx)(r,{children:`Create GitHub Repository`}),(0,h.jsx)(c,{children:`Create a new GitHub repository and push your local repository`})]}),d[4]=D):D=d[4];let O;d[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,h.jsx)(u,{htmlFor:`repo-name`,children:`Repository Name (optional)`}),d[5]=O):O=d[5];let k;d[6]===y?k=d[7]:(k=e=>y(e.target.value),d[6]=y,d[7]=k);let A;d[8]!==v||d[9]!==k?(A=(0,h.jsxs)(`div`,{className:`grid gap-2`,children:[O,(0,h.jsx)(n,{id:`repo-name`,placeholder:`Leave empty to use current folder name`,value:v,onChange:k})]}),d[8]=v,d[9]=k,d[10]=A):A=d[10];let j;d[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,h.jsx)(u,{htmlFor:`repo-description`,children:`Description (optional)`}),d[11]=j):j=d[11];let M;d[12]===x?M=d[13]:(M=e=>x(e.target.value),d[12]=x,d[13]=M);let N;d[14]!==b||d[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})]}),d[14]=b,d[15]=M,d[16]=N):N=d[16];let P;d[17]===C?P=d[18]:(P=e=>C(e===!0),d[17]=C,d[18]=P);let F;d[19]!==S||d[20]!==P?(F=(0,h.jsx)(f,{id:`repo-private`,checked:S,onCheckedChange:P}),d[19]=S,d[20]=P,d[21]=F):F=d[21];let I;d[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(u,{htmlFor:`repo-private`,className:l.labelNormal,children:`Private repository`}),d[22]=I):I=d[22];let L;d[23]===F?L=d[24]:(L=(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[F,I]}),d[23]=F,d[24]=L);let R;d[25]!==L||d[26]!==A||d[27]!==N?(R=(0,h.jsxs)(`div`,{className:`grid gap-4 py-4`,children:[A,N,L]}),d[25]=L,d[26]=A,d[27]=N,d[28]=R):R=d[28];let z;d[29]===_?z=d[30]:(z=()=>_(!1),d[29]=_,d[30]=z);let B;d[31]!==w||d[32]!==z?(B=(0,h.jsx)(a,{variant:`outline`,onClick:z,disabled:w,children:`Cancel`}),d[31]=w,d[32]=z,d[33]=B):B=d[33];let V=w?`Creating...`:`Create & Push`,H;d[34]!==w||d[35]!==T||d[36]!==V?(H=(0,h.jsx)(a,{onClick:T,disabled:w,children:V}),d[34]=w,d[35]=T,d[36]=V,d[37]=H):H=d[37];let U;d[38]!==B||d[39]!==H?(U=(0,h.jsxs)(e,{children:[B,H]}),d[38]=B,d[39]=H,d[40]=U):U=d[40];let W;d[41]!==R||d[42]!==U?(W=(0,h.jsxs)(i,{children:[D,R,U]}),d[41]=R,d[42]=U,d[43]=W):W=d[43];let G;return d[44]!==g||d[45]!==E||d[46]!==W?(G=(0,h.jsx)(t,{open:g,onOpenChange:E,children:W}),d[44]=g,d[45]=E,d[46]=W,d[47]=G):G=d[47],G}export{g as CreateRepoDialog};