codesesh 1.0.6 → 1.0.8
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 +1 -1
- package/dist/{chunk-COZSWVCH.js → chunk-AGUAXTKC.js} +2 -2
- package/dist/{chunk-XQDYKKRC.js → chunk-DHQPM5FF.js} +98 -14
- package/dist/chunk-DHQPM5FF.js.map +1 -0
- package/dist/{chunk-YZ6XCSVQ.js → chunk-KVTLNX7V.js} +3 -3
- package/dist/chunk-KVTLNX7V.js.map +1 -0
- package/dist/{chunk-A3MT6L6Z.js → chunk-L4G3LE7I.js} +25 -26
- package/dist/chunk-L4G3LE7I.js.map +1 -0
- package/dist/{chunk-L3DDWTYV.js → chunk-RBCCNCDO.js} +12 -10
- package/dist/chunk-RBCCNCDO.js.map +1 -0
- package/dist/{chunk-4QFNZCBR.js → chunk-V3HKVTIO.js} +3 -2
- package/dist/chunk-V3HKVTIO.js.map +1 -0
- package/dist/{chunk-4ND6AT6W.js → chunk-YLXHGL4S.js} +6 -6
- package/dist/chunk-YLXHGL4S.js.map +1 -0
- package/dist/{discovery-ADSQARBV.js → discovery-KEZQU6RL.js} +7 -5
- package/dist/index.js +42 -16
- package/dist/index.js.map +1 -1
- package/dist/project-identity-worker.js +4 -4
- package/dist/scan-refresh-worker.js +6 -6
- package/dist/search-index-worker.js +6 -6
- package/dist/session-detail-worker.js +6 -6
- package/dist/smart-tag-worker.js +3 -3
- package/dist/web/assets/CustomTimeWindowDialog-z5xtqkBF.js +1 -0
- package/dist/web/assets/DetailLanding-CpV0jLmT.js +1 -0
- package/dist/web/assets/DialogTitle-B8zPwJB8.js +1 -0
- package/dist/web/assets/InteractiveReceipt-Bsj37HtN.js +1 -0
- package/dist/web/assets/OverviewScreen-B9qZqEQA.js +1 -0
- package/dist/web/assets/PrismHighlighter-DWS6Nx_X.js +6 -0
- package/dist/web/assets/Projects-oY3KCgS4.js +1 -0
- package/dist/web/assets/SearchResultsPanel-BAManMmt.js +1 -0
- package/dist/web/assets/SessionDetail-KSgkmLV7.js +53 -0
- package/dist/web/assets/SmartTagChips-BMP9pPRw.js +1 -0
- package/dist/web/assets/api-CtZGdxlN.js +1 -0
- package/dist/web/assets/index-BSLHxV0w.css +1 -0
- package/dist/web/assets/index-DNw59Qsn.js +1423 -0
- package/dist/web/assets/jsx-runtime-D3jfb0Ew.js +1 -0
- package/dist/web/assets/panel-DcOuALYX.js +1 -0
- package/dist/web/assets/session-indexes-DKukxoe1.js +4 -0
- package/dist/web/assets/translate-CLoII3EO.js +2 -0
- package/dist/web/assets/utils-Dk_44zMo.js +1 -0
- package/dist/web/index.html +9 -8
- package/package.json +2 -2
- package/dist/chunk-4ND6AT6W.js.map +0 -1
- package/dist/chunk-4QFNZCBR.js.map +0 -1
- package/dist/chunk-A3MT6L6Z.js.map +0 -1
- package/dist/chunk-L3DDWTYV.js.map +0 -1
- package/dist/chunk-XQDYKKRC.js.map +0 -1
- package/dist/chunk-YZ6XCSVQ.js.map +0 -1
- package/dist/web/assets/CustomTimeWindowDialog-D2bx7uDv.js +0 -1
- package/dist/web/assets/InteractiveReceipt-BFpIdno8.js +0 -1
- package/dist/web/assets/OverviewScreen-D_KXfiJi.js +0 -1
- package/dist/web/assets/PrismHighlighter-BgVkYu_S.js +0 -6
- package/dist/web/assets/Projects-CN44UpuR.js +0 -1
- package/dist/web/assets/SearchResultsPanel-CWD01v-a.js +0 -1
- package/dist/web/assets/SessionDetail-D8taQ6Tl.js +0 -53
- package/dist/web/assets/api-B9lJtVbO.js +0 -1
- package/dist/web/assets/index-XpolWMY4.js +0 -1423
- package/dist/web/assets/index-xbEEMszv.css +0 -1
- package/dist/web/assets/jsx-runtime-B-hcVAMW.js +0 -1
- package/dist/web/assets/session-indexes-fib48ZKn.js +0 -4
- package/dist/web/assets/translate-Dmym1ZDl.js +0 -2
- package/dist/web/assets/utils-Bk66u8b3.js +0 -1
- /package/dist/{chunk-COZSWVCH.js.map → chunk-AGUAXTKC.js.map} +0 -0
- /package/dist/{discovery-ADSQARBV.js.map → discovery-KEZQU6RL.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,s as t}from"./translate-Dmym1ZDl.js";var n=250,r=2,i=class extends Error{status;constructor(e,t){super(e),this.status=t}};function a(e,t){t?.from!=null&&e.set(`from`,new Date(t.from).toISOString()),t?.to!=null&&e.set(`to`,new Date(t.to).toISOString())}function o(o){async function s(e,t){let n=await fetch(e,o.authorize(t));if(!n.ok)throw new i(`${t?.method??`GET`} ${e} failed: ${n.status} ${n.statusText}`,n.status);return n.json()}async function c(e){return s(`/api/config`,e)}async function l(){return s(`/api/status`)}async function u(e,t){let n=new URLSearchParams;return a(n,e),s(`/api/agents?${n}`,t)}async function d(e,t){let n=new URLSearchParams;return a(n,e),n.set(`limit`,t?.project?`1`:`100`),t?.cursor&&n.set(`cursor`,t.cursor),t?.project&&(n.set(`projectKind`,t.project.kind),n.set(`projectKey`,t.project.key)),s(`/api/projects?${n}`,t?.signal?{signal:t.signal}:void 0)}async function f(e,t,n){return(await d(e,{...n,project:t})).projects[0]??null}async function p(e={},t,o){let c=new URLSearchParams;e.agent&&c.set(`agent`,e.agent),e.projectKind&&c.set(`projectKind`,e.projectKind),e.projectKey&&c.set(`projectKey`,e.projectKey),a(c,e);let l=0;for(;;)try{let e=[],r;do{let i=new URLSearchParams(c);i.set(`limit`,String(n)),r&&i.set(`cursor`,r);let a=await s(`/api/sessions?${i}`,t);e.push(...a.sessions),r||o?.onFirstPage?.([...e]),r=a.nextCursor}while(r);return{sessions:e}}catch(e){if(!(e instanceof i)||e.status!==409||l>=r)throw e;l+=1}}async function m(n,r,i){let a=`/api/sessions${e({agentName:n,sessionId:r})}`,o=i?{signal:i.signal,...i.operationId?{headers:{[t]:i.operationId}}:{}}:void 0;return i?.messageCursor?s(`${a}?${new URLSearchParams({messageCursor:i.messageCursor})}`,o):s(a,o)}async function h(e,t,n){let r=new URLSearchParams;e?.days===0?r.set(`days`,`0`):e?.from==null?(e?.to!=null&&r.set(`to`,String(e.to)),e?.days!=null&&r.set(`days`,String(e.days))):a(r,e),t.project&&(r.set(`projectKind`,t.project.kind),r.set(`projectKey`,t.project.key)),t.agent&&r.set(`agent`,t.agent);let i=r.toString();return s(i?`/api/dashboard?${i}`:`/api/dashboard`,n)}async function g(e,t={},n){let r=new URLSearchParams;return r.set(`q`,e),t.agent&&r.set(`agent`,t.agent),t.projectKind&&r.set(`projectKind`,t.projectKind),t.projectKey&&r.set(`projectKey`,t.projectKey),t.tag&&r.set(`tag`,t.tag),t.tool&&r.set(`tool`,t.tool),t.fileKind&&r.set(`fileActivity`,t.fileKind),t.costMin!=null&&r.set(`costMin`,String(t.costMin)),t.costMax!=null&&r.set(`costMax`,String(t.costMax)),a(r,t),s(`/api/search?${r}`,n)}async function _(e){return s(`/api/bookmarks`,e)}async function v(e){return s(`/api/bookmarks`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({reference:e})})}async function y(e){return s(`/api/bookmarks/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}async function b(t){await s(`/api/bookmarks${e(t)}`,{method:`DELETE`})}async function x(t,n,r){await s(`/api/session-aliases${e({agentName:t,sessionId:n})}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({alias:r})})}async function S(t,n){await s(`/api/session-aliases${e({agentName:t,sessionId:n})}`,{method:`DELETE`})}return Object.freeze({fetchConfig:c,fetchScanStatus:l,fetchAgents:u,fetchProjects:d,fetchProject:f,fetchSessions:p,fetchSessionData:m,fetchDashboard:h,fetchSearchResults:g,fetchBookmarks:_,upsertBookmark:v,importBookmarks:y,deleteBookmark:b,upsertSessionAlias:x,deleteSessionAlias:S})}function s(e){return Object.freeze({logClientEvent(t,n={}){try{let r=JSON.stringify({event:t,data:n});if(!e.hasCredentials&&typeof navigator<`u`&&navigator.sendBeacon){let e=new Blob([r],{type:`application/json`});if(navigator.sendBeacon(`/api/logs`,e))return}fetch(`/api/logs`,e.authorize({method:`POST`,headers:{"Content-Type":`application/json`},body:r,keepalive:!0})).catch(()=>{})}catch{}}})}var c=`access_token`,l=`codesesh:remote-access-token`;function u(e,t){return Object.freeze({hasCredentials:e!==null,authorize(t={}){if(!e)return t;let n=new Headers(t.headers);return n.set(`Authorization`,`Bearer ${e}`),{...t,headers:n}},eventUrl(n){if(!e)return n;let r=new URL(n,t);return r.searchParams.set(c,e),`${r.pathname}${r.search}`}})}function d(e=typeof window>`u`?void 0:window){if(!e)return u(null,`http://localhost`);let t=new URL(e.location.href),n=t.searchParams.get(c);if(n){try{e.sessionStorage.setItem(l,n)}catch{}return t.searchParams.delete(c),e.history.replaceState(e.history.state,``,`${t.pathname}${t.search}${t.hash}`),u(n,e.location.origin)}let r=null;try{r=e.sessionStorage.getItem(l)}catch{}return u(r,e.location.origin)}var f=1e3,p=3e4,m=5e3;function h(e){let t=e*.2;return e+(Math.random()*2-1)*t}function g(e){return function(t,n,r,i){let a=!1,o,s,c=f,l=!1,u=!1,d,g=()=>{s!==void 0&&(clearTimeout(s),s=void 0)},_=()=>{u||(u=!0,i?.())},v=()=>{let i=new EventSource(e.eventUrl(`/api/events`));d=i,i.addEventListener(`sessions-updated`,e=>{try{t(JSON.parse(e.data))}catch(e){console.error(`Failed to parse session update event:`,e)}}),i.addEventListener(`scan-status`,e=>{if(n)try{n(JSON.parse(e.data))}catch(e){console.error(`Failed to parse scan status event:`,e)}}),i.onopen=()=>{g(),c=f;let e=u;u=!1,(l||e)&&r?.(),l=!0},i.onerror=()=>{if(i.readyState!==EventSource.CLOSED){s??=setTimeout(()=>{s=void 0,!a&&d===i&&_()},m);return}if(g(),i.close(),a)return;_();let e=h(c);c=Math.min(c*2,p),o=setTimeout(v,e)}};return v(),()=>{a=!0,o!==void 0&&clearTimeout(o),g(),d?.close()}}}var _=d(),{fetchConfig:v,fetchScanStatus:y,fetchAgents:b,fetchProjects:x,fetchProject:S,fetchSessions:C,fetchSessionData:w,fetchDashboard:T,fetchSearchResults:E,fetchBookmarks:D,upsertBookmark:O,importBookmarks:k,deleteBookmark:A,upsertSessionAlias:j,deleteSessionAlias:M}=o(_),{logClientEvent:N}=s(_),P=g(_);export{j as _,v as a,x as c,w as d,C as f,O as g,P as h,D as i,y as l,N as m,M as n,T as o,k as p,b as r,S as s,A as t,E as u,i as v};
|