@sma1lboy/kobe 0.8.198 → 0.8.200
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 +362 -362
- package/dist/cli/kobe-run.js +362 -362
- package/dist/cli/rove-run.js +362 -362
- package/dist/web-ui/assets/{AppShell-CmceqjY-.js → AppShell-TzCpzcDS.js} +1 -1
- package/dist/web-ui/assets/{Board-DBuYe1Q2.js → Board-72QPdwHn.js} +1 -1
- package/dist/web-ui/assets/{ConfirmDialog-C9xYoPEx.js → ConfirmDialog-CBqd0wMR.js} +1 -1
- package/dist/web-ui/assets/{IssuesPage-D0aXMK3K.js → IssuesPage-BlWjFWpu.js} +1 -1
- package/dist/web-ui/assets/{SettingsPage-GfBeP2sy.js → SettingsPage-DovXUI00.js} +1 -1
- package/dist/web-ui/assets/{ViewToggle-C6Kw_T1E.js → ViewToggle-Bvvh1yLG.js} +1 -1
- package/dist/web-ui/assets/board-BnvucJGQ.js +1 -0
- package/dist/web-ui/assets/{columns-3-Dzac_n1b.js → columns-3-xX5P4LBE.js} +1 -1
- package/dist/web-ui/assets/{desktop-BerzaX7n.js → desktop-CB2NHSKZ.js} +2 -2
- package/dist/web-ui/assets/{index-DEdAoep_.js → index-BccGl3xk.js} +3 -3
- package/dist/web-ui/assets/issues-CduWI37C.js +1 -0
- package/dist/web-ui/assets/routes-bdJ1BCG5.js +1 -0
- package/dist/web-ui/assets/{task._taskId-BOaY4DV_.js → task._taskId-561S2TB3.js} +1 -1
- package/dist/web-ui/assets/{task._taskId-BpThmZkz.js → task._taskId-CXiB2eGU.js} +2 -2
- package/dist/web-ui/assets/{toast-B7pad_QC.js → toast-2mA6GzBq.js} +1 -1
- package/dist/web-ui/assets/{triage-DP1bTLMs.js → triage-DjBy6dI9.js} +1 -1
- package/dist/web-ui/assets/{worktrees-bs_8ANrl.js → worktrees-qGA9B-VY.js} +1 -1
- package/dist/web-ui/index.html +6 -6
- package/package.json +1 -1
- package/dist/web-ui/assets/board-CH4KUmnb.js +0 -1
- package/dist/web-ui/assets/issues-DHu-h5EM.js +0 -1
- package/dist/web-ui/assets/routes-BZCFfJIJ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,u as t}from"./terminal-6BCvBu4_.js";import{_ as n,f as r,l as i,r as a,y as o}from"./tabs-DHBP2ShA.js";import{d as s,m as c,p as l,t as u}from"./createLucideIcon-C6nfansM.js";import{a as d,n as f,r as p}from"./toast-B7pad_QC.js";import{n as m,t as h}from"./ViewToggle-C6Kw_T1E.js";import{n as g,t as _}from"./store-BK5yanfN.js";import{n as v,t as y}from"./active-task-CCVuYWP9.js";import{t as b}from"./external-store-CNyRxjsC.js";import{c as x,d as S,i as C,l as w,p as T,r as E,t as D,u as O}from"./triage-DP1bTLMs.js";import{i as k,r as A,t as j}from"./WorkspaceTabs-ZhpZ33cd.js";import{t as M}from"./SettingsPage-GfBeP2sy.js";import{t as N}from"./ChatTranscript-Bw-ROsjY.js";import{t as ee}from"./plus-Bz25iNHX.js";import{t as te}from"./search-zs6lDYfz.js";import{t as ne}from"./x-MtSojW5V.js";import{n as P,t as F}from"./activity-BjTd1D8q.js";import{t as re}from"./use-focus-trap-oPsw86zw.js";import{t as I}from"./engines-CZCmPVm2.js";import{n as ie}from"./settings-Cavhxdh3.js";import{a as L,i as ae,r as oe}from"./vendor-CdtpTJrf.js";import{r as R}from"./web-transport-BFuf9jKF.js";import{n as se,t as ce}from"./time-kviT26Tm.js";import{n as le,t as z}from"./ConfirmDialog-C9xYoPEx.js";import{t as ue}from"./text-match-DW3sD-Rt.js";import{t as de}from"./SlideOver-CI7vBtQJ.js";import{n as fe,r as pe,t as me}from"./chips-NdkDNqV7.js";var he=u(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ge=u(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),_e=u(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ve=u(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),B=t(o(),1),V=c();function ye({onClose:e}){let{tasks:t}=g(),n=d(),i=(0,B.useRef)(null);re(i);let a=(0,B.useMemo)(()=>{let e=new Set,n=[];for(let r of t)r.repo&&!e.has(r.repo)&&(e.add(r.repo),n.push(r.repo));return n.sort()},[t]),o=(0,B.useMemo)(()=>new Set(t.map(e=>e.worktreePath).filter(Boolean)),[t]),[s,c]=(0,B.useState)(a[0]??``),[u,m]=(0,B.useState)(null),[h,y]=(0,B.useState)(!1),[b,x]=(0,B.useState)(null),[S,C]=(0,B.useState)(!1),w=async e=>{if(e){y(!0),m(null);try{let{worktrees:t}=await _(`worktree.discoverAdoptable`,{repo:e});m(t)}catch(e){p(`scan worktrees`,e),m([])}finally{y(!1)}}},T=async t=>{x(t.path);try{let{task:i}=await _(`worktree.adopt`,{repo:s,worktreePath:t.path,branch:t.branch,ifExists:`return`});r(i.id),v(i.id),n({to:`/task/$taskId`,params:{taskId:i.id}}),f(`success`,`Adopted ${t.branch||t.path}`),e()}catch(e){p(`adopt worktree`,e)}finally{x(null)}};return S?(0,V.jsx)(E,{onClose:e}):a.length===0?(0,V.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,V.jsxs)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-label":`Adopt worktree`,className:`flex w-[32rem] max-w-[calc(100vw-2rem)] flex-col border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-subtle`,children:[`pull an existing worktree into `,l()]})]}),(0,V.jsxs)(`div`,{className:`px-3 py-6 text-center`,children:[(0,V.jsxs)(`p`,{className:`text-[12px] leading-relaxed text-subtle`,children:[`No repos known to `,l(),` yet. Create a task in a repo first, then come back to adopt its worktrees.`]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>C(!0),className:`mt-4 border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10`,children:`Create a task`})]}),(0,V.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,V.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:`Close`})})]})}):(0,V.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,V.jsxs)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-label":`Adopt worktree`,className:`flex max-h-[80vh] w-[32rem] max-w-[calc(100vw-2rem)] flex-col border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-subtle`,children:[`pull an existing worktree into `,l()]})]}),(0,V.jsxs)(`div`,{className:`space-y-2 px-3 py-3`,children:[(0,V.jsx)(`div`,{className:`mb-1 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Repo`}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),className:`min-w-0 flex-1 border border-line bg-bg px-2 py-1.5 text-[12px] text-fg focus:border-line-active focus:outline-none`,children:a.map(e=>(0,V.jsx)(`option`,{value:e,children:e},e))}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void w(s),disabled:!s||h,className:`shrink-0 border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10 disabled:opacity-40`,children:h?`Scanning…`:`Scan`})]})]}),(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto border-t border-line`,children:u===null?(0,V.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Pick a repo and Scan to find adoptable worktrees.`}):u.length===0?(0,V.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No adoptable worktrees found for this repo.`}):u.map(e=>{let t=o.has(e.path);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.dirty&&(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),e.kobeManaged&&(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`})]}),(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.lastActivityMs>0&&(0,V.jsx)(`span`,{className:`ml-auto shrink-0`,children:se(e.lastActivityMs)})]})]}),t?(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`tracked`}):(0,V.jsx)(`button`,{type:`button`,onClick:()=>void T(e),disabled:b!==null,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg disabled:opacity-40`,children:b===e.path?`Adopting…`:`Adopt`})]},e.path)})}),(0,V.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,V.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:`Close`})})]})})}var H=b({query:``,statusFilter:`all`,sortMode:`default`,showArchived:!1}),U=null;function W(e){H.update(t=>({...t,...e}))}function G(e){W({query:e})}function K(e){W({statusFilter:e})}function be(e){W({sortMode:e})}function xe(e){W({showArchived:e})}function Se(e){!e||e===U||(U=e,W({sortMode:e}))}function Ce(){return H.useSnapshot()}function q(e){let t=Date.parse(e.updatedAt||e.createdAt);return Number.isFinite(t)?t:0}function J(e,t){let n=q(t)-q(e);return n===0?t.id.localeCompare(e.id):n}function we(e,t){let n=e.filter(e=>e.kind===`main`),r=e.filter(e=>e.kind!==`main`&&e.pinned),i=e.filter(e=>e.kind!==`main`&&!e.pinned);return t===`recent`&&(r.sort(J),i.sort(J)),[...n,...r,...i]}function Te(e,t){return ue([e.title,e.branch,e.repo,e.worktreePath,e.vendor,e.status].filter(Boolean).join(` `),t)}function Ee({task:e,onClose:t}){return(0,V.jsx)(de,{open:e!==null,onClose:t,title:e?(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`shrink-0 border border-line px-1 py-0.5 font-mono text-[9px] uppercase tracking-wide text-subtle`,children:`Archived`}),(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:e.title||e.branch})]}):void 0,children:e&&(0,V.jsx)(N,{worktreePath:e.worktreePath??null,vendor:L(e.vendor),title:e.title||e.branch})})}function Y({children:e,suffix:t}){return(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`h-px flex-1 bg-line`}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] font-bold uppercase text-primary`,children:t})]}):null]})}function De({task:e,engine:t,job:n,changes:r,engineName:i,active:a,onClick:o}){let s=n?.phase===`running`,c=s?`materializing…`:P(t?.state),l=ce(e.updatedAt||e.createdAt);return(0,V.jsxs)(`button`,{type:`button`,"data-task-id":e.id,onClick:o,className:`group w-full border-l-2 px-3 py-2 text-left transition-colors ${a?`border-primary bg-inset`:`border-transparent hover:bg-surface`}`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s?(0,V.jsx)(_e,{size:10,strokeWidth:2.5,className:`shrink-0 animate-spin text-primary`}):(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${F(t?.state)}`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] ${a?`text-fg`:`text-fg/90`}`,children:e.title||e.branch}),(0,V.jsx)(pe,{pr:e.prStatus}),e.pinned&&(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`PIN`}),(0,V.jsx)(me,{counts:r})]}),(0,V.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 pl-3.5 text-[11px] text-subtle`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:e.branch||`—`}),(0,V.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[(0,V.jsx)(fe,{label:i}),c&&(0,V.jsx)(`span`,{className:`text-muted`,children:c}),l&&(0,V.jsx)(`span`,{className:`text-subtle`,children:l})]})]})]})}function Oe({task:e,onRestore:t,onPreview:n}){let r=e.title||e.branch;return(0,V.jsxs)(`div`,{className:`group flex items-center gap-2 border-l-2 border-transparent px-3 py-1.5`,children:[n?(0,V.jsx)(`button`,{type:`button`,onClick:n,title:`Preview history`,className:`min-w-0 flex-1 truncate text-left text-[12px] text-subtle transition-colors hover:text-fg`,children:r}):(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-subtle`,children:r}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 border border-line bg-surface px-1.5 py-0.5 text-[10px] text-muted opacity-0 transition-opacity hover:border-primary hover:text-fg group-hover:opacity-100`,children:`Restore`})]})}function ke({onOpenSettings:e,onNewTask:t,onAdopt:i}){let{tasks:a,engineStates:o,jobs:s,worktreeChanges:c,uiPrefs:l,hydrated:u,streamConnected:f}=g(),{selectedTaskId:m}=n(),h=I(),y=(0,B.useMemo)(()=>oe(a),[a]),b=e=>ae(h,e,y),{query:x,statusFilter:S,sortMode:w,showArchived:T}=Ce(),E=(0,B.useRef)(null),O=(0,B.useRef)(null);(0,B.useEffect)(()=>{m&&E.current?.querySelector(`[data-task-id="${CSS.escape(m)}"]`)?.scrollIntoView({block:`nearest`})},[m]);let k=l?.sortMode;(0,B.useEffect)(()=>{Se(k)},[k]);let A=(0,B.useMemo)(()=>a.filter(e=>!e.archived),[a]),j=(0,B.useMemo)(()=>a.filter(e=>e.archived&&e.kind!==`main`),[a]),M=(0,B.useMemo)(()=>we(A.filter(e=>Te(e,x)&&D(o[e.id],c[e.worktreePath],S)),w),[A,x,S,w,o,c]),N=M.filter(e=>e.kind===`main`),P=M.filter(e=>e.kind!==`main`),F=!u||!f&&a.length===0,re=d(),L=e=>{r(e),v(e),re({to:`/task/$taskId`,params:{taskId:e}})};(0,B.useEffect)(()=>{let e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;let t=e.key,n=t===`ArrowDown`||t===`ArrowUp`,r=t===`j`||t===`ArrowDown`,i=t===`k`||t===`ArrowUp`,a=t===`/`;if(!r&&!i&&!a)return;let o=e.target;if(o&&(o.tagName===`INPUT`||o.tagName===`TEXTAREA`||o.tagName===`SELECT`||o.isContentEditable)||document.querySelector(`[role=dialog],[role=alertdialog]`)||document.querySelector(`[data-settings-open]`))return;if(a){e.preventDefault(),O.current?.focus();return}if(n&&o&&o!==document.body&&!E.current?.contains(o)||M.length===0)return;e.preventDefault();let s=M.findIndex(e=>e.id===m),c=s===-1?0:Math.min(Math.max(s+(r?1:-1),0),M.length-1);L(M[c].id)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[M,m]);let R=e=>{_(`task.archive`,{taskId:e.id,archived:!1}).catch(t=>p(`restore "${e.title||e.branch}"`,t))},[se,ce]=(0,B.useState)(!1),[le,z]=(0,B.useState)(null);return(0,B.useEffect)(()=>{let e=!0;return ie().then(t=>{e&&ce(t.archivedHistoryPreview===!0)}).catch(()=>{}),()=>{e=!1}},[]),(0,V.jsxs)(`aside`,{className:`flex w-64 shrink-0 flex-col border-r border-line bg-bg`,children:[(0,V.jsxs)(`div`,{className:`border-b border-line bg-surface/50 px-3 py-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Tasks`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>be(w==="default"?`recent`:`default`),className:`font-mono text-[10px] uppercase ${w===`recent`?`text-primary`:`text-muted hover:text-fg`}`,title:`Toggle task sort`,children:`sort`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-muted`,children:[M.length,`/`,A.length]}),(0,V.jsx)(`button`,{type:`button`,onClick:i,className:`text-muted transition-colors hover:text-primary`,title:`Adopt an existing worktree`,"aria-label":`Adopt worktree`,children:(0,V.jsx)(ge,{size:14,strokeWidth:1.9})}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted transition-colors hover:text-primary`,title:`New task`,"aria-label":`New task`,children:(0,V.jsx)(ee,{size:14,strokeWidth:2.2})})]})]}),(0,V.jsxs)(`label`,{className:`mt-2 flex h-8 items-center gap-2 border border-line bg-bg px-2 text-[12px] text-muted focus-within:border-line-active`,children:[(0,V.jsx)(te,{size:14,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,V.jsx)(`input`,{ref:O,value:x,onChange:e=>G(e.target.value),onKeyDown:e=>{e.key===`Enter`&&M.length>0?(e.preventDefault(),L(M[0].id),e.currentTarget.blur()):e.key===`Escape`&&x&&(e.preventDefault(),G(``))},placeholder:`Filter tasks`,className:`min-w-0 flex-1 bg-transparent text-fg placeholder:text-subtle focus:outline-none`}),x&&(0,V.jsx)(`button`,{type:`button`,onClick:()=>G(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear task filter`,title:`Clear filter`,children:(0,V.jsx)(ne,{size:13,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`mt-2 flex items-center gap-1`,children:[{key:`all`,label:`All`,title:`All tasks`},{key:`attention`,label:`Needs`,title:`Needs input / errored / rate-limited`}].map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>K(e.key),title:e.title,className:`border px-1.5 py-0.5 text-[10px] transition-colors ${S===e.key?`border-primary bg-inset text-fg`:`border-line bg-bg text-subtle hover:border-primary hover:text-fg`}`,children:e.label},e.key))})]}),(0,V.jsxs)(`div`,{ref:E,className:`flex-1 overflow-y-auto`,children:[F?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-4 text-[12px] text-subtle`,children:[(0,V.jsx)(_e,{size:13,strokeWidth:2,className:`animate-spin`}),(0,V.jsx)(`span`,{children:`connecting…`})]}):A.length===0?(0,V.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,V.jsx)(`p`,{children:`No tasks yet.`}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`mt-3 border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`+ New task`})]}):M.length===0?(0,V.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,V.jsx)(`div`,{children:x?`No matches for “${x}”.`:`No tasks in this status.`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>{G(``),K(`all`)},className:`mt-3 border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`Clear filter`})]}):(0,V.jsxs)(V.Fragment,{children:[N.length>0&&(0,V.jsx)(Y,{children:`Projects`}),N.map(e=>(0,V.jsx)(De,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===m,onClick:()=>L(e.id)},e.id)),P.length>0&&(0,V.jsx)(Y,{suffix:w==="default"?void 0:w,children:`Worktrees`}),P.map(e=>(0,V.jsx)(De,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===m,onClick:()=>L(e.id)},e.id))]}),!F&&j.length>0&&(0,V.jsxs)(`div`,{className:`mt-2 border-t border-line-subtle pb-2`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>xe(!T),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Archived`}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:j.length}),(0,V.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-subtle`,children:T?`−`:`+`})]}),T&&j.map(e=>(0,V.jsx)(Oe,{task:e,onRestore:()=>R(e),onPreview:se?()=>z(e):void 0},e.id))]})]}),(0,V.jsx)(Ee,{task:le,onClose:()=>z(null)}),(0,V.jsx)(`div`,{className:`border-t border-line p-2`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:e,className:`flex w-full items-center gap-2 border border-line bg-surface px-2 py-2 text-left text-[12px] text-muted transition-colors hover:border-primary hover:bg-inset hover:text-fg`,children:[(0,V.jsx)(C,{size:15,strokeWidth:1.8}),(0,V.jsx)(`span`,{children:`Settings`})]})})]})}async function Ae(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function X(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var je=/^\/api\/issue-assets\/[a-f0-9]{16}\/[A-Za-z0-9_-]+\.[a-z0-9]+$/;function Me(e){let t=e.trim();return je.test(t)?t:null}function Ne(e){let t=e.trim();return/^https?:\/\//i.test(t)?t:t.startsWith(`//`)?null:t.startsWith(`/`)||t.startsWith(`#`)||t.startsWith(`./`)||t.startsWith(`../`)?t:null}var Pe=`(?:[^()]|\\([^()]*\\))+`,Fe=RegExp(`!\\[([^\\]]*)\\]\\((${Pe})\\)`,`g`),Ie=RegExp(`\\[([^\\]]+)\\]\\((${Pe})\\)`,`g`);function Le(e,t){let n=Ne(t.replace(/&/g,`&`));return n?`<a href="${X(n)}" target="_blank" rel="noopener noreferrer" class="kobe-md-link">${e}</a>`:`${e}(${t})`}function Re(e){let t=e;return t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(Fe,(e,t,n)=>{let r=Me(n.replace(/&/g,`&`));return r?`<img src="${X(r)}" alt="${X(t)}" loading="lazy" class="kobe-md-img">`:t?Le(t,n):``})),t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(Ie,(e,t,n)=>Le(t,n))),t=t.replace(/\*\*(.+?)\*\*/g,`<strong>$1</strong>`),t=t.replace(/(^|[^*])\*([^*]+)\*/g,`$1<em>$2</em>`),t}function Z(e){return e.split(/(`[^`]+`)/g).map((e,t)=>t%2==1?`<code class="kobe-md-code">${e.slice(1,-1)}</code>`:Re(e)).join(``)}function ze(e){let t=e.replace(/\r\n/g,`
|
|
1
|
+
import{o as e,u as t}from"./terminal-6BCvBu4_.js";import{_ as n,f as r,l as i,r as a,y as o}from"./tabs-DHBP2ShA.js";import{d as s,m as c,p as l,t as u}from"./createLucideIcon-C6nfansM.js";import{a as d,n as f,r as p}from"./toast-2mA6GzBq.js";import{n as m,t as h}from"./ViewToggle-Bvvh1yLG.js";import{n as g,t as _}from"./store-BK5yanfN.js";import{n as v,t as y}from"./active-task-CCVuYWP9.js";import{t as b}from"./external-store-CNyRxjsC.js";import{c as x,d as S,i as C,l as w,p as T,r as E,t as D,u as O}from"./triage-DjBy6dI9.js";import{i as k,r as A,t as j}from"./WorkspaceTabs-ZhpZ33cd.js";import{t as M}from"./SettingsPage-DovXUI00.js";import{t as N}from"./ChatTranscript-Bw-ROsjY.js";import{t as ee}from"./plus-Bz25iNHX.js";import{t as te}from"./search-zs6lDYfz.js";import{t as ne}from"./x-MtSojW5V.js";import{n as P,t as F}from"./activity-BjTd1D8q.js";import{t as re}from"./use-focus-trap-oPsw86zw.js";import{t as I}from"./engines-CZCmPVm2.js";import{n as ie}from"./settings-Cavhxdh3.js";import{a as L,i as ae,r as oe}from"./vendor-CdtpTJrf.js";import{r as R}from"./web-transport-BFuf9jKF.js";import{n as se,t as ce}from"./time-kviT26Tm.js";import{n as le,t as z}from"./ConfirmDialog-CBqd0wMR.js";import{t as ue}from"./text-match-DW3sD-Rt.js";import{t as de}from"./SlideOver-CI7vBtQJ.js";import{n as fe,r as pe,t as me}from"./chips-NdkDNqV7.js";var he=u(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ge=u(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),_e=u(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ve=u(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),B=t(o(),1),V=c();function ye({onClose:e}){let{tasks:t}=g(),n=d(),i=(0,B.useRef)(null);re(i);let a=(0,B.useMemo)(()=>{let e=new Set,n=[];for(let r of t)r.repo&&!e.has(r.repo)&&(e.add(r.repo),n.push(r.repo));return n.sort()},[t]),o=(0,B.useMemo)(()=>new Set(t.map(e=>e.worktreePath).filter(Boolean)),[t]),[s,c]=(0,B.useState)(a[0]??``),[u,m]=(0,B.useState)(null),[h,y]=(0,B.useState)(!1),[b,x]=(0,B.useState)(null),[S,C]=(0,B.useState)(!1),w=async e=>{if(e){y(!0),m(null);try{let{worktrees:t}=await _(`worktree.discoverAdoptable`,{repo:e});m(t)}catch(e){p(`scan worktrees`,e),m([])}finally{y(!1)}}},T=async t=>{x(t.path);try{let{task:i}=await _(`worktree.adopt`,{repo:s,worktreePath:t.path,branch:t.branch,ifExists:`return`});r(i.id),v(i.id),n({to:`/task/$taskId`,params:{taskId:i.id}}),f(`success`,`Adopted ${t.branch||t.path}`),e()}catch(e){p(`adopt worktree`,e)}finally{x(null)}};return S?(0,V.jsx)(E,{onClose:e}):a.length===0?(0,V.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,V.jsxs)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-label":`Adopt worktree`,className:`flex w-[32rem] max-w-[calc(100vw-2rem)] flex-col border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-subtle`,children:[`pull an existing worktree into `,l()]})]}),(0,V.jsxs)(`div`,{className:`px-3 py-6 text-center`,children:[(0,V.jsxs)(`p`,{className:`text-[12px] leading-relaxed text-subtle`,children:[`No repos known to `,l(),` yet. Create a task in a repo first, then come back to adopt its worktrees.`]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>C(!0),className:`mt-4 border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10`,children:`Create a task`})]}),(0,V.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,V.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:`Close`})})]})}):(0,V.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,V.jsxs)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-label":`Adopt worktree`,className:`flex max-h-[80vh] w-[32rem] max-w-[calc(100vw-2rem)] flex-col border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-subtle`,children:[`pull an existing worktree into `,l()]})]}),(0,V.jsxs)(`div`,{className:`space-y-2 px-3 py-3`,children:[(0,V.jsx)(`div`,{className:`mb-1 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Repo`}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),className:`min-w-0 flex-1 border border-line bg-bg px-2 py-1.5 text-[12px] text-fg focus:border-line-active focus:outline-none`,children:a.map(e=>(0,V.jsx)(`option`,{value:e,children:e},e))}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void w(s),disabled:!s||h,className:`shrink-0 border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10 disabled:opacity-40`,children:h?`Scanning…`:`Scan`})]})]}),(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto border-t border-line`,children:u===null?(0,V.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Pick a repo and Scan to find adoptable worktrees.`}):u.length===0?(0,V.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No adoptable worktrees found for this repo.`}):u.map(e=>{let t=o.has(e.path);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.dirty&&(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),e.kobeManaged&&(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`})]}),(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.lastActivityMs>0&&(0,V.jsx)(`span`,{className:`ml-auto shrink-0`,children:se(e.lastActivityMs)})]})]}),t?(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`tracked`}):(0,V.jsx)(`button`,{type:`button`,onClick:()=>void T(e),disabled:b!==null,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg disabled:opacity-40`,children:b===e.path?`Adopting…`:`Adopt`})]},e.path)})}),(0,V.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,V.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:`Close`})})]})})}var H=b({query:``,statusFilter:`all`,sortMode:`default`,showArchived:!1}),U=null;function W(e){H.update(t=>({...t,...e}))}function G(e){W({query:e})}function K(e){W({statusFilter:e})}function be(e){W({sortMode:e})}function xe(e){W({showArchived:e})}function Se(e){!e||e===U||(U=e,W({sortMode:e}))}function Ce(){return H.useSnapshot()}function q(e){let t=Date.parse(e.updatedAt||e.createdAt);return Number.isFinite(t)?t:0}function J(e,t){let n=q(t)-q(e);return n===0?t.id.localeCompare(e.id):n}function we(e,t){let n=e.filter(e=>e.kind===`main`),r=e.filter(e=>e.kind!==`main`&&e.pinned),i=e.filter(e=>e.kind!==`main`&&!e.pinned);return t===`recent`&&(r.sort(J),i.sort(J)),[...n,...r,...i]}function Te(e,t){return ue([e.title,e.branch,e.repo,e.worktreePath,e.vendor,e.status].filter(Boolean).join(` `),t)}function Ee({task:e,onClose:t}){return(0,V.jsx)(de,{open:e!==null,onClose:t,title:e?(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`shrink-0 border border-line px-1 py-0.5 font-mono text-[9px] uppercase tracking-wide text-subtle`,children:`Archived`}),(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:e.title||e.branch})]}):void 0,children:e&&(0,V.jsx)(N,{worktreePath:e.worktreePath??null,vendor:L(e.vendor),title:e.title||e.branch})})}function De({children:e,suffix:t}){return(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`h-px flex-1 bg-line`}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] font-bold uppercase text-primary`,children:t})]}):null]})}function Y({task:e,engine:t,job:n,changes:r,engineName:i,active:a,onClick:o}){let s=n?.phase===`running`,c=s?`materializing…`:P(t?.state),l=ce(e.updatedAt||e.createdAt);return(0,V.jsxs)(`button`,{type:`button`,"data-task-id":e.id,onClick:o,className:`group w-full border-l-2 px-3 py-2 text-left transition-colors ${a?`border-primary bg-inset`:`border-transparent hover:bg-surface`}`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s?(0,V.jsx)(_e,{size:10,strokeWidth:2.5,className:`shrink-0 animate-spin text-primary`}):(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${F(t?.state)}`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] ${a?`text-fg`:`text-fg/90`}`,children:e.title||e.branch}),(0,V.jsx)(pe,{pr:e.prStatus}),e.pinned&&(0,V.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`PIN`}),(0,V.jsx)(me,{counts:r})]}),(0,V.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 pl-3.5 text-[11px] text-subtle`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:e.branch||`—`}),(0,V.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[(0,V.jsx)(fe,{label:i}),c&&(0,V.jsx)(`span`,{className:`text-muted`,children:c}),l&&(0,V.jsx)(`span`,{className:`text-subtle`,children:l})]})]})]})}function Oe({task:e,onRestore:t,onPreview:n}){let r=e.title||e.branch;return(0,V.jsxs)(`div`,{className:`group flex items-center gap-2 border-l-2 border-transparent px-3 py-1.5`,children:[n?(0,V.jsx)(`button`,{type:`button`,onClick:n,title:`Preview history`,className:`min-w-0 flex-1 truncate text-left text-[12px] text-subtle transition-colors hover:text-fg`,children:r}):(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-subtle`,children:r}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 border border-line bg-surface px-1.5 py-0.5 text-[10px] text-muted opacity-0 transition-opacity hover:border-primary hover:text-fg group-hover:opacity-100`,children:`Restore`})]})}function ke({onOpenSettings:e,onNewTask:t,onAdopt:i}){let{tasks:a,engineStates:o,jobs:s,worktreeChanges:c,uiPrefs:l,hydrated:u,streamConnected:f}=g(),{selectedTaskId:m}=n(),h=I(),y=(0,B.useMemo)(()=>oe(a),[a]),b=e=>ae(h,e,y),{query:x,statusFilter:S,sortMode:w,showArchived:T}=Ce(),E=(0,B.useRef)(null),O=(0,B.useRef)(null);(0,B.useEffect)(()=>{m&&E.current?.querySelector(`[data-task-id="${CSS.escape(m)}"]`)?.scrollIntoView({block:`nearest`})},[m]);let k=l?.sortMode;(0,B.useEffect)(()=>{Se(k)},[k]);let A=(0,B.useMemo)(()=>a.filter(e=>!e.archived),[a]),j=(0,B.useMemo)(()=>a.filter(e=>e.archived&&e.kind!==`main`),[a]),M=(0,B.useMemo)(()=>we(A.filter(e=>Te(e,x)&&D(o[e.id],c[e.worktreePath],S)),w),[A,x,S,w,o,c]),N=M.filter(e=>e.kind===`main`),P=M.filter(e=>e.kind!==`main`),F=!u||!f&&a.length===0,re=d(),L=e=>{r(e),v(e),re({to:`/task/$taskId`,params:{taskId:e}})};(0,B.useEffect)(()=>{let e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;let t=e.key,n=t===`ArrowDown`||t===`ArrowUp`,r=t===`j`||t===`ArrowDown`,i=t===`k`||t===`ArrowUp`,a=t===`/`;if(!r&&!i&&!a)return;let o=e.target;if(o&&(o.tagName===`INPUT`||o.tagName===`TEXTAREA`||o.tagName===`SELECT`||o.isContentEditable)||document.querySelector(`[role=dialog],[role=alertdialog]`)||document.querySelector(`[data-settings-open]`))return;if(a){e.preventDefault(),O.current?.focus();return}if(n&&o&&o!==document.body&&!E.current?.contains(o)||M.length===0)return;e.preventDefault();let s=M.findIndex(e=>e.id===m),c=s===-1?0:Math.min(Math.max(s+(r?1:-1),0),M.length-1);L(M[c].id)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[M,m]);let R=e=>{_(`task.archive`,{taskId:e.id,archived:!1}).catch(t=>p(`restore "${e.title||e.branch}"`,t))},[se,ce]=(0,B.useState)(!1),[le,z]=(0,B.useState)(null);return(0,B.useEffect)(()=>{let e=!0;return ie().then(t=>{e&&ce(t.archivedHistoryPreview===!0)}).catch(()=>{}),()=>{e=!1}},[]),(0,V.jsxs)(`aside`,{className:`flex w-64 shrink-0 flex-col border-r border-line bg-bg`,children:[(0,V.jsxs)(`div`,{className:`border-b border-line bg-surface/50 px-3 py-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Tasks`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>be(w==="default"?`recent`:`default`),className:`font-mono text-[10px] uppercase ${w===`recent`?`text-primary`:`text-muted hover:text-fg`}`,title:`Toggle task sort`,children:`sort`}),(0,V.jsxs)(`span`,{className:`font-mono text-[10px] text-muted`,children:[M.length,`/`,A.length]}),(0,V.jsx)(`button`,{type:`button`,onClick:i,className:`text-muted transition-colors hover:text-primary`,title:`Adopt an existing worktree`,"aria-label":`Adopt worktree`,children:(0,V.jsx)(ge,{size:14,strokeWidth:1.9})}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted transition-colors hover:text-primary`,title:`New task`,"aria-label":`New task`,children:(0,V.jsx)(ee,{size:14,strokeWidth:2.2})})]})]}),(0,V.jsxs)(`label`,{className:`mt-2 flex h-8 items-center gap-2 border border-line bg-bg px-2 text-[12px] text-muted focus-within:border-line-active`,children:[(0,V.jsx)(te,{size:14,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,V.jsx)(`input`,{ref:O,value:x,onChange:e=>G(e.target.value),onKeyDown:e=>{e.key===`Enter`&&M.length>0?(e.preventDefault(),L(M[0].id),e.currentTarget.blur()):e.key===`Escape`&&x&&(e.preventDefault(),G(``))},placeholder:`Filter tasks`,className:`min-w-0 flex-1 bg-transparent text-fg placeholder:text-subtle focus:outline-none`}),x&&(0,V.jsx)(`button`,{type:`button`,onClick:()=>G(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear task filter`,title:`Clear filter`,children:(0,V.jsx)(ne,{size:13,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`mt-2 flex items-center gap-1`,children:[{key:`all`,label:`All`,title:`All tasks`},{key:`attention`,label:`Needs`,title:`Needs input / errored / rate-limited`}].map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>K(e.key),title:e.title,className:`border px-1.5 py-0.5 text-[10px] transition-colors ${S===e.key?`border-primary bg-inset text-fg`:`border-line bg-bg text-subtle hover:border-primary hover:text-fg`}`,children:e.label},e.key))})]}),(0,V.jsxs)(`div`,{ref:E,className:`flex-1 overflow-y-auto`,children:[F?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-4 text-[12px] text-subtle`,children:[(0,V.jsx)(_e,{size:13,strokeWidth:2,className:`animate-spin`}),(0,V.jsx)(`span`,{children:`connecting…`})]}):A.length===0?(0,V.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,V.jsx)(`p`,{children:`No tasks yet.`}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`mt-3 border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`+ New task`})]}):M.length===0?(0,V.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,V.jsx)(`div`,{children:x?`No matches for “${x}”.`:`No tasks in this status.`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>{G(``),K(`all`)},className:`mt-3 border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`Clear filter`})]}):(0,V.jsxs)(V.Fragment,{children:[N.length>0&&(0,V.jsx)(De,{children:`Projects`}),N.map(e=>(0,V.jsx)(Y,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===m,onClick:()=>L(e.id)},e.id)),P.length>0&&(0,V.jsx)(De,{suffix:w==="default"?void 0:w,children:`Worktrees`}),P.map(e=>(0,V.jsx)(Y,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===m,onClick:()=>L(e.id)},e.id))]}),!F&&j.length>0&&(0,V.jsxs)(`div`,{className:`mt-2 border-t border-line-subtle pb-2`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>xe(!T),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Archived`}),(0,V.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:j.length}),(0,V.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-subtle`,children:T?`−`:`+`})]}),T&&j.map(e=>(0,V.jsx)(Oe,{task:e,onRestore:()=>R(e),onPreview:se?()=>z(e):void 0},e.id))]})]}),(0,V.jsx)(Ee,{task:le,onClose:()=>z(null)}),(0,V.jsx)(`div`,{className:`border-t border-line p-2`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:e,className:`flex w-full items-center gap-2 border border-line bg-surface px-2 py-2 text-left text-[12px] text-muted transition-colors hover:border-primary hover:bg-inset hover:text-fg`,children:[(0,V.jsx)(C,{size:15,strokeWidth:1.8}),(0,V.jsx)(`span`,{children:`Settings`})]})})]})}async function Ae(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function X(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var je=/^\/api\/issue-assets\/[a-f0-9]{16}\/[A-Za-z0-9_-]+\.[a-z0-9]+$/;function Me(e){let t=e.trim();return je.test(t)?t:null}function Ne(e){let t=e.trim();return/^https?:\/\//i.test(t)?t:t.startsWith(`//`)?null:t.startsWith(`/`)||t.startsWith(`#`)||t.startsWith(`./`)||t.startsWith(`../`)?t:null}var Pe=`(?:[^()]|\\([^()]*\\))+`,Fe=RegExp(`!\\[([^\\]]*)\\]\\((${Pe})\\)`,`g`),Ie=RegExp(`\\[([^\\]]+)\\]\\((${Pe})\\)`,`g`);function Le(e,t){let n=Ne(t.replace(/&/g,`&`));return n?`<a href="${X(n)}" target="_blank" rel="noopener noreferrer" class="kobe-md-link">${e}</a>`:`${e}(${t})`}function Re(e){let t=e;return t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(Fe,(e,t,n)=>{let r=Me(n.replace(/&/g,`&`));return r?`<img src="${X(r)}" alt="${t}" loading="lazy" class="kobe-md-img">`:t?Le(t,n):``})),t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(Ie,(e,t,n)=>Le(t,n))),t=t.replace(/\*\*(.+?)\*\*/g,`<strong>$1</strong>`),t=t.replace(/(^|[^*])\*([^*]+)\*/g,`$1<em>$2</em>`),t}function Z(e){return e.split(/(`[^`]+`)/g).map((e,t)=>t%2==1?`<code class="kobe-md-code">${e.slice(1,-1)}</code>`:Re(e)).join(``)}function ze(e){let t=e.replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`),n=[],r=0,i=null,a=()=>{i&&=(n.push(`</${i}>`),null)};for(;r<t.length;){let e=t[r];if(/^```/.test(e)){a();let e=[];for(r++;r<t.length&&!/^```/.test(t[r]);)e.push(X(t[r])),r++;r++,n.push(`<pre class="kobe-md-pre"><code>${e.join(`
|
|
4
4
|
`)}</code></pre>`);continue}if(/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(e)){a(),n.push(`<hr class="kobe-md-hr" />`),r++;continue}let o=/^(#{1,6})\s+(.*)$/.exec(e);if(o){a();let e=o[1].length;n.push(`<h${e} class="kobe-md-h">${Z(X(o[2]))}</h${e}>`),r++;continue}if(/^>\s?/.test(e)){a(),n.push(`<blockquote class="kobe-md-quote">${Z(X(e.replace(/^>\s?/,``)))}</blockquote>`),r++;continue}let s=/^\s*[-*]\s+(.*)$/.exec(e);if(s){i!==`ul`&&(a(),n.push(`<ul class="kobe-md-ul">`),i=`ul`),n.push(`<li>${Z(X(s[1]))}</li>`),r++;continue}let c=/^\s*\d+\.\s+(.*)$/.exec(e);if(c){i!==`ol`&&(a(),n.push(`<ol class="kobe-md-ol">`),i=`ol`),n.push(`<li>${Z(X(c[1]))}</li>`),r++;continue}if(e.trim()===``){a(),r++;continue}a();let l=[e];for(r++;r<t.length&&t[r].trim()!==``&&!/^(#{1,6}\s|>\s?|```|\s*[-*]\s|\s*\d+\.\s|\s*(-{3,}|\*{3,}|_{3,})\s*$)/.test(t[r]);)l.push(t[r]),r++;n.push(`<p class="kobe-md-p">${Z(X(l.join(` `)))}</p>`)}return a(),n.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{f as t,y as n}from"./tabs-DHBP2ShA.js";import{d as r,m as i}from"./createLucideIcon-C6nfansM.js";import{a,n as o,r as s}from"./toast-B7pad_QC.js";import{n as c,t as l}from"./ViewToggle-C6Kw_T1E.js";import{n as u}from"./store-BK5yanfN.js";import{n as ee}from"./active-task-CCVuYWP9.js";import{t as d}from"./external-store-CNyRxjsC.js";import{t as f}from"./external-link-Cj-9rta8.js";import{a as te,i as p,n as m,r as h,t as g}from"./lazy-issue-panels-GvnRdSfG.js";import{t as _}from"./plus-Bz25iNHX.js";import{t as v}from"./search-zs6lDYfz.js";import{t as y}from"./x-MtSojW5V.js";import{n as b,t as ne}from"./ConfirmDialog-C9xYoPEx.js";import{_ as x,a as S,d as re,g as C,h as w,m as T,p as ie,s as E,u as D}from"./issues-BjnSNgu-.js";var O=e(n(),1),k={query:``,repo:null};function A(e){j.update(t=>({...t,...e}))}var j=d(k);function M(){return j.useSnapshot()}function N(e){e!==j.getSnapshot().query&&A({query:e})}function P(e){e!==j.getSnapshot().repo&&A({repo:e})}function ae(e){let{issueRepos:t,issueData:n,refreshIssues:r}=e,[i,a]=(0,O.useState)(!1),[o,c]=(0,O.useState)(null),[l,u]=(0,O.useState)(new Map);return(0,O.useEffect)(()=>{u(e=>{if(e.size===0)return e;let r=new Map(e),i=!1;for(let e of t){let t=n[e];if(!(!t||!t.exists))for(let n of t.issues)n.taskId&&r.delete(`${e}:${n.id}`)&&(i=!0)}return i?r:e})},[t,n]),{issueBusy:i,quickStartingId:o,pendingLinks:l,saveIssue:async(e,t,n)=>{a(!0);try{return await w(e,t,n),r([e]),!0}catch(e){return s(`update issue`,e),!1}finally{a(!1)}},deleteIssueConfirmed:async(e,t)=>{a(!0);try{return await S(e,t.id),r([e]),!0}catch(e){return s(`delete issue`,e),!1}finally{a(!1)}},quickStart:async(e,t,n,r,i)=>{if(o===null){c(t.id);try{let{taskId:a,workspaceTaskId:o}=await T(e,t,{vendor:n,effort:r,placement:i});return i!==`project`&&u(n=>{let r=new Map(n);return r.set(`${e}:${t.id}`,{repo:e,issueId:t.id,taskId:a}),r}),o}catch(e){s(`quick start issue`,e);return}finally{c(null)}}}}}var F=i();function I({repo:e,column:t,onNewIssue:n,onPeekIssue:r,onOpenTask:i,onDeleteIssue:a}){return(0,F.jsxs)(`section`,{"data-column":`${e}:${t.key}`,className:`flex h-full shrink-0 flex-col border border-transparent ${t.key===`backlog`?`w-96`:`w-72`}`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-2`,children:[(0,F.jsx)(`h2`,{className:`text-[11px] font-bold uppercase tracking-[0.12em] ${t.accent}`,children:t.title}),(0,F.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:t.cards.length+t.hiddenCount}),n&&(0,F.jsxs)(`button`,{type:`button`,onClick:n,className:`ml-auto flex items-center gap-0.5 text-[10px] text-subtle transition-colors hover:text-fg`,title:`New story in this project`,children:[(0,F.jsx)(_,{size:11,strokeWidth:2}),(0,F.jsx)(`span`,{children:`New story`})]})]}),(0,F.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pb-2`,children:[t.cards.length===0?(0,F.jsx)(`div`,{className:`border border-dashed border-line-subtle p-3 text-center text-[11px] text-subtle`,children:`none`}):t.cards.map(e=>{let{issue:t}=e,n=x(t)?t.taskId:void 0;return(0,F.jsxs)(`div`,{className:`group/wrap relative`,children:[(0,F.jsx)(p,{issue:t,onOpen:()=>r(t),onDelete:()=>a(t)}),n&&(0,F.jsxs)(`button`,{type:`button`,onClick:()=>i(n),"aria-label":`Open task for issue #${t.id}`,title:`Started — open task`,className:`absolute bottom-2 right-2 flex items-center gap-1 border border-line bg-surface px-1.5 py-0.5 text-[10px] text-subtle opacity-0 transition-opacity hover:border-primary hover:text-fg focus-visible:opacity-100 group-hover/wrap:opacity-100`,children:[(0,F.jsx)(f,{size:10,strokeWidth:1.8}),(0,F.jsx)(`span`,{children:`open task`})]})]},`issue:${t.id}`)}),t.hiddenCount>0&&(0,F.jsxs)(`div`,{className:`p-2 text-center text-[10px] text-subtle`,children:[`+`,t.hiddenCount,` more — finish stories to thin this column`]})]})]})}function L({board:e,onNewIssue:t,onPeekIssue:n,onOpenTask:r,onDeleteIssue:i}){return(0,F.jsx)(`div`,{className:`flex h-full min-w-max gap-4`,children:e.columns.map(a=>(0,F.jsx)(I,{repo:e.repo,column:a,onNewIssue:a.key===`backlog`?()=>t(e.repo):void 0,onPeekIssue:n,onOpenTask:r,onDeleteIssue:t=>i(e.repo,t)},a.key))})}function R(){let{tasks:e,hydrated:n,daemonConnected:i}=u(),{query:d,repo:f}=M(),p=a(),x=(0,O.useRef)(null),[S,w]=(0,O.useState)(null),[T,k]=(0,O.useState)(null),[A,j]=(0,O.useState)(null),[I,R]=(0,O.useState)([]);(0,O.useEffect)(()=>{let e=!1;return E().then(t=>{e||R(t)}).catch(e=>s(`load projects`,e)),()=>{e=!0}},[]);let z=(0,O.useMemo)(()=>D(e,I),[e,I]),B=(0,O.useMemo)(()=>z.map(e=>e.repo),[z]),V=(0,O.useMemo)(()=>ie(z,f),[z,f]),{data:H,pending:U,refresh:W}=te(B),{issueBusy:G,quickStartingId:K,pendingLinks:q,saveIssue:J,deleteIssueConfirmed:oe,quickStart:se}=ae({issueRepos:B,issueData:H,refreshIssues:W}),{allIssues:Y,repoChips:ce,projectBoards:X,shownCount:Z,hasAnyCard:Q}=(0,O.useMemo)(()=>C({issueData:H,issueRepos:B,pendingLinks:q,query:d,repoFilter:V}),[H,B,q,d,V]);(0,O.useEffect)(()=>{S&&(Y.some(e=>e.repo===S.repo&&e.issue.id===S.id)||w(null))},[Y,S]),(0,O.useEffect)(()=>{let e=e=>{if(S||T||A||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target,n=!!t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable);e.key===`/`&&!n?(e.preventDefault(),x.current?.focus()):e.key===`Escape`&&t===x.current&&d&&(e.preventDefault(),N(``))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d,S,T,A]),(0,O.useEffect)(()=>{f!==V&&P(V)},[V,f]);let le=!!d,$=e=>{t(e),ee(e),p({to:`/task/$taskId`,params:{taskId:e}})};return(0,F.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,F.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,F.jsx)(b,{}),(0,F.jsxs)(`span`,{className:`font-mono text-[13px] font-bold text-primary`,children:[`[`,r,`]`]}),(0,F.jsx)(l,{}),(0,F.jsxs)(`label`,{className:`flex h-7 items-center gap-1.5 border border-line bg-bg px-2 text-muted focus-within:border-line-active`,children:[(0,F.jsx)(v,{size:13,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,F.jsx)(`input`,{ref:x,value:d,onChange:e=>N(e.target.value),placeholder:`Filter stories ( / )`,className:`w-44 bg-transparent text-[12px] text-fg placeholder:text-subtle focus:outline-none`}),d&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>N(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear filter`,title:`Clear filter`,children:(0,F.jsx)(y,{size:13,strokeWidth:2})})]}),z.length>0&&(0,F.jsxs)(`label`,{className:`flex h-7 min-w-0 max-w-[24rem] items-center gap-1.5 border border-line bg-bg px-2 text-muted focus-within:border-line-active`,children:[(0,F.jsx)(`span`,{className:`shrink-0 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Project`}),(0,F.jsx)(`select`,{value:V??``,onChange:e=>P(e.target.value),title:V??`Select project`,className:`min-w-0 flex-1 bg-transparent font-mono text-[11px] text-fg focus:outline-none`,children:z.map(e=>{let t=ce.find(t=>t.repo===e.repo)?.count??0;return(0,F.jsxs)(`option`,{value:e.repo,title:e.repo,className:`bg-surface text-fg`,children:[e.label,` · `,t,` · `,e.repo]},e.repo)})})]}),(0,F.jsx)(`div`,{className:`ml-auto flex items-center gap-3 font-mono text-[11px] text-subtle`,children:(0,F.jsxs)(`span`,{children:[Z,` stor`,Z===1?`y`:`ies`]})})]}),(0,F.jsx)(c,{}),(0,F.jsx)(`div`,{className:`min-h-0 flex-1 overflow-x-auto overflow-y-hidden p-4`,children:!n||U&&!Q?(0,F.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Loading…`}):Z===0&&le&&Q?(0,F.jsxs)(`div`,{className:`text-[12px] leading-relaxed text-subtle`,children:[(0,F.jsx)(`p`,{children:`No stories match.`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{N(``)},className:`mt-3 border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`Clear filters`})]}):Z===0&&!i?(0,F.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Can't reach the daemon — issue list may be incomplete.`}):X[0]?(0,F.jsx)(L,{board:X[0],onNewIssue:k,onPeekIssue:e=>w({repo:X[0].repo,id:e.id}),onOpenTask:$,onDeleteIssue:(e,t)=>j({repo:e,issue:t})}):(0,F.jsxs)(`div`,{className:`text-[12px] leading-relaxed text-subtle`,children:[(0,F.jsx)(`p`,{children:`No projects yet. Create a task from the workspace to track stories against its repo.`}),(0,F.jsx)(`div`,{className:`mt-3 flex items-center gap-2`,children:(0,F.jsx)(`button`,{type:`button`,onClick:()=>p({to:`/`}),className:`border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`Back to workspace`})})]})}),(()=>{let e=V??X[0]?.repo??B[0];return e?(0,F.jsx)(`button`,{type:`button`,onClick:()=>k(e),title:`New story`,"aria-label":`New story`,className:`fixed bottom-6 right-6 z-20 flex h-12 w-12 items-center justify-center rounded-full border border-primary bg-primary text-bg shadow-lg transition-transform hover:scale-105`,children:(0,F.jsx)(_,{size:22,strokeWidth:2.2})}):null})(),T&&(0,F.jsx)(g,{children:(0,F.jsx)(m,{repoRoot:T,open:!0,onClose:()=>k(null),onCreated:(e,t)=>{T&&W([T]),o(`success`,t?`Story #${e.id} created — starting its session`:`Story #${e.id} created`)}})}),(()=>{if(!S)return null;let e=Y.find(e=>e.repo===S.repo&&e.issue.id===S.id);return e?(0,F.jsx)(g,{children:(0,F.jsx)(h,{issue:e.issue,repoRoot:e.repo,busy:G,starting:K===e.issue.id,onClose:()=>w(null),onSave:t=>J(e.repo,e.issue.id,t),onStart:async({vendor:t,effort:n,placement:r,watch:i})=>{let a=await se(e.repo,e.issue,t,n,r);i&&a?(w(null),$(a)):w(null)},onOpenSession:e.issue.taskId?()=>{let t=e.issue.taskId;w(null),t&&$(t)}:void 0,onPromptMerge:e.issue.taskId?()=>{let t=e.issue.taskId;t&&re(t,e.issue).then(()=>o(`success`,`Prompt inserted for story #${e.issue.id}`)).catch(e=>s(`prompt issue merge`,e))}:void 0},`${e.repo}:${e.issue.id}`)}):null})(),A&&(0,F.jsx)(ne,{title:`Delete issue`,body:`Delete issue #${A.issue.id}: "${A.issue.title}"? This removes it from the daemon issue tracker only; it does not delete any task, branch, worktree, or engine session.`,confirmLabel:`Delete`,danger:!0,busy:G,onConfirm:()=>void oe(A.repo,A.issue).then(e=>{e&&(j(null),S?.repo===A.repo&&S.id===A.issue.id&&w(null))}),onCancel:()=>j(null)})]})}export{R as Board};
|
|
1
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{f as t,y as n}from"./tabs-DHBP2ShA.js";import{d as r,m as i}from"./createLucideIcon-C6nfansM.js";import{a,n as o,r as s}from"./toast-2mA6GzBq.js";import{n as c,t as l}from"./ViewToggle-Bvvh1yLG.js";import{n as u}from"./store-BK5yanfN.js";import{n as ee}from"./active-task-CCVuYWP9.js";import{t as d}from"./external-store-CNyRxjsC.js";import{t as f}from"./external-link-Cj-9rta8.js";import{a as te,i as p,n as m,r as h,t as g}from"./lazy-issue-panels-GvnRdSfG.js";import{t as _}from"./plus-Bz25iNHX.js";import{t as v}from"./search-zs6lDYfz.js";import{t as y}from"./x-MtSojW5V.js";import{n as b,t as ne}from"./ConfirmDialog-CBqd0wMR.js";import{_ as x,a as S,d as re,g as C,h as w,m as T,p as ie,s as E,u as D}from"./issues-BjnSNgu-.js";var O=e(n(),1),k={query:``,repo:null};function A(e){j.update(t=>({...t,...e}))}var j=d(k);function M(){return j.useSnapshot()}function N(e){e!==j.getSnapshot().query&&A({query:e})}function P(e){e!==j.getSnapshot().repo&&A({repo:e})}function ae(e){let{issueRepos:t,issueData:n,refreshIssues:r}=e,[i,a]=(0,O.useState)(!1),[o,c]=(0,O.useState)(null),[l,u]=(0,O.useState)(new Map);return(0,O.useEffect)(()=>{u(e=>{if(e.size===0)return e;let r=new Map(e),i=!1;for(let e of t){let t=n[e];if(!(!t||!t.exists))for(let n of t.issues)n.taskId&&r.delete(`${e}:${n.id}`)&&(i=!0)}return i?r:e})},[t,n]),{issueBusy:i,quickStartingId:o,pendingLinks:l,saveIssue:async(e,t,n)=>{a(!0);try{return await w(e,t,n),r([e]),!0}catch(e){return s(`update issue`,e),!1}finally{a(!1)}},deleteIssueConfirmed:async(e,t)=>{a(!0);try{return await S(e,t.id),r([e]),!0}catch(e){return s(`delete issue`,e),!1}finally{a(!1)}},quickStart:async(e,t,n,r,i)=>{if(o===null){c(t.id);try{let{taskId:a,workspaceTaskId:o}=await T(e,t,{vendor:n,effort:r,placement:i});return i!==`project`&&u(n=>{let r=new Map(n);return r.set(`${e}:${t.id}`,{repo:e,issueId:t.id,taskId:a}),r}),o}catch(e){s(`quick start issue`,e);return}finally{c(null)}}}}}var F=i();function I({repo:e,column:t,onNewIssue:n,onPeekIssue:r,onOpenTask:i,onDeleteIssue:a}){return(0,F.jsxs)(`section`,{"data-column":`${e}:${t.key}`,className:`flex h-full shrink-0 flex-col border border-transparent ${t.key===`backlog`?`w-96`:`w-72`}`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-2`,children:[(0,F.jsx)(`h2`,{className:`text-[11px] font-bold uppercase tracking-[0.12em] ${t.accent}`,children:t.title}),(0,F.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:t.cards.length+t.hiddenCount}),n&&(0,F.jsxs)(`button`,{type:`button`,onClick:n,className:`ml-auto flex items-center gap-0.5 text-[10px] text-subtle transition-colors hover:text-fg`,title:`New story in this project`,children:[(0,F.jsx)(_,{size:11,strokeWidth:2}),(0,F.jsx)(`span`,{children:`New story`})]})]}),(0,F.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pb-2`,children:[t.cards.length===0?(0,F.jsx)(`div`,{className:`border border-dashed border-line-subtle p-3 text-center text-[11px] text-subtle`,children:`none`}):t.cards.map(e=>{let{issue:t}=e,n=x(t)?t.taskId:void 0;return(0,F.jsxs)(`div`,{className:`group/wrap relative`,children:[(0,F.jsx)(p,{issue:t,onOpen:()=>r(t),onDelete:()=>a(t)}),n&&(0,F.jsxs)(`button`,{type:`button`,onClick:()=>i(n),"aria-label":`Open task for issue #${t.id}`,title:`Started — open task`,className:`absolute bottom-2 right-2 flex items-center gap-1 border border-line bg-surface px-1.5 py-0.5 text-[10px] text-subtle opacity-0 transition-opacity hover:border-primary hover:text-fg focus-visible:opacity-100 group-hover/wrap:opacity-100`,children:[(0,F.jsx)(f,{size:10,strokeWidth:1.8}),(0,F.jsx)(`span`,{children:`open task`})]})]},`issue:${t.id}`)}),t.hiddenCount>0&&(0,F.jsxs)(`div`,{className:`p-2 text-center text-[10px] text-subtle`,children:[`+`,t.hiddenCount,` more — finish stories to thin this column`]})]})]})}function L({board:e,onNewIssue:t,onPeekIssue:n,onOpenTask:r,onDeleteIssue:i}){return(0,F.jsx)(`div`,{className:`flex h-full min-w-max gap-4`,children:e.columns.map(a=>(0,F.jsx)(I,{repo:e.repo,column:a,onNewIssue:a.key===`backlog`?()=>t(e.repo):void 0,onPeekIssue:n,onOpenTask:r,onDeleteIssue:t=>i(e.repo,t)},a.key))})}function R(){let{tasks:e,hydrated:n,daemonConnected:i}=u(),{query:d,repo:f}=M(),p=a(),x=(0,O.useRef)(null),[S,w]=(0,O.useState)(null),[T,k]=(0,O.useState)(null),[A,j]=(0,O.useState)(null),[I,R]=(0,O.useState)([]);(0,O.useEffect)(()=>{let e=!1;return E().then(t=>{e||R(t)}).catch(e=>s(`load projects`,e)),()=>{e=!0}},[]);let z=(0,O.useMemo)(()=>D(e,I),[e,I]),B=(0,O.useMemo)(()=>z.map(e=>e.repo),[z]),V=(0,O.useMemo)(()=>ie(z,f),[z,f]),{data:H,pending:U,refresh:W}=te(B),{issueBusy:G,quickStartingId:K,pendingLinks:q,saveIssue:J,deleteIssueConfirmed:oe,quickStart:se}=ae({issueRepos:B,issueData:H,refreshIssues:W}),{allIssues:Y,repoChips:ce,projectBoards:X,shownCount:Z,hasAnyCard:Q}=(0,O.useMemo)(()=>C({issueData:H,issueRepos:B,pendingLinks:q,query:d,repoFilter:V}),[H,B,q,d,V]);(0,O.useEffect)(()=>{S&&(Y.some(e=>e.repo===S.repo&&e.issue.id===S.id)||w(null))},[Y,S]),(0,O.useEffect)(()=>{let e=e=>{if(S||T||A||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target,n=!!t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable);e.key===`/`&&!n?(e.preventDefault(),x.current?.focus()):e.key===`Escape`&&t===x.current&&d&&(e.preventDefault(),N(``))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d,S,T,A]),(0,O.useEffect)(()=>{f!==V&&P(V)},[V,f]);let le=!!d,$=e=>{t(e),ee(e),p({to:`/task/$taskId`,params:{taskId:e}})};return(0,F.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,F.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,F.jsx)(b,{}),(0,F.jsxs)(`span`,{className:`font-mono text-[13px] font-bold text-primary`,children:[`[`,r,`]`]}),(0,F.jsx)(l,{}),(0,F.jsxs)(`label`,{className:`flex h-7 items-center gap-1.5 border border-line bg-bg px-2 text-muted focus-within:border-line-active`,children:[(0,F.jsx)(v,{size:13,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,F.jsx)(`input`,{ref:x,value:d,onChange:e=>N(e.target.value),placeholder:`Filter stories ( / )`,className:`w-44 bg-transparent text-[12px] text-fg placeholder:text-subtle focus:outline-none`}),d&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>N(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear filter`,title:`Clear filter`,children:(0,F.jsx)(y,{size:13,strokeWidth:2})})]}),z.length>0&&(0,F.jsxs)(`label`,{className:`flex h-7 min-w-0 max-w-[24rem] items-center gap-1.5 border border-line bg-bg px-2 text-muted focus-within:border-line-active`,children:[(0,F.jsx)(`span`,{className:`shrink-0 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Project`}),(0,F.jsx)(`select`,{value:V??``,onChange:e=>P(e.target.value),title:V??`Select project`,className:`min-w-0 flex-1 bg-transparent font-mono text-[11px] text-fg focus:outline-none`,children:z.map(e=>{let t=ce.find(t=>t.repo===e.repo)?.count??0;return(0,F.jsxs)(`option`,{value:e.repo,title:e.repo,className:`bg-surface text-fg`,children:[e.label,` · `,t,` · `,e.repo]},e.repo)})})]}),(0,F.jsx)(`div`,{className:`ml-auto flex items-center gap-3 font-mono text-[11px] text-subtle`,children:(0,F.jsxs)(`span`,{children:[Z,` stor`,Z===1?`y`:`ies`]})})]}),(0,F.jsx)(c,{}),(0,F.jsx)(`div`,{className:`min-h-0 flex-1 overflow-x-auto overflow-y-hidden p-4`,children:!n||U&&!Q?(0,F.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Loading…`}):Z===0&&le&&Q?(0,F.jsxs)(`div`,{className:`text-[12px] leading-relaxed text-subtle`,children:[(0,F.jsx)(`p`,{children:`No stories match.`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{N(``)},className:`mt-3 border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`Clear filters`})]}):Z===0&&!i?(0,F.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Can't reach the daemon — issue list may be incomplete.`}):X[0]?(0,F.jsx)(L,{board:X[0],onNewIssue:k,onPeekIssue:e=>w({repo:X[0].repo,id:e.id}),onOpenTask:$,onDeleteIssue:(e,t)=>j({repo:e,issue:t})}):(0,F.jsxs)(`div`,{className:`text-[12px] leading-relaxed text-subtle`,children:[(0,F.jsx)(`p`,{children:`No projects yet. Create a task from the workspace to track stories against its repo.`}),(0,F.jsx)(`div`,{className:`mt-3 flex items-center gap-2`,children:(0,F.jsx)(`button`,{type:`button`,onClick:()=>p({to:`/`}),className:`border border-line bg-surface px-2 py-1 text-[11px] text-muted hover:border-primary hover:text-fg`,children:`Back to workspace`})})]})}),(()=>{let e=V??X[0]?.repo??B[0];return e?(0,F.jsx)(`button`,{type:`button`,onClick:()=>k(e),title:`New story`,"aria-label":`New story`,className:`fixed bottom-6 right-6 z-20 flex h-12 w-12 items-center justify-center rounded-full border border-primary bg-primary text-bg shadow-lg transition-transform hover:scale-105`,children:(0,F.jsx)(_,{size:22,strokeWidth:2.2})}):null})(),T&&(0,F.jsx)(g,{children:(0,F.jsx)(m,{repoRoot:T,open:!0,onClose:()=>k(null),onCreated:(e,t)=>{T&&W([T]),o(`success`,t?`Story #${e.id} created — starting its session`:`Story #${e.id} created`)}})}),(()=>{if(!S)return null;let e=Y.find(e=>e.repo===S.repo&&e.issue.id===S.id);return e?(0,F.jsx)(g,{children:(0,F.jsx)(h,{issue:e.issue,repoRoot:e.repo,busy:G,starting:K===e.issue.id,onClose:()=>w(null),onSave:t=>J(e.repo,e.issue.id,t),onStart:async({vendor:t,effort:n,placement:r,watch:i})=>{let a=await se(e.repo,e.issue,t,n,r);i&&a?(w(null),$(a)):w(null)},onOpenSession:e.issue.taskId?()=>{let t=e.issue.taskId;w(null),t&&$(t)}:void 0,onPromptMerge:e.issue.taskId?()=>{let t=e.issue.taskId;t&&re(t,e.issue).then(()=>o(`success`,`Prompt inserted for story #${e.issue.id}`)).catch(e=>s(`prompt issue merge`,e))}:void 0},`${e.repo}:${e.issue.id}`)}):null})(),A&&(0,F.jsx)(ne,{title:`Delete issue`,body:`Delete issue #${A.issue.id}: "${A.issue.title}"? This removes it from the daemon issue tracker only; it does not delete any task, branch, worktree, or engine session.`,confirmLabel:`Delete`,danger:!0,busy:G,onConfirm:()=>void oe(A.repo,A.issue).then(e=>{e&&(j(null),S?.repo===A.repo&&S.id===A.issue.id&&w(null))}),onCancel:()=>j(null)})]})}export{R as Board};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{y as t}from"./tabs-DHBP2ShA.js";import{m as n}from"./createLucideIcon-C6nfansM.js";import{r,t as i}from"./desktop-
|
|
1
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{y as t}from"./tabs-DHBP2ShA.js";import{m as n}from"./createLucideIcon-C6nfansM.js";import{r,t as i}from"./desktop-CB2NHSKZ.js";import{t as a}from"./use-focus-trap-oPsw86zw.js";var o=n();function s({label:e,tone:t,onClick:n}){return(0,o.jsx)(`button`,{type:`button`,"aria-label":e,title:e,onClick:n,className:`h-3 w-3 rounded-full border border-black/20 ${t===`close`?`bg-[#ff5f57]`:t===`minimize`?`bg-[#febc2e]`:`bg-[#28c840]`}`})}function c(){if(!r())return null;let e=i();return(0,o.jsxs)(`fieldset`,{"data-kobe-window-controls":!0,className:`m-0 flex min-w-0 shrink-0 items-center gap-2 border-0 p-0`,children:[(0,o.jsx)(`legend`,{className:`sr-only`,children:`Window controls`}),(0,o.jsx)(s,{label:`Close window`,tone:`close`,onClick:()=>e?.close()}),(0,o.jsx)(s,{label:`Minimize window`,tone:`minimize`,onClick:()=>e?.minimize()}),(0,o.jsx)(s,{label:`Zoom window`,tone:`zoom`,onClick:()=>e?.toggleMaximize()})]})}var l=e(t(),1);function u({title:e,body:t,confirmLabel:n,danger:r=!1,busy:i=!1,onConfirm:s,onCancel:c}){let u=(0,l.useRef)(null),d=(0,l.useRef)(null);return a(d),(0,l.useEffect)(()=>{u.current?.focus();let e=e=>{e.key===`Escape`&&c()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[c]),(0,o.jsx)(`div`,{className:`fixed inset-0 z-40 flex items-center justify-center bg-black/60`,onClick:c,onKeyDown:()=>{},role:`presentation`,children:(0,o.jsxs)(`div`,{ref:d,role:`alertdialog`,"aria-modal":`true`,"aria-label":e,className:`w-96 border border-line bg-surface shadow-xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:[(0,o.jsx)(`div`,{className:`border-b border-line px-3 py-2 text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:e}),(0,o.jsx)(`p`,{className:`px-3 py-3 text-[12px] leading-relaxed text-muted`,children:t}),(0,o.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-line px-3 py-2`,children:[(0,o.jsx)(`button`,{type:`button`,onClick:c,className:`border border-line bg-bg px-3 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Cancel`}),(0,o.jsx)(`button`,{ref:u,type:`button`,onClick:s,disabled:i,className:`border px-3 py-1 text-[11px] transition-colors disabled:opacity-40 ${r?`border-kobe-red/50 bg-kobe-red/10 text-kobe-red hover:bg-kobe-red/20`:`border-primary bg-inset text-fg hover:bg-primary/10`}`,children:i?`Working…`:n})]})]})})}export{c as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{c as t,y as n}from"./tabs-DHBP2ShA.js";import{m as r}from"./createLucideIcon-C6nfansM.js";import{a as i,r as a}from"./toast-
|
|
1
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{c as t,y as n}from"./tabs-DHBP2ShA.js";import{m as r}from"./createLucideIcon-C6nfansM.js";import{a as i,r as a}from"./toast-2mA6GzBq.js";import{n as o}from"./store-BK5yanfN.js";import{t as ee}from"./arrow-left-wT_Oflhg.js";import{a as s,i as c,n as l,r as u,t as d}from"./lazy-issue-panels-GvnRdSfG.js";import{t as f}from"./plus-Bz25iNHX.js";import{t as p}from"./search-zs6lDYfz.js";import{t as m}from"./x-MtSojW5V.js";import{n as h,t as g}from"./ConfirmDialog-CBqd0wMR.js";import{a as _,c as v,d as y,h as b,l as te,m as ne,n as re,s as ie,t as x,u as ae}from"./issues-BjnSNgu-.js";var S=e(n(),1);function C(e,t,n){let r=e.find(e=>e.length>0)?.[0]??null;if(t==null)return r;let i=-1,a=-1;for(let[n,r]of e.entries()){let e=r.indexOf(t);if(e!==-1){i=n,a=e;break}}if(i===-1)return r;if(n===`up`||n===`down`){let r=e[i],o=n===`up`?a-1:a+1;return r[Math.max(0,Math.min(o,r.length-1))]??t}let o=n===`left`?-1:1;for(let n=i+o;n>=0&&n<e.length;n+=o){let r=e[n];if(r.length!==0)return r[Math.min(a,r.length-1)]??t}return t}var w=r();function T(){let{tasks:e,hydrated:n}=o(),r=i(),[T,oe]=(0,S.useState)([]);(0,S.useEffect)(()=>{let e=!1;return ie().then(t=>{e||oe(t)}).catch(e=>a(`load projects`,e)),()=>{e=!0}},[]);let E=(0,S.useMemo)(()=>ae(e,T),[e,T]),[D,O]=(0,S.useState)(null);(0,S.useEffect)(()=>{if(E.length===0){D!==null&&O(null);return}(!D||!E.some(e=>e.repo===D))&&O(E[0]?.repo??null)},[E,D]);let{data:k,failed:A,pending:se}=s((0,S.useMemo)(()=>D?[D]:[],[D])),j=D?k[D]:void 0,[M,N]=(0,S.useState)(``),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),[B,V]=(0,S.useState)(null),[H,U]=(0,S.useState)(!1),[W,G]=(0,S.useState)(!1),[ce,K]=(0,S.useState)(!1),q=j?.issues??[],J=(0,S.useMemo)(()=>v(q,{query:M}),[q,M]),Y=(0,S.useMemo)(()=>te(J),[J]),X=J.length,Z=R==null?null:q.find(e=>e.id===R),Q=B==null?null:q.find(e=>e.id===B);(0,S.useEffect)(()=>{R!=null&&!q.some(e=>e.id===R)&&z(null),B!=null&&!q.some(e=>e.id===B)&&V(null)},[q,R,B]),(0,S.useEffect)(()=>L(null),[D]),(0,S.useEffect)(()=>{if(P||R!=null||B!=null)return;let e=e=>{let t=e.target;if(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable))return;let n=e.key===`ArrowUp`?`up`:e.key===`ArrowDown`?`down`:e.key===`ArrowLeft`?`left`:e.key===`ArrowRight`?`right`:null;if(n){e.preventDefault();let t=C(x.map(e=>Y[e].map(e=>e.id)),I,n);t!=null&&L(t);return}(e.key===`Enter`||e.key===` `)&&I!=null&&J.some(e=>e.id===I)&&(e.preventDefault(),z(I))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Y,J,I,P,R,B]),(0,S.useEffect)(()=>{I!=null&&document.querySelector(`[data-issue-card="${I}"]`)?.scrollIntoView({block:`nearest`})},[I]);let $=e=>{r({to:`/task/$taskId`,params:{taskId:e}})};return(0,w.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,w.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,w.jsx)(h,{}),(0,w.jsxs)(`button`,{type:`button`,onClick:()=>r({to:`/`}),className:`flex items-center gap-1.5 text-muted transition-colors hover:text-fg`,title:`Back to workspace`,children:[(0,w.jsx)(ee,{size:15,strokeWidth:1.8}),(0,w.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,w.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Issues`}),(0,w.jsxs)(`label`,{className:`flex h-7 items-center gap-1.5 border border-line bg-bg px-2 text-muted focus-within:border-line-active`,children:[(0,w.jsx)(p,{size:13,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,w.jsx)(`input`,{value:M,onChange:e=>N(e.target.value),placeholder:`Filter stories ( #id, title, body )`,className:`w-52 bg-transparent text-[12px] text-fg placeholder:text-subtle focus:outline-none`}),M&&(0,w.jsx)(`button`,{type:`button`,onClick:()=>N(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear filter`,title:`Clear filter`,children:(0,w.jsx)(m,{size:13,strokeWidth:2})})]}),E.length>0&&(0,w.jsxs)(`label`,{className:`flex h-7 min-w-0 max-w-[24rem] items-center gap-1.5 border border-line bg-bg px-2 text-muted focus-within:border-line-active`,children:[(0,w.jsx)(`span`,{className:`shrink-0 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Project`}),(0,w.jsx)(`select`,{value:D??``,onChange:e=>O(e.target.value),title:D??`Select project`,className:`min-w-0 flex-1 bg-transparent font-mono text-[11px] text-fg focus:outline-none`,children:E.map(e=>(0,w.jsxs)(`option`,{value:e.repo,title:e.repo,className:`bg-surface text-fg`,children:[e.label,` · `,e.count,` · `,e.repo]},e.repo))})]}),(0,w.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 font-mono text-[11px] text-subtle`,children:[(0,w.jsxs)(`span`,{children:[X,` stor`,X===1?`y`:`ies`]}),(0,w.jsxs)(`button`,{type:`button`,disabled:!D,onClick:()=>F(!0),className:`flex items-center gap-1.5 border border-primary bg-inset px-2 py-0.5 text-[11px] text-fg transition-colors hover:bg-primary/10 disabled:cursor-not-allowed disabled:opacity-40`,title:`Capture a new story`,children:[(0,w.jsx)(f,{size:13,strokeWidth:1.8}),`New story`]})]})]}),(0,w.jsx)(`div`,{className:`min-h-0 flex-1 overflow-x-auto overflow-y-hidden p-4`,children:D?!n||se&&!j?(0,w.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Loading…`}):D&&A[D]?(0,w.jsx)(`p`,{className:`text-[12px] text-kobe-red`,children:A[D]}):X===0?(0,w.jsx)(`p`,{className:`text-[12px] text-subtle`,children:M?`No stories match your filter.`:`No stories yet. Capture one with New story.`}):(0,w.jsx)(`div`,{className:`flex h-full min-h-0 gap-4`,children:x.map(e=>{let t=re[e],n=Y[e];return(0,w.jsxs)(`section`,{className:`flex h-full min-h-0 w-72 shrink-0 flex-col`,children:[(0,w.jsxs)(`div`,{className:`mb-2 flex shrink-0 items-center gap-2`,children:[(0,w.jsx)(`h2`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] ${t.accent}`,children:t.title}),(0,w.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:n.length})]}),(0,w.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pr-0.5`,children:n.map(e=>(0,w.jsx)(c,{issue:e,selected:e.id===I,onOpen:()=>{L(e.id),z(e.id)},onDelete:()=>V(e.id)},e.id))})]},e)})}):(0,w.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`No projects yet. Create a task from the workspace to track stories against its repo.`})}),D&&P&&(0,w.jsx)(d,{children:(0,w.jsx)(l,{repoRoot:D,open:P,onClose:()=>F(!1),onCreated:(e,t)=>{t&&e.taskId&&$(e.taskId)}})}),D&&Z&&(0,w.jsx)(d,{children:(0,w.jsx)(u,{issue:Z,repoRoot:D,busy:H,starting:W,onClose:()=>z(null),onSave:async e=>{if(!D||R==null)return!1;U(!0);try{return await b(D,R,{title:e.title.trim(),body:e.body}),!0}catch(e){return a(`save issue`,e),!1}finally{U(!1)}},onStart:e=>{!D||!Z||(G(!0),ne(D,Z,e).then(({workspaceTaskId:t})=>{z(null),e.watch&&$(t)}).catch(e=>a(`start issue`,e)).finally(()=>G(!1)))},onOpenSession:Z.taskId?()=>{let e=Z.taskId;e&&(t(e),$(e))}:void 0,onPromptMerge:Z.taskId?()=>{let e=Z.taskId;e&&y(e,Z).catch(e=>a(`prompt issue merge`,e))}:void 0})}),Q&&(0,w.jsx)(g,{title:`Delete issue`,body:`Delete issue #${Q.id} "${Q.title}"? This removes only the issue record — any linked task, branch, or worktree is left untouched.`,confirmLabel:`Delete`,danger:!0,busy:ce,onConfirm:()=>{!D||B==null||(K(!0),_(D,B).then(()=>V(null)).catch(e=>a(`delete issue`,e)).finally(()=>K(!1)))},onCancel:()=>V(null)})]})}export{T as IssuesPage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as e,o as t,s as n,u as r}from"./terminal-6BCvBu4_.js";import{d as i,y as a}from"./tabs-DHBP2ShA.js";import{a as o,c as s,i as c,m as l,r as u,t as d,u as f}from"./createLucideIcon-C6nfansM.js";import{a as p,n as m,r as h}from"./toast-
|
|
1
|
+
import{l as e,o as t,s as n,u as r}from"./terminal-6BCvBu4_.js";import{d as i,y as a}from"./tabs-DHBP2ShA.js";import{a as o,c as s,i as c,m as l,r as u,t as d,u as f}from"./createLucideIcon-C6nfansM.js";import{a as p,n as m,r as h}from"./toast-2mA6GzBq.js";import{n as g,r as _}from"./settings-Cavhxdh3.js";import{a as v,t as y}from"./vendor-CdtpTJrf.js";var b=d(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),x=r(a(),1);async function S(){let e=await t.getOr(`/api/quick-prompts`,{},{label:`load quick prompts`});return{review:typeof e.review==`string`?e.review:null,pr:typeof e.pr==`string`?e.pr:null}}async function C(e){await t.put(`/api/quick-prompts`,e,{label:`save quick prompts`})}`${n}`;function w(e){return v(e)===`claude`?`/review`:`Review the current changes in this worktree critically.`}var T=[`Open a pull request for this task's branch:`,`1. Make sure the work is committed, then push the branch to origin.`,"2. Create the PR with `gh pr create` — write a clear title and a body that summarizes what changed and why, following this repo's conventions."].join(`
|
|
2
2
|
`),E=l();function D({title:e,children:t}){return(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h2`,{className:`text-[11px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),(0,E.jsx)(`div`,{className:`mt-3 space-y-3 text-[12px]`,children:t})]})}function O({label:e,detail:t,enabled:n,onToggle:r,disabled:i}){return(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border border-line bg-bg p-3`,children:[(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`div`,{className:`text-[12px] font-bold text-fg`,children:e}),t?(0,E.jsx)(`div`,{className:`mt-1 text-[11px] leading-relaxed text-subtle`,children:t}):null]}),(0,E.jsx)(`button`,{type:`button`,onClick:r,disabled:i,className:`shrink-0 border px-2 py-0.5 text-[10px] transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${n?`border-primary bg-inset text-fg`:`border-line bg-surface text-muted hover:border-primary hover:text-fg`}`,children:n?`On`:`Off`})]})}function k(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),o=(0,x.useRef)(0),s=(0,x.useCallback)(async()=>{let e=++o.current;r(!0),a(!1);try{let n=await g();e===o.current&&t(n)}catch(t){e===o.current&&a(!0),h(`load settings`,t)}finally{e===o.current&&r(!1)}},[]);return(0,x.useEffect)(()=>{s()},[s]),{settings:e,loading:n,error:i,reload:s,patch:async e=>{let n=await _(e);return t(n),n}}}function A({palette:e}){return(0,E.jsx)(`span`,{className:`flex shrink-0 overflow-hidden rounded border border-line`,children:[e.bg,e.primary,e[`kobe-blue`],e[`kobe-green`]].filter(Boolean).map((e,t)=>(0,E.jsx)(`span`,{className:`h-5 w-3`,style:{backgroundColor:e}},t))})}function j(){let{names:e,palettes:t,active:n,overridden:r}=o();return(0,E.jsxs)(`div`,{className:`border border-line bg-surface p-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,E.jsx)(`div`,{className:`text-[11px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Appearance`}),r?(0,E.jsx)(`button`,{type:`button`,onClick:u,className:`border border-line bg-bg px-2 py-0.5 text-[10px] text-muted transition-colors hover:border-primary hover:text-fg`,title:`Clear the web-local theme and follow the TUI again`,children:`Follow TUI`}):(0,E.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`following TUI`})]}),e.length===0?(0,E.jsx)(`p`,{className:`mt-4 text-[12px] text-subtle`,children:`Loading themes…`}):(0,E.jsx)(`div`,{className:`mt-4 grid grid-cols-1 gap-1.5 sm:grid-cols-2`,children:e.map(e=>{let r=e===n;return(0,E.jsxs)(`button`,{type:`button`,onClick:()=>c(e),className:`flex items-center gap-2 border px-2 py-1.5 text-left transition-colors ${r?`border-primary bg-inset`:`border-line bg-bg hover:border-primary`}`,children:[(0,E.jsx)(A,{palette:t[e]??{}}),(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] ${r?`text-fg`:`text-muted`}`,children:e}),r&&(0,E.jsx)(b,{size:13,strokeWidth:2.5,className:`shrink-0 text-primary`})]},e)})})]})}function M(){return(0,E.jsx)(`div`,{className:`space-y-6`,children:(0,E.jsxs)(D,{title:`Dashboard theme`,children:[(0,E.jsx)(`p`,{className:`text-[11px] leading-relaxed text-subtle`,children:`Pick a theme for this browser, or follow the TUI's theme. This is a browser-local override — it never changes the TUI.`}),(0,E.jsx)(j,{})]})})}function N({engine:e,onSave:t,onDefault:n,onRemove:r}){let[i,a]=(0,x.useState)(e.command),[o,s]=(0,x.useState)(e.label),c=/\s--[A-Za-z0-9][\w-]*/.test(o)&&!/\s--[A-Za-z0-9][\w-]*/.test(i);return(0,x.useEffect)(()=>{a(e.command),s(e.label)},[e.command,e.label]),(0,E.jsxs)(`div`,{className:`border border-line bg-bg p-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(`span`,{className:`font-bold text-fg`,children:e.label}),e.isDefault?(0,E.jsx)(`span`,{className:`font-mono text-[10px] text-primary`,children:`default`}):null,e.isCustom?(0,E.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`custom`}):null]}),(0,E.jsx)(`div`,{className:`font-mono text-[10px] text-subtle`,children:e.id})]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>n(e.id),className:`shrink-0 border border-line bg-surface px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Make default`})]}),(0,E.jsxs)(`label`,{className:`mt-3 block`,children:[(0,E.jsx)(`span`,{className:`text-[11px] text-muted`,children:`Display name (label only)`}),(0,E.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),className:`mt-1 w-full border border-line bg-surface px-2 py-1 text-fg focus:border-line-active focus:outline-none`})]}),(0,E.jsxs)(`label`,{className:`mt-2 block`,children:[(0,E.jsx)(`span`,{className:`text-[11px] text-muted`,children:`Launch command (argv that Rove runs)`}),(0,E.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),className:`mt-1 w-full border border-line bg-surface px-2 py-1 font-mono text-fg focus:border-line-active focus:outline-none`})]}),c?(0,E.jsx)(`div`,{className:`mt-2 border border-kobe-yellow/40 bg-kobe-yellow/10 px-2 py-1 text-[11px] leading-relaxed text-kobe-yellow`,children:`This looks like a flag in the display name. Put permission/model flags in Launch command; the label is never executed.`}):null,(0,E.jsxs)(`div`,{className:`mt-3 flex items-center gap-2`,children:[(0,E.jsx)(`button`,{type:`button`,onClick:()=>t(e.id,i,o),className:`border border-primary bg-inset px-2 py-1 text-[11px] text-fg`,children:`Save`}),e.isCustom?(0,E.jsx)(`button`,{type:`button`,onClick:()=>r(e.id),className:`border border-kobe-red/40 bg-kobe-red/10 px-2 py-1 text-[11px] text-kobe-red`,children:`Remove`}):null]})]})}function P({settings:e,patch:t}){let[n,r]=(0,x.useState)(``),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(``),c=(e,n,r)=>void t({engineUpdates:[{id:e,command:n,label:r}]}).then(()=>m(`success`,`engine saved`));return(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsxs)(D,{title:`Launch commands`,children:[(0,E.jsx)(`p`,{className:`text-[11px] leading-relaxed text-subtle`,children:`Same shared engine settings as the TUI. Built-ins can be renamed or pointed at a different command. Permission/model flags must live in Launch command, not Display name. Custom engines are available in new task and tab pickers.`}),(0,E.jsx)(`div`,{className:`space-y-2`,children:e.engines.map(e=>(0,E.jsx)(N,{engine:e,onSave:c,onDefault:e=>void t({defaultEngine:e}).then(()=>m(`success`,`default engine saved`)),onRemove:e=>void t({removeEngine:e}).then(()=>m(`success`,`engine removed`))},e.id))})]}),(0,E.jsxs)(D,{title:`Add engine`,children:[(0,E.jsxs)(`div`,{className:`grid gap-2 md:grid-cols-3`,children:[(0,E.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),placeholder:`id, e.g. aider`,className:`border border-line bg-bg px-2 py-1 text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`}),(0,E.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:`command`,className:`border border-line bg-bg px-2 py-1 font-mono text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`}),(0,E.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:`display name`,className:`border border-line bg-bg px-2 py-1 text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`})]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>void t({addEngine:{id:n,command:i,label:o}}).then(()=>{r(``),a(``),s(``),m(`success`,`engine added`)}).catch(e=>h(`add engine`,e)),className:`border border-primary bg-inset px-2 py-1 text-[11px] text-fg`,children:`Add engine`})]})]})}function F(){let[e,t]=(0,x.useState)(``),[n,r]=(0,x.useState)(``),[i,a]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{let e=!1;return S().then(n=>{e||(t(n.review??``),r(n.pr??``),a(!0))}).catch(t=>{e||h(`load quick-action templates`,t)}),()=>{e=!0}},[]),(0,E.jsxs)(D,{title:`Board quick actions`,children:[(0,E.jsxs)(`label`,{className:`block`,children:[(0,E.jsx)(`span`,{className:`text-muted`,children:`Review template`}),(0,E.jsx)(`textarea`,{value:e,onChange:e=>t(e.target.value),placeholder:`default: ${w(y)}`,rows:3,disabled:!i,className:`mt-1 w-full resize-y border border-line bg-bg p-2 font-mono text-[12px] text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`})]}),(0,E.jsxs)(`label`,{className:`block`,children:[(0,E.jsx)(`span`,{className:`text-muted`,children:`Open-PR template`}),(0,E.jsx)(`textarea`,{value:n,onChange:e=>r(e.target.value),placeholder:`default:\n${T}`,rows:5,disabled:!i,className:`mt-1 w-full resize-y border border-line bg-bg p-2 font-mono text-[12px] text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`})]}),(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,E.jsx)(`span`,{className:`text-[11px] text-subtle`,children:`Empty = built-in default. Rove appends its status/URL guardrails at send time.`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>void C({review:e,pr:n}).then(()=>m(`success`,`quick-action templates saved`)).catch(e=>h(`save templates`,e)),disabled:!i,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Save`})]})]})}function I({settings:e,patch:t}){let[n,r]=(0,x.useState)(!1),a=p();return(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsxs)(D,{title:`Experimental gates`,children:[(0,E.jsx)(O,{label:`Remote projects`,detail:`Enables SSH-backed remote project setup in the CLI.`,enabled:e.remoteProjects,onToggle:()=>void t({remoteProjects:!e.remoteProjects})}),(0,E.jsx)(O,{label:`Archived history preview`,detail:`Beta: click an archived task to preview its read-only engine history, even after its worktree is gone.`,enabled:e.archivedHistoryPreview,onToggle:()=>void t({archivedHistoryPreview:!e.archivedHistoryPreview})}),(0,E.jsx)(O,{label:`Auto status flow`,detail:`Moves backlog tasks to in progress on turn start and injects the self-report protocol.`,enabled:e.autoStatus,onToggle:()=>void t({autoStatus:!e.autoStatus})}),(0,E.jsx)(O,{label:`Dispatcher`,detail:`Enables the field-notes dispatcher protocol for repo main sessions.`,enabled:e.dispatcher,onToggle:()=>void t({dispatcher:!e.dispatcher})})]}),(0,E.jsxs)(D,{title:`Browser workspace`,children:[(0,E.jsx)(`p`,{className:`text-[11px] leading-relaxed text-subtle`,children:`Reset the per-task tab layout (open tabs, splits, selection). Pure browser state: tasks, worktrees, notes, and engines are untouched.`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>{if(!n){r(!0);return}i(),a({to:`/`}),r(!1)},onBlur:()=>r(!1),className:`border px-3 py-1.5 text-[11px] transition-colors ${n?`border-kobe-red/50 bg-kobe-red/10 text-kobe-red`:`border-line bg-bg text-muted hover:border-primary hover:text-fg`}`,children:n?`Click again to reset layout`:`Reset layout`})]})]})}function L(){let{supported:e,permission:t,enabled:n}=f();return(0,E.jsx)(`div`,{className:`space-y-6`,children:(0,E.jsxs)(D,{title:`Notifications`,children:[e?(0,E.jsx)(O,{label:`Desktop notifications`,detail:`Get pinged when a task needs input or errors while this browser tab is in the background.`,enabled:n,onToggle:()=>void s(!n),disabled:t===`denied`&&!n}):(0,E.jsx)(`p`,{className:`text-[11px] leading-relaxed text-subtle`,children:`This browser does not support desktop notifications.`}),t===`denied`&&!n?(0,E.jsx)(`p`,{className:`text-[11px] leading-relaxed text-kobe-yellow`,children:`Notifications are blocked for this site. Allow them in your browser's site settings to turn this on.`}):null]})})}var R=e({SettingsPage:()=>B}),z=[[`general`,`General`],[`engines`,`Engines`],[`board`,`Board`],[`dev`,`Dev`],[`notifications`,`Notifications`]];function B({onClose:e}){let[t,n]=(0,x.useState)(`general`),{settings:r,loading:i,error:a,reload:o,patch:s}=k(),c=(0,x.useMemo)(()=>z.find(([e])=>e===t)?.[1]??`Settings`,[t]);return(0,E.jsxs)(`section`,{"data-settings-open":!0,className:`flex min-w-0 flex-1 flex-col bg-bg`,children:[(0,E.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center justify-between border-b border-line bg-surface px-3`,children:[(0,E.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Settings`}),(0,E.jsx)(`button`,{type:`button`,onClick:e,className:`border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Close`})]}),(0,E.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[180px_minmax(0,1fr)] overflow-hidden`,children:[(0,E.jsx)(`nav`,{className:`min-h-0 overflow-auto border-r border-line bg-surface/60 p-2`,children:z.map(([e,r])=>(0,E.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:`mb-1 block w-full border px-2 py-2 text-left text-[12px] transition-colors ${t===e?`border-primary bg-inset text-fg`:`border-transparent text-muted hover:border-line hover:bg-bg hover:text-fg`}`,children:r},e))}),(0,E.jsx)(`main`,{className:`min-h-0 overflow-auto p-4`,children:(0,E.jsxs)(`div`,{className:`mx-auto max-w-4xl`,children:[(0,E.jsx)(`h1`,{className:`mb-3 text-[13px] font-bold uppercase tracking-[0.12em] text-fg`,children:c}),a?(0,E.jsxs)(`div`,{className:`border border-line bg-surface p-4 text-[12px]`,children:[(0,E.jsx)(`p`,{className:`text-subtle`,children:`Couldn't load settings (daemon web transport offline?)`}),(0,E.jsx)(`button`,{type:`button`,onClick:o,className:`mt-3 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:`Retry`})]}):i||!r?(0,E.jsx)(`div`,{className:`border border-line bg-surface p-4 text-[12px] text-subtle`,children:`Loading settings...`}):t===`general`?(0,E.jsx)(M,{}):t===`engines`?(0,E.jsx)(P,{settings:r,patch:s}):t===`board`?(0,E.jsx)(F,{}):t===`dev`?(0,E.jsx)(I,{settings:r,patch:s}):(0,E.jsx)(L,{})]})})]})]})}export{R as n,B as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{_ as t,y as n}from"./tabs-DHBP2ShA.js";import{i as r,r as i,t as a}from"./columns-3-
|
|
1
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{_ as t,y as n}from"./tabs-DHBP2ShA.js";import{i as r,r as i,t as a}from"./columns-3-xX5P4LBE.js";import{f as o,m as s,p as c,t as l}from"./createLucideIcon-C6nfansM.js";import{a as u,o as d}from"./toast-2mA6GzBq.js";import{n as f}from"./store-BK5yanfN.js";import{t as p}from"./x-MtSojW5V.js";import{n as m}from"./web-transport-BFuf9jKF.js";function h(e){let t=d({warn:e?.router===void 0}),n=e?.router||t;return r(n.stores.__store,i(e,n))}var g=l(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),_=l(`panels-top-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),v=e(n(),1),y=s();function b(){let{daemonConnected:e,streamConnected:t,hydrated:n}=f(),[r,i]=(0,v.useState)(!1);return!m({daemonConnected:e,streamConnected:t,hydrated:n})||r?null:(0,y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-kobe-yellow/40 bg-kobe-yellow/10 px-3 py-1.5 text-[11px] text-kobe-yellow`,children:[(0,y.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full bg-kobe-yellow`}),(0,y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[`The `,c(),` daemon is offline — task data is frozen and mutations will fail until it reconnects (it auto-reconnects; the dashboard recovers on its own). If it doesn't recover, run`,` `,(0,y.jsx)(`code`,{children:o(`doctor`)}),` or`,` `,(0,y.jsx)(`code`,{children:o(`reset`)}),` in a terminal.`]}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`shrink-0 text-kobe-yellow/70 hover:text-kobe-yellow`,"aria-label":`dismiss`,children:(0,y.jsx)(p,{size:13,strokeWidth:2})})]})}function x(){let e=u(),n=h({select:e=>e.location.pathname}),{selectedTaskId:r}=t(),i=n.startsWith(`/board`)?`board`:n.startsWith(`/worktrees`)?`worktrees`:`workspace`,o=t=>{if(i!==t){if(t===`workspace`){e(r?{to:`/task/$taskId`,params:{taskId:r}}:{to:`/`});return}e({to:t===`board`?`/board`:`/worktrees`})}},s=e=>`flex items-center gap-1.5 border-l border-line px-2 py-1 text-[11px] transition-colors first:border-l-0 ${e?`border-line-active bg-inset text-fg`:`text-subtle hover:text-fg`}`;return(0,y.jsxs)(`div`,{className:`flex items-center overflow-hidden rounded-sm border border-line`,children:[(0,y.jsxs)(`button`,{type:`button`,onClick:()=>o(`workspace`),"aria-pressed":i===`workspace`,title:`Workspace`,className:s(i===`workspace`),children:[(0,y.jsx)(_,{size:13,strokeWidth:1.8}),`Workspace`]}),(0,y.jsxs)(`button`,{type:`button`,onClick:()=>o(`board`),"aria-pressed":i===`board`,title:`Board`,className:s(i===`board`),children:[(0,y.jsx)(a,{size:13,strokeWidth:1.8}),`Board`]}),(0,y.jsxs)(`button`,{type:`button`,onClick:()=>o(`worktrees`),"aria-pressed":i===`worktrees`,title:`Worktrees`,className:s(i===`worktrees`),children:[(0,y.jsx)(g,{size:13,strokeWidth:1.8}),`Worktrees`]})]})}export{b as n,x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Board as e}from"./Board-72QPdwHn.js";var t=e;export{t as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{y as t}from"./tabs-DHBP2ShA.js";import{t as n}from"./createLucideIcon-C6nfansM.js";import{o as r}from"./toast-
|
|
1
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{y as t}from"./tabs-DHBP2ShA.js";import{t as n}from"./createLucideIcon-C6nfansM.js";import{o as r}from"./toast-2mA6GzBq.js";import{t as i}from"./with-selector-D8BuTuR6.js";function a(e){return e[e.length-1]}function o(e){return typeof e==`function`}function s(e,t){return o(e)?e(t):e}var c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function u(e){for(let t in e)if(c.call(e,t))return!0;return!1}var d=()=>Object.create(null),f=(e,t)=>p(e,t,d);function p(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=_(e)&&_(i);if(!a&&!(h(e)&&h(i)))return i;let o=a?e:m(e);if(!o)return i;let s=a?i:m(i);if(!s)return i;let l=o.length,u=s.length,d=a?Array(u):n(),f=0;for(let t=0;t<u;t++){let o=a?t:s[t],u=e[o],m=i[o];if(u===m){d[o]=u,(a?t<l:c.call(e,o))&&f++;continue}if(u===null||m===null||typeof u!=`object`||typeof m!=`object`){d[o]=m;continue}let h=p(u,m,n,r+1);d[o]=h,h===u&&f++}return l===u&&f===l?e:d}function m(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!l.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!l.call(e,t))return!1;r.push(t)}return r}function h(e){if(!g(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!g(n)||!n.hasOwnProperty(`isPrototypeOf`))}function g(e){return Object.prototype.toString.call(e)===`[object Object]`}function _(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!v(e[r],t[r],n))return!1;return!0}if(h(e)&&h(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!v(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!v(e[o],t[o],n)))return!1;return i===a}return!1}function y(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function b(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function x(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var S=/[\x00-\x1f\x7f"<>`{}]/g;function C(e){return e.replace(S,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function w(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return C(t)}var T=[`http:`,`https:`,`mailto:`,`tel:`];function E(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function D(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=w(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=w(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function O(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function k(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function A(){throw Error(`Invariant failed`)}var j=e(t(),1),M=j.createContext(void 0),N=j.createContext(void 0),P=i();function F(e,t){return e===t}function I(e,t,n=F){let r=(0,j.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,j.useCallback)(()=>e?.get(),[e]);return(0,P.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var L={get(){},subscribe(){return{unsubscribe(){}}}};function R(e,t){let n=j.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=p(n.current,i):i}}function z(e){let t=r(),n=j.useContext(e.from?N:M),i=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),a=R(e,t),o=I(i??L,e=>e?a(e):L);if(o!==L)return o;(e.shouldThrow??!0)&&A()}var B=n(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]);export{x as _,M as a,p as b,k as c,v as d,O as f,b as g,E as h,I as i,y as l,u as m,z as n,A as o,s as p,R as r,T as s,B as t,D as u,a as v,f as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AppShell-
|
|
2
|
-
import{i as e}from"./store-BK5yanfN.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-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AppShell-TzCpzcDS.js","assets/terminal-6BCvBu4_.js","assets/tabs-DHBP2ShA.js","assets/createLucideIcon-C6nfansM.js","assets/toast-2mA6GzBq.js","assets/external-store-CNyRxjsC.js","assets/ViewToggle-Bvvh1yLG.js","assets/columns-3-xX5P4LBE.js","assets/with-selector-D8BuTuR6.js","assets/store-BK5yanfN.js","assets/x-MtSojW5V.js","assets/web-transport-BFuf9jKF.js","assets/active-task-CCVuYWP9.js","assets/triage-DjBy6dI9.js","assets/use-focus-trap-oPsw86zw.js","assets/engines-CZCmPVm2.js","assets/settings-Cavhxdh3.js","assets/vendor-CdtpTJrf.js","assets/WorkspaceTabs-ZhpZ33cd.js","assets/ChatTranscript-Bw-ROsjY.js","assets/rotate-cw-BsVaYno1.js","assets/search-zs6lDYfz.js","assets/time-kviT26Tm.js","assets/WorkspaceTabs-DLzL-Tad.css","assets/SettingsPage-DovXUI00.js","assets/plus-Bz25iNHX.js","assets/activity-BjTd1D8q.js","assets/ConfirmDialog-CBqd0wMR.js","assets/text-match-DW3sD-Rt.js","assets/SlideOver-CI7vBtQJ.js","assets/chips-NdkDNqV7.js","assets/AppShell-HiyATJse.css","assets/Board-72QPdwHn.js","assets/external-link-Cj-9rta8.js","assets/lazy-issue-panels-GvnRdSfG.js","assets/issues-BjnSNgu-.js","assets/IssuesPage-BlWjFWpu.js","assets/arrow-left-wT_Oflhg.js","assets/ChatTerminal-B80ADLf2.js","assets/ChatTerminal-BrP-ENHg.css","assets/BoardPeek-gUixsQIV.js","assets/IssueIntakePanel-CBM21cyc.js","assets/RichEditor-CY2cypY2.js","assets/react-dom-Ccqy9Xi6.js","assets/RichEditor-B4sEOPyN.css","assets/IssuePeek-Ce8Qc6KY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./store-BK5yanfN.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-TzCpzcDS.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-72QPdwHn.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-BlWjFWpu.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-ZhpZ33cd.js`).then(e=>e.n),__vite__mapDeps([18,1,2,3,9,19,20,21,10,11,22,17,23])),e(()=>import(`./ChatTerminal-B80ADLf2.js`),__vite__mapDeps([38,1,2,3,9,20,11,39])),e(()=>import(`./BoardPeek-gUixsQIV.js`),__vite__mapDeps([40,1,2,3,9,19,20,21,10,11,22,33,26,14,17])),e(()=>import(`./IssueIntakePanel-CBM21cyc.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-Ce8Qc6KY.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-DovXUI00.js`).then(e=>e.n),__vite__mapDeps([24,1,2,3,4,5,16,17]))])}export{a as i,n,r,i as t};
|