specrails-desktop 2.6.0 → 2.7.0

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 (48) hide show
  1. package/client/dist/assets/{ActivityFeedPage-CoWwVcty.js → ActivityFeedPage-LKqd18-G.js} +1 -1
  2. package/client/dist/assets/{AgentsPage-CgPvynWc.js → AgentsPage-Cb-b-6Ot.js} +1 -1
  3. package/client/dist/assets/AnalyticsPage-HVxQQ1wy.js +1 -0
  4. package/client/dist/assets/{BarChart-BKXQPcoW.js → BarChart-BOyHB0dw.js} +1 -1
  5. package/client/dist/assets/{CodePage-CYhXRKiI.js → CodePage-DnOnwKGB.js} +1 -1
  6. package/client/dist/assets/{DesktopAnalyticsPage-CBfPCT3q.js → DesktopAnalyticsPage-D2auU39x.js} +1 -1
  7. package/client/dist/assets/{DocsDialog-uRTBV-3T.js → DocsDialog-CTuDX3GK.js} +1 -1
  8. package/client/dist/assets/{DocsPage-gH0Lc54I.js → DocsPage-DRyMmu0Z.js} +1 -1
  9. package/client/dist/assets/{ExportDropdown-DAp7zWib.js → ExportDropdown-DO-GGiMh.js} +1 -1
  10. package/client/dist/assets/{IntegrationsPage-D40Si_7s.js → IntegrationsPage-BhbO4jFT.js} +1 -1
  11. package/client/dist/assets/{JobDetailPage-DSxAvB1n.js → JobDetailPage-DJooEg1s.js} +1 -1
  12. package/client/dist/assets/{JobsPage-ZMBc1BHE.js → JobsPage-BbaC-YOg.js} +1 -1
  13. package/client/dist/assets/{addspec-DeDOztDr.js → addspec-B-BKlvDj.js} +1 -1
  14. package/client/dist/assets/{addspec-v8j6A7CD.js → addspec-BErjOdNK.js} +1 -1
  15. package/client/dist/assets/{addspec-B1FTtI2a.js → addspec-CIGb34PS.js} +1 -1
  16. package/client/dist/assets/{addspec-GWm4ffKl.js → addspec-C_3NBarY.js} +1 -1
  17. package/client/dist/assets/{addspec-Dw-0Dg-4.js → addspec-DDvvnE6N.js} +1 -1
  18. package/client/dist/assets/{addspec-DpRgmfmx.js → addspec-RuL8Zd7w.js} +1 -1
  19. package/client/dist/assets/{addspec-rp496P_F.js → addspec-rmhOaH7N.js} +1 -1
  20. package/client/dist/assets/{addspec-BCT9vm_c.js → addspec-xjDbYZWL.js} +1 -1
  21. package/client/dist/assets/{dist-js-CKqmDyXR.js → dist-js-CiIVMsx3.js} +1 -1
  22. package/client/dist/assets/{dist-js-bTZuok_W.js → dist-js-Xc2lRKp2.js} +1 -1
  23. package/client/dist/assets/{index-B9IKK_QQ.js → index-DK214dak.js} +34 -34
  24. package/client/dist/assets/index-DgKfQFcf.css +2 -0
  25. package/client/dist/assets/{lib-B5mjOeEi.js → lib-Bo5s6xpe.js} +1 -1
  26. package/client/dist/assets/{useProjectCache-Cf83MBQh.js → useProjectCache-DVNypkmR.js} +1 -1
  27. package/client/dist/index.html +3 -3
  28. package/docs/adding-a-provider.md +107 -0
  29. package/docs/agy-cli-provider-study.md +179 -0
  30. package/docs/gemini-cli-provider-study.md +301 -0
  31. package/docs/gemini-core-support-evaluation.md +160 -0
  32. package/docs/gemini.md +106 -0
  33. package/package.json +1 -1
  34. package/server/dist/chat-manager.js +1 -1
  35. package/server/dist/core-package.js +6 -1
  36. package/server/dist/desktop-router.js +27 -8
  37. package/server/dist/explore-cwd-manager.js +1 -1
  38. package/server/dist/mobile/mobile-datachannel.js +65 -4
  39. package/server/dist/pricing.js +13 -0
  40. package/server/dist/project-router-tickets.js +63 -18
  41. package/server/dist/providers/gemini-adapter.js +234 -0
  42. package/server/dist/providers/index.js +4 -1
  43. package/server/dist/setup-manager.js +13 -7
  44. package/server/dist/setup-prerequisites.js +4 -0
  45. package/server/dist/spec-models.js +17 -3
  46. package/server/dist/util/cli-prompt.js +17 -1
  47. package/client/dist/assets/AnalyticsPage-ioz3Ub2D.js +0 -1
  48. package/client/dist/assets/index-BqAXaTbC.css +0 -2
@@ -1,3 +1,3 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{$t as t,C as n,Et as r,L as i,Lt as a,N as o,O as s,Q as c,Qt as l,R as u,Rt as d,S as f,T as p,Tt as m,Y as h,dt as g,ft as _,k as v,q as y,sn as b,st as x,t as S,tn as C,w,zt as T}from"./index-B9IKK_QQ.js";import{t as E}from"./useProjectCache-Cf83MBQh.js";var D=e(b(),1),O=d(),k=[`todo`,`in_progress`,`done`,`cancelled`],A={todo:`todo`,in_progress:`inProgress`,done:`done`,cancelled:`cancelled`};function j({state:e,onChanged:n}){let{t:r}=t(`jira`),i=e.connection,[a,s]=(0,D.useState)(i.enabled),[c,u]=(0,D.useState)(!1),[d,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)([]),[g,_]=(0,D.useState)([]),[v,y]=(0,D.useState)(i.discardStatus??``),[b,x]=(0,D.useState)(i.statusMap??{}),S=e.outbox??{pending:0,inflight:0,done:0,dead:0},C=(0,D.useCallback)(async()=>{try{let{ops:e}=await f.listOutbox(`dead`);h(e)}catch{h([])}},[]);(0,D.useEffect)(()=>{C()},[C]),(0,D.useEffect)(()=>{let e=!1;return f.listStatuses().then(({statuses:t})=>{e||_(t)}).catch(()=>{e||_([])}),()=>{e=!0}},[]);async function w(e){let t=v;y(e);try{await f.patchConnection({discardStatus:e||null}),n()}catch(e){y(t),l.error(N(e,r))}}async function T(e,t){let i=b,a={...b,[e]:t||void 0};x(a);let o=Object.fromEntries(Object.entries(a).filter(([,e])=>e));try{await f.patchConnection({statusMap:Object.keys(o).length?o:null}),n()}catch(e){x(i),l.error(N(e,r))}}async function E(){let e=!a;s(e),p(!0);try{await f.setEnabled(e)}catch(t){s(!e),l.error(N(t,r))}finally{p(!1)}}async function j(){u(!0);try{let e=await f.syncNow();l.success(r(`status.syncedToast`,{count:e.upserted}))}catch(e){l.error(N(e,r))}finally{u(!1)}}async function P(){if(window.confirm(r(`status.disconnectConfirm`))){p(!0);try{await f.disconnect(),l.success(r(`status.disconnectedToast`)),n()}catch(e){l.error(N(e,r))}finally{p(!1)}}}async function F(e){try{await f.retryOutbox(e),await C()}catch(e){l.error(N(e,r))}}let I=S.pending+S.inflight;return(0,O.jsxs)(`div`,{className:`space-y-4`,"data-testid":`jira-connected`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:r(`status.connected`,{key:i.jiraProjectKey})}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[i.baseUrl,` · `,i.deployment===`cloud`?r(`review.cloud`):r(`review.dc`)]})]}),(0,O.jsx)(`a`,{href:`${i.baseUrl}/browse/${i.jiraProjectKey}`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-accent-primary hover:underline`,children:r(`badge.openInJira`)})]}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border border-border p-3`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`status.enabledLabel`)}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(a?`status.enabledHelp`:`status.pausedHelp`)})]}),(0,O.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":a,"aria-label":r(`status.enabledLabel`),disabled:d,onClick:E,className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${a?`bg-accent-success`:`bg-input`}`,children:(0,O.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-background shadow-sm transition-transform ${a?`translate-x-4`:`translate-x-0.5`}`})})]}),(0,O.jsxs)(`div`,{className:`rounded-md border border-border p-3`,"data-testid":`jira-status-map`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`wizard.step3Title`)}),(0,O.jsx)(`p`,{className:`mt-0.5 mb-2 text-xs text-muted-foreground`,children:r(`mapping.intro`)}),(0,O.jsx)(`div`,{className:`space-y-2`,children:k.map(e=>(0,O.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r(`mapping.${A[e]}`)}),(0,O.jsxs)(`select`,{value:b[e]??``,onChange:t=>void T(e,t.target.value),className:`w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm`,"data-testid":`jira-statusmap-${e}`,children:[(0,O.jsx)(`option`,{value:``,children:r(`mapping.auto`)}),g.map(e=>(0,O.jsx)(`option`,{value:e.name,children:e.name},e.id)),b[e]&&!g.some(t=>t.name===b[e])&&(0,O.jsx)(`option`,{value:b[e],children:b[e]})]})]},e))})]}),(0,O.jsxs)(`div`,{className:`rounded-md border border-border p-3`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`discard.configLabel`)}),(0,O.jsx)(`p`,{className:`mt-0.5 mb-2 text-xs text-muted-foreground`,children:r(`discard.configHelp`)}),(0,O.jsxs)(`select`,{value:v,onChange:e=>void w(e.target.value),className:`w-full rounded-md border border-border bg-background px-2 py-1.5 text-sm`,"data-testid":`jira-discard-status-select`,children:[(0,O.jsx)(`option`,{value:``,children:r(`discard.configNone`)}),g.map(e=>(0,O.jsx)(`option`,{value:e.name,children:e.name},e.id)),v&&!g.some(e=>e.name===v)&&(0,O.jsx)(`option`,{value:v,children:v})]})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(o,{variant:`outline`,size:`sm`,onClick:j,disabled:c,children:r(c?`status.syncing`:`status.syncNow`)}),(0,O.jsx)(o,{variant:`ghost`,size:`sm`,onClick:P,disabled:d,className:`text-destructive`,children:r(`status.disconnect`)})]}),(0,O.jsxs)(`div`,{className:`rounded-md border border-border p-3`,"data-testid":`jira-outbox`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`outbox.title`)}),S.dead>0?(0,O.jsx)(`p`,{className:`mt-1 text-xs text-accent-warning`,children:r(`outbox.dead`,{count:S.dead})}):I>0?(0,O.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:r(`outbox.pending`,{count:I})}):(0,O.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:r(`outbox.allSynced`)}),m.length>0&&(0,O.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`outbox.deadHelp`)}),m.map(e=>(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded border border-border/60 px-2 py-1`,children:[(0,O.jsxs)(`span`,{className:`truncate text-xs`,children:[M(e,r),` · `,e.deadReason??e.lastError??``]}),(0,O.jsx)(o,{variant:`outline`,size:`sm`,onClick:()=>F(e.id),children:r(`outbox.retry`)})]},e.id))]})]})]})}function M(e,t){return e.opType===`transition`?t(`outbox.opTransition`):e.opType===`comment`?t(`outbox.opComment`):t(`outbox.opCreate`)}function N(e,t){return e instanceof Error?e.message:t(`errors.generic`)}function P({activeProjectId:e}){let{t:r}=t(`integrations`),[i,a]=(0,D.useState)(null),[o,c]=(0,D.useState)(!0),[l,u]=(0,D.useState)(!1),[d,m]=(0,D.useState)(!1),g=(0,D.useCallback)(async()=>{try{a(await f.getConnection())}catch{a({connected:!1})}finally{c(!1)}},[]);if((0,D.useEffect)(()=>{!n||!e||(c(!0),g())},[e,g]),!n)return null;let y=!!(i?.connected&&i.connection);return(0,O.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 flex flex-col gap-3 h-full`,"data-testid":`jira-integration-card`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`div`,{className:`grid place-items-center w-9 h-9 rounded-md bg-accent-info/15 text-accent-info shrink-0`,children:(0,O.jsx)(h,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:r(`jiraCard.title`)}),y&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-success/20 text-accent-success flex items-center gap-1`,"data-testid":`jira-connected-badge`,children:[(0,O.jsx)(_,{className:`w-3 h-3`}),` `,r(`jiraCard.connected`)]})]}),(0,O.jsx)(`p`,{className:`text-[10px] text-muted-foreground mt-0.5`,children:r(`jiraCard.category`)})]})]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground leading-relaxed`,children:y&&i?.connection?r(`jiraCard.connectedDescription`,{key:i.connection.jiraProjectKey}):r(`jiraCard.description`)}),(0,O.jsxs)(`ul`,{className:`text-xs space-y-1 list-disc pl-4 text-foreground/80`,children:[(0,O.jsx)(`li`,{children:r(`jiraCard.bullet1`)}),(0,O.jsx)(`li`,{children:r(`jiraCard.bullet2`)}),(0,O.jsx)(`li`,{children:r(`jiraCard.bullet3`)})]}),(0,O.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:r(`jiraCard.requires`)}),(0,O.jsx)(`div`,{className:`mt-auto pt-2 flex items-center justify-end gap-2`,children:o?(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`…`}):y?(0,O.jsx)(`button`,{type:`button`,onClick:()=>m(!0),"data-testid":`jira-manage-btn`,className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-muted/30 inline-flex items-center gap-1.5`,children:r(`jiraCard.manage`)}):(0,O.jsxs)(`button`,{type:`button`,onClick:()=>u(!0),"data-testid":`jira-connect-btn`,className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white hover:opacity-90 inline-flex items-center gap-1.5`,children:[(0,O.jsx)(h,{className:`w-3.5 h-3.5`}),r(`jiraCard.connect`)]})}),(0,O.jsx)(w,{open:l,onOpenChange:u,children:(0,O.jsxs)(p,{className:`max-w-lg`,children:[(0,O.jsx)(s,{children:(0,O.jsx)(v,{children:r(`jiraCard.modalTitle`)})}),(0,O.jsx)(S,{onConnected:()=>{u(!1),g()},onSkip:()=>u(!1)})]})}),(0,O.jsx)(w,{open:d,onOpenChange:m,children:(0,O.jsxs)(p,{className:`max-w-lg`,children:[(0,O.jsx)(s,{children:(0,O.jsx)(v,{children:r(`jiraCard.manageTitle`)})}),i?.connected&&i.connection&&(0,O.jsx)(j,{state:i,onChanged:()=>{g().then(()=>m(!1))}})]})})]})}function F(){let{t:e}=t(`integrations`),{activeProjectId:o,projects:s}=r(),c=s.find(e=>e.id===o),l=c?m(c).includes(`claude`):!0,{registerHandler:u,unregisterHandler:d}=a(),f=(0,D.useRef)(o);(0,D.useEffect)(()=>{f.current=o},[o]);let[p,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(null),{data:v,isLoading:b,isFirstLoad:x,refresh:S}=E({namespace:`plugins`,projectId:o,initialValue:[],fetcher:(0,D.useCallback)(async()=>{let e=await fetch(`${T()}/plugins`);if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).plugins??[]},[])});(0,D.useEffect)(()=>(u(`integrations-page`,e=>{let t=e;t.type&&(t.projectId&&t.projectId!==f.current||t.type.startsWith(`plugin.`)&&S())}),()=>d(`integrations-page`)),[u,d,S]),(0,D.useEffect)(()=>{h(!b&&!v?`Failed to load plugins`:null)},[b,v]);let C=(0,D.useMemo)(()=>(v??[]).filter(e=>e.status!==`orphan`),[v]),w=(0,D.useMemo)(()=>(v??[]).filter(e=>e.status===`orphan`),[v]);return o?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,O.jsxs)(`div`,{className:`flex-shrink-0 border-b border-border px-6 pt-4 pb-3 flex items-center gap-2`,children:[(0,O.jsx)(y,{className:`w-4 h-4 text-accent-primary`}),(0,O.jsxs)(`div`,{className:`flex-1`,children:[(0,O.jsx)(`h1`,{className:`text-lg font-semibold`,children:e(`page.title`)}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e(`page.subtitle`)})]})]}),(0,O.jsx)(`div`,{className:`flex-1 overflow-auto p-6`,children:x&&b?(0,O.jsx)(G,{}):p&&l?(0,O.jsx)(K,{onRetry:S}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:[(0,O.jsx)(P,{activeProjectId:o}),l&&C.map(e=>(0,O.jsx)(I,{plugin:e,isInstalling:g===e.name,onInstall:()=>_(e.name),onCloseInstall:()=>{_(null),S()}},e.name))]}),l&&w.length>0&&(0,O.jsxs)(`div`,{className:`mt-10`,children:[(0,O.jsxs)(`h2`,{className:`text-sm font-semibold text-muted-foreground mb-3 flex items-center gap-2`,children:[(0,O.jsx)(i,{className:`w-3.5 h-3.5`}),` `,e(`page.deprecated`)]}),(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:w.map(e=>(0,O.jsx)(V,{plugin:e,onRemoved:S},e.name))})]}),!n&&(!l||C.length===0)&&(0,O.jsx)(q,{})]})})]}):(0,O.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground text-sm`,children:e(`page.selectProject`)})}function I({plugin:e,isInstalling:n,onInstall:r,onCloseInstall:a}){let{t:o}=t(`integrations`),[s,c]=(0,D.useState)(!1);return(0,O.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 flex flex-col gap-3 h-full`,children:[(0,O.jsx)(`div`,{className:`flex items-start gap-2`,children:(0,O.jsxs)(`div`,{className:`flex-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground`,children:[`v`,e.version]}),e.status===`installed`&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-success/20 text-accent-success flex items-center gap-1`,children:[(0,O.jsx)(_,{className:`w-3 h-3`}),` `,o(`card.statusActive`)]}),e.status===`deactivated`&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground flex items-center gap-1`,children:[(0,O.jsx)(g,{className:`w-3 h-3`}),` `,o(`card.statusDeactivated`)]}),e.status===`degraded`&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-warning/20 text-accent-warning flex items-center gap-1`,children:[(0,O.jsx)(i,{className:`w-3 h-3`}),` `,o(`card.statusDegraded`)]}),e.updateAvailable&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-info/20 text-accent-info flex items-center gap-1`,children:[(0,O.jsx)(x,{className:`w-3 h-3`}),` `,o(`card.updateAvailable`)]})]}),e.category&&(0,O.jsx)(`p`,{className:`text-[10px] text-muted-foreground mt-0.5`,children:e.category})]})}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground leading-relaxed`,children:e.description}),e.whatItDoes.length>0&&(0,O.jsx)(`ul`,{className:`text-xs space-y-1 list-disc pl-4 text-foreground/80`,children:e.whatItDoes.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))}),e.requirements.length>0&&(0,O.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:o(`card.requires`,{list:e.requirements.map(e=>`${e.name}${e.minVersion?` ≥ ${e.minVersion}`:``}`).join(`, `)})}),e.healthReason&&e.status===`degraded`&&(0,O.jsx)(`div`,{className:`text-[11px] text-accent-warning`,children:e.healthReason}),e.status===`deactivated`&&(0,O.jsx)(`div`,{className:`text-[11px] text-muted-foreground leading-relaxed`,children:(0,O.jsx)(C,{t:o,i18nKey:`card.deactivatedHint`,components:{strong:(0,O.jsx)(`strong`,{})}})}),e.marketplaceConflicts&&e.marketplaceConflicts.length>0&&(0,O.jsx)(B,{pluginName:e.name,conflicts:e.marketplaceConflicts}),e.marketplaceCachedButDisabled&&e.marketplaceCachedButDisabled.length>0&&(0,O.jsx)(R,{keys:e.marketplaceCachedButDisabled}),e.updateAvailable&&(0,O.jsx)(z,{pluginName:e.name}),(0,O.jsx)(`div`,{className:`mt-auto pt-2 flex items-center justify-end gap-2`,children:e.status===`not-installed`?(0,O.jsx)(`button`,{type:`button`,onClick:r,className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white hover:opacity-90`,children:o(`card.install`)}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(L,{pluginName:e.name,active:e.status===`installed`}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>c(!0),className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-destructive/10 hover:text-destructive flex items-center gap-1.5`,children:[(0,O.jsx)(u,{className:`w-3 h-3`}),` `,o(`card.uninstall`)]})]})}),n&&(0,O.jsx)(H,{pluginName:e.name,onClose:a}),s&&(0,O.jsx)(U,{pluginName:e.name,onClose:()=>c(!1),onUninstalled:()=>{c(!1)}})]})}function L({pluginName:e,active:n}){let{t:r}=t(`integrations`),[i,a]=(0,D.useState)(!1),[o,s]=(0,D.useState)(null);return(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`button`,{type:`button`,disabled:i,onClick:async()=>{a(!0),s(null);try{let t=`${T()}/plugins/${e}/${n?`deactivate`:`activate`}`,r=await fetch(t,{method:`POST`});if(!r.ok)throw Error((await r.json()).error??`HTTP ${r.status}`)}catch(e){s(e.message)}finally{a(!1)}},role:`switch`,"aria-checked":n,className:`relative inline-flex items-center h-5 w-9 rounded-full transition-colors disabled:opacity-50 ${n?`bg-accent-success`:`bg-muted`}`,title:r(n?`toggle.titleActive`:`toggle.titleDeactivated`),children:(0,O.jsx)(`span`,{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${n?`translate-x-4`:`translate-x-0.5`}`})}),(0,O.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:r(n?`card.statusActive`:`common:states.off`)}),o&&(0,O.jsx)(`span`,{className:`text-[10px] text-destructive`,children:o})]})}function R({keys:e}){let{t:n}=t(`integrations`);return(0,O.jsxs)(`div`,{className:`text-[11px] rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-2 leading-relaxed space-y-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,O.jsx)(i,{className:`w-3 h-3 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:(0,O.jsx)(C,{t:n,i18nKey:`cachedNotice.body`,components:{strong:(0,O.jsx)(`strong`,{}),code:(0,O.jsx)(`code`,{className:`bg-muted px-1 rounded`})}})})]}),(0,O.jsx)(`div`,{className:`pl-5 space-y-0.5`,children:e.map(e=>(0,O.jsxs)(`pre`,{className:`text-[10px] bg-muted/40 rounded px-1.5 py-0.5 inline-block font-mono`,children:[`/plugin uninstall `,e]},e))}),(0,O.jsx)(`div`,{className:`pl-5 text-[10px] text-muted-foreground`,children:n(`cachedNotice.runInstruction`)})]})}function z({pluginName:e}){let{t:n}=t(`integrations`),[r,i]=(0,D.useState)(!1),[a,o]=(0,D.useState)(null);return(0,O.jsxs)(`div`,{className:`text-[11px] rounded-md border border-accent-info/30 bg-accent-info/5 p-2 leading-relaxed space-y-1.5`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,O.jsx)(x,{className:`w-3 h-3 text-accent-info mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:(0,O.jsx)(C,{t:n,i18nKey:`update.body`,components:{code:(0,O.jsx)(`code`,{className:`bg-muted px-1 rounded`})}})})]}),(0,O.jsxs)(`button`,{type:`button`,disabled:r,onClick:async()=>{i(!0),o(null);try{let t=await fetch(`${T()}/plugins/${e}/update`,{method:`POST`});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`)}catch(e){o(e.message)}finally{i(!1)}},className:`text-[10px] px-2 py-0.5 rounded border border-accent-info/40 hover:bg-accent-info/10 disabled:opacity-50 flex items-center gap-1`,children:[r&&(0,O.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),(0,O.jsx)(C,{t:n,i18nKey:`update.button`,components:{code:(0,O.jsx)(`code`,{})}})]}),a&&(0,O.jsx)(`div`,{className:`text-destructive text-[10px]`,children:a})]})}function B({pluginName:e,conflicts:n}){let{t:r}=t(`integrations`),[a,o]=(0,D.useState)(null),[s,l]=(0,D.useState)(null),u=async e=>{o(e),l(null);try{let t=await fetch(`${T()}/plugins/_marketplace/disable`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({key:e})});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`)}catch(e){l(e.message)}finally{o(null)}};return(0,O.jsxs)(`div`,{className:`text-[11px] rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-2 leading-relaxed space-y-1.5`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,O.jsx)(i,{className:`w-3 h-3 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:(0,O.jsx)(C,{t:r,i18nKey:`conflict.body`,values:{name:e},components:{strong:(0,O.jsx)(`strong`,{})}})})]}),(0,O.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,children:n.map(e=>(0,O.jsxs)(`button`,{type:`button`,disabled:a===e,onClick:()=>u(e),className:`text-[10px] px-2 py-0.5 rounded border border-yellow-500/40 aurora-light:border-accent-warning/40 hover:bg-yellow-500/10 aurora-light:hover:bg-accent-warning/10 disabled:opacity-50 flex items-center gap-1`,children:[a===e&&(0,O.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),(0,O.jsx)(C,{t:r,i18nKey:`conflict.disableButton`,values:{key:e},components:{code:(0,O.jsx)(`code`,{})}})]},e))}),s&&(0,O.jsx)(`div`,{className:`text-destructive`,children:s})]})}function V({plugin:e,onRemoved:n}){let{t:r}=t(`integrations`),[i,a]=(0,D.useState)(!1);return(0,O.jsxs)(`div`,{className:`rounded-lg border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-4 flex flex-col gap-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,O.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-yellow-500/20 aurora-light:bg-accent-warning/15 text-yellow-500 aurora-light:text-accent-warning`,children:r(`orphan.badge`)})]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),(0,O.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,O.jsxs)(`button`,{type:`button`,disabled:i,onClick:async()=>{a(!0);try{await fetch(`${T()}/plugins/${e.name}`,{method:`DELETE`}),n()}finally{a(!1)}},className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-destructive/10 hover:text-destructive flex items-center gap-1.5`,children:[(0,O.jsx)(u,{className:`w-3 h-3`}),` `,r(`orphan.removeButton`)]})})]})}function H({pluginName:e,onClose:n}){let{t:r}=t(`integrations`),[o,s]=(0,D.useState)(null),[l,u]=(0,D.useState)(null),[d,f]=(0,D.useState)(!1),[p,m]=(0,D.useState)(null),[h,v]=(0,D.useState)([]),[y,b]=(0,D.useState)(null),[S,C]=(0,D.useState)([]),{registerHandler:w,unregisterHandler:E}=a(),k=(0,D.useCallback)(()=>{s(null),u(null),fetch(`${T()}/plugins/${e}/preview-install`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>s(e)).catch(e=>u(e.message))},[e]);(0,D.useEffect)(()=>{k()},[k]),(0,D.useEffect)(()=>(w(`install-${e}`,t=>{let n=t;if(n.type===`plugin.install_progress`&&n.name===e&&n.line&&v(e=>[...e,n.line]),n.type===`plugin.prereq_install_progress`&&n.line&&C(e=>[...e,n.line]),n.type===`plugin.prereq_installed`){b(null);let e=n.reason;e&&C(t=>[...t,`► ${e}`]),n.ok&&k()}}),()=>E(`install-${e}`)),[e,w,E,k]);let A=async e=>{b(e),C([r(`installDialog.installingPrereq`,{name:e})]);try{await fetch(`${T()}/plugins/_prerequisites/${e}/install`,{method:`POST`})}catch(e){C(t=>[...t,r(`installDialog.prereqStartFailed`,{message:e.message})]),b(null)}},j=(o?.requirements??[]).every(e=>e.installed&&e.executable&&e.meetsMinimum);return(0,O.jsxs)(W,{onClose:n,title:r(`installDialog.title`,{name:e}),children:[l&&(0,O.jsx)(`div`,{className:`text-xs text-destructive`,children:l}),!o&&!l&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,O.jsx)(c,{className:`w-3 h-3 animate-spin`}),` `,r(`installDialog.computingChanges`)]}),o&&(0,O.jsxs)(O.Fragment,{children:[o.platformNote&&(0,O.jsxs)(`div`,{className:`flex items-start gap-2 p-2.5 rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 text-[11px] leading-relaxed`,children:[(0,O.jsx)(i,{className:`w-3.5 h-3.5 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:o.platformNote})]}),(0,O.jsxs)(`section`,{children:[(0,O.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:r(`installDialog.filesHeading`)}),(0,O.jsx)(`ul`,{className:`text-xs space-y-0.5 font-mono`,children:o.files.map((e,t)=>(0,O.jsxs)(`li`,{className:e.op===`create`?`text-accent-success`:`text-accent-info`,children:[e.op===`create`?`+ `:`~ `,e.path,e.summary&&(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,e.summary]})]},t))})]}),o.requirements.length>0&&(0,O.jsxs)(`section`,{children:[(0,O.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:r(`installDialog.prerequisites`)}),(0,O.jsx)(`ul`,{className:`text-xs space-y-1`,children:o.requirements.map(e=>{let t=e.installed&&e.executable&&e.meetsMinimum,n=e.name===`uv`;return(0,O.jsxs)(`li`,{className:`flex items-center gap-2`,children:[t?(0,O.jsx)(_,{className:`w-3 h-3 text-accent-success`}):(0,O.jsx)(g,{className:`w-3 h-3 text-accent-warning`}),(0,O.jsxs)(`span`,{children:[e.name,e.minVersion?` ≥ ${e.minVersion}`:``]}),e.version&&(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.version,`)`]}),!t&&n&&(0,O.jsxs)(`button`,{type:`button`,disabled:y===e.name,onClick:()=>A(e.name),className:`ml-auto text-[10px] px-2 py-0.5 rounded border border-border hover:bg-muted disabled:opacity-50 flex items-center gap-1`,children:[y===e.name&&(0,O.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),r(`installDialog.autoInstall`)]})]},e.name)})}),S.length>0&&(0,O.jsx)(`pre`,{className:`mt-2 text-[11px] bg-muted/40 rounded p-2 max-h-24 overflow-auto font-mono`,children:S.join(`
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{$t as t,C as n,Et as r,L as i,Lt as a,N as o,O as s,Q as c,Qt as l,R as u,Rt as d,S as f,T as p,Tt as m,Y as h,dt as g,ft as _,k as v,q as y,sn as b,st as x,t as S,tn as C,w,zt as T}from"./index-DK214dak.js";import{t as E}from"./useProjectCache-DVNypkmR.js";var D=e(b(),1),O=d(),k=[`todo`,`in_progress`,`done`,`cancelled`],A={todo:`todo`,in_progress:`inProgress`,done:`done`,cancelled:`cancelled`};function j({state:e,onChanged:n}){let{t:r}=t(`jira`),i=e.connection,[a,s]=(0,D.useState)(i.enabled),[c,u]=(0,D.useState)(!1),[d,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)([]),[g,_]=(0,D.useState)([]),[v,y]=(0,D.useState)(i.discardStatus??``),[b,x]=(0,D.useState)(i.statusMap??{}),S=e.outbox??{pending:0,inflight:0,done:0,dead:0},C=(0,D.useCallback)(async()=>{try{let{ops:e}=await f.listOutbox(`dead`);h(e)}catch{h([])}},[]);(0,D.useEffect)(()=>{C()},[C]),(0,D.useEffect)(()=>{let e=!1;return f.listStatuses().then(({statuses:t})=>{e||_(t)}).catch(()=>{e||_([])}),()=>{e=!0}},[]);async function w(e){let t=v;y(e);try{await f.patchConnection({discardStatus:e||null}),n()}catch(e){y(t),l.error(N(e,r))}}async function T(e,t){let i=b,a={...b,[e]:t||void 0};x(a);let o=Object.fromEntries(Object.entries(a).filter(([,e])=>e));try{await f.patchConnection({statusMap:Object.keys(o).length?o:null}),n()}catch(e){x(i),l.error(N(e,r))}}async function E(){let e=!a;s(e),p(!0);try{await f.setEnabled(e)}catch(t){s(!e),l.error(N(t,r))}finally{p(!1)}}async function j(){u(!0);try{let e=await f.syncNow();l.success(r(`status.syncedToast`,{count:e.upserted}))}catch(e){l.error(N(e,r))}finally{u(!1)}}async function P(){if(window.confirm(r(`status.disconnectConfirm`))){p(!0);try{await f.disconnect(),l.success(r(`status.disconnectedToast`)),n()}catch(e){l.error(N(e,r))}finally{p(!1)}}}async function F(e){try{await f.retryOutbox(e),await C()}catch(e){l.error(N(e,r))}}let I=S.pending+S.inflight;return(0,O.jsxs)(`div`,{className:`space-y-4`,"data-testid":`jira-connected`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:r(`status.connected`,{key:i.jiraProjectKey})}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[i.baseUrl,` · `,i.deployment===`cloud`?r(`review.cloud`):r(`review.dc`)]})]}),(0,O.jsx)(`a`,{href:`${i.baseUrl}/browse/${i.jiraProjectKey}`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-accent-primary hover:underline`,children:r(`badge.openInJira`)})]}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border border-border p-3`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`status.enabledLabel`)}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(a?`status.enabledHelp`:`status.pausedHelp`)})]}),(0,O.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":a,"aria-label":r(`status.enabledLabel`),disabled:d,onClick:E,className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${a?`bg-accent-success`:`bg-input`}`,children:(0,O.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-background shadow-sm transition-transform ${a?`translate-x-4`:`translate-x-0.5`}`})})]}),(0,O.jsxs)(`div`,{className:`rounded-md border border-border p-3`,"data-testid":`jira-status-map`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`wizard.step3Title`)}),(0,O.jsx)(`p`,{className:`mt-0.5 mb-2 text-xs text-muted-foreground`,children:r(`mapping.intro`)}),(0,O.jsx)(`div`,{className:`space-y-2`,children:k.map(e=>(0,O.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r(`mapping.${A[e]}`)}),(0,O.jsxs)(`select`,{value:b[e]??``,onChange:t=>void T(e,t.target.value),className:`w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm`,"data-testid":`jira-statusmap-${e}`,children:[(0,O.jsx)(`option`,{value:``,children:r(`mapping.auto`)}),g.map(e=>(0,O.jsx)(`option`,{value:e.name,children:e.name},e.id)),b[e]&&!g.some(t=>t.name===b[e])&&(0,O.jsx)(`option`,{value:b[e],children:b[e]})]})]},e))})]}),(0,O.jsxs)(`div`,{className:`rounded-md border border-border p-3`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`discard.configLabel`)}),(0,O.jsx)(`p`,{className:`mt-0.5 mb-2 text-xs text-muted-foreground`,children:r(`discard.configHelp`)}),(0,O.jsxs)(`select`,{value:v,onChange:e=>void w(e.target.value),className:`w-full rounded-md border border-border bg-background px-2 py-1.5 text-sm`,"data-testid":`jira-discard-status-select`,children:[(0,O.jsx)(`option`,{value:``,children:r(`discard.configNone`)}),g.map(e=>(0,O.jsx)(`option`,{value:e.name,children:e.name},e.id)),v&&!g.some(e=>e.name===v)&&(0,O.jsx)(`option`,{value:v,children:v})]})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(o,{variant:`outline`,size:`sm`,onClick:j,disabled:c,children:r(c?`status.syncing`:`status.syncNow`)}),(0,O.jsx)(o,{variant:`ghost`,size:`sm`,onClick:P,disabled:d,className:`text-destructive`,children:r(`status.disconnect`)})]}),(0,O.jsxs)(`div`,{className:`rounded-md border border-border p-3`,"data-testid":`jira-outbox`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:r(`outbox.title`)}),S.dead>0?(0,O.jsx)(`p`,{className:`mt-1 text-xs text-accent-warning`,children:r(`outbox.dead`,{count:S.dead})}):I>0?(0,O.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:r(`outbox.pending`,{count:I})}):(0,O.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:r(`outbox.allSynced`)}),m.length>0&&(0,O.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`outbox.deadHelp`)}),m.map(e=>(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded border border-border/60 px-2 py-1`,children:[(0,O.jsxs)(`span`,{className:`truncate text-xs`,children:[M(e,r),` · `,e.deadReason??e.lastError??``]}),(0,O.jsx)(o,{variant:`outline`,size:`sm`,onClick:()=>F(e.id),children:r(`outbox.retry`)})]},e.id))]})]})]})}function M(e,t){return e.opType===`transition`?t(`outbox.opTransition`):e.opType===`comment`?t(`outbox.opComment`):t(`outbox.opCreate`)}function N(e,t){return e instanceof Error?e.message:t(`errors.generic`)}function P({activeProjectId:e}){let{t:r}=t(`integrations`),[i,a]=(0,D.useState)(null),[o,c]=(0,D.useState)(!0),[l,u]=(0,D.useState)(!1),[d,m]=(0,D.useState)(!1),g=(0,D.useCallback)(async()=>{try{a(await f.getConnection())}catch{a({connected:!1})}finally{c(!1)}},[]);if((0,D.useEffect)(()=>{!n||!e||(c(!0),g())},[e,g]),!n)return null;let y=!!(i?.connected&&i.connection);return(0,O.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 flex flex-col gap-3 h-full`,"data-testid":`jira-integration-card`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`div`,{className:`grid place-items-center w-9 h-9 rounded-md bg-accent-info/15 text-accent-info shrink-0`,children:(0,O.jsx)(h,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:r(`jiraCard.title`)}),y&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-success/20 text-accent-success flex items-center gap-1`,"data-testid":`jira-connected-badge`,children:[(0,O.jsx)(_,{className:`w-3 h-3`}),` `,r(`jiraCard.connected`)]})]}),(0,O.jsx)(`p`,{className:`text-[10px] text-muted-foreground mt-0.5`,children:r(`jiraCard.category`)})]})]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground leading-relaxed`,children:y&&i?.connection?r(`jiraCard.connectedDescription`,{key:i.connection.jiraProjectKey}):r(`jiraCard.description`)}),(0,O.jsxs)(`ul`,{className:`text-xs space-y-1 list-disc pl-4 text-foreground/80`,children:[(0,O.jsx)(`li`,{children:r(`jiraCard.bullet1`)}),(0,O.jsx)(`li`,{children:r(`jiraCard.bullet2`)}),(0,O.jsx)(`li`,{children:r(`jiraCard.bullet3`)})]}),(0,O.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:r(`jiraCard.requires`)}),(0,O.jsx)(`div`,{className:`mt-auto pt-2 flex items-center justify-end gap-2`,children:o?(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`…`}):y?(0,O.jsx)(`button`,{type:`button`,onClick:()=>m(!0),"data-testid":`jira-manage-btn`,className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-muted/30 inline-flex items-center gap-1.5`,children:r(`jiraCard.manage`)}):(0,O.jsxs)(`button`,{type:`button`,onClick:()=>u(!0),"data-testid":`jira-connect-btn`,className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white hover:opacity-90 inline-flex items-center gap-1.5`,children:[(0,O.jsx)(h,{className:`w-3.5 h-3.5`}),r(`jiraCard.connect`)]})}),(0,O.jsx)(w,{open:l,onOpenChange:u,children:(0,O.jsxs)(p,{className:`max-w-lg`,children:[(0,O.jsx)(s,{children:(0,O.jsx)(v,{children:r(`jiraCard.modalTitle`)})}),(0,O.jsx)(S,{onConnected:()=>{u(!1),g()},onSkip:()=>u(!1)})]})}),(0,O.jsx)(w,{open:d,onOpenChange:m,children:(0,O.jsxs)(p,{className:`max-w-lg`,children:[(0,O.jsx)(s,{children:(0,O.jsx)(v,{children:r(`jiraCard.manageTitle`)})}),i?.connected&&i.connection&&(0,O.jsx)(j,{state:i,onChanged:()=>{g().then(()=>m(!1))}})]})})]})}function F(){let{t:e}=t(`integrations`),{activeProjectId:o,projects:s}=r(),c=s.find(e=>e.id===o),l=c?m(c).includes(`claude`):!0,{registerHandler:u,unregisterHandler:d}=a(),f=(0,D.useRef)(o);(0,D.useEffect)(()=>{f.current=o},[o]);let[p,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(null),{data:v,isLoading:b,isFirstLoad:x,refresh:S}=E({namespace:`plugins`,projectId:o,initialValue:[],fetcher:(0,D.useCallback)(async()=>{let e=await fetch(`${T()}/plugins`);if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).plugins??[]},[])});(0,D.useEffect)(()=>(u(`integrations-page`,e=>{let t=e;t.type&&(t.projectId&&t.projectId!==f.current||t.type.startsWith(`plugin.`)&&S())}),()=>d(`integrations-page`)),[u,d,S]),(0,D.useEffect)(()=>{h(!b&&!v?`Failed to load plugins`:null)},[b,v]);let C=(0,D.useMemo)(()=>(v??[]).filter(e=>e.status!==`orphan`),[v]),w=(0,D.useMemo)(()=>(v??[]).filter(e=>e.status===`orphan`),[v]);return o?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,O.jsxs)(`div`,{className:`flex-shrink-0 border-b border-border px-6 pt-4 pb-3 flex items-center gap-2`,children:[(0,O.jsx)(y,{className:`w-4 h-4 text-accent-primary`}),(0,O.jsxs)(`div`,{className:`flex-1`,children:[(0,O.jsx)(`h1`,{className:`text-lg font-semibold`,children:e(`page.title`)}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e(`page.subtitle`)})]})]}),(0,O.jsx)(`div`,{className:`flex-1 overflow-auto p-6`,children:x&&b?(0,O.jsx)(G,{}):p&&l?(0,O.jsx)(K,{onRetry:S}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:[(0,O.jsx)(P,{activeProjectId:o}),l&&C.map(e=>(0,O.jsx)(I,{plugin:e,isInstalling:g===e.name,onInstall:()=>_(e.name),onCloseInstall:()=>{_(null),S()}},e.name))]}),l&&w.length>0&&(0,O.jsxs)(`div`,{className:`mt-10`,children:[(0,O.jsxs)(`h2`,{className:`text-sm font-semibold text-muted-foreground mb-3 flex items-center gap-2`,children:[(0,O.jsx)(i,{className:`w-3.5 h-3.5`}),` `,e(`page.deprecated`)]}),(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:w.map(e=>(0,O.jsx)(V,{plugin:e,onRemoved:S},e.name))})]}),!n&&(!l||C.length===0)&&(0,O.jsx)(q,{})]})})]}):(0,O.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground text-sm`,children:e(`page.selectProject`)})}function I({plugin:e,isInstalling:n,onInstall:r,onCloseInstall:a}){let{t:o}=t(`integrations`),[s,c]=(0,D.useState)(!1);return(0,O.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 flex flex-col gap-3 h-full`,children:[(0,O.jsx)(`div`,{className:`flex items-start gap-2`,children:(0,O.jsxs)(`div`,{className:`flex-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground`,children:[`v`,e.version]}),e.status===`installed`&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-success/20 text-accent-success flex items-center gap-1`,children:[(0,O.jsx)(_,{className:`w-3 h-3`}),` `,o(`card.statusActive`)]}),e.status===`deactivated`&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground flex items-center gap-1`,children:[(0,O.jsx)(g,{className:`w-3 h-3`}),` `,o(`card.statusDeactivated`)]}),e.status===`degraded`&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-warning/20 text-accent-warning flex items-center gap-1`,children:[(0,O.jsx)(i,{className:`w-3 h-3`}),` `,o(`card.statusDegraded`)]}),e.updateAvailable&&(0,O.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-info/20 text-accent-info flex items-center gap-1`,children:[(0,O.jsx)(x,{className:`w-3 h-3`}),` `,o(`card.updateAvailable`)]})]}),e.category&&(0,O.jsx)(`p`,{className:`text-[10px] text-muted-foreground mt-0.5`,children:e.category})]})}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground leading-relaxed`,children:e.description}),e.whatItDoes.length>0&&(0,O.jsx)(`ul`,{className:`text-xs space-y-1 list-disc pl-4 text-foreground/80`,children:e.whatItDoes.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))}),e.requirements.length>0&&(0,O.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:o(`card.requires`,{list:e.requirements.map(e=>`${e.name}${e.minVersion?` ≥ ${e.minVersion}`:``}`).join(`, `)})}),e.healthReason&&e.status===`degraded`&&(0,O.jsx)(`div`,{className:`text-[11px] text-accent-warning`,children:e.healthReason}),e.status===`deactivated`&&(0,O.jsx)(`div`,{className:`text-[11px] text-muted-foreground leading-relaxed`,children:(0,O.jsx)(C,{t:o,i18nKey:`card.deactivatedHint`,components:{strong:(0,O.jsx)(`strong`,{})}})}),e.marketplaceConflicts&&e.marketplaceConflicts.length>0&&(0,O.jsx)(B,{pluginName:e.name,conflicts:e.marketplaceConflicts}),e.marketplaceCachedButDisabled&&e.marketplaceCachedButDisabled.length>0&&(0,O.jsx)(R,{keys:e.marketplaceCachedButDisabled}),e.updateAvailable&&(0,O.jsx)(z,{pluginName:e.name}),(0,O.jsx)(`div`,{className:`mt-auto pt-2 flex items-center justify-end gap-2`,children:e.status===`not-installed`?(0,O.jsx)(`button`,{type:`button`,onClick:r,className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white hover:opacity-90`,children:o(`card.install`)}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(L,{pluginName:e.name,active:e.status===`installed`}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>c(!0),className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-destructive/10 hover:text-destructive flex items-center gap-1.5`,children:[(0,O.jsx)(u,{className:`w-3 h-3`}),` `,o(`card.uninstall`)]})]})}),n&&(0,O.jsx)(H,{pluginName:e.name,onClose:a}),s&&(0,O.jsx)(U,{pluginName:e.name,onClose:()=>c(!1),onUninstalled:()=>{c(!1)}})]})}function L({pluginName:e,active:n}){let{t:r}=t(`integrations`),[i,a]=(0,D.useState)(!1),[o,s]=(0,D.useState)(null);return(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`button`,{type:`button`,disabled:i,onClick:async()=>{a(!0),s(null);try{let t=`${T()}/plugins/${e}/${n?`deactivate`:`activate`}`,r=await fetch(t,{method:`POST`});if(!r.ok)throw Error((await r.json()).error??`HTTP ${r.status}`)}catch(e){s(e.message)}finally{a(!1)}},role:`switch`,"aria-checked":n,className:`relative inline-flex items-center h-5 w-9 rounded-full transition-colors disabled:opacity-50 ${n?`bg-accent-success`:`bg-muted`}`,title:r(n?`toggle.titleActive`:`toggle.titleDeactivated`),children:(0,O.jsx)(`span`,{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${n?`translate-x-4`:`translate-x-0.5`}`})}),(0,O.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:r(n?`card.statusActive`:`common:states.off`)}),o&&(0,O.jsx)(`span`,{className:`text-[10px] text-destructive`,children:o})]})}function R({keys:e}){let{t:n}=t(`integrations`);return(0,O.jsxs)(`div`,{className:`text-[11px] rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-2 leading-relaxed space-y-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,O.jsx)(i,{className:`w-3 h-3 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:(0,O.jsx)(C,{t:n,i18nKey:`cachedNotice.body`,components:{strong:(0,O.jsx)(`strong`,{}),code:(0,O.jsx)(`code`,{className:`bg-muted px-1 rounded`})}})})]}),(0,O.jsx)(`div`,{className:`pl-5 space-y-0.5`,children:e.map(e=>(0,O.jsxs)(`pre`,{className:`text-[10px] bg-muted/40 rounded px-1.5 py-0.5 inline-block font-mono`,children:[`/plugin uninstall `,e]},e))}),(0,O.jsx)(`div`,{className:`pl-5 text-[10px] text-muted-foreground`,children:n(`cachedNotice.runInstruction`)})]})}function z({pluginName:e}){let{t:n}=t(`integrations`),[r,i]=(0,D.useState)(!1),[a,o]=(0,D.useState)(null);return(0,O.jsxs)(`div`,{className:`text-[11px] rounded-md border border-accent-info/30 bg-accent-info/5 p-2 leading-relaxed space-y-1.5`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,O.jsx)(x,{className:`w-3 h-3 text-accent-info mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:(0,O.jsx)(C,{t:n,i18nKey:`update.body`,components:{code:(0,O.jsx)(`code`,{className:`bg-muted px-1 rounded`})}})})]}),(0,O.jsxs)(`button`,{type:`button`,disabled:r,onClick:async()=>{i(!0),o(null);try{let t=await fetch(`${T()}/plugins/${e}/update`,{method:`POST`});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`)}catch(e){o(e.message)}finally{i(!1)}},className:`text-[10px] px-2 py-0.5 rounded border border-accent-info/40 hover:bg-accent-info/10 disabled:opacity-50 flex items-center gap-1`,children:[r&&(0,O.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),(0,O.jsx)(C,{t:n,i18nKey:`update.button`,components:{code:(0,O.jsx)(`code`,{})}})]}),a&&(0,O.jsx)(`div`,{className:`text-destructive text-[10px]`,children:a})]})}function B({pluginName:e,conflicts:n}){let{t:r}=t(`integrations`),[a,o]=(0,D.useState)(null),[s,l]=(0,D.useState)(null),u=async e=>{o(e),l(null);try{let t=await fetch(`${T()}/plugins/_marketplace/disable`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({key:e})});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`)}catch(e){l(e.message)}finally{o(null)}};return(0,O.jsxs)(`div`,{className:`text-[11px] rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-2 leading-relaxed space-y-1.5`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,O.jsx)(i,{className:`w-3 h-3 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:(0,O.jsx)(C,{t:r,i18nKey:`conflict.body`,values:{name:e},components:{strong:(0,O.jsx)(`strong`,{})}})})]}),(0,O.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,children:n.map(e=>(0,O.jsxs)(`button`,{type:`button`,disabled:a===e,onClick:()=>u(e),className:`text-[10px] px-2 py-0.5 rounded border border-yellow-500/40 aurora-light:border-accent-warning/40 hover:bg-yellow-500/10 aurora-light:hover:bg-accent-warning/10 disabled:opacity-50 flex items-center gap-1`,children:[a===e&&(0,O.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),(0,O.jsx)(C,{t:r,i18nKey:`conflict.disableButton`,values:{key:e},components:{code:(0,O.jsx)(`code`,{})}})]},e))}),s&&(0,O.jsx)(`div`,{className:`text-destructive`,children:s})]})}function V({plugin:e,onRemoved:n}){let{t:r}=t(`integrations`),[i,a]=(0,D.useState)(!1);return(0,O.jsxs)(`div`,{className:`rounded-lg border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-4 flex flex-col gap-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,O.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-yellow-500/20 aurora-light:bg-accent-warning/15 text-yellow-500 aurora-light:text-accent-warning`,children:r(`orphan.badge`)})]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),(0,O.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,O.jsxs)(`button`,{type:`button`,disabled:i,onClick:async()=>{a(!0);try{await fetch(`${T()}/plugins/${e.name}`,{method:`DELETE`}),n()}finally{a(!1)}},className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-destructive/10 hover:text-destructive flex items-center gap-1.5`,children:[(0,O.jsx)(u,{className:`w-3 h-3`}),` `,r(`orphan.removeButton`)]})})]})}function H({pluginName:e,onClose:n}){let{t:r}=t(`integrations`),[o,s]=(0,D.useState)(null),[l,u]=(0,D.useState)(null),[d,f]=(0,D.useState)(!1),[p,m]=(0,D.useState)(null),[h,v]=(0,D.useState)([]),[y,b]=(0,D.useState)(null),[S,C]=(0,D.useState)([]),{registerHandler:w,unregisterHandler:E}=a(),k=(0,D.useCallback)(()=>{s(null),u(null),fetch(`${T()}/plugins/${e}/preview-install`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>s(e)).catch(e=>u(e.message))},[e]);(0,D.useEffect)(()=>{k()},[k]),(0,D.useEffect)(()=>(w(`install-${e}`,t=>{let n=t;if(n.type===`plugin.install_progress`&&n.name===e&&n.line&&v(e=>[...e,n.line]),n.type===`plugin.prereq_install_progress`&&n.line&&C(e=>[...e,n.line]),n.type===`plugin.prereq_installed`){b(null);let e=n.reason;e&&C(t=>[...t,`► ${e}`]),n.ok&&k()}}),()=>E(`install-${e}`)),[e,w,E,k]);let A=async e=>{b(e),C([r(`installDialog.installingPrereq`,{name:e})]);try{await fetch(`${T()}/plugins/_prerequisites/${e}/install`,{method:`POST`})}catch(e){C(t=>[...t,r(`installDialog.prereqStartFailed`,{message:e.message})]),b(null)}},j=(o?.requirements??[]).every(e=>e.installed&&e.executable&&e.meetsMinimum);return(0,O.jsxs)(W,{onClose:n,title:r(`installDialog.title`,{name:e}),children:[l&&(0,O.jsx)(`div`,{className:`text-xs text-destructive`,children:l}),!o&&!l&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,O.jsx)(c,{className:`w-3 h-3 animate-spin`}),` `,r(`installDialog.computingChanges`)]}),o&&(0,O.jsxs)(O.Fragment,{children:[o.platformNote&&(0,O.jsxs)(`div`,{className:`flex items-start gap-2 p-2.5 rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 text-[11px] leading-relaxed`,children:[(0,O.jsx)(i,{className:`w-3.5 h-3.5 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,O.jsx)(`span`,{children:o.platformNote})]}),(0,O.jsxs)(`section`,{children:[(0,O.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:r(`installDialog.filesHeading`)}),(0,O.jsx)(`ul`,{className:`text-xs space-y-0.5 font-mono`,children:o.files.map((e,t)=>(0,O.jsxs)(`li`,{className:e.op===`create`?`text-accent-success`:`text-accent-info`,children:[e.op===`create`?`+ `:`~ `,e.path,e.summary&&(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,e.summary]})]},t))})]}),o.requirements.length>0&&(0,O.jsxs)(`section`,{children:[(0,O.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:r(`installDialog.prerequisites`)}),(0,O.jsx)(`ul`,{className:`text-xs space-y-1`,children:o.requirements.map(e=>{let t=e.installed&&e.executable&&e.meetsMinimum,n=e.name===`uv`;return(0,O.jsxs)(`li`,{className:`flex items-center gap-2`,children:[t?(0,O.jsx)(_,{className:`w-3 h-3 text-accent-success`}):(0,O.jsx)(g,{className:`w-3 h-3 text-accent-warning`}),(0,O.jsxs)(`span`,{children:[e.name,e.minVersion?` ≥ ${e.minVersion}`:``]}),e.version&&(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.version,`)`]}),!t&&n&&(0,O.jsxs)(`button`,{type:`button`,disabled:y===e.name,onClick:()=>A(e.name),className:`ml-auto text-[10px] px-2 py-0.5 rounded border border-border hover:bg-muted disabled:opacity-50 flex items-center gap-1`,children:[y===e.name&&(0,O.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),r(`installDialog.autoInstall`)]})]},e.name)})}),S.length>0&&(0,O.jsx)(`pre`,{className:`mt-2 text-[11px] bg-muted/40 rounded p-2 max-h-24 overflow-auto font-mono`,children:S.join(`
2
2
  `)})]}),h.length>0&&(0,O.jsxs)(`section`,{children:[(0,O.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:r(`installDialog.progress`)}),(0,O.jsx)(`pre`,{className:`text-[11px] bg-muted/40 rounded p-2 max-h-32 overflow-auto font-mono`,children:h.join(`
3
3
  `)})]}),p&&(0,O.jsx)(`div`,{className:`text-xs text-destructive`,children:p})]}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs px-3 py-1.5 rounded-md border border-border`,children:r(`common:actions.cancel`)}),(0,O.jsxs)(`button`,{type:`button`,disabled:!o||!j||d,onClick:async()=>{f(!0),m(null);try{let t=await fetch(`${T()}/plugins/${e}/install`,{method:`POST`});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`);setTimeout(n,1500)}catch(e){m(e.message)}finally{f(!1)}},className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white disabled:opacity-50 flex items-center gap-1.5`,children:[d?(0,O.jsx)(c,{className:`w-3 h-3 animate-spin`}):(0,O.jsx)(x,{className:`w-3 h-3`}),r(`card.install`)]})]})]})}function U({pluginName:e,onClose:n,onUninstalled:r}){let{t:i}=t(`integrations`),[a,o]=(0,D.useState)(!1),[s,l]=(0,D.useState)(null);return(0,O.jsxs)(W,{onClose:n,title:i(`uninstallDialog.title`,{name:e}),children:[(0,O.jsx)(`p`,{className:`text-xs`,children:(0,O.jsx)(C,{t:i,i18nKey:`uninstallDialog.body`,components:{code:(0,O.jsx)(`code`,{})}})}),s&&(0,O.jsx)(`div`,{className:`text-xs text-destructive`,children:s}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs px-3 py-1.5 rounded-md border border-border`,children:i(`common:actions.cancel`)}),(0,O.jsxs)(`button`,{type:`button`,disabled:a,onClick:async()=>{o(!0);try{let t=await fetch(`${T()}/plugins/${e}`,{method:`DELETE`});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`);r()}catch(e){l(e.message)}finally{o(!1)}},className:`text-xs px-3 py-1.5 rounded-md bg-destructive text-white disabled:opacity-50 flex items-center gap-1.5`,children:[a&&(0,O.jsx)(c,{className:`w-3 h-3 animate-spin`}),i(`card.uninstall`)]})]})]})}function W({title:e,onClose:t,children:n}){return(0,O.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,role:`dialog`,tabIndex:-1,onClick:t,children:(0,O.jsxs)(`div`,{className:`bg-card border border-border rounded-lg shadow-xl w-full max-w-md p-5 flex flex-col gap-3`,onClick:e=>e.stopPropagation(),children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold`,children:e}),n]})})}function G(){return(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:Array.from({length:3},(e,t)=>(0,O.jsx)(`div`,{className:`rounded-lg border border-border bg-card p-4 h-40 animate-pulse`},t))})}function K({onRetry:e}){let{t:n}=t(`integrations`);return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground`,children:[(0,O.jsx)(i,{className:`w-5 h-5 text-destructive`}),(0,O.jsx)(`p`,{children:n(`page.loadError`)}),(0,O.jsx)(`button`,{type:`button`,onClick:e,className:`text-xs px-3 py-1.5 rounded-md border border-border`,children:n(`common:actions.retry`)})]})}function q(){let{t:e}=t(`integrations`);return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 gap-2 text-sm text-muted-foreground`,children:[(0,O.jsx)(y,{className:`w-6 h-6`}),(0,O.jsx)(`p`,{children:e(`page.empty`)})]})}export{F as default};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{$t as t,Dt as n,Et as r,G as i,H as a,Lt as o,M as s,N as c,Ot as l,P as u,Q as d,Qt as f,Rt as p,V as m,b as h,ct as g,dt as _,ft as v,gt as y,ht as b,in as x,l as S,m as C,mt as w,nn as T,o as E,p as D,rn as ee,sn as O,st as te,u as ne,ut as k,wt as A,x as j,y as M,zt as N}from"./index-B9IKK_QQ.js";import{t as P}from"./lib-B5mjOeEi.js";import{t as re}from"./format-command-2VNoNnMv.js";var F=A(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ie=A(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),I=e(O(),1),L=p();function ae({phases:e,phaseDefinitions:t}){return t.length===0?null:(0,L.jsx)(`div`,{className:`flex items-center`,children:t.map((n,r)=>{let i=e[n.key]??`idle`,a=r<t.length-1?e[t[r+1].key]??`idle`:null;return(0,L.jsxs)(`div`,{className:`flex items-center`,children:[(0,L.jsxs)(M,{children:[(0,L.jsx)(j,{asChild:!0,children:(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 cursor-default px-4`,children:[(0,L.jsx)(R,{state:i}),(0,L.jsx)(`span`,{className:u(`text-xs font-medium transition-colors`,i===`running`?`text-blue-400 aurora-light:text-accent-info`:i===`done`?`text-emerald-400 aurora-light:text-accent-success`:i===`error`?`text-red-400 aurora-light:text-destructive`:`text-muted-foreground/40`),children:n.label})]})}),(0,L.jsxs)(h,{side:`bottom`,className:`max-w-[200px]`,children:[(0,L.jsx)(`p`,{className:`font-medium`,children:n.label}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-0.5`,children:n.description})]})]}),a!==null&&(0,L.jsx)(`div`,{className:u(`h-px w-12 -mt-5 shrink-0 transition-all duration-300`,a===`done`||i===`done`?`bg-emerald-500/30 aurora-light:bg-accent-success/40`:a===`running`?`bg-blue-400/40 aurora-light:bg-accent-info/40`:`bg-border/30`)})]},n.key)})})}function R({state:e}){return(0,L.jsxs)(`div`,{className:u(`flex items-center justify-center w-10 h-10 rounded-full transition-all duration-300`,e===`running`?`bg-blue-500/10 aurora-light:bg-accent-info/10 ring-1 ring-blue-400/30 aurora-light:ring-accent-info/30 animate-pulse`:e===`done`?`bg-emerald-500/10 aurora-light:bg-accent-success/10`:e===`error`?`bg-red-500/10 aurora-light:bg-destructive/10`:`bg-muted/20`),children:[e===`running`&&(0,L.jsx)(d,{className:`w-6 h-6 text-blue-400 aurora-light:text-accent-info animate-spin`}),e===`done`&&(0,L.jsx)(v,{className:`w-6 h-6 text-emerald-400 aurora-light:text-accent-success`}),e===`error`&&(0,L.jsx)(_,{className:`w-6 h-6 text-red-400 aurora-light:text-destructive`}),e===`idle`&&(0,L.jsx)(k,{className:`w-6 h-6 text-muted-foreground/20`})]})}function z(e,t){let n=(typeof t==`number`?t:new Date(t).getTime())-new Date(e).getTime();if(!Number.isFinite(n)||n<0)return`—`;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}function oe(e){let t=new Set;for(let n of e)if(n.event_type===`log`)try{let e=(JSON.parse(n.payload).line??``).match(/(?:Writing|Editing|Created?|Updated?)\s+(?:file:\s*)?([\w./\-]+\.\w+)/i);e&&t.add(e[1])}catch{}return Array.from(t).slice(0,20)}var se=new Set([`editing`,`writing`,`reading`,`searching`,`running`]);function B(e){return e.length>40?`${e.slice(0,39)}…`:e}function V(e){return typeof e!=`string`||e.length===0?``:B(e.replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()??``)}function H(e){return typeof e!=`string`||e.length===0?``:B(e.trim().split(/\s+/)[0]??``)}function ce(e){if(typeof e!=`string`)return``;try{let t=JSON.parse(e)?.command;if(Array.isArray(t))return H(t.filter(e=>typeof e==`string`).join(` `));if(typeof t==`string`)return H(t)}catch{}return``}function U(e,t){let n=t??{},r=V(n.file_path??n.path);switch(e){case`Edit`:case`MultiEdit`:case`NotebookEdit`:case`Update`:return{step:!0,actionKey:`editing`,actionArg:r};case`Write`:case`create`:return{step:!0,actionKey:`writing`,actionArg:r};case`Read`:return{step:!0,actionKey:`reading`,actionArg:r};case`Grep`:case`Glob`:case`search`:return{step:!0,actionKey:`searching`,actionArg:B(String(n.pattern??n.query??``))};case`Bash`:case`shell`:return{step:!0,actionKey:`running`,actionArg:H(n.command)};default:return{step:!0,actionKey:`working`}}}function W(e){let t=e.event_type,n={};try{let t=JSON.parse(e.payload);t&&typeof t==`object`&&!Array.isArray(t)&&(n=t)}catch{}if(t===`assistant`){let e=n.message?.content;if(Array.isArray(e)){let t=e.filter(e=>e?.type===`tool_use`);if(t.length>0){let e=t[t.length-1];return{...U(e.name,e.input),stepCount:t.length}}if(e.some(e=>e?.type===`text`))return{step:!0,actionKey:`thinking`}}return{step:!0}}if(t===`tool_use`)return U(n.name,n.input);if(t===`item.completed`){let e=n.item,t=e?.type;return t===`agent_message`?{step:!0,actionKey:`thinking`}:t===`agent_reasoning`?{step:!0,actionKey:`reasoning`}:t===`function_call`||t===`local_shell_call`||t===`command_execution`?{step:!0,actionKey:`running`,actionArg:H(e?.command)||ce(e?.arguments)||(typeof e?.name==`string`?B(e.name):``)||(t===`local_shell_call`?`shell`:``)}:{step:!0}}return{step:!1}}var G={steps:0,actionKey:``,actionArg:``,lastSeenIdx:0};function K(e,t){if(t.type===`reset`)return G;if(t.type===`consume`){let{events:n}=t,r=e.lastSeenIdx>n.length?n.length:e.lastSeenIdx;if(n.length<=r)return r===e.lastSeenIdx?e:{...e,lastSeenIdx:r};let{steps:i,actionKey:a,actionArg:o}=e;for(let e=r;e<n.length;e++){let t=W(n[e]);t.step&&(i+=t.stepCount??1),t.actionKey&&(a=t.actionKey,o=t.actionArg??``)}return{steps:i,actionKey:a,actionArg:o,lastSeenIdx:n.length}}return e}function le({job:e,events:n,defaultOpen:r=!0,pipelineTotals:i,phases:a,phaseDefinitions:o}){let{t:s}=t(`jobs`),[c,l]=(0,I.useState)(r),f=(0,I.useMemo)(()=>oe(n),[n]),p=e.status===`running`,m=e.status===`completed`,[h,g]=(0,I.useState)(()=>Date.now());(0,I.useEffect)(()=>{if(!p)return;let e=window.setInterval(()=>g(Date.now()),1e3);return()=>window.clearInterval(e)},[p]);let[b,x]=(0,I.useReducer)(K,G),S=(0,I.useRef)(e.id);(0,I.useEffect)(()=>{S.current!==e.id&&(S.current=e.id,x({type:`reset`})),x({type:`consume`,events:n})},[e.id,n]);let[C,w]=(0,I.useState)(!0);(0,I.useEffect)(()=>{if(!p)return;w(!0);let e=window.setTimeout(()=>w(!1),8e3);return()=>window.clearTimeout(e)},[p,e.id]);let T=e.finished_at?z(e.started_at,e.finished_at):p?z(e.started_at,h):`—`,E=!!e.total_cost_usd_estimated,D=e.total_cost_usd==null?null:`${E?`~`:``}$${e.total_cost_usd.toFixed(4)}`,ee=e.num_turns==null?null:String(e.num_turns),O=e.tokens_in==null?null:(e.tokens_in??0)+(e.tokens_out??0)+(e.tokens_cache_read??0)+(e.tokens_cache_create??0),te=O==null?null:`${(O/1e3).toFixed(1)}k`,ne=(0,I.useMemo)(()=>!a||!o?null:o.find(e=>a[e.key]===`running`)?.label??null,[a,o]),k=p&&b.steps===0?`connecting`:b.actionKey||`thinking`,A=se.has(k)&&b.actionArg!==``,j=se.has(k)&&!A?`working`:k,M=A?s(`statusPanel.activity.${j}`,{arg:b.actionArg}):s(`statusPanel.activity.${j}`),N=ne??(p&&b.steps===0?s(`statusPanel.activity.starting`):null),P=b.steps>0?s(`statusPanel.steps`,{count:b.steps}):null,re=s(p?`statusPanel.inProgress`:m?`statusPanel.completed`:`statusPanel.failed`),F=p?`border-accent-info/20 bg-accent-info/5`:m?`border-emerald-500/20 aurora-light:border-accent-success/30 bg-emerald-500/5 aurora-light:bg-accent-success/5`:`border-red-500/20 aurora-light:border-destructive/30 bg-red-500/5 aurora-light:bg-destructive/5`,ie=p?d:m?v:_,ae=p?`w-4 h-4 text-accent-info shrink-0 animate-spin`:m?`w-4 h-4 text-emerald-400 aurora-light:text-accent-success shrink-0`:`w-4 h-4 text-red-400 aurora-light:text-destructive shrink-0`;return(0,L.jsxs)(`div`,{className:u(`mx-4 my-2 rounded-xl border transition-colors duration-500`,F),children:[(0,L.jsxs)(`button`,{type:`button`,onClick:()=>l(!c),className:`w-full flex items-center gap-3 px-4 py-3`,children:[(0,L.jsx)(ie,{className:ae,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`text-sm font-semibold flex-1 text-left`,children:re}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 text-[11px] text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`tabular-nums`,children:T}),p?P&&(0,L.jsx)(`span`,{className:`tabular-nums`,children:P}):(0,L.jsxs)(L.Fragment,{children:[D&&(0,L.jsx)(`span`,{className:`tabular-nums text-yellow-400 aurora-light:text-accent-warning`,children:D}),f.length>0&&(0,L.jsx)(`span`,{children:s(`statusPanel.filesCount`,{count:f.length})})]})]}),(0,L.jsx)(y,{className:u(`w-4 h-4 text-muted-foreground/40 transition-transform duration-150 shrink-0`,c&&`rotate-180`)})]}),c&&(0,L.jsx)(`div`,{className:`px-4 pb-4 space-y-3 border-t border-border/20`,children:p?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`p`,{className:`pt-3 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:s(`statusPanel.zoneInProgress`)}),(0,L.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 sm:items-stretch`,children:[(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2 sm:w-44 shrink-0`,children:[(0,L.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:[s(`statusPanel.duration`),(0,L.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full bg-accent-info animate-pulse`,title:s(`statusPanel.liveTooltip`),"aria-label":s(`statusPanel.liveTooltip`)})]}),(0,L.jsx)(`p`,{className:`text-sm font-semibold tabular-nums mt-0.5 text-accent-info`,children:T})]}),(0,L.jsxs)(`div`,{className:`flex-1 flex items-center gap-2 bg-muted/10 rounded-lg px-3 py-2 min-w-0`,children:[(0,L.jsx)(d,{className:`w-3.5 h-3.5 text-accent-info shrink-0 animate-spin`,"aria-hidden":`true`}),N&&(0,L.jsx)(`span`,{className:`text-[11px] font-medium px-1.5 py-0.5 rounded bg-accent-info/15 text-accent-info shrink-0`,children:N}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground truncate flex-1 min-w-0`,children:M}),P&&(0,L.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/60 tabular-nums shrink-0`,children:[`· `,P]})]})]}),C&&(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground/40 leading-snug`,children:s(`statusPanel.explainer`)}),(0,L.jsx)(`p`,{className:`pt-1 text-[10px] text-muted-foreground/50 uppercase tracking-wider border-t border-accent-info/10 mt-1`,children:s(`statusPanel.zoneFinalPending`)}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,L.jsx)(Y,{label:s(`statusPanel.cost`),caption:s(`statusPanel.pendingCaption`),tooltip:s(`statusPanel.costTooltip`)}),(0,L.jsx)(Y,{label:s(`statusPanel.turns`),caption:s(`statusPanel.pendingCaption`),tooltip:s(`statusPanel.pendingTooltip`)}),(0,L.jsx)(Y,{label:s(`statusPanel.tokens`),caption:s(`statusPanel.pendingCaption`),tooltip:s(`statusPanel.pendingTooltip`)})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`p`,{className:`pt-3 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:s(`statusPanel.zoneFinal`)}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2`,children:[(0,L.jsx)(q,{label:s(`statusPanel.duration`),value:T}),(0,L.jsx)(J,{label:s(`statusPanel.cost`),value:D,valueClass:`text-yellow-400 aurora-light:text-accent-warning`,naCaption:s(`statusPanel.notAvailable`)}),(0,L.jsx)(J,{label:s(`statusPanel.turns`),value:ee,naCaption:s(`statusPanel.notAvailable`)}),(0,L.jsx)(J,{label:s(`statusPanel.tokens`),value:te,naCaption:s(`statusPanel.notAvailable`)})]}),i&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider mb-1.5`,children:s(`statusPanel.pipelineTotal`,{count:i.jobCount})}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,L.jsx)(q,{label:s(`statusPanel.totalCost`),value:`$${i.totalCostUsd.toFixed(4)}`,valueClass:`text-yellow-400 aurora-light:text-accent-warning`}),(0,L.jsx)(q,{label:s(`statusPanel.totalTokens`),value:`${((i.totalTokensIn+i.totalTokensOut+i.totalTokensCacheRead+i.totalTokensCacheCreate)/1e3).toFixed(1)}k`})]})]}),f.length>0&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider mb-1.5`,children:s(`statusPanel.filesModified`)}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:f.map(e=>(0,L.jsx)(`code`,{className:`text-[10px] font-mono bg-muted/30 px-2 py-0.5 rounded text-cyan-400/80 aurora-light:text-accent-info`,children:e},e))})]})]})})]})}function q({label:e,value:t,valueClass:n}){return(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2`,children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:e}),(0,L.jsx)(`p`,{className:u(`text-sm font-semibold tabular-nums mt-0.5`,n),children:t})]})}function J({label:e,value:t,valueClass:n,naCaption:r}){return(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2`,children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:e}),(0,L.jsx)(`p`,{className:u(`text-sm font-semibold tabular-nums mt-0.5`,t==null?`text-muted-foreground`:n),children:t??`—`}),t==null&&(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/30 mt-0.5`,children:r})]})}function Y({label:e,caption:t,tooltip:n}){return(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2 ring-1 ring-accent-info/10`,title:n,children:[(0,L.jsxs)(`p`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:[e,(0,L.jsx)(F,{className:`w-2.5 h-2.5 text-muted-foreground/30`,"aria-hidden":`true`})]}),(0,L.jsx)(`p`,{className:`text-sm font-semibold tabular-nums mt-0.5 text-muted-foreground/40`,children:`—`}),(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/30 mt-0.5`,children:t})]})}var X=4;function ue({tickets:e,onTicketClick:n}){let{t:r}=t(`jobs`),[i,a]=(0,I.useState)(!1);if(e.length===0)return null;let o=e.length>=X&&!i?e.slice(0,1):e,s=e.length-o.length;return(0,L.jsxs)(`div`,{className:`rounded-xl border border-border/40 bg-card/40 px-4 py-3 space-y-1.5`,children:[o.map(e=>(0,L.jsx)(Z,{ticket:e,onClick:()=>n(e.id)},e.id)),s>0&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>a(!0),className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[r(`ticketHeader.showMore`,{count:s}),(0,L.jsx)(y,{className:`w-3 h-3`})]}),i&&e.length>=X&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>a(!1),className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[r(`ticketHeader.showLess`),(0,L.jsx)(w,{className:`w-3 h-3`})]})]})}function Z({ticket:e,onClick:n}){let{t:r}=t(`jobs`),i=e.title==null,a=`inline-flex items-center px-1.5 py-0.5 rounded-md text-[11px] font-mono tabular-nums shrink-0`;return i?(0,L.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,L.jsx)(`span`,{className:u(a,`text-muted-foreground bg-muted/20 select-none`),title:r(`ticketHeader.deletedTooltip`),children:r(`ticketHeader.deletedTicket`,{id:e.id})})}):(0,L.jsxs)(`button`,{type:`button`,onClick:n,className:`flex items-center gap-2 min-w-0 w-full text-left group`,title:e.title??void 0,children:[(0,L.jsxs)(`span`,{className:u(a,`text-accent-primary bg-accent-primary/10 group-hover:bg-accent-primary/20 transition-colors`),children:[`#`,e.id]}),(0,L.jsx)(`span`,{className:`text-lg font-semibold text-foreground truncate group-hover:text-accent-primary transition-colors`,children:e.title})]})}function Q(e){let t=e.trimStart();return!!(/^#{1,6}\s/.test(t)||/^[-*+]\s/.test(t)||/^\d+\.\s/.test(t)||/^\|.+\|/.test(t)||t.startsWith("```")||t.startsWith(`> `)||/\*\*[^*]+\*\*/.test(e)||/`[^`]+`/.test(e)||/\[.+\]\(.+\)/.test(e)||/^(-{3,}|_{3,}|\*{3,})$/.test(t)||/^- \[[ x]\]\s/.test(t))}function de(e,t){let n=`${e.id??t}`,r=e.timestamp;if(e.event_type===`log`)try{let t=JSON.parse(e.payload).line??``;return t.trim()?t.startsWith(`▸`)||t.match(/^(architect|developer|reviewer|ship|analyst)\s*:/i)?{id:n,content:t,type:`phase`,timestamp:r}:e.source===`stderr`?{id:n,content:t,type:`stderr`,timestamp:r}:Q(t)?{id:n,content:t,type:`assistant`,timestamp:r}:{id:n,content:t,type:`plain`,timestamp:r}:null}catch{return null}if(e.event_type!==`log`&&e.event_type!==`result`)return null;if(e.event_type===`result`)try{let t=JSON.parse(e.payload),i=[];return t.duration_ms&&i.push(`${(t.duration_ms/1e3).toFixed(1)}s`),t.total_cost_usd&&i.push(`$${t.total_cost_usd.toFixed(4)}`),t.num_turns&&i.push(l.t(`jobs:logViewer.turns`,{count:t.num_turns})),{id:n,content:`▸ ${l.t(`jobs:logViewer.completed`)}${i.length?` — ${i.join(` · `)}`:``}`,type:`result`,timestamp:r}}catch{return null}return null}function $(e){let t=`none`,n=[];for(let r of e){let e=r.type;if(e!==`plain`&&e!==`log`){t=`none`,n.push(r);continue}let i=r.content;i.startsWith(`--- `)?(t=`saw_minus`,n.push({...r,type:`diff-meta`})):t===`saw_minus`&&i.startsWith(`+++ `)?(t=`active`,n.push({...r,type:`diff-meta`})):t===`active`&&i.startsWith(`@@ `)?n.push({...r,type:`diff-hunk`}):t===`active`&&i.startsWith(`+`)&&!i.startsWith(`+++`)?n.push({...r,type:`diff-add`}):t===`active`&&i.startsWith(`-`)&&!i.startsWith(`---`)?n.push({...r,type:`diff-remove`}):(t===`active`&&(i.startsWith(` `)||i===``)||(t=`none`),n.push(r))}return n}function fe(e){let t=[{key:`__preamble__`,header:null,lines:[]}];for(let n of e)n.type===`phase`?t.push({key:n.id,header:n,lines:[]}):t[t.length-1].lines.push(n);return t.filter(e=>e.header!==null||e.lines.length>0)}function pe({events:e,isLoading:n}){let{t:r,i18n:i}=t(`jobs`),[o,s]=(0,I.useState)(``),[l,u]=(0,I.useState)(!0),[d,p]=(0,I.useState)(new Set),m=(0,I.useRef)(null),h=(0,I.useRef)(null),{processedLines:_,groups:v,totalLines:b}=(0,I.useMemo)(()=>{let t=e.map((e,t)=>de(e,t)).filter(e=>e!==null),n=[];for(let e of t){let t=n.length>0?n[n.length-1]:null;e.type===`assistant`&&t?.type===`assistant`?t.content+=`
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{$t as t,Dt as n,Et as r,G as i,H as a,Lt as o,M as s,N as c,Ot as l,P as u,Q as d,Qt as f,Rt as p,V as m,b as h,ct as g,dt as _,ft as v,gt as y,ht as b,in as x,l as S,m as C,mt as w,nn as T,o as E,p as D,rn as ee,sn as O,st as te,u as ne,ut as k,wt as A,x as j,y as M,zt as N}from"./index-DK214dak.js";import{t as P}from"./lib-Bo5s6xpe.js";import{t as re}from"./format-command-2VNoNnMv.js";var F=A(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ie=A(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),I=e(O(),1),L=p();function ae({phases:e,phaseDefinitions:t}){return t.length===0?null:(0,L.jsx)(`div`,{className:`flex items-center`,children:t.map((n,r)=>{let i=e[n.key]??`idle`,a=r<t.length-1?e[t[r+1].key]??`idle`:null;return(0,L.jsxs)(`div`,{className:`flex items-center`,children:[(0,L.jsxs)(M,{children:[(0,L.jsx)(j,{asChild:!0,children:(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 cursor-default px-4`,children:[(0,L.jsx)(R,{state:i}),(0,L.jsx)(`span`,{className:u(`text-xs font-medium transition-colors`,i===`running`?`text-blue-400 aurora-light:text-accent-info`:i===`done`?`text-emerald-400 aurora-light:text-accent-success`:i===`error`?`text-red-400 aurora-light:text-destructive`:`text-muted-foreground/40`),children:n.label})]})}),(0,L.jsxs)(h,{side:`bottom`,className:`max-w-[200px]`,children:[(0,L.jsx)(`p`,{className:`font-medium`,children:n.label}),(0,L.jsx)(`p`,{className:`text-muted-foreground mt-0.5`,children:n.description})]})]}),a!==null&&(0,L.jsx)(`div`,{className:u(`h-px w-12 -mt-5 shrink-0 transition-all duration-300`,a===`done`||i===`done`?`bg-emerald-500/30 aurora-light:bg-accent-success/40`:a===`running`?`bg-blue-400/40 aurora-light:bg-accent-info/40`:`bg-border/30`)})]},n.key)})})}function R({state:e}){return(0,L.jsxs)(`div`,{className:u(`flex items-center justify-center w-10 h-10 rounded-full transition-all duration-300`,e===`running`?`bg-blue-500/10 aurora-light:bg-accent-info/10 ring-1 ring-blue-400/30 aurora-light:ring-accent-info/30 animate-pulse`:e===`done`?`bg-emerald-500/10 aurora-light:bg-accent-success/10`:e===`error`?`bg-red-500/10 aurora-light:bg-destructive/10`:`bg-muted/20`),children:[e===`running`&&(0,L.jsx)(d,{className:`w-6 h-6 text-blue-400 aurora-light:text-accent-info animate-spin`}),e===`done`&&(0,L.jsx)(v,{className:`w-6 h-6 text-emerald-400 aurora-light:text-accent-success`}),e===`error`&&(0,L.jsx)(_,{className:`w-6 h-6 text-red-400 aurora-light:text-destructive`}),e===`idle`&&(0,L.jsx)(k,{className:`w-6 h-6 text-muted-foreground/20`})]})}function z(e,t){let n=(typeof t==`number`?t:new Date(t).getTime())-new Date(e).getTime();if(!Number.isFinite(n)||n<0)return`—`;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}function oe(e){let t=new Set;for(let n of e)if(n.event_type===`log`)try{let e=(JSON.parse(n.payload).line??``).match(/(?:Writing|Editing|Created?|Updated?)\s+(?:file:\s*)?([\w./\-]+\.\w+)/i);e&&t.add(e[1])}catch{}return Array.from(t).slice(0,20)}var se=new Set([`editing`,`writing`,`reading`,`searching`,`running`]);function B(e){return e.length>40?`${e.slice(0,39)}…`:e}function V(e){return typeof e!=`string`||e.length===0?``:B(e.replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()??``)}function H(e){return typeof e!=`string`||e.length===0?``:B(e.trim().split(/\s+/)[0]??``)}function ce(e){if(typeof e!=`string`)return``;try{let t=JSON.parse(e)?.command;if(Array.isArray(t))return H(t.filter(e=>typeof e==`string`).join(` `));if(typeof t==`string`)return H(t)}catch{}return``}function U(e,t){let n=t??{},r=V(n.file_path??n.path);switch(e){case`Edit`:case`MultiEdit`:case`NotebookEdit`:case`Update`:return{step:!0,actionKey:`editing`,actionArg:r};case`Write`:case`create`:return{step:!0,actionKey:`writing`,actionArg:r};case`Read`:return{step:!0,actionKey:`reading`,actionArg:r};case`Grep`:case`Glob`:case`search`:return{step:!0,actionKey:`searching`,actionArg:B(String(n.pattern??n.query??``))};case`Bash`:case`shell`:return{step:!0,actionKey:`running`,actionArg:H(n.command)};default:return{step:!0,actionKey:`working`}}}function W(e){let t=e.event_type,n={};try{let t=JSON.parse(e.payload);t&&typeof t==`object`&&!Array.isArray(t)&&(n=t)}catch{}if(t===`assistant`){let e=n.message?.content;if(Array.isArray(e)){let t=e.filter(e=>e?.type===`tool_use`);if(t.length>0){let e=t[t.length-1];return{...U(e.name,e.input),stepCount:t.length}}if(e.some(e=>e?.type===`text`))return{step:!0,actionKey:`thinking`}}return{step:!0}}if(t===`tool_use`)return U(n.name,n.input);if(t===`item.completed`){let e=n.item,t=e?.type;return t===`agent_message`?{step:!0,actionKey:`thinking`}:t===`agent_reasoning`?{step:!0,actionKey:`reasoning`}:t===`function_call`||t===`local_shell_call`||t===`command_execution`?{step:!0,actionKey:`running`,actionArg:H(e?.command)||ce(e?.arguments)||(typeof e?.name==`string`?B(e.name):``)||(t===`local_shell_call`?`shell`:``)}:{step:!0}}return{step:!1}}var G={steps:0,actionKey:``,actionArg:``,lastSeenIdx:0};function K(e,t){if(t.type===`reset`)return G;if(t.type===`consume`){let{events:n}=t,r=e.lastSeenIdx>n.length?n.length:e.lastSeenIdx;if(n.length<=r)return r===e.lastSeenIdx?e:{...e,lastSeenIdx:r};let{steps:i,actionKey:a,actionArg:o}=e;for(let e=r;e<n.length;e++){let t=W(n[e]);t.step&&(i+=t.stepCount??1),t.actionKey&&(a=t.actionKey,o=t.actionArg??``)}return{steps:i,actionKey:a,actionArg:o,lastSeenIdx:n.length}}return e}function le({job:e,events:n,defaultOpen:r=!0,pipelineTotals:i,phases:a,phaseDefinitions:o}){let{t:s}=t(`jobs`),[c,l]=(0,I.useState)(r),f=(0,I.useMemo)(()=>oe(n),[n]),p=e.status===`running`,m=e.status===`completed`,[h,g]=(0,I.useState)(()=>Date.now());(0,I.useEffect)(()=>{if(!p)return;let e=window.setInterval(()=>g(Date.now()),1e3);return()=>window.clearInterval(e)},[p]);let[b,x]=(0,I.useReducer)(K,G),S=(0,I.useRef)(e.id);(0,I.useEffect)(()=>{S.current!==e.id&&(S.current=e.id,x({type:`reset`})),x({type:`consume`,events:n})},[e.id,n]);let[C,w]=(0,I.useState)(!0);(0,I.useEffect)(()=>{if(!p)return;w(!0);let e=window.setTimeout(()=>w(!1),8e3);return()=>window.clearTimeout(e)},[p,e.id]);let T=e.finished_at?z(e.started_at,e.finished_at):p?z(e.started_at,h):`—`,E=!!e.total_cost_usd_estimated,D=e.total_cost_usd==null?null:`${E?`~`:``}$${e.total_cost_usd.toFixed(4)}`,ee=e.num_turns==null?null:String(e.num_turns),O=e.tokens_in==null?null:(e.tokens_in??0)+(e.tokens_out??0)+(e.tokens_cache_read??0)+(e.tokens_cache_create??0),te=O==null?null:`${(O/1e3).toFixed(1)}k`,ne=(0,I.useMemo)(()=>!a||!o?null:o.find(e=>a[e.key]===`running`)?.label??null,[a,o]),k=p&&b.steps===0?`connecting`:b.actionKey||`thinking`,A=se.has(k)&&b.actionArg!==``,j=se.has(k)&&!A?`working`:k,M=A?s(`statusPanel.activity.${j}`,{arg:b.actionArg}):s(`statusPanel.activity.${j}`),N=ne??(p&&b.steps===0?s(`statusPanel.activity.starting`):null),P=b.steps>0?s(`statusPanel.steps`,{count:b.steps}):null,re=s(p?`statusPanel.inProgress`:m?`statusPanel.completed`:`statusPanel.failed`),F=p?`border-accent-info/20 bg-accent-info/5`:m?`border-emerald-500/20 aurora-light:border-accent-success/30 bg-emerald-500/5 aurora-light:bg-accent-success/5`:`border-red-500/20 aurora-light:border-destructive/30 bg-red-500/5 aurora-light:bg-destructive/5`,ie=p?d:m?v:_,ae=p?`w-4 h-4 text-accent-info shrink-0 animate-spin`:m?`w-4 h-4 text-emerald-400 aurora-light:text-accent-success shrink-0`:`w-4 h-4 text-red-400 aurora-light:text-destructive shrink-0`;return(0,L.jsxs)(`div`,{className:u(`mx-4 my-2 rounded-xl border transition-colors duration-500`,F),children:[(0,L.jsxs)(`button`,{type:`button`,onClick:()=>l(!c),className:`w-full flex items-center gap-3 px-4 py-3`,children:[(0,L.jsx)(ie,{className:ae,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`text-sm font-semibold flex-1 text-left`,children:re}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 text-[11px] text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`tabular-nums`,children:T}),p?P&&(0,L.jsx)(`span`,{className:`tabular-nums`,children:P}):(0,L.jsxs)(L.Fragment,{children:[D&&(0,L.jsx)(`span`,{className:`tabular-nums text-yellow-400 aurora-light:text-accent-warning`,children:D}),f.length>0&&(0,L.jsx)(`span`,{children:s(`statusPanel.filesCount`,{count:f.length})})]})]}),(0,L.jsx)(y,{className:u(`w-4 h-4 text-muted-foreground/40 transition-transform duration-150 shrink-0`,c&&`rotate-180`)})]}),c&&(0,L.jsx)(`div`,{className:`px-4 pb-4 space-y-3 border-t border-border/20`,children:p?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`p`,{className:`pt-3 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:s(`statusPanel.zoneInProgress`)}),(0,L.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 sm:items-stretch`,children:[(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2 sm:w-44 shrink-0`,children:[(0,L.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:[s(`statusPanel.duration`),(0,L.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full bg-accent-info animate-pulse`,title:s(`statusPanel.liveTooltip`),"aria-label":s(`statusPanel.liveTooltip`)})]}),(0,L.jsx)(`p`,{className:`text-sm font-semibold tabular-nums mt-0.5 text-accent-info`,children:T})]}),(0,L.jsxs)(`div`,{className:`flex-1 flex items-center gap-2 bg-muted/10 rounded-lg px-3 py-2 min-w-0`,children:[(0,L.jsx)(d,{className:`w-3.5 h-3.5 text-accent-info shrink-0 animate-spin`,"aria-hidden":`true`}),N&&(0,L.jsx)(`span`,{className:`text-[11px] font-medium px-1.5 py-0.5 rounded bg-accent-info/15 text-accent-info shrink-0`,children:N}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground truncate flex-1 min-w-0`,children:M}),P&&(0,L.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/60 tabular-nums shrink-0`,children:[`· `,P]})]})]}),C&&(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground/40 leading-snug`,children:s(`statusPanel.explainer`)}),(0,L.jsx)(`p`,{className:`pt-1 text-[10px] text-muted-foreground/50 uppercase tracking-wider border-t border-accent-info/10 mt-1`,children:s(`statusPanel.zoneFinalPending`)}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,L.jsx)(Y,{label:s(`statusPanel.cost`),caption:s(`statusPanel.pendingCaption`),tooltip:s(`statusPanel.costTooltip`)}),(0,L.jsx)(Y,{label:s(`statusPanel.turns`),caption:s(`statusPanel.pendingCaption`),tooltip:s(`statusPanel.pendingTooltip`)}),(0,L.jsx)(Y,{label:s(`statusPanel.tokens`),caption:s(`statusPanel.pendingCaption`),tooltip:s(`statusPanel.pendingTooltip`)})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`p`,{className:`pt-3 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:s(`statusPanel.zoneFinal`)}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2`,children:[(0,L.jsx)(q,{label:s(`statusPanel.duration`),value:T}),(0,L.jsx)(J,{label:s(`statusPanel.cost`),value:D,valueClass:`text-yellow-400 aurora-light:text-accent-warning`,naCaption:s(`statusPanel.notAvailable`)}),(0,L.jsx)(J,{label:s(`statusPanel.turns`),value:ee,naCaption:s(`statusPanel.notAvailable`)}),(0,L.jsx)(J,{label:s(`statusPanel.tokens`),value:te,naCaption:s(`statusPanel.notAvailable`)})]}),i&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider mb-1.5`,children:s(`statusPanel.pipelineTotal`,{count:i.jobCount})}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,L.jsx)(q,{label:s(`statusPanel.totalCost`),value:`$${i.totalCostUsd.toFixed(4)}`,valueClass:`text-yellow-400 aurora-light:text-accent-warning`}),(0,L.jsx)(q,{label:s(`statusPanel.totalTokens`),value:`${((i.totalTokensIn+i.totalTokensOut+i.totalTokensCacheRead+i.totalTokensCacheCreate)/1e3).toFixed(1)}k`})]})]}),f.length>0&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider mb-1.5`,children:s(`statusPanel.filesModified`)}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:f.map(e=>(0,L.jsx)(`code`,{className:`text-[10px] font-mono bg-muted/30 px-2 py-0.5 rounded text-cyan-400/80 aurora-light:text-accent-info`,children:e},e))})]})]})})]})}function q({label:e,value:t,valueClass:n}){return(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2`,children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:e}),(0,L.jsx)(`p`,{className:u(`text-sm font-semibold tabular-nums mt-0.5`,n),children:t})]})}function J({label:e,value:t,valueClass:n,naCaption:r}){return(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2`,children:[(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:e}),(0,L.jsx)(`p`,{className:u(`text-sm font-semibold tabular-nums mt-0.5`,t==null?`text-muted-foreground`:n),children:t??`—`}),t==null&&(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/30 mt-0.5`,children:r})]})}function Y({label:e,caption:t,tooltip:n}){return(0,L.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2 ring-1 ring-accent-info/10`,title:n,children:[(0,L.jsxs)(`p`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:[e,(0,L.jsx)(F,{className:`w-2.5 h-2.5 text-muted-foreground/30`,"aria-hidden":`true`})]}),(0,L.jsx)(`p`,{className:`text-sm font-semibold tabular-nums mt-0.5 text-muted-foreground/40`,children:`—`}),(0,L.jsx)(`p`,{className:`text-[10px] text-muted-foreground/30 mt-0.5`,children:t})]})}var X=4;function ue({tickets:e,onTicketClick:n}){let{t:r}=t(`jobs`),[i,a]=(0,I.useState)(!1);if(e.length===0)return null;let o=e.length>=X&&!i?e.slice(0,1):e,s=e.length-o.length;return(0,L.jsxs)(`div`,{className:`rounded-xl border border-border/40 bg-card/40 px-4 py-3 space-y-1.5`,children:[o.map(e=>(0,L.jsx)(Z,{ticket:e,onClick:()=>n(e.id)},e.id)),s>0&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>a(!0),className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[r(`ticketHeader.showMore`,{count:s}),(0,L.jsx)(y,{className:`w-3 h-3`})]}),i&&e.length>=X&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>a(!1),className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[r(`ticketHeader.showLess`),(0,L.jsx)(w,{className:`w-3 h-3`})]})]})}function Z({ticket:e,onClick:n}){let{t:r}=t(`jobs`),i=e.title==null,a=`inline-flex items-center px-1.5 py-0.5 rounded-md text-[11px] font-mono tabular-nums shrink-0`;return i?(0,L.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,L.jsx)(`span`,{className:u(a,`text-muted-foreground bg-muted/20 select-none`),title:r(`ticketHeader.deletedTooltip`),children:r(`ticketHeader.deletedTicket`,{id:e.id})})}):(0,L.jsxs)(`button`,{type:`button`,onClick:n,className:`flex items-center gap-2 min-w-0 w-full text-left group`,title:e.title??void 0,children:[(0,L.jsxs)(`span`,{className:u(a,`text-accent-primary bg-accent-primary/10 group-hover:bg-accent-primary/20 transition-colors`),children:[`#`,e.id]}),(0,L.jsx)(`span`,{className:`text-lg font-semibold text-foreground truncate group-hover:text-accent-primary transition-colors`,children:e.title})]})}function Q(e){let t=e.trimStart();return!!(/^#{1,6}\s/.test(t)||/^[-*+]\s/.test(t)||/^\d+\.\s/.test(t)||/^\|.+\|/.test(t)||t.startsWith("```")||t.startsWith(`> `)||/\*\*[^*]+\*\*/.test(e)||/`[^`]+`/.test(e)||/\[.+\]\(.+\)/.test(e)||/^(-{3,}|_{3,}|\*{3,})$/.test(t)||/^- \[[ x]\]\s/.test(t))}function de(e,t){let n=`${e.id??t}`,r=e.timestamp;if(e.event_type===`log`)try{let t=JSON.parse(e.payload).line??``;return t.trim()?t.startsWith(`▸`)||t.match(/^(architect|developer|reviewer|ship|analyst)\s*:/i)?{id:n,content:t,type:`phase`,timestamp:r}:e.source===`stderr`?{id:n,content:t,type:`stderr`,timestamp:r}:Q(t)?{id:n,content:t,type:`assistant`,timestamp:r}:{id:n,content:t,type:`plain`,timestamp:r}:null}catch{return null}if(e.event_type!==`log`&&e.event_type!==`result`)return null;if(e.event_type===`result`)try{let t=JSON.parse(e.payload),i=[];return t.duration_ms&&i.push(`${(t.duration_ms/1e3).toFixed(1)}s`),t.total_cost_usd&&i.push(`$${t.total_cost_usd.toFixed(4)}`),t.num_turns&&i.push(l.t(`jobs:logViewer.turns`,{count:t.num_turns})),{id:n,content:`▸ ${l.t(`jobs:logViewer.completed`)}${i.length?` — ${i.join(` · `)}`:``}`,type:`result`,timestamp:r}}catch{return null}return null}function $(e){let t=`none`,n=[];for(let r of e){let e=r.type;if(e!==`plain`&&e!==`log`){t=`none`,n.push(r);continue}let i=r.content;i.startsWith(`--- `)?(t=`saw_minus`,n.push({...r,type:`diff-meta`})):t===`saw_minus`&&i.startsWith(`+++ `)?(t=`active`,n.push({...r,type:`diff-meta`})):t===`active`&&i.startsWith(`@@ `)?n.push({...r,type:`diff-hunk`}):t===`active`&&i.startsWith(`+`)&&!i.startsWith(`+++`)?n.push({...r,type:`diff-add`}):t===`active`&&i.startsWith(`-`)&&!i.startsWith(`---`)?n.push({...r,type:`diff-remove`}):(t===`active`&&(i.startsWith(` `)||i===``)||(t=`none`),n.push(r))}return n}function fe(e){let t=[{key:`__preamble__`,header:null,lines:[]}];for(let n of e)n.type===`phase`?t.push({key:n.id,header:n,lines:[]}):t[t.length-1].lines.push(n);return t.filter(e=>e.header!==null||e.lines.length>0)}function pe({events:e,isLoading:n}){let{t:r,i18n:i}=t(`jobs`),[o,s]=(0,I.useState)(``),[l,u]=(0,I.useState)(!0),[d,p]=(0,I.useState)(new Set),m=(0,I.useRef)(null),h=(0,I.useRef)(null),{processedLines:_,groups:v,totalLines:b}=(0,I.useMemo)(()=>{let t=e.map((e,t)=>de(e,t)).filter(e=>e!==null),n=[];for(let e of t){let t=n.length>0?n[n.length-1]:null;e.type===`assistant`&&t?.type===`assistant`?t.content+=`
2
2
  `+e.content:n.push({...e})}let r=$(n);return{processedLines:r,groups:fe(r),totalLines:r.length}},[e,i.language]),x=(0,I.useMemo)(()=>{if(!o)return b;let e=o.toLowerCase();return _.filter(t=>t.content.toLowerCase().includes(e)).length},[o,_,b]),S=(0,I.useCallback)(()=>{let e=h.current;e&&(e.scrollTop=e.scrollHeight)},[]);(0,I.useEffect)(()=>{l&&S()},[e.length,l,S]);function C(){let e=h.current;e&&u(e.scrollHeight-e.scrollTop-e.clientHeight<50)}function w(e){p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return n?(0,L.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`logViewer.loading`)})}):b===0?(0,L.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`logViewer.empty`)})}):(0,L.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,L.jsxs)(`div`,{className:`px-4 py-2 border-b border-border flex items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`relative flex-1 max-w-xs`,children:[(0,L.jsx)(a,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-3 h-3 text-muted-foreground`}),(0,L.jsx)(E,{placeholder:r(`logViewer.filterPlaceholder`),value:o,onChange:e=>s(e.target.value),className:`pl-7 h-7`})]}),(0,L.jsx)(c,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground/50 hover:text-foreground`,onClick:()=>{let e=_.map(e=>e.content).join(`
3
3
  `);navigator.clipboard.writeText(e).then(()=>{f.success(r(`logViewer.copySuccess`))}).catch(()=>{f.error(r(`logViewer.copyFailed`))})},children:(0,L.jsx)(g,{className:`w-3.5 h-3.5`})}),(0,L.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:r(`logViewer.lineCount`,{filtered:x,total:b})})]}),(0,L.jsxs)(`div`,{ref:h,className:`flex-1 overflow-y-auto p-2 text-xs relative`,onScroll:C,children:[v.map(e=>(0,L.jsx)(me,{group:e,filter:o,collapsed:d.has(e.key),onToggle:()=>w(e.key)},e.key)),(0,L.jsx)(`div`,{ref:m})]}),!l&&(0,L.jsxs)(c,{size:`sm`,variant:`secondary`,onClick:()=>{u(!0),S()},className:`absolute bottom-16 right-6 h-7 gap-1 shadow-lg`,children:[(0,L.jsx)(y,{className:`w-3 h-3`}),r(`logViewer.jumpToBottom`)]})]})}var me=(0,I.memo)(function({group:e,filter:n,collapsed:r,onToggle:i}){let{t:a}=t(`jobs`),o=n?e.lines.filter(e=>e.content.toLowerCase().includes(n.toLowerCase())):e.lines;if(e.header===null)return o.length===0?null:(0,L.jsx)(`div`,{children:o.map((e,t)=>(0,L.jsx)(ge,{line:e,even:t%2==0},e.id))});let s=e.header.content;return(0,L.jsxs)(`div`,{className:`mt-3 rounded-md overflow-hidden border border-border/20`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:i,className:u(`flex items-center gap-2 w-full text-left px-3 py-2`,`bg-primary/5 border-b border-primary/20`,`hover:bg-primary/10 transition-colors duration-150 cursor-pointer`),children:[(0,L.jsx)(b,{className:u(`w-3 h-3 text-primary/60 shrink-0 transition-transform duration-150`,!r&&`rotate-90`)}),(0,L.jsx)(`span`,{className:`flex-1 text-[12px] font-semibold text-foreground leading-none`,children:s}),e.header.timestamp&&(0,L.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 font-mono tabular-nums shrink-0`,children:new Date(e.header.timestamp).toLocaleTimeString(`en`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}),(0,L.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 shrink-0`,children:a(`logViewer.phaseLines`,{count:e.lines.length})})]}),!r&&(0,L.jsx)(`div`,{className:`bg-muted/5`,children:o.length===0?(0,L.jsx)(`p`,{className:`px-4 py-2 text-[10px] text-muted-foreground/40 italic`,children:a(n?`logViewer.noMatchingLines`:`logViewer.noOutput`)}):o.map((e,t)=>(0,L.jsx)(ge,{line:e,even:t%2==0},e.id))})]})}),he=[P],ge=(0,I.memo)(function({line:e,even:t}){let n=e.type===`assistant`,r=e.type===`diff-add`,i=e.type===`diff-remove`,a=e.type===`diff-meta`,o=e.type===`diff-hunk`;return(0,L.jsxs)(`div`,{className:u(`flex items-start gap-2 group px-2 py-0.5 rounded-sm`,!(r||i||a||o)&&(t?`bg-muted/20`:`bg-transparent`),e.type===`result`&&`bg-emerald-500/5 aurora-light:bg-accent-success/10 border-l-2 border-emerald-500/40 aurora-light:border-accent-success/40 mt-2 py-2`,r&&`bg-emerald-500/8 aurora-light:bg-accent-success/10 border-l-2 border-emerald-500/50 aurora-light:border-accent-success/50`,i&&`bg-red-500/8 aurora-light:bg-destructive/10 border-l-2 border-red-500/50 aurora-light:border-destructive/50`,a&&`bg-accent-primary/5 border-l-2 border-accent-primary/30`,o&&`bg-accent-info/5 border-l-2 border-accent-info/30`),children:[e.timestamp&&(0,L.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 shrink-0 mt-0.5 w-[52px] font-mono tabular-nums`,children:new Date(e.timestamp).toLocaleTimeString(`en`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}),n?(0,L.jsx)(`div`,{className:`flex-1 min-w-0 prose prose-invert prose-xs max-w-none
4
4
  prose-p:my-1 prose-p:leading-relaxed
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{$ as t,$t as n,D as r,Dt as i,E as a,Et as o,I as s,M as c,N as l,O as u,Qt as d,R as f,Rt as p,T as ee,b as m,dt as h,ft as g,k as _,lt as v,m as y,n as b,p as x,rn as S,sn as C,u as w,w as T,wt as E,x as D,y as O,zt as k}from"./index-B9IKK_QQ.js";import{t as A}from"./ExportDropdown-DAp7zWib.js";import{t as j}from"./useProjectCache-Cf83MBQh.js";import{t as te}from"./format-command-2VNoNnMv.js";var ne=E(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),M=e(C(),1),N=p();function P(e){if(e==null)return`—`;let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function F(e){return e==null?`—`:e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(3)}`}function I(e){return e==null?`—`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function L({label:e,a:t,b:n,highlight:r}){return(0,N.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 py-2 border-b border-border/20 last:border-0 text-xs`,children:[(0,N.jsx)(`span`,{className:`text-muted-foreground`,children:e}),(0,N.jsx)(`span`,{className:`font-mono text-right ${r===`a`?`text-emerald-400 aurora-light:text-accent-success font-semibold`:``}`,children:t}),(0,N.jsx)(`span`,{className:`font-mono text-right ${r===`b`?`text-emerald-400 aurora-light:text-accent-success font-semibold`:``}`,children:n})]})}function R(e,t,n=!0){return e==null||t==null||e===t?null:n?e<t?`a`:`b`:e>t?`a`:`b`}function re({jobIds:e,onClose:t}){let{t:r}=n(`jobs`),[i,a]=(0,M.useState)(null),[o,c]=(0,M.useState)(!0),[l,u]=(0,M.useState)(null);(0,M.useEffect)(()=>{let t=new AbortController;return fetch(`${k()}/jobs/compare?jobIds=${e.join(`,`)}`,{signal:t.signal}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{a(e),c(!1)}).catch(e=>{e.name!==`AbortError`&&(u(e.message),c(!1))}),()=>t.abort()},[e]);function d(e,t){return(0,N.jsxs)(`div`,{className:`text-center space-y-1`,children:[(0,N.jsx)(`p`,{className:`text-[10px] text-muted-foreground font-medium uppercase tracking-wider`,children:r(`comparison.jobN`,{n:t+1})}),(0,N.jsx)(`code`,{className:`text-[10px] text-foreground/70 block truncate max-w-[160px] mx-auto`,children:e.command}),(0,N.jsxs)(`div`,{className:`flex items-center justify-center gap-1 text-[10px]`,children:[e.status===`completed`?(0,N.jsx)(g,{className:`w-3 h-3 text-emerald-400 aurora-light:text-accent-success`}):(0,N.jsx)(h,{className:`w-3 h-3 text-rose-400 aurora-light:text-destructive`}),(0,N.jsx)(`span`,{className:`capitalize text-muted-foreground`,children:r(`statusLabel.${e.status}`,{defaultValue:e.status})})]}),(0,N.jsx)(`p`,{className:`text-[10px] text-muted-foreground font-mono`,children:e.id.slice(0,8)})]})}return(0,N.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:t,children:(0,N.jsxs)(`div`,{className:`w-full max-w-lg rounded-xl border border-border/30 bg-popover p-5 shadow-xl space-y-4 mx-4`,onClick:e=>e.stopPropagation(),children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,N.jsx)(`h2`,{className:`text-sm font-semibold`,children:r(`comparison.title`)}),(0,N.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted-foreground hover:text-foreground transition-colors`,children:(0,N.jsx)(s,{className:`w-4 h-4`})})]}),o&&(0,N.jsx)(`div`,{className:`space-y-2`,children:[0,1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-8 bg-muted/20 rounded animate-pulse`},e))}),l&&(0,N.jsx)(`p`,{className:`text-xs text-red-400 aurora-light:text-destructive`,children:r(`comparison.loadFailed`,{error:l})}),i&&(()=>{let[e,t]=i.jobs,n=R(e.durationMs,t.durationMs,!0),a=R(e.totalCostUsd,t.totalCostUsd,!0),o=R(e.tokensOut==null?null:e.tokensOut,t.tokensOut==null?null:t.tokensOut,!0);return(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 pb-3 border-b border-border/30 mb-1`,children:[(0,N.jsx)(`div`,{}),d(e,0),d(t,1)]}),(0,N.jsx)(L,{label:r(`comparison.duration`),a:P(e.durationMs),b:P(t.durationMs),highlight:n}),(0,N.jsx)(L,{label:r(`comparison.cost`),a:F(e.totalCostUsd),b:F(t.totalCostUsd),highlight:a}),(0,N.jsx)(L,{label:r(`comparison.tokensOut`),a:I(e.tokensOut),b:I(t.tokensOut),highlight:o}),(0,N.jsx)(L,{label:r(`comparison.tokensIn`),a:I(e.tokensIn),b:I(t.tokensIn),highlight:null}),(0,N.jsx)(L,{label:r(`comparison.cacheRead`),a:I(e.tokensCacheRead),b:I(t.tokensCacheRead),highlight:null}),(0,N.jsx)(L,{label:r(`comparison.model`),a:e.model??`—`,b:t.model??`—`,highlight:null}),(0,N.jsx)(L,{label:r(`comparison.phasesDone`),a:e.phasesCompleted.length>0?e.phasesCompleted.join(`, `):`—`,b:t.phasesCompleted.length>0?t.phasesCompleted.join(`, `):`—`,highlight:null})]})})(),i&&(0,N.jsx)(`p`,{className:`text-[10px] text-muted-foreground/60 text-center`,children:r(`comparison.betterValueHint`)})]})})}var ie={running:{variant:`running`,labelKey:`statusLabel.running`,tooltipKey:`statusTooltip.running`},completed:{variant:`success`,labelKey:`statusLabel.done`,tooltipKey:`statusTooltip.completed`},failed:{variant:`failed`,labelKey:`statusLabel.failed`,tooltipKey:`statusTooltip.failed`},canceled:{variant:`canceled`,labelKey:`statusLabel.canceled`,tooltipKey:`statusTooltip.canceled`},queued:{variant:`queued`,labelKey:`statusLabel.queued`,tooltipKey:`statusTooltip.queuedToRun`},zombie_terminated:{variant:`failed`,labelKey:`statusLabel.zombie`,tooltipKey:`statusTooltip.zombie`},skipped:{variant:`warning`,labelKey:`statusLabel.skipped`,tooltipKey:`statusTooltip.skipped`}},ae=[`running`,`completed`,`failed`,`canceled`,`zombie_terminated`,`queued`,`skipped`],z={critical:{className:`bg-red-500/15 aurora-light:bg-destructive/10 text-red-400 aurora-light:text-destructive border-red-500/30 aurora-light:border-destructive/30`,labelKey:`recent.priority.critical`},high:{className:`bg-orange-500/15 aurora-light:bg-accent-warning/10 text-orange-400 aurora-light:text-accent-warning border-orange-500/30 aurora-light:border-accent-warning/30`,labelKey:`recent.priority.high`},normal:{className:``,labelKey:`recent.priority.normal`},low:{className:`bg-gray-500/15 aurora-light:bg-muted text-gray-400 aurora-light:text-muted-foreground border-gray-500/30 aurora-light:border-border`,labelKey:`recent.priority.low`}};function oe(e){return e==null||e===0?null:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(3)}`}function se(e,t){if(!t)return null;let n=new Date(t).getTime()-new Date(e).getTime();if(n<0)return null;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}function ce(e){return e==null||e===0?null:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function le(e){try{return w(new Date(e),{addSuffix:!0,locale:i()})}catch{return e}}var B=10;function V({jobs:e,isLoading:i,onJobsCleared:s,onProposalClick:p,onProposalDelete:h}){let{t:g}=n(`jobs`),y=S(),{activeProjectId:b,projects:x}=o(),C=x.find(e=>e.id===b)?.provider,[w,E]=(0,M.useState)(null),[A,j]=(0,M.useState)(``),[P,F]=(0,M.useState)(``),[I,L]=(0,M.useState)(!1),[R,V]=(0,M.useState)(``),[H,U]=(0,M.useState)(``),[W,G]=(0,M.useState)(!1),[K,q]=(0,M.useState)(null),[J,ue]=(0,M.useState)(B),[Y,de]=(0,M.useState)(!1),[X,Z]=(0,M.useState)([]),[fe,Q]=(0,M.useState)(null);(0,M.useEffect)(()=>{ue(B)},[e.length]);function pe(){de(e=>!e),Z([])}function me(e){Z(t=>{if(t.includes(e))return t.filter(t=>t!==e);if(t.length>=2)return t;let n=[...t,e];return n.length===2&&Q(n),n})}let $=e.filter(e=>!(w&&e.status!==w||A&&e.started_at<A||P&&e.started_at>`${P}T23:59:59`)),he=e.filter(e=>!(R&&e.started_at<R||H&&e.started_at>`${H}T23:59:59`)).length;async function ge(e){G(!0);try{let t={};e===`range`&&(R&&(t.from=R),H&&(t.to=H));let n=await fetch(`${k()}/jobs`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(n.ok){let e=await n.json();d.success(g(`recent.toast.cleared`,{count:e.deleted})),L(!1),V(``),U(``),s?.()}else d.error(g(`recent.toast.clearFailed`))}catch{d.error(g(`recent.toast.networkError`))}finally{G(!1)}}return i?(0,N.jsx)(`div`,{className:`rounded-lg border border-border/40 bg-card/50 p-4 space-y-1`,children:[0,1,2].map(e=>(0,N.jsx)(`div`,{className:`h-9 bg-muted/30 rounded-md animate-pulse`},e))}):e.length===0?(0,N.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border/40 bg-card/50 p-8 text-center space-y-2`,children:[(0,N.jsx)(v,{className:`w-8 h-8 text-muted-foreground/30 mx-auto`}),(0,N.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:g(`recent.emptyTitle`)}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground/60`,children:g(`recent.emptyDescription`)})]}):(0,N.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-card/50 p-4 space-y-2`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>E(null),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${w===null?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground hover:bg-accent/50`}`,children:g(`recent.filterAll`,{count:e.length})}),ae.map(t=>{let n=e.filter(e=>e.status===t).length;return n===0?null:(0,N.jsx)(`button`,{type:`button`,onClick:()=>E(w===t?null:t),className:`px-2 py-0.5 rounded text-[10px] font-medium capitalize transition-colors ${w===t?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground hover:bg-accent/50`}`,children:g(`recent.filterStatus`,{status:g(`statusName.${t}`),count:n})},t)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{type:`date`,value:A,onChange:e=>j(e.target.value),className:`h-6 rounded border border-border bg-input px-1.5 text-[10px] text-foreground`,title:g(`recent.fromDate`)}),(0,N.jsx)(`input`,{type:`date`,value:P,onChange:e=>F(e.target.value),className:`h-6 rounded border border-border bg-input px-1.5 text-[10px] text-foreground`,title:g(`recent.toDate`)}),(A||P)&&(0,N.jsx)(`button`,{type:`button`,onClick:()=>{j(``),F(``)},className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:g(`recent.clear`)}),(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0 transition-colors ${Y?`text-foreground bg-accent`:`text-muted-foreground hover:text-foreground`}`,onClick:pe,children:(0,N.jsx)(ne,{className:`w-3.5 h-3.5`})})}),(0,N.jsx)(m,{children:g(Y?`recent.exitCompareMode`:`recent.compareTwoJobs`)})]}),(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0 text-muted-foreground hover:text-destructive`,onClick:()=>L(!0),children:(0,N.jsx)(f,{className:`w-3.5 h-3.5`})})}),(0,N.jsx)(m,{children:g(`recent.clearJobs`)})]})]})]}),Y&&(0,N.jsxs)(`div`,{className:`flex items-center justify-between rounded-md bg-accent/40 px-3 py-1.5 text-[10px] text-muted-foreground`,children:[(0,N.jsxs)(`span`,{children:[X.length===0&&g(`recent.selectTwoToCompare`),X.length===1&&g(`recent.selectOneMore`),X.length===2&&g(`recent.readyToCompare`)]}),X.length===2&&(0,N.jsx)(`button`,{type:`button`,className:`text-[10px] font-medium text-foreground hover:underline`,onClick:()=>Q(X),children:g(`recent.compareAction`)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1 text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:[(0,N.jsx)(`span`,{className:`w-14`,children:g(`recent.colStatus`)}),(0,N.jsx)(`span`,{className:`flex-1 min-w-0`,children:g(`recent.colCommand`)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,N.jsx)(`span`,{className:`w-14 text-right`,children:g(`recent.colDuration`)}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:g(`recent.colTokens`)}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:g(`recent.colCost`)}),(0,N.jsx)(`span`,{className:`w-20 text-right`,children:g(`recent.colStarted`)})]})]}),(0,N.jsx)(`div`,{className:`space-y-0.5`,children:$.slice(0,J).map(e=>{let n=ie[e.status]??ie.queued,r=oe(e.total_cost_usd),i=se(e.started_at,e.finished_at),a=ce((e.tokens_in??0)+(e.tokens_out??0)+(e.tokens_cache_read??0)+(e.tokens_cache_create??0)||null),o=e.id.startsWith(`proposal:`),s=o?e.id.replace(`proposal:`,``):null,l=X.includes(e.id),u=Y&&!o&&X.length===2&&!l;return(0,N.jsxs)(`div`,{role:`button`,tabIndex:0,className:`flex items-center gap-3 px-3 py-2 rounded-md transition-colors cursor-pointer group ${l?`bg-accent/70 ring-1 ring-border`:u?`opacity-40 cursor-not-allowed`:`hover:bg-accent/50`}`,onClick:()=>{if(Y&&!o){me(e.id);return}o&&s?p?.(s):y(`/jobs/${e.id}`)},children:[(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(`div`,{children:(0,N.jsx)(c,{variant:n.variant,children:g(n.labelKey)})})}),(0,N.jsx)(m,{children:g(n.tooltipKey)})]}),e.priority&&e.priority!==`normal`&&(0,N.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium border ${z[e.priority].className}`,children:g(z[e.priority].labelKey)}),e.profile_name&&(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium border border-accent-primary/40 bg-accent-primary/10 text-accent-primary/90`,children:e.profile_name})}),(0,N.jsx)(m,{children:g(`recent.profileTooltip`,{name:e.profile_name})})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1 flex-1 min-w-0`,children:[e.pipeline_id&&(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(t,{className:`w-3 h-3 text-accent-primary/60 shrink-0`})}),(0,N.jsxs)(m,{children:[g(`recent.pipelinePart`),e.depends_on_job_id&&` ${g(`recent.pipelineDependsOn`)}`,e.skip_reason&&` — ${e.skip_reason}`]})]}),(0,N.jsx)(`code`,{className:`text-xs text-foreground/80 truncate`,children:te(e.command,C)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground shrink-0`,children:[(0,N.jsx)(`span`,{className:`w-14 text-right`,children:i??`—`}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:a?`${a}`:`—`}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:r??`—`}),(0,N.jsx)(`span`,{className:`w-20 text-right`,children:le(e.started_at)}),o&&s&&(0,N.jsx)(`button`,{type:`button`,className:`w-4 h-4 md:opacity-0 md:group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-all`,onClick:e=>{e.stopPropagation(),q(s)},title:g(`recent.deleteProposal`),children:(0,N.jsx)(f,{className:`w-3 h-3`})})]})]},e.id)})}),$.length>J&&(0,N.jsx)(`div`,{className:`pt-1 text-center`,children:(0,N.jsx)(`button`,{type:`button`,onClick:()=>ue(e=>e+B),className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors px-3 py-1 rounded hover:bg-accent/50`,children:g(`recent.loadMore`,{count:$.length-J})})}),I&&(0,N.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:()=>L(!1),children:(0,N.jsxs)(`div`,{className:`w-80 rounded-xl border border-border/30 bg-popover p-4 shadow-lg space-y-4`,onClick:e=>e.stopPropagation(),children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold`,children:g(`recent.clearModal.title`)}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:g(`recent.clearModal.jobsInHistory`,{count:e.length})})]}),(0,N.jsx)(l,{variant:`destructive`,size:`sm`,className:`w-full`,disabled:W,onClick:()=>ge(`all`),children:g(`recent.clearModal.clearAll`,{count:e.length})}),(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:g(`recent.clearModal.orByRange`)}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(`input`,{type:`date`,value:R,onChange:e=>V(e.target.value),className:`flex-1 h-7 rounded-md border border-border bg-input px-2 text-xs text-foreground`,placeholder:g(`recent.clearModal.fromPlaceholder`)}),(0,N.jsx)(`input`,{type:`date`,value:H,onChange:e=>U(e.target.value),className:`flex-1 h-7 rounded-md border border-border bg-input px-2 text-xs text-foreground`,placeholder:g(`recent.clearModal.toPlaceholder`)})]}),(0,N.jsx)(l,{variant:`outline`,size:`sm`,className:`w-full`,disabled:W||!R&&!H,onClick:()=>ge(`range`),children:R||H?g(`recent.clearModal.clearInRange`,{count:he}):g(`recent.clearModal.clearRange`)})]}),(0,N.jsx)(l,{variant:`ghost`,size:`sm`,className:`w-full`,onClick:()=>L(!1),children:g(`common:actions.cancel`)})]})}),(0,N.jsx)(T,{open:K!==null,onOpenChange:e=>!e&&q(null),children:(0,N.jsxs)(ee,{className:`max-w-sm`,children:[(0,N.jsxs)(u,{children:[(0,N.jsx)(_,{children:g(`recent.deleteProposalConfirm.title`)}),(0,N.jsx)(a,{children:g(`recent.deleteProposalConfirm.description`)})]}),(0,N.jsxs)(r,{children:[(0,N.jsx)(l,{variant:`ghost`,size:`sm`,onClick:()=>q(null),children:g(`common:actions.cancel`)}),(0,N.jsx)(l,{variant:`destructive`,size:`sm`,onClick:()=>{K&&h?.(K),q(null)},children:g(`common:actions.delete`)})]})]})}),fe&&(0,N.jsx)(re,{jobIds:fe,onClose:()=>{Q(null),Z([]),de(!1)}})]})}function H(){let{t:e}=n(`jobs`),{activeProjectId:t}=o(),{recentJobs:i}=b(t),{data:a,isFirstLoad:s,refresh:f}=j({namespace:`jobs`,projectId:t,initialValue:i,fetcher:async()=>{let e=await fetch(`${k()}/jobs?limit=10`);return e.ok?(await e.json()).jobs:[]},pollInterval:1e4}),{data:p}=j({namespace:`proposals`,projectId:t,initialValue:[],fetcher:async()=>{let e=await fetch(`${k()}/propose?limit=10`);return e.ok?(await e.json()).proposals:[]},pollInterval:1e4}),m={input:`queued`,exploring:`running`,review:`running`,refining:`running`,creating_issue:`running`,created:`completed`,cancelled:`canceled`},h=p.map(e=>({id:`proposal:${e.id}`,command:`/specrails:propose-feature ${e.idea.length>60?e.idea.slice(0,57)+`...`:e.idea}`,started_at:e.created_at,status:m[e.status]??`queued`})),g=[...a,...h].sort((e,t)=>new Date(t.started_at).getTime()-new Date(e.started_at).getTime()),[v,S]=(0,M.useState)(null),C=(0,M.useCallback)(async e=>{try{let t=await fetch(`${k()}/propose/${e}`);if(!t.ok)return;S((await t.json()).proposal)}catch{}},[]),w=(0,M.useCallback)(async t=>{try{(await fetch(`${k()}/propose/${t}`,{method:`DELETE`})).ok&&(d.success(e(`page.proposalDeleted`)),f())}catch{}},[f,e]);return(0,N.jsxs)(`div`,{className:`max-w-4xl mx-auto px-4 py-6`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,N.jsx)(`h1`,{className:`text-sm font-semibold`,children:e(`page.title`)}),(0,N.jsx)(A,{baseUrl:`${k()}/jobs/export`,label:e(`page.exportJobs`)})]}),(0,N.jsx)(V,{jobs:g,isLoading:s,onJobsCleared:f,onProposalClick:C,onProposalDelete:w}),(0,N.jsx)(T,{open:v!==null,onOpenChange:e=>!e&&S(null),children:(0,N.jsx)(ee,{className:`max-w-3xl glass-card`,children:v&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(u,{children:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(_,{className:`flex-1 min-w-0`,children:e(`page.proposal.title`)}),(0,N.jsx)(c,{variant:v.status===`created`?`success`:v.status===`cancelled`?`destructive`:`secondary`,children:v.status})]})}),(0,N.jsx)(`div`,{className:`text-xs text-muted-foreground bg-muted/20 rounded px-2 py-1 italic`,children:v.idea}),v.result_markdown?(0,N.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto rounded-lg px-3 py-2 text-xs bg-muted/40`,children:(0,N.jsx)(`div`,{className:`prose prose-invert prose-xs max-w-none prose-p:my-1 prose-headings:mt-2 prose-headings:mb-1 prose-headings:text-sm prose-headings:font-semibold prose-ul:my-1 prose-ol:my-1 prose-li:my-0 prose-code:text-cyan-300 prose-code:text-[10px] prose-code:bg-muted/40 prose-code:px-1 prose-code:py-0.5 prose-code:rounded text-foreground/80`,children:(0,N.jsx)(y,{remarkPlugins:[x],children:v.result_markdown})})}):(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground py-4 text-center`,children:e(`page.proposal.noContent`)}),v.issue_url&&(0,N.jsxs)(`div`,{className:`text-xs`,children:[e(`page.proposal.githubIssue`),` `,(0,N.jsx)(`a`,{href:v.issue_url,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent-primary hover:underline`,children:v.issue_url})]}),(0,N.jsxs)(r,{children:[(0,N.jsx)(l,{variant:`destructive`,size:`sm`,onClick:()=>{w(v.id),S(null)},children:e(`common:actions.delete`)}),(0,N.jsx)(l,{variant:`ghost`,size:`sm`,onClick:()=>S(null),children:e(`common:actions.close`)})]})]})})})]})}export{H as default};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{$ as t,$t as n,D as r,Dt as i,E as a,Et as o,I as s,M as c,N as l,O as u,Qt as d,R as f,Rt as p,T as ee,b as m,dt as h,ft as g,k as _,lt as v,m as y,n as b,p as x,rn as S,sn as C,u as w,w as T,wt as E,x as D,y as O,zt as k}from"./index-DK214dak.js";import{t as A}from"./ExportDropdown-DO-GGiMh.js";import{t as j}from"./useProjectCache-DVNypkmR.js";import{t as te}from"./format-command-2VNoNnMv.js";var ne=E(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),M=e(C(),1),N=p();function P(e){if(e==null)return`—`;let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function F(e){return e==null?`—`:e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(3)}`}function I(e){return e==null?`—`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function L({label:e,a:t,b:n,highlight:r}){return(0,N.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 py-2 border-b border-border/20 last:border-0 text-xs`,children:[(0,N.jsx)(`span`,{className:`text-muted-foreground`,children:e}),(0,N.jsx)(`span`,{className:`font-mono text-right ${r===`a`?`text-emerald-400 aurora-light:text-accent-success font-semibold`:``}`,children:t}),(0,N.jsx)(`span`,{className:`font-mono text-right ${r===`b`?`text-emerald-400 aurora-light:text-accent-success font-semibold`:``}`,children:n})]})}function R(e,t,n=!0){return e==null||t==null||e===t?null:n?e<t?`a`:`b`:e>t?`a`:`b`}function re({jobIds:e,onClose:t}){let{t:r}=n(`jobs`),[i,a]=(0,M.useState)(null),[o,c]=(0,M.useState)(!0),[l,u]=(0,M.useState)(null);(0,M.useEffect)(()=>{let t=new AbortController;return fetch(`${k()}/jobs/compare?jobIds=${e.join(`,`)}`,{signal:t.signal}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{a(e),c(!1)}).catch(e=>{e.name!==`AbortError`&&(u(e.message),c(!1))}),()=>t.abort()},[e]);function d(e,t){return(0,N.jsxs)(`div`,{className:`text-center space-y-1`,children:[(0,N.jsx)(`p`,{className:`text-[10px] text-muted-foreground font-medium uppercase tracking-wider`,children:r(`comparison.jobN`,{n:t+1})}),(0,N.jsx)(`code`,{className:`text-[10px] text-foreground/70 block truncate max-w-[160px] mx-auto`,children:e.command}),(0,N.jsxs)(`div`,{className:`flex items-center justify-center gap-1 text-[10px]`,children:[e.status===`completed`?(0,N.jsx)(g,{className:`w-3 h-3 text-emerald-400 aurora-light:text-accent-success`}):(0,N.jsx)(h,{className:`w-3 h-3 text-rose-400 aurora-light:text-destructive`}),(0,N.jsx)(`span`,{className:`capitalize text-muted-foreground`,children:r(`statusLabel.${e.status}`,{defaultValue:e.status})})]}),(0,N.jsx)(`p`,{className:`text-[10px] text-muted-foreground font-mono`,children:e.id.slice(0,8)})]})}return(0,N.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:t,children:(0,N.jsxs)(`div`,{className:`w-full max-w-lg rounded-xl border border-border/30 bg-popover p-5 shadow-xl space-y-4 mx-4`,onClick:e=>e.stopPropagation(),children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,N.jsx)(`h2`,{className:`text-sm font-semibold`,children:r(`comparison.title`)}),(0,N.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted-foreground hover:text-foreground transition-colors`,children:(0,N.jsx)(s,{className:`w-4 h-4`})})]}),o&&(0,N.jsx)(`div`,{className:`space-y-2`,children:[0,1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-8 bg-muted/20 rounded animate-pulse`},e))}),l&&(0,N.jsx)(`p`,{className:`text-xs text-red-400 aurora-light:text-destructive`,children:r(`comparison.loadFailed`,{error:l})}),i&&(()=>{let[e,t]=i.jobs,n=R(e.durationMs,t.durationMs,!0),a=R(e.totalCostUsd,t.totalCostUsd,!0),o=R(e.tokensOut==null?null:e.tokensOut,t.tokensOut==null?null:t.tokensOut,!0);return(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 pb-3 border-b border-border/30 mb-1`,children:[(0,N.jsx)(`div`,{}),d(e,0),d(t,1)]}),(0,N.jsx)(L,{label:r(`comparison.duration`),a:P(e.durationMs),b:P(t.durationMs),highlight:n}),(0,N.jsx)(L,{label:r(`comparison.cost`),a:F(e.totalCostUsd),b:F(t.totalCostUsd),highlight:a}),(0,N.jsx)(L,{label:r(`comparison.tokensOut`),a:I(e.tokensOut),b:I(t.tokensOut),highlight:o}),(0,N.jsx)(L,{label:r(`comparison.tokensIn`),a:I(e.tokensIn),b:I(t.tokensIn),highlight:null}),(0,N.jsx)(L,{label:r(`comparison.cacheRead`),a:I(e.tokensCacheRead),b:I(t.tokensCacheRead),highlight:null}),(0,N.jsx)(L,{label:r(`comparison.model`),a:e.model??`—`,b:t.model??`—`,highlight:null}),(0,N.jsx)(L,{label:r(`comparison.phasesDone`),a:e.phasesCompleted.length>0?e.phasesCompleted.join(`, `):`—`,b:t.phasesCompleted.length>0?t.phasesCompleted.join(`, `):`—`,highlight:null})]})})(),i&&(0,N.jsx)(`p`,{className:`text-[10px] text-muted-foreground/60 text-center`,children:r(`comparison.betterValueHint`)})]})})}var ie={running:{variant:`running`,labelKey:`statusLabel.running`,tooltipKey:`statusTooltip.running`},completed:{variant:`success`,labelKey:`statusLabel.done`,tooltipKey:`statusTooltip.completed`},failed:{variant:`failed`,labelKey:`statusLabel.failed`,tooltipKey:`statusTooltip.failed`},canceled:{variant:`canceled`,labelKey:`statusLabel.canceled`,tooltipKey:`statusTooltip.canceled`},queued:{variant:`queued`,labelKey:`statusLabel.queued`,tooltipKey:`statusTooltip.queuedToRun`},zombie_terminated:{variant:`failed`,labelKey:`statusLabel.zombie`,tooltipKey:`statusTooltip.zombie`},skipped:{variant:`warning`,labelKey:`statusLabel.skipped`,tooltipKey:`statusTooltip.skipped`}},ae=[`running`,`completed`,`failed`,`canceled`,`zombie_terminated`,`queued`,`skipped`],z={critical:{className:`bg-red-500/15 aurora-light:bg-destructive/10 text-red-400 aurora-light:text-destructive border-red-500/30 aurora-light:border-destructive/30`,labelKey:`recent.priority.critical`},high:{className:`bg-orange-500/15 aurora-light:bg-accent-warning/10 text-orange-400 aurora-light:text-accent-warning border-orange-500/30 aurora-light:border-accent-warning/30`,labelKey:`recent.priority.high`},normal:{className:``,labelKey:`recent.priority.normal`},low:{className:`bg-gray-500/15 aurora-light:bg-muted text-gray-400 aurora-light:text-muted-foreground border-gray-500/30 aurora-light:border-border`,labelKey:`recent.priority.low`}};function oe(e){return e==null||e===0?null:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(3)}`}function se(e,t){if(!t)return null;let n=new Date(t).getTime()-new Date(e).getTime();if(n<0)return null;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}function ce(e){return e==null||e===0?null:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function le(e){try{return w(new Date(e),{addSuffix:!0,locale:i()})}catch{return e}}var B=10;function V({jobs:e,isLoading:i,onJobsCleared:s,onProposalClick:p,onProposalDelete:h}){let{t:g}=n(`jobs`),y=S(),{activeProjectId:b,projects:x}=o(),C=x.find(e=>e.id===b)?.provider,[w,E]=(0,M.useState)(null),[A,j]=(0,M.useState)(``),[P,F]=(0,M.useState)(``),[I,L]=(0,M.useState)(!1),[R,V]=(0,M.useState)(``),[H,U]=(0,M.useState)(``),[W,G]=(0,M.useState)(!1),[K,q]=(0,M.useState)(null),[J,ue]=(0,M.useState)(B),[Y,de]=(0,M.useState)(!1),[X,Z]=(0,M.useState)([]),[fe,Q]=(0,M.useState)(null);(0,M.useEffect)(()=>{ue(B)},[e.length]);function pe(){de(e=>!e),Z([])}function me(e){Z(t=>{if(t.includes(e))return t.filter(t=>t!==e);if(t.length>=2)return t;let n=[...t,e];return n.length===2&&Q(n),n})}let $=e.filter(e=>!(w&&e.status!==w||A&&e.started_at<A||P&&e.started_at>`${P}T23:59:59`)),he=e.filter(e=>!(R&&e.started_at<R||H&&e.started_at>`${H}T23:59:59`)).length;async function ge(e){G(!0);try{let t={};e===`range`&&(R&&(t.from=R),H&&(t.to=H));let n=await fetch(`${k()}/jobs`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(n.ok){let e=await n.json();d.success(g(`recent.toast.cleared`,{count:e.deleted})),L(!1),V(``),U(``),s?.()}else d.error(g(`recent.toast.clearFailed`))}catch{d.error(g(`recent.toast.networkError`))}finally{G(!1)}}return i?(0,N.jsx)(`div`,{className:`rounded-lg border border-border/40 bg-card/50 p-4 space-y-1`,children:[0,1,2].map(e=>(0,N.jsx)(`div`,{className:`h-9 bg-muted/30 rounded-md animate-pulse`},e))}):e.length===0?(0,N.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border/40 bg-card/50 p-8 text-center space-y-2`,children:[(0,N.jsx)(v,{className:`w-8 h-8 text-muted-foreground/30 mx-auto`}),(0,N.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:g(`recent.emptyTitle`)}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground/60`,children:g(`recent.emptyDescription`)})]}):(0,N.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-card/50 p-4 space-y-2`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>E(null),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${w===null?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground hover:bg-accent/50`}`,children:g(`recent.filterAll`,{count:e.length})}),ae.map(t=>{let n=e.filter(e=>e.status===t).length;return n===0?null:(0,N.jsx)(`button`,{type:`button`,onClick:()=>E(w===t?null:t),className:`px-2 py-0.5 rounded text-[10px] font-medium capitalize transition-colors ${w===t?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground hover:bg-accent/50`}`,children:g(`recent.filterStatus`,{status:g(`statusName.${t}`),count:n})},t)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{type:`date`,value:A,onChange:e=>j(e.target.value),className:`h-6 rounded border border-border bg-input px-1.5 text-[10px] text-foreground`,title:g(`recent.fromDate`)}),(0,N.jsx)(`input`,{type:`date`,value:P,onChange:e=>F(e.target.value),className:`h-6 rounded border border-border bg-input px-1.5 text-[10px] text-foreground`,title:g(`recent.toDate`)}),(A||P)&&(0,N.jsx)(`button`,{type:`button`,onClick:()=>{j(``),F(``)},className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:g(`recent.clear`)}),(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0 transition-colors ${Y?`text-foreground bg-accent`:`text-muted-foreground hover:text-foreground`}`,onClick:pe,children:(0,N.jsx)(ne,{className:`w-3.5 h-3.5`})})}),(0,N.jsx)(m,{children:g(Y?`recent.exitCompareMode`:`recent.compareTwoJobs`)})]}),(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(l,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0 text-muted-foreground hover:text-destructive`,onClick:()=>L(!0),children:(0,N.jsx)(f,{className:`w-3.5 h-3.5`})})}),(0,N.jsx)(m,{children:g(`recent.clearJobs`)})]})]})]}),Y&&(0,N.jsxs)(`div`,{className:`flex items-center justify-between rounded-md bg-accent/40 px-3 py-1.5 text-[10px] text-muted-foreground`,children:[(0,N.jsxs)(`span`,{children:[X.length===0&&g(`recent.selectTwoToCompare`),X.length===1&&g(`recent.selectOneMore`),X.length===2&&g(`recent.readyToCompare`)]}),X.length===2&&(0,N.jsx)(`button`,{type:`button`,className:`text-[10px] font-medium text-foreground hover:underline`,onClick:()=>Q(X),children:g(`recent.compareAction`)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1 text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:[(0,N.jsx)(`span`,{className:`w-14`,children:g(`recent.colStatus`)}),(0,N.jsx)(`span`,{className:`flex-1 min-w-0`,children:g(`recent.colCommand`)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,N.jsx)(`span`,{className:`w-14 text-right`,children:g(`recent.colDuration`)}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:g(`recent.colTokens`)}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:g(`recent.colCost`)}),(0,N.jsx)(`span`,{className:`w-20 text-right`,children:g(`recent.colStarted`)})]})]}),(0,N.jsx)(`div`,{className:`space-y-0.5`,children:$.slice(0,J).map(e=>{let n=ie[e.status]??ie.queued,r=oe(e.total_cost_usd),i=se(e.started_at,e.finished_at),a=ce((e.tokens_in??0)+(e.tokens_out??0)+(e.tokens_cache_read??0)+(e.tokens_cache_create??0)||null),o=e.id.startsWith(`proposal:`),s=o?e.id.replace(`proposal:`,``):null,l=X.includes(e.id),u=Y&&!o&&X.length===2&&!l;return(0,N.jsxs)(`div`,{role:`button`,tabIndex:0,className:`flex items-center gap-3 px-3 py-2 rounded-md transition-colors cursor-pointer group ${l?`bg-accent/70 ring-1 ring-border`:u?`opacity-40 cursor-not-allowed`:`hover:bg-accent/50`}`,onClick:()=>{if(Y&&!o){me(e.id);return}o&&s?p?.(s):y(`/jobs/${e.id}`)},children:[(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(`div`,{children:(0,N.jsx)(c,{variant:n.variant,children:g(n.labelKey)})})}),(0,N.jsx)(m,{children:g(n.tooltipKey)})]}),e.priority&&e.priority!==`normal`&&(0,N.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium border ${z[e.priority].className}`,children:g(z[e.priority].labelKey)}),e.profile_name&&(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium border border-accent-primary/40 bg-accent-primary/10 text-accent-primary/90`,children:e.profile_name})}),(0,N.jsx)(m,{children:g(`recent.profileTooltip`,{name:e.profile_name})})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1 flex-1 min-w-0`,children:[e.pipeline_id&&(0,N.jsxs)(O,{children:[(0,N.jsx)(D,{asChild:!0,children:(0,N.jsx)(t,{className:`w-3 h-3 text-accent-primary/60 shrink-0`})}),(0,N.jsxs)(m,{children:[g(`recent.pipelinePart`),e.depends_on_job_id&&` ${g(`recent.pipelineDependsOn`)}`,e.skip_reason&&` — ${e.skip_reason}`]})]}),(0,N.jsx)(`code`,{className:`text-xs text-foreground/80 truncate`,children:te(e.command,C)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground shrink-0`,children:[(0,N.jsx)(`span`,{className:`w-14 text-right`,children:i??`—`}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:a?`${a}`:`—`}),(0,N.jsx)(`span`,{className:`w-12 text-right`,children:r??`—`}),(0,N.jsx)(`span`,{className:`w-20 text-right`,children:le(e.started_at)}),o&&s&&(0,N.jsx)(`button`,{type:`button`,className:`w-4 h-4 md:opacity-0 md:group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-all`,onClick:e=>{e.stopPropagation(),q(s)},title:g(`recent.deleteProposal`),children:(0,N.jsx)(f,{className:`w-3 h-3`})})]})]},e.id)})}),$.length>J&&(0,N.jsx)(`div`,{className:`pt-1 text-center`,children:(0,N.jsx)(`button`,{type:`button`,onClick:()=>ue(e=>e+B),className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors px-3 py-1 rounded hover:bg-accent/50`,children:g(`recent.loadMore`,{count:$.length-J})})}),I&&(0,N.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:()=>L(!1),children:(0,N.jsxs)(`div`,{className:`w-80 rounded-xl border border-border/30 bg-popover p-4 shadow-lg space-y-4`,onClick:e=>e.stopPropagation(),children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold`,children:g(`recent.clearModal.title`)}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:g(`recent.clearModal.jobsInHistory`,{count:e.length})})]}),(0,N.jsx)(l,{variant:`destructive`,size:`sm`,className:`w-full`,disabled:W,onClick:()=>ge(`all`),children:g(`recent.clearModal.clearAll`,{count:e.length})}),(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:g(`recent.clearModal.orByRange`)}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(`input`,{type:`date`,value:R,onChange:e=>V(e.target.value),className:`flex-1 h-7 rounded-md border border-border bg-input px-2 text-xs text-foreground`,placeholder:g(`recent.clearModal.fromPlaceholder`)}),(0,N.jsx)(`input`,{type:`date`,value:H,onChange:e=>U(e.target.value),className:`flex-1 h-7 rounded-md border border-border bg-input px-2 text-xs text-foreground`,placeholder:g(`recent.clearModal.toPlaceholder`)})]}),(0,N.jsx)(l,{variant:`outline`,size:`sm`,className:`w-full`,disabled:W||!R&&!H,onClick:()=>ge(`range`),children:R||H?g(`recent.clearModal.clearInRange`,{count:he}):g(`recent.clearModal.clearRange`)})]}),(0,N.jsx)(l,{variant:`ghost`,size:`sm`,className:`w-full`,onClick:()=>L(!1),children:g(`common:actions.cancel`)})]})}),(0,N.jsx)(T,{open:K!==null,onOpenChange:e=>!e&&q(null),children:(0,N.jsxs)(ee,{className:`max-w-sm`,children:[(0,N.jsxs)(u,{children:[(0,N.jsx)(_,{children:g(`recent.deleteProposalConfirm.title`)}),(0,N.jsx)(a,{children:g(`recent.deleteProposalConfirm.description`)})]}),(0,N.jsxs)(r,{children:[(0,N.jsx)(l,{variant:`ghost`,size:`sm`,onClick:()=>q(null),children:g(`common:actions.cancel`)}),(0,N.jsx)(l,{variant:`destructive`,size:`sm`,onClick:()=>{K&&h?.(K),q(null)},children:g(`common:actions.delete`)})]})]})}),fe&&(0,N.jsx)(re,{jobIds:fe,onClose:()=>{Q(null),Z([]),de(!1)}})]})}function H(){let{t:e}=n(`jobs`),{activeProjectId:t}=o(),{recentJobs:i}=b(t),{data:a,isFirstLoad:s,refresh:f}=j({namespace:`jobs`,projectId:t,initialValue:i,fetcher:async()=>{let e=await fetch(`${k()}/jobs?limit=10`);return e.ok?(await e.json()).jobs:[]},pollInterval:1e4}),{data:p}=j({namespace:`proposals`,projectId:t,initialValue:[],fetcher:async()=>{let e=await fetch(`${k()}/propose?limit=10`);return e.ok?(await e.json()).proposals:[]},pollInterval:1e4}),m={input:`queued`,exploring:`running`,review:`running`,refining:`running`,creating_issue:`running`,created:`completed`,cancelled:`canceled`},h=p.map(e=>({id:`proposal:${e.id}`,command:`/specrails:propose-feature ${e.idea.length>60?e.idea.slice(0,57)+`...`:e.idea}`,started_at:e.created_at,status:m[e.status]??`queued`})),g=[...a,...h].sort((e,t)=>new Date(t.started_at).getTime()-new Date(e.started_at).getTime()),[v,S]=(0,M.useState)(null),C=(0,M.useCallback)(async e=>{try{let t=await fetch(`${k()}/propose/${e}`);if(!t.ok)return;S((await t.json()).proposal)}catch{}},[]),w=(0,M.useCallback)(async t=>{try{(await fetch(`${k()}/propose/${t}`,{method:`DELETE`})).ok&&(d.success(e(`page.proposalDeleted`)),f())}catch{}},[f,e]);return(0,N.jsxs)(`div`,{className:`max-w-4xl mx-auto px-4 py-6`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,N.jsx)(`h1`,{className:`text-sm font-semibold`,children:e(`page.title`)}),(0,N.jsx)(A,{baseUrl:`${k()}/jobs/export`,label:e(`page.exportJobs`)})]}),(0,N.jsx)(V,{jobs:g,isLoading:s,onJobsCleared:f,onProposalClick:C,onProposalDelete:w}),(0,N.jsx)(T,{open:v!==null,onOpenChange:e=>!e&&S(null),children:(0,N.jsx)(ee,{className:`max-w-3xl glass-card`,children:v&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(u,{children:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(_,{className:`flex-1 min-w-0`,children:e(`page.proposal.title`)}),(0,N.jsx)(c,{variant:v.status===`created`?`success`:v.status===`cancelled`?`destructive`:`secondary`,children:v.status})]})}),(0,N.jsx)(`div`,{className:`text-xs text-muted-foreground bg-muted/20 rounded px-2 py-1 italic`,children:v.idea}),v.result_markdown?(0,N.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto rounded-lg px-3 py-2 text-xs bg-muted/40`,children:(0,N.jsx)(`div`,{className:`prose prose-invert prose-xs max-w-none prose-p:my-1 prose-headings:mt-2 prose-headings:mb-1 prose-headings:text-sm prose-headings:font-semibold prose-ul:my-1 prose-ol:my-1 prose-li:my-0 prose-code:text-cyan-300 prose-code:text-[10px] prose-code:bg-muted/40 prose-code:px-1 prose-code:py-0.5 prose-code:rounded text-foreground/80`,children:(0,N.jsx)(y,{remarkPlugins:[x],children:v.result_markdown})})}):(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground py-4 text-center`,children:e(`page.proposal.noContent`)}),v.issue_url&&(0,N.jsxs)(`div`,{className:`text-xs`,children:[e(`page.proposal.githubIssue`),` `,(0,N.jsx)(`a`,{href:v.issue_url,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent-primary hover:underline`,children:v.issue_url})]}),(0,N.jsxs)(r,{children:[(0,N.jsx)(l,{variant:`destructive`,size:`sm`,onClick:()=>{w(v.id),S(null)},children:e(`common:actions.delete`)}),(0,N.jsx)(l,{variant:`ghost`,size:`sm`,onClick:()=>S(null),children:e(`common:actions.close`)})]})]})})})]})}export{H as default};
@@ -1 +1 @@
1
- var e={title:`スペックを追加`,dialogDescription:`短いアイデアから、即時または Explore モードで新しいスペックを作成します。`,engineAriaLabel:`このスペックの AI エンジン`,modeTablistLabel:`スペック作成モード`,mode:{quick:`クイック`,explore:`Explore`,raw:`Raw`,exploreHint:`対話型`,rawHint:`AIなし`},modeDescription:{quick:`機能や変更内容を記述してください。モックアップ、ブリーフ、データを添付するとコンテキストが充実します。`,explore:`大まかなアイデアを記述してください。Claude が対話を通じて形にするのを手伝います — コミットのタイミングはあなたが決めます。`,raw:`プロンプトをそのままスペックチケットとして保存します。今は AI を実行しません。レールにドラッグするとビルドされます。`},editorPlaceholder:{quick:`例: 設定ページにダークモードの切り替えを追加し、ユーザーの設定を永続化する...`,explore:`例: ダークモード — トグルの配置や永続化の方法はまだ未定…`,raw:`機能、変更、アイデアを記述してください。Markdown、画像、ファイルに対応…`},ideaAriaLabel:`スペックのアイデア`,raw:{titleLabel:`タイトル`,titlePlaceholder:`プロンプトから自動入力…`,priorityLabel:`優先度`,labelsLabel:`ラベル`,removeLabel:`ラベル {{label}} を削除`,addLabelAria:`ラベルを追加`,labelPlaceholder:`任意…`,bodyAriaLabel:`Raw スペック本文`},priority:{critical:`クリティカル`,high:`高`,medium:`中`,low:`低`},fromWebsite:`ウェブサイトから`,fromWebsiteTitle:`実際のウェブページを開き、範囲を選択してスペックに変換`,capture:{responsiveSizes_one:`レスポンシブ · {{count}} サイズ`,responsiveSizes_other:`レスポンシブ · {{count}} サイズ`},submit:{quick:`スペックを生成`,explore:`続行`,raw:`作成`,disabledTitle:`先にプロンプトを入力してください`},toast:{createFailed:`スペックの作成に失敗しました`,rawSavedWithId:`#{{id}} として保存 · Raw スペックはレールで使用可能`,rawCreated:`Raw スペックを作成しました`,exploreNotWired:`このビューでは Explore モードは利用できません`,generating:`生成中...`,failedToStart:`{{projectName}} · 開始に失敗しました`,unsupportedFileType:`未対応のファイル形式: {{name}}`,uploadFailed:`{{name}} のアップロードに失敗しました: {{message}}`}},t={title:`機能を提案`,ideaIntro:`アイデアを平易な言葉で記述してください。Claude がコードベースを読み取り、完全な提案として構造化します。`,ideaAriaLabel:`機能のアイデア`,ideaPlaceholder:`例: API コストがしきい値を超えたときに通知される予算アラートをユーザーが設定できるようにしたい...`,cmdEnterToSubmit:`Cmd+Enter で送信`,exploreIdea:`アイデアを探索`,exploringTitle:`アイデアを探索中...`,refiningTitle:`提案を改良中...`,reviewTitle:`提案をレビュー`,readingCodebase_one:`コードベースを読み取り中...({{count}} ファイル探索済み)`,readingCodebase_other:`コードベースを読み取り中...({{count}} ファイル探索済み)`,refinementAriaLabel:`改良フィードバック`,refinementPlaceholder:`変更を依頼、制約を追加、スコープを調整...`,sendRefinementTitle:`改良を送信 (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter で送信`,confirmCreateIssue:`この提案から GitHub Issue を作成しますか?`,yesCreateIssue:`はい、作成します`,createGithubIssue:`GitHub Issue を作成`,startOver:`最初からやり直す`,creatingIssueTitle:`GitHub Issue を作成中...`,creatingIssueViaCli:`GitHub CLI で Issue を作成中...`,issueCreated:`Issue を作成しました`,proposeAnother:`別の提案をする`,errorTitle:`問題が発生しました`,errorFallback:`エラーが発生しました`,tryAgain:`再試行`,cancelledTitle:`キャンセルされました`,cancelledBody:`提案はキャンセルされました。`},n={heading:`コンテキスト認識`,custom:`カスタム`,customMix:`カスタム構成 — 下の「微調整」を参照`,estimateUnavailable:`{{tier}} · 見積もり不可`,preset:{minimal:`最小`,light:`ライト`,standard:`標準`,rich:`リッチ`,max:`最大`,desktop:`Desktop`},presetCost:{minimal:`1× コスト · 最速の初回トークン · スペック読み込みなし`,light:`1.3× コスト · Specrails スペックを読み込み`,standard:`1.6× コスト · Specrails + OpenSpec スペックを読み込み`,rich:`2× コスト · リポジトリ全体の読み取りアクセス`,max:`4× コスト · 全読み取り + Contract Layer 改良`,desktop:`4–6× コスト · 全機能 + プロジェクトおよび承認済み MCP`},smashCapable:`SMASH 対応`,smashHint:`Contract Layer が有効なため、このスペックは後で Sub-Spec に分解できます。`,fineTune:`微調整`,defaultLabel:`コンテキストスコープ`,summaryMinimal:`最小`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails チケット`,openspecLabel:`openspec スペック`,fullLabel:`コードベース全体`,mcpLabel:`プロジェクト MCP`,mcpHint:`.mcp.json のサーバー`,userMcpLabel:`承認済みの MCP`,userMcpHint:`~/.claude · ~/.codex のサーバー`,userMcpTooltip:`ローカルで承認済みの MCP サーバー(claude mcp add / codex mcp add)`,exploreOnly:`Explore モードのみ`,contractLabel:`Contract Layer で強化`,contractHint:`コミット後の改良 · SMASH を有効化`}},r={label:`AI エンジン`},i={presetHeading:`モデルプリセット`,preset:{balanced:{label:`バランス`,description:`全エージェントに Sonnet(推奨)`},budget:{label:`節約`,description:`全エージェントに Haiku — 3倍安く、高速`},max:{label:`最大`,description:`アーキテクトと PM に Opus、その他に Sonnet`}},overridesHeading:`エージェント別モデルオーバーライド`,overriddenCount:`{{count}} 件オーバーライド`,customBadge:`カスタム`,resetToDefault:`プリセットのデフォルトに戻す`},a={alias:`Claude Code エイリアス: {{alias}}`,tier:{balanced:`バランス`,mostCapable:`最高性能`,fastest:`最速`}},o={heading:`コスト認識`,meterAriaLabel:`コストティア`,estimateUnavailable:`ティアのみ — 見積もり不可`},s={heading:`推奨コマンド`,run:`実行`,dismiss:`閉じる`},c={serverError:`サーバーエラー ({{status}})`,connectionFailed:`接続に失敗しました: {{message}}`,sendRefinementFailed:`改良の送信に失敗しました`,createIssueFailed:`Issue の作成に失敗しました`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
1
+ var e={title:`スペックを追加`,dialogDescription:`短いアイデアから、即時または Explore モードで新しいスペックを作成します。`,engineAriaLabel:`このスペックの AI エンジン`,modeTablistLabel:`スペック作成モード`,mode:{quick:`クイック`,explore:`Explore`,raw:`Raw`,exploreHint:`対話型`,rawHint:`AIなし`},modeDescription:{quick:`機能や変更内容を記述してください。モックアップ、ブリーフ、データを添付するとコンテキストが充実します。`,explore:`大まかなアイデアを記述してください。Claude が対話を通じて形にするのを手伝います — コミットのタイミングはあなたが決めます。`,raw:`プロンプトをそのままスペックチケットとして保存します。今は AI を実行しません。レールにドラッグするとビルドされます。`},editorPlaceholder:{quick:`例: 設定ページにダークモードの切り替えを追加し、ユーザーの設定を永続化する...`,explore:`例: ダークモード — トグルの配置や永続化の方法はまだ未定…`,raw:`機能、変更、アイデアを記述してください。Markdown、画像、ファイルに対応…`},ideaAriaLabel:`スペックのアイデア`,raw:{titleLabel:`タイトル`,titlePlaceholder:`プロンプトから自動入力…`,priorityLabel:`優先度`,labelsLabel:`ラベル`,removeLabel:`ラベル {{label}} を削除`,addLabelAria:`ラベルを追加`,labelPlaceholder:`任意…`,bodyAriaLabel:`Raw スペック本文`},priority:{critical:`クリティカル`,high:`高`,medium:`中`,low:`低`},fromWebsite:`ウェブサイトから`,fromWebsiteTitle:`実際のウェブページを開き、範囲を選択してスペックに変換`,capture:{responsiveSizes_one:`レスポンシブ · {{count}} サイズ`,responsiveSizes_other:`レスポンシブ · {{count}} サイズ`},submit:{quick:`スペックを生成`,explore:`続行`,raw:`作成`,disabledTitle:`先にプロンプトを入力してください`},toast:{createFailed:`スペックの作成に失敗しました`,rawSavedWithId:`#{{id}} として保存 · Raw スペックはレールで使用可能`,rawCreated:`Raw スペックを作成しました`,exploreNotWired:`このビューでは Explore モードは利用できません`,generating:`生成中...`,failedToStart:`{{projectName}} · 開始に失敗しました`,unsupportedFileType:`未対応のファイル形式: {{name}}`,uploadFailed:`{{name}} のアップロードに失敗しました: {{message}}`}},t={title:`機能を提案`,ideaIntro:`アイデアを平易な言葉で記述してください。Claude がコードベースを読み取り、完全な提案として構造化します。`,ideaAriaLabel:`機能のアイデア`,ideaPlaceholder:`例: API コストがしきい値を超えたときに通知される予算アラートをユーザーが設定できるようにしたい...`,cmdEnterToSubmit:`Cmd+Enter で送信`,exploreIdea:`アイデアを探索`,exploringTitle:`アイデアを探索中...`,refiningTitle:`提案を改良中...`,reviewTitle:`提案をレビュー`,readingCodebase_one:`コードベースを読み取り中...({{count}} ファイル探索済み)`,readingCodebase_other:`コードベースを読み取り中...({{count}} ファイル探索済み)`,refinementAriaLabel:`改良フィードバック`,refinementPlaceholder:`変更を依頼、制約を追加、スコープを調整...`,sendRefinementTitle:`改良を送信 (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter で送信`,confirmCreateIssue:`この提案から GitHub Issue を作成しますか?`,yesCreateIssue:`はい、作成します`,createGithubIssue:`GitHub Issue を作成`,startOver:`最初からやり直す`,creatingIssueTitle:`GitHub Issue を作成中...`,creatingIssueViaCli:`GitHub CLI で Issue を作成中...`,issueCreated:`Issue を作成しました`,proposeAnother:`別の提案をする`,errorTitle:`問題が発生しました`,errorFallback:`エラーが発生しました`,tryAgain:`再試行`,cancelledTitle:`キャンセルされました`,cancelledBody:`提案はキャンセルされました。`},n={heading:`コンテキスト認識`,custom:`カスタム`,customMix:`カスタム構成 — 下の「微調整」を参照`,estimateUnavailable:`{{tier}} · 見積もり不可`,preset:{minimal:`最小`,light:`ライト`,standard:`標準`,rich:`リッチ`,max:`最大`,desktop:`Desktop`},presetCost:{minimal:`1× コスト · 最速の初回トークン · スペック読み込みなし`,light:`1.3× コスト · Specrails スペックを読み込み`,standard:`1.6× コスト · Specrails + OpenSpec スペックを読み込み`,rich:`2× コスト · リポジトリ全体の読み取りアクセス`,max:`4× コスト · 全読み取り + Contract Layer 改良`,desktop:`4–6× コスト · 全機能 + プロジェクトおよび承認済み MCP`},smashCapable:`SMASH 対応`,smashHint:`Contract Layer が有効なため、このスペックは後で Sub-Spec に分解できます。`,fineTune:`微調整`,defaultLabel:`コンテキストスコープ`,summaryMinimal:`最小`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails チケット`,openspecLabel:`openspec スペック`,fullLabel:`コードベース全体`,mcpLabel:`プロジェクト MCP`,mcpHint:`.mcp.json のサーバー`,userMcpLabel:`承認済みの MCP`,userMcpHint:`~/.claude · ~/.codex のサーバー`,userMcpTooltip:`ローカルで承認済みの MCP サーバー(claude mcp add / codex mcp add)`,exploreOnly:`Explore モードのみ`,contractLabel:`Contract Layer で強化`,contractHint:`コミット後の改良 · SMASH を有効化`}},r={label:`AI エンジン`},i={presetHeading:`モデルプリセット`,preset:{balanced:{label:`バランス`,description:`全エージェントに {{model}}(推奨)`},budget:{label:`節約`,description:`全エージェントに {{model}} — 3倍安く、高速`},max:{label:`最大`,description:`アーキテクトと PM に {{topModel}}、その他に {{baseModel}}`}},overridesHeading:`エージェント別モデルオーバーライド`,overriddenCount:`{{count}} 件オーバーライド`,customBadge:`カスタム`,resetToDefault:`プリセットのデフォルトに戻す`},a={alias:`Claude Code エイリアス: {{alias}}`,tier:{balanced:`バランス`,mostCapable:`最高性能`,fastest:`最速`}},o={heading:`コスト認識`,meterAriaLabel:`コストティア`,estimateUnavailable:`ティアのみ — 見積もり不可`},s={heading:`推奨コマンド`,run:`実行`,dismiss:`閉じる`},c={serverError:`サーバーエラー ({{status}})`,connectionFailed:`接続に失敗しました: {{message}}`,sendRefinementFailed:`改良の送信に失敗しました`,createIssueFailed:`Issue の作成に失敗しました`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
@@ -1 +1 @@
1
- var e={title:`添加 Spec`,dialogDescription:`用一句简短想法创建新 spec——可立即生成,也可通过 Explore 模式打磨。`,engineAriaLabel:`此 spec 使用的 AI 引擎`,modeTablistLabel:`Spec 创建模式`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`交互式`,rawHint:`无 AI`},modeDescription:{quick:`描述功能或改动。可附上原型图、简报或数据以提供更多上下文。`,explore:`描述一个粗略的想法。Claude 会通过对话帮你打磨——由你决定何时提交。`,raw:`你的 prompt 原样保存为 spec 工单。现在不运行 AI;拖到 rail 上即可开始构建。`},editorPlaceholder:{quick:`例如:在设置页添加深色模式开关,并持久化用户偏好…`,explore:`例如:深色模式——还不确定开关放在哪里、偏好如何持久化…`,raw:`描述功能、改动或想法。支持 Markdown、图片和文件…`},ideaAriaLabel:`Spec 想法`,raw:{titleLabel:`标题`,titlePlaceholder:`将根据你的 prompt 自动填充…`,priorityLabel:`优先级`,labelsLabel:`标签`,removeLabel:`移除标签 {{label}}`,addLabelAria:`添加标签`,labelPlaceholder:`可选…`,bodyAriaLabel:`Raw spec 正文`},priority:{critical:`紧急`,high:`高`,medium:`中`,low:`低`},fromWebsite:`从网站创建`,fromWebsiteTitle:`打开真实网页,框选一块区域,把它变成 spec`,capture:{responsiveSizes_one:`响应式 · {{count}} 个尺寸`,responsiveSizes_other:`响应式 · {{count}} 个尺寸`},submit:{quick:`生成 Spec`,explore:`继续`,raw:`创建`,disabledTitle:`请先输入 prompt`},toast:{createFailed:`创建 spec 失败`,rawSavedWithId:`已保存为 #{{id}} · Raw spec 可放入 rail`,rawCreated:`Raw spec 已创建`,exploreNotWired:`此视图未接入 Explore 模式`,generating:`正在生成…`,failedToStart:`{{projectName}} · 启动失败`,unsupportedFileType:`不支持的文件类型:{{name}}`,uploadFailed:`{{name}} 上传失败:{{message}}`}},t={title:`提议一个功能`,ideaIntro:`用自然语言描述你的想法。Claude 会阅读代码库并将其整理成完整提案。`,ideaAriaLabel:`功能想法`,ideaPlaceholder:`例如:我希望用户可以设置预算提醒,当 API 成本超过阈值时收到通知…`,cmdEnterToSubmit:`Cmd+Enter 提交`,exploreIdea:`探索想法`,exploringTitle:`正在探索你的想法…`,refiningTitle:`正在完善提案…`,reviewTitle:`审阅提案`,readingCodebase_one:`正在阅读代码库…(已浏览 {{count}} 个文件)`,readingCodebase_other:`正在阅读代码库…(已浏览 {{count}} 个文件)`,refinementAriaLabel:`完善反馈`,refinementPlaceholder:`提出修改、添加约束、调整范围…`,sendRefinementTitle:`发送完善意见(Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter 发送`,confirmCreateIssue:`根据此提案创建 GitHub Issue?`,yesCreateIssue:`是,创建 Issue`,createGithubIssue:`创建 GitHub Issue`,startOver:`重新开始`,creatingIssueTitle:`正在创建 GitHub Issue…`,creatingIssueViaCli:`正在通过 GitHub CLI 创建 Issue…`,issueCreated:`Issue 已创建`,proposeAnother:`再提一个`,errorTitle:`出错了`,errorFallback:`发生错误`,tryAgain:`重试`,cancelledTitle:`已取消`,cancelledBody:`提案已取消。`},n={heading:`上下文感知`,custom:`自定义`,customMix:`自定义组合——见下方“微调”`,estimateUnavailable:`{{tier}} · 无法估算`,preset:{minimal:`极简`,light:`轻量`,standard:`标准`,rich:`丰富`,max:`最大`,desktop:`Desktop`},presetCost:{minimal:`1× 成本 · 首 token 最快 · 不加载 spec`,light:`1.3× 成本 · 加载 Specrails spec`,standard:`1.6× 成本 · 加载 Specrails + OpenSpec spec`,rich:`2× 成本 · 完整仓库读取权限`,max:`4× 成本 · 完整读取 + Contract Layer 增强`,desktop:`4–6× 成本 · 全部功能 + 项目及你已批准的 MCP`},smashCapable:`支持 SMASH`,smashHint:`已启用 Contract Layer,此 spec 之后可以被拆解为子 spec。`,fineTune:`微调`,defaultLabel:`上下文范围`,summaryMinimal:`极简`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails 工单`,openspecLabel:`openspec spec`,fullLabel:`完整代码库`,mcpLabel:`项目 MCP`,mcpHint:`.mcp.json 服务器`,userMcpLabel:`我已批准的 MCP`,userMcpHint:`~/.claude · ~/.codex 服务器`,userMcpTooltip:`你在本地批准的 MCP 服务器(claude mcp add / codex mcp add)`,exploreOnly:`仅限 Explore 模式`,contractLabel:`用 Contract Layer 增强`,contractHint:`提交后增强 · 启用 SMASH`}},r={label:`AI 引擎`},i={presetHeading:`模型预设`,preset:{balanced:{label:`均衡`,description:`所有 Agent 使用 Sonnet(推荐)`},budget:{label:`经济`,description:`所有 Agent 使用 Haiku——便宜 3 倍、更快`},max:{label:`最强`,description:`架构师 + PM 使用 Opus,其余使用 Sonnet`}},overridesHeading:`按 Agent 覆写模型`,overriddenCount:`已覆写 {{count}} 个`,customBadge:`自定义`,resetToDefault:`重置为预设默认值`},a={alias:`Claude Code 别名:{{alias}}`,tier:{balanced:`均衡`,mostCapable:`能力最强`,fastest:`最快`}},o={heading:`成本感知`,meterAriaLabel:`成本级别`,estimateUnavailable:`仅显示级别——无法估算`},s={heading:`建议的命令`,run:`运行`,dismiss:`忽略`},c={serverError:`服务器错误({{status}})`,connectionFailed:`连接失败:{{message}}`,sendRefinementFailed:`发送完善意见失败`,createIssueFailed:`创建 Issue 失败`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
1
+ var e={title:`添加 Spec`,dialogDescription:`用一句简短想法创建新 spec——可立即生成,也可通过 Explore 模式打磨。`,engineAriaLabel:`此 spec 使用的 AI 引擎`,modeTablistLabel:`Spec 创建模式`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`交互式`,rawHint:`无 AI`},modeDescription:{quick:`描述功能或改动。可附上原型图、简报或数据以提供更多上下文。`,explore:`描述一个粗略的想法。Claude 会通过对话帮你打磨——由你决定何时提交。`,raw:`你的 prompt 原样保存为 spec 工单。现在不运行 AI;拖到 rail 上即可开始构建。`},editorPlaceholder:{quick:`例如:在设置页添加深色模式开关,并持久化用户偏好…`,explore:`例如:深色模式——还不确定开关放在哪里、偏好如何持久化…`,raw:`描述功能、改动或想法。支持 Markdown、图片和文件…`},ideaAriaLabel:`Spec 想法`,raw:{titleLabel:`标题`,titlePlaceholder:`将根据你的 prompt 自动填充…`,priorityLabel:`优先级`,labelsLabel:`标签`,removeLabel:`移除标签 {{label}}`,addLabelAria:`添加标签`,labelPlaceholder:`可选…`,bodyAriaLabel:`Raw spec 正文`},priority:{critical:`紧急`,high:`高`,medium:`中`,low:`低`},fromWebsite:`从网站创建`,fromWebsiteTitle:`打开真实网页,框选一块区域,把它变成 spec`,capture:{responsiveSizes_one:`响应式 · {{count}} 个尺寸`,responsiveSizes_other:`响应式 · {{count}} 个尺寸`},submit:{quick:`生成 Spec`,explore:`继续`,raw:`创建`,disabledTitle:`请先输入 prompt`},toast:{createFailed:`创建 spec 失败`,rawSavedWithId:`已保存为 #{{id}} · Raw spec 可放入 rail`,rawCreated:`Raw spec 已创建`,exploreNotWired:`此视图未接入 Explore 模式`,generating:`正在生成…`,failedToStart:`{{projectName}} · 启动失败`,unsupportedFileType:`不支持的文件类型:{{name}}`,uploadFailed:`{{name}} 上传失败:{{message}}`}},t={title:`提议一个功能`,ideaIntro:`用自然语言描述你的想法。Claude 会阅读代码库并将其整理成完整提案。`,ideaAriaLabel:`功能想法`,ideaPlaceholder:`例如:我希望用户可以设置预算提醒,当 API 成本超过阈值时收到通知…`,cmdEnterToSubmit:`Cmd+Enter 提交`,exploreIdea:`探索想法`,exploringTitle:`正在探索你的想法…`,refiningTitle:`正在完善提案…`,reviewTitle:`审阅提案`,readingCodebase_one:`正在阅读代码库…(已浏览 {{count}} 个文件)`,readingCodebase_other:`正在阅读代码库…(已浏览 {{count}} 个文件)`,refinementAriaLabel:`完善反馈`,refinementPlaceholder:`提出修改、添加约束、调整范围…`,sendRefinementTitle:`发送完善意见(Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter 发送`,confirmCreateIssue:`根据此提案创建 GitHub Issue?`,yesCreateIssue:`是,创建 Issue`,createGithubIssue:`创建 GitHub Issue`,startOver:`重新开始`,creatingIssueTitle:`正在创建 GitHub Issue…`,creatingIssueViaCli:`正在通过 GitHub CLI 创建 Issue…`,issueCreated:`Issue 已创建`,proposeAnother:`再提一个`,errorTitle:`出错了`,errorFallback:`发生错误`,tryAgain:`重试`,cancelledTitle:`已取消`,cancelledBody:`提案已取消。`},n={heading:`上下文感知`,custom:`自定义`,customMix:`自定义组合——见下方“微调”`,estimateUnavailable:`{{tier}} · 无法估算`,preset:{minimal:`极简`,light:`轻量`,standard:`标准`,rich:`丰富`,max:`最大`,desktop:`Desktop`},presetCost:{minimal:`1× 成本 · 首 token 最快 · 不加载 spec`,light:`1.3× 成本 · 加载 Specrails spec`,standard:`1.6× 成本 · 加载 Specrails + OpenSpec spec`,rich:`2× 成本 · 完整仓库读取权限`,max:`4× 成本 · 完整读取 + Contract Layer 增强`,desktop:`4–6× 成本 · 全部功能 + 项目及你已批准的 MCP`},smashCapable:`支持 SMASH`,smashHint:`已启用 Contract Layer,此 spec 之后可以被拆解为子 spec。`,fineTune:`微调`,defaultLabel:`上下文范围`,summaryMinimal:`极简`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails 工单`,openspecLabel:`openspec spec`,fullLabel:`完整代码库`,mcpLabel:`项目 MCP`,mcpHint:`.mcp.json 服务器`,userMcpLabel:`我已批准的 MCP`,userMcpHint:`~/.claude · ~/.codex 服务器`,userMcpTooltip:`你在本地批准的 MCP 服务器(claude mcp add / codex mcp add)`,exploreOnly:`仅限 Explore 模式`,contractLabel:`用 Contract Layer 增强`,contractHint:`提交后增强 · 启用 SMASH`}},r={label:`AI 引擎`},i={presetHeading:`模型预设`,preset:{balanced:{label:`均衡`,description:`所有 Agent 使用 {{model}}(推荐)`},budget:{label:`经济`,description:`所有 Agent 使用 {{model}}——便宜 3 倍、更快`},max:{label:`最强`,description:`架构师 + PM 使用 {{topModel}},其余使用 {{baseModel}}`}},overridesHeading:`按 Agent 覆写模型`,overriddenCount:`已覆写 {{count}} 个`,customBadge:`自定义`,resetToDefault:`重置为预设默认值`},a={alias:`Claude Code 别名:{{alias}}`,tier:{balanced:`均衡`,mostCapable:`能力最强`,fastest:`最快`}},o={heading:`成本感知`,meterAriaLabel:`成本级别`,estimateUnavailable:`仅显示级别——无法估算`},s={heading:`建议的命令`,run:`运行`,dismiss:`忽略`},c={serverError:`服务器错误({{status}})`,connectionFailed:`连接失败:{{message}}`,sendRefinementFailed:`发送完善意见失败`,createIssueFailed:`创建 Issue 失败`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
@@ -1 +1 @@
1
- var e={title:`Spec hinzufügen`,dialogDescription:`Erstelle eine neue Spec aus einer kurzen Idee – sofort oder im Explore-Modus.`,engineAriaLabel:`KI-Engine für diese Spec`,modeTablistLabel:`Modus der Spec-Erstellung`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interaktiv`,rawHint:`ohne KI`},modeDescription:{quick:`Beschreibe das Feature oder die Änderung. Hänge Mockups, Briefings oder Daten für mehr Kontext an.`,explore:`Beschreibe eine grobe Idee. Claude hilft dir, sie im Gespräch zu formen – du entscheidest, wann committet wird.`,raw:`Dein Prompt, unverändert – als Spec-Ticket gespeichert. Es läuft jetzt keine KI; zieh es auf eine Rail, um es zu bauen.`},editorPlaceholder:{quick:`z. B. Einen Dark-Mode-Toggle auf der Einstellungsseite ergänzen, der die Nutzerpräferenz speichert…`,explore:`z. B. Dark Mode – unklar, wo der Toggle hingehört oder wie die Einstellung gespeichert wird…`,raw:`Beschreibe das Feature, die Änderung oder die Idee. Markdown, Bilder und Dateien werden unterstützt…`},ideaAriaLabel:`Spec-Idee`,raw:{titleLabel:`Titel`,titlePlaceholder:`Wird automatisch aus deinem Prompt befüllt…`,priorityLabel:`Priorität`,labelsLabel:`Labels`,removeLabel:`Label {{label}} entfernen`,addLabelAria:`Label hinzufügen`,labelPlaceholder:`optional…`,bodyAriaLabel:`Raw-Spec-Inhalt`},priority:{critical:`Kritisch`,high:`Hoch`,medium:`Mittel`,low:`Niedrig`},fromWebsite:`Von einer Website`,fromWebsiteTitle:`Öffne eine echte Webseite, wähle einen Bereich aus und mach daraus eine Spec`,capture:{responsiveSizes_one:`Responsive · {{count}} Größe`,responsiveSizes_other:`Responsive · {{count}} Größen`},submit:{quick:`Spec generieren`,explore:`Weiter`,raw:`Erstellen`,disabledTitle:`Schreib zuerst einen Prompt`},toast:{createFailed:`Spec konnte nicht erstellt werden`,rawSavedWithId:`Gespeichert als #{{id}} · Raw-Spec bereit für Rails`,rawCreated:`Raw-Spec erstellt`,exploreNotWired:`Der Explore-Modus ist in dieser Ansicht nicht angebunden`,generating:`Wird generiert…`,failedToStart:`{{projectName}} · Start fehlgeschlagen`,unsupportedFileType:`Nicht unterstützter Dateityp: {{name}}`,uploadFailed:`Upload fehlgeschlagen für {{name}}: {{message}}`}},t={title:`Feature vorschlagen`,ideaIntro:`Beschreibe deine Idee in einfachen Worten. Claude liest die Codebasis und strukturiert sie zu einem vollständigen Vorschlag.`,ideaAriaLabel:`Feature-Idee`,ideaPlaceholder:`z. B. Nutzer sollen einen Budget-Alarm einrichten können, um benachrichtigt zu werden, wenn die API-Kosten einen Schwellwert überschreiten…`,cmdEnterToSubmit:`Cmd+Enter zum Absenden`,exploreIdea:`Idee erkunden`,exploringTitle:`Deine Idee wird erkundet…`,refiningTitle:`Vorschlag wird verfeinert…`,reviewTitle:`Vorschlag prüfen`,readingCodebase_one:`Codebasis wird gelesen… ({{count}} Datei untersucht)`,readingCodebase_other:`Codebasis wird gelesen… ({{count}} Dateien untersucht)`,refinementAriaLabel:`Verfeinerungs-Feedback`,refinementPlaceholder:`Änderungen anfordern, Einschränkungen ergänzen, Umfang schärfen…`,sendRefinementTitle:`Verfeinerung senden (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter zum Senden`,confirmCreateIssue:`Aus diesem Vorschlag ein GitHub-Issue erstellen?`,yesCreateIssue:`Ja, Issue erstellen`,createGithubIssue:`GitHub-Issue erstellen`,startOver:`Neu beginnen`,creatingIssueTitle:`GitHub-Issue wird erstellt…`,creatingIssueViaCli:`Issue wird über die GitHub CLI erstellt…`,issueCreated:`Issue erstellt`,proposeAnother:`Weiteren Vorschlag erstellen`,errorTitle:`Etwas ist schiefgelaufen`,errorFallback:`Ein Fehler ist aufgetreten`,tryAgain:`Erneut versuchen`,cancelledTitle:`Abgebrochen`,cancelledBody:`Der Vorschlag wurde abgebrochen.`},n={heading:`Kontextbewusstsein`,custom:`Benutzerdefiniert`,customMix:`Eigene Mischung – siehe Feinabstimmung unten`,estimateUnavailable:`{{tier}} · keine Schätzung verfügbar`,preset:{minimal:`Minimal`,light:`Leicht`,standard:`Standard`,rich:`Umfangreich`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`1× Kosten · schnellstes erstes Token · keine Specs geladen`,light:`1,3× Kosten · Specrails-Specs geladen`,standard:`1,6× Kosten · Specrails- + OpenSpec-Specs geladen`,rich:`2× Kosten · voller Lesezugriff aufs Repo`,max:`4× Kosten · voller Lesezugriff + Contract-Layer-Verfeinerung`,desktop:`4–6× Kosten · alle Features + Projekt-MCPs & deine freigegebenen MCPs`},smashCapable:`SMASH-fähig`,smashHint:`Contract Layer ist aktiv, daher kann diese Spec später in Sub-Specs zerlegt werden.`,fineTune:`Feinabstimmung`,defaultLabel:`Kontextumfang`,summaryMinimal:`minimal`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails-Tickets`,openspecLabel:`openspec-Specs`,fullLabel:`Gesamte Codebasis`,mcpLabel:`Projekt-MCPs`,mcpHint:`.mcp.json-Server`,userMcpLabel:`Meine freigegebenen MCPs`,userMcpHint:`~/.claude · ~/.codex Server`,userMcpTooltip:`Deine lokal freigegebenen MCP-Server (claude mcp add / codex mcp add)`,exploreOnly:`Nur im Explore-Modus`,contractLabel:`Mit Contract Layer anreichern`,contractHint:`Verfeinerung nach dem Commit · aktiviert SMASH`}},r={label:`KI-Engine`},i={presetHeading:`Modell-Preset`,preset:{balanced:{label:`Ausgewogen`,description:`Sonnet für alle Agents (empfohlen)`},budget:{label:`Budget`,description:`Haiku für alle Agents – 3× günstiger, schneller`},max:{label:`Max`,description:`Opus für Architect + PM, Sonnet für den Rest`}},overridesHeading:`Modell-Overrides pro Agent`,overriddenCount:`{{count}} überschrieben`,customBadge:`angepasst`,resetToDefault:`Auf Preset-Standard zurücksetzen`},a={alias:`Claude Code-Alias: {{alias}}`,tier:{balanced:`Ausgewogen`,mostCapable:`Leistungsstärkstes`,fastest:`Schnellstes`}},o={heading:`Kostenbewusstsein`,meterAriaLabel:`Kostenstufe`,estimateUnavailable:`nur Stufe – keine Schätzung verfügbar`},s={heading:`Vorgeschlagener Befehl`,run:`Ausführen`,dismiss:`Verwerfen`},c={serverError:`Serverfehler ({{status}})`,connectionFailed:`Verbindung fehlgeschlagen: {{message}}`,sendRefinementFailed:`Verfeinerung konnte nicht gesendet werden`,createIssueFailed:`Issue konnte nicht erstellt werden`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
1
+ var e={title:`Spec hinzufügen`,dialogDescription:`Erstelle eine neue Spec aus einer kurzen Idee – sofort oder im Explore-Modus.`,engineAriaLabel:`KI-Engine für diese Spec`,modeTablistLabel:`Modus der Spec-Erstellung`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interaktiv`,rawHint:`ohne KI`},modeDescription:{quick:`Beschreibe das Feature oder die Änderung. Hänge Mockups, Briefings oder Daten für mehr Kontext an.`,explore:`Beschreibe eine grobe Idee. Claude hilft dir, sie im Gespräch zu formen – du entscheidest, wann committet wird.`,raw:`Dein Prompt, unverändert – als Spec-Ticket gespeichert. Es läuft jetzt keine KI; zieh es auf eine Rail, um es zu bauen.`},editorPlaceholder:{quick:`z. B. Einen Dark-Mode-Toggle auf der Einstellungsseite ergänzen, der die Nutzerpräferenz speichert…`,explore:`z. B. Dark Mode – unklar, wo der Toggle hingehört oder wie die Einstellung gespeichert wird…`,raw:`Beschreibe das Feature, die Änderung oder die Idee. Markdown, Bilder und Dateien werden unterstützt…`},ideaAriaLabel:`Spec-Idee`,raw:{titleLabel:`Titel`,titlePlaceholder:`Wird automatisch aus deinem Prompt befüllt…`,priorityLabel:`Priorität`,labelsLabel:`Labels`,removeLabel:`Label {{label}} entfernen`,addLabelAria:`Label hinzufügen`,labelPlaceholder:`optional…`,bodyAriaLabel:`Raw-Spec-Inhalt`},priority:{critical:`Kritisch`,high:`Hoch`,medium:`Mittel`,low:`Niedrig`},fromWebsite:`Von einer Website`,fromWebsiteTitle:`Öffne eine echte Webseite, wähle einen Bereich aus und mach daraus eine Spec`,capture:{responsiveSizes_one:`Responsive · {{count}} Größe`,responsiveSizes_other:`Responsive · {{count}} Größen`},submit:{quick:`Spec generieren`,explore:`Weiter`,raw:`Erstellen`,disabledTitle:`Schreib zuerst einen Prompt`},toast:{createFailed:`Spec konnte nicht erstellt werden`,rawSavedWithId:`Gespeichert als #{{id}} · Raw-Spec bereit für Rails`,rawCreated:`Raw-Spec erstellt`,exploreNotWired:`Der Explore-Modus ist in dieser Ansicht nicht angebunden`,generating:`Wird generiert…`,failedToStart:`{{projectName}} · Start fehlgeschlagen`,unsupportedFileType:`Nicht unterstützter Dateityp: {{name}}`,uploadFailed:`Upload fehlgeschlagen für {{name}}: {{message}}`}},t={title:`Feature vorschlagen`,ideaIntro:`Beschreibe deine Idee in einfachen Worten. Claude liest die Codebasis und strukturiert sie zu einem vollständigen Vorschlag.`,ideaAriaLabel:`Feature-Idee`,ideaPlaceholder:`z. B. Nutzer sollen einen Budget-Alarm einrichten können, um benachrichtigt zu werden, wenn die API-Kosten einen Schwellwert überschreiten…`,cmdEnterToSubmit:`Cmd+Enter zum Absenden`,exploreIdea:`Idee erkunden`,exploringTitle:`Deine Idee wird erkundet…`,refiningTitle:`Vorschlag wird verfeinert…`,reviewTitle:`Vorschlag prüfen`,readingCodebase_one:`Codebasis wird gelesen… ({{count}} Datei untersucht)`,readingCodebase_other:`Codebasis wird gelesen… ({{count}} Dateien untersucht)`,refinementAriaLabel:`Verfeinerungs-Feedback`,refinementPlaceholder:`Änderungen anfordern, Einschränkungen ergänzen, Umfang schärfen…`,sendRefinementTitle:`Verfeinerung senden (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter zum Senden`,confirmCreateIssue:`Aus diesem Vorschlag ein GitHub-Issue erstellen?`,yesCreateIssue:`Ja, Issue erstellen`,createGithubIssue:`GitHub-Issue erstellen`,startOver:`Neu beginnen`,creatingIssueTitle:`GitHub-Issue wird erstellt…`,creatingIssueViaCli:`Issue wird über die GitHub CLI erstellt…`,issueCreated:`Issue erstellt`,proposeAnother:`Weiteren Vorschlag erstellen`,errorTitle:`Etwas ist schiefgelaufen`,errorFallback:`Ein Fehler ist aufgetreten`,tryAgain:`Erneut versuchen`,cancelledTitle:`Abgebrochen`,cancelledBody:`Der Vorschlag wurde abgebrochen.`},n={heading:`Kontextbewusstsein`,custom:`Benutzerdefiniert`,customMix:`Eigene Mischung – siehe Feinabstimmung unten`,estimateUnavailable:`{{tier}} · keine Schätzung verfügbar`,preset:{minimal:`Minimal`,light:`Leicht`,standard:`Standard`,rich:`Umfangreich`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`1× Kosten · schnellstes erstes Token · keine Specs geladen`,light:`1,3× Kosten · Specrails-Specs geladen`,standard:`1,6× Kosten · Specrails- + OpenSpec-Specs geladen`,rich:`2× Kosten · voller Lesezugriff aufs Repo`,max:`4× Kosten · voller Lesezugriff + Contract-Layer-Verfeinerung`,desktop:`4–6× Kosten · alle Features + Projekt-MCPs & deine freigegebenen MCPs`},smashCapable:`SMASH-fähig`,smashHint:`Contract Layer ist aktiv, daher kann diese Spec später in Sub-Specs zerlegt werden.`,fineTune:`Feinabstimmung`,defaultLabel:`Kontextumfang`,summaryMinimal:`minimal`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails-Tickets`,openspecLabel:`openspec-Specs`,fullLabel:`Gesamte Codebasis`,mcpLabel:`Projekt-MCPs`,mcpHint:`.mcp.json-Server`,userMcpLabel:`Meine freigegebenen MCPs`,userMcpHint:`~/.claude · ~/.codex Server`,userMcpTooltip:`Deine lokal freigegebenen MCP-Server (claude mcp add / codex mcp add)`,exploreOnly:`Nur im Explore-Modus`,contractLabel:`Mit Contract Layer anreichern`,contractHint:`Verfeinerung nach dem Commit · aktiviert SMASH`}},r={label:`KI-Engine`},i={presetHeading:`Modell-Preset`,preset:{balanced:{label:`Ausgewogen`,description:`{{model}} für alle Agents (empfohlen)`},budget:{label:`Budget`,description:`{{model}} für alle Agents – 3× günstiger, schneller`},max:{label:`Max`,description:`{{topModel}} für Architect + PM, {{baseModel}} für den Rest`}},overridesHeading:`Modell-Overrides pro Agent`,overriddenCount:`{{count}} überschrieben`,customBadge:`angepasst`,resetToDefault:`Auf Preset-Standard zurücksetzen`},a={alias:`Claude Code-Alias: {{alias}}`,tier:{balanced:`Ausgewogen`,mostCapable:`Leistungsstärkstes`,fastest:`Schnellstes`}},o={heading:`Kostenbewusstsein`,meterAriaLabel:`Kostenstufe`,estimateUnavailable:`nur Stufe – keine Schätzung verfügbar`},s={heading:`Vorgeschlagener Befehl`,run:`Ausführen`,dismiss:`Verwerfen`},c={serverError:`Serverfehler ({{status}})`,connectionFailed:`Verbindung fehlgeschlagen: {{message}}`,sendRefinementFailed:`Verfeinerung konnte nicht gesendet werden`,createIssueFailed:`Issue konnte nicht erstellt werden`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-CilyBKbf.js";var t=e({aiEngine:()=>a,commandProposal:()=>l,contextScope:()=>i,costMeter:()=>c,default:()=>d,errors:()=>u,featureProposal:()=>r,modelCombobox:()=>s,modelSelector:()=>o,proposeModal:()=>n}),n={title:`Add Spec`,dialogDescription:`Create a new spec from a short idea, either immediately or through Explore mode.`,engineAriaLabel:`AI engine for this spec`,modeTablistLabel:`Spec creation mode`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interactive`,rawHint:`no AI`},modeDescription:{quick:`Describe the feature or change. Attach mockups, briefs, or data for more context.`,explore:`Describe a rough idea. Claude will help you shape it through conversation — you decide when to commit.`,raw:`Your prompt, as-is — saved as a spec ticket. No AI runs now; drag it to a rail to build it.`},editorPlaceholder:{quick:`e.g. Add a dark mode toggle to the settings page that persists the user's preference...`,explore:`e.g. dark mode — not sure where the toggle should live or how to persist it…`,raw:`Describe the feature, change, or idea. Markdown, images, and files supported…`},ideaAriaLabel:`Spec idea`,raw:{titleLabel:`Title`,titlePlaceholder:`Auto-filled from your prompt…`,priorityLabel:`Priority`,labelsLabel:`Labels`,removeLabel:`Remove label {{label}}`,addLabelAria:`Add label`,labelPlaceholder:`optional…`,bodyAriaLabel:`Raw spec body`},priority:{critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`},fromWebsite:`From a website`,fromWebsiteTitle:`Open a real web page, select an area, and turn it into a spec`,capture:{responsiveSizes_one:`Responsive · {{count}} size`,responsiveSizes_other:`Responsive · {{count}} sizes`},submit:{quick:`Generate Spec`,explore:`Continue`,raw:`Create`,disabledTitle:`Write a prompt first`},toast:{createFailed:`Failed to create spec`,rawSavedWithId:`Saved as #{{id}} · Raw spec ready for rails`,rawCreated:`Raw spec created`,exploreNotWired:`Explore mode is not wired in this view`,generating:`Generating...`,failedToStart:`{{projectName}} · Failed to start`,unsupportedFileType:`Unsupported file type: {{name}}`,uploadFailed:`Upload failed for {{name}}: {{message}}`}},r={title:`Propose a Feature`,ideaIntro:`Describe your idea in plain language. Claude will read the codebase and structure it into a full proposal.`,ideaAriaLabel:`Feature idea`,ideaPlaceholder:`e.g. I want users to be able to set a budget alert so they get notified when API costs exceed a threshold...`,cmdEnterToSubmit:`Cmd+Enter to submit`,exploreIdea:`Explore Idea`,exploringTitle:`Exploring your idea...`,refiningTitle:`Refining proposal...`,reviewTitle:`Review Proposal`,readingCodebase_one:`Reading codebase... ({{count}} file explored)`,readingCodebase_other:`Reading codebase... ({{count}} files explored)`,refinementAriaLabel:`Refinement feedback`,refinementPlaceholder:`Ask for changes, add constraints, refine scope...`,sendRefinementTitle:`Send refinement (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter to send`,confirmCreateIssue:`Create a GitHub Issue from this proposal?`,yesCreateIssue:`Yes, create issue`,createGithubIssue:`Create GitHub Issue`,startOver:`Start Over`,creatingIssueTitle:`Creating GitHub Issue...`,creatingIssueViaCli:`Creating issue via GitHub CLI...`,issueCreated:`Issue Created`,proposeAnother:`Propose Another`,errorTitle:`Something went wrong`,errorFallback:`An error occurred`,tryAgain:`Try Again`,cancelledTitle:`Cancelled`,cancelledBody:`The proposal was cancelled.`},i={heading:`Context Awareness`,custom:`Custom`,customMix:`Custom mix — see Fine-tune below`,estimateUnavailable:`{{tier}} · estimate unavailable`,preset:{minimal:`Minimal`,light:`Light`,standard:`Standard`,rich:`Rich`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`1× cost · fastest first-token · no specs loaded`,light:`1.3× cost · Specrails specs loaded`,standard:`1.6× cost · Specrails + OpenSpec specs loaded`,rich:`2× cost · full repo read access`,max:`4× cost · full read + Contract Layer refinement`,desktop:`4–6× cost · all features + project & your approved MCPs`},smashCapable:`SMASH-capable`,smashHint:`Contract Layer is on, so this spec can later be decomposed into Sub-Specs.`,fineTune:`Fine-tune`,defaultLabel:`Context scope`,summaryMinimal:`minimal`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails tickets`,openspecLabel:`openspec specs`,fullLabel:`Full codebase`,mcpLabel:`Project MCPs`,mcpHint:`.mcp.json servers`,userMcpLabel:`My approved MCPs`,userMcpHint:`~/.claude · ~/.codex servers`,userMcpTooltip:`Your locally-approved MCP servers (claude mcp add / codex mcp add)`,exploreOnly:`Explore mode only`,contractLabel:`Enrich with Contract Layer`,contractHint:`post-commit refinement · enables SMASH`}},a={label:`AI engine`},o={presetHeading:`Model preset`,preset:{balanced:{label:`Balanced`,description:`Sonnet for all agents (recommended)`},budget:{label:`Budget`,description:`Haiku for all agents — 3x cheaper, faster`},max:{label:`Max`,description:`Opus for architect + PM, Sonnet for rest`}},overridesHeading:`Per-agent model overrides`,overriddenCount:`{{count}} overridden`,customBadge:`custom`,resetToDefault:`Reset to preset default`},s={alias:`Claude Code alias: {{alias}}`,tier:{balanced:`Balanced`,mostCapable:`Most capable`,fastest:`Fastest`}},c={heading:`Cost awareness`,meterAriaLabel:`cost tier`,estimateUnavailable:`tier-only — estimate unavailable`},l={heading:`Suggested command`,run:`Run`,dismiss:`Dismiss`},u={serverError:`Server error ({{status}})`,connectionFailed:`Connection failed: {{message}}`,sendRefinementFailed:`Failed to send refinement`,createIssueFailed:`Failed to create issue`},d={proposeModal:n,featureProposal:r,contextScope:i,aiEngine:a,modelSelector:o,modelCombobox:s,costMeter:c,commandProposal:l,errors:u};export{t};
1
+ import{n as e}from"./chunk-CilyBKbf.js";var t=e({aiEngine:()=>a,commandProposal:()=>l,contextScope:()=>i,costMeter:()=>c,default:()=>d,errors:()=>u,featureProposal:()=>r,modelCombobox:()=>s,modelSelector:()=>o,proposeModal:()=>n}),n={title:`Add Spec`,dialogDescription:`Create a new spec from a short idea, either immediately or through Explore mode.`,engineAriaLabel:`AI engine for this spec`,modeTablistLabel:`Spec creation mode`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interactive`,rawHint:`no AI`},modeDescription:{quick:`Describe the feature or change. Attach mockups, briefs, or data for more context.`,explore:`Describe a rough idea. Claude will help you shape it through conversation — you decide when to commit.`,raw:`Your prompt, as-is — saved as a spec ticket. No AI runs now; drag it to a rail to build it.`},editorPlaceholder:{quick:`e.g. Add a dark mode toggle to the settings page that persists the user's preference...`,explore:`e.g. dark mode — not sure where the toggle should live or how to persist it…`,raw:`Describe the feature, change, or idea. Markdown, images, and files supported…`},ideaAriaLabel:`Spec idea`,raw:{titleLabel:`Title`,titlePlaceholder:`Auto-filled from your prompt…`,priorityLabel:`Priority`,labelsLabel:`Labels`,removeLabel:`Remove label {{label}}`,addLabelAria:`Add label`,labelPlaceholder:`optional…`,bodyAriaLabel:`Raw spec body`},priority:{critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`},fromWebsite:`From a website`,fromWebsiteTitle:`Open a real web page, select an area, and turn it into a spec`,capture:{responsiveSizes_one:`Responsive · {{count}} size`,responsiveSizes_other:`Responsive · {{count}} sizes`},submit:{quick:`Generate Spec`,explore:`Continue`,raw:`Create`,disabledTitle:`Write a prompt first`},toast:{createFailed:`Failed to create spec`,rawSavedWithId:`Saved as #{{id}} · Raw spec ready for rails`,rawCreated:`Raw spec created`,exploreNotWired:`Explore mode is not wired in this view`,generating:`Generating...`,failedToStart:`{{projectName}} · Failed to start`,unsupportedFileType:`Unsupported file type: {{name}}`,uploadFailed:`Upload failed for {{name}}: {{message}}`}},r={title:`Propose a Feature`,ideaIntro:`Describe your idea in plain language. Claude will read the codebase and structure it into a full proposal.`,ideaAriaLabel:`Feature idea`,ideaPlaceholder:`e.g. I want users to be able to set a budget alert so they get notified when API costs exceed a threshold...`,cmdEnterToSubmit:`Cmd+Enter to submit`,exploreIdea:`Explore Idea`,exploringTitle:`Exploring your idea...`,refiningTitle:`Refining proposal...`,reviewTitle:`Review Proposal`,readingCodebase_one:`Reading codebase... ({{count}} file explored)`,readingCodebase_other:`Reading codebase... ({{count}} files explored)`,refinementAriaLabel:`Refinement feedback`,refinementPlaceholder:`Ask for changes, add constraints, refine scope...`,sendRefinementTitle:`Send refinement (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter to send`,confirmCreateIssue:`Create a GitHub Issue from this proposal?`,yesCreateIssue:`Yes, create issue`,createGithubIssue:`Create GitHub Issue`,startOver:`Start Over`,creatingIssueTitle:`Creating GitHub Issue...`,creatingIssueViaCli:`Creating issue via GitHub CLI...`,issueCreated:`Issue Created`,proposeAnother:`Propose Another`,errorTitle:`Something went wrong`,errorFallback:`An error occurred`,tryAgain:`Try Again`,cancelledTitle:`Cancelled`,cancelledBody:`The proposal was cancelled.`},i={heading:`Context Awareness`,custom:`Custom`,customMix:`Custom mix — see Fine-tune below`,estimateUnavailable:`{{tier}} · estimate unavailable`,preset:{minimal:`Minimal`,light:`Light`,standard:`Standard`,rich:`Rich`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`1× cost · fastest first-token · no specs loaded`,light:`1.3× cost · Specrails specs loaded`,standard:`1.6× cost · Specrails + OpenSpec specs loaded`,rich:`2× cost · full repo read access`,max:`4× cost · full read + Contract Layer refinement`,desktop:`4–6× cost · all features + project & your approved MCPs`},smashCapable:`SMASH-capable`,smashHint:`Contract Layer is on, so this spec can later be decomposed into Sub-Specs.`,fineTune:`Fine-tune`,defaultLabel:`Context scope`,summaryMinimal:`minimal`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`specrails tickets`,openspecLabel:`openspec specs`,fullLabel:`Full codebase`,mcpLabel:`Project MCPs`,mcpHint:`.mcp.json servers`,userMcpLabel:`My approved MCPs`,userMcpHint:`~/.claude · ~/.codex servers`,userMcpTooltip:`Your locally-approved MCP servers (claude mcp add / codex mcp add)`,exploreOnly:`Explore mode only`,contractLabel:`Enrich with Contract Layer`,contractHint:`post-commit refinement · enables SMASH`}},a={label:`AI engine`},o={presetHeading:`Model preset`,preset:{balanced:{label:`Balanced`,description:`{{model}} for all agents (recommended)`},budget:{label:`Budget`,description:`{{model}} for all agents — 3x cheaper, faster`},max:{label:`Max`,description:`{{topModel}} for architect + PM, {{baseModel}} for rest`}},overridesHeading:`Per-agent model overrides`,overriddenCount:`{{count}} overridden`,customBadge:`custom`,resetToDefault:`Reset to preset default`},s={alias:`Claude Code alias: {{alias}}`,tier:{balanced:`Balanced`,mostCapable:`Most capable`,fastest:`Fastest`}},c={heading:`Cost awareness`,meterAriaLabel:`cost tier`,estimateUnavailable:`tier-only — estimate unavailable`},l={heading:`Suggested command`,run:`Run`,dismiss:`Dismiss`},u={serverError:`Server error ({{status}})`,connectionFailed:`Connection failed: {{message}}`,sendRefinementFailed:`Failed to send refinement`,createIssueFailed:`Failed to create issue`},d={proposeModal:n,featureProposal:r,contextScope:i,aiEngine:a,modelSelector:o,modelCombobox:s,costMeter:c,commandProposal:l,errors:u};export{t};
@@ -1 +1 @@
1
- var e={title:`Ajouter une spec`,dialogDescription:`Créez une nouvelle spec à partir d'une idée courte, immédiatement ou via le mode Explore.`,engineAriaLabel:`Moteur IA pour cette spec`,modeTablistLabel:`Mode de création de la spec`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interactif`,rawHint:`sans IA`},modeDescription:{quick:`Décrivez la fonctionnalité ou le changement. Joignez des maquettes, des briefs ou des données pour plus de contexte.`,explore:`Décrivez une idée approximative. Claude vous aidera à la façonner par la conversation — vous décidez quand la valider.`,raw:`Votre prompt, tel quel — enregistré comme ticket de spec. Aucune IA n'est lancée maintenant ; glissez-le sur un rail pour le construire.`},editorPlaceholder:{quick:`ex. Ajouter un toggle de mode sombre à la page des réglages, qui persiste la préférence de l'utilisateur…`,explore:`ex. mode sombre — pas sûr d'où placer le toggle ni comment persister le choix…`,raw:`Décrivez la fonctionnalité, le changement ou l'idée. Markdown, images et fichiers pris en charge…`},ideaAriaLabel:`Idée de spec`,raw:{titleLabel:`Titre`,titlePlaceholder:`Rempli automatiquement depuis votre prompt…`,priorityLabel:`Priorité`,labelsLabel:`Labels`,removeLabel:`Supprimer le label {{label}}`,addLabelAria:`Ajouter un label`,labelPlaceholder:`optionnel…`,bodyAriaLabel:`Corps de la spec Raw`},priority:{critical:`Critique`,high:`Haute`,medium:`Moyenne`,low:`Basse`},fromWebsite:`Depuis un site web`,fromWebsiteTitle:`Ouvrez une vraie page web, sélectionnez une zone et transformez-la en spec`,capture:{responsiveSizes_one:`Responsive · {{count}} taille`,responsiveSizes_other:`Responsive · {{count}} tailles`},submit:{quick:`Générer la spec`,explore:`Continuer`,raw:`Créer`,disabledTitle:`Écrivez d'abord un prompt`},toast:{createFailed:`Échec de la création de la spec`,rawSavedWithId:`Enregistrée comme #{{id}} · Spec Raw prête pour les rails`,rawCreated:`Spec Raw créée`,exploreNotWired:`Le mode Explore n'est pas câblé dans cette vue`,generating:`Génération…`,failedToStart:`{{projectName}} · Échec du démarrage`,unsupportedFileType:`Type de fichier non pris en charge : {{name}}`,uploadFailed:`Échec de l'upload de {{name}} : {{message}}`}},t={title:`Proposer une fonctionnalité`,ideaIntro:`Décrivez votre idée en langage courant. Claude lira le codebase et la structurera en une proposition complète.`,ideaAriaLabel:`Idée de fonctionnalité`,ideaPlaceholder:`ex. Je veux que les utilisateurs puissent définir une alerte de budget pour être notifiés quand les coûts d'API dépassent un seuil…`,cmdEnterToSubmit:`Cmd+Entrée pour envoyer`,exploreIdea:`Explorer l'idée`,exploringTitle:`Exploration de votre idée…`,refiningTitle:`Affinage de la proposition…`,reviewTitle:`Relire la proposition`,readingCodebase_one:`Lecture du codebase… ({{count}} fichier exploré)`,readingCodebase_other:`Lecture du codebase… ({{count}} fichiers explorés)`,refinementAriaLabel:`Retour d'affinage`,refinementPlaceholder:`Demandez des changements, ajoutez des contraintes, affinez le périmètre…`,sendRefinementTitle:`Envoyer l'affinage (Cmd+Entrée)`,cmdEnterToSend:`Cmd+Entrée pour envoyer`,confirmCreateIssue:`Créer une issue GitHub à partir de cette proposition ?`,yesCreateIssue:`Oui, créer l'issue`,createGithubIssue:`Créer une issue GitHub`,startOver:`Recommencer`,creatingIssueTitle:`Création de l'issue GitHub…`,creatingIssueViaCli:`Création de l'issue via la CLI GitHub…`,issueCreated:`Issue créée`,proposeAnother:`Proposer une autre`,errorTitle:`Une erreur est survenue`,errorFallback:`Une erreur s'est produite`,tryAgain:`Réessayer`,cancelledTitle:`Annulé`,cancelledBody:`La proposition a été annulée.`},n={heading:`Prise en compte du contexte`,custom:`Personnalisé`,customMix:`Mix personnalisé — voir Réglages fins ci-dessous`,estimateUnavailable:`{{tier}} · estimation indisponible`,preset:{minimal:`Minimal`,light:`Léger`,standard:`Standard`,rich:`Riche`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`coût 1× · premier token le plus rapide · aucune spec chargée`,light:`coût 1,3× · specs Specrails chargées`,standard:`coût 1,6× · specs Specrails + OpenSpec chargées`,rich:`coût 2× · accès complet en lecture au repo`,max:`coût 4× · lecture complète + affinage Contract Layer`,desktop:`coût 4–6× · toutes les fonctionnalités + MCP du projet et vos MCP approuvés`},smashCapable:`Compatible SMASH`,smashHint:`Le Contract Layer est activé, donc cette spec pourra plus tard être décomposée en sous-specs.`,fineTune:`Réglages fins`,defaultLabel:`Portée du contexte`,summaryMinimal:`minimal`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`mes-mcp`,contract:`contract`},checks:{specrailsLabel:`tickets specrails`,openspecLabel:`specs openspec`,fullLabel:`Codebase complet`,mcpLabel:`MCP du projet`,mcpHint:`serveurs .mcp.json`,userMcpLabel:`Mes MCP approuvés`,userMcpHint:`serveurs ~/.claude · ~/.codex`,userMcpTooltip:`Vos serveurs MCP approuvés localement (claude mcp add / codex mcp add)`,exploreOnly:`Mode Explore uniquement`,contractLabel:`Enrichir avec le Contract Layer`,contractHint:`affinage post-commit · active SMASH`}},r={label:`Moteur IA`},i={presetHeading:`Préréglage de modèle`,preset:{balanced:{label:`Équilibré`,description:`Sonnet pour tous les agents (recommandé)`},budget:{label:`Budget`,description:`Haiku pour tous les agents — 3× moins cher, plus rapide`},max:{label:`Max`,description:`Opus pour l'architecte + le PM, Sonnet pour le reste`}},overridesHeading:`Surcharges de modèle par agent`,overriddenCount:`{{count}} surchargé(s)`,customBadge:`personnalisé`,resetToDefault:`Réinitialiser au préréglage par défaut`},a={alias:`Alias Claude Code : {{alias}}`,tier:{balanced:`Équilibré`,mostCapable:`Le plus capable`,fastest:`Le plus rapide`}},o={heading:`Estimation du coût`,meterAriaLabel:`palier de coût`,estimateUnavailable:`palier uniquement — estimation indisponible`},s={heading:`Commande suggérée`,run:`Exécuter`,dismiss:`Ignorer`},c={serverError:`Erreur serveur ({{status}})`,connectionFailed:`Échec de la connexion : {{message}}`,sendRefinementFailed:`Échec de l'envoi de l'affinage`,createIssueFailed:`Échec de la création de l'issue`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
1
+ var e={title:`Ajouter une spec`,dialogDescription:`Créez une nouvelle spec à partir d'une idée courte, immédiatement ou via le mode Explore.`,engineAriaLabel:`Moteur IA pour cette spec`,modeTablistLabel:`Mode de création de la spec`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interactif`,rawHint:`sans IA`},modeDescription:{quick:`Décrivez la fonctionnalité ou le changement. Joignez des maquettes, des briefs ou des données pour plus de contexte.`,explore:`Décrivez une idée approximative. Claude vous aidera à la façonner par la conversation — vous décidez quand la valider.`,raw:`Votre prompt, tel quel — enregistré comme ticket de spec. Aucune IA n'est lancée maintenant ; glissez-le sur un rail pour le construire.`},editorPlaceholder:{quick:`ex. Ajouter un toggle de mode sombre à la page des réglages, qui persiste la préférence de l'utilisateur…`,explore:`ex. mode sombre — pas sûr d'où placer le toggle ni comment persister le choix…`,raw:`Décrivez la fonctionnalité, le changement ou l'idée. Markdown, images et fichiers pris en charge…`},ideaAriaLabel:`Idée de spec`,raw:{titleLabel:`Titre`,titlePlaceholder:`Rempli automatiquement depuis votre prompt…`,priorityLabel:`Priorité`,labelsLabel:`Labels`,removeLabel:`Supprimer le label {{label}}`,addLabelAria:`Ajouter un label`,labelPlaceholder:`optionnel…`,bodyAriaLabel:`Corps de la spec Raw`},priority:{critical:`Critique`,high:`Haute`,medium:`Moyenne`,low:`Basse`},fromWebsite:`Depuis un site web`,fromWebsiteTitle:`Ouvrez une vraie page web, sélectionnez une zone et transformez-la en spec`,capture:{responsiveSizes_one:`Responsive · {{count}} taille`,responsiveSizes_other:`Responsive · {{count}} tailles`},submit:{quick:`Générer la spec`,explore:`Continuer`,raw:`Créer`,disabledTitle:`Écrivez d'abord un prompt`},toast:{createFailed:`Échec de la création de la spec`,rawSavedWithId:`Enregistrée comme #{{id}} · Spec Raw prête pour les rails`,rawCreated:`Spec Raw créée`,exploreNotWired:`Le mode Explore n'est pas câblé dans cette vue`,generating:`Génération…`,failedToStart:`{{projectName}} · Échec du démarrage`,unsupportedFileType:`Type de fichier non pris en charge : {{name}}`,uploadFailed:`Échec de l'upload de {{name}} : {{message}}`}},t={title:`Proposer une fonctionnalité`,ideaIntro:`Décrivez votre idée en langage courant. Claude lira le codebase et la structurera en une proposition complète.`,ideaAriaLabel:`Idée de fonctionnalité`,ideaPlaceholder:`ex. Je veux que les utilisateurs puissent définir une alerte de budget pour être notifiés quand les coûts d'API dépassent un seuil…`,cmdEnterToSubmit:`Cmd+Entrée pour envoyer`,exploreIdea:`Explorer l'idée`,exploringTitle:`Exploration de votre idée…`,refiningTitle:`Affinage de la proposition…`,reviewTitle:`Relire la proposition`,readingCodebase_one:`Lecture du codebase… ({{count}} fichier exploré)`,readingCodebase_other:`Lecture du codebase… ({{count}} fichiers explorés)`,refinementAriaLabel:`Retour d'affinage`,refinementPlaceholder:`Demandez des changements, ajoutez des contraintes, affinez le périmètre…`,sendRefinementTitle:`Envoyer l'affinage (Cmd+Entrée)`,cmdEnterToSend:`Cmd+Entrée pour envoyer`,confirmCreateIssue:`Créer une issue GitHub à partir de cette proposition ?`,yesCreateIssue:`Oui, créer l'issue`,createGithubIssue:`Créer une issue GitHub`,startOver:`Recommencer`,creatingIssueTitle:`Création de l'issue GitHub…`,creatingIssueViaCli:`Création de l'issue via la CLI GitHub…`,issueCreated:`Issue créée`,proposeAnother:`Proposer une autre`,errorTitle:`Une erreur est survenue`,errorFallback:`Une erreur s'est produite`,tryAgain:`Réessayer`,cancelledTitle:`Annulé`,cancelledBody:`La proposition a été annulée.`},n={heading:`Prise en compte du contexte`,custom:`Personnalisé`,customMix:`Mix personnalisé — voir Réglages fins ci-dessous`,estimateUnavailable:`{{tier}} · estimation indisponible`,preset:{minimal:`Minimal`,light:`Léger`,standard:`Standard`,rich:`Riche`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`coût 1× · premier token le plus rapide · aucune spec chargée`,light:`coût 1,3× · specs Specrails chargées`,standard:`coût 1,6× · specs Specrails + OpenSpec chargées`,rich:`coût 2× · accès complet en lecture au repo`,max:`coût 4× · lecture complète + affinage Contract Layer`,desktop:`coût 4–6× · toutes les fonctionnalités + MCP du projet et vos MCP approuvés`},smashCapable:`Compatible SMASH`,smashHint:`Le Contract Layer est activé, donc cette spec pourra plus tard être décomposée en sous-specs.`,fineTune:`Réglages fins`,defaultLabel:`Portée du contexte`,summaryMinimal:`minimal`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`mes-mcp`,contract:`contract`},checks:{specrailsLabel:`tickets specrails`,openspecLabel:`specs openspec`,fullLabel:`Codebase complet`,mcpLabel:`MCP du projet`,mcpHint:`serveurs .mcp.json`,userMcpLabel:`Mes MCP approuvés`,userMcpHint:`serveurs ~/.claude · ~/.codex`,userMcpTooltip:`Vos serveurs MCP approuvés localement (claude mcp add / codex mcp add)`,exploreOnly:`Mode Explore uniquement`,contractLabel:`Enrichir avec le Contract Layer`,contractHint:`affinage post-commit · active SMASH`}},r={label:`Moteur IA`},i={presetHeading:`Préréglage de modèle`,preset:{balanced:{label:`Équilibré`,description:`{{model}} pour tous les agents (recommandé)`},budget:{label:`Budget`,description:`{{model}} pour tous les agents — 3× moins cher, plus rapide`},max:{label:`Max`,description:`{{topModel}} pour l'architecte + le PM, {{baseModel}} pour le reste`}},overridesHeading:`Surcharges de modèle par agent`,overriddenCount:`{{count}} surchargé(s)`,customBadge:`personnalisé`,resetToDefault:`Réinitialiser au préréglage par défaut`},a={alias:`Alias Claude Code : {{alias}}`,tier:{balanced:`Équilibré`,mostCapable:`Le plus capable`,fastest:`Le plus rapide`}},o={heading:`Estimation du coût`,meterAriaLabel:`palier de coût`,estimateUnavailable:`palier uniquement — estimation indisponible`},s={heading:`Commande suggérée`,run:`Exécuter`,dismiss:`Ignorer`},c={serverError:`Erreur serveur ({{status}})`,connectionFailed:`Échec de la connexion : {{message}}`,sendRefinementFailed:`Échec de l'envoi de l'affinage`,createIssueFailed:`Échec de la création de l'issue`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
@@ -1 +1 @@
1
- var e={title:`Aggiungi spec`,dialogDescription:`Crea una nuova spec da un'idea breve, subito oppure tramite la modalità Explore.`,engineAriaLabel:`Engine AI per questa spec`,modeTablistLabel:`Modalità di creazione della spec`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interattiva`,rawHint:`senza AI`},modeDescription:{quick:`Descrivi la funzionalità o la modifica. Allega mockup, brief o dati per più contesto.`,explore:`Descrivi un'idea abbozzata. Claude ti aiuterà a darle forma attraverso la conversazione — decidi tu quando confermare.`,raw:`Il tuo prompt, così com'è — salvato come ticket spec. Nessuna AI per ora; trascinalo su un rail per realizzarlo.`},editorPlaceholder:{quick:`es. Aggiungi un toggle per la dark mode nella pagina impostazioni che memorizzi la preferenza dell'utente...`,explore:`es. dark mode — non so bene dove mettere il toggle né come salvare la preferenza…`,raw:`Descrivi la funzionalità, la modifica o l'idea. Supporta Markdown, immagini e file…`},ideaAriaLabel:`Idea della spec`,raw:{titleLabel:`Titolo`,titlePlaceholder:`Compilato automaticamente dal tuo prompt…`,priorityLabel:`Priorità`,labelsLabel:`Etichette`,removeLabel:`Rimuovi etichetta {{label}}`,addLabelAria:`Aggiungi etichetta`,labelPlaceholder:`facoltativa…`,bodyAriaLabel:`Corpo della spec Raw`},priority:{critical:`Critica`,high:`Alta`,medium:`Media`,low:`Bassa`},fromWebsite:`Da un sito web`,fromWebsiteTitle:`Apri una pagina web reale, seleziona un'area e trasformala in una spec`,capture:{responsiveSizes_one:`Responsive · {{count}} dimensione`,responsiveSizes_other:`Responsive · {{count}} dimensioni`},submit:{quick:`Genera spec`,explore:`Continua`,raw:`Crea`,disabledTitle:`Scrivi prima un prompt`},toast:{createFailed:`Impossibile creare la spec`,rawSavedWithId:`Salvata come #{{id}} · Spec Raw pronta per i rail`,rawCreated:`Spec Raw creata`,exploreNotWired:`La modalità Explore non è collegata in questa vista`,generating:`Generazione...`,failedToStart:`{{projectName}} · Avvio non riuscito`,unsupportedFileType:`Tipo di file non supportato: {{name}}`,uploadFailed:`Caricamento non riuscito per {{name}}: {{message}}`}},t={title:`Proponi una funzionalità`,ideaIntro:`Descrivi la tua idea in linguaggio semplice. Claude leggerà il codebase e la strutturerà in una proposta completa.`,ideaAriaLabel:`Idea di funzionalità`,ideaPlaceholder:`es. Voglio che gli utenti possano impostare un avviso di budget per ricevere una notifica quando i costi API superano una soglia...`,cmdEnterToSubmit:`Cmd+Invio per inviare`,exploreIdea:`Esplora l'idea`,exploringTitle:`Esplorazione dell'idea...`,refiningTitle:`Raffinamento della proposta...`,reviewTitle:`Rivedi la proposta`,readingCodebase_one:`Lettura del codebase... ({{count}} file esplorato)`,readingCodebase_other:`Lettura del codebase... ({{count}} file esplorati)`,refinementAriaLabel:`Feedback di raffinamento`,refinementPlaceholder:`Chiedi modifiche, aggiungi vincoli, affina lo scope...`,sendRefinementTitle:`Invia raffinamento (Cmd+Invio)`,cmdEnterToSend:`Cmd+Invio per inviare`,confirmCreateIssue:`Creare una Issue GitHub da questa proposta?`,yesCreateIssue:`Sì, crea la issue`,createGithubIssue:`Crea Issue GitHub`,startOver:`Ricomincia`,creatingIssueTitle:`Creazione della Issue GitHub...`,creatingIssueViaCli:`Creazione della issue tramite GitHub CLI...`,issueCreated:`Issue creata`,proposeAnother:`Proponi un'altra`,errorTitle:`Qualcosa è andato storto`,errorFallback:`Si è verificato un errore`,tryAgain:`Riprova`,cancelledTitle:`Annullata`,cancelledBody:`La proposta è stata annullata.`},n={heading:`Consapevolezza del contesto`,custom:`Personalizzato`,customMix:`Mix personalizzato — vedi Fine-tune qui sotto`,estimateUnavailable:`{{tier}} · stima non disponibile`,preset:{minimal:`Minimo`,light:`Leggero`,standard:`Standard`,rich:`Ricco`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`costo 1× · primo token più veloce · nessuna spec caricata`,light:`costo 1,3× · spec Specrails caricate`,standard:`costo 1,6× · spec Specrails + OpenSpec caricate`,rich:`costo 2× · accesso in lettura all'intero repo`,max:`costo 4× · lettura completa + raffinamento Contract Layer`,desktop:`costo 4–6× · tutte le funzionalità + MCP del progetto e i tuoi MCP approvati`},smashCapable:`Compatibile con SMASH`,smashHint:`Il Contract Layer è attivo, quindi questa spec potrà poi essere scomposta in Sub-Spec.`,fineTune:`Fine-tune`,defaultLabel:`Ambito del contesto`,summaryMinimal:`minimo`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`ticket specrails`,openspecLabel:`spec openspec`,fullLabel:`Codebase completo`,mcpLabel:`MCP del progetto`,mcpHint:`server .mcp.json`,userMcpLabel:`I miei MCP approvati`,userMcpHint:`server ~/.claude · ~/.codex`,userMcpTooltip:`I tuoi server MCP approvati localmente (claude mcp add / codex mcp add)`,exploreOnly:`Solo modalità Explore`,contractLabel:`Arricchisci con Contract Layer`,contractHint:`raffinamento post-commit · abilita SMASH`}},r={label:`Engine AI`},i={presetHeading:`Preset modello`,preset:{balanced:{label:`Bilanciato`,description:`Sonnet per tutti gli agenti (consigliato)`},budget:{label:`Budget`,description:`Haiku per tutti gli agenti — 3× più economico, più veloce`},max:{label:`Max`,description:`Opus per architect + PM, Sonnet per il resto`}},overridesHeading:`Override del modello per agente`,overriddenCount:`{{count}} sovrascritti`,customBadge:`custom`,resetToDefault:`Ripristina il default del preset`},a={alias:`Alias Claude Code: {{alias}}`,tier:{balanced:`Bilanciato`,mostCapable:`Più capace`,fastest:`Più veloce`}},o={heading:`Consapevolezza dei costi`,meterAriaLabel:`livello di costo`,estimateUnavailable:`solo livello — stima non disponibile`},s={heading:`Comando suggerito`,run:`Esegui`,dismiss:`Ignora`},c={serverError:`Errore del server ({{status}})`,connectionFailed:`Connessione non riuscita: {{message}}`,sendRefinementFailed:`Impossibile inviare il raffinamento`,createIssueFailed:`Impossibile creare la issue`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
1
+ var e={title:`Aggiungi spec`,dialogDescription:`Crea una nuova spec da un'idea breve, subito oppure tramite la modalità Explore.`,engineAriaLabel:`Engine AI per questa spec`,modeTablistLabel:`Modalità di creazione della spec`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interattiva`,rawHint:`senza AI`},modeDescription:{quick:`Descrivi la funzionalità o la modifica. Allega mockup, brief o dati per più contesto.`,explore:`Descrivi un'idea abbozzata. Claude ti aiuterà a darle forma attraverso la conversazione — decidi tu quando confermare.`,raw:`Il tuo prompt, così com'è — salvato come ticket spec. Nessuna AI per ora; trascinalo su un rail per realizzarlo.`},editorPlaceholder:{quick:`es. Aggiungi un toggle per la dark mode nella pagina impostazioni che memorizzi la preferenza dell'utente...`,explore:`es. dark mode — non so bene dove mettere il toggle né come salvare la preferenza…`,raw:`Descrivi la funzionalità, la modifica o l'idea. Supporta Markdown, immagini e file…`},ideaAriaLabel:`Idea della spec`,raw:{titleLabel:`Titolo`,titlePlaceholder:`Compilato automaticamente dal tuo prompt…`,priorityLabel:`Priorità`,labelsLabel:`Etichette`,removeLabel:`Rimuovi etichetta {{label}}`,addLabelAria:`Aggiungi etichetta`,labelPlaceholder:`facoltativa…`,bodyAriaLabel:`Corpo della spec Raw`},priority:{critical:`Critica`,high:`Alta`,medium:`Media`,low:`Bassa`},fromWebsite:`Da un sito web`,fromWebsiteTitle:`Apri una pagina web reale, seleziona un'area e trasformala in una spec`,capture:{responsiveSizes_one:`Responsive · {{count}} dimensione`,responsiveSizes_other:`Responsive · {{count}} dimensioni`},submit:{quick:`Genera spec`,explore:`Continua`,raw:`Crea`,disabledTitle:`Scrivi prima un prompt`},toast:{createFailed:`Impossibile creare la spec`,rawSavedWithId:`Salvata come #{{id}} · Spec Raw pronta per i rail`,rawCreated:`Spec Raw creata`,exploreNotWired:`La modalità Explore non è collegata in questa vista`,generating:`Generazione...`,failedToStart:`{{projectName}} · Avvio non riuscito`,unsupportedFileType:`Tipo di file non supportato: {{name}}`,uploadFailed:`Caricamento non riuscito per {{name}}: {{message}}`}},t={title:`Proponi una funzionalità`,ideaIntro:`Descrivi la tua idea in linguaggio semplice. Claude leggerà il codebase e la strutturerà in una proposta completa.`,ideaAriaLabel:`Idea di funzionalità`,ideaPlaceholder:`es. Voglio che gli utenti possano impostare un avviso di budget per ricevere una notifica quando i costi API superano una soglia...`,cmdEnterToSubmit:`Cmd+Invio per inviare`,exploreIdea:`Esplora l'idea`,exploringTitle:`Esplorazione dell'idea...`,refiningTitle:`Raffinamento della proposta...`,reviewTitle:`Rivedi la proposta`,readingCodebase_one:`Lettura del codebase... ({{count}} file esplorato)`,readingCodebase_other:`Lettura del codebase... ({{count}} file esplorati)`,refinementAriaLabel:`Feedback di raffinamento`,refinementPlaceholder:`Chiedi modifiche, aggiungi vincoli, affina lo scope...`,sendRefinementTitle:`Invia raffinamento (Cmd+Invio)`,cmdEnterToSend:`Cmd+Invio per inviare`,confirmCreateIssue:`Creare una Issue GitHub da questa proposta?`,yesCreateIssue:`Sì, crea la issue`,createGithubIssue:`Crea Issue GitHub`,startOver:`Ricomincia`,creatingIssueTitle:`Creazione della Issue GitHub...`,creatingIssueViaCli:`Creazione della issue tramite GitHub CLI...`,issueCreated:`Issue creata`,proposeAnother:`Proponi un'altra`,errorTitle:`Qualcosa è andato storto`,errorFallback:`Si è verificato un errore`,tryAgain:`Riprova`,cancelledTitle:`Annullata`,cancelledBody:`La proposta è stata annullata.`},n={heading:`Consapevolezza del contesto`,custom:`Personalizzato`,customMix:`Mix personalizzato — vedi Fine-tune qui sotto`,estimateUnavailable:`{{tier}} · stima non disponibile`,preset:{minimal:`Minimo`,light:`Leggero`,standard:`Standard`,rich:`Ricco`,max:`Max`,desktop:`Desktop`},presetCost:{minimal:`costo 1× · primo token più veloce · nessuna spec caricata`,light:`costo 1,3× · spec Specrails caricate`,standard:`costo 1,6× · spec Specrails + OpenSpec caricate`,rich:`costo 2× · accesso in lettura all'intero repo`,max:`costo 4× · lettura completa + raffinamento Contract Layer`,desktop:`costo 4–6× · tutte le funzionalità + MCP del progetto e i tuoi MCP approvati`},smashCapable:`Compatibile con SMASH`,smashHint:`Il Contract Layer è attivo, quindi questa spec potrà poi essere scomposta in Sub-Spec.`,fineTune:`Fine-tune`,defaultLabel:`Ambito del contesto`,summaryMinimal:`minimo`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`ticket specrails`,openspecLabel:`spec openspec`,fullLabel:`Codebase completo`,mcpLabel:`MCP del progetto`,mcpHint:`server .mcp.json`,userMcpLabel:`I miei MCP approvati`,userMcpHint:`server ~/.claude · ~/.codex`,userMcpTooltip:`I tuoi server MCP approvati localmente (claude mcp add / codex mcp add)`,exploreOnly:`Solo modalità Explore`,contractLabel:`Arricchisci con Contract Layer`,contractHint:`raffinamento post-commit · abilita SMASH`}},r={label:`Engine AI`},i={presetHeading:`Preset modello`,preset:{balanced:{label:`Bilanciato`,description:`{{model}} per tutti gli agenti (consigliato)`},budget:{label:`Budget`,description:`{{model}} per tutti gli agenti — 3× più economico, più veloce`},max:{label:`Max`,description:`{{topModel}} per architect + PM, {{baseModel}} per il resto`}},overridesHeading:`Override del modello per agente`,overriddenCount:`{{count}} sovrascritti`,customBadge:`custom`,resetToDefault:`Ripristina il default del preset`},a={alias:`Alias Claude Code: {{alias}}`,tier:{balanced:`Bilanciato`,mostCapable:`Più capace`,fastest:`Più veloce`}},o={heading:`Consapevolezza dei costi`,meterAriaLabel:`livello di costo`,estimateUnavailable:`solo livello — stima non disponibile`},s={heading:`Comando suggerito`,run:`Esegui`,dismiss:`Ignora`},c={serverError:`Errore del server ({{status}})`,connectionFailed:`Connessione non riuscita: {{message}}`,sendRefinementFailed:`Impossibile inviare il raffinamento`,createIssueFailed:`Impossibile creare la issue`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
@@ -1 +1 @@
1
- var e={title:`Adicionar Spec`,dialogDescription:`Crie uma nova spec a partir de uma ideia curta, imediatamente ou através do modo Explore.`,engineAriaLabel:`Motor de IA para esta spec`,modeTablistLabel:`Modo de criação da spec`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interativo`,rawHint:`sem IA`},modeDescription:{quick:`Descreva a funcionalidade ou alteração. Anexe mockups, briefs ou dados para mais contexto.`,explore:`Descreva uma ideia aproximada. O Claude vai ajudá-lo a dar-lhe forma através de conversa — você decide quando confirmar.`,raw:`O seu prompt, tal como está — guardado como ticket de spec. Sem IA agora; arraste-o para um rail para o construir.`},editorPlaceholder:{quick:`p. ex. Adicionar um interruptor de modo escuro à página de definições que persista a preferência do utilizador...`,explore:`p. ex. modo escuro — não sei bem onde colocar o interruptor nem como persistir a preferência…`,raw:`Descreva a funcionalidade, alteração ou ideia. Suporta Markdown, imagens e ficheiros…`},ideaAriaLabel:`Ideia da spec`,raw:{titleLabel:`Título`,titlePlaceholder:`Preenchido automaticamente a partir do seu prompt…`,priorityLabel:`Prioridade`,labelsLabel:`Etiquetas`,removeLabel:`Remover etiqueta {{label}}`,addLabelAria:`Adicionar etiqueta`,labelPlaceholder:`opcional…`,bodyAriaLabel:`Corpo da spec Raw`},priority:{critical:`Crítica`,high:`Alta`,medium:`Média`,low:`Baixa`},fromWebsite:`A partir de um website`,fromWebsiteTitle:`Abra uma página web real, selecione uma área e converta-a numa spec`,capture:{responsiveSizes_one:`Responsivo · {{count}} tamanho`,responsiveSizes_other:`Responsivo · {{count}} tamanhos`},submit:{quick:`Gerar Spec`,explore:`Continuar`,raw:`Criar`,disabledTitle:`Escreva primeiro um prompt`},toast:{createFailed:`Falha ao criar a spec`,rawSavedWithId:`Guardada como #{{id}} · Spec Raw pronta para os rails`,rawCreated:`Spec Raw criada`,exploreNotWired:`O modo Explore não está disponível nesta vista`,generating:`A gerar...`,failedToStart:`{{projectName}} · Falha ao iniciar`,unsupportedFileType:`Tipo de ficheiro não suportado: {{name}}`,uploadFailed:`Falha no carregamento de {{name}}: {{message}}`}},t={title:`Propor uma funcionalidade`,ideaIntro:`Descreva a sua ideia em linguagem simples. O Claude vai ler a base de código e estruturá-la numa proposta completa.`,ideaAriaLabel:`Ideia de funcionalidade`,ideaPlaceholder:`p. ex. Quero que os utilizadores possam definir um alerta de orçamento para serem notificados quando os custos de API excederem um limite...`,cmdEnterToSubmit:`Cmd+Enter para submeter`,exploreIdea:`Explorar ideia`,exploringTitle:`A explorar a sua ideia...`,refiningTitle:`A refinar a proposta...`,reviewTitle:`Rever proposta`,readingCodebase_one:`A ler a base de código... ({{count}} ficheiro explorado)`,readingCodebase_other:`A ler a base de código... ({{count}} ficheiros explorados)`,refinementAriaLabel:`Feedback de refinamento`,refinementPlaceholder:`Peça alterações, adicione restrições, ajuste o âmbito...`,sendRefinementTitle:`Enviar refinamento (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter para enviar`,confirmCreateIssue:`Criar uma Issue do GitHub a partir desta proposta?`,yesCreateIssue:`Sim, criar issue`,createGithubIssue:`Criar Issue do GitHub`,startOver:`Recomeçar`,creatingIssueTitle:`A criar a Issue do GitHub...`,creatingIssueViaCli:`A criar a issue através da CLI do GitHub...`,issueCreated:`Issue criada`,proposeAnother:`Propor outra`,errorTitle:`Algo correu mal`,errorFallback:`Ocorreu um erro`,tryAgain:`Tentar novamente`,cancelledTitle:`Cancelado`,cancelledBody:`A proposta foi cancelada.`},n={heading:`Consciência de contexto`,custom:`Personalizado`,customMix:`Combinação personalizada — ver Ajuste fino abaixo`,estimateUnavailable:`{{tier}} · estimativa indisponível`,preset:{minimal:`Mínimo`,light:`Leve`,standard:`Padrão`,rich:`Rico`,max:`Máx`,desktop:`Desktop`},presetCost:{minimal:`custo 1× · primeiro token mais rápido · sem specs carregadas`,light:`custo 1,3× · specs do Specrails carregadas`,standard:`custo 1,6× · specs do Specrails + OpenSpec carregadas`,rich:`custo 2× · acesso de leitura a todo o repositório`,max:`custo 4× · leitura total + refinamento Contract Layer`,desktop:`custo 4–6× · todas as funcionalidades + MCPs do projeto e os seus MCPs aprovados`},smashCapable:`Compatível com SMASH`,smashHint:`O Contract Layer está ativo, por isso esta spec pode mais tarde ser decomposta em Sub-Specs.`,fineTune:`Ajuste fino`,defaultLabel:`Âmbito de contexto`,summaryMinimal:`mínimo`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`tickets specrails`,openspecLabel:`specs openspec`,fullLabel:`Base de código completa`,mcpLabel:`MCPs do projeto`,mcpHint:`servidores .mcp.json`,userMcpLabel:`Os meus MCPs aprovados`,userMcpHint:`servidores ~/.claude · ~/.codex`,userMcpTooltip:`Os seus servidores MCP aprovados localmente (claude mcp add / codex mcp add)`,exploreOnly:`Apenas no modo Explore`,contractLabel:`Enriquecer com Contract Layer`,contractHint:`refinamento pós-commit · ativa o SMASH`}},r={label:`Motor de IA`},i={presetHeading:`Predefinição de modelo`,preset:{balanced:{label:`Equilibrado`,description:`Sonnet para todos os agentes (recomendado)`},budget:{label:`Económico`,description:`Haiku para todos os agentes — 3x mais barato, mais rápido`},max:{label:`Máx`,description:`Opus para arquiteto + PM, Sonnet para os restantes`}},overridesHeading:`Substituições de modelo por agente`,overriddenCount:`{{count}} substituídos`,customBadge:`personalizado`,resetToDefault:`Repor a predefinição`},a={alias:`Alias no Claude Code: {{alias}}`,tier:{balanced:`Equilibrado`,mostCapable:`Mais capaz`,fastest:`Mais rápido`}},o={heading:`Consciência de custos`,meterAriaLabel:`nível de custo`,estimateUnavailable:`apenas nível — estimativa indisponível`},s={heading:`Comando sugerido`,run:`Executar`,dismiss:`Dispensar`},c={serverError:`Erro do servidor ({{status}})`,connectionFailed:`Falha na ligação: {{message}}`,sendRefinementFailed:`Falha ao enviar o refinamento`,createIssueFailed:`Falha ao criar a issue`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};
1
+ var e={title:`Adicionar Spec`,dialogDescription:`Crie uma nova spec a partir de uma ideia curta, imediatamente ou através do modo Explore.`,engineAriaLabel:`Motor de IA para esta spec`,modeTablistLabel:`Modo de criação da spec`,mode:{quick:`Quick`,explore:`Explore`,raw:`Raw`,exploreHint:`interativo`,rawHint:`sem IA`},modeDescription:{quick:`Descreva a funcionalidade ou alteração. Anexe mockups, briefs ou dados para mais contexto.`,explore:`Descreva uma ideia aproximada. O Claude vai ajudá-lo a dar-lhe forma através de conversa — você decide quando confirmar.`,raw:`O seu prompt, tal como está — guardado como ticket de spec. Sem IA agora; arraste-o para um rail para o construir.`},editorPlaceholder:{quick:`p. ex. Adicionar um interruptor de modo escuro à página de definições que persista a preferência do utilizador...`,explore:`p. ex. modo escuro — não sei bem onde colocar o interruptor nem como persistir a preferência…`,raw:`Descreva a funcionalidade, alteração ou ideia. Suporta Markdown, imagens e ficheiros…`},ideaAriaLabel:`Ideia da spec`,raw:{titleLabel:`Título`,titlePlaceholder:`Preenchido automaticamente a partir do seu prompt…`,priorityLabel:`Prioridade`,labelsLabel:`Etiquetas`,removeLabel:`Remover etiqueta {{label}}`,addLabelAria:`Adicionar etiqueta`,labelPlaceholder:`opcional…`,bodyAriaLabel:`Corpo da spec Raw`},priority:{critical:`Crítica`,high:`Alta`,medium:`Média`,low:`Baixa`},fromWebsite:`A partir de um website`,fromWebsiteTitle:`Abra uma página web real, selecione uma área e converta-a numa spec`,capture:{responsiveSizes_one:`Responsivo · {{count}} tamanho`,responsiveSizes_other:`Responsivo · {{count}} tamanhos`},submit:{quick:`Gerar Spec`,explore:`Continuar`,raw:`Criar`,disabledTitle:`Escreva primeiro um prompt`},toast:{createFailed:`Falha ao criar a spec`,rawSavedWithId:`Guardada como #{{id}} · Spec Raw pronta para os rails`,rawCreated:`Spec Raw criada`,exploreNotWired:`O modo Explore não está disponível nesta vista`,generating:`A gerar...`,failedToStart:`{{projectName}} · Falha ao iniciar`,unsupportedFileType:`Tipo de ficheiro não suportado: {{name}}`,uploadFailed:`Falha no carregamento de {{name}}: {{message}}`}},t={title:`Propor uma funcionalidade`,ideaIntro:`Descreva a sua ideia em linguagem simples. O Claude vai ler a base de código e estruturá-la numa proposta completa.`,ideaAriaLabel:`Ideia de funcionalidade`,ideaPlaceholder:`p. ex. Quero que os utilizadores possam definir um alerta de orçamento para serem notificados quando os custos de API excederem um limite...`,cmdEnterToSubmit:`Cmd+Enter para submeter`,exploreIdea:`Explorar ideia`,exploringTitle:`A explorar a sua ideia...`,refiningTitle:`A refinar a proposta...`,reviewTitle:`Rever proposta`,readingCodebase_one:`A ler a base de código... ({{count}} ficheiro explorado)`,readingCodebase_other:`A ler a base de código... ({{count}} ficheiros explorados)`,refinementAriaLabel:`Feedback de refinamento`,refinementPlaceholder:`Peça alterações, adicione restrições, ajuste o âmbito...`,sendRefinementTitle:`Enviar refinamento (Cmd+Enter)`,cmdEnterToSend:`Cmd+Enter para enviar`,confirmCreateIssue:`Criar uma Issue do GitHub a partir desta proposta?`,yesCreateIssue:`Sim, criar issue`,createGithubIssue:`Criar Issue do GitHub`,startOver:`Recomeçar`,creatingIssueTitle:`A criar a Issue do GitHub...`,creatingIssueViaCli:`A criar a issue através da CLI do GitHub...`,issueCreated:`Issue criada`,proposeAnother:`Propor outra`,errorTitle:`Algo correu mal`,errorFallback:`Ocorreu um erro`,tryAgain:`Tentar novamente`,cancelledTitle:`Cancelado`,cancelledBody:`A proposta foi cancelada.`},n={heading:`Consciência de contexto`,custom:`Personalizado`,customMix:`Combinação personalizada — ver Ajuste fino abaixo`,estimateUnavailable:`{{tier}} · estimativa indisponível`,preset:{minimal:`Mínimo`,light:`Leve`,standard:`Padrão`,rich:`Rico`,max:`Máx`,desktop:`Desktop`},presetCost:{minimal:`custo 1× · primeiro token mais rápido · sem specs carregadas`,light:`custo 1,3× · specs do Specrails carregadas`,standard:`custo 1,6× · specs do Specrails + OpenSpec carregadas`,rich:`custo 2× · acesso de leitura a todo o repositório`,max:`custo 4× · leitura total + refinamento Contract Layer`,desktop:`custo 4–6× · todas as funcionalidades + MCPs do projeto e os seus MCPs aprovados`},smashCapable:`Compatível com SMASH`,smashHint:`O Contract Layer está ativo, por isso esta spec pode mais tarde ser decomposta em Sub-Specs.`,fineTune:`Ajuste fino`,defaultLabel:`Âmbito de contexto`,summaryMinimal:`mínimo`,tags:{specrails:`specrails`,openspec:`openspec`,codebase:`codebase`,mcp:`mcp`,myMcp:`my-mcp`,contract:`contract`},checks:{specrailsLabel:`tickets specrails`,openspecLabel:`specs openspec`,fullLabel:`Base de código completa`,mcpLabel:`MCPs do projeto`,mcpHint:`servidores .mcp.json`,userMcpLabel:`Os meus MCPs aprovados`,userMcpHint:`servidores ~/.claude · ~/.codex`,userMcpTooltip:`Os seus servidores MCP aprovados localmente (claude mcp add / codex mcp add)`,exploreOnly:`Apenas no modo Explore`,contractLabel:`Enriquecer com Contract Layer`,contractHint:`refinamento pós-commit · ativa o SMASH`}},r={label:`Motor de IA`},i={presetHeading:`Predefinição de modelo`,preset:{balanced:{label:`Equilibrado`,description:`{{model}} para todos os agentes (recomendado)`},budget:{label:`Económico`,description:`{{model}} para todos os agentes — 3x mais barato, mais rápido`},max:{label:`Máx`,description:`{{topModel}} para arquiteto + PM, {{baseModel}} para os restantes`}},overridesHeading:`Substituições de modelo por agente`,overriddenCount:`{{count}} substituídos`,customBadge:`personalizado`,resetToDefault:`Repor a predefinição`},a={alias:`Alias no Claude Code: {{alias}}`,tier:{balanced:`Equilibrado`,mostCapable:`Mais capaz`,fastest:`Mais rápido`}},o={heading:`Consciência de custos`,meterAriaLabel:`nível de custo`,estimateUnavailable:`apenas nível — estimativa indisponível`},s={heading:`Comando sugerido`,run:`Executar`,dismiss:`Dispensar`},c={serverError:`Erro do servidor ({{status}})`,connectionFailed:`Falha na ligação: {{message}}`,sendRefinementFailed:`Falha ao enviar o refinamento`,createIssueFailed:`Falha ao criar a issue`},l={proposeModal:e,featureProposal:t,contextScope:n,aiEngine:r,modelSelector:i,modelCombobox:a,costMeter:o,commandProposal:s,errors:c};export{r as aiEngine,s as commandProposal,n as contextScope,o as costMeter,l as default,c as errors,t as featureProposal,a as modelCombobox,i as modelSelector,e as proposeModal};