codesesh 1.0.0 → 1.0.2
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/README.md +29 -5
- package/dist/{chunk-TIHF4T3K.js → chunk-PROMURPM.js} +80 -16
- package/dist/chunk-PROMURPM.js.map +1 -0
- package/dist/{chunk-BEF6LLRG.js → chunk-VAUC2W7I.js} +5317 -2268
- package/dist/chunk-VAUC2W7I.js.map +1 -0
- package/dist/{dist-3F467V44.js → dist-6QTGTYZT.js} +40 -4
- package/dist/index.js +1818 -454
- package/dist/index.js.map +1 -1
- package/dist/scan-refresh-worker.js +274 -95
- package/dist/scan-refresh-worker.js.map +1 -1
- package/dist/search-index-worker.js +112 -50
- package/dist/search-index-worker.js.map +1 -1
- package/dist/smart-tag-worker.js +5 -3
- package/dist/smart-tag-worker.js.map +1 -1
- package/dist/web/assets/ErrorBoundary-D11tWzfn.js +1 -0
- package/dist/web/assets/OverviewScreen-DriPmCam.js +1 -0
- package/dist/web/assets/Projects-BPDIcUBK.js +1 -0
- package/dist/web/assets/SearchFilterBar-Bx73B5e9.js +1 -0
- package/dist/web/assets/SearchResultsPanel-A6_3TPhW.js +1 -0
- package/dist/web/assets/SessionDetail-BnpvDwtH.js +54 -0
- package/dist/web/assets/agents-BkRP_ww3.js +1 -0
- package/dist/web/assets/contract-V6QuD0UY.js +1 -0
- package/dist/web/assets/index-99ZxpV2y.js +1410 -0
- package/dist/web/assets/index-B2RqUgZ5.css +1 -0
- package/dist/web/assets/panel-C-gc79Gz.js +1 -0
- package/dist/web/assets/session-indexes-0oT5HSS5.js +4 -0
- package/dist/web/assets/utils-DgUgu15E.js +1 -0
- package/dist/web/icon/agent/dsh.svg +3 -0
- package/dist/web/index.html +10 -32
- package/dist/web/theme-bootstrap.js +19 -0
- package/package.json +10 -10
- package/dist/chunk-BEF6LLRG.js.map +0 -1
- package/dist/chunk-TIHF4T3K.js.map +0 -1
- package/dist/web/assets/ErrorBoundary-BY-N1QzJ.js +0 -1
- package/dist/web/assets/OverviewScreen-_ZaVjhxN.js +0 -1
- package/dist/web/assets/Projects-q6cEm2dc.js +0 -1
- package/dist/web/assets/SearchFilterBar-CrVBpo40.js +0 -1
- package/dist/web/assets/SearchResultsPanel-Cg5V8Ia6.js +0 -1
- package/dist/web/assets/SessionDetail-BSSuddsZ.js +0 -54
- package/dist/web/assets/chunk-62JRHF6Z-BWRsEBnL.js +0 -4
- package/dist/web/assets/index-C3KgxGwE.js +0 -1410
- package/dist/web/assets/index-DQX42cFQ.css +0 -1
- package/dist/web/assets/panel-B7kuE60V.js +0 -1
- package/dist/web/assets/session-indexes-DmnjZ_JL.js +0 -1
- package/dist/web/assets/utils-t2u9IbNT.js +0 -1
- /package/dist/{dist-3F467V44.js.map → dist-6QTGTYZT.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,s=(e,t)=>`${e}\0${t}`,c=e=>{let t=s(e.reference.agentName,e.reference.sessionId);o.delete(t),r.delete(t),n.set(t,e)},l=e=>{let t=s(e.reference.agentName,e.reference.sessionId);n.has(t)||o.has(t)||r.set(t,e)},u=e=>{let t=s(e.agentName,e.sessionId);o.delete(t),a.set(t,e)},d=e=>{let t=s(e.agentName,e.sessionId);i.delete(t),i.set(t,e)},f=e=>{let t=s(e.agentName,e.sessionId);n.delete(t),r.delete(t),i.delete(t),a.delete(t),o.set(t,e)};for(let t of e.newSessionRefs??[])u(t);for(let t of e.projectionRelatedSessionHeads??[])l(t);for(let t of e.projectionSessionOrder??[])d(t);for(let t of e.changedSessionHeads)c(t);for(let t of e.removedSessionRefs)f(t);for(let e of t.newSessionRefs??[])u(e);for(let e of t.projectionRelatedSessionHeads??[])l(e);for(let e of t.projectionSessionOrder??[])d(e);for(let e of t.changedSessionHeads)c(e);for(let e of t.removedSessionRefs)f(e);return{type:`sessions-updated`,changedAgents:Array.from(new Set([...e.changedAgents,...t.changedAgents])),newSessions:e.newSessions+t.newSessions,newSessionRefs:[...a.values()],updatedSessions:e.updatedSessions+t.updatedSessions,removedSessions:e.removedSessions+t.removedSessions,totalSessions:t.totalSessions,timestamp:t.timestamp,changedSessionHeads:[...n.values()],projectionRelatedSessionHeads:[...r.values()],projectionSessionOrder:[...i.values()],removedSessionRefs:[...o.values()]}}function t(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function n(e,t){let n=new Date(e);return new Date(n.getFullYear(),n.getMonth(),n.getDate()+t).getTime()}function r(e){let t=new Date(e);return`${String(t.getFullYear()).padStart(4,`0`)}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}var i=new Set([`git_remote`,`git_common_dir`,`manifest_path`,`synthetic`,`path`,`loose`]);function a(e){return i.has(e)}function o(e){return`${e.kind}:${e.key}`}function s(e,t){return`${e}\0${t.toLowerCase()}`}function c(e){return{agentName:e.agentName.trim().toLowerCase(),sessionId:e.sessionId}}function l(e){let t=e.indexOf(`/`);if(t<=0||t===e.length-1)return null;let n=e.slice(0,t).trim().toLowerCase();return n?{agentName:n,sessionId:e.slice(t+1)}:null}function u(e){let t=c(e);return`${t.agentName}/${t.sessionId}`}function d(e){return l(e.slug)?.agentName??`unknown`}function f(e){return`/${encodeURIComponent(e.trim().toLowerCase())}`}function p(e){let t=c(e);return`${f(t.agentName)}/${encodeURIComponent(t.sessionId)}`}function m(e){return p({agentName:d(e),sessionId:e.id})}function h(e,t){return(t.time_updated??t.time_created)-(e.time_updated??e.time_created)}function g(e){for(let t=1;t<e.length;t+=1)if(h(e[t-1],e[t])>0)return[...e].sort(h);return[...e]}function _(e,t){return u({agentName:e,sessionId:t})}function v(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}function y(e){let t=new Map,n=new Map,r=new Map,i=new Map;for(let n of e){let e=_(d(n),n.id);t.has(e)||t.set(e,n)}let a=g(e);for(let e of a){let t=d(e);v(n,t,e);let a=e.project_identity;if(!a?.key)continue;let c=o(a);v(r,c,e),v(i,s(c,t),e)}return{sourceSessions:e,sessionsByActivity:a,byRouteKey:t,byAgent:n,byProjectIdentityKey:r,byProjectAgentKey:i}}function b(e,t,n){let r=new Map;for(let t of e)r.set(_(d(t),t.id),t);for(let e of n)r.delete(_(e.agentName,e.sessionId));for(let e of t)r.set(_(e.reference.agentName,e.reference.sessionId),e.session);return g([...r.values()])}function x(e){return _(d(e),e.id)}function S(e){return e.parent_reference?u(e.parent_reference):null}function C(e){return e.time_updated??e.time_created}function w(e,t,n){let r=C(e);return(t==null||r>=t)&&(n==null||r<=n)}function T(e){let t=e.stats,n=t.total_cost??0;return{messageCount:t.message_count,inputTokens:t.total_input_tokens,outputTokens:t.total_output_tokens,cacheReadTokens:t.total_cache_read_tokens??0,cacheCreateTokens:t.total_cache_create_tokens??0,totalTokens:t.total_tokens??t.total_input_tokens+t.total_output_tokens,cost:n,costSource:n>0?t.cost_source??`recorded`:void 0}}function E(e,t){e.messageCount+=t.messageCount,e.inputTokens+=t.inputTokens,e.outputTokens+=t.outputTokens,e.cacheReadTokens+=t.cacheReadTokens,e.cacheCreateTokens+=t.cacheCreateTokens,e.totalTokens+=t.totalTokens,e.cost+=t.cost,t.costSource===`estimated`&&(e.costSource=`estimated`)}function D(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();t.push(e);for(let t of e.children)n.push(t)}for(let e=t.length-1;e>=0;--e){let n=t[e],r=n.inclusiveStats,i=0;for(let e of n.children)i+=1+e.descendantCount,E(r,e.inclusiveStats);r.cost>0&&r.costSource==null&&(r.costSource=`recorded`),n.descendantCount=i}}function O(e){let t=new Map;for(let n of e){let e=x(n);t.has(e)||t.set(e,{session:n,children:[],descendantCount:0,inclusiveStats:T(n)})}let n=[...t.values()],r=new Map;function i(e){let n=[],i=new Set,a=e,o=!0;for(;a!=null;){let e=r.get(a);if(e!=null){o=e;break}if(i.has(a)){o=!1;break}i.add(a),n.push(a);let s=S(t.get(a).session);a=s!=null&&t.has(s)?s:null}for(let e of n)r.set(e,o);return o}let a=new Map,o=[],s=[],c=[];for(let e of n){let n=x(e.session),r=S(e.session),l=r==null?`root`:t.has(r)&&i(n)?`mounted-child`:`orphan`;if(a.set(n,l),l===`mounted-child`){t.get(r).children.push(e);continue}(l===`root`?o:s).push(e),c.push(e)}for(let e of c)D(e);return{roots:o,orphans:s,entries:c,byRouteKey:t,mountStateOf(e){return a.get(x(e))??(e.parent_reference?`orphan`:`root`)}}}function k(e){let n=new Map;for(let i of e){let e=C(i.session),a=r(e),o=n.get(a);o||(o={dayKey:a,dayStart:t(e),nodes:[],mainCount:0,subCount:0},n.set(a,o)),o.nodes.push(i)}let i=[...n.values()];for(let e of i)e.nodes.sort((e,t)=>h(e.session,t.session)),e.mainCount=e.nodes.length,e.subCount=e.nodes.reduce((e,t)=>e+t.descendantCount,0);return i.sort((e,t)=>t.dayStart-e.dayStart)}function A(e,t,n,r=O(e)){if(t==null&&n==null)return e;let i=j(r,t,n),a=new Set;for(;i.length>0;){let e=i.pop(),t=x(e.session);if(!a.has(t)){a.add(t);for(let t of e.children)i.push(t)}}return e.filter(e=>a.has(x(e)))}function j(e,t,n){return t==null&&n==null?e.entries:e.entries.filter(e=>w(e.session,t,n))}function M(e,t){let n=new Set(e.map(x)),r=[...t.projectionRelatedSessionHeads??[],...t.changedSessionHeads],i=new Map(r.map(e=>[_(e.reference.agentName,e.reference.sessionId),e])),a=new Map(e.map(e=>[x(e),e])),o=[],s=[];for(let e of t.projectionSessionOrder??[]){let t=_(e.agentName,e.sessionId),n=i.get(t),r=n?.session??a.get(t);r&&(o.push(n??{reference:e,session:r}),s.push(e),i.delete(t))}o.push(...i.values());let c=A(b(e,o,[...t.removedSessionRefs,...s]),t.from,t.to),l=new Set(c.map(x)),u=0,d=0;for(let e of l)n.has(e)||(u+=1);for(let e of n)l.has(e)||(d+=1);return{sessions:c,visibleAddedSessions:u,visibleRemovedSessions:d}}var N={id:`session-1`,slug:`claudecode/session-1`,title:`Fix flaky search index test`,directory:`/Users/dev/project`,project_identity:{kind:`git_remote`,key:`github.com/example/project`,displayName:`example/project`},time_created:17e11,time_updated:17000036e5,stats:{message_count:12,total_input_tokens:4200,total_output_tokens:1800,total_cost:.042,cost_source:`recorded`,total_tokens:6e3,total_cache_read_tokens:3e3,total_cache_create_tokens:500},model_usage:{"claude-5-sonnet":6e3},smart_tags:[`bugfix`],smart_tags_source_updated_at:17000036e5};N.id,N.id,N.id,N.id;export{t as _,y as a,o as c,m as d,k as f,p as g,c as h,O as i,d as l,e as m,f as n,u as o,a as p,M as r,s,n as t,_ as u,r as v};
|