@sma1lboy/kobe 0.8.165 → 0.8.167
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 +298 -298
- package/dist/cli/kobe-run.js +298 -298
- package/dist/cli/pty-host-node.mjs +135 -106
- package/dist/cli/rove-run.js +298 -298
- package/dist/web-ui/assets/AppShell-A79AgA-r.js +5 -0
- package/dist/web-ui/assets/{Board-B0oB8DMk.js → Board-By7g_Fl3.js} +1 -1
- package/dist/web-ui/assets/BoardPeek-CdAMtCEs.js +2 -0
- package/dist/web-ui/assets/{ConfirmDialog-D-NILtP0.js → ConfirmDialog-DChCLBRW.js} +1 -1
- package/dist/web-ui/assets/{IssuesPage-BjLRf_cj.js → IssuesPage-H7bWnbU-.js} +1 -1
- package/dist/web-ui/assets/SettingsPage-DX3tv5Yc.js +2 -0
- package/dist/web-ui/assets/WorkspaceTabs-CUfXWk-O.js +3 -0
- package/dist/web-ui/assets/board-CvA1XFBt.js +1 -0
- package/dist/web-ui/assets/{desktop-CFge7SbS.js → desktop-C2FN7ili.js} +2 -2
- package/dist/web-ui/assets/{index-BgcK6obF.js → index-siRV5zR0.js} +3 -3
- package/dist/web-ui/assets/issues-7mJB6TUn.js +1 -0
- package/dist/web-ui/assets/routes-Dq_5HCeD.js +1 -0
- package/dist/web-ui/assets/{task._taskId-EQWWNO2k.js → task._taskId-CTj9HrUF.js} +2 -2
- package/dist/web-ui/assets/{task._taskId-BuwKbKaG.js → task._taskId-IF3pimu3.js} +1 -1
- package/dist/web-ui/assets/{worktrees-3wHfn7Vh.js → worktrees-H75CQbMU.js} +1 -1
- package/dist/web-ui/index.html +3 -3
- package/package.json +1 -1
- package/dist/web-ui/assets/AppShell-ByiYfvCg.js +0 -5
- package/dist/web-ui/assets/BoardPeek-VXShygbB.js +0 -2
- package/dist/web-ui/assets/SettingsPage-CLRhr-sg.js +0 -2
- package/dist/web-ui/assets/WorkspaceTabs-kqzy_Dsf.js +0 -3
- package/dist/web-ui/assets/board-GAhbgwzQ.js +0 -1
- package/dist/web-ui/assets/issues-DmgD6qU_.js +0 -1
- package/dist/web-ui/assets/routes-DMeRqoPI.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IssuesPage as e}from"./IssuesPage-H7bWnbU-.js";var t=e;export{t as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AppShell as e}from"./AppShell-A79AgA-r.js";var t=e;export{t as component};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/task._taskId-
|
|
2
|
-
import{l as e}from"./terminal-qBEkzc-m.js";import{y as t}from"./tabs-Dx-TnbvG.js";import{d as n,g as r,h as i,i as a,n as o,o as s,p as c,v as l}from"./columns-3-CQGAnX-4.js";import{d as u}from"./createLucideIcon-CM5xLVj1.js";import{a as d,o as f}from"./toast-BXjAT0ix.js";import{t as p}from"./react-dom-DCnDkJvp.js";import{i as m}from"./store-BXzqsTjs.js";var h=e(t(),1),g=h.use,_=typeof window<`u`?h.useLayoutEffect:h.useEffect;function v(e){let t=h.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function y(e,t,n={},r={}){h.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function b(e){let t=h.useRef(null);return h.useImperativeHandle(e,()=>t.current,[]),t}function x(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var S=4,ee=5;function te(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function C(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=te(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function w(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=C(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=D(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=D(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=O(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=D(n.fullPath??n.from);e.kind=ee,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=D(n.fullPath??n.from);e.kind=S,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)w(e,t,r,s,i,a,o)}function T(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function E(e){if(e.pathless)for(let t of e.pathless)E(t);if(e.static)for(let t of e.static.values())E(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())E(t);if(e.dynamic?.length){e.dynamic.sort(T);for(let t of e.dynamic)E(t)}if(e.optional?.length){e.optional.sort(T);for(let t of e.optional)E(t)}if(e.wildcard?.length){e.wildcard.sort(T);for(let t of e.wildcard)E(t)}}function D(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function O(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function k(e,t){let n=D(`/`),r=new Uint16Array(6);for(let t of e)w(!1,r,t,1,n,0);E(n),t.masksTree=n,t.flatCache=x(1e3)}function A(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ie(e,t.masksTree);return t.flatCache.set(e,r),r}function j(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=D(`/`),w(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ie(r,o,n)}function M(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ie(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=oe(a.route)),t.matchCache.set(r,a),a}function ne(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function re(e,t=!1,n){let r=D(e.fullPath),i=new Uint16Array(6),a={},o={},c=0;return w(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in a&&s(),a[e.id]=e,c!==0&&e.path){let t=ne(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}c++}),E(r),{processedTree:{segmentTree:r,singleCache:x(1e3),matchCache:x(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ie(e,t,n=!1){let r=e.split(`/`),i=ce(e,r,t,n);if(!i)return null;let[a]=ae(e,r,i);return{route:i.node.route,rawParams:a}}function ae(e,t,n){let r=se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===S)break;if(u.kind===ee){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function oe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!P(u,n))continue;if(i.parse){if(!ue(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==S&&P(c,n)&&(c=n);let v=l===o;if(v&&(i.route&&(!a||i.kind===S||i.kind===2)&&P(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[l],b;if(v&&i.index){let n={node:i.index,index:l,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(ue(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&le(p,o))return n;P(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(l).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:l,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:l+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+N(o,l),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:l+1,skipped:d,depth:f+1,statics:p,dynamics:m+N(o,l),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:l,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function N(e,t){return 2**(e-t-1)}function le(e,t){return e===2**(t-1)-1}function ue(e,t,n){let r,i;try{[r,i]=ae(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function P(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===S)>(e.node.kind===S)||t.node.kind===S==(e.node.kind===S)&&t.depth>e.depth)))}function F(e){return I(e.filter(e=>e!==void 0).join(`/`))}function I(e){return e.replace(/\/{2,}/g,`/`)}function L(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function de(e){return R(L(e))}function z(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function fe(e,t,n){return z(e,n)===z(t,n)}function pe({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&l(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(l(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=I(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function B(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function V(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>U(e,n)).join(`/`):U(r,n):r}function H({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=C(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=V(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function U(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var W=`__root__`;function G(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function me(e){return e instanceof Response&&!!e.options}var he=`Error preloading route! ☝️`,ge=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=W:this.parentRoute||s();let r=n?W:t?.path;r&&r!==`/`&&(r=L(r));let i=t?.id||r,a=n?W:F([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=F([`/`,a]));let o=a===`__root__`?`/`:F([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>G({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},_e=class extends ge{constructor(e){super(e)}},K=u();function q({children:e,fallback:t=null}){return ve()?(0,K.jsx)(h.Fragment,{children:e}):(0,K.jsx)(h.Fragment,{children:t})}function ve(){return h.useSyncExternalStore(J,()=>!0,()=>!1)}function J(){return()=>{}}function Y(e){return o({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ye(e){let{select:t,...n}=e;return o({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function X(e){return o({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function be(e){return o({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Z(e){return o({...e,select:t=>e.select?e.select(t.context):t.context})}var xe=e(p(),1);function Se(e,t){let r=f(),o=b(t),{activeProps:s,inactiveProps:l,activeOptions:u,to:d,preload:p,preloadDelay:m,preloadIntentProximity:g,hashScrollIntoView:_,replace:v,startTransition:x,resetScroll:S,viewTransition:ee,children:te,target:C,disabled:w,style:T,className:E,onClick:D,onBlur:O,onFocus:k,onMouseEnter:A,onMouseLeave:j,onTouchStart:M,ignoreBlocker:ne,params:re,search:ie,hash:ae,state:oe,mask:se,reloadDocument:ce,unsafeRelative:N,from:le,_fromLocation:ue,...P}=e,F=ve(),I=h.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),L=a(r.stores.location,e=>e,(e,t)=>e.href===t.href),R=h.useMemo(()=>{let e={_fromLocation:L,...I};return r.buildLocation(e)},[r,L,I]),de=R.maskedLocation?R.maskedLocation.publicHref:R.publicHref,pe=R.maskedLocation?R.maskedLocation.external:R.external,B=h.useMemo(()=>ke(de,pe,r.history,w),[w,pe,de,r.history]),V=h.useMemo(()=>{if(B?.external)return i(B.href,r.protocolAllowlist)?void 0:B.href;if(!Ae(d)&&!(typeof d!=`string`||d.indexOf(`:`)===-1))try{return new URL(d),i(d,r.protocolAllowlist)?void 0:d}catch{}},[d,B,r.protocolAllowlist]),H=h.useMemo(()=>{if(V)return!1;if(u?.exact){if(!fe(L.pathname,R.pathname,r.basepath))return!1}else{let e=z(L.pathname,r.basepath),t=z(R.pathname,r.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(u?.includeSearch??!0)&&!n(L.search,R.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:!u?.includeHash||F&&L.hash===R.hash},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,L,V,F,R.hash,R.pathname,R.search,r.basepath]),U=H?c(s,{})??we:Ce,W=H?Ce:c(l,{})??Ce,G=[E,U.className,W.className].filter(Boolean).join(` `),me=(T||U.style||W.style)&&{...T,...U.style,...W.style},[ge,_e]=h.useState(!1),K=h.useRef(!1),q=e.reloadDocument||V?!1:p??r.options.defaultPreload,J=m??r.options.defaultPreloadDelay??0,Y=h.useCallback(()=>{r.preloadRoute({...I,_builtLocation:R}).catch(e=>{console.warn(e),console.warn(he)})},[r,I,R]);y(o,h.useCallback(e=>{e?.isIntersecting&&Y()},[Y]),Oe,{disabled:!!w||q!==`viewport`}),h.useEffect(()=>{K.current||!w&&q===`render`&&(Y(),K.current=!0)},[w,Y,q]);let ye=e=>{let t=e.currentTarget.getAttribute(`target`),n=C===void 0?t:C;if(!w&&!Me(e)&&!e.defaultPrevented&&(!n||n===`_self`)&&e.button===0){e.preventDefault(),(0,xe.flushSync)(()=>{_e(!0)});let t=r.subscribe(`onResolved`,()=>{t(),_e(!1)});r.navigate({...I,replace:v,resetScroll:S,hashScrollIntoView:_,startTransition:x,viewTransition:ee,ignoreBlocker:ne})}};if(V)return{...P,ref:o,href:V,...te&&{children:te},...C&&{target:C},...w&&{disabled:w},...T&&{style:T},...E&&{className:E},...D&&{onClick:D},...O&&{onBlur:O},...k&&{onFocus:k},...A&&{onMouseEnter:A},...j&&{onMouseLeave:j},...M&&{onTouchStart:M}};let X=e=>{if(w||q!==`intent`)return;if(!J){Y();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),Y()},J);Q.set(t,n)},be=e=>{w||q!==`intent`||Y()},Z=e=>{if(w||!q||!J)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...P,...U,...W,href:B?.href,ref:o,onClick:$([D,ye]),onBlur:$([O,Z]),onFocus:$([k,X]),onMouseEnter:$([A,X]),onMouseLeave:$([j,Z]),onTouchStart:$([M,be]),disabled:!!w,target:C,...me&&{style:me},...G&&{className:G},...w&&Te,...H&&Ee,...F&&ge&&De}}var Ce={},we={className:`active`},Te={role:`link`,"aria-disabled":!0},Ee={"data-status":`active`,"aria-current":`page`},De={"data-transitioning":`transitioning`},Q=new WeakMap,Oe={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ke(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ae(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var je=h.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Se(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return h.createElement(`a`,t,o)}return h.createElement(n,a,o)});function Me(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ne=class extends ge{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Pe(e){return new Ne(e)}var Fe=class extends _e{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Ie(e){return new Fe(e)}function Le(e){return new Re(e,{silent:!0}).createRoute}var Re=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=Pe(e);return t.isRoot=!1,t},this.silent=t?.silent}};function ze(e,t){let n,i,a,o,s=()=>(n||=e().then(e=>{n=void 0,i=e[t??`default`]}).catch(e=>{if(a=e,r(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(g)g(s());else throw s();return h.createElement(i,e)};return c.preload=s,c}var Be=Le(`/task/$taskId`)({component:ze(()=>m(()=>import(`./task._taskId-BuwKbKaG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),`component`)});export{_ as C,x as S,A as _,q as a,k as b,W as c,H as d,F as f,oe as g,R as h,Ie as i,I as l,de as m,ze as n,me as o,pe as p,Le as r,G as s,Be as t,B as u,M as v,v as w,re as x,j as y};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/task._taskId-IF3pimu3.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/active-task-CuoFMFoR.js","assets/store-BXzqsTjs.js","assets/AppShell-A79AgA-r.js","assets/toast-BXjAT0ix.js","assets/external-store-DJlWpyYC.js","assets/ViewToggle-BHBzWlni.js","assets/columns-3-CQGAnX-4.js","assets/with-selector-B5R3h-Ow.js","assets/x-7cB9X7Hi.js","assets/web-transport-D0bugxxv.js","assets/triage-DDohuPMh.js","assets/use-focus-trap-DNMrlNR0.js","assets/engines-Cnxy1hW9.js","assets/settings-tPcmEHCP.js","assets/vendor-CdtpTJrf.js","assets/WorkspaceTabs-CUfXWk-O.js","assets/ChatTranscript-Co0UhezW.js","assets/rotate-cw-D-UUtiD0.js","assets/search-BxbFZoup.js","assets/time-kviT26Tm.js","assets/WorkspaceTabs-DLzL-Tad.css","assets/SettingsPage-DX3tv5Yc.js","assets/plus-BbX5qXba.js","assets/activity-BjTd1D8q.js","assets/ConfirmDialog-DChCLBRW.js","assets/desktop-C2FN7ili.js","assets/text-match-DW3sD-Rt.js","assets/SlideOver-Dxtk6Gn2.js","assets/chips-Da37C4KZ.js","assets/AppShell-HiyATJse.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{l as e}from"./terminal-qBEkzc-m.js";import{y as t}from"./tabs-Dx-TnbvG.js";import{d as n,g as r,h as i,i as a,n as o,o as s,p as c,v as l}from"./columns-3-CQGAnX-4.js";import{d as u}from"./createLucideIcon-CM5xLVj1.js";import{a as d,o as f}from"./toast-BXjAT0ix.js";import{t as p}from"./react-dom-DCnDkJvp.js";import{i as m}from"./store-BXzqsTjs.js";var h=e(t(),1),g=h.use,_=typeof window<`u`?h.useLayoutEffect:h.useEffect;function v(e){let t=h.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function y(e,t,n={},r={}){h.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function b(e){let t=h.useRef(null);return h.useImperativeHandle(e,()=>t.current,[]),t}function x(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var S=4,ee=5;function te(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function C(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=te(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function w(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=C(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=D(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=D(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=O(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=O(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=D(n.fullPath??n.from);e.kind=ee,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=D(n.fullPath??n.from);e.kind=S,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)w(e,t,r,s,i,a,o)}function T(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function E(e){if(e.pathless)for(let t of e.pathless)E(t);if(e.static)for(let t of e.static.values())E(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())E(t);if(e.dynamic?.length){e.dynamic.sort(T);for(let t of e.dynamic)E(t)}if(e.optional?.length){e.optional.sort(T);for(let t of e.optional)E(t)}if(e.wildcard?.length){e.wildcard.sort(T);for(let t of e.wildcard)E(t)}}function D(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function O(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function k(e,t){let n=D(`/`),r=new Uint16Array(6);for(let t of e)w(!1,r,t,1,n,0);E(n),t.masksTree=n,t.flatCache=x(1e3)}function A(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ie(e,t.masksTree);return t.flatCache.set(e,r),r}function j(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=D(`/`),w(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ie(r,o,n)}function M(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ie(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=oe(a.route)),t.matchCache.set(r,a),a}function ne(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function re(e,t=!1,n){let r=D(e.fullPath),i=new Uint16Array(6),a={},o={},c=0;return w(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in a&&s(),a[e.id]=e,c!==0&&e.path){let t=ne(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}c++}),E(r),{processedTree:{segmentTree:r,singleCache:x(1e3),matchCache:x(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ie(e,t,n=!1){let r=e.split(`/`),i=ce(e,r,t,n);if(!i)return null;let[a]=ae(e,r,i);return{route:i.node.route,rawParams:a}}function ae(e,t,n){let r=se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===S)break;if(u.kind===ee){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function oe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!P(u,n))continue;if(i.parse){if(!ue(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==S&&P(c,n)&&(c=n);let v=l===o;if(v&&(i.route&&(!a||i.kind===S||i.kind===2)&&P(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[l],b;if(v&&i.index){let n={node:i.index,index:l,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(ue(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&le(p,o))return n;P(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(l).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:l,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:l+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+N(o,l),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:l+1,skipped:d,depth:f+1,statics:p,dynamics:m+N(o,l),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:l+1,skipped:d,depth:f+1,statics:p+N(o,l),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:l,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function N(e,t){return 2**(e-t-1)}function le(e,t){return e===2**(t-1)-1}function ue(e,t,n){let r,i;try{[r,i]=ae(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function P(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===S)>(e.node.kind===S)||t.node.kind===S==(e.node.kind===S)&&t.depth>e.depth)))}function F(e){return I(e.filter(e=>e!==void 0).join(`/`))}function I(e){return e.replace(/\/{2,}/g,`/`)}function L(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function de(e){return R(L(e))}function z(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function fe(e,t,n){return z(e,n)===z(t,n)}function pe({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&l(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(l(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=I(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function B(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function V(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>U(e,n)).join(`/`):U(r,n):r}function H({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=C(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=V(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=V(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function U(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var W=`__root__`;function G(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function me(e){return e instanceof Response&&!!e.options}var he=`Error preloading route! ☝️`,ge=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=W:this.parentRoute||s();let r=n?W:t?.path;r&&r!==`/`&&(r=L(r));let i=t?.id||r,a=n?W:F([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=F([`/`,a]));let o=a===`__root__`?`/`:F([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>G({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},_e=class extends ge{constructor(e){super(e)}},K=u();function q({children:e,fallback:t=null}){return ve()?(0,K.jsx)(h.Fragment,{children:e}):(0,K.jsx)(h.Fragment,{children:t})}function ve(){return h.useSyncExternalStore(J,()=>!0,()=>!1)}function J(){return()=>{}}function Y(e){return o({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ye(e){let{select:t,...n}=e;return o({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function X(e){return o({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function be(e){return o({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Z(e){return o({...e,select:t=>e.select?e.select(t.context):t.context})}var xe=e(p(),1);function Se(e,t){let r=f(),o=b(t),{activeProps:s,inactiveProps:l,activeOptions:u,to:d,preload:p,preloadDelay:m,preloadIntentProximity:g,hashScrollIntoView:_,replace:v,startTransition:x,resetScroll:S,viewTransition:ee,children:te,target:C,disabled:w,style:T,className:E,onClick:D,onBlur:O,onFocus:k,onMouseEnter:A,onMouseLeave:j,onTouchStart:M,ignoreBlocker:ne,params:re,search:ie,hash:ae,state:oe,mask:se,reloadDocument:ce,unsafeRelative:N,from:le,_fromLocation:ue,...P}=e,F=ve(),I=h.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),L=a(r.stores.location,e=>e,(e,t)=>e.href===t.href),R=h.useMemo(()=>{let e={_fromLocation:L,...I};return r.buildLocation(e)},[r,L,I]),de=R.maskedLocation?R.maskedLocation.publicHref:R.publicHref,pe=R.maskedLocation?R.maskedLocation.external:R.external,B=h.useMemo(()=>ke(de,pe,r.history,w),[w,pe,de,r.history]),V=h.useMemo(()=>{if(B?.external)return i(B.href,r.protocolAllowlist)?void 0:B.href;if(!Ae(d)&&!(typeof d!=`string`||d.indexOf(`:`)===-1))try{return new URL(d),i(d,r.protocolAllowlist)?void 0:d}catch{}},[d,B,r.protocolAllowlist]),H=h.useMemo(()=>{if(V)return!1;if(u?.exact){if(!fe(L.pathname,R.pathname,r.basepath))return!1}else{let e=z(L.pathname,r.basepath),t=z(R.pathname,r.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(u?.includeSearch??!0)&&!n(L.search,R.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:!u?.includeHash||F&&L.hash===R.hash},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,L,V,F,R.hash,R.pathname,R.search,r.basepath]),U=H?c(s,{})??we:Ce,W=H?Ce:c(l,{})??Ce,G=[E,U.className,W.className].filter(Boolean).join(` `),me=(T||U.style||W.style)&&{...T,...U.style,...W.style},[ge,_e]=h.useState(!1),K=h.useRef(!1),q=e.reloadDocument||V?!1:p??r.options.defaultPreload,J=m??r.options.defaultPreloadDelay??0,Y=h.useCallback(()=>{r.preloadRoute({...I,_builtLocation:R}).catch(e=>{console.warn(e),console.warn(he)})},[r,I,R]);y(o,h.useCallback(e=>{e?.isIntersecting&&Y()},[Y]),Oe,{disabled:!!w||q!==`viewport`}),h.useEffect(()=>{K.current||!w&&q===`render`&&(Y(),K.current=!0)},[w,Y,q]);let ye=e=>{let t=e.currentTarget.getAttribute(`target`),n=C===void 0?t:C;if(!w&&!Me(e)&&!e.defaultPrevented&&(!n||n===`_self`)&&e.button===0){e.preventDefault(),(0,xe.flushSync)(()=>{_e(!0)});let t=r.subscribe(`onResolved`,()=>{t(),_e(!1)});r.navigate({...I,replace:v,resetScroll:S,hashScrollIntoView:_,startTransition:x,viewTransition:ee,ignoreBlocker:ne})}};if(V)return{...P,ref:o,href:V,...te&&{children:te},...C&&{target:C},...w&&{disabled:w},...T&&{style:T},...E&&{className:E},...D&&{onClick:D},...O&&{onBlur:O},...k&&{onFocus:k},...A&&{onMouseEnter:A},...j&&{onMouseLeave:j},...M&&{onTouchStart:M}};let X=e=>{if(w||q!==`intent`)return;if(!J){Y();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),Y()},J);Q.set(t,n)},be=e=>{w||q!==`intent`||Y()},Z=e=>{if(w||!q||!J)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...P,...U,...W,href:B?.href,ref:o,onClick:$([D,ye]),onBlur:$([O,Z]),onFocus:$([k,X]),onMouseEnter:$([A,X]),onMouseLeave:$([j,Z]),onTouchStart:$([M,be]),disabled:!!w,target:C,...me&&{style:me},...G&&{className:G},...w&&Te,...H&&Ee,...F&&ge&&De}}var Ce={},we={className:`active`},Te={role:`link`,"aria-disabled":!0},Ee={"data-status":`active`,"aria-current":`page`},De={"data-transitioning":`transitioning`},Q=new WeakMap,Oe={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ke(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ae(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var je=h.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Se(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return h.createElement(`a`,t,o)}return h.createElement(n,a,o)});function Me(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ne=class extends ge{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Pe(e){return new Ne(e)}var Fe=class extends _e{constructor(e){super(e),this.useMatch=e=>o({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Z({...e,from:this.id}),this.useSearch=e=>be({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>X({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ye({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>d({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,K.jsx)(je,{ref:t,from:this.fullPath,...e}))}};function Ie(e){return new Fe(e)}function Le(e){return new Re(e,{silent:!0}).createRoute}var Re=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=Pe(e);return t.isRoot=!1,t},this.silent=t?.silent}};function ze(e,t){let n,i,a,o,s=()=>(n||=e().then(e=>{n=void 0,i=e[t??`default`]}).catch(e=>{if(a=e,r(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(g)g(s());else throw s();return h.createElement(i,e)};return c.preload=s,c}var Be=Le(`/task/$taskId`)({component:ze(()=>m(()=>import(`./task._taskId-IF3pimu3.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),`component`)});export{_ as C,x as S,A as _,q as a,k as b,W as c,H as d,F as f,oe as g,R as h,Ie as i,I as l,de as m,ze as n,me as o,pe as p,Le as r,G as s,Be as t,B as u,M as v,v as w,re as x,j as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./terminal-qBEkzc-m.js";import{_ as t,f as n,y as r}from"./tabs-Dx-TnbvG.js";import{t as i}from"./task._taskId-
|
|
1
|
+
import{l as e}from"./terminal-qBEkzc-m.js";import{_ as t,f as n,y as r}from"./tabs-Dx-TnbvG.js";import{t as i}from"./task._taskId-CTj9HrUF.js";import{d as a}from"./createLucideIcon-CM5xLVj1.js";import{n as o}from"./active-task-CuoFMFoR.js";import{AppShell as s}from"./AppShell-A79AgA-r.js";var c=e(r()),l=a();function u(){let{taskId:e}=i.useParams(),{selectedTaskId:r}=t();return(0,c.useEffect)(()=>{!e||e===r||(n(e),o(e))},[e,r]),(0,l.jsx)(s,{})}export{u as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t,o as n}from"./terminal-qBEkzc-m.js";import{y as r}from"./tabs-Dx-TnbvG.js";import{d as i,t as a}from"./createLucideIcon-CM5xLVj1.js";import{a as o,r as s}from"./toast-BXjAT0ix.js";import{n as c}from"./store-BXzqsTjs.js";import{t as l}from"./arrow-left-DNM2CHhS.js";import{n as u}from"./time-kviT26Tm.js";import{n as d,t as f}from"./ConfirmDialog-
|
|
1
|
+
import{a as e,l as t,o as n}from"./terminal-qBEkzc-m.js";import{y as r}from"./tabs-Dx-TnbvG.js";import{d as i,t as a}from"./createLucideIcon-CM5xLVj1.js";import{a as o,r as s}from"./toast-BXjAT0ix.js";import{n as c}from"./store-BXzqsTjs.js";import{t as l}from"./arrow-left-DNM2CHhS.js";import{n as u}from"./time-kviT26Tm.js";import{n as d,t as f}from"./ConfirmDialog-DChCLBRW.js";var p=a(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),m=t(r(),1),h=class extends Error{};async function g(){let e=await n.get(`/api/worktrees`,{label:`load worktrees`});return Array.isArray(e.projects)?e.projects:[]}async function _(t,r){try{await n.delete(`/api/worktrees`,{path:t,force:r},{label:`delete worktree`})}catch(t){throw t instanceof e&&/refusing to remove dirty worktree/.test(t.detail)?new h(t.detail):t}}var v=i();function y(e){return e===!0?(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-green`,children:`on remote`}):e===!1?(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`not pushed`}):(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`remote unknown`})}function b({row:e,linkedTaskTitle:t,onDelete:n}){return(0,v.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.kobeManaged&&(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`}),e.dirty&&(0,v.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),y(e.branchOnRemote),t&&(0,v.jsxs)(`span`,{className:`shrink-0 truncate text-[10px] text-subtle`,children:[`task: `,t]})]}),(0,v.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,v.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.createdAtMs>0&&(0,v.jsxs)(`span`,{className:`ml-auto shrink-0`,children:[`created `,u(e.createdAtMs)]})]})]}),(0,v.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-kobe-red hover:text-kobe-red`,children:`Delete`})]})}function x(){let e=o(),{tasks:t}=c(),[n,r]=(0,m.useState)(null),[i,a]=(0,m.useState)(!1),[u,y]=(0,m.useState)(null),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)([]),T=(0,m.useMemo)(()=>{let e=new Map;for(let n of t)n.worktreePath&&e.set(n.worktreePath,n.title||n.branch);return e},[t]),E=()=>{a(!0),g().then(r).catch(e=>s(`load worktrees`,e)).finally(()=>a(!1))};(0,m.useEffect)(E,[]);let D=(n??[]).map(e=>({...e,worktrees:e.worktrees.filter(e=>!C.includes(e.path))})),O=e=>{r(t=>t?.map(t=>({...t,worktrees:t.worktrees.filter(t=>t.path!==e)}))??t)},k=(e,t)=>{w(t=>[...t,e.path]),_(e.path,t).then(()=>{O(e.path),w(t=>t.filter(t=>t!==e.path))}).catch(n=>{w(t=>t.filter(t=>t!==e.path)),!t&&n instanceof h?S(e):s(t?`force delete worktree`:`delete worktree`,n)})};return(0,v.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,v.jsxs)(`header`,{"data-kobe-topbar":!0,className:`flex h-10 shrink-0 items-center gap-3 border-b border-line bg-surface px-3`,children:[(0,v.jsx)(d,{}),(0,v.jsxs)(`button`,{type:`button`,onClick:()=>e({to:`/`}),className:`flex items-center gap-1.5 text-muted transition-colors hover:text-fg`,title:`Back to workspace`,children:[(0,v.jsx)(l,{size:15,strokeWidth:1.8}),(0,v.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,v.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Worktrees`}),(0,v.jsx)(`button`,{type:`button`,onClick:E,disabled:i,className:`ml-auto flex items-center gap-1.5 text-muted transition-colors hover:text-fg disabled:opacity-40`,title:`Refresh`,children:(0,v.jsx)(p,{size:13,strokeWidth:1.8,className:i?`animate-spin`:``})})]}),(0,v.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:n===null?(0,v.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Loading worktrees…`}):D.length===0?(0,v.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No local projects known to Rove yet.`}):D.map(e=>(0,v.jsxs)(`div`,{className:`border-b border-line`,children:[(0,v.jsx)(`div`,{className:`border-b border-line-subtle bg-surface px-3 py-1.5 font-mono text-[11px] text-subtle`,children:e.repo}),e.worktrees.length===0?(0,v.jsx)(`p`,{className:`px-3 py-3 text-[12px] text-subtle`,children:`No worktrees.`}):e.worktrees.map(e=>(0,v.jsx)(b,{row:e,linkedTaskTitle:T.get(e.path)??null,onDelete:()=>y(e)},e.path))]},e.repo))}),u&&(0,v.jsx)(f,{title:`Delete worktree`,body:`Delete the worktree for "${u.branch||u.path}"? This removes the working directory; the branch itself is kept.`,confirmLabel:`Delete`,danger:!0,onConfirm:()=>{if(!u)return;let e=u;y(null),k(e,!1)},onCancel:()=>y(null)}),x&&(0,v.jsx)(f,{title:`Force delete worktree`,body:`"${x.branch||x.path}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?`,confirmLabel:`Force delete`,danger:!0,onConfirm:()=>{if(!x)return;let e=x;S(null),k(e,!0)},onCancel:()=>S(null)})]})}var S=x;export{S as component};
|
package/dist/web-ui/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Rove</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-siRV5zR0.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/terminal-qBEkzc-m.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/tabs-Dx-TnbvG.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-CM5xLVj1.js">
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/columns-3-CQGAnX-4.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-DCnDkJvp.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/store-BXzqsTjs.js">
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/task._taskId-
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/desktop-
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/task._taskId-CTj9HrUF.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-C2FN7ili.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/active-task-CuoFMFoR.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/use-focus-trap-DNMrlNR0.js">
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/engines-Cnxy1hW9.js">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@sma1lboy/kobe",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.167",
|
|
5
5
|
"description": "Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"packageManager": "bun@1.3.13",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{l as e,o as t}from"./terminal-qBEkzc-m.js";import{_ as n,f as r,l as i,r as a,y as o}from"./tabs-Dx-TnbvG.js";import{d as s,t as c}from"./createLucideIcon-CM5xLVj1.js";import{a as l,n as u,r as d}from"./toast-BXjAT0ix.js";import{n as f,t as p}from"./ViewToggle-BHBzWlni.js";import{n as m,t as h}from"./store-BXzqsTjs.js";import{n as g,t as _}from"./active-task-CuoFMFoR.js";import{t as v}from"./external-store-DJlWpyYC.js";import{c as y,d as b,i as x,l as S,p as C,r as w,t as T,u as E}from"./triage-DDohuPMh.js";import{i as D,r as O,t as k}from"./WorkspaceTabs-kqzy_Dsf.js";import{t as A}from"./SettingsPage-CLRhr-sg.js";import{t as j}from"./ChatTranscript-Co0UhezW.js";import{t as ee}from"./plus-BbX5qXba.js";import{t as te}from"./search-BxbFZoup.js";import{t as ne}from"./x-7cB9X7Hi.js";import{n as M,t as N}from"./activity-BjTd1D8q.js";import{t as P}from"./use-focus-trap-DNMrlNR0.js";import{t as re}from"./engines-Cnxy1hW9.js";import{n as ie}from"./settings-tPcmEHCP.js";import{i as ae,r as oe}from"./vendor-CdtpTJrf.js";import{r as F}from"./web-transport-D0bugxxv.js";import{n as se,t as I}from"./time-kviT26Tm.js";import{n as L,t as R}from"./ConfirmDialog-D-NILtP0.js";import{t as z}from"./text-match-DW3sD-Rt.js";import{t as B}from"./SlideOver-Dxtk6Gn2.js";import{n as V,r as ce,t as le}from"./chips-Da37C4KZ.js";var ue=c(`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`}]]),de=c(`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`}]]),H=c(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),fe=c(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),U=e(o(),1),W=s();function pe({onClose:e}){let{tasks:t}=m(),n=l(),i=(0,U.useRef)(null);P(i);let a=(0,U.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,U.useMemo)(()=>new Set(t.map(e=>e.worktreePath).filter(Boolean)),[t]),[s,c]=(0,U.useState)(a[0]??``),[f,p]=(0,U.useState)(null),[_,v]=(0,U.useState)(!1),[y,b]=(0,U.useState)(null),[x,S]=(0,U.useState)(!1),C=async e=>{if(e){v(!0),p(null);try{let{worktrees:t}=await h(`worktree.discoverAdoptable`,{repo:e});p(t)}catch(e){d(`scan worktrees`,e),p([])}finally{v(!1)}}},T=async t=>{b(t.path);try{let{task:i}=await h(`worktree.adopt`,{repo:s,worktreePath:t.path,branch:t.branch,ifExists:`return`});r(i.id),g(i.id),n({to:`/task/$taskId`,params:{taskId:i.id}}),u(`success`,`Adopted ${t.branch||t.path}`),e()}catch(e){d(`adopt worktree`,e)}finally{b(null)}};return x?(0,W.jsx)(w,{onClose:e}):a.length===0?(0,W.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,W.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,W.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,W.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`pull an existing worktree into Rove`})]}),(0,W.jsxs)(`div`,{className:`px-3 py-6 text-center`,children:[(0,W.jsx)(`p`,{className:`text-[12px] leading-relaxed text-subtle`,children:`No repos known to Rove yet. Create a task in a repo first, then come back to adopt its worktrees.`}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>S(!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,W.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,W.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,W.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,W.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,W.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,W.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`pull an existing worktree into Rove`})]}),(0,W.jsxs)(`div`,{className:`space-y-2 px-3 py-3`,children:[(0,W.jsx)(`div`,{className:`mb-1 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Repo`}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.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,W.jsx)(`option`,{value:e,children:e},e))}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>void C(s),disabled:!s||_,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:_?`Scanning…`:`Scan`})]})]}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto border-t border-line`,children:f===null?(0,W.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Pick a repo and Scan to find adoptable worktrees.`}):f.length===0?(0,W.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No adoptable worktrees found for this repo.`}):f.map(e=>{let t=o.has(e.path);return(0,W.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.dirty&&(0,W.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),e.kobeManaged&&(0,W.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`})]}),(0,W.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,W.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.lastActivityMs>0&&(0,W.jsx)(`span`,{className:`ml-auto shrink-0`,children:se(e.lastActivityMs)})]})]}),t?(0,W.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`tracked`}):(0,W.jsx)(`button`,{type:`button`,onClick:()=>void T(e),disabled:y!==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:y===e.path?`Adopting…`:`Adopt`})]},e.path)})}),(0,W.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,W.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 G=v({query:``,statusFilter:`all`,sortMode:`default`,showArchived:!1}),K=null;function q(e){G.update(t=>({...t,...e}))}function J(e){q({query:e})}function Y(e){q({statusFilter:e})}function me(e){q({sortMode:e})}function he(e){q({showArchived:e})}function ge(e){!e||e===K||(K=e,q({sortMode:e}))}function _e(){return G.useSnapshot()}function ve(e){let t=Date.parse(e.updatedAt||e.createdAt);return Number.isFinite(t)?t:0}function ye(e,t){let n=ve(t)-ve(e);return n===0?t.id.localeCompare(e.id):n}function be(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(ye),i.sort(ye)),[...n,...r,...i]}function xe(e,t){return z([e.title,e.branch,e.repo,e.worktreePath,e.vendor,e.status].filter(Boolean).join(` `),t)}function Se({task:e,onClose:t}){return(0,W.jsx)(B,{open:e!==null,onClose:t,title:e?(0,W.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,W.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,W.jsx)(`span`,{className:`min-w-0 truncate`,children:e.title||e.branch})]}):void 0,children:e&&(0,W.jsx)(j,{worktreePath:e.worktreePath??null,vendor:e.vendor??`claude`,title:e.title||e.branch})})}function Ce({children:e,suffix:t}){return(0,W.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),t?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`h-px flex-1 bg-line`}),(0,W.jsx)(`span`,{className:`font-mono text-[10px] font-bold uppercase text-primary`,children:t})]}):null]})}function we({task:e,engine:t,job:n,changes:r,engineName:i,active:a,onClick:o}){let s=n?.phase===`running`,c=s?`materializing…`:M(t?.state),l=I(e.updatedAt||e.createdAt);return(0,W.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,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s?(0,W.jsx)(H,{size:10,strokeWidth:2.5,className:`shrink-0 animate-spin text-primary`}):(0,W.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${N(t?.state)}`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] ${a?`text-fg`:`text-fg/90`}`,children:e.title||e.branch}),(0,W.jsx)(ce,{pr:e.prStatus}),e.pinned&&(0,W.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`PIN`}),(0,W.jsx)(le,{counts:r})]}),(0,W.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 pl-3.5 text-[11px] text-subtle`,children:[(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:e.branch||`—`}),(0,W.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[(0,W.jsx)(V,{label:i}),c&&(0,W.jsx)(`span`,{className:`text-muted`,children:c}),l&&(0,W.jsx)(`span`,{className:`text-subtle`,children:l})]})]})]})}function Te({task:e,onRestore:t,onPreview:n}){let r=e.title||e.branch;return(0,W.jsxs)(`div`,{className:`group flex items-center gap-2 border-l-2 border-transparent px-3 py-1.5`,children:[n?(0,W.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,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-subtle`,children:r}),(0,W.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 Ee({onOpenSettings:e,onNewTask:t,onAdopt:i}){let{tasks:a,engineStates:o,jobs:s,worktreeChanges:c,uiPrefs:u,hydrated:f,streamConnected:p}=m(),{selectedTaskId:_}=n(),v=re(),y=(0,U.useMemo)(()=>oe(a),[a]),b=e=>ae(v,e,y),{query:S,statusFilter:C,sortMode:w,showArchived:E}=_e(),D=(0,U.useRef)(null),O=(0,U.useRef)(null);(0,U.useEffect)(()=>{_&&D.current?.querySelector(`[data-task-id="${CSS.escape(_)}"]`)?.scrollIntoView({block:`nearest`})},[_]);let k=u?.sortMode;(0,U.useEffect)(()=>{ge(k)},[k]);let A=(0,U.useMemo)(()=>a.filter(e=>!e.archived),[a]),j=(0,U.useMemo)(()=>a.filter(e=>e.archived&&e.kind!==`main`),[a]),M=(0,U.useMemo)(()=>be(A.filter(e=>xe(e,S)&&T(o[e.id],c[e.worktreePath],C)),w),[A,S,C,w,o,c]),N=M.filter(e=>e.kind===`main`),P=M.filter(e=>e.kind!==`main`),F=!f||!p&&a.length===0,se=l(),I=e=>{r(e),g(e),se({to:`/task/$taskId`,params:{taskId:e}})};(0,U.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&&!D.current?.contains(o)||M.length===0)return;e.preventDefault();let s=M.findIndex(e=>e.id===_),c=s===-1?0:Math.min(Math.max(s+(r?1:-1),0),M.length-1);I(M[c].id)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[M,_]);let L=e=>{h(`task.archive`,{taskId:e.id,archived:!1}).catch(t=>d(`restore "${e.title||e.branch}"`,t))},[R,z]=(0,U.useState)(!1),[B,V]=(0,U.useState)(null);return(0,U.useEffect)(()=>{let e=!0;return ie().then(t=>{e&&z(t.archivedHistoryPreview===!0)}).catch(()=>{}),()=>{e=!1}},[]),(0,W.jsxs)(`aside`,{className:`flex w-64 shrink-0 flex-col border-r border-line bg-bg`,children:[(0,W.jsxs)(`div`,{className:`border-b border-line bg-surface/50 px-3 py-2`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Tasks`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`button`,{type:`button`,onClick:()=>me(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,W.jsxs)(`span`,{className:`font-mono text-[10px] text-muted`,children:[M.length,`/`,A.length]}),(0,W.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,W.jsx)(de,{size:14,strokeWidth:1.9})}),(0,W.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted transition-colors hover:text-primary`,title:`New task`,"aria-label":`New task`,children:(0,W.jsx)(ee,{size:14,strokeWidth:2.2})})]})]}),(0,W.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,W.jsx)(te,{size:14,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,W.jsx)(`input`,{ref:O,value:S,onChange:e=>J(e.target.value),onKeyDown:e=>{e.key===`Enter`&&M.length>0?(e.preventDefault(),I(M[0].id),e.currentTarget.blur()):e.key===`Escape`&&S&&(e.preventDefault(),J(``))},placeholder:`Filter tasks`,className:`min-w-0 flex-1 bg-transparent text-fg placeholder:text-subtle focus:outline-none`}),S&&(0,W.jsx)(`button`,{type:`button`,onClick:()=>J(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear task filter`,title:`Clear filter`,children:(0,W.jsx)(ne,{size:13,strokeWidth:2})})]}),(0,W.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,W.jsx)(`button`,{type:`button`,onClick:()=>Y(e.key),title:e.title,className:`border px-1.5 py-0.5 text-[10px] transition-colors ${C===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,W.jsxs)(`div`,{ref:D,className:`flex-1 overflow-y-auto`,children:[F?(0,W.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-4 text-[12px] text-subtle`,children:[(0,W.jsx)(H,{size:13,strokeWidth:2,className:`animate-spin`}),(0,W.jsx)(`span`,{children:`connecting…`})]}):A.length===0?(0,W.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,W.jsx)(`p`,{children:`No tasks yet.`}),(0,W.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,W.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,W.jsx)(`div`,{children:S?`No matches for “${S}”.`:`No tasks in this status.`}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>{J(``),Y(`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,W.jsxs)(W.Fragment,{children:[N.length>0&&(0,W.jsx)(Ce,{children:`Projects`}),N.map(e=>(0,W.jsx)(we,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===_,onClick:()=>I(e.id)},e.id)),P.length>0&&(0,W.jsx)(Ce,{suffix:w==="default"?void 0:w,children:`Worktrees`}),P.map(e=>(0,W.jsx)(we,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===_,onClick:()=>I(e.id)},e.id))]}),!F&&j.length>0&&(0,W.jsxs)(`div`,{className:`mt-2 border-t border-line-subtle pb-2`,children:[(0,W.jsxs)(`button`,{type:`button`,onClick:()=>he(!E),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,W.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Archived`}),(0,W.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:j.length}),(0,W.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-subtle`,children:E?`−`:`+`})]}),E&&j.map(e=>(0,W.jsx)(Te,{task:e,onRestore:()=>L(e),onPreview:R?()=>V(e):void 0},e.id))]})]}),(0,W.jsx)(Se,{task:B,onClose:()=>V(null)}),(0,W.jsx)(`div`,{className:`border-t border-line p-2`,children:(0,W.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,W.jsx)(x,{size:15,strokeWidth:1.8}),(0,W.jsx)(`span`,{children:`Settings`})]})})]})}async function De(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 Oe=/^\/api\/issue-assets\/[a-f0-9]{16}\/[A-Za-z0-9_-]+\.[a-z0-9]+$/;function ke(e){let t=e.trim();return Oe.test(t)?t:null}function Ae(e){let t=e.trim();return/^https?:\/\//i.test(t)?t:t.startsWith(`//`)?null:t.startsWith(`/`)||t.startsWith(`#`)||t.startsWith(`./`)||t.startsWith(`../`)?t:null}function je(e){let t=e;return t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(e,t,n)=>{let r=ke(n.replace(/&/g,`&`));return r?`<img src="${X(r)}" alt="${X(t)}" loading="lazy" class="kobe-md-img">`:``})),t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(e,t,n)=>{let r=Ae(n.replace(/&/g,`&`));return r?`<a href="${X(r)}" target="_blank" rel="noopener noreferrer" class="kobe-md-link">${t}</a>`:`${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>`:je(e)).join(``)}function Me(e){let t=e.replace(/\r\n/g,`
|
|
2
|
-
`).split(`
|
|
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
|
-
`)}</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(`
|
|
5
|
-
`)}async function Ne(e){return(await t.get(`/api/notes`,{query:{taskId:e},label:`load notes`})).markdown??``}async function Pe(e,n){await t.put(`/api/notes`,{taskId:e,markdown:n},{label:`save notes`})}function Fe(e){switch(e){case`saving`:return`saving…`;case`saved`:return`saved`;case`error`:return`save failed`;default:return``}}var Ie=600;function Le({children:e,right:t}){return(0,W.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),t]})}function Re({taskId:e,full:t=!1}){let[n,r]=(0,U.useState)(``),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(`idle`),u=(0,U.useMemo)(()=>Me(n),[n]),d=(0,U.useRef)(null),f=(0,U.useRef)(null),p=(0,U.useRef)(null),m=(0,U.useCallback)(()=>{d.current&&=(clearTimeout(d.current),null);let e=p.current;if(!e)return;p.current=null;let{taskId:t,value:n}=e;Pe(t,n).then(()=>{f.current===t&&l(`saved`)}).catch(()=>{f.current===t&&l(`error`)})},[]);(0,U.useEffect)(()=>{if(f.current=e,m(),l(`idle`),r(``),a(!1),!e)return;let t=!1;return s(!0),Ne(e).then(n=>{!t&&f.current===e&&r(n)}).catch(()=>{!t&&f.current===e&&r(``)}).finally(()=>{t||s(!1)}),()=>{t=!0}},[e,m]),(0,U.useEffect)(()=>()=>{m()},[m]);let h=(0,U.useCallback)(t=>{if(r(t),!e)return;let n=e;l(`saving`),p.current={taskId:n,value:t},d.current&&clearTimeout(d.current),d.current=setTimeout(m,Ie)},[e,m]);return(0,W.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col bg-bg`,children:[(0,W.jsx)(Le,{right:e?(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c!==`idle`&&(0,W.jsx)(`span`,{className:`text-[10px] ${c===`error`?`text-kobe-red`:`text-subtle`}`,children:Fe(c)}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>a(e=>!e),className:`border px-1.5 py-0.5 text-[10px] transition-colors ${i?`border-primary bg-inset text-fg`:`border-line bg-bg text-muted hover:border-primary hover:text-fg`}`,title:`Toggle markdown preview`,children:i?`Edit`:`Preview`})]}):null,children:`Notes`}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1 ${t?`px-0 pb-0`:`px-3 pb-3`}`,children:e?i?(0,W.jsx)(`div`,{className:`h-full w-full overflow-auto bg-surface px-4 py-3 ${t?`border-t border-line`:`rounded border border-line`}`,children:n.trim()?(0,W.jsx)(`div`,{className:`kobe-md text-[12px] leading-relaxed text-fg`,dangerouslySetInnerHTML:{__html:u}}):(0,W.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Nothing to preview yet.`})}):(0,W.jsx)(`textarea`,{value:n,onChange:e=>h(e.target.value),spellCheck:!1,placeholder:o?`loading notes…`:`Notes for this task — markdown, autosaved.`,disabled:o,className:`h-full w-full resize-none border-line bg-surface px-4 py-3 font-mono text-[12px] leading-relaxed text-fg placeholder:text-subtle focus:border-line-active focus:outline-none disabled:opacity-60 ${t?`border-x-0 border-b-0 border-t`:`rounded border`}`}):(0,W.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`text-[12px] font-semibold text-fg`,children:`No task selected`}),(0,W.jsx)(`div`,{className:`mt-1 max-w-48 text-[12px] leading-relaxed text-subtle`,children:`Pick a task to open its web-only scratchpad.`})]})})})]})}var ze=[`backlog`,`in_progress`,`in_review`,`done`,`canceled`,`error`],Be=`DIRTY_WORKTREE`;function Ve(e){return e.replace(/_/g,` `)}function Q({name:e,value:t,mono:n=!1}){return(0,W.jsxs)(`div`,{className:`min-w-0 border-b border-line-subtle py-2 last:border-b-0`,children:[(0,W.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),(0,W.jsx)(`div`,{className:`mt-1 min-w-0 truncate text-[12px] text-fg ${n?`font-mono`:``}`,title:t,children:t||`—`})]})}function $({children:e,onClick:t,disabled:n,danger:r=!1}){return(0,W.jsx)(`button`,{type:`button`,onClick:t,disabled:n,className:`border px-2 py-1 text-[11px] transition-colors disabled:opacity-40 ${r?`border-kobe-red/40 text-kobe-red hover:bg-kobe-red/10`:`border-line bg-surface text-muted hover:border-primary hover:text-fg`}`,children:e})}function He({task:e}){let[t,n]=(0,U.useState)(e?.title??``),[r,i]=(0,U.useState)(e?.branch??``),[o,s]=(0,U.useState)(null),[c,f]=(0,U.useState)(!1),p=(0,U.useRef)(null);(0,U.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]);let[m,v]=(0,U.useState)(null),y=re(),b=l();if((0,U.useEffect)(()=>{n(e?.title??``)},[e?.title]),(0,U.useEffect)(()=>{i(e?.branch??``)},[e?.branch]),!e)return(0,W.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`text-[12px] font-semibold text-fg`,children:`No task selected`}),(0,W.jsx)(`div`,{className:`mt-1 max-w-48 text-[12px] leading-relaxed text-subtle`,children:`Pick a task to edit its metadata and worktree state.`})]})});let x=async(e,t)=>{s(e);try{await t()}catch(t){d(e.split(`:`)[0],t)}finally{s(null)}},S=()=>{let n=t.trim();!n||n===e.title||x(`rename`,()=>h(`task.rename`,{taskId:e.id,title:n}))},C=()=>{let t=r.trim();!t||t===e.branch||x(`branch`,()=>h(`task.setBranch`,{taskId:e.id,branch:t}))},w=()=>{De(e.worktreePath).then(e=>{e&&(f(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>f(!1),1200))})},T=()=>{v(null),x(`archive`,async()=>{await h(`task.archive`,{taskId:e.id,archived:!0}),a(),b({to:`/`}),await _(null)})},E=()=>{x(`restore`,()=>h(`task.archive`,{taskId:e.id,archived:!1}))},D=t=>{v(null),s(`delete`),(async()=>{try{await h(`task.delete`,{taskId:e.id,force:t}),a(),b({to:`/`}),g(null),u(`success`,`Deleted "${e.title||e.branch}"`)}catch(e){let n=e instanceof Error?e.message:String(e);!t&&n.includes(Be)?v({kind:`delete`,force:!0}):d(`delete`,e)}finally{s(null)}})()};return(0,W.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,W.jsxs)(`div`,{className:`border-b border-line px-3 py-3`,children:[(0,W.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Task`}),(0,W.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,W.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),onBlur:S,onKeyDown:e=>{e.key===`Enter`&&S()},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`}),(0,W.jsx)($,{onClick:S,disabled:o===`rename`,children:`Save`})]}),e.archived&&(0,W.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2 border border-kobe-yellow/40 bg-kobe-yellow/10 px-2 py-1.5`,children:[(0,W.jsx)(`span`,{className:`text-[11px] text-kobe-yellow`,children:`archived`}),(0,W.jsx)($,{onClick:E,disabled:o!==null,children:`Restore`})]})]}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-2`,children:[e.kind===`main`?(0,W.jsx)(Q,{name:`Branch`,value:e.branch,mono:!0}):(0,W.jsxs)(`div`,{className:`min-w-0 border-b border-line-subtle py-2`,children:[(0,W.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Branch`}),(0,W.jsx)(`div`,{className:`mt-1 flex gap-2`,children:(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onBlur:C,onKeyDown:e=>{e.key===`Enter`&&C()},className:`min-w-0 flex-1 border border-line bg-bg px-2 py-1 font-mono text-[12px] text-fg focus:border-line-active focus:outline-none`})})]}),(0,W.jsx)(Q,{name:`Vendor`,value:e.vendor??`claude`}),(0,W.jsx)(Q,{name:`Worktree`,value:e.worktreePath,mono:!0}),(0,W.jsx)(Q,{name:`Repo`,value:e.repo,mono:!0}),(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Status`}),(0,W.jsx)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:ze.map(t=>(0,W.jsx)(`button`,{type:`button`,onClick:()=>void x(`status:${t}`,()=>h(`task.status`,{taskId:e.id,status:t})),disabled:o!==null,className:`border px-2 py-1.5 text-left text-[11px] capitalize transition-colors disabled:opacity-40 ${e.status===t?`border-primary bg-inset text-fg`:`border-line bg-surface text-muted hover:border-primary hover:text-fg`}`,children:Ve(t)},t))})]}),(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Vendor`}),(0,W.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(t=>(0,W.jsx)(`button`,{type:`button`,onClick:()=>void x(`vendor:${t.id}`,()=>h(`task.setVendor`,{taskId:e.id,vendor:t.id})),disabled:o!==null,className:`border px-2 py-1 text-[11px] transition-colors disabled:opacity-40 ${(e.vendor??`claude`)===t.id?`border-primary bg-inset text-fg`:`border-line bg-surface text-muted hover:border-primary hover:text-fg`}`,children:t.label},t.id))})]}),(0,W.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-2`,children:[(0,W.jsx)($,{onClick:()=>void x(`pin`,()=>h(`task.pin`,{taskId:e.id,pinned:!e.pinned})),disabled:o!==null,children:e.pinned?`Unpin`:`Pin`}),(0,W.jsx)($,{onClick:()=>void x(`worktree`,()=>h(`task.ensureWorktree`,{taskId:e.id})),disabled:o!==null,children:`Ensure worktree`}),(0,W.jsx)($,{onClick:w,children:c?`Copied`:`Copy path`}),!e.archived&&(0,W.jsx)($,{onClick:()=>v({kind:`archive`}),disabled:o!==null,danger:!0,children:`Archive`})]}),e.kind!==`main`&&(0,W.jsxs)(`div`,{className:`mt-4 border-t border-line-subtle pt-3`,children:[(0,W.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Danger zone`}),(0,W.jsx)($,{onClick:()=>v({kind:`delete`,force:!1}),disabled:o!==null,danger:!0,children:`Delete task + worktree`})]})]}),m?.kind===`archive`&&(0,W.jsx)(R,{title:`Archive task`,body:`Archive "${e.title||e.branch}"? Its Hosted PTY sessions will be stopped; the worktree stays on disk and the task can be restored from the Archived section.`,confirmLabel:`Archive`,danger:!0,busy:o===`archive`,onConfirm:T,onCancel:()=>v(null)}),m?.kind===`delete`&&(0,W.jsx)(R,{title:m.force?`Worktree has uncommitted changes`:`Delete task`,body:m.force?`"${e.title||e.branch}" has uncommitted or untracked changes in its worktree. Force-delete discards them permanently.`:`Delete "${e.title||e.branch}"? This removes the task, kills its engine session, and removes its worktree (branch history stays in git).`,confirmLabel:m.force?`Force delete`:`Delete`,danger:!0,busy:o===`delete`,onConfirm:()=>D(m.force),onCancel:()=>v(null)})]})}function Ue({drawer:e=!1,onClose:t}={}){let[r,a]=(0,U.useState)(`overview`),{selectedTaskId:o}=n(),{tasks:s}=m(),c=o?s.find(e=>e.id===o)??null:null;return(0,W.jsxs)(`aside`,{className:e?`flex h-full w-full flex-col bg-bg`:`flex w-80 shrink-0 flex-col border-l border-line bg-bg`,children:[(0,W.jsxs)(`div`,{className:`flex h-9 shrink-0 items-stretch border-b border-line bg-surface`,children:[[`overview`,`notes`,`changes`].map(e=>(0,W.jsx)(`button`,{type:`button`,onClick:()=>a(e),className:`px-3 text-[10px] font-bold uppercase tracking-[0.12em] ${r===e?`border-b-2 border-primary text-fg`:`text-subtle hover:text-muted`}`,children:e===`overview`?`Task`:e===`notes`?`Notes`:`Changes`},e)),e&&t&&(0,W.jsx)(`button`,{type:`button`,onClick:t,className:`ml-auto px-3 text-subtle hover:text-fg`,"aria-label":`Close tools`,children:(0,W.jsx)(ne,{size:14,strokeWidth:2})})]}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1`,children:r===`overview`?(0,W.jsx)(He,{task:c}):r===`notes`?(0,W.jsx)(Re,{taskId:o,full:!0}):(0,W.jsx)(O,{worktreePath:c?.worktreePath??null,onOpenFile:e=>{o&&i(o,e)}})})]})}function We({onToggleTools:e,onShowHelp:t}){let{daemonConnected:r,streamConnected:i,tasks:a}=m(),{selectedTaskId:o}=n(),s=o?a.find(e=>e.id===o):null,c=F({daemonConnected:r,streamConnected:i});return(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)(L,{}),(0,W.jsx)(`span`,{className:`font-mono text-[13px] font-bold text-primary`,children:`[rove]`}),(0,W.jsx)(p,{}),s?(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`max-w-56 truncate rounded bg-inset px-2 py-0.5 text-[11px] text-fg`,children:s.title||s.branch}),(0,W.jsx)(`span`,{className:`hidden max-w-40 truncate font-mono text-[11px] text-subtle md:inline`,children:s.branch})]}):(0,W.jsx)(`span`,{className:`rounded bg-inset px-2 py-0.5 text-[11px] text-muted`,children:`Workspace`}),(0,W.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 text-[11px] text-subtle`,children:[(0,W.jsxs)(`span`,{className:`hidden items-center gap-1.5 sm:flex`,title:c.title,children:[(0,W.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${c.ok?`bg-kobe-green`:`bg-kobe-yellow`}`}),(0,W.jsx)(`span`,{children:c.label})]}),(0,W.jsx)(`button`,{type:`button`,onClick:t,className:`hidden items-center text-muted transition-colors hover:text-fg sm:flex`,"aria-label":`Keyboard shortcuts`,title:`Keyboard shortcuts (?)`,children:(0,W.jsx)(ue,{size:15,strokeWidth:1.8})}),(0,W.jsx)(`button`,{type:`button`,onClick:e,className:`flex items-center text-muted transition-colors hover:text-fg lg:hidden`,"aria-label":`Toggle task tools`,title:`Task tools`,children:(0,W.jsx)(fe,{size:15,strokeWidth:1.8})})]})]})}function Ge(){let{tasks:e,update:t}=m(),{selectedTaskId:r}=n(),i=r?e.find(e=>e.id===r):null,a=e.filter(e=>!e.archived).length;return(0,W.jsxs)(`footer`,{className:`flex h-7 shrink-0 items-center gap-4 border-t border-line bg-surface px-3 text-[11px] text-subtle`,children:[(0,W.jsxs)(`span`,{children:[a,` task`,a===1?``:`s`]}),i&&(0,W.jsxs)(`span`,{className:`min-w-0 truncate text-muted`,children:[i.kind===`main`?`project`:`worktree`,` ·`,` `,D(i.worktreePath,54)]}),(0,W.jsx)(`span`,{className:`ml-auto`,children:t?.latest?`update ${t.latest} available`:`Rove web`})]})}function Ke(){let{settingsOpen:e}=C(),[t,n]=(0,U.useState)(!1),[r,i]=(0,U.useState)(!1);return(0,U.useEffect)(()=>{let e=e=>{e.key===`Escape`&&i(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,W.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,W.jsx)(We,{onToggleTools:()=>i(e=>!e),onShowHelp:S}),(0,W.jsx)(f,{}),(0,W.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,W.jsx)(Ee,{onOpenSettings:b,onNewTask:E,onAdopt:()=>n(!0)}),e?(0,W.jsx)(A,{onClose:y}):(0,W.jsx)(k,{}),(0,W.jsx)(`div`,{className:`hidden lg:flex`,children:(0,W.jsx)(Ue,{})}),r&&(0,W.jsx)(`div`,{className:`fixed inset-0 z-30 flex justify-end bg-black/50 lg:hidden`,onClick:()=>i(!1),onKeyDown:e=>{e.key===`Escape`&&i(!1)},role:`presentation`,children:(0,W.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Task tools`,className:`h-full w-80 max-w-[85vw] border-l border-line bg-bg shadow-2xl`,onClick:e=>e.stopPropagation(),onKeyDown:()=>{},children:(0,W.jsx)(Ue,{drawer:!0,onClose:()=>i(!1)})})})]}),(0,W.jsx)(Ge,{}),t&&(0,W.jsx)(pe,{onClose:()=>n(!1)})]})}export{Ke as AppShell};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatTerminal-DNTeFtk5.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/store-BXzqsTjs.js","assets/rotate-cw-D-UUtiD0.js","assets/web-transport-D0bugxxv.js","assets/ChatTerminal-BrP-ENHg.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{l as e}from"./terminal-qBEkzc-m.js";import{c as t,y as n}from"./tabs-Dx-TnbvG.js";import{d as r,t as i}from"./createLucideIcon-CM5xLVj1.js";import{i as a}from"./store-BXzqsTjs.js";import{t as o}from"./ChatTranscript-Co0UhezW.js";import{t as s}from"./external-link-BwT2u1hD.js";import{t as c}from"./x-7cB9X7Hi.js";import{n as l,t as u}from"./activity-BjTd1D8q.js";import{t as d}from"./use-focus-trap-DNMrlNR0.js";var f=i(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),p=i(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),m=e(n(),1),h=r(),g=(0,m.lazy)(()=>a(()=>import(`./ChatTerminal-DNTeFtk5.js`).then(e=>({default:e.ChatTerminal})),__vite__mapDeps([0,1,2,3,4,5,6,7])));function _({task:e,engine:n,onClose:r,onOpenWorkspace:i,onReview:a,onCreatePr:_}){let[v,y]=(0,m.useState)(`engine`),[b]=(0,m.useState)(()=>t(e.id)),x=(0,m.useRef)(null);d(x,!0),(0,m.useEffect)(()=>{let e=e=>{if(e.key!==`Escape`)return;let t=e.target;t?.closest(`.xterm`)||t&&(t.tagName===`TEXTAREA`||t.tagName===`INPUT`)||(e.preventDefault(),r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]);let S=l(n?.state),C=e=>`border-b-2 px-2 py-1.5 text-[11px] transition-colors ${e?`border-primary text-fg`:`border-transparent text-muted hover:text-fg`}`;return(0,h.jsxs)(`div`,{className:`fixed inset-0 z-40 flex justify-end`,children:[(0,h.jsx)(`button`,{type:`button`,"aria-label":`Close peek`,onClick:r,className:`absolute inset-0 cursor-default bg-black/40`}),(0,h.jsxs)(`div`,{ref:x,role:`dialog`,"aria-modal":`true`,"aria-label":`Session peek: ${e.title||e.branch||e.id}`,className:`relative flex h-full w-[640px] max-w-[92vw] flex-col border-l border-line bg-bg shadow-2xl`,children:[(0,h.jsxs)(`header`,{className:`flex h-10 shrink-0 items-center gap-2 border-b border-line bg-surface px-3`,children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${u(n?.state)}`}),(0,h.jsx)(`span`,{className:`min-w-0 truncate text-[13px] text-fg`,children:e.title||e.branch||e.id}),(0,h.jsx)(`span`,{className:`hidden min-w-0 truncate font-mono text-[11px] text-subtle sm:inline`,children:e.branch}),S&&(0,h.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted`,children:S}),(0,h.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[a&&(0,h.jsxs)(`button`,{type:`button`,onClick:a,className:`flex items-center gap-1 text-muted transition-colors hover:text-fg`,title:`Review → done if it passes`,children:[(0,h.jsx)(f,{size:13,strokeWidth:1.8}),(0,h.jsx)(`span`,{className:`text-[11px]`,children:`Review`})]}),_&&(0,h.jsxs)(`button`,{type:`button`,onClick:_,className:`flex items-center gap-1 text-muted transition-colors hover:text-fg`,title:`Open a PR for this branch`,children:[(0,h.jsx)(p,{size:13,strokeWidth:1.8}),(0,h.jsx)(`span`,{className:`text-[11px]`,children:`PR`})]}),(0,h.jsxs)(`button`,{type:`button`,onClick:i,className:`flex items-center gap-1 text-muted transition-colors hover:text-fg`,title:`Open in workspace`,children:[(0,h.jsx)(s,{size:13,strokeWidth:1.8}),(0,h.jsx)(`span`,{className:`text-[11px]`,children:`Workspace`})]}),(0,h.jsx)(`button`,{type:`button`,onClick:r,className:`flex items-center text-muted transition-colors hover:text-fg`,"aria-label":`Close peek`,title:`Close (Esc)`,children:(0,h.jsx)(c,{size:15,strokeWidth:1.8})})]})]}),(0,h.jsxs)(`nav`,{className:`flex shrink-0 items-center gap-1 border-b border-line bg-surface px-2`,children:[(0,h.jsx)(`button`,{type:`button`,onClick:()=>y(`engine`),className:C(v===`engine`),children:`Engine`}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>y(`transcript`),className:C(v===`transcript`),children:`Transcript`})]}),(0,h.jsx)(`div`,{className:`min-h-0 flex-1`,children:v===`engine`?(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(`div`,{className:`flex h-full items-center justify-center text-[12px] text-subtle`,children:`Loading terminal…`}),children:(0,h.jsx)(g,{tabId:b,taskId:e.id,mode:`engine`},b)}):(0,h.jsx)(o,{worktreePath:e.worktreePath,vendor:e.vendor??`claude`,title:e.title||e.branch})})]})]})}export{_ as BoardPeek};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as e,l as t,o as n}from"./terminal-qBEkzc-m.js";import{d as r,y as i}from"./tabs-Dx-TnbvG.js";import{a,c as o,d as s,i as c,r as l,t as u,u as d}from"./createLucideIcon-CM5xLVj1.js";import{a as f,n as p,r as m}from"./toast-BXjAT0ix.js";import{n as h,r as g}from"./settings-tPcmEHCP.js";import{a as _}from"./vendor-CdtpTJrf.js";var v=u(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),y=t(i(),1);async function b(){let e=await n.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 x(e){await n.put(`/api/quick-prompts`,e,{label:`save quick prompts`})}function S(e){return _(e)===`claude`?`/review`:`Review the current changes in this worktree critically.`}var C=[`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
|
-
`),w=s();function T({title:e,children:t}){return(0,w.jsxs)(`section`,{children:[(0,w.jsx)(`h2`,{className:`text-[11px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),(0,w.jsx)(`div`,{className:`mt-3 space-y-3 text-[12px]`,children:t})]})}function E({label:e,detail:t,enabled:n,onToggle:r,disabled:i}){return(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border border-line bg-bg p-3`,children:[(0,w.jsxs)(`div`,{className:`min-w-0`,children:[(0,w.jsx)(`div`,{className:`text-[12px] font-bold text-fg`,children:e}),t?(0,w.jsx)(`div`,{className:`mt-1 text-[11px] leading-relaxed text-subtle`,children:t}):null]}),(0,w.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 D(){let[e,t]=(0,y.useState)(null),[n,r]=(0,y.useState)(!0),[i,a]=(0,y.useState)(!1),o=(0,y.useRef)(0),s=(0,y.useCallback)(async()=>{let e=++o.current;r(!0),a(!1);try{let n=await h();e===o.current&&t(n)}catch(t){e===o.current&&a(!0),m(`load settings`,t)}finally{e===o.current&&r(!1)}},[]);return(0,y.useEffect)(()=>{s()},[s]),{settings:e,loading:n,error:i,reload:s,patch:async e=>{let n=await g(e);return t(n),n}}}function O({palette:e}){return(0,w.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,w.jsx)(`span`,{className:`h-5 w-3`,style:{backgroundColor:e}},t))})}function k(){let{names:e,palettes:t,active:n,overridden:r}=a();return(0,w.jsxs)(`div`,{className:`border border-line bg-surface p-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,w.jsx)(`div`,{className:`text-[11px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Appearance`}),r?(0,w.jsx)(`button`,{type:`button`,onClick:l,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,w.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`following TUI`})]}),e.length===0?(0,w.jsx)(`p`,{className:`mt-4 text-[12px] text-subtle`,children:`Loading themes…`}):(0,w.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,w.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,w.jsx)(O,{palette:t[e]??{}}),(0,w.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] ${r?`text-fg`:`text-muted`}`,children:e}),r&&(0,w.jsx)(v,{size:13,strokeWidth:2.5,className:`shrink-0 text-primary`})]},e)})})]})}function A(){return(0,w.jsx)(`div`,{className:`space-y-6`,children:(0,w.jsxs)(T,{title:`Dashboard theme`,children:[(0,w.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,w.jsx)(k,{})]})})}function j({engine:e,onSave:t,onDefault:n,onRemove:r}){let[i,a]=(0,y.useState)(e.command),[o,s]=(0,y.useState)(e.label),c=/\s--[A-Za-z0-9][\w-]*/.test(o)&&!/\s--[A-Za-z0-9][\w-]*/.test(i);return(0,y.useEffect)(()=>{a(e.command),s(e.label)},[e.command,e.label]),(0,w.jsxs)(`div`,{className:`border border-line bg-bg p-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,w.jsxs)(`div`,{className:`min-w-0`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`span`,{className:`font-bold text-fg`,children:e.label}),e.isDefault?(0,w.jsx)(`span`,{className:`font-mono text-[10px] text-primary`,children:`default`}):null,e.isCustom?(0,w.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:`custom`}):null]}),(0,w.jsx)(`div`,{className:`font-mono text-[10px] text-subtle`,children:e.id})]}),(0,w.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,w.jsxs)(`label`,{className:`mt-3 block`,children:[(0,w.jsx)(`span`,{className:`text-[11px] text-muted`,children:`Display name (label only)`}),(0,w.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,w.jsxs)(`label`,{className:`mt-2 block`,children:[(0,w.jsx)(`span`,{className:`text-[11px] text-muted`,children:`Launch command (argv that Rove runs)`}),(0,w.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,w.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,w.jsxs)(`div`,{className:`mt-3 flex items-center gap-2`,children:[(0,w.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,w.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 M({settings:e,patch:t}){let[n,r]=(0,y.useState)(``),[i,a]=(0,y.useState)(``),[o,s]=(0,y.useState)(``),c=(e,n,r)=>void t({engineUpdates:[{id:e,command:n,label:r}]}).then(()=>p(`success`,`engine saved`));return(0,w.jsxs)(`div`,{className:`space-y-6`,children:[(0,w.jsxs)(T,{title:`Launch commands`,children:[(0,w.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,w.jsx)(`div`,{className:`space-y-2`,children:e.engines.map(e=>(0,w.jsx)(j,{engine:e,onSave:c,onDefault:e=>void t({defaultEngine:e}).then(()=>p(`success`,`default engine saved`)),onRemove:e=>void t({removeEngine:e}).then(()=>p(`success`,`engine removed`))},e.id))})]}),(0,w.jsxs)(T,{title:`Add engine`,children:[(0,w.jsxs)(`div`,{className:`grid gap-2 md:grid-cols-3`,children:[(0,w.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,w.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,w.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,w.jsx)(`button`,{type:`button`,onClick:()=>void t({addEngine:{id:n,command:i,label:o}}).then(()=>{r(``),a(``),s(``),p(`success`,`engine added`)}).catch(e=>m(`add engine`,e)),className:`border border-primary bg-inset px-2 py-1 text-[11px] text-fg`,children:`Add engine`})]})]})}function N(){let[e,t]=(0,y.useState)(``),[n,r]=(0,y.useState)(``),[i,a]=(0,y.useState)(!1);return(0,y.useEffect)(()=>{let e=!1;return b().then(n=>{e||(t(n.review??``),r(n.pr??``),a(!0))}).catch(t=>{e||m(`load quick-action templates`,t)}),()=>{e=!0}},[]),(0,w.jsxs)(T,{title:`Board quick actions`,children:[(0,w.jsxs)(`label`,{className:`block`,children:[(0,w.jsx)(`span`,{className:`text-muted`,children:`Review template`}),(0,w.jsx)(`textarea`,{value:e,onChange:e=>t(e.target.value),placeholder:`default: ${S(`claude`)}`,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,w.jsxs)(`label`,{className:`block`,children:[(0,w.jsx)(`span`,{className:`text-muted`,children:`Open-PR template`}),(0,w.jsx)(`textarea`,{value:n,onChange:e=>r(e.target.value),placeholder:`default:\n${C}`,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,w.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,w.jsx)(`span`,{className:`text-[11px] text-subtle`,children:`Empty = built-in default. Rove appends its status/URL guardrails at send time.`}),(0,w.jsx)(`button`,{type:`button`,onClick:()=>void x({review:e,pr:n}).then(()=>p(`success`,`quick-action templates saved`)).catch(e=>m(`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 P({settings:e,patch:t}){let[n,i]=(0,y.useState)(!1),a=f();return(0,w.jsxs)(`div`,{className:`space-y-6`,children:[(0,w.jsxs)(T,{title:`Experimental gates`,children:[(0,w.jsx)(E,{label:`Remote projects`,detail:`Enables SSH-backed remote project setup in the CLI.`,enabled:e.remoteProjects,onToggle:()=>void t({remoteProjects:!e.remoteProjects})}),(0,w.jsx)(E,{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,w.jsx)(E,{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,w.jsx)(E,{label:`Dispatcher`,detail:`Enables the field-notes dispatcher protocol for repo main sessions.`,enabled:e.dispatcher,onToggle:()=>void t({dispatcher:!e.dispatcher})})]}),(0,w.jsxs)(T,{title:`Browser workspace`,children:[(0,w.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,w.jsx)(`button`,{type:`button`,onClick:()=>{if(!n){i(!0);return}r(),a({to:`/`}),i(!1)},onBlur:()=>i(!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 F(){let{supported:e,permission:t,enabled:n}=d();return(0,w.jsx)(`div`,{className:`space-y-6`,children:(0,w.jsxs)(T,{title:`Notifications`,children:[e?(0,w.jsx)(E,{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 o(!n),disabled:t===`denied`&&!n}):(0,w.jsx)(`p`,{className:`text-[11px] leading-relaxed text-subtle`,children:`This browser does not support desktop notifications.`}),t===`denied`&&!n?(0,w.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 I=e({SettingsPage:()=>R}),L=[[`general`,`General`],[`engines`,`Engines`],[`board`,`Board`],[`dev`,`Dev`],[`notifications`,`Notifications`]];function R({onClose:e}){let[t,n]=(0,y.useState)(`general`),{settings:r,loading:i,error:a,reload:o,patch:s}=D(),c=(0,y.useMemo)(()=>L.find(([e])=>e===t)?.[1]??`Settings`,[t]);return(0,w.jsxs)(`section`,{"data-settings-open":!0,className:`flex min-w-0 flex-1 flex-col bg-bg`,children:[(0,w.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center justify-between border-b border-line bg-surface px-3`,children:[(0,w.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Settings`}),(0,w.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,w.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[180px_minmax(0,1fr)] overflow-hidden`,children:[(0,w.jsx)(`nav`,{className:`min-h-0 overflow-auto border-r border-line bg-surface/60 p-2`,children:L.map(([e,r])=>(0,w.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,w.jsx)(`main`,{className:`min-h-0 overflow-auto p-4`,children:(0,w.jsxs)(`div`,{className:`mx-auto max-w-4xl`,children:[(0,w.jsx)(`h1`,{className:`mb-3 text-[13px] font-bold uppercase tracking-[0.12em] text-fg`,children:c}),a?(0,w.jsxs)(`div`,{className:`border border-line bg-surface p-4 text-[12px]`,children:[(0,w.jsx)(`p`,{className:`text-subtle`,children:`Couldn't load settings (daemon web transport offline?)`}),(0,w.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,w.jsx)(`div`,{className:`border border-line bg-surface p-4 text-[12px] text-subtle`,children:`Loading settings...`}):t===`general`?(0,w.jsx)(A,{}):t===`engines`?(0,w.jsx)(M,{settings:r,patch:s}):t===`board`?(0,w.jsx)(N,{}):t===`dev`?(0,w.jsx)(P,{settings:r,patch:s}):(0,w.jsx)(F,{})]})})]})]})}export{I as n,R as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatTerminal-DNTeFtk5.js","assets/terminal-qBEkzc-m.js","assets/tabs-Dx-TnbvG.js","assets/createLucideIcon-CM5xLVj1.js","assets/store-BXzqsTjs.js","assets/rotate-cw-D-UUtiD0.js","assets/web-transport-D0bugxxv.js","assets/ChatTerminal-BrP-ENHg.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as e,l as t,o as n,t as r}from"./terminal-qBEkzc-m.js";import{_ as i,a,h as o,i as s,o as c,p as l,t as u,v as d,y as f}from"./tabs-Dx-TnbvG.js";import{d as p,t as m}from"./createLucideIcon-CM5xLVj1.js";import{i as h,n as g}from"./store-BXzqsTjs.js";import{t as _}from"./ChatTranscript-Co0UhezW.js";import{t as v}from"./rotate-cw-D-UUtiD0.js";import{t as y}from"./web-transport-D0bugxxv.js";var b=m(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),x=m(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),S=m(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),C=t(f(),1);function w(e,t=36){return e.length<=t?e:`…${e.slice(e.length-t+1)}`}async function T(e,t={}){return{files:(await n.get(`/api/diff`,{query:{worktreePath:e,path:t.path,namesOnly:t.namesOnly?`1`:void 0},label:`diff fetch`})).files??[]}}function E(e){switch(e){case`added`:return{label:`A`,cls:`text-kobe-green`};case`untracked`:return{label:`U`,cls:`text-kobe-green`};case`modified`:return{label:`M`,cls:`text-kobe-yellow`};case`deleted`:return{label:`D`,cls:`text-kobe-red`};case`renamed`:return{label:`R`,cls:`text-kobe-blue`};case`copied`:return{label:`C`,cls:`text-kobe-blue`};default:return{label:e.slice(0,1).toUpperCase()||`?`,cls:`text-muted`}}}function D(e){switch(e){case`hunk`:return`kobe-diff-hunk`;case`meta`:return`kobe-diff-meta`;case`add`:return`kobe-diff-add`;case`del`:return`kobe-diff-del`;default:return`kobe-diff-ctx`}}function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function k(e){let t=e.replace(/\*+/g,`*`).split(`*`).map(O).join(`.*`);return RegExp(`^${t}$`)}function A(e,t){let n=t.trim(),r=n.startsWith(`!`),i=(r?n.slice(1):n).trim().toLowerCase();if(!i)return!0;let a=e.toLowerCase(),o=i.includes(`*`)?k(i).test(a):a.includes(i);return r?!o:o}function j(e,t){let n=t.trim();return n?e.filter(e=>A(e.path,n)):e}var M=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/,N=[`diff --git`,`index `,`--- `,`+++ `,`new file`,`deleted file`,`rename `,`similarity `,`copy `,`\\ No newline`,`Binary files`];function P(e){return N.some(t=>e.startsWith(t))}function F(e){let t=0,n=0;for(let r of I(e))r.kind===`add`?t++:r.kind===`del`&&n++;return{added:t,deleted:n}}function I(e){let t=e.replace(/\n$/,``).split(`
|
|
3
|
-
`),n=[],r=0,i=0,a=!1;for(let e of t){let t=M.exec(e);if(t){r=Number.parseInt(t[1],10),i=Number.parseInt(t[2],10),a=!0,n.push({kind:`hunk`,oldLn:null,newLn:null,text:e});continue}if(e.startsWith(`diff --git`)&&(a=!1),e===``||!a&&P(e)){n.push({kind:`meta`,oldLn:null,newLn:null,text:e});continue}let o=e[0];o===`+`?(n.push({kind:`add`,oldLn:null,newLn:i,text:e}),i++):o===`-`?(n.push({kind:`del`,oldLn:r,newLn:null,text:e}),r++):P(e)?n.push({kind:`meta`,oldLn:null,newLn:null,text:e}):(n.push({kind:`ctx`,oldLn:r,newLn:i,text:e}),r++,i++)}return n}var L=p();function R({added:e,deleted:t}){return e===0&&t===0?null:(0,L.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px]`,children:[(0,L.jsxs)(`span`,{className:`text-kobe-green`,children:[`+`,e]}),` `,(0,L.jsxs)(`span`,{className:`text-kobe-red`,children:[`−`,t]})]})}function z(e){let{worktreeChanges:t}=g(),n=e?t[e]:void 0;return n?`${n.added}:${n.deleted}`:`none`}function B({onRetry:e}){let{daemonConnected:t,streamConnected:n}=g();return y({daemonConnected:t,streamConnected:n})?(0,L.jsx)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:`The Rove daemon is offline — changes will reappear once it reconnects.`}):(0,L.jsxs)(`div`,{className:`flex flex-col items-start gap-2 px-3 py-4`,children:[(0,L.jsx)(`span`,{className:`text-[12px] text-kobe-red`,children:`Couldn't load changes.`}),(0,L.jsxs)(`button`,{type:`button`,onClick:e,className:`flex items-center gap-1.5 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:[(0,L.jsx)(v,{size:11,strokeWidth:2}),`Retry`]})]})}function V({patch:e,wrap:t}){let n=(0,C.useMemo)(()=>I(e),[e]);return e.trim()?(0,L.jsx)(`div`,{className:`kobe-diff min-h-0 flex-1 overflow-auto py-2 font-mono text-[12px] leading-[1.15rem] ${t?`kobe-diff-wrap`:``}`,children:n.map((e,t)=>(0,L.jsxs)(`div`,{className:`kobe-diff-row ${D(e.kind)}`,children:[(0,L.jsx)(`span`,{className:`kobe-diff-gutter`,children:e.oldLn??``}),(0,L.jsx)(`span`,{className:`kobe-diff-gutter`,children:e.newLn??``}),(0,L.jsx)(`span`,{className:`kobe-diff-text`,children:e.text===``?` `:e.text})]},t))}):(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center text-[12px] text-subtle`,children:`No textual diff for this file.`})}function H({worktreePath:e,onOpenFile:t}){let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(null),c=z(e),{worktreeChanges:l}=g(),u=e?l[e]:void 0,d=(0,C.useRef)(0),f=(0,C.useCallback)(async()=>{if(!e){r(null),s(null);return}let t=++d.current;a(!0),s(null);try{let n=await T(e,{namesOnly:!0});t===d.current&&r(n)}catch(e){t===d.current&&(s(e instanceof Error?e.message:String(e)),r(null))}finally{t===d.current&&a(!1)}},[e]);(0,C.useEffect)(()=>{f()},[f,c]);let[p,m]=(0,C.useState)(``);(0,C.useEffect)(()=>{m(``)},[e]);let h=n?.files??[],_=(0,C.useMemo)(()=>j(h,p),[h,p]);return(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,L.jsxs)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:[`Changes`,h.length>0?` · ${h.length}`:``]}),u&&(0,L.jsx)(R,{added:u.added,deleted:u.deleted}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>void f(),disabled:!e||i,className:`ml-auto rounded border border-line px-1.5 py-0.5 text-[10px] text-muted transition-colors hover:bg-surface disabled:opacity-40`,children:i?`…`:`↻`})]}),e?o?(0,L.jsx)(B,{onRetry:()=>void f()}):h.length===0?(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-4 text-center`,children:(0,L.jsx)(`div`,{className:`text-[12px] text-subtle`,children:i?`Loading changes…`:`Worktree clean.`})}):(0,L.jsxs)(L.Fragment,{children:[h.length>1&&(0,L.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Escape`&&p&&(e.preventDefault(),m(``))},placeholder:`Filter ${h.length} files… (*.ts, !*.json)`,title:`Match a substring, a *.glob, or !exclude`,spellCheck:!1,className:`mx-3 mb-1 shrink-0 border border-line bg-bg px-2 py-1 font-mono text-[11px] text-fg placeholder:text-subtle focus:border-line-active focus:outline-none`}),_.length===0?(0,L.jsx)(`div`,{className:`px-3 py-3 text-center text-[11px] text-subtle`,children:`No files match.`}):(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:_.map(e=>{let n=E(e.status);return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>t(e.path),title:e.path,className:`flex w-full items-center gap-2 border-l-2 border-transparent px-3 py-2 text-left transition-colors hover:border-primary hover:bg-inset`,children:[(0,L.jsx)(`span`,{className:`w-3 shrink-0 text-center font-mono text-[11px] font-bold ${n.cls}`,children:n.label}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-fg/90`,children:w(e.path,34)}),e.staged&&(0,L.jsx)(`span`,{className:`shrink-0 text-[9px] uppercase text-subtle`,children:`staged`})]},e.path)})})]}):(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-4 text-center`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[12px] font-semibold text-fg`,children:`No task selected`}),(0,L.jsx)(`div`,{className:`mt-1 max-w-48 text-[12px] leading-relaxed text-subtle`,children:`Select a task to watch its worktree changes.`})]})})]})}function U({worktreePath:e,path:t}){let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(null),u=z(e),d=(0,C.useRef)(0),f=(0,C.useCallback)(async()=>{if(!e){r(null),l(null);return}let n=++d.current;s(!0),l(null);try{let i=await T(e,{path:t});if(n!==d.current)return;r(i.files.find(e=>e.path===t)??null)}catch(e){n===d.current&&l(e instanceof Error?e.message:String(e))}finally{n===d.current&&s(!1)}},[e,t]);(0,C.useEffect)(()=>{f()},[f,u]);let p=n?F(n.patch):null;return(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col border border-line bg-bg`,children:[(0,L.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-2 border-b border-line px-3`,children:[(0,L.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,title:t,children:t}),p&&(0,L.jsx)(`span`,{className:`ml-auto shrink-0`,children:(0,L.jsx)(R,{added:p.added,deleted:p.deleted})}),n&&(0,L.jsx)(`span`,{className:`shrink-0 text-[10px] uppercase tracking-wide text-subtle ${p&&(p.added||p.deleted)?``:`ml-auto`}`,children:n.status}),n&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>a(e=>!e),title:i?`Disable line wrap`:`Wrap long lines`,className:`shrink-0 border px-1.5 py-0.5 font-mono text-[10px] transition-colors ${i?`border-primary bg-inset text-fg`:`border-line bg-bg text-subtle hover:border-primary hover:text-fg`}`,children:`wrap`})]}),c?(0,L.jsx)(B,{onRetry:()=>void f()}):n?(0,L.jsx)(V,{patch:n.patch,wrap:i}):o?(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-[12px] text-subtle`,children:`Loading preview…`}):(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-[12px] text-subtle`,children:`No diff for this file.`})]})}var W=e({WorkspaceTabs:()=>Z}),G=(0,C.lazy)(()=>h(()=>import(`./ChatTerminal-DNTeFtk5.js`).then(e=>({default:e.ChatTerminal})),__vite__mapDeps([0,1,2,3,4,5,6,7])));function K(){return(0,L.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-[12px] text-subtle`,children:`Loading terminal…`})}function q(e){return e??`claude`}function J({taskId:e,tabId:t,vendor:n}){return(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center px-6`,children:(0,L.jsx)(`div`,{className:`grid w-full max-w-2xl grid-cols-1 gap-3 md:grid-cols-3`,children:[{title:`Vendor`,detail:n,body:`Start an engine session for this task.`,icon:b,action:()=>c(e,t,`vendor`)},{title:`Chat`,detail:`transcript`,body:`Read the session as structured messages and tool calls.`,icon:x,action:()=>c(e,t,`transcript`)},{title:`Terminal`,detail:`shell / worktree`,body:`Open a command shell in this task worktree.`,icon:S,action:()=>c(e,t,`terminal`)}].map(e=>{let t=e.icon;return(0,L.jsxs)(`button`,{type:`button`,onClick:e.action,className:`group flex min-h-36 flex-col border border-line bg-surface p-4 text-left transition-colors hover:border-primary hover:bg-inset`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center border border-line bg-bg text-muted group-hover:border-primary group-hover:text-primary`,children:(0,L.jsx)(t,{size:17,strokeWidth:1.8})}),(0,L.jsx)(`span`,{className:`truncate text-[10px] uppercase text-subtle`,children:e.detail})]}),(0,L.jsx)(`div`,{className:`mt-5 text-[12px] font-bold uppercase tracking-[0.12em] text-fg`,children:e.title}),(0,L.jsx)(`div`,{className:`mt-2 text-[12px] leading-relaxed text-subtle`,children:e.body})]},e.title)})})})}function Y({tab:e,taskId:t,taskWorktreePath:n,taskTitle:r,vendor:i}){return e?.kind===`empty`?(0,L.jsx)(J,{taskId:t,tabId:e.id,vendor:i}):e?.kind===`vendor`?(0,L.jsx)(C.Suspense,{fallback:(0,L.jsx)(K,{}),children:(0,L.jsx)(G,{tabId:e.id,taskId:e.taskId??t,mode:`engine`},e.id)}):e?.kind===`terminal`?(0,L.jsx)(C.Suspense,{fallback:(0,L.jsx)(K,{}),children:(0,L.jsx)(G,{tabId:e.id,taskId:t,mode:`shell`},e.id)}):e?.kind===`transcript`?(0,L.jsx)(_,{worktreePath:n,vendor:i,title:r},e.id):e?.kind===`file`?(0,L.jsx)(U,{worktreePath:n,path:e.path},e.id):(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center text-[12px] text-subtle`,children:`Opening a tab…`})}function X({tab:e,side:t,children:n,onCloseSplit:r}){return(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[t===`right`&&(0,L.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b border-line bg-surface px-3`,children:[(0,L.jsx)(`span`,{className:`truncate text-[11px] text-muted`,children:e?.title??`Split`}),(0,L.jsx)(`button`,{type:`button`,onClick:r,className:`text-[11px] text-subtle hover:text-fg`,"aria-label":`close split`,title:`Close split`,children:`×`})]}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 p-2`,children:n})]})}function Z(){let[e,t]=(0,C.useState)(null),[n,c]=(0,C.useState)(!1),{selectedTaskId:f,tabsByTask:p,activeByTask:m,splitByTask:h}=i(),{tasks:_,jobs:v}=g(),y=f?_.find(e=>e.id===f):null,b=f?p[f]??[]:[],x=f?m[f]:void 0,S=f?h[f]:void 0,w=e=>{if(!f)return;let t=b.find(t=>t.id===e);a(f,e),t&&d(t.kind)&&r(e)},T=b.find(e=>e.id===x)??b[0],E=S&&S!==T?.id?b.find(e=>e.id===S):void 0,D=q(y?.vendor),O=y?.title||y?.branch||`Session`,k=!!y&&((f?v[f]?.phase===`running`:!1)||y.worktreePath===null);return(0,L.jsxs)(`section`,{className:`flex min-w-0 flex-1 flex-col bg-bg`,children:[(0,L.jsx)(`div`,{className:`flex h-9 shrink-0 items-stretch border-b border-line bg-surface`,children:f?(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-stretch overflow-x-auto`,role:`tablist`,children:[b.map(e=>{let n=e.id===T?.id,r=e.id===E?.id;return(0,L.jsxs)(`div`,{role:`tab`,"aria-selected":n,tabIndex:0,draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed=`move`,n.dataTransfer.setData(`text/plain`,e.id),t(e.id)},onDragEnd:()=>{t(null),c(!1)},className:`group flex h-9 select-none items-center gap-2 border-r border-b-2 border-r-line px-3 text-[12px] transition-colors ${n?`border-b-primary bg-bg text-fg`:r?`border-b-kobe-blue bg-inset text-fg`:`border-b-transparent text-muted hover:bg-inset/50`}`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>l(f,e.id),className:`max-w-40 cursor-grab truncate active:cursor-grabbing`,title:r?`${e.title} (split)`:e.title,children:e.title}),r&&(0,L.jsx)(`span`,{className:`text-[9px] font-bold uppercase text-kobe-blue`,children:`Split`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>w(e.id),className:`text-subtle opacity-0 transition-opacity hover:text-fg group-hover:opacity-100`,"aria-label":`close tab`,title:`Close tab`,children:`×`})]},e.id)}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>u(f),className:`px-3 text-[13px] text-subtle hover:text-fg`,"aria-label":`new tab`,title:`New tab`,children:`+`})]}):(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-3 text-[11px] text-subtle`,children:[(0,L.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-subtle`}),`No task selected`]})}),(0,L.jsxs)(`section`,{className:`relative min-h-0 flex-1`,"aria-label":`Workspace`,onDragOver:t=>{if(!f||!e)return;t.preventDefault();let n=t.currentTarget.getBoundingClientRect();c(t.clientX>n.left+n.width/2)},onDragLeave:()=>c(!1),onDrop:n=>{if(!f||!e)return;n.preventDefault();let r=n.currentTarget.getBoundingClientRect();n.clientX>r.left+r.width/2?o(f,e):l(f,e),t(null),c(!1)},children:[f&&T?(0,L.jsxs)(`div`,{className:`flex h-full min-w-0`,children:[(0,L.jsx)(X,{tab:T,side:`left`,children:(0,L.jsx)(Y,{tab:T,taskId:f,taskWorktreePath:y?.worktreePath??null,taskTitle:O,vendor:D})}),E&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`w-px shrink-0 bg-line`}),(0,L.jsx)(X,{tab:E,side:`right`,onCloseSplit:()=>{f&&s(f)},children:(0,L.jsx)(Y,{tab:E,taskId:f,taskWorktreePath:y?.worktreePath??null,taskTitle:O,vendor:D})})]})]}):(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 text-center`,children:(0,L.jsxs)(`div`,{className:`max-w-md`,children:[(0,L.jsx)(`div`,{className:`font-mono text-[13px] font-bold text-primary`,children:`[rove web]`}),(0,L.jsx)(`h1`,{className:`mt-4 text-[18px] font-semibold text-fg`,children:y?k?`Setting up this task's worktree…`:`Opening workspace…`:`Select a task to open its workspace.`}),(0,L.jsx)(`p`,{className:`mt-2 text-[12px] leading-relaxed text-subtle`,children:`Web workspaces keep their own browser tabs, split panes, notes, and file previews for each task.`})]})}),e&&(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-y-2 right-2 flex w-[calc(50%-0.5rem)] items-center justify-center border border-dashed ${n?`border-primary bg-primary/10`:`border-line bg-inset/40`}`,children:(0,L.jsx)(`span`,{className:`border border-line bg-bg px-2 py-1 text-[10px] font-bold uppercase tracking-[0.12em] text-muted`,children:`Drop to split right`})})]})]})}export{w as i,W as n,H as r,Z as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Board as e}from"./Board-B0oB8DMk.js";var t=e;export{t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{IssuesPage as e}from"./IssuesPage-BjLRf_cj.js";var t=e;export{t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AppShell as e}from"./AppShell-ByiYfvCg.js";var t=e;export{t as component};
|