@sma1lboy/kobe 0.8.196 → 0.8.198
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 +442 -644
- package/dist/cli/kobe-run.js +442 -644
- package/dist/cli/rove-run.js +442 -644
- package/dist/web-ui/assets/AppShell-CmceqjY-.js +5 -0
- package/dist/web-ui/assets/{Board-Br1k09BD.js → Board-DBuYe1Q2.js} +1 -1
- package/dist/web-ui/assets/{BoardPeek-sYiqhN0E.js → BoardPeek-gUixsQIV.js} +1 -1
- package/dist/web-ui/assets/ChatTranscript-Bw-ROsjY.js +1 -0
- package/dist/web-ui/assets/{ConfirmDialog-CqMTxyHy.js → ConfirmDialog-C9xYoPEx.js} +1 -1
- package/dist/web-ui/assets/{IssuesPage-D-Nloamt.js → IssuesPage-D0aXMK3K.js} +1 -1
- package/dist/web-ui/assets/{WorkspaceTabs-TgLV0X8R.js → WorkspaceTabs-ZhpZ33cd.js} +2 -2
- package/dist/web-ui/assets/board-CH4KUmnb.js +1 -0
- package/dist/web-ui/assets/{desktop-ChKD7MFx.js → desktop-BerzaX7n.js} +2 -2
- package/dist/web-ui/assets/{index-DBrG3NdJ.js → index-DEdAoep_.js} +3 -3
- package/dist/web-ui/assets/issues-DHu-h5EM.js +1 -0
- package/dist/web-ui/assets/routes-BZCFfJIJ.js +1 -0
- package/dist/web-ui/assets/{task._taskId-DeiVXq4X.js → task._taskId-BOaY4DV_.js} +1 -1
- package/dist/web-ui/assets/{task._taskId-BGlWW77m.js → task._taskId-BpThmZkz.js} +2 -2
- package/dist/web-ui/assets/{worktrees-BnyMLZJH.js → worktrees-bs_8ANrl.js} +1 -1
- package/dist/web-ui/index.html +3 -3
- package/package.json +1 -1
- package/dist/web-ui/assets/AppShell-BrScFMXx.js +0 -5
- package/dist/web-ui/assets/ChatTranscript-D7-ZUa5E.js +0 -1
- package/dist/web-ui/assets/board-DFOpP7Em.js +0 -1
- package/dist/web-ui/assets/issues-XV3sbo3Z.js +0 -1
- package/dist/web-ui/assets/routes-5BxWgajG.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IssuesPage as e}from"./IssuesPage-D0aXMK3K.js";var t=e;export{t as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AppShell as e}from"./AppShell-CmceqjY-.js";var t=e;export{t as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{_ as t,f as n,y as r}from"./tabs-DHBP2ShA.js";import{t as i}from"./task._taskId-
|
|
1
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{_ as t,f as n,y as r}from"./tabs-DHBP2ShA.js";import{t as i}from"./task._taskId-BpThmZkz.js";import{m as a}from"./createLucideIcon-C6nfansM.js";import{n as o}from"./active-task-CCVuYWP9.js";import{AppShell as s}from"./AppShell-CmceqjY-.js";var c=e(r()),l=a();function u(){let{taskId:e}=i.useParams(),{selectedTaskId:r}=t();return(0,c.useEffect)(()=>{!e||e===r||(n(e),o(e))},[e,r]),(0,l.jsx)(s,{})}export{u as component};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/task._taskId-
|
|
2
|
-
import{u as e}from"./terminal-6BCvBu4_.js";import{y as t}from"./tabs-DHBP2ShA.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-Dzac_n1b.js";import{m as u}from"./createLucideIcon-C6nfansM.js";import{a as d,o as f}from"./toast-B7pad_QC.js";import{t as p}from"./react-dom-Ccqy9Xi6.js";import{i as m}from"./store-BK5yanfN.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-DeiVXq4X.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-BOaY4DV_.js","assets/terminal-6BCvBu4_.js","assets/tabs-DHBP2ShA.js","assets/createLucideIcon-C6nfansM.js","assets/active-task-CCVuYWP9.js","assets/store-BK5yanfN.js","assets/AppShell-CmceqjY-.js","assets/toast-B7pad_QC.js","assets/external-store-CNyRxjsC.js","assets/ViewToggle-C6Kw_T1E.js","assets/columns-3-Dzac_n1b.js","assets/with-selector-D8BuTuR6.js","assets/x-MtSojW5V.js","assets/web-transport-BFuf9jKF.js","assets/triage-DP1bTLMs.js","assets/use-focus-trap-oPsw86zw.js","assets/engines-CZCmPVm2.js","assets/settings-Cavhxdh3.js","assets/vendor-CdtpTJrf.js","assets/WorkspaceTabs-ZhpZ33cd.js","assets/ChatTranscript-Bw-ROsjY.js","assets/rotate-cw-BsVaYno1.js","assets/search-zs6lDYfz.js","assets/time-kviT26Tm.js","assets/WorkspaceTabs-DLzL-Tad.css","assets/SettingsPage-GfBeP2sy.js","assets/plus-Bz25iNHX.js","assets/activity-BjTd1D8q.js","assets/ConfirmDialog-C9xYoPEx.js","assets/desktop-BerzaX7n.js","assets/text-match-DW3sD-Rt.js","assets/SlideOver-CI7vBtQJ.js","assets/chips-NdkDNqV7.js","assets/AppShell-HiyATJse.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as e}from"./terminal-6BCvBu4_.js";import{y as t}from"./tabs-DHBP2ShA.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-Dzac_n1b.js";import{m as u}from"./createLucideIcon-C6nfansM.js";import{a as d,o as f}from"./toast-B7pad_QC.js";import{t as p}from"./react-dom-Ccqy9Xi6.js";import{i as m}from"./store-BK5yanfN.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-BOaY4DV_.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{a as e,o as t,u as n}from"./terminal-6BCvBu4_.js";import{y as r}from"./tabs-DHBP2ShA.js";import{m as i,p as a,t as o}from"./createLucideIcon-C6nfansM.js";import{a as s,r as c}from"./toast-B7pad_QC.js";import{n as l}from"./store-BK5yanfN.js";import{t as u}from"./arrow-left-wT_Oflhg.js";import{n as d}from"./time-kviT26Tm.js";import{n as f,t as p}from"./ConfirmDialog-
|
|
1
|
+
import{a as e,o as t,u as n}from"./terminal-6BCvBu4_.js";import{y as r}from"./tabs-DHBP2ShA.js";import{m as i,p as a,t as o}from"./createLucideIcon-C6nfansM.js";import{a as s,r as c}from"./toast-B7pad_QC.js";import{n as l}from"./store-BK5yanfN.js";import{t as u}from"./arrow-left-wT_Oflhg.js";import{n as d}from"./time-kviT26Tm.js";import{n as f,t as p}from"./ConfirmDialog-C9xYoPEx.js";var m=o(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),h=n(r(),1),g=class extends Error{};async function _(){let e=await t.get(`/api/worktrees`,{label:`load worktrees`});return Array.isArray(e.projects)?e.projects:[]}async function v(n,r){try{await t.delete(`/api/worktrees`,{path:n,force:r},{label:`delete worktree`})}catch(t){throw t instanceof e&&/refusing to remove dirty worktree/.test(t.detail)?new g(t.detail):t}}var y=i();function b(e){return e===!0?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-green`,children:`on remote`}):e===!1?(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`not pushed`}):(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`remote unknown`})}function x({row:e,linkedTaskTitle:t,onDelete:n}){return(0,y.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.kobeManaged&&(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`}),e.dirty&&(0,y.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),b(e.branchOnRemote),t&&(0,y.jsxs)(`span`,{className:`shrink-0 truncate text-[10px] text-subtle`,children:[`task: `,t]})]}),(0,y.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,y.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.createdAtMs>0&&(0,y.jsxs)(`span`,{className:`ml-auto shrink-0`,children:[`created `,d(e.createdAtMs)]})]})]}),(0,y.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-kobe-red hover:text-kobe-red`,children:`Delete`})]})}function S(){let e=s(),{tasks:t}=l(),[n,r]=(0,h.useState)(null),[i,o]=(0,h.useState)(!1),[d,b]=(0,h.useState)(null),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)([]),E=(0,h.useMemo)(()=>{let e=new Map;for(let n of t)n.worktreePath&&e.set(n.worktreePath,n.title||n.branch);return e},[t]),D=()=>{o(!0),_().then(r).catch(e=>c(`load worktrees`,e)).finally(()=>o(!1))};(0,h.useEffect)(D,[]);let O=(n??[]).map(e=>({...e,worktrees:e.worktrees.filter(e=>!w.includes(e.path))})),k=e=>{r(t=>t?.map(t=>({...t,worktrees:t.worktrees.filter(t=>t.path!==e)}))??t)},A=(e,t)=>{T(t=>[...t,e.path]),v(e.path,t).then(()=>{k(e.path),T(t=>t.filter(t=>t!==e.path))}).catch(n=>{T(t=>t.filter(t=>t!==e.path)),!t&&n instanceof g?C(e):c(t?`force delete worktree`:`delete worktree`,n)})};return(0,y.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,y.jsxs)(`header`,{"data-kobe-topbar":!0,className:`flex h-10 shrink-0 items-center gap-3 border-b border-line bg-surface px-3`,children:[(0,y.jsx)(f,{}),(0,y.jsxs)(`button`,{type:`button`,onClick:()=>e({to:`/`}),className:`flex items-center gap-1.5 text-muted transition-colors hover:text-fg`,title:`Back to workspace`,children:[(0,y.jsx)(u,{size:15,strokeWidth:1.8}),(0,y.jsx)(`span`,{className:`text-[12px]`,children:`Workspace`})]}),(0,y.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Worktrees`}),(0,y.jsx)(`button`,{type:`button`,onClick:D,disabled:i,className:`ml-auto flex items-center gap-1.5 text-muted transition-colors hover:text-fg disabled:opacity-40`,title:`Refresh`,children:(0,y.jsx)(m,{size:13,strokeWidth:1.8,className:i?`animate-spin`:``})})]}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:n===null?(0,y.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Loading worktrees…`}):O.length===0?(0,y.jsxs)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:[`No local projects known to `,a(),` yet.`]}):O.map(e=>(0,y.jsxs)(`div`,{className:`border-b border-line`,children:[(0,y.jsx)(`div`,{className:`border-b border-line-subtle bg-surface px-3 py-1.5 font-mono text-[11px] text-subtle`,children:e.repo}),e.worktrees.length===0?(0,y.jsx)(`p`,{className:`px-3 py-3 text-[12px] text-subtle`,children:`No worktrees.`}):e.worktrees.map(e=>(0,y.jsx)(x,{row:e,linkedTaskTitle:E.get(e.path)??null,onDelete:()=>b(e)},e.path))]},e.repo))}),d&&(0,y.jsx)(p,{title:`Delete worktree`,body:`Delete the worktree for "${d.branch||d.path}"? This removes the working directory; the branch itself is kept.`,confirmLabel:`Delete`,danger:!0,onConfirm:()=>{if(!d)return;let e=d;b(null),A(e,!1)},onCancel:()=>b(null)}),S&&(0,y.jsx)(p,{title:`Force delete worktree`,body:`"${S.branch||S.path}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?`,confirmLabel:`Force delete`,danger:!0,onConfirm:()=>{if(!S)return;let e=S;C(null),A(e,!0)},onCancel:()=>C(null)})]})}var C=S;export{C as component};
|
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-DEdAoep_.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/terminal-6BCvBu4_.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/tabs-DHBP2ShA.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-C6nfansM.js">
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/columns-3-Dzac_n1b.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-Ccqy9Xi6.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/store-BK5yanfN.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-BpThmZkz.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-BerzaX7n.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/active-task-CCVuYWP9.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/use-focus-trap-oPsw86zw.js">
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/engines-CZCmPVm2.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.198",
|
|
5
5
|
"description": "Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"terminal",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{o as e,u as t}from"./terminal-6BCvBu4_.js";import{_ as n,f as r,l as i,r as a,y as o}from"./tabs-DHBP2ShA.js";import{d as s,m as c,p as l,t as u}from"./createLucideIcon-C6nfansM.js";import{a as d,n as f,r as p}from"./toast-B7pad_QC.js";import{n as m,t as h}from"./ViewToggle-C6Kw_T1E.js";import{n as g,t as _}from"./store-BK5yanfN.js";import{n as v,t as y}from"./active-task-CCVuYWP9.js";import{t as b}from"./external-store-CNyRxjsC.js";import{c as x,d as S,i as C,l as w,p as T,r as E,t as ee,u as D}from"./triage-DP1bTLMs.js";import{i as O,r as k,t as A}from"./WorkspaceTabs-TgLV0X8R.js";import{t as j}from"./SettingsPage-GfBeP2sy.js";import{t as M}from"./ChatTranscript-D7-ZUa5E.js";import{t as te}from"./plus-Bz25iNHX.js";import{t as ne}from"./search-zs6lDYfz.js";import{t as N}from"./x-MtSojW5V.js";import{n as P,t as F}from"./activity-BjTd1D8q.js";import{t as I}from"./use-focus-trap-oPsw86zw.js";import{t as L}from"./engines-CZCmPVm2.js";import{n as re}from"./settings-Cavhxdh3.js";import{a as R,i as ie,r as ae}from"./vendor-CdtpTJrf.js";import{r as z}from"./web-transport-BFuf9jKF.js";import{n as B,t as V}from"./time-kviT26Tm.js";import{n as H,t as U}from"./ConfirmDialog-CqMTxyHy.js";import{t as oe}from"./text-match-DW3sD-Rt.js";import{t as se}from"./SlideOver-CI7vBtQJ.js";import{n as ce,r as le,t as ue}from"./chips-NdkDNqV7.js";var de=u(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),fe=u(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),W=u(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),pe=u(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),G=t(o(),1),K=c();function me({onClose:e}){let{tasks:t}=g(),n=d(),i=(0,G.useRef)(null);I(i);let a=(0,G.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,G.useMemo)(()=>new Set(t.map(e=>e.worktreePath).filter(Boolean)),[t]),[s,c]=(0,G.useState)(a[0]??``),[u,m]=(0,G.useState)(null),[h,y]=(0,G.useState)(!1),[b,x]=(0,G.useState)(null),[S,C]=(0,G.useState)(!1),w=async e=>{if(e){y(!0),m(null);try{let{worktrees:t}=await _(`worktree.discoverAdoptable`,{repo:e});m(t)}catch(e){p(`scan worktrees`,e),m([])}finally{y(!1)}}},T=async t=>{x(t.path);try{let{task:i}=await _(`worktree.adopt`,{repo:s,worktreePath:t.path,branch:t.branch,ifExists:`return`});r(i.id),v(i.id),n({to:`/task/$taskId`,params:{taskId:i.id}}),f(`success`,`Adopted ${t.branch||t.path}`),e()}catch(e){p(`adopt worktree`,e)}finally{x(null)}};return S?(0,K.jsx)(E,{onClose:e}):a.length===0?(0,K.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,K.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,K.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,K.jsxs)(`span`,{className:`font-mono text-[10px] text-subtle`,children:[`pull an existing worktree into `,l()]})]}),(0,K.jsxs)(`div`,{className:`px-3 py-6 text-center`,children:[(0,K.jsxs)(`p`,{className:`text-[12px] leading-relaxed text-subtle`,children:[`No repos known to `,l(),` yet. Create a task in a repo first, then come back to adopt its worktrees.`]}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>C(!0),className:`mt-4 border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10`,children:`Create a task`})]}),(0,K.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,K.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,K.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,K.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,K.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-fg`,children:`Adopt worktree`}),(0,K.jsxs)(`span`,{className:`font-mono text-[10px] text-subtle`,children:[`pull an existing worktree into `,l()]})]}),(0,K.jsxs)(`div`,{className:`space-y-2 px-3 py-3`,children:[(0,K.jsx)(`div`,{className:`mb-1 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Repo`}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.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,K.jsx)(`option`,{value:e,children:e},e))}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>void w(s),disabled:!s||h,className:`shrink-0 border border-primary bg-inset px-3 py-1.5 text-[11px] text-fg transition-colors hover:bg-primary/10 disabled:opacity-40`,children:h?`Scanning…`:`Scan`})]})]}),(0,K.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto border-t border-line`,children:u===null?(0,K.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`Pick a repo and Scan to find adoptable worktrees.`}):u.length===0?(0,K.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-subtle`,children:`No adoptable worktrees found for this repo.`}):u.map(e=>{let t=o.has(e.path);return(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line-subtle px-3 py-2 last:border-b-0`,children:[(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`truncate font-mono text-[12px] text-fg`,children:e.branch||`(detached)`}),e.dirty&&(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-kobe-yellow`,children:`dirty`}),e.kobeManaged&&(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`rove`})]}),(0,K.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[10px] text-subtle`,children:[(0,K.jsx)(`span`,{className:`truncate font-mono`,children:e.path}),e.lastActivityMs>0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0`,children:B(e.lastActivityMs)})]})]}),t?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`tracked`}):(0,K.jsx)(`button`,{type:`button`,onClick:()=>void T(e),disabled:b!==null,className:`shrink-0 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg disabled:opacity-40`,children:b===e.path?`Adopting…`:`Adopt`})]},e.path)})}),(0,K.jsx)(`div`,{className:`flex justify-end border-t border-line px-3 py-2`,children:(0,K.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 q=b({query:``,statusFilter:`all`,sortMode:`default`,showArchived:!1}),he=null;function J(e){q.update(t=>({...t,...e}))}function Y(e){J({query:e})}function ge(e){J({statusFilter:e})}function _e(e){J({sortMode:e})}function ve(e){J({showArchived:e})}function ye(e){!e||e===he||(he=e,J({sortMode:e}))}function be(){return q.useSnapshot()}function xe(e){let t=Date.parse(e.updatedAt||e.createdAt);return Number.isFinite(t)?t:0}function Se(e,t){let n=xe(t)-xe(e);return n===0?t.id.localeCompare(e.id):n}function Ce(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(Se),i.sort(Se)),[...n,...r,...i]}function we(e,t){return oe([e.title,e.branch,e.repo,e.worktreePath,e.vendor,e.status].filter(Boolean).join(` `),t)}function Te({task:e,onClose:t}){return(0,K.jsx)(se,{open:e!==null,onClose:t,title:e?(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.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,K.jsx)(`span`,{className:`min-w-0 truncate`,children:e.title||e.branch})]}):void 0,children:e&&(0,K.jsx)(M,{worktreePath:e.worktreePath??null,vendor:R(e.vendor),title:e.title||e.branch})})}function Ee({children:e,suffix:t}){return(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),t?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`h-px flex-1 bg-line`}),(0,K.jsx)(`span`,{className:`font-mono text-[10px] font-bold uppercase text-primary`,children:t})]}):null]})}function De({task:e,engine:t,job:n,changes:r,engineName:i,active:a,onClick:o}){let s=n?.phase===`running`,c=s?`materializing…`:P(t?.state),l=V(e.updatedAt||e.createdAt);return(0,K.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,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s?(0,K.jsx)(W,{size:10,strokeWidth:2.5,className:`shrink-0 animate-spin text-primary`}):(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${F(t?.state)}`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] ${a?`text-fg`:`text-fg/90`}`,children:e.title||e.branch}),(0,K.jsx)(le,{pr:e.prStatus}),e.pinned&&(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-subtle`,children:`PIN`}),(0,K.jsx)(ue,{counts:r})]}),(0,K.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 pl-3.5 text-[11px] text-subtle`,children:[(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:e.branch||`—`}),(0,K.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[(0,K.jsx)(ce,{label:i}),c&&(0,K.jsx)(`span`,{className:`text-muted`,children:c}),l&&(0,K.jsx)(`span`,{className:`text-subtle`,children:l})]})]})]})}function Oe({task:e,onRestore:t,onPreview:n}){let r=e.title||e.branch;return(0,K.jsxs)(`div`,{className:`group flex items-center gap-2 border-l-2 border-transparent px-3 py-1.5`,children:[n?(0,K.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,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-subtle`,children:r}),(0,K.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 border border-line bg-surface px-1.5 py-0.5 text-[10px] text-muted opacity-0 transition-opacity hover:border-primary hover:text-fg group-hover:opacity-100`,children:`Restore`})]})}function ke({onOpenSettings:e,onNewTask:t,onAdopt:i}){let{tasks:a,engineStates:o,jobs:s,worktreeChanges:c,uiPrefs:l,hydrated:u,streamConnected:f}=g(),{selectedTaskId:m}=n(),h=L(),y=(0,G.useMemo)(()=>ae(a),[a]),b=e=>ie(h,e,y),{query:x,statusFilter:S,sortMode:w,showArchived:T}=be(),E=(0,G.useRef)(null),D=(0,G.useRef)(null);(0,G.useEffect)(()=>{m&&E.current?.querySelector(`[data-task-id="${CSS.escape(m)}"]`)?.scrollIntoView({block:`nearest`})},[m]);let O=l?.sortMode;(0,G.useEffect)(()=>{ye(O)},[O]);let k=(0,G.useMemo)(()=>a.filter(e=>!e.archived),[a]),A=(0,G.useMemo)(()=>a.filter(e=>e.archived&&e.kind!==`main`),[a]),j=(0,G.useMemo)(()=>Ce(k.filter(e=>we(e,x)&&ee(o[e.id],c[e.worktreePath],S)),w),[k,x,S,w,o,c]),M=j.filter(e=>e.kind===`main`),P=j.filter(e=>e.kind!==`main`),F=!u||!f&&a.length===0,I=d(),R=e=>{r(e),v(e),I({to:`/task/$taskId`,params:{taskId:e}})};(0,G.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(),D.current?.focus();return}if(n&&o&&o!==document.body&&!E.current?.contains(o)||j.length===0)return;e.preventDefault();let s=j.findIndex(e=>e.id===m),c=s===-1?0:Math.min(Math.max(s+(r?1:-1),0),j.length-1);R(j[c].id)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[j,m]);let z=e=>{_(`task.archive`,{taskId:e.id,archived:!1}).catch(t=>p(`restore "${e.title||e.branch}"`,t))},[B,V]=(0,G.useState)(!1),[H,U]=(0,G.useState)(null);return(0,G.useEffect)(()=>{let e=!0;return re().then(t=>{e&&V(t.archivedHistoryPreview===!0)}).catch(()=>{}),()=>{e=!1}},[]),(0,K.jsxs)(`aside`,{className:`flex w-64 shrink-0 flex-col border-r border-line bg-bg`,children:[(0,K.jsxs)(`div`,{className:`border-b border-line bg-surface/50 px-3 py-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Tasks`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>_e(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,K.jsxs)(`span`,{className:`font-mono text-[10px] text-muted`,children:[j.length,`/`,k.length]}),(0,K.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,K.jsx)(fe,{size:14,strokeWidth:1.9})}),(0,K.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted transition-colors hover:text-primary`,title:`New task`,"aria-label":`New task`,children:(0,K.jsx)(te,{size:14,strokeWidth:2.2})})]})]}),(0,K.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,K.jsx)(ne,{size:14,strokeWidth:1.8,className:`shrink-0 text-subtle`}),(0,K.jsx)(`input`,{ref:D,value:x,onChange:e=>Y(e.target.value),onKeyDown:e=>{e.key===`Enter`&&j.length>0?(e.preventDefault(),R(j[0].id),e.currentTarget.blur()):e.key===`Escape`&&x&&(e.preventDefault(),Y(``))},placeholder:`Filter tasks`,className:`min-w-0 flex-1 bg-transparent text-fg placeholder:text-subtle focus:outline-none`}),x&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>Y(``),className:`shrink-0 text-subtle hover:text-fg`,"aria-label":`clear task filter`,title:`Clear filter`,children:(0,K.jsx)(N,{size:13,strokeWidth:2})})]}),(0,K.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,K.jsx)(`button`,{type:`button`,onClick:()=>ge(e.key),title:e.title,className:`border px-1.5 py-0.5 text-[10px] transition-colors ${S===e.key?`border-primary bg-inset text-fg`:`border-line bg-bg text-subtle hover:border-primary hover:text-fg`}`,children:e.label},e.key))})]}),(0,K.jsxs)(`div`,{ref:E,className:`flex-1 overflow-y-auto`,children:[F?(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-4 text-[12px] text-subtle`,children:[(0,K.jsx)(W,{size:13,strokeWidth:2,className:`animate-spin`}),(0,K.jsx)(`span`,{children:`connecting…`})]}):k.length===0?(0,K.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,K.jsx)(`p`,{children:`No tasks yet.`}),(0,K.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`})]}):j.length===0?(0,K.jsxs)(`div`,{className:`px-3 py-4 text-[12px] leading-relaxed text-subtle`,children:[(0,K.jsx)(`div`,{children:x?`No matches for “${x}”.`:`No tasks in this status.`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{Y(``),ge(`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,K.jsxs)(K.Fragment,{children:[M.length>0&&(0,K.jsx)(Ee,{children:`Projects`}),M.map(e=>(0,K.jsx)(De,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===m,onClick:()=>R(e.id)},e.id)),P.length>0&&(0,K.jsx)(Ee,{suffix:w==="default"?void 0:w,children:`Worktrees`}),P.map(e=>(0,K.jsx)(De,{task:e,engine:o[e.id],job:s[e.id],changes:c[e.worktreePath],engineName:b(e),active:e.id===m,onClick:()=>R(e.id)},e.id))]}),!F&&A.length>0&&(0,K.jsxs)(`div`,{className:`mt-2 border-t border-line-subtle pb-2`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>ve(!T),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Archived`}),(0,K.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:A.length}),(0,K.jsx)(`span`,{className:`ml-auto font-mono text-[10px] text-subtle`,children:T?`−`:`+`})]}),T&&A.map(e=>(0,K.jsx)(Oe,{task:e,onRestore:()=>z(e),onPreview:B?()=>U(e):void 0},e.id))]})]}),(0,K.jsx)(Te,{task:H,onClose:()=>U(null)}),(0,K.jsx)(`div`,{className:`border-t border-line p-2`,children:(0,K.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,K.jsx)(C,{size:15,strokeWidth:1.8}),(0,K.jsx)(`span`,{children:`Settings`})]})})]})}async function Ae(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function X(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var je=/^\/api\/issue-assets\/[a-f0-9]{16}\/[A-Za-z0-9_-]+\.[a-z0-9]+$/;function Me(e){let t=e.trim();return je.test(t)?t:null}function Ne(e){let t=e.trim();return/^https?:\/\//i.test(t)?t:t.startsWith(`//`)?null:t.startsWith(`/`)||t.startsWith(`#`)||t.startsWith(`./`)||t.startsWith(`../`)?t:null}function Pe(e){let t=e;return t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(e,t,n)=>{let r=Me(n.replace(/&/g,`&`));return r?`<img src="${X(r)}" alt="${X(t)}" loading="lazy" class="kobe-md-img">`:``})),t.includes(`]`)&&t.includes(`)`)&&(t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(e,t,n)=>{let r=Ne(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>`:Pe(e)).join(``)}function Fe(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 Ie(t){return(await e.get(`/api/notes`,{query:{taskId:t},label:`load notes`})).markdown??``}async function Le(t,n){await e.put(`/api/notes`,{taskId:t,markdown:n},{label:`save notes`})}function Re(e){switch(e){case`saving`:return`saving…`;case`saved`:return`saved`;case`error`:return`save failed`;default:return``}}var ze=600;function Be({children:e,right:t}){return(0,K.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),t]})}function Ve({taskId:e,full:t=!1}){let[n,r]=(0,G.useState)(``),[i,a]=(0,G.useState)(!1),[o,s]=(0,G.useState)(!1),[c,l]=(0,G.useState)(`idle`),u=(0,G.useMemo)(()=>Fe(n),[n]),d=(0,G.useRef)(null),f=(0,G.useRef)(null),p=(0,G.useRef)(null),m=(0,G.useCallback)(()=>{d.current&&=(clearTimeout(d.current),null);let e=p.current;if(!e)return;p.current=null;let{taskId:t,value:n}=e;Le(t,n).then(()=>{f.current===t&&l(`saved`)}).catch(()=>{f.current===t&&l(`error`)})},[]);(0,G.useEffect)(()=>{if(f.current=e,m(),l(`idle`),r(``),a(!1),!e)return;let t=!1;return s(!0),Ie(e).then(n=>{!t&&f.current===e&&r(n)}).catch(()=>{!t&&f.current===e&&r(``)}).finally(()=>{t||s(!1)}),()=>{t=!0}},[e,m]),(0,G.useEffect)(()=>()=>{m()},[m]);let h=(0,G.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,ze)},[e,m]);return(0,K.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col bg-bg`,children:[(0,K.jsx)(Be,{right:e?(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c!==`idle`&&(0,K.jsx)(`span`,{className:`text-[10px] ${c===`error`?`text-kobe-red`:`text-subtle`}`,children:Re(c)}),(0,K.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,K.jsx)(`div`,{className:`min-h-0 flex-1 ${t?`px-0 pb-0`:`px-3 pb-3`}`,children:e?i?(0,K.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,K.jsx)(`div`,{className:`kobe-md text-[12px] leading-relaxed text-fg`,dangerouslySetInnerHTML:{__html:u}}):(0,K.jsx)(`p`,{className:`text-[12px] text-subtle`,children:`Nothing to preview yet.`})}):(0,K.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,K.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center`,children:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-[12px] font-semibold text-fg`,children:`No task selected`}),(0,K.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 He=[`backlog`,`in_progress`,`in_review`,`done`,`canceled`,`error`],Ue=`DIRTY_WORKTREE`;function We(e){return e.replace(/_/g,` `)}function Q({name:e,value:t,mono:n=!1}){return(0,K.jsxs)(`div`,{className:`min-w-0 border-b border-line-subtle py-2 last:border-b-0`,children:[(0,K.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:e}),(0,K.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,K.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 Ge({task:e}){let[t,n]=(0,G.useState)(e?.title??``),[r,i]=(0,G.useState)(e?.branch??``),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(!1),u=(0,G.useRef)(null);(0,G.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]);let[m,h]=(0,G.useState)(null),g=L(),b=d();if((0,G.useEffect)(()=>{n(e?.title??``)},[e?.title]),(0,G.useEffect)(()=>{i(e?.branch??``)},[e?.branch]),!e)return(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center`,children:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-[12px] font-semibold text-fg`,children:`No task selected`}),(0,K.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){p(e.split(`:`)[0],t)}finally{s(null)}},S=()=>{let n=t.trim();!n||n===e.title||x(`rename`,()=>_(`task.rename`,{taskId:e.id,title:n}))},C=()=>{let t=r.trim();!t||t===e.branch||x(`branch`,()=>_(`task.setBranch`,{taskId:e.id,branch:t}))},w=()=>{Ae(e.worktreePath).then(e=>{e&&(l(!0),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>l(!1),1200))})},T=()=>{h(null),x(`archive`,async()=>{await _(`task.archive`,{taskId:e.id,archived:!0}),a(),b({to:`/`}),await y(null)})},E=()=>{x(`restore`,()=>_(`task.archive`,{taskId:e.id,archived:!1}))},ee=t=>{h(null),s(`delete`),(async()=>{try{await _(`task.delete`,{taskId:e.id,force:t}),a(),b({to:`/`}),v(null),f(`success`,`Deleted "${e.title||e.branch}"`)}catch(e){let n=e instanceof Error?e.message:String(e);!t&&n.includes(Ue)?h({kind:`delete`,force:!0}):p(`delete`,e)}finally{s(null)}})()};return(0,K.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,K.jsxs)(`div`,{className:`border-b border-line px-3 py-3`,children:[(0,K.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Task`}),(0,K.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,K.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,K.jsx)($,{onClick:S,disabled:o===`rename`,children:`Save`})]}),e.archived&&(0,K.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,K.jsx)(`span`,{className:`text-[11px] text-kobe-yellow`,children:`archived`}),(0,K.jsx)($,{onClick:E,disabled:o!==null,children:`Restore`})]})]}),(0,K.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-2`,children:[e.kind===`main`?(0,K.jsx)(Q,{name:`Branch`,value:e.branch,mono:!0}):(0,K.jsxs)(`div`,{className:`min-w-0 border-b border-line-subtle py-2`,children:[(0,K.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Branch`}),(0,K.jsx)(`div`,{className:`mt-1 flex gap-2`,children:(0,K.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,K.jsx)(Q,{name:`Vendor`,value:R(e.vendor)}),(0,K.jsx)(Q,{name:`Worktree`,value:e.worktreePath,mono:!0}),(0,K.jsx)(Q,{name:`Repo`,value:e.repo,mono:!0}),(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Status`}),(0,K.jsx)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:He.map(t=>(0,K.jsx)(`button`,{type:`button`,onClick:()=>void x(`status:${t}`,()=>_(`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:We(t)},t))})]}),(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Vendor`}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:g.map(t=>(0,K.jsx)(`button`,{type:`button`,onClick:()=>void x(`vendor:${t.id}`,()=>_(`task.setVendor`,{taskId:e.id,vendor:t.id})),disabled:o!==null,className:`border px-2 py-1 text-[11px] transition-colors disabled:opacity-40 ${R(e.vendor)===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,K.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-2`,children:[(0,K.jsx)($,{onClick:()=>void x(`pin`,()=>_(`task.pin`,{taskId:e.id,pinned:!e.pinned})),disabled:o!==null,children:e.pinned?`Unpin`:`Pin`}),(0,K.jsx)($,{onClick:()=>void x(`worktree`,()=>_(`task.ensureWorktree`,{taskId:e.id})),disabled:o!==null,children:`Ensure worktree`}),(0,K.jsx)($,{onClick:w,children:c?`Copied`:`Copy path`}),!e.archived&&(0,K.jsx)($,{onClick:()=>h({kind:`archive`}),disabled:o!==null,danger:!0,children:`Archive`})]}),e.kind!==`main`&&(0,K.jsxs)(`div`,{className:`mt-4 border-t border-line-subtle pt-3`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Danger zone`}),(0,K.jsx)($,{onClick:()=>h({kind:`delete`,force:!1}),disabled:o!==null,danger:!0,children:`Delete task + worktree`})]})]}),m?.kind===`archive`&&(0,K.jsx)(U,{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:()=>h(null)}),m?.kind===`delete`&&(0,K.jsx)(U,{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:()=>ee(m.force),onCancel:()=>h(null)})]})}function Ke({drawer:e=!1,onClose:t}={}){let[r,a]=(0,G.useState)(`overview`),{selectedTaskId:o}=n(),{tasks:s}=g(),c=o?s.find(e=>e.id===o)??null:null;return(0,K.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,K.jsxs)(`div`,{className:`flex h-9 shrink-0 items-stretch border-b border-line bg-surface`,children:[[`overview`,`notes`,`changes`].map(e=>(0,K.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,K.jsx)(`button`,{type:`button`,onClick:t,className:`ml-auto px-3 text-subtle hover:text-fg`,"aria-label":`Close tools`,children:(0,K.jsx)(N,{size:14,strokeWidth:2})})]}),(0,K.jsx)(`div`,{className:`min-h-0 flex-1`,children:r===`overview`?(0,K.jsx)(Ge,{task:c}):r===`notes`?(0,K.jsx)(Ve,{taskId:o,full:!0}):(0,K.jsx)(k,{worktreePath:c?.worktreePath??null,onOpenFile:e=>{o&&i(o,e)}})})]})}function qe({onToggleTools:e,onShowHelp:t}){let{daemonConnected:r,streamConnected:i,tasks:a}=g(),{selectedTaskId:o}=n(),c=o?a.find(e=>e.id===o):null,l=z({daemonConnected:r,streamConnected:i});return(0,K.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,K.jsx)(H,{}),(0,K.jsxs)(`span`,{className:`font-mono text-[13px] font-bold text-primary`,children:[`[`,s,`]`]}),(0,K.jsx)(h,{}),c?(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`max-w-56 truncate rounded bg-inset px-2 py-0.5 text-[11px] text-fg`,children:c.title||c.branch}),(0,K.jsx)(`span`,{className:`hidden max-w-40 truncate font-mono text-[11px] text-subtle md:inline`,children:c.branch})]}):(0,K.jsx)(`span`,{className:`rounded bg-inset px-2 py-0.5 text-[11px] text-muted`,children:`Workspace`}),(0,K.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 text-[11px] text-subtle`,children:[(0,K.jsxs)(`span`,{className:`hidden items-center gap-1.5 sm:flex`,title:l.title,children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${l.ok?`bg-kobe-green`:`bg-kobe-yellow`}`}),(0,K.jsx)(`span`,{children:l.label})]}),(0,K.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,K.jsx)(de,{size:15,strokeWidth:1.8})}),(0,K.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,K.jsx)(pe,{size:15,strokeWidth:1.8})})]})]})}function Je(){let{tasks:e,update:t}=g(),{selectedTaskId:r}=n(),i=r?e.find(e=>e.id===r):null,a=e.filter(e=>!e.archived).length;return(0,K.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,K.jsxs)(`span`,{children:[a,` task`,a===1?``:`s`]}),i&&(0,K.jsxs)(`span`,{className:`min-w-0 truncate text-muted`,children:[i.kind===`main`?`project`:`worktree`,` ·`,` `,O(i.worktreePath,54)]}),(0,K.jsx)(`span`,{className:`ml-auto`,children:t?.latest?`update ${t.latest} available`:`${l()} web`})]})}function Ye(){let{settingsOpen:e}=T(),[t,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(!1);return(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&i(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,K.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-bg text-fg`,children:[(0,K.jsx)(qe,{onToggleTools:()=>i(e=>!e),onShowHelp:w}),(0,K.jsx)(m,{}),(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,K.jsx)(ke,{onOpenSettings:S,onNewTask:D,onAdopt:()=>n(!0)}),e?(0,K.jsx)(j,{onClose:x}):(0,K.jsx)(A,{}),(0,K.jsx)(`div`,{className:`hidden lg:flex`,children:(0,K.jsx)(Ke,{})}),r&&(0,K.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,K.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,K.jsx)(Ke,{drawer:!0,onClose:()=>i(!1)})})})]}),(0,K.jsx)(Je,{}),t&&(0,K.jsx)(me,{onClose:()=>n(!1)})]})}export{Ye as AppShell};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,u as t}from"./terminal-6BCvBu4_.js";import{y as n}from"./tabs-DHBP2ShA.js";import{m as r,p as i,t as a}from"./createLucideIcon-C6nfansM.js";import{n as o}from"./store-BK5yanfN.js";import{t as s}from"./rotate-cw-BsVaYno1.js";import{t as c}from"./search-zs6lDYfz.js";import{t as l}from"./x-MtSojW5V.js";import{t as u}from"./web-transport-BFuf9jKF.js";import{t as d}from"./time-kviT26Tm.js";var f=a(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),p=a(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),m=t(n(),1);function h(t,n){return e.get(`/api/history/sessions`,{query:{worktreePath:t,vendor:n},label:`/api/history/sessions`})}async function g(t,n){let{messages:r}=await e.get(`/api/history/messages`,{query:{vendor:t,sessionId:n},label:`/api/history/messages`});return r}function ee(e){let t=0,n=0,r=0;for(let i of e){let e=i.usage;e&&(t+=e.input_tokens,n+=e.output_tokens,r=e.input_tokens+(e.cache_read_input_tokens??0)+(e.cache_creation_input_tokens??0))}return{inputTokens:t,outputTokens:n,contextTokens:r}}function _(e){return e>=1e6?`${(e/1e6).toFixed(1)}m`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function v(e,t,n,r=80){return t-e-n<r}var y=90;function b(e){let t=e.input;if(t&&typeof t==`object`){let e=e=>typeof t[e]==`string`?t[e]:null,n=e(`command`)??e(`file_path`)??e(`pattern`)??e(`url`)??e(`description`)??e(`prompt`)??e(`query`);if(n)return n.length>y?`${n.slice(0,y-1)}…`:n}try{let t=JSON.stringify(e.input);return!t||t===`{}`||t===`null`?``:t.length>y?`${t.slice(0,y-1)}…`:t}catch{return``}}function x(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function S(e){switch(e.type){case`text`:case`thinking`:return e.text;case`tool_call`:return`${e.name} ${b(e)}`;case`tool_result`:return x(e.output)}}function C(e){return e.blocks.map(S).join(` `)}function w(e,t){return!(t&&e.type===`tool_call`)}function T(e,t){return e.blocks.some(e=>e.type===`text`||e.type===`thinking`?e.text.trim()!==``:e.type===`tool_call`&&!t)}var E=r(),D=600;function O({call:e,result:t}){let[n,r]=(0,m.useState)(!1),i=b(e),a=t?x(t.output):``,o=!n&&a.length>D,s=o?`${a.slice(0,D)}…`:a,c=a.length>0;return(0,E.jsxs)(`div`,{className:`my-1`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>c&&r(e=>!e),className:`flex w-full items-baseline gap-2 text-left ${c?`cursor-pointer`:`cursor-default`}`,children:[(0,E.jsx)(`span`,{className:`shrink-0 text-[11px] ${t?.isError?`text-kobe-red`:`text-kobe-green`}`,children:`⏺`}),(0,E.jsx)(`span`,{className:`shrink-0 text-[12px] font-semibold text-fg`,children:e.name}),i&&(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[11px] text-subtle`,children:i}),c&&(0,E.jsx)(`span`,{className:`shrink-0 text-subtle`,children:n?(0,E.jsx)(f,{size:12}):(0,E.jsx)(p,{size:12})})]}),(n||!n&&a&&a.length<=D)&&a&&(0,E.jsx)(`pre`,{className:`mt-1 max-h-96 overflow-auto whitespace-pre-wrap break-words border-l-2 pl-3 font-mono text-[11px] leading-relaxed ${t?.isError?`border-kobe-red/40 text-kobe-red/90`:`border-line text-muted`}`,children:s}),o&&(0,E.jsx)(`button`,{type:`button`,onClick:()=>r(!0),className:`ml-5 mt-0.5 text-[10px] text-subtle hover:text-fg`,children:`show full output`})]})}function k({text:e}){let[t,n]=(0,m.useState)(!1);return(0,E.jsxs)(`div`,{className:`my-1`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex items-baseline gap-2 text-[11px] italic text-subtle hover:text-muted`,children:[(0,E.jsx)(`span`,{children:`✱`}),(0,E.jsx)(`span`,{children:t?`thinking`:`thinking…`}),t?(0,E.jsx)(f,{size:11}):(0,E.jsx)(p,{size:11})]}),t&&(0,E.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap break-words border-l-2 border-line-subtle pl-3 text-[11px] italic leading-relaxed text-subtle`,children:e})]})}function A({message:e,results:t,hideTools:n}){let r=[],i=d(e.timestamp),a=!1;return e.blocks.forEach((o,s)=>{if(!w(o,n))return;let c=`${e.timestamp}-${s}`;if(o.type===`text`){if(!o.text.trim())return;e.role===`user`?(r.push((0,E.jsxs)(`div`,{className:`my-2 flex items-baseline gap-2 border-l-2 border-primary/60 bg-inset/40 px-3 py-2`,children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-[12px] font-bold text-primary`,children:`❯`}),(0,E.jsx)(`p`,{className:`min-w-0 flex-1 whitespace-pre-wrap break-words text-[12px] leading-relaxed text-fg`,children:o.text}),i&&!a&&(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-subtle`,title:e.timestamp,children:i})]},c)),a=!0):r.push((0,E.jsx)(`p`,{className:`my-2 whitespace-pre-wrap break-words text-[12px] leading-relaxed ${e.role===`system`?`text-subtle`:`text-fg/90`}`,children:o.text},c));return}if(o.type===`tool_call`){r.push((0,E.jsx)(O,{call:o,result:t.get(o.callId)},c));return}if(o.type===`thinking`){o.text.trim()&&r.push((0,E.jsx)(k,{text:o.text},c));return}}),r.length===0?null:(0,E.jsx)(E.Fragment,{children:r})}var j=2500;function M({worktreePath:e,vendor:t}){let{daemonConnected:n,streamConnected:r}=o(),a=u({daemonConnected:n,streamConnected:r}),[d,f]=(0,m.useState)([]),[p,y]=(0,m.useState)(null),[b,x]=(0,m.useState)(!0),[S,w]=(0,m.useState)([]),[D,O]=(0,m.useState)(``),[k,M]=(0,m.useState)(!1),[N,P]=(0,m.useState)(null),[F,I]=(0,m.useState)(!1),[L,R]=(0,m.useState)(!0),z=(0,m.useRef)(-1),B=(0,m.useRef)(null),V=(0,m.useRef)(!0),H=(0,m.useRef)(0),U=(0,m.useRef)(!0),W=(0,m.useRef)(null);(0,m.useEffect)(()=>{U.current=b,W.current=p},[b,p]);let G=(0,m.useCallback)(async(n=!1)=>{if(!e)return;let r=H.current;try{let i=await h(e,t);if(i.latestMtime===z.current&&!n)return;z.current=i.latestMtime;let a=i.sessions.at(-1)??null,o=U.current?a:W.current??a;r=++H.current;let s=o?await g(t,o):[];if(r!==H.current)return;f(i.sessions),w(s),y(o),P(null)}catch(e){r===H.current&&P(e instanceof Error?e.message:String(e))}finally{r===H.current&&I(!0)}},[e,t]),K=(0,m.useRef)(G);(0,m.useEffect)(()=>{K.current=G},[G]),(0,m.useEffect)(()=>{z.current=-1,I(!1),U.current=!0,W.current=null,V.current=!0,x(!0),y(null),O(``),M(!1),R(!0),K.current(!0);let e=window.setInterval(()=>{document.hidden||K.current()},j);return()=>window.clearInterval(e)},[e,t]);let q=e=>{let n=e===d.at(-1);U.current=n,W.current=e,x(n),y(e);let r=++H.current;g(t,e).then(e=>{r===H.current&&w(e)}).catch(e=>{r===H.current&&P(e instanceof Error?e.message:String(e))})};(0,m.useEffect)(()=>{let e=B.current;e&&V.current&&(e.scrollTop=e.scrollHeight)},[S]);let J=()=>{let e=B.current;if(!e)return;let t=v(e.scrollTop,e.scrollHeight,e.clientHeight);V.current=t,R(t)},Y=()=>{let e=B.current;e&&(e.scrollTop=e.scrollHeight,V.current=!0,R(!0))},X=(0,m.useMemo)(()=>{let e=new Map;for(let t of S)for(let n of t.blocks)n.type===`tool_result`&&e.set(n.callId,n);return e},[S]),Z=(0,m.useMemo)(()=>ee(S),[S]),Q=(0,m.useMemo)(()=>S.map(e=>C(e).toLowerCase()),[S]),$=(0,m.useMemo)(()=>{let e=D.trim().toLowerCase();return S.filter((t,n)=>(!e||Q[n].includes(e))&&T(t,k))},[S,Q,D,k]);return e?(0,E.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col border border-line bg-bg`,children:[(0,E.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 border-b border-line bg-surface px-2`,children:[(0,E.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-[0.12em] text-subtle`,children:`Chat`}),d.length>0&&(0,E.jsx)(`select`,{value:p??``,onChange:e=>q(e.target.value),className:`max-w-44 border border-line bg-bg px-1 py-0.5 font-mono text-[10px] text-muted focus:outline-none`,title:`Engine session`,children:d.map((e,t)=>(0,E.jsxs)(`option`,{value:e,children:[`#`,t+1,` `,e.slice(0,8),t===d.length-1?` (latest)`:``]},e))}),(0,E.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 font-mono text-[10px] text-subtle`,children:[Z.contextTokens>0&&(0,E.jsxs)(`span`,{title:`Live context estimate (last turn's full prompt)`,children:[`ctx `,_(Z.contextTokens)]}),Z.outputTokens>0&&(0,E.jsxs)(`span`,{title:`Session tokens in / out`,children:[`⇡`,_(Z.inputTokens),` ⇣`,_(Z.outputTokens)]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>void G(!0),className:`text-subtle transition-colors hover:text-fg`,title:`Refresh transcript`,"aria-label":`Refresh transcript`,children:(0,E.jsx)(s,{size:11,strokeWidth:2})})]})]}),S.length>0&&(0,E.jsxs)(`div`,{className:`flex h-7 shrink-0 items-center gap-2 border-b border-line px-2`,children:[(0,E.jsx)(c,{size:11,strokeWidth:2,className:`shrink-0 text-subtle`}),(0,E.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{e.key===`Escape`&&D&&(e.preventDefault(),O(``))},placeholder:`Search transcript…`,spellCheck:!1,className:`min-w-0 flex-1 bg-transparent font-mono text-[11px] text-fg placeholder:text-subtle focus:outline-none`}),D.trim()&&(0,E.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px] text-subtle`,children:[$.length,`/`,S.length]}),D.trim()&&(0,E.jsx)(`button`,{type:`button`,onClick:()=>O(``),className:`shrink-0 text-subtle transition-colors hover:text-fg`,"aria-label":`clear transcript search`,title:`Clear search`,children:(0,E.jsx)(l,{size:12,strokeWidth:2})}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>M(e=>!e),className:`shrink-0 border px-1.5 py-0.5 font-mono text-[10px] transition-colors ${k?`border-primary bg-inset text-fg`:`border-line bg-bg text-subtle hover:border-primary hover:text-fg`}`,title:k?`Show tool calls`:`Hide tool calls — read just the conversation`,children:k?`tools off`:`tools`})]}),(0,E.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,E.jsx)(`div`,{ref:B,onScroll:J,className:`min-h-0 flex-1 overflow-y-auto px-3 py-2`,children:N?a?(0,E.jsxs)(`div`,{className:`py-4 text-[12px] leading-relaxed text-subtle`,children:[`The `,i(),` daemon is offline — the transcript will reappear once it reconnects.`]}):(0,E.jsxs)(`div`,{className:`flex flex-col items-start gap-2 py-4`,children:[(0,E.jsx)(`span`,{className:`text-[12px] text-kobe-red`,children:`Couldn't load the transcript.`}),(0,E.jsxs)(`button`,{type:`button`,onClick:()=>void G(!0),className:`flex items-center gap-1.5 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:[(0,E.jsx)(s,{size:11,strokeWidth:2}),`Retry`]})]}):F?S.length===0?(0,E.jsx)(`div`,{className:`py-4 text-[12px] leading-relaxed text-subtle`,children:`No engine session recorded for this worktree yet. Open a Vendor tab and start a conversation — the transcript appears here.`}):$.length===0?(0,E.jsxs)(`div`,{className:`py-4 text-[12px] leading-relaxed text-subtle`,children:[`No messages match “`,D.trim(),`”.`]}):$.map((e,t)=>(0,E.jsx)(A,{message:e,results:X,hideTools:k},`${e.sessionId}-${t}`)):(0,E.jsx)(`div`,{className:`py-4 text-[12px] text-subtle`,children:`Loading transcript…`})}),!L&&$.length>0&&(0,E.jsx)(`button`,{type:`button`,onClick:Y,className:`absolute bottom-3 right-4 flex items-center gap-1 border border-line bg-surface px-2 py-1 font-mono text-[10px] text-muted shadow-md transition-colors hover:border-primary hover:text-fg`,children:`↓ latest`})]})]}):(0,E.jsx)(`div`,{className:`flex h-full items-center justify-center text-[12px] text-subtle`,children:`This task has no worktree yet.`})}export{M as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Board as e}from"./Board-Br1k09BD.js";var t=e;export{t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{IssuesPage as e}from"./IssuesPage-D-Nloamt.js";var t=e;export{t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AppShell as e}from"./AppShell-BrScFMXx.js";var t=e;export{t as component};
|