@sma1lboy/kobe 0.8.171 → 0.8.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +351 -351
- package/dist/cli/kobe-run.js +350 -350
- package/dist/cli/rove-run.js +350 -350
- package/dist/web-ui/assets/AppShell-BrScFMXx.js +5 -0
- package/dist/web-ui/assets/Board-Br1k09BD.js +1 -0
- package/dist/web-ui/assets/{BoardPeek-CdAMtCEs.js → BoardPeek-sYiqhN0E.js} +2 -2
- package/dist/web-ui/assets/{ChatTerminal-DNTeFtk5.js → ChatTerminal-B80ADLf2.js} +3 -3
- package/dist/web-ui/assets/ChatTranscript-D7-ZUa5E.js +1 -0
- package/dist/web-ui/assets/{ConfirmDialog-DChCLBRW.js → ConfirmDialog-CqMTxyHy.js} +1 -1
- package/dist/web-ui/assets/{IssueIntakePanel-BN31TW37.js → IssueIntakePanel-CBM21cyc.js} +1 -1
- package/dist/web-ui/assets/{IssuePeek-BT8ZmKTT.js → IssuePeek-Ce8Qc6KY.js} +1 -1
- package/dist/web-ui/assets/{IssuesPage-H7bWnbU-.js → IssuesPage-D-Nloamt.js} +1 -1
- package/dist/web-ui/assets/{RichEditor-DJFl5TvH.js → RichEditor-CY2cypY2.js} +4 -4
- package/dist/web-ui/assets/SettingsPage-GfBeP2sy.js +2 -0
- package/dist/web-ui/assets/{SlideOver-Dxtk6Gn2.js → SlideOver-CI7vBtQJ.js} +1 -1
- package/dist/web-ui/assets/ViewToggle-C6Kw_T1E.js +1 -0
- package/dist/web-ui/assets/WorkspaceTabs-TgLV0X8R.js +3 -0
- package/dist/web-ui/assets/active-task-CCVuYWP9.js +1 -0
- package/dist/web-ui/assets/arrow-left-wT_Oflhg.js +1 -0
- package/dist/web-ui/assets/board-DFOpP7Em.js +1 -0
- package/dist/web-ui/assets/{chips-Da37C4KZ.js → chips-NdkDNqV7.js} +1 -1
- package/dist/web-ui/assets/{columns-3-CQGAnX-4.js → columns-3-Dzac_n1b.js} +1 -1
- package/dist/web-ui/assets/createLucideIcon-C6nfansM.js +1 -0
- package/dist/web-ui/assets/desktop-ChKD7MFx.js +2 -0
- package/dist/web-ui/assets/{engines-Cnxy1hW9.js → engines-CZCmPVm2.js} +1 -1
- package/dist/web-ui/assets/{external-link-BwT2u1hD.js → external-link-Cj-9rta8.js} +1 -1
- package/dist/web-ui/assets/{external-store-DJlWpyYC.js → external-store-CNyRxjsC.js} +1 -1
- package/dist/web-ui/assets/{harness-B5VlW5ov.js → harness-DXK1I5rS.js} +1 -1
- package/dist/web-ui/assets/index-DBrG3NdJ.js +10 -0
- package/dist/web-ui/assets/issues-BjnSNgu-.js +4 -0
- package/dist/web-ui/assets/issues-XV3sbo3Z.js +1 -0
- package/dist/web-ui/assets/{lazy-issue-panels-BcU72R8r.js → lazy-issue-panels-GvnRdSfG.js} +3 -3
- package/dist/web-ui/assets/plus-Bz25iNHX.js +1 -0
- package/dist/web-ui/assets/{react-dom-DCnDkJvp.js → react-dom-Ccqy9Xi6.js} +1 -1
- package/dist/web-ui/assets/{rotate-cw-D-UUtiD0.js → rotate-cw-BsVaYno1.js} +1 -1
- package/dist/web-ui/assets/routes-5BxWgajG.js +1 -0
- package/dist/web-ui/assets/search-zs6lDYfz.js +1 -0
- package/dist/web-ui/assets/{settings-tPcmEHCP.js → settings-Cavhxdh3.js} +1 -1
- package/dist/web-ui/assets/{store-BXzqsTjs.js → store-BK5yanfN.js} +2 -2
- package/dist/web-ui/assets/{tabs-Dx-TnbvG.js → tabs-DHBP2ShA.js} +1 -1
- package/dist/web-ui/assets/{task._taskId-CTj9HrUF.js → task._taskId-BGlWW77m.js} +2 -2
- package/dist/web-ui/assets/task._taskId-DeiVXq4X.js +1 -0
- package/dist/web-ui/assets/terminal-6BCvBu4_.js +1 -0
- package/dist/web-ui/assets/{toast-BXjAT0ix.js → toast-B7pad_QC.js} +1 -1
- package/dist/web-ui/assets/{triage-DDohuPMh.js → triage-DP1bTLMs.js} +1 -1
- package/dist/web-ui/assets/{use-focus-trap-DNMrlNR0.js → use-focus-trap-oPsw86zw.js} +1 -1
- package/dist/web-ui/assets/web-transport-BFuf9jKF.js +1 -0
- package/dist/web-ui/assets/{with-selector-B5R3h-Ow.js → with-selector-D8BuTuR6.js} +1 -1
- package/dist/web-ui/assets/worktrees-BnyMLZJH.js +1 -0
- package/dist/web-ui/assets/x-MtSojW5V.js +1 -0
- package/dist/web-ui/index.html +20 -20
- package/package.json +1 -1
- package/dist/web-ui/assets/AppShell-A79AgA-r.js +0 -5
- package/dist/web-ui/assets/Board-By7g_Fl3.js +0 -1
- package/dist/web-ui/assets/ChatTranscript-Co0UhezW.js +0 -1
- package/dist/web-ui/assets/SettingsPage-DX3tv5Yc.js +0 -2
- package/dist/web-ui/assets/ViewToggle-BHBzWlni.js +0 -1
- package/dist/web-ui/assets/WorkspaceTabs-CUfXWk-O.js +0 -3
- package/dist/web-ui/assets/active-task-CuoFMFoR.js +0 -1
- package/dist/web-ui/assets/arrow-left-DNM2CHhS.js +0 -1
- package/dist/web-ui/assets/board-CvA1XFBt.js +0 -1
- package/dist/web-ui/assets/createLucideIcon-CM5xLVj1.js +0 -1
- package/dist/web-ui/assets/desktop-C2FN7ili.js +0 -2
- package/dist/web-ui/assets/index-siRV5zR0.js +0 -10
- package/dist/web-ui/assets/issues-7mJB6TUn.js +0 -1
- package/dist/web-ui/assets/issues-BMqItbVN.js +0 -4
- package/dist/web-ui/assets/plus-BbX5qXba.js +0 -1
- package/dist/web-ui/assets/routes-Dq_5HCeD.js +0 -1
- package/dist/web-ui/assets/search-BxbFZoup.js +0 -1
- package/dist/web-ui/assets/task._taskId-IF3pimu3.js +0 -1
- package/dist/web-ui/assets/terminal-qBEkzc-m.js +0 -1
- package/dist/web-ui/assets/web-transport-D0bugxxv.js +0 -1
- package/dist/web-ui/assets/worktrees-H75CQbMU.js +0 -1
- package/dist/web-ui/assets/x-7cB9X7Hi.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{IssuesPage as e}from"./IssuesPage-H7bWnbU-.js";var t=e;export{t as component};
|
|
@@ -1,4 +0,0 @@
|
|
|
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
|
-
`)}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
|
-
`)}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
|
-
`)}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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CM5xLVj1.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AppShell as e}from"./AppShell-A79AgA-r.js";var t=e;export{t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CM5xLVj1.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
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-CTj9HrUF.js";import{d as a}from"./createLucideIcon-CM5xLVj1.js";import{n as o}from"./active-task-CuoFMFoR.js";import{AppShell as s}from"./AppShell-A79AgA-r.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 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=class extends Error{status;url;detail;body;constructor(e){super(`${e.label} failed (${e.status})${e.detail?`: ${e.detail}`:``}`),this.name=e.name||`ApiError`,this.status=e.status,this.url=e.url,this.detail=e.detail??``,this.body=e.body}};function d(e,t){let n=[];for(let[e,r]of Object.entries(t??{})){let t=Array.isArray(r)?r:[r];for(let r of t)r!=null&&n.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`)}return n.length===0?e:`${e}${e.includes(`?`)?`&`:`?`}${n.join(`&`)}`}async function f(e){let t=await e.text().catch(()=>``);if(!t)return{text:t};try{return{text:t,json:JSON.parse(t)}}catch{return{text:t}}}function p(e){let t=e.json;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t,n=typeof e.error==`string`?e.error:``,r=typeof e.name==`string`?e.name:void 0;if(n)return{detail:n,name:r}}return{detail:e.text.trim()}}async function m(e,t,n={}){let r=d(e,n.query),i=await fetch(r,t),a=await f(i),o=a.json,s=o&&typeof o==`object`&&!Array.isArray(o)&&typeof o.error==`string`&&o.error.length>0;if(!i.ok||s){let{detail:e,name:t}=p(a);throw new u({url:r,status:i.status,label:n.label??r,detail:e,body:o,name:t})}return o??{}}function h(e,t){return{method:e,headers:{"content-type":`application/json`},...t===void 0?{}:{body:JSON.stringify(t)}}}var g={get(e,t){return m(e,{method:`GET`},t)},post(e,t,n){return m(e,h(`POST`,t),n)},put(e,t,n){return m(e,h(`PUT`,t),n)},patch(e,t,n){return m(e,h(`PATCH`,t),n)},delete(e,t,n){return m(e,h(`DELETE`,t),n)},form(e,t,n){return m(e,{method:`POST`,body:t},n)},async getOr(e,t,n){try{return await m(e,{method:`GET`},n)}catch{return t}}},_=s({closePtyTab:()=>b,ptyUrl:()=>y,sendPtyText:()=>x});function v(e){let t=location.protocol===`https:`,n=e===`ws`?t?`wss`:`ws`:t?`https`:`http`,r=location.hostname||`localhost`,i=Number.parseInt(location.port||`5173`,10);return`${n}://${r}:${Number.isFinite(i)?i+2:5175}`}function y(e,t,n,r,i){let a=new URLSearchParams({tab:e,taskId:t,mode:n,cols:String(r),rows:String(i)});return`${v(`ws`)}/pty?${a.toString()}`}async function b(e){try{await g.post(`${v(`http`)}/pty/close`,{tab:e},{label:`close PTY tab`})}catch{}}async function x(e,t,n){try{let r=await g.post(`${v(`http`)}/pty/send`,{tab:e,taskId:t,text:n},{label:`send PTY text`});if(!r.sent)throw Error(`send failed`);return{spawned:r.spawned===!0}}catch(e){throw e instanceof u&&e.status===404&&!e.detail?Error("the PTY server doesn't know /pty/send — restart `rove web` (the sidecar doesn't hot-reload)"):e}}export{u as a,s as c,_ as i,l,y as n,g as o,x as r,o as s,b as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e({daemonConnected:e,streamConnected:t}){return t?e?`connected`:`daemon-offline`:`event-stream-disconnected`}function t(t){return e(t)===`connected`}function n(e){return!t(e)}function r(t){return!!t.hydrated&&e(t)===`daemon-offline`}function i(t){let n=e(t);return n===`connected`?{ok:!0,label:`daemon connected`}:n===`daemon-offline`?{ok:!1,label:`no daemon`,title:"Daemon offline — if it doesn't recover, run `rove doctor` or `rove reset` in a terminal."}:{ok:!1,label:`connecting…`}}export{r as n,i as r,n as t};
|
|
@@ -1 +0,0 @@
|
|
|
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-DChCLBRW.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 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CM5xLVj1.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
|