@sma1lboy/kobe 0.9.52 → 0.9.54

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 (29) hide show
  1. package/dist/cli/index.js +311 -311
  2. package/dist/cli/kobe-run.js +311 -311
  3. package/dist/cli/rove-run.js +311 -311
  4. package/dist/web-ui/assets/{AppShell-BmyCBsrg.js → AppShell-DMNi3gC2.js} +1 -1
  5. package/dist/web-ui/assets/{Board-DP9YsVFQ.js → Board-B5Yk2rXp.js} +1 -1
  6. package/dist/web-ui/assets/{BoardPeek-C7hvPlvd.js → BoardPeek-CkYolN2X.js} +1 -1
  7. package/dist/web-ui/assets/ChatTranscript-DGSq0zJv.js +1 -0
  8. package/dist/web-ui/assets/{ConfirmDialog-CRIciKa9.js → ConfirmDialog-DPGAVw_z.js} +1 -1
  9. package/dist/web-ui/assets/{IssueIntakePanel-gU0zvRum.js → IssueIntakePanel-B7wy40Hv.js} +1 -1
  10. package/dist/web-ui/assets/{IssuePeek-sNnmw31I.js → IssuePeek-TqnrG0X-.js} +1 -1
  11. package/dist/web-ui/assets/{IssuesPage-Ssrf59X_.js → IssuesPage-BmXfEacH.js} +1 -1
  12. package/dist/web-ui/assets/{SettingsPage-DSPrqL8e.js → SettingsPage-D8Fq9PeG.js} +1 -1
  13. package/dist/web-ui/assets/{SlideOver-CZeaTHPq.js → SlideOver-La0zyHop.js} +1 -1
  14. package/dist/web-ui/assets/{ViewToggle-D8MwGU_6.js → ViewToggle-YL5uvbnK.js} +1 -1
  15. package/dist/web-ui/assets/{WorkspaceTabs-DwAfrkTh.js → WorkspaceTabs-DZe53Oi8.js} +1 -1
  16. package/dist/web-ui/assets/board-CBka7FZM.js +1 -0
  17. package/dist/web-ui/assets/{index-BVdGolRY.js → index-4ygpWkvC.js} +2 -2
  18. package/dist/web-ui/assets/{issues-Cd7ApR2n.js → issues-CNf9N3hy.js} +1 -1
  19. package/dist/web-ui/assets/issues-CPVJba3N.js +1 -0
  20. package/dist/web-ui/assets/{lazy-issue-panels-kekGTWkq.js → lazy-issue-panels-n3EK--_o.js} +3 -3
  21. package/dist/web-ui/assets/routes-CfwH1GeG.js +1 -0
  22. package/dist/web-ui/assets/{task._taskId-zz44ZbFO.js → task._taskId-iq5eaYmv.js} +1 -1
  23. package/dist/web-ui/assets/{worktrees-BE39dWqJ.js → worktrees-Y0g4Wgd2.js} +1 -1
  24. package/dist/web-ui/index.html +1 -1
  25. package/package.json +1 -1
  26. package/dist/web-ui/assets/ChatTranscript-CLR8K_3x.js +0 -1
  27. package/dist/web-ui/assets/board-o07XCKW0.js +0 -1
  28. package/dist/web-ui/assets/issues-yvwRRU-F.js +0 -1
  29. package/dist/web-ui/assets/routes-Cqw_Z3h7.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o as e,r as t,s as n}from"./terminal-Nt-mXbb9.js";import{c as r,n as i}from"./tabs-C1KFppnz.js";import{p as a}from"./createLucideIcon-C8T7_EGK.js";import{t as o}from"./store-C3IHXPqa.js";import{t as s}from"./active-task-Dcgkjlku.js";import{l as c}from"./index-BVdGolRY.js";import{t as l}from"./text-match-DW3sD-Rt.js";var u=[{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}],d=new Set([`done`]);function f(e){return e.status===`done`?`done`:e.taskId!==void 0&&e.taskId!==``?`in_progress`:`backlog`}function p(e){return e.taskId!==void 0&&e.taskId!==``}function m(e,t){return e.issue.created===t.issue.created?t.issue.id-e.issue.id:e.issue.created<t.issue.created?1:-1}function h(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(f(t.issue),t);for(let e of t.values())e.sort(m);let r=(e,t)=>!d.has(e)||t.length<=30?{cards:t,hiddenCount:0}:{cards:t.slice(0,30),hiddenCount:t.length-30};return u.map(e=>({...e,...r(e.key,t.get(e.key)??[])})).filter(e=>e.alwaysVisible||e.cards.length+e.hiddenCount>0)}function g(e){return e.reduce((e,t)=>e+t.cards.length,0)}function _(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:y(e,n),columns:h(t.get(e)??[])})).sort((e,t)=>e.label.localeCompare(t.label))}function v(e){let t=e.replace(/\/+$/,``);return t.split(`/`).pop()||t}function y(e,t){let n=v(e);return t.some(t=>t!==e&&v(t)===n)?e.replace(/\/+$/,``).split(`/`).slice(-2).join(`/`):n}function b(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 x(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:y(e,n),count:t.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function S(e,t,n){return e.filter(({repo:e,issue:r})=>n&&e!==n?!1:l(`#${r.id} ${r.title} ${r.body}`,t))}function C(e){let t=b(e.issueData,e.issueRepos,e.pendingLinks),n=x(t),r=_(S(t,e.query,e.repoFilter));return e.repoFilter&&r.length===0&&e.issueRepos.includes(e.repoFilter)&&r.push({repo:e.repoFilter,label:y(e.repoFilter,e.issueRepos),columns:h([])}),{allIssues:t,repoChips:n,projectBoards:r,shownCount:r.reduce((e,t)=>e+g(t.columns),0),hasAnyCard:t.length>0}}function w(e){let t=[`Work on user story #${e.id}: ${e.title}`,``],n=e.body.trim();return n&&t.push(n,``),t}function T(e,t,n){return[...w(e),`Treat this as the story's dedicated ${n} 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`].join(`
1
+ import{o as e,r as t,s as n}from"./terminal-Nt-mXbb9.js";import{c as r,n as i}from"./tabs-C1KFppnz.js";import{p as a}from"./createLucideIcon-C8T7_EGK.js";import{t as o}from"./store-C3IHXPqa.js";import{t as s}from"./active-task-Dcgkjlku.js";import{l as c}from"./index-4ygpWkvC.js";import{t as l}from"./text-match-DW3sD-Rt.js";var u=[{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}],d=new Set([`done`]);function f(e){return e.status===`done`?`done`:e.taskId!==void 0&&e.taskId!==``?`in_progress`:`backlog`}function p(e){return e.taskId!==void 0&&e.taskId!==``}function m(e,t){return e.issue.created===t.issue.created?t.issue.id-e.issue.id:e.issue.created<t.issue.created?1:-1}function h(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(f(t.issue),t);for(let e of t.values())e.sort(m);let r=(e,t)=>!d.has(e)||t.length<=30?{cards:t,hiddenCount:0}:{cards:t.slice(0,30),hiddenCount:t.length-30};return u.map(e=>({...e,...r(e.key,t.get(e.key)??[])})).filter(e=>e.alwaysVisible||e.cards.length+e.hiddenCount>0)}function g(e){return e.reduce((e,t)=>e+t.cards.length,0)}function _(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:y(e,n),columns:h(t.get(e)??[])})).sort((e,t)=>e.label.localeCompare(t.label))}function v(e){let t=e.replace(/\/+$/,``);return t.split(`/`).pop()||t}function y(e,t){let n=v(e);return t.some(t=>t!==e&&v(t)===n)?e.replace(/\/+$/,``).split(`/`).slice(-2).join(`/`):n}function b(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 x(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:y(e,n),count:t.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function S(e,t,n){return e.filter(({repo:e,issue:r})=>n&&e!==n?!1:l(`#${r.id} ${r.title} ${r.body}`,t))}function C(e){let t=b(e.issueData,e.issueRepos,e.pendingLinks),n=x(t),r=_(S(t,e.query,e.repoFilter));return e.repoFilter&&r.length===0&&e.issueRepos.includes(e.repoFilter)&&r.push({repo:e.repoFilter,label:y(e.repoFilter,e.issueRepos),columns:h([])}),{allIssues:t,repoChips:n,projectBoards:r,shownCount:r.reduce((e,t)=>e+g(t.columns),0),hasAnyCard:t.length>0}}function w(e){let t=[`Work on user story #${e.id}: ${e.title}`,``],n=e.body.trim();return n&&t.push(n,``),t}function T(e,t,n){return[...w(e),`Treat this as the story's dedicated ${n} 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`].join(`
2
2
  `)}function E(e,t){return[...w(e),`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`].join(`
3
3
  `)}function D(e,t){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
  `)}var O=`${n} api`;async function k(){let t=await e.getOr(`/api/cli-invocation`,{},{label:`load CLI invocation`});return typeof t.api==`string`&&t.api.trim().length>0?t.api:O}async function A(){let t=await e.get(`/api/projects`,{label:`load projects`});return Array.isArray(t.projects)?t.projects.filter(e=>typeof e==`string`):[]}async function j(t){return e.get(`/api/issues`,{query:{repoRoot:t},label:`load issues`})}async function M(t,n){return e.post(`/api/issues`,{repoRoot:t,op:n},{label:`update issues`})}async function N(e,t){return M(e,{type:`create`,...t})}async function P(e,t,n){return M(e,{type:`setStatus`,id:t,status:n})}async function F(e,t,n){return M(e,{type:`update`,id:t,...n})}async function I(e,t,n){return M(e,{type:`link`,id:t,taskId:n})}async function L(e,t){return M(e,{type:`delete`,id:t})}var R=[`open`,`doing`,`hold`,`done`],z={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 B(e){return e!==`done`}function V(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 H(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 U(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.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.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:y(e,a),count:n.get(e)??0})).sort((e,t)=>e.label.localeCompare(t.label))}function W(e,t){return e.length===0?null:t&&e.some(e=>e.repo===t)?t:e[0]?.repo??null}async function G(e,n,i,o){let c=await K(e,n,i,o);s(c);let l=await k().catch(()=>O),u=r(c);return await t(u,c,T(n,l,a())),{taskId:c}}async function K(e,t,n,r){let i=n?.trim()||await c(),{taskId:a}=await o(`task.create`,{repo:e,title:`#${t.id} ${t.title}`,...i?{vendor:i}:{},...r?.trim()?{effort:r.trim()}:{}});return await I(e,t.id,a).catch(()=>{}),a}async function q(e,n,r={}){let c=r.placement??`task`;if(c===`task`){let{taskId:t}=await G(e,n,r.vendor,r.effort);return{taskId:t,workspaceTaskId:t}}let l=await k().catch(()=>O),{task:u}=await o(`task.ensureMain`,{repo:e}),d=u.id;if(c===`projectWorktree`){let o=await K(e,n,r.vendor,r.effort);s(d);let c=i(d,o);return await t(c,o,T(n,l,a())),{taskId:o,workspaceTaskId:d}}let f=r.vendor?.trim();f&&await o(`task.setVendor`,{taskId:d,vendor:f}),s(d),await P(e,n.id,`doing`).catch(()=>{});let p=i(d);return await t(p,d,E(n,l)),{taskId:d,workspaceTaskId:d}}async function J(e,n){let i=await k().catch(()=>O),a=r(e);await t(a,e,D(n,i))}export{p as _,L as a,V as c,J as d,G as f,C as g,F as h,N as i,H as l,q as m,z as n,j as o,W as p,B as r,A as s,R as t,U as u};
@@ -0,0 +1 @@
1
+ import{IssuesPage as e}from"./IssuesPage-BmXfEacH.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-gU0zvRum.js","assets/terminal-Nt-mXbb9.js","assets/tabs-C1KFppnz.js","assets/createLucideIcon-C8T7_EGK.js","assets/issues-Cd7ApR2n.js","assets/store-C3IHXPqa.js","assets/active-task-Dcgkjlku.js","assets/index-BVdGolRY.js","assets/toast-CTxQEYJU.js","assets/external-store-Djn-EBMQ.js","assets/index-BnjD9Q-3.css","assets/text-match-DW3sD-Rt.js","assets/SlideOver-CZeaTHPq.js","assets/SlideOver-B4sEOPyN.css","assets/IssuePeek-sNnmw31I.js","assets/external-link-D4N6NrPI.js"])))=>i.map(i=>d[i]);
2
- import{u as e}from"./terminal-Nt-mXbb9.js";import{y as t}from"./tabs-C1KFppnz.js";import{m as n,t as r}from"./createLucideIcon-C8T7_EGK.js";import{i,n as a,r as o}from"./store-C3IHXPqa.js";import{i as s}from"./chips-B2ODRu8l.js";import{o as c}from"./issues-Cd7ApR2n.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-B7wy40Hv.js","assets/terminal-Nt-mXbb9.js","assets/tabs-C1KFppnz.js","assets/createLucideIcon-C8T7_EGK.js","assets/issues-CNf9N3hy.js","assets/store-C3IHXPqa.js","assets/active-task-Dcgkjlku.js","assets/index-4ygpWkvC.js","assets/toast-CTxQEYJU.js","assets/external-store-Djn-EBMQ.js","assets/index-BnjD9Q-3.css","assets/text-match-DW3sD-Rt.js","assets/SlideOver-La0zyHop.js","assets/SlideOver-B4sEOPyN.css","assets/IssuePeek-TqnrG0X-.js","assets/external-link-D4N6NrPI.js"])))=>i.map(i=>d[i]);
2
+ import{u as e}from"./terminal-Nt-mXbb9.js";import{y as t}from"./tabs-C1KFppnz.js";import{m as n,t as r}from"./createLucideIcon-C8T7_EGK.js";import{i,n as a,r as o}from"./store-C3IHXPqa.js";import{i as s}from"./chips-B2ODRu8l.js";import{o as c}from"./issues-CNf9N3hy.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-gU0zvRum.js`).then(e=>({default:e.IssueIntakePanel})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),g=(0,d.lazy)(()=>i(()=>import(`./IssuePeek-sNnmw31I.js`).then(e=>({default:e.IssuePeek})),__vite__mapDeps([14,1,2,3,15,4,5,6,7,8,9,10,11,12,13])));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-B7wy40Hv.js`).then(e=>({default:e.IssueIntakePanel})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),g=(0,d.lazy)(()=>i(()=>import(`./IssuePeek-TqnrG0X-.js`).then(e=>({default:e.IssuePeek})),__vite__mapDeps([14,1,2,3,15,4,5,6,7,8,9,10,11,12,13])));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-DMNi3gC2.js";var t=e;export{t as component};
@@ -1 +1 @@
1
- import{u as e}from"./terminal-Nt-mXbb9.js";import{_ as t,f as n,y as r}from"./tabs-C1KFppnz.js";import{m as i}from"./createLucideIcon-C8T7_EGK.js";import{t as a}from"./active-task-Dcgkjlku.js";import{t as o}from"./index-BVdGolRY.js";import{AppShell as s}from"./AppShell-BmyCBsrg.js";var c=e(r()),l=i();function u(){let{taskId:e}=o.useParams(),{selectedTaskId:r}=t();return(0,c.useEffect)(()=>{!e||e===r||(n(e),a(e))},[e,r]),(0,l.jsx)(s,{})}export{u as component};
1
+ import{u as e}from"./terminal-Nt-mXbb9.js";import{_ as t,f as n,y as r}from"./tabs-C1KFppnz.js";import{m as i}from"./createLucideIcon-C8T7_EGK.js";import{t as a}from"./active-task-Dcgkjlku.js";import{t as o}from"./index-4ygpWkvC.js";import{AppShell as s}from"./AppShell-DMNi3gC2.js";var c=e(r()),l=i();function u(){let{taskId:e}=o.useParams(),{selectedTaskId:r}=t();return(0,c.useEffect)(()=>{!e||e===r||(n(e),a(e))},[e,r]),(0,l.jsx)(s,{})}export{u as component};
@@ -1 +1 @@
1
- import{a as e,o as t,u as n}from"./terminal-Nt-mXbb9.js";import{y as r}from"./tabs-C1KFppnz.js";import{m as i,p as a,t as o}from"./createLucideIcon-C8T7_EGK.js";import{a as s,r as c}from"./toast-CTxQEYJU.js";import{n as l}from"./store-C3IHXPqa.js";import{t as u}from"./arrow-left-CkmFCPVu.js";import{n as d}from"./time-kviT26Tm.js";import{n as f,t as p}from"./ConfirmDialog-CRIciKa9.js";var m=o(`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`}]]),h=n(r(),1),g=class extends Error{};async function _(){let e=await t.get(`/api/worktrees`,{label:`load worktrees`});return Array.isArray(e.projects)?e.projects:[]}async function v(n,r){try{await t.delete(`/api/worktrees`,{path:n,force:r},{label:`delete worktree`})}catch(t){throw t instanceof e&&/refusing to remove dirty worktree/.test(t.detail)?new g(t.detail):t}}var y=i();function b(e){return e===!0?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-green`,children:`on remote`}):e===!1?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`not pushed`}):(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`remote unknown`})}function x({row:e,linkedTaskTitle:t,onDelete:n}){return(0,y.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.kobeManaged&&(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`}),e.dirty&&(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),b(e.branchOnRemote),t&&(0,y.jsxs)(`span`,{className:`shrink-0 truncate text-[10px] text-subtle`,children:[`task: `,t]})]}),(0,y.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,y.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.createdAtMs>0&&(0,y.jsxs)(`span`,{className:`ml-auto shrink-0`,children:[`created `,d(e.createdAtMs)]})]})]}),(0,y.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 S(){let e=s(),{tasks:t}=l(),[n,r]=(0,h.useState)(null),[i,o]=(0,h.useState)(!1),[d,b]=(0,h.useState)(null),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)([]),E=(0,h.useMemo)(()=>{let e=new Map;for(let n of t)n.worktreePath&&e.set(n.worktreePath,n.title||n.branch);return e},[t]),D=()=>{o(!0),_().then(r).catch(e=>c(`load worktrees`,e)).finally(()=>o(!1))};(0,h.useEffect)(D,[]);let O=(n??[]).map(e=>({...e,worktrees:e.worktrees.filter(e=>!w.includes(e.path))})),k=e=>{r(t=>t?.map(t=>({...t,worktrees:t.worktrees.filter(t=>t.path!==e)}))??t)},A=(e,t)=>{T(t=>[...t,e.path]),v(e.path,t).then(()=>{k(e.path),T(t=>t.filter(t=>t!==e.path))}).catch(n=>{T(t=>t.filter(t=>t!==e.path)),!t&&n instanceof g?C(e):c(t?`force delete worktree`:`delete worktree`,n)})};return(0,y.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,y.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,y.jsx)(f,{}),(0,y.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,y.jsx)(u,{size:15,strokeWidth:1.8}),(0,y.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,y.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Worktrees`}),(0,y.jsx)(`button`,{type:`button`,onClick:D,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,y.jsx)(m,{size:13,strokeWidth:1.8,className:i?`animate-spin`:``})})]}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:n===null?(0,y.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Loading worktrees…`}):O.length===0?(0,y.jsxs)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:[`No local projects known to `,a(),` yet.`]}):O.map(e=>(0,y.jsxs)(`div`,{className:`border-b border-line`,children:[(0,y.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,y.jsx)(`p`,{className:`px-3 py-3 text-[12px] text-subtle`,children:`No worktrees.`}):e.worktrees.map(e=>(0,y.jsx)(x,{row:e,linkedTaskTitle:E.get(e.path)??null,onDelete:()=>b(e)},e.path))]},e.repo))}),d&&(0,y.jsx)(p,{title:`Delete worktree`,body:`Delete the worktree for "${d.branch||d.path}"? This removes the working directory; the branch itself is kept.`,confirmLabel:`Delete`,danger:!0,onConfirm:()=>{if(!d)return;let e=d;b(null),A(e,!1)},onCancel:()=>b(null)}),S&&(0,y.jsx)(p,{title:`Force delete worktree`,body:`"${S.branch||S.path}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?`,confirmLabel:`Force delete`,danger:!0,onConfirm:()=>{if(!S)return;let e=S;C(null),A(e,!0)},onCancel:()=>C(null)})]})}var C=S;export{C as component};
1
+ import{a as e,o as t,u as n}from"./terminal-Nt-mXbb9.js";import{y as r}from"./tabs-C1KFppnz.js";import{m as i,p as a,t as o}from"./createLucideIcon-C8T7_EGK.js";import{a as s,r as c}from"./toast-CTxQEYJU.js";import{n as l}from"./store-C3IHXPqa.js";import{t as u}from"./arrow-left-CkmFCPVu.js";import{n as d}from"./time-kviT26Tm.js";import{n as f,t as p}from"./ConfirmDialog-DPGAVw_z.js";var m=o(`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`}]]),h=n(r(),1),g=class extends Error{};async function _(){let e=await t.get(`/api/worktrees`,{label:`load worktrees`});return Array.isArray(e.projects)?e.projects:[]}async function v(n,r){try{await t.delete(`/api/worktrees`,{path:n,force:r},{label:`delete worktree`})}catch(t){throw t instanceof e&&/refusing to remove dirty worktree/.test(t.detail)?new g(t.detail):t}}var y=i();function b(e){return e===!0?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-green`,children:`on remote`}):e===!1?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`not pushed`}):(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`remote unknown`})}function x({row:e,linkedTaskTitle:t,onDelete:n}){return(0,y.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.kobeManaged&&(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`}),e.dirty&&(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),b(e.branchOnRemote),t&&(0,y.jsxs)(`span`,{className:`shrink-0 truncate text-[10px] text-subtle`,children:[`task: `,t]})]}),(0,y.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,y.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.createdAtMs>0&&(0,y.jsxs)(`span`,{className:`ml-auto shrink-0`,children:[`created `,d(e.createdAtMs)]})]})]}),(0,y.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 S(){let e=s(),{tasks:t}=l(),[n,r]=(0,h.useState)(null),[i,o]=(0,h.useState)(!1),[d,b]=(0,h.useState)(null),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)([]),E=(0,h.useMemo)(()=>{let e=new Map;for(let n of t)n.worktreePath&&e.set(n.worktreePath,n.title||n.branch);return e},[t]),D=()=>{o(!0),_().then(r).catch(e=>c(`load worktrees`,e)).finally(()=>o(!1))};(0,h.useEffect)(D,[]);let O=(n??[]).map(e=>({...e,worktrees:e.worktrees.filter(e=>!w.includes(e.path))})),k=e=>{r(t=>t?.map(t=>({...t,worktrees:t.worktrees.filter(t=>t.path!==e)}))??t)},A=(e,t)=>{T(t=>[...t,e.path]),v(e.path,t).then(()=>{k(e.path),T(t=>t.filter(t=>t!==e.path))}).catch(n=>{T(t=>t.filter(t=>t!==e.path)),!t&&n instanceof g?C(e):c(t?`force delete worktree`:`delete worktree`,n)})};return(0,y.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,y.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,y.jsx)(f,{}),(0,y.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,y.jsx)(u,{size:15,strokeWidth:1.8}),(0,y.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,y.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Worktrees`}),(0,y.jsx)(`button`,{type:`button`,onClick:D,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,y.jsx)(m,{size:13,strokeWidth:1.8,className:i?`animate-spin`:``})})]}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:n===null?(0,y.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Loading worktrees…`}):O.length===0?(0,y.jsxs)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:[`No local projects known to `,a(),` yet.`]}):O.map(e=>(0,y.jsxs)(`div`,{className:`border-b border-line`,children:[(0,y.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,y.jsx)(`p`,{className:`px-3 py-3 text-[12px] text-subtle`,children:`No worktrees.`}):e.worktrees.map(e=>(0,y.jsx)(x,{row:e,linkedTaskTitle:E.get(e.path)??null,onDelete:()=>b(e)},e.path))]},e.repo))}),d&&(0,y.jsx)(p,{title:`Delete worktree`,body:`Delete the worktree for "${d.branch||d.path}"? This removes the working directory; the branch itself is kept.`,confirmLabel:`Delete`,danger:!0,onConfirm:()=>{if(!d)return;let e=d;b(null),A(e,!1)},onCancel:()=>b(null)}),S&&(0,y.jsx)(p,{title:`Force delete worktree`,body:`"${S.branch||S.path}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?`,confirmLabel:`Force delete`,danger:!0,onConfirm:()=>{if(!S)return;let e=S;C(null),A(e,!0)},onCancel:()=>C(null)})]})}var C=S;export{C 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-BVdGolRY.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-4ygpWkvC.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/terminal-Nt-mXbb9.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/tabs-C1KFppnz.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-C8T7_EGK.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.9.52",
4
+ "version": "0.9.54",
5
5
  "description": "Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",
6
6
  "keywords": [
7
7
  "terminal",
@@ -1 +0,0 @@
1
- import{o as e,u as t}from"./terminal-Nt-mXbb9.js";import{y as n}from"./tabs-C1KFppnz.js";import{m as r,p as i,t as a}from"./createLucideIcon-C8T7_EGK.js";import{n as o}from"./store-C3IHXPqa.js";import{t as s}from"./rotate-cw-CSI5S-rL.js";import{g as c,v as l}from"./index-BVdGolRY.js";import{t as u}from"./web-transport-BFmRPA6p.js";import{t as d}from"./time-kviT26Tm.js";var f=a(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),p=a(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),m=t(n(),1);function h(t,n){return e.get(`/api/history/sessions`,{query:{worktreePath:t,vendor:n},label:`/api/history/sessions`})}async function g(t,n){let{messages:r}=await e.get(`/api/history/messages`,{query:{vendor:t,sessionId:n},label:`/api/history/messages`});return r}function ee(e){let t=0,n=0,r=0;for(let i of e){let e=i.usage;e&&(t+=e.input_tokens,n+=e.output_tokens,r=e.input_tokens+(e.cache_read_input_tokens??0)+(e.cache_creation_input_tokens??0))}return{inputTokens:t,outputTokens:n,contextTokens:r}}function _(e){return e>=999950?`${(e/1e6).toFixed(1)}m`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function v(e,t,n,r=80){return t-e-n<r}var y=90;function b(e){let t=e.input;if(t&&typeof t==`object`){let e=e=>typeof t[e]==`string`?t[e]:null,n=e(`command`)??e(`file_path`)??e(`pattern`)??e(`url`)??e(`description`)??e(`prompt`)??e(`query`);if(n)return n.length>y?`${n.slice(0,89)}…`:n}try{let t=JSON.stringify(e.input);return!t||t===`{}`||t===`null`?``:t.length>y?`${t.slice(0,89)}…`:t}catch{return``}}function x(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function S(e){switch(e.type){case`text`:case`thinking`:return e.text;case`tool_call`:return`${e.name} ${b(e)}`;case`tool_result`:return x(e.output)}}function C(e){return e.blocks.map(S).join(` `)}function w(e,t){return!(t&&e.type===`tool_call`)}function T(e,t){return e.blocks.some(e=>e.type===`text`||e.type===`thinking`?e.text.trim()!==``:e.type===`tool_call`&&!t)}var E=r(),D=600;function O({call:e,result:t}){let[n,r]=(0,m.useState)(!1),i=b(e),a=t?x(t.output):``,o=!n&&a.length>D,s=o?`${a.slice(0,D)}…`:a,c=a.length>0;return(0,E.jsxs)(`div`,{className:`my-1`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>c&&r(e=>!e),className:`flex w-full items-baseline gap-2 text-left ${c?`cursor-pointer`:`cursor-default`}`,children:[(0,E.jsx)(`span`,{className:`shrink-0 text-[11px] ${t?.isError?`text-kobe-red`:`text-kobe-green`}`,children:`⏺`}),(0,E.jsx)(`span`,{className:`shrink-0 text-[12px] font-semibold text-fg`,children:e.name}),i&&(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[11px] text-subtle`,children:i}),c&&(0,E.jsx)(`span`,{className:`shrink-0 text-subtle`,children:n?(0,E.jsx)(f,{size:12}):(0,E.jsx)(p,{size:12})})]}),(n||!n&&a&&a.length<=D)&&a&&(0,E.jsx)(`pre`,{className:`mt-1 max-h-96 overflow-auto whitespace-pre-wrap break-words border-l-2 pl-3 font-mono text-[11px] leading-relaxed ${t?.isError?`border-kobe-red/40 text-kobe-red/90`:`border-line text-muted`}`,children:s}),o&&(0,E.jsx)(`button`,{type:`button`,onClick:()=>r(!0),className:`ml-5 mt-0.5 text-[10px] text-subtle hover:text-fg`,children:`show full output`})]})}function k({text:e}){let[t,n]=(0,m.useState)(!1);return(0,E.jsxs)(`div`,{className:`my-1`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex items-baseline gap-2 text-[11px] italic text-subtle hover:text-muted`,children:[(0,E.jsx)(`span`,{children:`✱`}),(0,E.jsx)(`span`,{children:t?`thinking`:`thinking…`}),t?(0,E.jsx)(f,{size:11}):(0,E.jsx)(p,{size:11})]}),t&&(0,E.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap break-words border-l-2 border-line-subtle pl-3 text-[11px] italic leading-relaxed text-subtle`,children:e})]})}function A({message:e,results:t,hideTools:n}){let r=[],i=d(e.timestamp),a=!1;return e.blocks.forEach((o,s)=>{if(!w(o,n))return;let c=`${e.timestamp}-${s}`;if(o.type===`text`){if(!o.text.trim())return;e.role===`user`?(r.push((0,E.jsxs)(`div`,{className:`my-2 flex items-baseline gap-2 border-l-2 border-primary/60 bg-inset/40 px-3 py-2`,children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-[12px] font-bold text-primary`,children:`❯`}),(0,E.jsx)(`p`,{className:`min-w-0 flex-1 whitespace-pre-wrap break-words text-[12px] leading-relaxed text-fg`,children:o.text}),i&&!a&&(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-subtle`,title:e.timestamp,children:i})]},c)),a=!0):r.push((0,E.jsx)(`p`,{className:`my-2 whitespace-pre-wrap break-words text-[12px] leading-relaxed ${e.role===`system`?`text-subtle`:`text-fg/90`}`,children:o.text},c));return}if(o.type===`tool_call`){r.push((0,E.jsx)(O,{call:o,result:t.get(o.callId)},c));return}if(o.type===`thinking`){o.text.trim()&&r.push((0,E.jsx)(k,{text:o.text},c));return}}),r.length===0?null:(0,E.jsx)(E.Fragment,{children:r})}var j=2500;function M({worktreePath:e,vendor:t}){let{daemonConnected:n,streamConnected:r}=o(),a=u({daemonConnected:n,streamConnected:r}),[d,f]=(0,m.useState)([]),[p,y]=(0,m.useState)(null),[b,x]=(0,m.useState)(!0),[S,w]=(0,m.useState)([]),[D,O]=(0,m.useState)(``),[k,M]=(0,m.useState)(!1),[N,P]=(0,m.useState)(null),[F,I]=(0,m.useState)(!1),[L,R]=(0,m.useState)(!0),z=(0,m.useRef)(-1),B=(0,m.useRef)(null),V=(0,m.useRef)(!0),H=(0,m.useRef)(0),U=(0,m.useRef)(!0),W=(0,m.useRef)(null);(0,m.useEffect)(()=>{U.current=b,W.current=p},[b,p]);let G=(0,m.useCallback)(async(n=!1)=>{if(!e)return;let r=H.current;try{let i=await h(e,t);if(i.latestMtime===z.current&&!n)return;z.current=i.latestMtime;let a=i.sessions.at(-1)??null,o=U.current?a:W.current??a;r=++H.current;let s=o?await g(t,o):[];if(r!==H.current)return;f(i.sessions),w(s),y(o),P(null)}catch(e){r===H.current&&P(e instanceof Error?e.message:String(e))}finally{r===H.current&&I(!0)}},[e,t]),K=(0,m.useRef)(G);(0,m.useEffect)(()=>{K.current=G},[G]),(0,m.useEffect)(()=>{z.current=-1,I(!1),U.current=!0,W.current=null,V.current=!0,x(!0),y(null),O(``),M(!1),R(!0),K.current(!0);let e=window.setInterval(()=>{document.hidden||K.current()},j);return()=>window.clearInterval(e)},[e,t]);let q=e=>{let n=e===d.at(-1);U.current=n,W.current=e,x(n),y(e);let r=++H.current;g(t,e).then(e=>{r===H.current&&w(e)}).catch(e=>{r===H.current&&P(e instanceof Error?e.message:String(e))})};(0,m.useEffect)(()=>{let e=B.current;e&&V.current&&(e.scrollTop=e.scrollHeight)},[S]);let J=()=>{let e=B.current;if(!e)return;let t=v(e.scrollTop,e.scrollHeight,e.clientHeight);V.current=t,R(t)},Y=()=>{let e=B.current;e&&(e.scrollTop=e.scrollHeight,V.current=!0,R(!0))},X=(0,m.useMemo)(()=>{let e=new Map;for(let t of S)for(let n of t.blocks)n.type===`tool_result`&&e.set(n.callId,n);return e},[S]),Z=(0,m.useMemo)(()=>ee(S),[S]),Q=(0,m.useMemo)(()=>S.map(e=>C(e).toLowerCase()),[S]),$=(0,m.useMemo)(()=>{let e=D.trim().toLowerCase();return S.filter((t,n)=>(!e||Q[n].includes(e))&&T(t,k))},[S,Q,D,k]);return e?(0,E.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col border border-line bg-bg`,children:[(0,E.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 border-b border-line bg-surface px-2`,children:[(0,E.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Chat`}),d.length>0&&(0,E.jsx)(`select`,{value:p??``,onChange:e=>q(e.target.value),className:`max-w-44 border border-line bg-bg px-1 py-0.5 font-mono text-[10px] text-muted focus:outline-none`,title:`Engine session`,children:d.map((e,t)=>(0,E.jsxs)(`option`,{value:e,children:[`#`,t+1,` `,e.slice(0,8),t===d.length-1?` (latest)`:``]},e))}),(0,E.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 font-mono text-[10px] text-subtle`,children:[Z.contextTokens>0&&(0,E.jsxs)(`span`,{title:`Live context estimate (last turn's full prompt)`,children:[`ctx `,_(Z.contextTokens)]}),Z.outputTokens>0&&(0,E.jsxs)(`span`,{title:`Session tokens in / out`,children:[`⇡`,_(Z.inputTokens),` ⇣`,_(Z.outputTokens)]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>void G(!0),className:`text-subtle transition-colors hover:text-fg`,title:`Refresh transcript`,"aria-label":`Refresh transcript`,children:(0,E.jsx)(s,{size:11,strokeWidth:2})})]})]}),S.length>0&&(0,E.jsxs)(`div`,{className:`flex h-7 shrink-0 items-center gap-2 border-b border-line px-2`,children:[(0,E.jsx)(l,{size:11,strokeWidth:2,className:`shrink-0 text-subtle`}),(0,E.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{e.key===`Escape`&&D&&(e.preventDefault(),O(``))},placeholder:`Search transcript…`,spellCheck:!1,className:`min-w-0 flex-1 bg-transparent font-mono text-[11px] text-fg placeholder:text-subtle focus:outline-none`}),D.trim()&&(0,E.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px] text-subtle`,children:[$.length,`/`,S.length]}),D.trim()&&(0,E.jsx)(`button`,{type:`button`,onClick:()=>O(``),className:`shrink-0 text-subtle transition-colors hover:text-fg`,"aria-label":`clear transcript search`,title:`Clear search`,children:(0,E.jsx)(c,{size:12,strokeWidth:2})}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>M(e=>!e),className:`shrink-0 border px-1.5 py-0.5 font-mono text-[10px] transition-colors ${k?`border-primary bg-inset text-fg`:`border-line bg-bg text-subtle hover:border-primary hover:text-fg`}`,title:k?`Show tool calls`:`Hide tool calls — read just the conversation`,children:k?`tools off`:`tools`})]}),(0,E.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,E.jsx)(`div`,{ref:B,onScroll:J,className:`min-h-0 flex-1 overflow-y-auto px-3 py-2`,children:N?a?(0,E.jsxs)(`div`,{className:`py-4 text-[12px] leading-relaxed text-subtle`,children:[`The `,i(),` daemon is offline — the transcript will reappear once it reconnects.`]}):(0,E.jsxs)(`div`,{className:`flex flex-col items-start gap-2 py-4`,children:[(0,E.jsx)(`span`,{className:`text-[12px] text-kobe-red`,children:`Couldn't load the transcript.`}),(0,E.jsxs)(`button`,{type:`button`,onClick:()=>void G(!0),className:`flex items-center gap-1.5 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:[(0,E.jsx)(s,{size:11,strokeWidth:2}),`Retry`]})]}):F?S.length===0?(0,E.jsx)(`div`,{className:`py-4 text-[12px] leading-relaxed text-subtle`,children:`No engine session recorded for this worktree yet. Open a Vendor tab and start a conversation — the transcript appears here.`}):$.length===0?(0,E.jsxs)(`div`,{className:`py-4 text-[12px] leading-relaxed text-subtle`,children:[`No messages match “`,D.trim(),`”.`]}):$.map((e,t)=>(0,E.jsx)(A,{message:e,results:X,hideTools:k},`${e.sessionId}-${t}`)):(0,E.jsx)(`div`,{className:`py-4 text-[12px] text-subtle`,children:`Loading transcript…`})}),!L&&$.length>0&&(0,E.jsx)(`button`,{type:`button`,onClick:Y,className:`absolute bottom-3 right-4 flex items-center gap-1 border border-line bg-surface px-2 py-1 font-mono text-[10px] text-muted shadow-md transition-colors hover:border-primary hover:text-fg`,children:`↓ latest`})]})]}):(0,E.jsx)(`div`,{className:`flex h-full items-center justify-center text-[12px] text-subtle`,children:`This task has no worktree yet.`})}export{M as t};
@@ -1 +0,0 @@
1
- import{Board as e}from"./Board-DP9YsVFQ.js";var t=e;export{t as component};
@@ -1 +0,0 @@
1
- import{IssuesPage as e}from"./IssuesPage-Ssrf59X_.js";var t=e;export{t as component};
@@ -1 +0,0 @@
1
- import{AppShell as e}from"./AppShell-BmyCBsrg.js";var t=e;export{t as component};