@sma1lboy/kobe 0.8.99 → 0.8.102

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 (37) hide show
  1. package/dist/cli/index.js +395 -390
  2. package/dist/cli/kobe.js +395 -390
  3. package/dist/cli/pty-host-node.mjs +327 -99
  4. package/dist/cli/rove.js +395 -390
  5. package/dist/web-ui/assets/{AppShell-BTjvuY-t.js → AppShell-ByiYfvCg.js} +1 -1
  6. package/dist/web-ui/assets/{Board-DPB4h6mJ.js → Board-B0oB8DMk.js} +1 -1
  7. package/dist/web-ui/assets/{BoardPeek-69VJptGV.js → BoardPeek-VXShygbB.js} +2 -2
  8. package/dist/web-ui/assets/{ChatTerminal-MCI1aBbT.js → ChatTerminal-DNTeFtk5.js} +1 -1
  9. package/dist/web-ui/assets/{ChatTranscript-DLthbnmB.js → ChatTranscript-Co0UhezW.js} +1 -1
  10. package/dist/web-ui/assets/{ConfirmDialog-CDPOtXww.js → ConfirmDialog-D-NILtP0.js} +1 -1
  11. package/dist/web-ui/assets/{IssueIntakePanel-XYsIcIhp.js → IssueIntakePanel-BN31TW37.js} +1 -1
  12. package/dist/web-ui/assets/{IssuePeek-CP_rAkqO.js → IssuePeek-BT8ZmKTT.js} +1 -1
  13. package/dist/web-ui/assets/{IssuesPage-BR5mpuo-.js → IssuesPage-BjLRf_cj.js} +1 -1
  14. package/dist/web-ui/assets/{ViewToggle-BdPCMBWa.js → ViewToggle-BHBzWlni.js} +1 -1
  15. package/dist/web-ui/assets/{WorkspaceTabs-CMKlvN_Y.js → WorkspaceTabs-kqzy_Dsf.js} +3 -3
  16. package/dist/web-ui/assets/active-task-CuoFMFoR.js +1 -0
  17. package/dist/web-ui/assets/board-GAhbgwzQ.js +1 -0
  18. package/dist/web-ui/assets/desktop-CFge7SbS.js +2 -0
  19. package/dist/web-ui/assets/{harness-q9gT7Jic.js → harness-B5VlW5ov.js} +1 -1
  20. package/dist/web-ui/assets/{index-D58CfI0X.js → index-BgcK6obF.js} +3 -3
  21. package/dist/web-ui/assets/{issues-1SCRkcB0.js → issues-BMqItbVN.js} +1 -1
  22. package/dist/web-ui/assets/issues-DmgD6qU_.js +1 -0
  23. package/dist/web-ui/assets/{lazy-issue-panels-0Rhl2uhh.js → lazy-issue-panels-BcU72R8r.js} +3 -3
  24. package/dist/web-ui/assets/routes-DMeRqoPI.js +1 -0
  25. package/dist/web-ui/assets/store-BXzqsTjs.js +2 -0
  26. package/dist/web-ui/assets/{task._taskId-BmObFoVZ.js → task._taskId-BuwKbKaG.js} +1 -1
  27. package/dist/web-ui/assets/{task._taskId-BlZ0vG_1.js → task._taskId-EQWWNO2k.js} +2 -2
  28. package/dist/web-ui/assets/{triage-7QLsCY8d.js → triage-DDohuPMh.js} +1 -1
  29. package/dist/web-ui/assets/{worktrees-C_XKA7jM.js → worktrees-3wHfn7Vh.js} +1 -1
  30. package/dist/web-ui/index.html +6 -6
  31. package/package.json +1 -1
  32. package/dist/web-ui/assets/active-task-GeQZqbJK.js +0 -1
  33. package/dist/web-ui/assets/board-CGiK0u0M.js +0 -1
  34. package/dist/web-ui/assets/desktop-BThq9eSR.js +0 -2
  35. package/dist/web-ui/assets/issues-BKkua1D9.js +0 -1
  36. package/dist/web-ui/assets/routes-SBb-uSy8.js +0 -1
  37. package/dist/web-ui/assets/store-uT65Mask.js +0 -2
@@ -1,4 +1,4 @@
1
- import{o as e,r as t}from"./terminal-qBEkzc-m.js";import{c as n,n as r}from"./tabs-Dx-TnbvG.js";import{t as i}from"./store-uT65Mask.js";import{n as a}from"./active-task-GeQZqbJK.js";import{t as o}from"./settings-tPcmEHCP.js";import{t as s}from"./text-match-DW3sD-Rt.js";var c=[{key:`backlog`,title:`Backlog`,accent:`text-subtle`,alwaysVisible:!0},{key:`in_progress`,title:`In progress`,accent:`text-kobe-orange`,alwaysVisible:!0},{key:`done`,title:`Done`,accent:`text-kobe-green`,alwaysVisible:!0}],l=new Set([`done`]);function u(e){return e.status===`done`?`done`:e.taskId!==void 0&&e.taskId!==``?`in_progress`:`backlog`}function d(e){return e.taskId!==void 0&&e.taskId!==``}function f(e,t){return e.issue.created===t.issue.created?t.issue.id-e.issue.id:e.issue.created<t.issue.created?1:-1}function p(e){let t=new Map,n=(e,n)=>{let r=t.get(e);r?r.push(n):t.set(e,[n])};for(let t of e)n(u(t.issue),t);for(let e of t.values())e.sort(f);let r=(e,t)=>!l.has(e)||t.length<=30?{cards:t,hiddenCount:0}:{cards:t.slice(0,30),hiddenCount:t.length-30};return c.map(e=>({...e,...r(e.key,t.get(e.key)??[])})).filter(e=>e.alwaysVisible||e.cards.length+e.hiddenCount>0)}function m(e){return e.reduce((e,t)=>e+t.cards.length,0)}function h(e){let t=new Map;for(let n of e){let e=n.repo,r=t.get(e);r?r.push(n):t.set(e,[n])}let n=[...t.keys()];return n.map(e=>({repo:e,label:_(e,n),columns:p(t.get(e)??[])})).sort((e,t)=>e.label.localeCompare(t.label))}function g(e){let t=e.replace(/\/+$/,``);return t.split(`/`).pop()||t}function _(e,t){let n=g(e);return t.some(t=>t!==e&&g(t)===n)?e.replace(/\/+$/,``).split(`/`).slice(-2).join(`/`):n}function v(e,t,n){let r=[];for(let i of t){let t=e[i];if(!(!t||!t.exists))for(let e of t.issues){let t=n.get(`${i}:${e.id}`);r.push(t&&!e.taskId?{repo:i,issue:{...e,taskId:t.taskId}}:{repo:i,issue:e})}}return r}function y(e){let t=new Map;for(let{repo:n}of e)t.set(n,(t.get(n)??0)+1);let n=[...t.keys()];return n.map(e=>({repo:e,label:_(e,n),count:t.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function b(e,t,n){return e.filter(({repo:e,issue:r})=>n&&e!==n?!1:s(`#${r.id} ${r.title} ${r.body}`,t))}function x(e){let t=v(e.issueData,e.issueRepos,e.pendingLinks),n=y(t),r=h(b(t,e.query,e.repoFilter));return e.repoFilter&&r.length===0&&e.issueRepos.includes(e.repoFilter)&&r.push({repo:e.repoFilter,label:_(e.repoFilter,e.issueRepos),columns:p([])}),{allIssues:t,repoChips:n,projectBoards:r,shownCount:r.reduce((e,t)=>e+m(t.columns),0),hasAnyCard:t.length>0}}async function S(){let t=await e.get(`/api/projects`,{label:`load projects`});return Array.isArray(t.projects)?t.projects.filter(e=>typeof e==`string`):[]}async function C(t){return e.get(`/api/issues`,{query:{repoRoot:t},label:`load issues`})}async function w(t,n){return e.post(`/api/issues`,{repoRoot:t,op:n},{label:`update issues`})}async function T(e,t){return w(e,{type:`create`,...t})}async function E(e,t,n){return w(e,{type:`setStatus`,id:t,status:n})}async function D(e,t,n){return w(e,{type:`update`,id:t,...n})}async function O(e,t,n){return w(e,{type:`link`,id:t,taskId:n})}async function k(e,t){return w(e,{type:`delete`,id:t})}async function A(){let t=await e.getOr(`/api/cli-invocation`,{},{label:`load CLI invocation`});return typeof t.api==`string`&&t.api.trim().length>0?t.api:`rove api`}var j=[`open`,`doing`,`hold`,`done`],M={open:{title:`Backlog`,accent:`text-kobe-blue`},doing:{title:`In session`,accent:`text-kobe-orange`},hold:{title:`Blocked`,accent:`text-kobe-yellow`},done:{title:`Done`,accent:`text-kobe-green`}};function N(e){return e!==`done`}function P(e,t){let n=(t.query??``).trim().toLowerCase(),r=t.statuses&&t.statuses.length>0?t.statuses:null;return e.filter(e=>r&&!r.includes(e.status)?!1:!n||`#${e.id} ${e.title} ${e.body}`.toLowerCase().includes(n))}function F(e){let t={open:[],doing:[],hold:[],done:[]};for(let n of e)t[n.status]?.push(n);let n=(e,t)=>e.created===t.created?t.id-e.id:e.created<t.created?1:-1;return t.open.sort(n),t.doing.sort(n),t.hold.sort(n),t.done.sort((e,t)=>t.id-e.id),t}function I(e,t=[]){let n=new Map;for(let e of t)e.trim().length>0&&n.set(e,0);let r=new Set(e.filter(e=>!e.archived&&e.kind===`main`&&e.repo).map(e=>e.repo));for(let e of r)n.set(e,n.get(e)??0);let i=new Set(n.keys());for(let t of e)t.archived||!t.repo||i.size>0&&!i.has(t.repo)||n.set(t.repo,(n.get(t.repo)??0)+1);let a=[...n.keys()];return a.map(e=>({repo:e,label:_(e,a),count:n.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function L(e,t){return e.length===0?null:t&&e.some(e=>e.repo===t)?t:e[0]?.repo??null}function R(e,t=`rove api`){let n=[`Work on user story #${e.id}: ${e.title}`,``],r=e.body.trim();return r&&n.push(r,``),n.push(`Treat this as the story's dedicated Rove task session: work only in this task worktree, and preserve any repo init instructions already delivered to the session.`,`Before finishing, verify the acceptance criteria implied by the story and summarize what changed plus any verification still needed.`,`Then merge the task branch back into the current project's main branch after the worktree is clean and checks pass.`,`When the work lands, run: ${t} issue-set-status --repo . --id ${e.id} --status done`),n.join(`
1
+ import{o as e,r as t}from"./terminal-qBEkzc-m.js";import{c as n,n as r}from"./tabs-Dx-TnbvG.js";import{t as i}from"./store-BXzqsTjs.js";import{n as a}from"./active-task-CuoFMFoR.js";import{t as o}from"./settings-tPcmEHCP.js";import{t as s}from"./text-match-DW3sD-Rt.js";var c=[{key:`backlog`,title:`Backlog`,accent:`text-subtle`,alwaysVisible:!0},{key:`in_progress`,title:`In progress`,accent:`text-kobe-orange`,alwaysVisible:!0},{key:`done`,title:`Done`,accent:`text-kobe-green`,alwaysVisible:!0}],l=new Set([`done`]);function u(e){return e.status===`done`?`done`:e.taskId!==void 0&&e.taskId!==``?`in_progress`:`backlog`}function d(e){return e.taskId!==void 0&&e.taskId!==``}function f(e,t){return e.issue.created===t.issue.created?t.issue.id-e.issue.id:e.issue.created<t.issue.created?1:-1}function p(e){let t=new Map,n=(e,n)=>{let r=t.get(e);r?r.push(n):t.set(e,[n])};for(let t of e)n(u(t.issue),t);for(let e of t.values())e.sort(f);let r=(e,t)=>!l.has(e)||t.length<=30?{cards:t,hiddenCount:0}:{cards:t.slice(0,30),hiddenCount:t.length-30};return c.map(e=>({...e,...r(e.key,t.get(e.key)??[])})).filter(e=>e.alwaysVisible||e.cards.length+e.hiddenCount>0)}function m(e){return e.reduce((e,t)=>e+t.cards.length,0)}function h(e){let t=new Map;for(let n of e){let e=n.repo,r=t.get(e);r?r.push(n):t.set(e,[n])}let n=[...t.keys()];return n.map(e=>({repo:e,label:_(e,n),columns:p(t.get(e)??[])})).sort((e,t)=>e.label.localeCompare(t.label))}function g(e){let t=e.replace(/\/+$/,``);return t.split(`/`).pop()||t}function _(e,t){let n=g(e);return t.some(t=>t!==e&&g(t)===n)?e.replace(/\/+$/,``).split(`/`).slice(-2).join(`/`):n}function v(e,t,n){let r=[];for(let i of t){let t=e[i];if(!(!t||!t.exists))for(let e of t.issues){let t=n.get(`${i}:${e.id}`);r.push(t&&!e.taskId?{repo:i,issue:{...e,taskId:t.taskId}}:{repo:i,issue:e})}}return r}function y(e){let t=new Map;for(let{repo:n}of e)t.set(n,(t.get(n)??0)+1);let n=[...t.keys()];return n.map(e=>({repo:e,label:_(e,n),count:t.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function b(e,t,n){return e.filter(({repo:e,issue:r})=>n&&e!==n?!1:s(`#${r.id} ${r.title} ${r.body}`,t))}function x(e){let t=v(e.issueData,e.issueRepos,e.pendingLinks),n=y(t),r=h(b(t,e.query,e.repoFilter));return e.repoFilter&&r.length===0&&e.issueRepos.includes(e.repoFilter)&&r.push({repo:e.repoFilter,label:_(e.repoFilter,e.issueRepos),columns:p([])}),{allIssues:t,repoChips:n,projectBoards:r,shownCount:r.reduce((e,t)=>e+m(t.columns),0),hasAnyCard:t.length>0}}async function S(){let t=await e.get(`/api/projects`,{label:`load projects`});return Array.isArray(t.projects)?t.projects.filter(e=>typeof e==`string`):[]}async function C(t){return e.get(`/api/issues`,{query:{repoRoot:t},label:`load issues`})}async function w(t,n){return e.post(`/api/issues`,{repoRoot:t,op:n},{label:`update issues`})}async function T(e,t){return w(e,{type:`create`,...t})}async function E(e,t,n){return w(e,{type:`setStatus`,id:t,status:n})}async function D(e,t,n){return w(e,{type:`update`,id:t,...n})}async function O(e,t,n){return w(e,{type:`link`,id:t,taskId:n})}async function k(e,t){return w(e,{type:`delete`,id:t})}async function A(){let t=await e.getOr(`/api/cli-invocation`,{},{label:`load CLI invocation`});return typeof t.api==`string`&&t.api.trim().length>0?t.api:`rove api`}var j=[`open`,`doing`,`hold`,`done`],M={open:{title:`Backlog`,accent:`text-kobe-blue`},doing:{title:`In session`,accent:`text-kobe-orange`},hold:{title:`Blocked`,accent:`text-kobe-yellow`},done:{title:`Done`,accent:`text-kobe-green`}};function N(e){return e!==`done`}function P(e,t){let n=(t.query??``).trim().toLowerCase(),r=t.statuses&&t.statuses.length>0?t.statuses:null;return e.filter(e=>r&&!r.includes(e.status)?!1:!n||`#${e.id} ${e.title} ${e.body}`.toLowerCase().includes(n))}function F(e){let t={open:[],doing:[],hold:[],done:[]};for(let n of e)t[n.status]?.push(n);let n=(e,t)=>e.created===t.created?t.id-e.id:e.created<t.created?1:-1;return t.open.sort(n),t.doing.sort(n),t.hold.sort(n),t.done.sort((e,t)=>t.id-e.id),t}function I(e,t=[]){let n=new Map;for(let e of t)e.trim().length>0&&n.set(e,0);let r=new Set(e.filter(e=>!e.archived&&e.kind===`main`&&e.repo).map(e=>e.repo));for(let e of r)n.set(e,n.get(e)??0);let i=new Set(n.keys());for(let t of e)t.archived||!t.repo||i.size>0&&!i.has(t.repo)||n.set(t.repo,(n.get(t.repo)??0)+1);let a=[...n.keys()];return a.map(e=>({repo:e,label:_(e,a),count:n.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function L(e,t){return e.length===0?null:t&&e.some(e=>e.repo===t)?t:e[0]?.repo??null}function R(e,t=`rove api`){let n=[`Work on user story #${e.id}: ${e.title}`,``],r=e.body.trim();return r&&n.push(r,``),n.push(`Treat this as the story's dedicated Rove task session: work only in this task worktree, and preserve any repo init instructions already delivered to the session.`,`Before finishing, verify the acceptance criteria implied by the story and summarize what changed plus any verification still needed.`,`Then merge the task branch back into the current project's main branch after the worktree is clean and checks pass.`,`When the work lands, run: ${t} issue-set-status --repo . --id ${e.id} --status done`),n.join(`
2
2
  `)}function z(e,t=`rove api`){let n=[`Work on user story #${e.id}: ${e.title}`,``],r=e.body.trim();return r&&n.push(r,``),n.push(`You are working directly in the project checkout — no dedicated worktree or branch was created. Keep changes reviewable and do not switch branches unless asked.`,`Before finishing, verify the acceptance criteria implied by the story and summarize what changed plus any verification still needed.`,`When the work lands, run: ${t} issue-set-status --repo . --id ${e.id} --status done`),n.join(`
3
3
  `)}function B(e,t=`rove api`){return[`Finish user story #${e.id}: ${e.title}`,``,`Verify the acceptance criteria implied by the story, then summarize what changed and any verification still needed.`,`Then merge this task branch back into the current project's main branch after the worktree is clean and checks pass. Resolve conflicts if needed.`,`When the work lands, run: ${t} issue-set-status --repo . --id ${e.id} --status done`].join(`
4
4
  `)}async function V(e,r,i,o){let s=await H(e,r,i,o);a(s);let c=await A().catch(()=>`rove api`);return await t(n(s),s,R(r,c)),{taskId:s}}async function H(e,t,n,r){let a=n?.trim()||await o(),{taskId:s}=await i(`task.create`,{repo:e,title:`#${t.id} ${t.title}`,...a?{vendor:a}:{},...r?.trim()?{effort:r.trim()}:{}});return await O(e,t.id,s).catch(()=>{}),s}async function U(e,n,o={}){let s=o.placement??`task`;if(s===`task`){let{taskId:t}=await V(e,n,o.vendor,o.effort);return{taskId:t,workspaceTaskId:t}}let c=await A().catch(()=>`rove api`),{task:l}=await i(`task.ensureMain`,{repo:e}),u=l.id;if(s===`projectWorktree`){let i=await H(e,n,o.vendor,o.effort);return a(u),await t(r(u,i),i,R(n,c)),{taskId:i,workspaceTaskId:u}}let d=o.vendor?.trim();return d&&await i(`task.setVendor`,{taskId:u,vendor:d}),a(u),await E(e,n.id,`doing`).catch(()=>{}),await t(r(u),u,z(n,c)),{taskId:u,workspaceTaskId:u}}async function W(e,r){let i=await A().catch(()=>`rove api`);await t(n(e),e,B(r,i))}export{d as _,k as a,P as c,W as d,V as f,x as g,D as h,T as i,F as l,U as m,M as n,C as o,L as p,N as r,S as s,j as t,I as u};
@@ -0,0 +1 @@
1
+ import{IssuesPage as e}from"./IssuesPage-BjLRf_cj.js";var t=e;export{t as component};
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/IssueIntakePanel-XYsIcIhp.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/SlideOver-Dxtk6Gn2.js","assets/x-7cB9X7Hi.js","assets/use-focus-trap-DNMrlNR0.js","assets/issues-1SCRkcB0.js","assets/store-uT65Mask.js","assets/active-task-GeQZqbJK.js","assets/settings-tPcmEHCP.js","assets/text-match-DW3sD-Rt.js","assets/RichEditor-DJFl5TvH.js","assets/with-selector-B5R3h-Ow.js","assets/react-dom-DCnDkJvp.js","assets/engines-Cnxy1hW9.js","assets/external-store-DJlWpyYC.js","assets/vendor-CdtpTJrf.js","assets/RichEditor-B4sEOPyN.css","assets/IssuePeek-CP_rAkqO.js","assets/external-link-BwT2u1hD.js"])))=>i.map(i=>d[i]);
2
- import{l as e}from"./terminal-qBEkzc-m.js";import{y as t}from"./tabs-Dx-TnbvG.js";import{d as n,t as r}from"./createLucideIcon-CM5xLVj1.js";import{i,n as a,r as o}from"./store-uT65Mask.js";import{i as s}from"./chips-Da37C4KZ.js";import{o as c}from"./issues-1SCRkcB0.js";var l=r(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),u=r(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),d=e(t(),1);function f(e){let{issueSnapshots:t}=a(),[n,r]=(0,d.useState)({}),[i,s]=(0,d.useState)({}),[l,u]=(0,d.useState)(!1),f=(0,d.useRef)(new Map),p=(0,d.useRef)(new Map),m=(0,d.useRef)(new Map),h=(0,d.useRef)(new Map),g=(0,d.useCallback)(e=>{let t=(f.current.get(e)??0)+1;return f.current.set(e,t),t},[]),_=(0,d.useCallback)((e,t,n=e.repoRoot)=>{t<(p.current.get(n)??0)||(p.current.set(n,t),e.repoRoot&&e.repoRoot!==n&&h.current.set(n,e.repoRoot),r(t=>({...t,[n]:{...e,repoRoot:n}})),s(e=>{if(!(n in e))return e;let{[n]:t,...r}=e;return r}))},[]),v=(0,d.useCallback)(e=>{e.length!==0&&(u(!0),Promise.all(e.map(async e=>{let t=g(e);try{_(await c(e),t,e)}catch(t){s(n=>({...n,[e]:t instanceof Error?t.message:String(t)}))}})).finally(()=>u(!1)))},[g,_]),y=(0,d.useMemo)(()=>[...e].join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/IssueIntakePanel-BN31TW37.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/SlideOver-Dxtk6Gn2.js","assets/x-7cB9X7Hi.js","assets/use-focus-trap-DNMrlNR0.js","assets/issues-BMqItbVN.js","assets/store-BXzqsTjs.js","assets/active-task-CuoFMFoR.js","assets/settings-tPcmEHCP.js","assets/text-match-DW3sD-Rt.js","assets/RichEditor-DJFl5TvH.js","assets/with-selector-B5R3h-Ow.js","assets/react-dom-DCnDkJvp.js","assets/engines-Cnxy1hW9.js","assets/external-store-DJlWpyYC.js","assets/vendor-CdtpTJrf.js","assets/RichEditor-B4sEOPyN.css","assets/IssuePeek-BT8ZmKTT.js","assets/external-link-BwT2u1hD.js"])))=>i.map(i=>d[i]);
2
+ import{l as e}from"./terminal-qBEkzc-m.js";import{y as t}from"./tabs-Dx-TnbvG.js";import{d as n,t as r}from"./createLucideIcon-CM5xLVj1.js";import{i,n as a,r as o}from"./store-BXzqsTjs.js";import{i as s}from"./chips-Da37C4KZ.js";import{o as c}from"./issues-BMqItbVN.js";var l=r(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),u=r(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),d=e(t(),1);function f(e){let{issueSnapshots:t}=a(),[n,r]=(0,d.useState)({}),[i,s]=(0,d.useState)({}),[l,u]=(0,d.useState)(!1),f=(0,d.useRef)(new Map),p=(0,d.useRef)(new Map),m=(0,d.useRef)(new Map),h=(0,d.useRef)(new Map),g=(0,d.useCallback)(e=>{let t=(f.current.get(e)??0)+1;return f.current.set(e,t),t},[]),_=(0,d.useCallback)((e,t,n=e.repoRoot)=>{t<(p.current.get(n)??0)||(p.current.set(n,t),e.repoRoot&&e.repoRoot!==n&&h.current.set(n,e.repoRoot),r(t=>({...t,[n]:{...e,repoRoot:n}})),s(e=>{if(!(n in e))return e;let{[n]:t,...r}=e;return r}))},[]),v=(0,d.useCallback)(e=>{e.length!==0&&(u(!0),Promise.all(e.map(async e=>{let t=g(e);try{_(await c(e),t,e)}catch(t){s(n=>({...n,[e]:t instanceof Error?t.message:String(t)}))}})).finally(()=>u(!1)))},[g,_]),y=(0,d.useMemo)(()=>[...e].join(`
3
3
  `),[e]);return(0,d.useEffect)(()=>{v(y?y.split(`
4
4
  `):[])},[y]),(0,d.useEffect)(()=>{let e=new Map(Object.values(t).map(e=>[o(e.repoRoot),e]));for(let t of y?y.split(`
5
5
  `):[]){let n=h.current.get(t),r=e.get(o(t))??(n?e.get(o(n)):void 0);if(!r||m.current.get(t)===r)continue;m.current.set(t,r);let i=g(t);_(r,i,t)}},[t,y,g,_]),{data:n,failed:i,loading:l,pending:(0,d.useMemo)(()=>(y?y.split(`
6
- `):[]).some(e=>!(e in n)&&!(e in i)),[y,n,i]),refresh:v}}var p=n();function m({issue:e,selected:t=!1,onOpen:n,onDelete:r}){return(0,p.jsxs)(`div`,{className:`group/card relative`,"data-issue-card":e.id,children:[(0,p.jsxs)(`button`,{type:`button`,onClick:n,className:`flex w-full cursor-pointer flex-col gap-1.5 border p-3 text-left transition-colors ${t?`border-primary bg-inset`:`border-line bg-surface hover:border-primary hover:bg-inset`}`,children:[(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px] text-subtle`,children:[`#`,e.id]}),(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] text-fg`,children:e.title})]}),(0,p.jsx)(`div`,{className:`flex items-center gap-2 text-[11px] text-subtle`,children:(0,p.jsx)(`span`,{className:`font-mono`,children:e.created})})]}),(0,p.jsxs)(`div`,{className:`absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/card:opacity-100`,children:[(0,p.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Open issue #${e.id}`,"data-tip":`Open issue detail`,className:`relative flex h-5 w-5 items-center justify-center border border-line bg-surface text-subtle hover:border-primary hover:text-fg ${s}`,children:(0,p.jsx)(l,{size:11,strokeWidth:1.8})}),(0,p.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Delete issue #${e.id}`,"data-tip":`Delete issue`,className:`relative flex h-5 w-5 items-center justify-center border border-line bg-surface text-subtle hover:border-kobe-red/50 hover:text-kobe-red ${s}`,children:(0,p.jsx)(u,{size:11,strokeWidth:1.8})})]})]})}var h=(0,d.lazy)(()=>i(()=>import(`./IssueIntakePanel-XYsIcIhp.js`).then(e=>({default:e.IssueIntakePanel})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))),g=(0,d.lazy)(()=>i(()=>import(`./IssuePeek-CP_rAkqO.js`).then(e=>({default:e.IssuePeek})),__vite__mapDeps([19,1,2,3,20,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])));function _({children:e}){return(0,p.jsx)(d.Suspense,{fallback:(0,p.jsx)(`div`,{className:`fixed inset-0 z-40 flex justify-end`,children:(0,p.jsx)(`div`,{className:`relative flex h-full w-[640px] max-w-[92vw] items-center justify-center border-l border-line bg-bg text-[12px] text-subtle shadow-2xl`,children:`Loading…`})}),children:e})}export{f as a,m as i,h as n,g as r,_ as t};
6
+ `):[]).some(e=>!(e in n)&&!(e in i)),[y,n,i]),refresh:v}}var p=n();function m({issue:e,selected:t=!1,onOpen:n,onDelete:r}){return(0,p.jsxs)(`div`,{className:`group/card relative`,"data-issue-card":e.id,children:[(0,p.jsxs)(`button`,{type:`button`,onClick:n,className:`flex w-full cursor-pointer flex-col gap-1.5 border p-3 text-left transition-colors ${t?`border-primary bg-inset`:`border-line bg-surface hover:border-primary hover:bg-inset`}`,children:[(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px] text-subtle`,children:[`#`,e.id]}),(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] text-fg`,children:e.title})]}),(0,p.jsx)(`div`,{className:`flex items-center gap-2 text-[11px] text-subtle`,children:(0,p.jsx)(`span`,{className:`font-mono`,children:e.created})})]}),(0,p.jsxs)(`div`,{className:`absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/card:opacity-100`,children:[(0,p.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Open issue #${e.id}`,"data-tip":`Open issue detail`,className:`relative flex h-5 w-5 items-center justify-center border border-line bg-surface text-subtle hover:border-primary hover:text-fg ${s}`,children:(0,p.jsx)(l,{size:11,strokeWidth:1.8})}),(0,p.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Delete issue #${e.id}`,"data-tip":`Delete issue`,className:`relative flex h-5 w-5 items-center justify-center border border-line bg-surface text-subtle hover:border-kobe-red/50 hover:text-kobe-red ${s}`,children:(0,p.jsx)(u,{size:11,strokeWidth:1.8})})]})]})}var h=(0,d.lazy)(()=>i(()=>import(`./IssueIntakePanel-BN31TW37.js`).then(e=>({default:e.IssueIntakePanel})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))),g=(0,d.lazy)(()=>i(()=>import(`./IssuePeek-BT8ZmKTT.js`).then(e=>({default:e.IssuePeek})),__vite__mapDeps([19,1,2,3,20,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])));function _({children:e}){return(0,p.jsx)(d.Suspense,{fallback:(0,p.jsx)(`div`,{className:`fixed inset-0 z-40 flex justify-end`,children:(0,p.jsx)(`div`,{className:`relative flex h-full w-[640px] max-w-[92vw] items-center justify-center border-l border-line bg-bg text-[12px] text-subtle shadow-2xl`,children:`Loading…`})}),children:e})}export{f as a,m as i,h as n,g as r,_ as t};
@@ -0,0 +1 @@
1
+ import{AppShell as e}from"./AppShell-ByiYfvCg.js";var t=e;export{t as component};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tabs-Dx-TnbvG.js","assets/terminal-qBEkzc-m.js"])))=>i.map(i=>d[i]);
2
+ import{l as e,o as t}from"./terminal-qBEkzc-m.js";import{u as n,y as r}from"./tabs-Dx-TnbvG.js";import{n as i,s as a}from"./createLucideIcon-CM5xLVj1.js";var o=e(r(),1),s=`modulepreload`,c=function(e){return`/`+e},l={},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=c(t,n),t=u(t),t in l)return;l[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:s,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=`kobe.dispatch.deliveredAt.`;function f(e){try{let t=localStorage.getItem(d+e),n=t?Number.parseInt(t,10):0;return Number.isFinite(n)?n:0}catch{return 0}}function p(e,t){try{localStorage.setItem(d+e,String(t))}catch{}}function m(e,t){return e.at>t}async function h(e,t){if(!m(e,f(e.taskId)))return!1;p(e.taskId,e.at);let n=t?.ensureTab,r=t?.send;if(!n||!r){let e=await u(()=>import(`./tabs-Dx-TnbvG.js`).then(e=>e.g),__vite__mapDeps([0,1])),t=await u(()=>import(`./terminal-qBEkzc-m.js`).then(e=>e.i),[]);n??=e.ensureEngineTab,r??=t.sendPtyText}try{let t=e.tabId??n(e.taskId);return await r(t,e.taskId,e.text),!0}catch(t){return p(e.taskId,e.at-1),console.warn(`[dispatch-delivery] failed to deliver into session`,e.taskId,t),!1}}function g(e){return e.length>1?e.replace(/\/+$/,``):e}function _(e,t){let n=g(t),r=new Set([t]);for(let t of e){let e=g(t.repo),i=g(t.worktreePath);(e===n||i===n)&&(t.repo&&r.add(t.repo),t.worktreePath&&r.add(t.worktreePath))}return[...r]}function v(e,t){let n=new Set;for(let e of t)e.repo&&n.add(g(e.repo)),e.worktreePath&&n.add(g(e.worktreePath));let r=Object.entries(e).filter(([e])=>n.has(g(e)));return r.length===Object.keys(e).length?e:Object.fromEntries(r)}function y(e={}){let n=e.path??`/api/rpc`,r=e.post??t.post.bind(t);return{async request(e,t){return(await r(n,{name:e,payload:t},{label:`rpc ${e}`})).result}}}var b=y(),x={tasks:[],activeTaskId:null,engineStates:{},update:null,jobs:{},worktreeChanges:{},issueSnapshots:{},deliver:null,uiPrefs:null,hydrated:!1,daemonConnected:!1,streamConnected:!1},S=new Set;function C(e){x={...x,...e};for(let e of S)e()}function w(e,t){let n=Object.entries(e).filter(([e])=>t.has(e));return n.length===Object.keys(e).length?e:Object.fromEntries(n)}function T(e,t){return!e&&t===`idle`}function E(e,t){if(t.phase===`running`)return{...e,[t.taskId]:t};let{[t.taskId]:n,...r}=e;return r}function D(e,t,n){let r={...e};for(let e of _(t,n.repoRoot))r[e]={...n,repoRoot:e};return r}function O(e){let t=new Set(e.map(e=>e.id));C({tasks:e,engineStates:w(x.engineStates,t),jobs:w(x.jobs,t),issueSnapshots:v(x.issueSnapshots,e)}),n(t)}function k(e){switch(e.channel){case`task.snapshot`:O(e.payload.tasks);break;case`active-task`:C({activeTaskId:e.payload.taskId});break;case`engine-state`:{let t=x.engineStates[e.payload.taskId]?.state,n=x.tasks.find(t=>t.id===e.payload.taskId);if(T(n,e.payload.state))break;a(e.payload.taskId,n?.title||n?.branch||e.payload.taskId,t,e.payload.state),C({engineStates:{...x.engineStates,[e.payload.taskId]:e.payload}});break}case`update`:C({update:e.payload.info});break;case`task.jobs`:C({jobs:E(x.jobs,e.payload)});break;case`worktree.changes`:C({worktreeChanges:e.payload.changes});break;case`issue.snapshot`:C({issueSnapshots:D(x.issueSnapshots,x.tasks,e.payload)});break;case`session.deliver`:C({deliver:e.payload}),h(e.payload);break;case`ui-prefs`:C({uiPrefs:e.payload}),i(e.payload.theme);break}}function A(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function j(e){if(!A(e)||!Array.isArray(e.tasks)||typeof e.activeTaskId!=`string`&&e.activeTaskId!==null||!A(e.engineStates)||typeof e.connected!=`boolean`)return null;for(let t of[`jobs`,`worktreeChanges`,`issueSnapshots`])if(e[t]!==void 0&&!A(e[t]))return null;return e.uiPrefs!==void 0&&e.uiPrefs!==null&&!A(e.uiPrefs)?null:e}function M(e){return Math.min(1e4,500*2**Math.max(0,e))}var N=null,P=0,F=null;function I(e){return e!==null&&e.readyState!==EventSource.CLOSED}function L(e){P=0,C({tasks:e.tasks,activeTaskId:e.activeTaskId,engineStates:e.engineStates,update:e.update,jobs:e.jobs??{},worktreeChanges:e.worktreeChanges??{},issueSnapshots:e.issueSnapshots??{},deliver:e.deliver??null,uiPrefs:e.uiPrefs??null,hydrated:!0,daemonConnected:e.connected,streamConnected:!0}),e.uiPrefs&&i(e.uiPrefs.theme),e.connected&&e.deliver&&h(e.deliver),e.connected&&n(new Set(e.tasks.map(e=>e.id)))}function R(){if(F!==null)return;let e=M(P);P+=1,F=setTimeout(()=>{F=null,S.size>0&&z()},e)}function z(){I(N)||(N=new EventSource(`/events`),N.addEventListener(`open`,()=>{P=0,C({streamConnected:!0})}),N.addEventListener(`snapshot`,e=>{let t;try{t=JSON.parse(e.data)}catch{console.warn(`[store] dropped unparseable snapshot frame`);return}let n=j(t);if(!n){console.warn(`[store] dropped malformed snapshot frame`);return}L(n)}),N.addEventListener(`channel`,e=>{let t;try{t=JSON.parse(e.data)}catch{console.warn(`[store] dropped unparseable channel frame`);return}if(!A(t)||typeof t.channel!=`string`){console.warn(`[store] dropped malformed channel frame`);return}k(t),x.daemonConnected||C({daemonConnected:!0})}),N.addEventListener(`error`,()=>{C({streamConnected:!1}),N&&N.readyState===EventSource.CLOSED&&(N.close(),N=null,R())}))}function B(e){return z(),S.add(e),()=>{S.delete(e)}}function V(){return x}function H(){return(0,o.useSyncExternalStore)(B,V,V)}async function U(e,t){return b.request(e,t)}export{u as i,H as n,g as r,U as t};
@@ -1 +1 @@
1
- import{l as e}from"./terminal-qBEkzc-m.js";import{_ as t,f as n,y as r}from"./tabs-Dx-TnbvG.js";import{t as i}from"./task._taskId-BlZ0vG_1.js";import{d as a}from"./createLucideIcon-CM5xLVj1.js";import{n as o}from"./active-task-GeQZqbJK.js";import{AppShell as s}from"./AppShell-BTjvuY-t.js";var c=e(r()),l=a();function u(){let{taskId:e}=i.useParams(),{selectedTaskId:r}=t();return(0,c.useEffect)(()=>{!e||e===r||(n(e),o(e))},[e,r]),(0,l.jsx)(s,{})}export{u as component};
1
+ import{l as e}from"./terminal-qBEkzc-m.js";import{_ as t,f as n,y as r}from"./tabs-Dx-TnbvG.js";import{t as i}from"./task._taskId-EQWWNO2k.js";import{d as a}from"./createLucideIcon-CM5xLVj1.js";import{n as o}from"./active-task-CuoFMFoR.js";import{AppShell as s}from"./AppShell-ByiYfvCg.js";var c=e(r()),l=a();function u(){let{taskId:e}=i.useParams(),{selectedTaskId:r}=t();return(0,c.useEffect)(()=>{!e||e===r||(n(e),o(e))},[e,r]),(0,l.jsx)(s,{})}export{u as component};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/task._taskId-BmObFoVZ.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/active-task-GeQZqbJK.js","assets/store-uT65Mask.js","assets/AppShell-BTjvuY-t.js","assets/toast-BXjAT0ix.js","assets/external-store-DJlWpyYC.js","assets/ViewToggle-BdPCMBWa.js","assets/columns-3-CQGAnX-4.js","assets/with-selector-B5R3h-Ow.js","assets/x-7cB9X7Hi.js","assets/web-transport-D0bugxxv.js","assets/triage-7QLsCY8d.js","assets/use-focus-trap-DNMrlNR0.js","assets/engines-Cnxy1hW9.js","assets/settings-tPcmEHCP.js","assets/vendor-CdtpTJrf.js","assets/WorkspaceTabs-CMKlvN_Y.js","assets/ChatTranscript-DLthbnmB.js","assets/rotate-cw-D-UUtiD0.js","assets/search-BxbFZoup.js","assets/time-kviT26Tm.js","assets/WorkspaceTabs-DLzL-Tad.css","assets/SettingsPage-CLRhr-sg.js","assets/plus-BbX5qXba.js","assets/activity-BjTd1D8q.js","assets/ConfirmDialog-CDPOtXww.js","assets/desktop-BThq9eSR.js","assets/text-match-DW3sD-Rt.js","assets/SlideOver-Dxtk6Gn2.js","assets/chips-Da37C4KZ.js","assets/AppShell-HiyATJse.css"])))=>i.map(i=>d[i]);
2
- import{l as e}from"./terminal-qBEkzc-m.js";import{y as t}from"./tabs-Dx-TnbvG.js";import{d as n,g as r,h as i,i as a,n as o,o as s,p as c,v as l}from"./columns-3-CQGAnX-4.js";import{d as u}from"./createLucideIcon-CM5xLVj1.js";import{a as d,o as f}from"./toast-BXjAT0ix.js";import{t as p}from"./react-dom-DCnDkJvp.js";import{i as m}from"./store-uT65Mask.js";var h=e(t(),1),g=h.use,_=typeof window<`u`?h.useLayoutEffect:h.useEffect;function v(e){let t=h.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function y(e,t,n={},r={}){h.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function b(e){let t=h.useRef(null);return h.useImperativeHandle(e,()=>t.current,[]),t}function x(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var S=4,ee=5;function te(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function C(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=te(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function w(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=C(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=D(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=D(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=O(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=D(n.fullPath??n.from);e.kind=ee,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=D(n.fullPath??n.from);e.kind=S,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)w(e,t,r,s,i,a,o)}function T(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function E(e){if(e.pathless)for(let t of e.pathless)E(t);if(e.static)for(let t of e.static.values())E(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())E(t);if(e.dynamic?.length){e.dynamic.sort(T);for(let t of e.dynamic)E(t)}if(e.optional?.length){e.optional.sort(T);for(let t of e.optional)E(t)}if(e.wildcard?.length){e.wildcard.sort(T);for(let t of e.wildcard)E(t)}}function D(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function O(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function k(e,t){let n=D(`/`),r=new Uint16Array(6);for(let t of e)w(!1,r,t,1,n,0);E(n),t.masksTree=n,t.flatCache=x(1e3)}function A(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ie(e,t.masksTree);return t.flatCache.set(e,r),r}function j(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=D(`/`),w(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ie(r,o,n)}function M(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ie(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=oe(a.route)),t.matchCache.set(r,a),a}function ne(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function re(e,t=!1,n){let r=D(e.fullPath),i=new Uint16Array(6),a={},o={},c=0;return w(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in a&&s(),a[e.id]=e,c!==0&&e.path){let t=ne(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}c++}),E(r),{processedTree:{segmentTree:r,singleCache:x(1e3),matchCache:x(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ie(e,t,n=!1){let r=e.split(`/`),i=ce(e,r,t,n);if(!i)return null;let[a]=ae(e,r,i);return{route:i.node.route,rawParams:a}}function ae(e,t,n){let r=se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===S)break;if(u.kind===ee){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function oe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!P(u,n))continue;if(i.parse){if(!ue(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==S&&P(c,n)&&(c=n);let v=l===o;if(v&&(i.route&&(!a||i.kind===S||i.kind===2)&&P(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[l],b;if(v&&i.index){let n={node:i.index,index:l,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(ue(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&le(p,o))return n;P(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(l).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:l,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:l+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+N(o,l),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:l+1,skipped:d,depth:f+1,statics:p,dynamics:m+N(o,l),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:l,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function N(e,t){return 2**(e-t-1)}function le(e,t){return e===2**(t-1)-1}function ue(e,t,n){let r,i;try{[r,i]=ae(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function P(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===S)>(e.node.kind===S)||t.node.kind===S==(e.node.kind===S)&&t.depth>e.depth)))}function F(e){return I(e.filter(e=>e!==void 0).join(`/`))}function I(e){return e.replace(/\/{2,}/g,`/`)}function L(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function de(e){return R(L(e))}function z(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function fe(e,t,n){return z(e,n)===z(t,n)}function pe({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&l(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(l(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=I(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function B(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function V(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>U(e,n)).join(`/`):U(r,n):r}function H({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=C(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=V(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function U(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var W=`__root__`;function G(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function me(e){return e instanceof Response&&!!e.options}var he=`Error preloading route! ☝️`,ge=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=W:this.parentRoute||s();let r=n?W:t?.path;r&&r!==`/`&&(r=L(r));let i=t?.id||r,a=n?W:F([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=F([`/`,a]));let o=a===`__root__`?`/`:F([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>G({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},_e=class extends ge{constructor(e){super(e)}},K=u();function q({children:e,fallback:t=null}){return ve()?(0,K.jsx)(h.Fragment,{children:e}):(0,K.jsx)(h.Fragment,{children:t})}function ve(){return h.useSyncExternalStore(J,()=>!0,()=>!1)}function J(){return()=>{}}function Y(e){return o({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ye(e){let{select:t,...n}=e;return o({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function X(e){return o({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function be(e){return o({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Z(e){return o({...e,select:t=>e.select?e.select(t.context):t.context})}var xe=e(p(),1);function Se(e,t){let r=f(),o=b(t),{activeProps:s,inactiveProps:l,activeOptions:u,to:d,preload:p,preloadDelay:m,preloadIntentProximity:g,hashScrollIntoView:_,replace:v,startTransition:x,resetScroll:S,viewTransition:ee,children:te,target:C,disabled:w,style:T,className:E,onClick:D,onBlur:O,onFocus:k,onMouseEnter:A,onMouseLeave:j,onTouchStart:M,ignoreBlocker:ne,params:re,search:ie,hash:ae,state:oe,mask:se,reloadDocument:ce,unsafeRelative:N,from:le,_fromLocation:ue,...P}=e,F=ve(),I=h.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),L=a(r.stores.location,e=>e,(e,t)=>e.href===t.href),R=h.useMemo(()=>{let e={_fromLocation:L,...I};return r.buildLocation(e)},[r,L,I]),de=R.maskedLocation?R.maskedLocation.publicHref:R.publicHref,pe=R.maskedLocation?R.maskedLocation.external:R.external,B=h.useMemo(()=>ke(de,pe,r.history,w),[w,pe,de,r.history]),V=h.useMemo(()=>{if(B?.external)return i(B.href,r.protocolAllowlist)?void 0:B.href;if(!Ae(d)&&!(typeof d!=`string`||d.indexOf(`:`)===-1))try{return new URL(d),i(d,r.protocolAllowlist)?void 0:d}catch{}},[d,B,r.protocolAllowlist]),H=h.useMemo(()=>{if(V)return!1;if(u?.exact){if(!fe(L.pathname,R.pathname,r.basepath))return!1}else{let e=z(L.pathname,r.basepath),t=z(R.pathname,r.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(u?.includeSearch??!0)&&!n(L.search,R.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:!u?.includeHash||F&&L.hash===R.hash},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,L,V,F,R.hash,R.pathname,R.search,r.basepath]),U=H?c(s,{})??we:Ce,W=H?Ce:c(l,{})??Ce,G=[E,U.className,W.className].filter(Boolean).join(` `),me=(T||U.style||W.style)&&{...T,...U.style,...W.style},[ge,_e]=h.useState(!1),K=h.useRef(!1),q=e.reloadDocument||V?!1:p??r.options.defaultPreload,J=m??r.options.defaultPreloadDelay??0,Y=h.useCallback(()=>{r.preloadRoute({...I,_builtLocation:R}).catch(e=>{console.warn(e),console.warn(he)})},[r,I,R]);y(o,h.useCallback(e=>{e?.isIntersecting&&Y()},[Y]),Oe,{disabled:!!w||q!==`viewport`}),h.useEffect(()=>{K.current||!w&&q===`render`&&(Y(),K.current=!0)},[w,Y,q]);let ye=e=>{let t=e.currentTarget.getAttribute(`target`),n=C===void 0?t:C;if(!w&&!Me(e)&&!e.defaultPrevented&&(!n||n===`_self`)&&e.button===0){e.preventDefault(),(0,xe.flushSync)(()=>{_e(!0)});let t=r.subscribe(`onResolved`,()=>{t(),_e(!1)});r.navigate({...I,replace:v,resetScroll:S,hashScrollIntoView:_,startTransition:x,viewTransition:ee,ignoreBlocker:ne})}};if(V)return{...P,ref:o,href:V,...te&&{children:te},...C&&{target:C},...w&&{disabled:w},...T&&{style:T},...E&&{className:E},...D&&{onClick:D},...O&&{onBlur:O},...k&&{onFocus:k},...A&&{onMouseEnter:A},...j&&{onMouseLeave:j},...M&&{onTouchStart:M}};let X=e=>{if(w||q!==`intent`)return;if(!J){Y();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),Y()},J);Q.set(t,n)},be=e=>{w||q!==`intent`||Y()},Z=e=>{if(w||!q||!J)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...P,...U,...W,href:B?.href,ref:o,onClick:$([D,ye]),onBlur:$([O,Z]),onFocus:$([k,X]),onMouseEnter:$([A,X]),onMouseLeave:$([j,Z]),onTouchStart:$([M,be]),disabled:!!w,target:C,...me&&{style:me},...G&&{className:G},...w&&Te,...H&&Ee,...F&&ge&&De}}var Ce={},we={className:`active`},Te={role:`link`,"aria-disabled":!0},Ee={"data-status":`active`,"aria-current":`page`},De={"data-transitioning":`transitioning`},Q=new WeakMap,Oe={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ke(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ae(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var je=h.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Se(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return h.createElement(`a`,t,o)}return h.createElement(n,a,o)});function Me(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ne=class extends ge{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Pe(e){return new Ne(e)}var Fe=class extends _e{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Ie(e){return new Fe(e)}function Le(e){return new Re(e,{silent:!0}).createRoute}var Re=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=Pe(e);return t.isRoot=!1,t},this.silent=t?.silent}};function ze(e,t){let n,i,a,o,s=()=>(n||=e().then(e=>{n=void 0,i=e[t??`default`]}).catch(e=>{if(a=e,r(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(g)g(s());else throw s();return h.createElement(i,e)};return c.preload=s,c}var Be=Le(`/task/$taskId`)({component:ze(()=>m(()=>import(`./task._taskId-BmObFoVZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),`component`)});export{_ as C,x as S,A as _,q as a,k as b,W as c,H as d,F as f,oe as g,R as h,Ie as i,I as l,de as m,ze as n,me as o,pe as p,Le as r,G as s,Be as t,B as u,M as v,v as w,re as x,j as y};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/task._taskId-BuwKbKaG.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/active-task-CuoFMFoR.js","assets/store-BXzqsTjs.js","assets/AppShell-ByiYfvCg.js","assets/toast-BXjAT0ix.js","assets/external-store-DJlWpyYC.js","assets/ViewToggle-BHBzWlni.js","assets/columns-3-CQGAnX-4.js","assets/with-selector-B5R3h-Ow.js","assets/x-7cB9X7Hi.js","assets/web-transport-D0bugxxv.js","assets/triage-DDohuPMh.js","assets/use-focus-trap-DNMrlNR0.js","assets/engines-Cnxy1hW9.js","assets/settings-tPcmEHCP.js","assets/vendor-CdtpTJrf.js","assets/WorkspaceTabs-kqzy_Dsf.js","assets/ChatTranscript-Co0UhezW.js","assets/rotate-cw-D-UUtiD0.js","assets/search-BxbFZoup.js","assets/time-kviT26Tm.js","assets/WorkspaceTabs-DLzL-Tad.css","assets/SettingsPage-CLRhr-sg.js","assets/plus-BbX5qXba.js","assets/activity-BjTd1D8q.js","assets/ConfirmDialog-D-NILtP0.js","assets/desktop-CFge7SbS.js","assets/text-match-DW3sD-Rt.js","assets/SlideOver-Dxtk6Gn2.js","assets/chips-Da37C4KZ.js","assets/AppShell-HiyATJse.css"])))=>i.map(i=>d[i]);
2
+ import{l as e}from"./terminal-qBEkzc-m.js";import{y as t}from"./tabs-Dx-TnbvG.js";import{d as n,g as r,h as i,i as a,n as o,o as s,p as c,v as l}from"./columns-3-CQGAnX-4.js";import{d as u}from"./createLucideIcon-CM5xLVj1.js";import{a as d,o as f}from"./toast-BXjAT0ix.js";import{t as p}from"./react-dom-DCnDkJvp.js";import{i as m}from"./store-BXzqsTjs.js";var h=e(t(),1),g=h.use,_=typeof window<`u`?h.useLayoutEffect:h.useEffect;function v(e){let t=h.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function y(e,t,n={},r={}){h.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function b(e){let t=h.useRef(null);return h.useImperativeHandle(e,()=>t.current,[]),t}function x(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var S=4,ee=5;function te(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function C(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=te(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function w(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=C(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=D(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=D(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=O(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=D(n.fullPath??n.from);e.kind=ee,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=D(n.fullPath??n.from);e.kind=S,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)w(e,t,r,s,i,a,o)}function T(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function E(e){if(e.pathless)for(let t of e.pathless)E(t);if(e.static)for(let t of e.static.values())E(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())E(t);if(e.dynamic?.length){e.dynamic.sort(T);for(let t of e.dynamic)E(t)}if(e.optional?.length){e.optional.sort(T);for(let t of e.optional)E(t)}if(e.wildcard?.length){e.wildcard.sort(T);for(let t of e.wildcard)E(t)}}function D(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function O(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function k(e,t){let n=D(`/`),r=new Uint16Array(6);for(let t of e)w(!1,r,t,1,n,0);E(n),t.masksTree=n,t.flatCache=x(1e3)}function A(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ie(e,t.masksTree);return t.flatCache.set(e,r),r}function j(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=D(`/`),w(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ie(r,o,n)}function M(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ie(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=oe(a.route)),t.matchCache.set(r,a),a}function ne(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function re(e,t=!1,n){let r=D(e.fullPath),i=new Uint16Array(6),a={},o={},c=0;return w(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in a&&s(),a[e.id]=e,c!==0&&e.path){let t=ne(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}c++}),E(r),{processedTree:{segmentTree:r,singleCache:x(1e3),matchCache:x(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ie(e,t,n=!1){let r=e.split(`/`),i=ce(e,r,t,n);if(!i)return null;let[a]=ae(e,r,i);return{route:i.node.route,rawParams:a}}function ae(e,t,n){let r=se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===S)break;if(u.kind===ee){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function oe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!P(u,n))continue;if(i.parse){if(!ue(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==S&&P(c,n)&&(c=n);let v=l===o;if(v&&(i.route&&(!a||i.kind===S||i.kind===2)&&P(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[l],b;if(v&&i.index){let n={node:i.index,index:l,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(ue(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&le(p,o))return n;P(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(l).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:l,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:l+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+N(o,l),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:l+1,skipped:d,depth:f+1,statics:p,dynamics:m+N(o,l),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:l,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function N(e,t){return 2**(e-t-1)}function le(e,t){return e===2**(t-1)-1}function ue(e,t,n){let r,i;try{[r,i]=ae(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function P(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===S)>(e.node.kind===S)||t.node.kind===S==(e.node.kind===S)&&t.depth>e.depth)))}function F(e){return I(e.filter(e=>e!==void 0).join(`/`))}function I(e){return e.replace(/\/{2,}/g,`/`)}function L(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function de(e){return R(L(e))}function z(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function fe(e,t,n){return z(e,n)===z(t,n)}function pe({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&l(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(l(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=I(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function B(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function V(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>U(e,n)).join(`/`):U(r,n):r}function H({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=C(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=V(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function U(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var W=`__root__`;function G(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function me(e){return e instanceof Response&&!!e.options}var he=`Error preloading route! ☝️`,ge=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=W:this.parentRoute||s();let r=n?W:t?.path;r&&r!==`/`&&(r=L(r));let i=t?.id||r,a=n?W:F([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=F([`/`,a]));let o=a===`__root__`?`/`:F([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>G({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},_e=class extends ge{constructor(e){super(e)}},K=u();function q({children:e,fallback:t=null}){return ve()?(0,K.jsx)(h.Fragment,{children:e}):(0,K.jsx)(h.Fragment,{children:t})}function ve(){return h.useSyncExternalStore(J,()=>!0,()=>!1)}function J(){return()=>{}}function Y(e){return o({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ye(e){let{select:t,...n}=e;return o({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function X(e){return o({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function be(e){return o({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Z(e){return o({...e,select:t=>e.select?e.select(t.context):t.context})}var xe=e(p(),1);function Se(e,t){let r=f(),o=b(t),{activeProps:s,inactiveProps:l,activeOptions:u,to:d,preload:p,preloadDelay:m,preloadIntentProximity:g,hashScrollIntoView:_,replace:v,startTransition:x,resetScroll:S,viewTransition:ee,children:te,target:C,disabled:w,style:T,className:E,onClick:D,onBlur:O,onFocus:k,onMouseEnter:A,onMouseLeave:j,onTouchStart:M,ignoreBlocker:ne,params:re,search:ie,hash:ae,state:oe,mask:se,reloadDocument:ce,unsafeRelative:N,from:le,_fromLocation:ue,...P}=e,F=ve(),I=h.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),L=a(r.stores.location,e=>e,(e,t)=>e.href===t.href),R=h.useMemo(()=>{let e={_fromLocation:L,...I};return r.buildLocation(e)},[r,L,I]),de=R.maskedLocation?R.maskedLocation.publicHref:R.publicHref,pe=R.maskedLocation?R.maskedLocation.external:R.external,B=h.useMemo(()=>ke(de,pe,r.history,w),[w,pe,de,r.history]),V=h.useMemo(()=>{if(B?.external)return i(B.href,r.protocolAllowlist)?void 0:B.href;if(!Ae(d)&&!(typeof d!=`string`||d.indexOf(`:`)===-1))try{return new URL(d),i(d,r.protocolAllowlist)?void 0:d}catch{}},[d,B,r.protocolAllowlist]),H=h.useMemo(()=>{if(V)return!1;if(u?.exact){if(!fe(L.pathname,R.pathname,r.basepath))return!1}else{let e=z(L.pathname,r.basepath),t=z(R.pathname,r.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(u?.includeSearch??!0)&&!n(L.search,R.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:!u?.includeHash||F&&L.hash===R.hash},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,L,V,F,R.hash,R.pathname,R.search,r.basepath]),U=H?c(s,{})??we:Ce,W=H?Ce:c(l,{})??Ce,G=[E,U.className,W.className].filter(Boolean).join(` `),me=(T||U.style||W.style)&&{...T,...U.style,...W.style},[ge,_e]=h.useState(!1),K=h.useRef(!1),q=e.reloadDocument||V?!1:p??r.options.defaultPreload,J=m??r.options.defaultPreloadDelay??0,Y=h.useCallback(()=>{r.preloadRoute({...I,_builtLocation:R}).catch(e=>{console.warn(e),console.warn(he)})},[r,I,R]);y(o,h.useCallback(e=>{e?.isIntersecting&&Y()},[Y]),Oe,{disabled:!!w||q!==`viewport`}),h.useEffect(()=>{K.current||!w&&q===`render`&&(Y(),K.current=!0)},[w,Y,q]);let ye=e=>{let t=e.currentTarget.getAttribute(`target`),n=C===void 0?t:C;if(!w&&!Me(e)&&!e.defaultPrevented&&(!n||n===`_self`)&&e.button===0){e.preventDefault(),(0,xe.flushSync)(()=>{_e(!0)});let t=r.subscribe(`onResolved`,()=>{t(),_e(!1)});r.navigate({...I,replace:v,resetScroll:S,hashScrollIntoView:_,startTransition:x,viewTransition:ee,ignoreBlocker:ne})}};if(V)return{...P,ref:o,href:V,...te&&{children:te},...C&&{target:C},...w&&{disabled:w},...T&&{style:T},...E&&{className:E},...D&&{onClick:D},...O&&{onBlur:O},...k&&{onFocus:k},...A&&{onMouseEnter:A},...j&&{onMouseLeave:j},...M&&{onTouchStart:M}};let X=e=>{if(w||q!==`intent`)return;if(!J){Y();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),Y()},J);Q.set(t,n)},be=e=>{w||q!==`intent`||Y()},Z=e=>{if(w||!q||!J)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...P,...U,...W,href:B?.href,ref:o,onClick:$([D,ye]),onBlur:$([O,Z]),onFocus:$([k,X]),onMouseEnter:$([A,X]),onMouseLeave:$([j,Z]),onTouchStart:$([M,be]),disabled:!!w,target:C,...me&&{style:me},...G&&{className:G},...w&&Te,...H&&Ee,...F&&ge&&De}}var Ce={},we={className:`active`},Te={role:`link`,"aria-disabled":!0},Ee={"data-status":`active`,"aria-current":`page`},De={"data-transitioning":`transitioning`},Q=new WeakMap,Oe={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ke(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ae(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var je=h.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Se(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return h.createElement(`a`,t,o)}return h.createElement(n,a,o)});function Me(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ne=class extends ge{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Pe(e){return new Ne(e)}var Fe=class extends _e{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Ie(e){return new Fe(e)}function Le(e){return new Re(e,{silent:!0}).createRoute}var Re=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=Pe(e);return t.isRoot=!1,t},this.silent=t?.silent}};function ze(e,t){let n,i,a,o,s=()=>(n||=e().then(e=>{n=void 0,i=e[t??`default`]}).catch(e=>{if(a=e,r(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(g)g(s());else throw s();return h.createElement(i,e)};return c.preload=s,c}var Be=Le(`/task/$taskId`)({component:ze(()=>m(()=>import(`./task._taskId-BuwKbKaG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),`component`)});export{_ as C,x as S,A as _,q as a,k as b,W as c,H as d,F as f,oe as g,R as h,Ie as i,I as l,de as m,ze as n,me as o,pe as p,Le as r,G as s,Be as t,B as u,M as v,v as w,re as x,j as y};
@@ -1 +1 @@
1
- import{l as e}from"./terminal-qBEkzc-m.js";import{f as t,m as n,n as r,y as i}from"./tabs-Dx-TnbvG.js";import{d as a,t as o}from"./createLucideIcon-CM5xLVj1.js";import{a as s,n as c,r as l}from"./toast-BXjAT0ix.js";import{n as u,t as d}from"./store-uT65Mask.js";import{n as f}from"./active-task-GeQZqbJK.js";import{t as p}from"./external-store-DJlWpyYC.js";import{t as m}from"./use-focus-trap-DNMrlNR0.js";import{t as h}from"./engines-Cnxy1hW9.js";import{t as g}from"./settings-tPcmEHCP.js";import{n as _}from"./vendor-CdtpTJrf.js";var v=p({paletteOpen:!1,helpOpen:!1,newTaskOpen:!1,settingsOpen:!1});function y(){return v.useSnapshot()}function b(){v.update(e=>({...e,paletteOpen:!1}))}function x(){v.update(e=>({...e,paletteOpen:!e.paletteOpen}))}function S(){v.update(e=>({...e,helpOpen:!0}))}function C(){v.update(e=>({...e,helpOpen:!1}))}function w(){v.update(e=>({...e,newTaskOpen:!0}))}function T(){v.update(e=>({...e,newTaskOpen:!1}))}function E(){v.update(e=>({...e,settingsOpen:!0}))}function D(){v.update(e=>({...e,settingsOpen:!1}))}var O=o(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),k=e(i(),1),A=a();function j({children:e}){return(0,A.jsx)(`div`,{className:`mb-1 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e})}var M=`w-full border border-line bg-bg px-2 py-1.5 text-[12px] text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`;function N({onClose:e}){let{tasks:i}=u(),a=h(),o=s(),p=(0,k.useRef)(null);m(p);let v=(0,k.useMemo)(()=>{let e=new Set,t=[];for(let n of i){let r=n.repo;r&&!e.has(r)&&(e.add(r),t.push(r))}return t.sort()},[i]),[y,b]=(0,k.useState)(v[0]??``),[x,S]=(0,k.useState)(!1),[C,w]=(0,k.useState)(``),[T,E]=(0,k.useState)(``),[D,O]=(0,k.useState)(``),[N,P]=(0,k.useState)(a[0]?.id??`claude`),[F,I]=(0,k.useState)(!1),[L,R]=(0,k.useState)(``),[z,B]=(0,k.useState)(!1),V=y.trim().length>0&&!z;(0,k.useEffect)(()=>{let e=!1;return g().then(t=>{e||!t||F||P(t)}),()=>{e=!0}},[F]);let H=async()=>{if(V){B(!0);try{let i={repo:y.trim()};C.trim()&&(i.title=C.trim()),T.trim()&&(i.branch=T.trim()),D.trim()&&(i.baseRef=D.trim()),N&&(i.vendor=N);let{taskId:a,task:s}=await d(`task.create`,i);t(a);let l=L.trim();l&&(n(a,l),r(a)),o({to:`/task/$taskId`,params:{taskId:a}}),f(a),c(`success`,`Task created: ${s?.title||s?.branch||a}`),e()}catch(e){l(`create task`,e)}finally{B(!1)}}};return(0,A.jsx)(`div`,{className:`fixed inset-0 z-40 flex items-center justify-center bg-black/60`,onClick:e,onKeyDown:t=>{t.key===`Escape`&&e()},role:`presentation`,children:(0,A.jsxs)(`div`,{ref:p,role:`dialog`,"aria-modal":`true`,"aria-label":`New task`,className:`w-[28rem] max-w-[calc(100vw-2rem)] border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,A.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`New Task`}),(0,A.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`worktree + engine session`})]}),(0,A.jsxs)(`form`,{className:`space-y-3 px-3 py-3`,onSubmit:e=>{e.preventDefault(),H()},children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Repo`}),v.length>0&&!x?(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsx)(`select`,{value:y,onChange:e=>b(e.target.value),className:`${M} min-w-0 flex-1`,children:v.map(e=>(0,A.jsx)(`option`,{value:e,children:e},e))}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>{S(!0),b(``)},className:`shrink-0 border border-line bg-bg px-2 text-[11px] text-muted hover:border-primary hover:text-fg`,title:`Type a repo path instead`,children:`path…`})]}):(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsx)(`input`,{value:y,onChange:e=>b(e.target.value),placeholder:`/absolute/path/to/repo`,className:`${M} min-w-0 flex-1 font-mono`}),v.length>0&&(0,A.jsx)(`button`,{type:`button`,onClick:()=>{S(!1),b(v[0]??``)},className:`shrink-0 border border-line bg-bg px-2 text-[11px] text-muted hover:border-primary hover:text-fg`,title:`Pick a known repo`,children:`list`})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Title`}),(0,A.jsx)(`input`,{value:C,onChange:e=>w(e.target.value),placeholder:`optional — auto-titled from the first message`,className:M})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Branch`}),(0,A.jsx)(`input`,{value:T,onChange:e=>E(e.target.value),placeholder:`auto`,className:`${M} font-mono`})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Base ref`}),(0,A.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),placeholder:`default branch`,className:`${M} font-mono`})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Engine`}),(0,A.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:a.map(e=>(0,A.jsx)(`button`,{type:`button`,onClick:()=>{I(!0),P(e.id)},className:`border px-2 py-1 text-[11px] transition-colors ${N===e.id?`border-primary bg-inset text-fg`:`border-line bg-bg text-muted hover:border-primary hover:text-fg`}`,children:_(a,e.id)},e.id))})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`First prompt`}),(0,A.jsx)(`textarea`,{value:L,onChange:e=>R(e.target.value),placeholder:`optional — waits in the engine composer, ready to send`,rows:2,className:`${M} resize-none`})]}),(0,A.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-line pt-3`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:e,className:`border border-line bg-bg px-3 py-1.5 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Cancel`}),(0,A.jsx)(`button`,{type:`submit`,disabled:!V,className:`border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10 disabled:opacity-40`,children:z?`Creating…`:`Create task`})]})]})]})})}function P(e,t){let n=e?.state;return n===`waiting_permission`||n===`error`||n===`rate_limited`?`attention`:n===`running`?`working`:t&&(t.added>0||t.deleted>0)?`changes`:`quiet`}function F(e,t,n){return n===`all`||P(e,t)===n}export{b as a,D as c,E as d,x as f,O as i,S as l,P as n,C as o,y as p,N as r,T as s,F as t,w as u};
1
+ import{l as e}from"./terminal-qBEkzc-m.js";import{f as t,m as n,n as r,y as i}from"./tabs-Dx-TnbvG.js";import{d as a,t as o}from"./createLucideIcon-CM5xLVj1.js";import{a as s,n as c,r as l}from"./toast-BXjAT0ix.js";import{n as u,t as d}from"./store-BXzqsTjs.js";import{n as f}from"./active-task-CuoFMFoR.js";import{t as p}from"./external-store-DJlWpyYC.js";import{t as m}from"./use-focus-trap-DNMrlNR0.js";import{t as h}from"./engines-Cnxy1hW9.js";import{t as g}from"./settings-tPcmEHCP.js";import{n as _}from"./vendor-CdtpTJrf.js";var v=p({paletteOpen:!1,helpOpen:!1,newTaskOpen:!1,settingsOpen:!1});function y(){return v.useSnapshot()}function b(){v.update(e=>({...e,paletteOpen:!1}))}function x(){v.update(e=>({...e,paletteOpen:!e.paletteOpen}))}function S(){v.update(e=>({...e,helpOpen:!0}))}function C(){v.update(e=>({...e,helpOpen:!1}))}function w(){v.update(e=>({...e,newTaskOpen:!0}))}function T(){v.update(e=>({...e,newTaskOpen:!1}))}function E(){v.update(e=>({...e,settingsOpen:!0}))}function D(){v.update(e=>({...e,settingsOpen:!1}))}var O=o(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),k=e(i(),1),A=a();function j({children:e}){return(0,A.jsx)(`div`,{className:`mb-1 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e})}var M=`w-full border border-line bg-bg px-2 py-1.5 text-[12px] text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`;function N({onClose:e}){let{tasks:i}=u(),a=h(),o=s(),p=(0,k.useRef)(null);m(p);let v=(0,k.useMemo)(()=>{let e=new Set,t=[];for(let n of i){let r=n.repo;r&&!e.has(r)&&(e.add(r),t.push(r))}return t.sort()},[i]),[y,b]=(0,k.useState)(v[0]??``),[x,S]=(0,k.useState)(!1),[C,w]=(0,k.useState)(``),[T,E]=(0,k.useState)(``),[D,O]=(0,k.useState)(``),[N,P]=(0,k.useState)(a[0]?.id??`claude`),[F,I]=(0,k.useState)(!1),[L,R]=(0,k.useState)(``),[z,B]=(0,k.useState)(!1),V=y.trim().length>0&&!z;(0,k.useEffect)(()=>{let e=!1;return g().then(t=>{e||!t||F||P(t)}),()=>{e=!0}},[F]);let H=async()=>{if(V){B(!0);try{let i={repo:y.trim()};C.trim()&&(i.title=C.trim()),T.trim()&&(i.branch=T.trim()),D.trim()&&(i.baseRef=D.trim()),N&&(i.vendor=N);let{taskId:a,task:s}=await d(`task.create`,i);t(a);let l=L.trim();l&&(n(a,l),r(a)),o({to:`/task/$taskId`,params:{taskId:a}}),f(a),c(`success`,`Task created: ${s?.title||s?.branch||a}`),e()}catch(e){l(`create task`,e)}finally{B(!1)}}};return(0,A.jsx)(`div`,{className:`fixed inset-0 z-40 flex items-center justify-center bg-black/60`,onClick:e,onKeyDown:t=>{t.key===`Escape`&&e()},role:`presentation`,children:(0,A.jsxs)(`div`,{ref:p,role:`dialog`,"aria-modal":`true`,"aria-label":`New task`,className:`w-[28rem] max-w-[calc(100vw-2rem)] border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,A.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`New Task`}),(0,A.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`worktree + engine session`})]}),(0,A.jsxs)(`form`,{className:`space-y-3 px-3 py-3`,onSubmit:e=>{e.preventDefault(),H()},children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Repo`}),v.length>0&&!x?(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsx)(`select`,{value:y,onChange:e=>b(e.target.value),className:`${M} min-w-0 flex-1`,children:v.map(e=>(0,A.jsx)(`option`,{value:e,children:e},e))}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>{S(!0),b(``)},className:`shrink-0 border border-line bg-bg px-2 text-[11px] text-muted hover:border-primary hover:text-fg`,title:`Type a repo path instead`,children:`path…`})]}):(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsx)(`input`,{value:y,onChange:e=>b(e.target.value),placeholder:`/absolute/path/to/repo`,className:`${M} min-w-0 flex-1 font-mono`}),v.length>0&&(0,A.jsx)(`button`,{type:`button`,onClick:()=>{S(!1),b(v[0]??``)},className:`shrink-0 border border-line bg-bg px-2 text-[11px] text-muted hover:border-primary hover:text-fg`,title:`Pick a known repo`,children:`list`})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Title`}),(0,A.jsx)(`input`,{value:C,onChange:e=>w(e.target.value),placeholder:`optional — auto-titled from the first message`,className:M})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Branch`}),(0,A.jsx)(`input`,{value:T,onChange:e=>E(e.target.value),placeholder:`auto`,className:`${M} font-mono`})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Base ref`}),(0,A.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),placeholder:`default branch`,className:`${M} font-mono`})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`Engine`}),(0,A.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:a.map(e=>(0,A.jsx)(`button`,{type:`button`,onClick:()=>{I(!0),P(e.id)},className:`border px-2 py-1 text-[11px] transition-colors ${N===e.id?`border-primary bg-inset text-fg`:`border-line bg-bg text-muted hover:border-primary hover:text-fg`}`,children:_(a,e.id)},e.id))})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(j,{children:`First prompt`}),(0,A.jsx)(`textarea`,{value:L,onChange:e=>R(e.target.value),placeholder:`optional — waits in the engine composer, ready to send`,rows:2,className:`${M} resize-none`})]}),(0,A.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-line pt-3`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:e,className:`border border-line bg-bg px-3 py-1.5 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Cancel`}),(0,A.jsx)(`button`,{type:`submit`,disabled:!V,className:`border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10 disabled:opacity-40`,children:z?`Creating…`:`Create task`})]})]})]})})}function P(e,t){let n=e?.state;return n===`waiting_permission`||n===`error`||n===`rate_limited`?`attention`:n===`running`?`working`:t&&(t.added>0||t.deleted>0)?`changes`:`quiet`}function F(e,t,n){return n===`all`||P(e,t)===n}export{b as a,D as c,E as d,x as f,O as i,S as l,P as n,C as o,y as p,N as r,T as s,F as t,w as u};
@@ -1 +1 @@
1
- import{a as e,l as t,o as n}from"./terminal-qBEkzc-m.js";import{y as r}from"./tabs-Dx-TnbvG.js";import{d as i,t as a}from"./createLucideIcon-CM5xLVj1.js";import{a as o,r as s}from"./toast-BXjAT0ix.js";import{n as c}from"./store-uT65Mask.js";import{t as l}from"./arrow-left-DNM2CHhS.js";import{n as u}from"./time-kviT26Tm.js";import{n as d,t as f}from"./ConfirmDialog-CDPOtXww.js";var p=a(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),m=t(r(),1),h=class extends Error{};async function g(){let e=await n.get(`/api/worktrees`,{label:`load worktrees`});return Array.isArray(e.projects)?e.projects:[]}async function _(t,r){try{await n.delete(`/api/worktrees`,{path:t,force:r},{label:`delete worktree`})}catch(t){throw t instanceof e&&/refusing to remove dirty worktree/.test(t.detail)?new h(t.detail):t}}var v=i();function y(e){return e===!0?(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-green`,children:`on remote`}):e===!1?(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`not pushed`}):(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`remote unknown`})}function b({row:e,linkedTaskTitle:t,onDelete:n}){return(0,v.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.kobeManaged&&(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`}),e.dirty&&(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),y(e.branchOnRemote),t&&(0,v.jsxs)(`span`,{className:`shrink-0 truncate text-[10px] text-subtle`,children:[`task: `,t]})]}),(0,v.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,v.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.createdAtMs>0&&(0,v.jsxs)(`span`,{className:`ml-auto shrink-0`,children:[`created `,u(e.createdAtMs)]})]})]}),(0,v.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-kobe-red hover:text-kobe-red`,children:`Delete`})]})}function x(){let e=o(),{tasks:t}=c(),[n,r]=(0,m.useState)(null),[i,a]=(0,m.useState)(!1),[u,y]=(0,m.useState)(null),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)([]),T=(0,m.useMemo)(()=>{let e=new Map;for(let n of t)n.worktreePath&&e.set(n.worktreePath,n.title||n.branch);return e},[t]),E=()=>{a(!0),g().then(r).catch(e=>s(`load worktrees`,e)).finally(()=>a(!1))};(0,m.useEffect)(E,[]);let D=(n??[]).map(e=>({...e,worktrees:e.worktrees.filter(e=>!C.includes(e.path))})),O=e=>{r(t=>t?.map(t=>({...t,worktrees:t.worktrees.filter(t=>t.path!==e)}))??t)},k=(e,t)=>{w(t=>[...t,e.path]),_(e.path,t).then(()=>{O(e.path),w(t=>t.filter(t=>t!==e.path))}).catch(n=>{w(t=>t.filter(t=>t!==e.path)),!t&&n instanceof h?S(e):s(t?`force delete worktree`:`delete worktree`,n)})};return(0,v.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,v.jsxs)(`header`,{"data-kobe-topbar":!0,className:`flex h-10 shrink-0 items-center gap-3 border-b border-line bg-surface px-3`,children:[(0,v.jsx)(d,{}),(0,v.jsxs)(`button`,{type:`button`,onClick:()=>e({to:`/`}),className:`flex items-center gap-1.5 text-muted transition-colors hover:text-fg`,title:`Back to workspace`,children:[(0,v.jsx)(l,{size:15,strokeWidth:1.8}),(0,v.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,v.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Worktrees`}),(0,v.jsx)(`button`,{type:`button`,onClick:E,disabled:i,className:`ml-auto flex items-center gap-1.5 text-muted transition-colors hover:text-fg disabled:opacity-40`,title:`Refresh`,children:(0,v.jsx)(p,{size:13,strokeWidth:1.8,className:i?`animate-spin`:``})})]}),(0,v.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:n===null?(0,v.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Loading worktrees…`}):D.length===0?(0,v.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No local projects known to Rove yet.`}):D.map(e=>(0,v.jsxs)(`div`,{className:`border-b border-line`,children:[(0,v.jsx)(`div`,{className:`border-b border-line-subtle bg-surface px-3 py-1.5 font-mono text-[11px] text-subtle`,children:e.repo}),e.worktrees.length===0?(0,v.jsx)(`p`,{className:`px-3 py-3 text-[12px] text-subtle`,children:`No worktrees.`}):e.worktrees.map(e=>(0,v.jsx)(b,{row:e,linkedTaskTitle:T.get(e.path)??null,onDelete:()=>y(e)},e.path))]},e.repo))}),u&&(0,v.jsx)(f,{title:`Delete worktree`,body:`Delete the worktree for "${u.branch||u.path}"? This removes the working directory; the branch itself is kept.`,confirmLabel:`Delete`,danger:!0,onConfirm:()=>{if(!u)return;let e=u;y(null),k(e,!1)},onCancel:()=>y(null)}),x&&(0,v.jsx)(f,{title:`Force delete worktree`,body:`"${x.branch||x.path}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?`,confirmLabel:`Force delete`,danger:!0,onConfirm:()=>{if(!x)return;let e=x;S(null),k(e,!0)},onCancel:()=>S(null)})]})}var S=x;export{S as component};
1
+ import{a as e,l as t,o as n}from"./terminal-qBEkzc-m.js";import{y as r}from"./tabs-Dx-TnbvG.js";import{d as i,t as a}from"./createLucideIcon-CM5xLVj1.js";import{a as o,r as s}from"./toast-BXjAT0ix.js";import{n as c}from"./store-BXzqsTjs.js";import{t as l}from"./arrow-left-DNM2CHhS.js";import{n as u}from"./time-kviT26Tm.js";import{n as d,t as f}from"./ConfirmDialog-D-NILtP0.js";var p=a(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),m=t(r(),1),h=class extends Error{};async function g(){let e=await n.get(`/api/worktrees`,{label:`load worktrees`});return Array.isArray(e.projects)?e.projects:[]}async function _(t,r){try{await n.delete(`/api/worktrees`,{path:t,force:r},{label:`delete worktree`})}catch(t){throw t instanceof e&&/refusing to remove dirty worktree/.test(t.detail)?new h(t.detail):t}}var v=i();function y(e){return e===!0?(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-green`,children:`on remote`}):e===!1?(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`not pushed`}):(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`remote unknown`})}function b({row:e,linkedTaskTitle:t,onDelete:n}){return(0,v.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.kobeManaged&&(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`}),e.dirty&&(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),y(e.branchOnRemote),t&&(0,v.jsxs)(`span`,{className:`shrink-0 truncate text-[10px] text-subtle`,children:[`task: `,t]})]}),(0,v.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,v.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.createdAtMs>0&&(0,v.jsxs)(`span`,{className:`ml-auto shrink-0`,children:[`created `,u(e.createdAtMs)]})]})]}),(0,v.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-kobe-red hover:text-kobe-red`,children:`Delete`})]})}function x(){let e=o(),{tasks:t}=c(),[n,r]=(0,m.useState)(null),[i,a]=(0,m.useState)(!1),[u,y]=(0,m.useState)(null),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)([]),T=(0,m.useMemo)(()=>{let e=new Map;for(let n of t)n.worktreePath&&e.set(n.worktreePath,n.title||n.branch);return e},[t]),E=()=>{a(!0),g().then(r).catch(e=>s(`load worktrees`,e)).finally(()=>a(!1))};(0,m.useEffect)(E,[]);let D=(n??[]).map(e=>({...e,worktrees:e.worktrees.filter(e=>!C.includes(e.path))})),O=e=>{r(t=>t?.map(t=>({...t,worktrees:t.worktrees.filter(t=>t.path!==e)}))??t)},k=(e,t)=>{w(t=>[...t,e.path]),_(e.path,t).then(()=>{O(e.path),w(t=>t.filter(t=>t!==e.path))}).catch(n=>{w(t=>t.filter(t=>t!==e.path)),!t&&n instanceof h?S(e):s(t?`force delete worktree`:`delete worktree`,n)})};return(0,v.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,v.jsxs)(`header`,{"data-kobe-topbar":!0,className:`flex h-10 shrink-0 items-center gap-3 border-b border-line bg-surface px-3`,children:[(0,v.jsx)(d,{}),(0,v.jsxs)(`button`,{type:`button`,onClick:()=>e({to:`/`}),className:`flex items-center gap-1.5 text-muted transition-colors hover:text-fg`,title:`Back to workspace`,children:[(0,v.jsx)(l,{size:15,strokeWidth:1.8}),(0,v.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,v.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Worktrees`}),(0,v.jsx)(`button`,{type:`button`,onClick:E,disabled:i,className:`ml-auto flex items-center gap-1.5 text-muted transition-colors hover:text-fg disabled:opacity-40`,title:`Refresh`,children:(0,v.jsx)(p,{size:13,strokeWidth:1.8,className:i?`animate-spin`:``})})]}),(0,v.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:n===null?(0,v.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Loading worktrees…`}):D.length===0?(0,v.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No local projects known to Rove yet.`}):D.map(e=>(0,v.jsxs)(`div`,{className:`border-b border-line`,children:[(0,v.jsx)(`div`,{className:`border-b border-line-subtle bg-surface px-3 py-1.5 font-mono text-[11px] text-subtle`,children:e.repo}),e.worktrees.length===0?(0,v.jsx)(`p`,{className:`px-3 py-3 text-[12px] text-subtle`,children:`No worktrees.`}):e.worktrees.map(e=>(0,v.jsx)(b,{row:e,linkedTaskTitle:T.get(e.path)??null,onDelete:()=>y(e)},e.path))]},e.repo))}),u&&(0,v.jsx)(f,{title:`Delete worktree`,body:`Delete the worktree for "${u.branch||u.path}"? This removes the working directory; the branch itself is kept.`,confirmLabel:`Delete`,danger:!0,onConfirm:()=>{if(!u)return;let e=u;y(null),k(e,!1)},onCancel:()=>y(null)}),x&&(0,v.jsx)(f,{title:`Force delete worktree`,body:`"${x.branch||x.path}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?`,confirmLabel:`Force delete`,danger:!0,onConfirm:()=>{if(!x)return;let e=x;S(null),k(e,!0)},onCancel:()=>S(null)})]})}var S=x;export{S as component};
@@ -5,7 +5,7 @@
5
5
  <meta charset="UTF-8" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Rove</title>
8
- <script type="module" crossorigin src="/assets/index-D58CfI0X.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BgcK6obF.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/terminal-qBEkzc-m.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/tabs-Dx-TnbvG.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-CM5xLVj1.js">
@@ -14,15 +14,15 @@
14
14
  <link rel="modulepreload" crossorigin href="/assets/with-selector-B5R3h-Ow.js">
15
15
  <link rel="modulepreload" crossorigin href="/assets/columns-3-CQGAnX-4.js">
16
16
  <link rel="modulepreload" crossorigin href="/assets/react-dom-DCnDkJvp.js">
17
- <link rel="modulepreload" crossorigin href="/assets/store-uT65Mask.js">
18
- <link rel="modulepreload" crossorigin href="/assets/task._taskId-BlZ0vG_1.js">
19
- <link rel="modulepreload" crossorigin href="/assets/desktop-BThq9eSR.js">
20
- <link rel="modulepreload" crossorigin href="/assets/active-task-GeQZqbJK.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/store-BXzqsTjs.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/task._taskId-EQWWNO2k.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/desktop-CFge7SbS.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/active-task-CuoFMFoR.js">
21
21
  <link rel="modulepreload" crossorigin href="/assets/use-focus-trap-DNMrlNR0.js">
22
22
  <link rel="modulepreload" crossorigin href="/assets/engines-Cnxy1hW9.js">
23
23
  <link rel="modulepreload" crossorigin href="/assets/settings-tPcmEHCP.js">
24
24
  <link rel="modulepreload" crossorigin href="/assets/vendor-CdtpTJrf.js">
25
- <link rel="modulepreload" crossorigin href="/assets/triage-7QLsCY8d.js">
25
+ <link rel="modulepreload" crossorigin href="/assets/triage-DDohuPMh.js">
26
26
  <link rel="modulepreload" crossorigin href="/assets/plus-BbX5qXba.js">
27
27
  <link rel="modulepreload" crossorigin href="/assets/search-BxbFZoup.js">
28
28
  <link rel="modulepreload" crossorigin href="/assets/x-7cB9X7Hi.js">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@sma1lboy/kobe",
4
- "version": "0.8.99",
4
+ "version": "0.8.102",
5
5
  "description": "Rove — the terminal-native agent multiplexer",
6
6
  "type": "module",
7
7
  "packageManager": "bun@1.3.13",
@@ -1 +0,0 @@
1
- import{t as e}from"./store-uT65Mask.js";function t(t){return e(`task.setActive`,{taskId:t})}function n(e,n){t(e).catch(e=>{n?.(e)})}export{n,t};
@@ -1 +0,0 @@
1
- import{Board as e}from"./Board-DPB4h6mJ.js";var t=e;export{t as component};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AppShell-BTjvuY-t.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/toast-BXjAT0ix.js","assets/external-store-DJlWpyYC.js","assets/ViewToggle-BdPCMBWa.js","assets/columns-3-CQGAnX-4.js","assets/with-selector-B5R3h-Ow.js","assets/store-uT65Mask.js","assets/x-7cB9X7Hi.js","assets/web-transport-D0bugxxv.js","assets/active-task-GeQZqbJK.js","assets/triage-7QLsCY8d.js","assets/use-focus-trap-DNMrlNR0.js","assets/engines-Cnxy1hW9.js","assets/settings-tPcmEHCP.js","assets/vendor-CdtpTJrf.js","assets/WorkspaceTabs-CMKlvN_Y.js","assets/ChatTranscript-DLthbnmB.js","assets/rotate-cw-D-UUtiD0.js","assets/search-BxbFZoup.js","assets/time-kviT26Tm.js","assets/WorkspaceTabs-DLzL-Tad.css","assets/SettingsPage-CLRhr-sg.js","assets/plus-BbX5qXba.js","assets/activity-BjTd1D8q.js","assets/ConfirmDialog-CDPOtXww.js","assets/text-match-DW3sD-Rt.js","assets/SlideOver-Dxtk6Gn2.js","assets/chips-Da37C4KZ.js","assets/AppShell-HiyATJse.css","assets/Board-DPB4h6mJ.js","assets/external-link-BwT2u1hD.js","assets/lazy-issue-panels-0Rhl2uhh.js","assets/issues-1SCRkcB0.js","assets/IssuesPage-BR5mpuo-.js","assets/arrow-left-DNM2CHhS.js","assets/ChatTerminal-MCI1aBbT.js","assets/ChatTerminal-BrP-ENHg.css","assets/BoardPeek-69VJptGV.js","assets/IssueIntakePanel-XYsIcIhp.js","assets/RichEditor-DJFl5TvH.js","assets/react-dom-DCnDkJvp.js","assets/RichEditor-B4sEOPyN.css","assets/IssuePeek-CP_rAkqO.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./store-uT65Mask.js";function t(e){return new URLSearchParams(e).get(`kobeDesktop`)===`1`}function n(e=window.location.search){let n=t(e);return n&&(document.documentElement.dataset.kobeDesktop=`true`),n}function r(){return document.documentElement.dataset.kobeDesktop===`true`}function i(){return window.kobeDesktopWindow}async function a(){await Promise.allSettled([e(()=>import(`./AppShell-BTjvuY-t.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])),e(()=>import(`./Board-DPB4h6mJ.js`),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,34,30,35,16,28,25,21,27,14])),e(()=>import(`./IssuesPage-BR5mpuo-.js`),__vite__mapDeps([36,1,2,3,4,5,9,37,34,30,35,12,16,28,25,21,10,27,14])),e(()=>import(`./WorkspaceTabs-CMKlvN_Y.js`).then(e=>e.n),__vite__mapDeps([18,1,2,3,9,19,20,21,10,11,22,23])),e(()=>import(`./ChatTerminal-MCI1aBbT.js`),__vite__mapDeps([38,1,2,3,9,20,11,39])),e(()=>import(`./BoardPeek-69VJptGV.js`),__vite__mapDeps([40,1,2,3,9,19,20,21,10,11,22,33,26,14])),e(()=>import(`./IssueIntakePanel-XYsIcIhp.js`),__vite__mapDeps([41,1,2,3,29,10,14,35,9,12,16,28,42,8,43,15,5,17,44])),e(()=>import(`./IssuePeek-CP_rAkqO.js`),__vite__mapDeps([45,1,2,3,33,29,10,14,35,9,12,16,28,42,8,43,15,5,17,44])),e(()=>import(`./SettingsPage-CLRhr-sg.js`).then(e=>e.n),__vite__mapDeps([24,1,2,3,4,5,16,17]))])}export{a as i,n,r,i as t};
@@ -1 +0,0 @@
1
- import{IssuesPage as e}from"./IssuesPage-BR5mpuo-.js";var t=e;export{t as component};
@@ -1 +0,0 @@
1
- import{AppShell as e}from"./AppShell-BTjvuY-t.js";var t=e;export{t as component};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tabs-Dx-TnbvG.js","assets/terminal-qBEkzc-m.js"])))=>i.map(i=>d[i]);
2
- import{l as e,o as t}from"./terminal-qBEkzc-m.js";import{u as n,y as r}from"./tabs-Dx-TnbvG.js";import{n as i,s as a}from"./createLucideIcon-CM5xLVj1.js";var o=e(r(),1),s=`modulepreload`,c=function(e){return`/`+e},l={},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=c(t,n),t=u(t),t in l)return;l[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:s,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=`kobe.dispatch.deliveredAt.`;function f(e){try{let t=localStorage.getItem(d+e),n=t?Number.parseInt(t,10):0;return Number.isFinite(n)?n:0}catch{return 0}}function p(e,t){try{localStorage.setItem(d+e,String(t))}catch{}}function m(e,t){return e.at>t}async function h(e,t){if(!m(e,f(e.taskId)))return!1;p(e.taskId,e.at);let n=t?.ensureTab,r=t?.send;if(!n||!r){let e=await u(()=>import(`./tabs-Dx-TnbvG.js`).then(e=>e.g),__vite__mapDeps([0,1])),t=await u(()=>import(`./terminal-qBEkzc-m.js`).then(e=>e.i),[]);n??=e.ensureEngineTab,r??=t.sendPtyText}try{let t=n(e.taskId);return await r(t,e.taskId,e.text),!0}catch(t){return p(e.taskId,e.at-1),console.warn(`[dispatch-delivery] failed to deliver into session`,e.taskId,t),!1}}function g(e){return e.length>1?e.replace(/\/+$/,``):e}function _(e,t){let n=g(t),r=new Set([t]);for(let t of e){let e=g(t.repo),i=g(t.worktreePath);(e===n||i===n)&&(t.repo&&r.add(t.repo),t.worktreePath&&r.add(t.worktreePath))}return[...r]}function v(e,t){let n=new Set;for(let e of t)e.repo&&n.add(g(e.repo)),e.worktreePath&&n.add(g(e.worktreePath));let r=Object.entries(e).filter(([e])=>n.has(g(e)));return r.length===Object.keys(e).length?e:Object.fromEntries(r)}function y(e={}){let n=e.path??`/api/rpc`,r=e.post??t.post.bind(t);return{async request(e,t){return(await r(n,{name:e,payload:t},{label:`rpc ${e}`})).result}}}var b=y(),x={tasks:[],activeTaskId:null,engineStates:{},update:null,jobs:{},worktreeChanges:{},issueSnapshots:{},deliver:null,uiPrefs:null,hydrated:!1,daemonConnected:!1,streamConnected:!1},S=new Set;function C(e){x={...x,...e};for(let e of S)e()}function w(e,t){let n=Object.entries(e).filter(([e])=>t.has(e));return n.length===Object.keys(e).length?e:Object.fromEntries(n)}function T(e,t){return!e&&t===`idle`}function E(e,t){if(t.phase===`running`)return{...e,[t.taskId]:t};let{[t.taskId]:n,...r}=e;return r}function D(e,t,n){let r={...e};for(let e of _(t,n.repoRoot))r[e]={...n,repoRoot:e};return r}function O(e){let t=new Set(e.map(e=>e.id));C({tasks:e,engineStates:w(x.engineStates,t),jobs:w(x.jobs,t),issueSnapshots:v(x.issueSnapshots,e)}),n(t)}function k(e){switch(e.channel){case`task.snapshot`:O(e.payload.tasks);break;case`active-task`:C({activeTaskId:e.payload.taskId});break;case`engine-state`:{let t=x.engineStates[e.payload.taskId]?.state,n=x.tasks.find(t=>t.id===e.payload.taskId);if(T(n,e.payload.state))break;a(e.payload.taskId,n?.title||n?.branch||e.payload.taskId,t,e.payload.state),C({engineStates:{...x.engineStates,[e.payload.taskId]:e.payload}});break}case`update`:C({update:e.payload.info});break;case`task.jobs`:C({jobs:E(x.jobs,e.payload)});break;case`worktree.changes`:C({worktreeChanges:e.payload.changes});break;case`issue.snapshot`:C({issueSnapshots:D(x.issueSnapshots,x.tasks,e.payload)});break;case`session.deliver`:C({deliver:e.payload}),h(e.payload);break;case`ui-prefs`:C({uiPrefs:e.payload}),i(e.payload.theme);break}}function A(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function j(e){if(!A(e)||!Array.isArray(e.tasks)||typeof e.activeTaskId!=`string`&&e.activeTaskId!==null||!A(e.engineStates)||typeof e.connected!=`boolean`)return null;for(let t of[`jobs`,`worktreeChanges`,`issueSnapshots`])if(e[t]!==void 0&&!A(e[t]))return null;return e.uiPrefs!==void 0&&e.uiPrefs!==null&&!A(e.uiPrefs)?null:e}function M(e){return Math.min(1e4,500*2**Math.max(0,e))}var N=null,P=0,F=null;function I(e){return e!==null&&e.readyState!==EventSource.CLOSED}function L(e){P=0,C({tasks:e.tasks,activeTaskId:e.activeTaskId,engineStates:e.engineStates,update:e.update,jobs:e.jobs??{},worktreeChanges:e.worktreeChanges??{},issueSnapshots:e.issueSnapshots??{},deliver:e.deliver??null,uiPrefs:e.uiPrefs??null,hydrated:!0,daemonConnected:e.connected,streamConnected:!0}),e.uiPrefs&&i(e.uiPrefs.theme),e.connected&&e.deliver&&h(e.deliver),e.connected&&n(new Set(e.tasks.map(e=>e.id)))}function R(){if(F!==null)return;let e=M(P);P+=1,F=setTimeout(()=>{F=null,S.size>0&&z()},e)}function z(){I(N)||(N=new EventSource(`/events`),N.addEventListener(`open`,()=>{P=0,C({streamConnected:!0})}),N.addEventListener(`snapshot`,e=>{let t;try{t=JSON.parse(e.data)}catch{console.warn(`[store] dropped unparseable snapshot frame`);return}let n=j(t);if(!n){console.warn(`[store] dropped malformed snapshot frame`);return}L(n)}),N.addEventListener(`channel`,e=>{let t;try{t=JSON.parse(e.data)}catch{console.warn(`[store] dropped unparseable channel frame`);return}if(!A(t)||typeof t.channel!=`string`){console.warn(`[store] dropped malformed channel frame`);return}k(t),x.daemonConnected||C({daemonConnected:!0})}),N.addEventListener(`error`,()=>{C({streamConnected:!1}),N&&N.readyState===EventSource.CLOSED&&(N.close(),N=null,R())}))}function B(e){return z(),S.add(e),()=>{S.delete(e)}}function V(){return x}function H(){return(0,o.useSyncExternalStore)(B,V,V)}async function U(e,t){return b.request(e,t)}export{u as i,H as n,g as r,U as t};