@jean2/client 1.0.8 → 1.0.10
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/assets/SessionContent-BPrza9X5.js +9 -0
- package/dist/assets/{SessionMenuButton-BQgLoVBs.js → SessionMenuButton-B1uASsIZ.js} +3 -3
- package/dist/assets/_serverId-DfaxBHQQ.js +11 -0
- package/dist/assets/_sessionId-Ce-dKO7D.js +1 -0
- package/dist/assets/_sessionId-HyxD5THT.js +1 -0
- package/dist/assets/alert--ylHisOx.js +31 -0
- package/dist/assets/badge-D9JlXycT.js +1 -0
- package/dist/assets/http-namespace-CAzyfpbt.js +1 -0
- package/dist/assets/{index-ClGd9Hzj.js → index-DzlY5WuB.js} +3 -3
- package/dist/assets/index-pIWtxkTI.css +2 -0
- package/dist/assets/overview-GmLBhh8H.js +1 -0
- package/dist/assets/{popover-D3zF08_g.js → popover-B_1W6FO-.js} +1 -1
- package/dist/assets/switch-DXLDmxh6.js +1 -0
- package/dist/assets/workspace-B45MpkP1.js +1 -0
- package/dist/index.html +3 -3
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/SessionContent-D_iXMVdA.js +0 -9
- package/dist/assets/_serverId-DA_laFNU.js +0 -11
- package/dist/assets/_sessionId-BQ2Y70Im.js +0 -1
- package/dist/assets/_sessionId-cGj1IHAP.js +0 -1
- package/dist/assets/alert-BsV_fzAT.js +0 -31
- package/dist/assets/badge-rLirH4Qz.js +0 -1
- package/dist/assets/http-namespace-CqSEyQlV.js +0 -1
- package/dist/assets/index-BsdM9bLP.css +0 -2
- package/dist/assets/overview-CXMkI2gp.js +0 -1
- package/dist/assets/switch-CbPMcC7k.js +0 -1
- package/dist/assets/workspace-DAso8-D3.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./jsx-runtime-CoWo_Ex4.js";import{M as i}from"./serverDataStore-CvTJtC_B.js";import{$ as a,Ht as o,J as s,Q as c,Rt as l,Ut as u,X as d,Y as f,Yt as p,_t as m,a as h,ft as g,n as _,nt as v,o as y,q as b,r as x,t as S,xt as C,yt as w,zt as T}from"./badge-D9JlXycT.js";import{n as E}from"./Match-BqRw2YHq.js";import{n as D,r as ee,t as O}from"./pin-hmPULAEn.js";import{a as k,c as te,d as A,i as j,l as M,n as N,o as P,r as F,s as ne,t as I,u as re}from"./SessionMenuButton-B1uASsIZ.js";import{F as ie,N as ae,c as L,d as R,f as oe,h as z,l as se,m as B,u as V,v as H}from"./switch-DXLDmxh6.js";import{a as ce,c as le,d as ue,i as de,l as U,o as fe,p as pe,r as me,s as he,t as ge,u as _e}from"./popover-B_1W6FO-.js";import{B as ve,H as W,c as ye,u as be,z as G}from"./dialog-CpPDW758.js";import{t as K}from"./star-BapJtpKo.js";import{t as xe}from"./confirmation-dialog-CWhG9whO.js";var Se=e(),q=t(n(),1);function J(e){let t=(0,Se.c)(20),{sdkClient:n,workspaceId:r,connected:i}=e,a=C(Y),o;t[0]===r?o=t[1]:(o=g.sessions.byWorkspace(r??``),t[0]=r,t[1]=o);let s;t[2]!==n||t[3]!==r?(s=()=>n.http.sessions.listByWorkspace({workspaceId:r}),t[2]=n,t[3]=r,t[4]=s):s=t[4];let c=!!n&&i&&!!r,l;t[5]!==o||t[6]!==s||t[7]!==c?(l={queryKey:o,queryFn:s,enabled:c,staleTime:1e4},t[5]=o,t[6]=s,t[7]=c,t[8]=l):l=t[8];let{isLoading:u,error:d,data:f}=p(l),m,h;t[9]!==a||t[10]!==r?(m=()=>{r||a([])},h=[r,a],t[9]=a,t[10]=r,t[11]=m,t[12]=h):(m=t[11],h=t[12]),(0,q.useEffect)(m,h);let _,v;t[13]!==f||t[14]!==a?(_=()=>{f?.sessions&&a(f.sessions)},v=[f,a],t[13]=f,t[14]=a,t[15]=_,t[16]=v):(_=t[15],v=t[16]),(0,q.useEffect)(_,v);let y=d?.message??null,b;return t[17]!==u||t[18]!==y?(b={isLoading:u,error:y},t[17]=u,t[18]=y,t[19]=b):b=t[19],b}function Y(e){return e.setSessions}var X=r();function Z(e){let t=(0,Se.c)(76),{workspaces:n,activeWorkspace:r,onSelectWorkspace:i,onCreateVirtualWorkspace:o,onCreatePhysicalWorkspace:s,isWorkspaceFavorited:l,onToggleFavorite:f,onDeleteWorkspace:p,onRenameWorkspace:m,onUpdateWorkspacePaths:h,sdkClient:g}=e,[_,y]=(0,q.useState)(!1),[b,x]=(0,q.useState)(!1),[S,C]=(0,q.useState)(null),[w,E]=(0,q.useState)(null),[D,ee]=(0,q.useState)(null),[O,te]=(0,q.useState)(``),j=(0,q.useRef)(null),M,N;t[0]===D?(M=t[1],N=t[2]):(M=()=>{D&&j.current&&(j.current.focus(),j.current.select())},N=[D],t[0]=D,t[1]=M,t[2]=N),(0,q.useEffect)(M,N);let F;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{te(e.name),ee(e.id)},t[3]=F):F=t[3];let ne=F,I;t[4]!==m||t[5]!==O||t[6]!==D?(I=()=>{let e=O.trim();e&&D&&m(D,e),ee(null)},t[4]=m,t[5]=O,t[6]=D,t[7]=I):I=t[7];let L=I,R;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{ee(null)},t[8]=R):R=t[8];let oe=R,z;t[9]===r?.isVirtual?z=t[10]:(z=r?.isVirtual?(0,X.jsx)(A,{className:`size-4 flex-shrink-0 text-muted-foreground`}):(0,X.jsx)(T,{className:`size-4 flex-shrink-0 text-muted-foreground`}),t[9]=r?.isVirtual,t[10]=z);let se=r?.name||`Select workspace`,B;t[11]===se?B=t[12]:(B=(0,X.jsx)(`span`,{className:`truncate`,children:se}),t[11]=se,t[12]=B);let V;t[13]!==z||t[14]!==B?(V=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 overflow-hidden`,children:[z,B]}),t[13]=z,t[14]=B,t[15]=V):V=t[15];let H;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,X.jsx)(pe,{className:`ml-auto size-4 shrink-0 opacity-50`}),t[16]=H):H=t[16];let G;t[17]!==_||t[18]!==V?(G=(0,X.jsx)(de,{asChild:!0,children:(0,X.jsxs)(ye,{variant:`outline`,role:`combobox`,"aria-expanded":_,"aria-label":`Select workspace`,className:`w-full justify-between h-9`,children:[V,H]})}),t[17]=_,t[18]=V,t[19]=G):G=t[19];let J;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,X.jsx)(le,{placeholder:`Search workspace...`}),t[20]=J):J=t[20];let Y;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,X.jsx)(fe,{children:`No workspace found.`}),t[21]=Y):Y=t[21];let Z;t[22]!==r?.id||t[23]!==L||t[24]!==l||t[25]!==i||t[26]!==f||t[27]!==O||t[28]!==D||t[29]!==n?(Z=n.map(e=>(0,X.jsxs)(U,{showCheck:!1,onSelect:()=>{D!==e.id&&(i(e),y(!1))},children:[(0,X.jsx)(`div`,{className:`flex-1 min-w-0 flex items-center gap-2`,children:D===e.id?(0,X.jsx)(`input`,{ref:j,type:`text`,value:O,onChange:e=>te(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),L()):e.key===`Escape`?(e.preventDefault(),oe()):[`ArrowUp`,`ArrowDown`].includes(e.key)&&e.stopPropagation()},onBlur:L,onClick:Q,className:`flex-1 min-w-0 h-6 px-1 text-sm bg-background border border-input rounded focus:outline-none focus:ring-2 focus:ring-ring`}):(0,X.jsxs)(X.Fragment,{children:[e.isVirtual?(0,X.jsx)(A,{className:`size-4 flex-shrink-0 text-muted-foreground`}):(0,X.jsx)(T,{className:`size-4 flex-shrink-0 text-muted-foreground`}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})}),(0,X.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[(0,X.jsx)(`button`,{className:`p-1 rounded hover:bg-secondary transition-colors`,onClick:t=>{t.stopPropagation(),f(e.id,e.name)},title:l(e.id)?`Remove from favorites`:`Add to favorites`,children:l(e.id)?(0,X.jsx)(K,{className:`size-4 fill-primary text-primary`}):(0,X.jsx)(K,{className:`size-4 text-muted-foreground`})}),(0,X.jsx)(u,{className:be(`size-4`,r?.id===e.id?`opacity-100`:`opacity-0`)}),(0,X.jsxs)(d,{children:[(0,X.jsx)(v,{asChild:!0,children:(0,X.jsxs)(`button`,{className:`p-1 rounded hover:bg-secondary transition-colors`,onClick:Ce,children:[(0,X.jsx)(ie,{className:`size-4`}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Workspace actions`})]})}),(0,X.jsxs)(c,{align:`end`,className:`min-w-48`,children:[(0,X.jsxs)(a,{onClick:t=>{t.stopPropagation(),ne(e)},children:[(0,X.jsx)(ae,{className:`size-4`}),`Rename`]}),(0,X.jsxs)(a,{onClick:t=>{t.stopPropagation(),E(e),y(!1)},children:[(0,X.jsx)(re,{className:`size-4`}),`Additional paths`]}),(0,X.jsxs)(a,{onClick:t=>{t.stopPropagation(),C(e)},className:`text-destructive focus:text-destructive`,children:[(0,X.jsx)(ve,{className:`size-4`}),`Delete`]})]})]})]})]},e.id)),t[22]=r?.id,t[23]=L,t[24]=l,t[25]=i,t[26]=f,t[27]=O,t[28]=D,t[29]=n,t[30]=Z):Z=t[30];let $;t[31]===Z?$=t[32]:($=(0,X.jsx)(he,{heading:`Workspaces`,children:Z}),t[31]=Z,t[32]=$);let we;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,X.jsx)(ue,{}),t[33]=we):we=t[33];let Te;t[34]===o?Te=t[35]:(Te=()=>{o(),y(!1)},t[34]=o,t[35]=Te);let Ee;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,X.jsx)(W,{className:`size-4`,"data-icon":`inline-start`}),t[36]=Ee):Ee=t[36];let De;t[37]===Te?De=t[38]:(De=(0,X.jsxs)(U,{onSelect:Te,children:[Ee,`Create virtual workspace`]}),t[37]=Te,t[38]=De);let Oe;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,X.jsxs)(U,{onSelect:()=>{y(!1),x(!0)},children:[(0,X.jsx)(T,{className:`size-4`,"data-icon":`inline-start`}),`Add existing folder`]}),t[39]=Oe):Oe=t[39];let ke;t[40]===De?ke=t[41]:(ke=(0,X.jsxs)(he,{children:[De,Oe]}),t[40]=De,t[41]=ke);let Ae;t[42]!==$||t[43]!==ke?(Ae=(0,X.jsx)(me,{className:`w-[320px] p-0 max-h-[80vh]`,children:(0,X.jsxs)(ce,{children:[J,(0,X.jsxs)(_e,{className:`max-h-[50vh] overflow-y-auto`,children:[Y,$,we,ke]})]})}),t[42]=$,t[43]=ke,t[44]=Ae):Ae=t[44];let je;t[45]!==_||t[46]!==G||t[47]!==Ae?(je=(0,X.jsxs)(ge,{open:_,onOpenChange:y,children:[G,Ae]}),t[45]=_,t[46]=G,t[47]=Ae,t[48]=je):je=t[48];let Me;t[49]===s?Me=t[50]:(Me=e=>{s(e),x(!1)},t[49]=s,t[50]=Me);let Ne;t[51]!==g||t[52]!==b||t[53]!==Me?(Ne=(0,X.jsx)(P,{open:b,onOpenChange:x,onSelect:Me,title:`Select Workspace Folder`,sdkClient:g}),t[51]=g,t[52]=b,t[53]=Me,t[54]=Ne):Ne=t[54];let Pe=!!w,Fe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=e=>{e||E(null)},t[55]=Fe):Fe=t[55];let Ie;t[56]===w?Ie=t[57]:(Ie=w??{id:``,name:``,path:``,isVirtual:!1,additionalPaths:[],settings:{},createdAt:``,updatedAt:``},t[56]=w,t[57]=Ie);let Le;t[58]!==h||t[59]!==g||t[60]!==Pe||t[61]!==Ie?(Le=(0,X.jsx)(k,{open:Pe,onOpenChange:Fe,workspace:Ie,onSave:h,sdkClient:g}),t[58]=h,t[59]=g,t[60]=Pe,t[61]=Ie,t[62]=Le):Le=t[62];let Re=S!==null,ze;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(ze=e=>!e&&C(null),t[63]=ze):ze=t[63];let Be=S?`Are you sure you want to delete "${S.name}"? This will permanently remove the workspace and all associated Jean data, including sessions, messages, and temporary files. The actual files in "${S.name}" on disk will not be deleted.`:``,Ve;t[64]!==p||t[65]!==S?(Ve=()=>{S&&(p(S.id),C(null))},t[64]=p,t[65]=S,t[66]=Ve):Ve=t[66];let He;t[67]!==Re||t[68]!==Be||t[69]!==Ve?(He=(0,X.jsx)(xe,{open:Re,onOpenChange:ze,title:`Delete Workspace`,description:Be,confirmLabel:`Delete`,variant:`destructive`,onConfirm:Ve}),t[67]=Re,t[68]=Be,t[69]=Ve,t[70]=He):He=t[70];let Ue;return t[71]!==je||t[72]!==Ne||t[73]!==Le||t[74]!==He?(Ue=(0,X.jsxs)(X.Fragment,{children:[je,Ne,Le,He]}),t[71]=je,t[72]=Ne,t[73]=Le,t[74]=He,t[75]=Ue):Ue=t[75],Ue}function Ce(e){return e.stopPropagation()}function Q(e){return e.stopPropagation()}function $(e){let t=(0,Se.c)(71),{activeSessions:n,archivedSessions:r,childrenMap:i,sessionDerivedValues:l,currentSessionId:u,onResumeSession:p,onCloseSession:m,onReopenSession:h,onDeleteSession:g,onRenameSession:_,onRegenerateSessionTitle:y,onBulkCloseSessions:x,onBulkDeleteSessions:C,tagGroups:w,orderedTagNames:T,allWorkspaceTags:E,onAddTag:D,onRemoveTag:O}=e,[k,A]=(0,q.useState)(!1),j;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(j=new Set,t[0]=j):j=t[0];let[N,P]=(0,q.useState)(j),[F,ne]=(0,q.useState)(!1),re;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>{P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[1]=re):re=t[1];let ae=re,R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{A(Oe),P(new Set)},t[2]=R):R=t[2];let z=R,B;t[3]===n?B=t[4]:(B=()=>{P(new Set(n.map(De)))},t[3]=n,t[4]=B);let H=B,ce;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(ce=()=>{P(new Set)},t[5]=ce):ce=t[5];let le=ce,ue;t[6]!==x||t[7]!==N?(ue=()=>{N.size>0&&(x(N),P(new Set),A(!1))},t[6]=x,t[7]=N,t[8]=ue):ue=t[8];let de=ue,U;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(U=()=>{A(!1),P(new Set)},t[9]=U):U=t[9];let fe=U,pe;t[10]!==r||t[11]!==C?(pe=()=>{let e=new Set(r.map(Ee));e.size>0&&C(e),ne(!1)},t[10]=r,t[11]=C,t[12]=pe):pe=t[12];let me=pe,he,ge;t[13]===k?(he=t[14],ge=t[15]):(ge=()=>{if(!k)return;let e=e=>{e.key===`Escape`&&fe()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},he=[k,fe],t[13]=k,t[14]=he,t[15]=ge),(0,q.useEffect)(ge,he);let _e;t[16]!==E||t[17]!==i||t[18]!==u||t[19]!==D||t[20]!==m||t[21]!==g||t[22]!==y||t[23]!==O||t[24]!==_||t[25]!==h||t[26]!==p||t[27]!==N||t[28]!==k||t[29]!==l?(_e=e=>(0,X.jsx)(I,{session:e,childrenMap:i,sessionDerivedValues:l,isActive:u===e.id,currentSessionId:u,onResumeSession:p,onCloseSession:m,onReopenSession:h,onDeleteSession:g,onRename:_,onRegenerateTitle:y,selectionMode:k,selected:N.has(e.id),onToggleSelect:ae,allWorkspaceTags:E,onAddTag:D,onRemoveTag:O},e.id),t[16]=E,t[17]=i,t[18]=u,t[19]=D,t[20]=m,t[21]=g,t[22]=y,t[23]=O,t[24]=_,t[25]=h,t[26]=p,t[27]=N,t[28]=k,t[29]=l,t[30]=_e):_e=t[30];let W=_e,be=T.length>0,K;if(t[31]!==n||t[32]!==be||t[33]!==T||t[34]!==W||t[35]!==H||t[36]!==N.size||t[37]!==k||t[38]!==w){let e=w.get(`__ungrouped__`)??[];K=(0,X.jsx)(b,{defaultOpen:!0,className:`group/collapsible`,children:(0,X.jsxs)(L,{children:[(0,X.jsx)(V,{asChild:!0,children:(0,X.jsx)(f,{asChild:!0,children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(o,{className:`size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`}),`Active`]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[k&&(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:N.size>0?(0,X.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),N.size===n.length?le():H()},className:`hover:underline cursor-pointer`,children:N.size===n.length?`Deselect all`:`Select all`}):(0,X.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),H()},className:`hover:underline cursor-pointer`,children:`Select all`})}),(0,X.jsx)(S,{variant:`secondary`,children:n.length}),(0,X.jsxs)(d,{children:[(0,X.jsx)(v,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,onClick:Te,className:`p-1 rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors`,title:`Session actions`,children:(0,X.jsx)(ie,{className:`size-4`})})}),(0,X.jsx)(c,{align:`end`,className:`min-w-48`,children:k?(0,X.jsxs)(a,{onClick:e=>{e.stopPropagation(),fe()},children:[(0,X.jsx)(G,{className:`size-4`}),`Cancel selection`]}):(0,X.jsxs)(a,{onClick:e=>{e.stopPropagation(),z()},children:[(0,X.jsx)(M,{className:`size-4`}),`Select to archive`]})})]})]})]})})}),(0,X.jsx)(s,{children:(0,X.jsx)(se,{children:be?(0,X.jsxs)(X.Fragment,{children:[T.map(e=>{let t=w.get(e)??[];return(0,X.jsxs)(b,{defaultOpen:!0,className:`group/tag-collapsible`,children:[(0,X.jsxs)(`div`,{className:`flex items-center px-2 py-1 text-xs font-medium text-muted-foreground`,children:[(0,X.jsx)(f,{asChild:!0,children:(0,X.jsxs)(`button`,{className:`flex items-center gap-1 hover:text-foreground transition-colors`,children:[(0,X.jsx)(o,{className:`size-3 transition-transform group-data-[state=open]/tag-collapsible:rotate-90`}),(0,X.jsx)(te,{className:`size-3`}),e]})}),(0,X.jsx)(S,{variant:`secondary`,className:`ml-auto text-[10px]`,children:t.length})]}),(0,X.jsx)(s,{children:(0,X.jsx)(oe,{children:t.map(W)})})]},e)}),e.length>0&&(0,X.jsx)(oe,{children:e.map(W)})]}):(0,X.jsx)(oe,{children:n.map(W)})})})]})}),t[31]=n,t[32]=be,t[33]=T,t[34]=W,t[35]=H,t[36]=N.size,t[37]=k,t[38]=w,t[39]=K}else K=t[39];let J;t[40]!==E||t[41]!==r||t[42]!==i||t[43]!==u||t[44]!==D||t[45]!==m||t[46]!==g||t[47]!==y||t[48]!==O||t[49]!==_||t[50]!==h||t[51]!==p||t[52]!==l?(J=r.length>0&&(0,X.jsx)(b,{className:`group/collapsible`,children:(0,X.jsxs)(L,{children:[(0,X.jsx)(V,{asChild:!0,children:(0,X.jsx)(f,{asChild:!0,children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(o,{className:`size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`}),`Archived`]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(S,{variant:`secondary`,children:r.length}),(0,X.jsxs)(d,{children:[(0,X.jsx)(v,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,onClick:we,className:`p-1 rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors`,title:`Archived actions`,children:(0,X.jsx)(ie,{className:`size-4`})})}),(0,X.jsx)(c,{align:`end`,className:`min-w-48`,children:(0,X.jsxs)(a,{onClick:e=>{e.stopPropagation(),ne(!0)},className:`text-destructive focus:text-destructive`,children:[(0,X.jsx)(ve,{className:`size-4`}),`Delete all`]})})]})]})]})})}),(0,X.jsx)(s,{children:(0,X.jsx)(se,{children:(0,X.jsx)(oe,{children:r.map(e=>(0,X.jsx)(I,{session:e,childrenMap:i,sessionDerivedValues:l,isActive:u===e.id,currentSessionId:u,onResumeSession:p,onCloseSession:m,onReopenSession:h,onDeleteSession:g,onRename:_,onRegenerateTitle:y,allWorkspaceTags:E,onAddTag:D,onRemoveTag:O},e.id))})})})]})}),t[40]=E,t[41]=r,t[42]=i,t[43]=u,t[44]=D,t[45]=m,t[46]=g,t[47]=y,t[48]=O,t[49]=_,t[50]=h,t[51]=p,t[52]=l,t[53]=J):J=t[53];let Y;t[54]!==n.length||t[55]!==r.length?(Y=n.length===0&&r.length===0&&(0,X.jsxs)(`div`,{className:`p-4 text-center text-sm text-muted-foreground`,children:[`No sessions yet.`,(0,X.jsx)(`br`,{}),`Start a new chat to begin.`]}),t[54]=n.length,t[55]=r.length,t[56]=Y):Y=t[56];let Z;t[57]!==de||t[58]!==N.size||t[59]!==k?(Z=k&&N.size>0&&(0,X.jsxs)(`div`,{className:`sticky bottom-0 bg-sidebar border-t px-2 py-1.5 flex items-center justify-between gap-2`,children:[(0,X.jsxs)(`span`,{className:`text-xs text-muted-foreground truncate min-w-0`,children:[N.size,` selected`]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,X.jsx)(ye,{variant:`outline`,size:`icon`,onClick:de,title:`Archive`,className:`size-7`,children:(0,X.jsx)(ee,{className:`size-4`})}),(0,X.jsx)(ye,{variant:`ghost`,size:`icon`,onClick:fe,title:`Cancel`,className:`size-7`,children:(0,X.jsx)(G,{className:`size-4`})})]})]}),t[57]=de,t[58]=N.size,t[59]=k,t[60]=Z):Z=t[60];let Ce=`This will permanently delete ${r.length} archived session${r.length===1?``:`s`}. This action cannot be undone.`,Q;t[61]!==F||t[62]!==me||t[63]!==Ce?(Q=(0,X.jsx)(xe,{open:F,onOpenChange:ne,title:`Delete all archived sessions?`,description:Ce,confirmLabel:`Delete all`,variant:`destructive`,onConfirm:me}),t[61]=F,t[62]=me,t[63]=Ce,t[64]=Q):Q=t[64];let $;return t[65]!==K||t[66]!==J||t[67]!==Y||t[68]!==Z||t[69]!==Q?($=(0,X.jsxs)(X.Fragment,{children:[K,J,Y,Z,Q]}),t[65]=K,t[66]=J,t[67]=Y,t[68]=Z,t[69]=Q,t[70]=$):$=t[70],$}function we(e){return e.stopPropagation()}function Te(e){return e.stopPropagation()}function Ee(e){return e.id}function De(e){return e.id}function Oe(e){return!e}function ke(e){let t=Date.now()-e,n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24);return a>7?new Date(e).toLocaleDateString():a>0?`${a}d ago`:i>0?`${i}h ago`:r>0?`${r}m ago`:`just now`}function Ae(e){let t=(0,Se.c)(26),{pin:n,isCurrentSession:r,onNavigate:i,onUnpin:a}=e,o=r&&`bg-sidebar-accent/60`,s;t[0]===o?s=t[1]:(s=be(`group flex min-w-0 max-w-full flex-col gap-1 rounded-md p-2 cursor-pointer overflow-hidden`,`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,`transition-colors`,o),t[0]=o,t[1]=s);let c=n.sessionTitle||`Untitled session`,l;t[2]===c?l=t[3]:(l=(0,X.jsx)(`span`,{className:`text-xs font-medium text-sidebar-foreground/80 truncate`,children:c}),t[2]=c,t[3]=l);let u;t[4]===n.preview?u=t[5]:(u=(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground line-clamp-2 break-words [overflow-wrap:anywhere]`,children:n.preview}),t[4]=n.preview,t[5]=u);let d;t[6]===n.createdAt?d=t[7]:(d=ke(n.createdAt),t[6]=n.createdAt,t[7]=d);let f;t[8]===d?f=t[9]:(f=(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:d}),t[8]=d,t[9]=f);let p;t[10]!==l||t[11]!==u||t[12]!==f?(p=(0,X.jsxs)(`div`,{className:`flex flex-col gap-0.5 min-w-0 flex-1`,children:[l,u,f]}),t[10]=l,t[11]=u,t[12]=f,t[13]=p):p=t[13];let m;t[14]===a?m=t[15]:(m=e=>{e.stopPropagation(),a()},t[14]=a,t[15]=m);let h;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsx)(D,{className:`size-3`}),t[16]=h):h=t[16];let g;t[17]===m?g=t[18]:(g=(0,X.jsx)(ye,{variant:`ghost`,size:`icon`,onClick:m,className:`size-6 shrink-0 text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity`,title:`Unpin message`,children:h}),t[17]=m,t[18]=g);let _;t[19]!==g||t[20]!==p?(_=(0,X.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-1`,children:[p,g]}),t[19]=g,t[20]=p,t[21]=_):_=t[21];let v;return t[22]!==i||t[23]!==_||t[24]!==s?(v=(0,X.jsx)(`div`,{className:s,onClick:i,children:_}),t[22]=i,t[23]=_,t[24]=s,t[25]=v):v=t[25],v}function je(e){let t=(0,Se.c)(22),{sdkClient:n,workspaceId:r,currentSessionId:i,onNavigateToPinnedMessage:a}=e,[c,u]=(0,q.useState)(!0),{data:d,isLoading:p}=h(n,r),m=y(n,r);if(p){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,X.jsx)(l,{className:`size-4 animate-spin text-muted-foreground`})}),t[0]=e):e=t[0],e}if(!d||d.length===0)return null;let g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(H,{}),t[1]=g):g=t[1];let _;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,X.jsx)(o,{className:`size-3 shrink-0 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`}),(0,X.jsx)(O,{className:`size-3 shrink-0`}),(0,X.jsx)(`span`,{className:`truncate`,children:`Pinned`})]}),t[2]=_):_=t[2];let v;t[3]===d.length?v=t[4]:(v=(0,X.jsx)(V,{asChild:!0,children:(0,X.jsxs)(f,{className:`flex min-w-0 cursor-pointer items-center justify-between gap-2`,children:[_,(0,X.jsx)(S,{variant:`secondary`,className:`shrink-0`,children:d.length})]})}),t[3]=d.length,t[4]=v);let x;if(t[5]!==i||t[6]!==a||t[7]!==d||t[8]!==m){let e;t[10]!==i||t[11]!==a||t[12]!==m?(e=e=>(0,X.jsx)(Ae,{pin:e,isCurrentSession:e.sessionId===i,onNavigate:()=>a(e.sessionId,e.messageId),onUnpin:()=>m.mutate({messageId:e.messageId})},e.id),t[10]=i,t[11]=a,t[12]=m,t[13]=e):e=t[13],x=d.map(e),t[5]=i,t[6]=a,t[7]=d,t[8]=m,t[9]=x}else x=t[9];let C;t[14]===x?C=t[15]:(C=(0,X.jsx)(s,{children:(0,X.jsx)(se,{className:`min-w-0 overflow-hidden`,children:(0,X.jsx)(`div`,{className:`flex min-w-0 max-w-full flex-col gap-0.5 overflow-hidden`,children:x})})}),t[14]=x,t[15]=C);let w;t[16]!==v||t[17]!==C?(w=(0,X.jsxs)(L,{className:`min-w-0 overflow-hidden`,children:[v,C]}),t[16]=v,t[17]=C,t[18]=w):w=t[18];let T;return t[19]!==c||t[20]!==w?(T=(0,X.jsxs)(X.Fragment,{children:[g,(0,X.jsx)(b,{open:c,onOpenChange:u,className:`group/collapsible min-w-0`,children:w})]}),t[19]=c,t[20]=w,t[21]=T):T=t[21],T}function Me(){let e=m(),t=N(),{sidebarRef:n,chatInputRef:r,terminalPanelRef:a}=w(),{sdkClient:o,primaryPreconfigs:s,createSession:c,resumeSession:l,closeSession:u,reopenSession:d,permanentlyDeleteSession:f,handleRenameSession:p,regenerateSessionTitle:h,selectWorkspace:g,handleCreateVirtualWorkspace:v,handleCreatePhysicalWorkspace:y,deleteWorkspace:b,renameWorkspace:S,updateWorkspacePaths:T,updateWorkspaceSettings:D}=e;J({sdkClient:o,workspaceId:t.activeWorkspace?.id??null,connected:t.connected});let ee=t.activeSessions,O=t.archivedSessions,{data:k}=x(o,t.activeWorkspace?.id??null),te=k?.tags??[],A=_(),M=C(e=>e.updateSession),P=(0,q.useCallback)(async(e,n)=>{if(!o)return;let r=[n],{session:i}=await o.http.sessions.update(e,{tags:r});M(i),t.activeWorkspace?.id&&A(t.activeWorkspace.id)},[o,t.activeWorkspace?.id,A,M]),I=(0,q.useCallback)(async(e,n)=>{if(!o)return;let{session:r}=await o.http.sessions.update(e,{tags:[]});M(r),t.activeWorkspace?.id&&A(t.activeWorkspace.id)},[o,t.activeWorkspace?.id,A,M]),re=(0,X.jsxs)(R,{children:[i(`multiView`)&&(0,X.jsx)(`div`,{className:`p-2 space-y-2`,children:(0,X.jsx)(Z,{workspaces:t.workspaces,activeWorkspace:t.activeWorkspace,onSelectWorkspace:g,onCreateVirtualWorkspace:v,onCreatePhysicalWorkspace:y,isWorkspaceFavorited:t.isWorkspaceFavorited,onToggleFavorite:t.handleToggleWorkspaceFavorite,onDeleteWorkspace:b,onRenameWorkspace:S,onUpdateWorkspacePaths:T,sdkClient:o})}),(0,X.jsx)(oe,{children:(0,X.jsx)(z,{children:(0,X.jsxs)(B,{onClick:()=>c(s[0]?.id),disabled:!t.connected,className:`w-full`,children:[(0,X.jsx)(W,{className:`size-4`,"data-icon":`inline-start`}),(0,X.jsx)(`span`,{children:`New Chat`})]})})})]}),ie=(0,q.useCallback)(e=>{e.forEach(e=>u(e))},[u]),ae=(0,q.useCallback)(e=>{e.forEach(e=>f(e))},[f]),L=(0,X.jsx)($,{activeSessions:ee,archivedSessions:O,childrenMap:t.childrenMap,sessionDerivedValues:t.sessionDerivedValues,currentSessionId:t.currentSessionId,onResumeSession:l,onCloseSession:u,onReopenSession:d,onDeleteSession:f,onRenameSession:p,onRegenerateSessionTitle:h,onBulkCloseSessions:ie,onBulkDeleteSessions:ae,tagGroups:t.tagGroups,orderedTagNames:t.orderedTagNames,allWorkspaceTags:te,onAddTag:P,onRemoveTag:I});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(ne,{ref:n,header:re,currentSessionId:t.currentSessionId,onEscape:()=>{t.currentSessionId&&r.current?.focus()},children:[L,t.activeWorkspace&&(0,X.jsx)(je,{sdkClient:o,workspaceId:t.activeWorkspace.id,currentSessionId:t.currentSessionId,onNavigateToPinnedMessage:(e,t)=>{l(e,{targetMessageId:t})}})]}),(0,X.jsx)(`main`,{className:i(`multiView`)?`flex-1 flex flex-col overflow-hidden min-h-0 p-2`:`flex-1 flex flex-col overflow-hidden min-h-0`,style:i(`multiView`)?{paddingTop:`0.5rem`,paddingBottom:`0.5rem`}:void 0,children:(0,X.jsxs)(`div`,{className:i(`multiView`)?`flex flex-1 flex-col overflow-hidden min-h-0 rounded-xl bg-background shadow-sm ring-1 ring-border`:`flex flex-1 flex-col overflow-hidden min-h-0 bg-background`,children:[(0,X.jsx)(j,{onUpdateWorkspacePaths:T,onUpdateWorkspaceSettings:D,sdkClient:o}),(0,X.jsx)(E,{}),(0,X.jsx)(F,{sdkClient:o,terminalPanelRef:a})]})})]})}var Ne=Me;export{Ne as component};
|
package/dist/index.html
CHANGED
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
root.classList.add(mode, scheme);
|
|
40
40
|
})();
|
|
41
41
|
</script>
|
|
42
|
-
<script type="module" crossorigin src="/assets/index-
|
|
42
|
+
<script type="module" crossorigin src="/assets/index-DzlY5WuB.js"></script>
|
|
43
43
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-CoWo_Ex4.js">
|
|
44
44
|
<link rel="modulepreload" crossorigin href="/assets/serverDataStore-CvTJtC_B.js">
|
|
45
45
|
<link rel="modulepreload" crossorigin href="/assets/useRouter-D46Vvtt-.js">
|
|
46
46
|
<link rel="modulepreload" crossorigin href="/assets/ServerContext-BIEwENov.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="/assets/Match-BqRw2YHq.js">
|
|
48
|
-
<link rel="modulepreload" crossorigin href="/assets/http-namespace-
|
|
48
|
+
<link rel="modulepreload" crossorigin href="/assets/http-namespace-CAzyfpbt.js">
|
|
49
49
|
<link rel="modulepreload" crossorigin href="/assets/useNavigate-B6IY_tUo.js">
|
|
50
50
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-lAXwbrYv.js">
|
|
51
51
|
<link rel="modulepreload" crossorigin href="/assets/ThemeProvider-rIKaOoRR.js">
|
|
52
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
52
|
+
<link rel="stylesheet" crossorigin href="/assets/index-pIWtxkTI.css">
|
|
53
53
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
54
54
|
<body>
|
|
55
55
|
<div id="root"></div>
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s}));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let t={};const o=s=>i(s,r),u={module:{uri:r},exports:t,require:o};e[r]=Promise.all(n.map(s=>u[s]||o(s))).then(s=>(l(...s),t))}}define(["./workbox-6829fd8d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"
|
|
1
|
+
if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s}));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let t={};const o=s=>i(s,r),u={module:{uri:r},exports:t,require:o};e[r]=Promise.all(n.map(s=>u[s]||o(s))).then(s=>(l(...s),t))}}define(["./workbox-6829fd8d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"ebddfff5e3ad9df9e6d3aee5b6f6ecd0"},{url:"icon-512.png",revision:"858fd3102a679d90bf7fb6e0c852ea9a"},{url:"icon-192.png",revision:"7a732a19b758b4bb336850bf9f225034"},{url:"favicon.ico",revision:"4389bb108ec3c91f717815a4e519e8ac"},{url:"apple-touch-icon.png",revision:"a2c89afb6685520dfc7e6eb307529d2a"},{url:"assets/workspace-C8ZkuG8q.js",revision:null},{url:"assets/workspace-B45MpkP1.js",revision:null},{url:"assets/useRouter-D46Vvtt-.js",revision:null},{url:"assets/useNavigate-B6IY_tUo.js",revision:null},{url:"assets/triangle-alert-CZgUk-9i.js",revision:null},{url:"assets/switch-DXLDmxh6.js",revision:null},{url:"assets/star-BapJtpKo.js",revision:null},{url:"assets/serverDataStore-CvTJtC_B.js",revision:null},{url:"assets/routes-B1Je9R4P.js",revision:null},{url:"assets/refresh-cw-xwfazwVj.js",revision:null},{url:"assets/react-dom-lAXwbrYv.js",revision:null},{url:"assets/popover-B_1W6FO-.js",revision:null},{url:"assets/pin-hmPULAEn.js",revision:null},{url:"assets/overview-GmLBhh8H.js",revision:null},{url:"assets/overview-CpOJtv4w.js",revision:null},{url:"assets/jsx-runtime-CoWo_Ex4.js",revision:null},{url:"assets/index-pIWtxkTI.css",revision:null},{url:"assets/index-DzlY5WuB.js",revision:null},{url:"assets/http-namespace-CAzyfpbt.js",revision:null},{url:"assets/geist-latin-wght-normal-Dm3htQBi.woff2",revision:null},{url:"assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2",revision:null},{url:"assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2",revision:null},{url:"assets/dialog-CpPDW758.js",revision:null},{url:"assets/createLucideIcon-Cev6Iqjf.js",revision:null},{url:"assets/confirmation-dialog-CWhG9whO.js",revision:null},{url:"assets/chat-permission-BltPnMpz.mp3",revision:null},{url:"assets/chat-finish-Kb8mnIhV.mp3",revision:null},{url:"assets/badge-D9JlXycT.js",revision:null},{url:"assets/arrow-left-CYlgcbbR.js",revision:null},{url:"assets/alert--ylHisOx.js",revision:null},{url:"assets/add-server-BZDIf0Oe.js",revision:null},{url:"assets/_sessionId-HyxD5THT.js",revision:null},{url:"assets/_sessionId-Ce-dKO7D.js",revision:null},{url:"assets/_serverId-palzB2Iu.js",revision:null},{url:"assets/_serverId-DfaxBHQQ.js",revision:null},{url:"assets/ThemeProvider-rIKaOoRR.js",revision:null},{url:"assets/SessionMenuButton-kHJ-D0s7.css",revision:null},{url:"assets/SessionMenuButton-B1uASsIZ.js",revision:null},{url:"assets/SessionContent-BPrza9X5.js",revision:null},{url:"assets/ServerContext-BIEwENov.js",revision:null},{url:"assets/Match-BqRw2YHq.js",revision:null},{url:"apple-touch-icon.png",revision:"a2c89afb6685520dfc7e6eb307529d2a"},{url:"favicon.ico",revision:"4389bb108ec3c91f717815a4e519e8ac"},{url:"icon-192.png",revision:"7a732a19b758b4bb336850bf9f225034"},{url:"icon-512.png",revision:"858fd3102a679d90bf7fb6e0c852ea9a"},{url:"manifest.webmanifest",revision:"e01c9a3b2365d71c2061cffe57a6103c"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/api\//,/^\/ws/]})),s.registerRoute(({request:s})=>"script"===s.destination||"style"===s.destination,new s.CacheFirst({cacheName:"static-assets",plugins:[new s.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3})]}),"GET"),s.registerRoute(({request:s})=>"font"===s.destination||"image"===s.destination,new s.CacheFirst({cacheName:"static-media",plugins:[new s.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3})]}),"GET"),s.registerRoute(({request:s})=>"document"===s.destination,new s.NetworkFirst({cacheName:"html-cache",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:86400})]}),"GET")});
|