deepfish-ai 2.0.3 → 2.0.5
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 +14 -4
- package/dist/index.js +479 -464
- package/dist/serve/client/assets/index-CXCKvQL3.css +1 -0
- package/dist/serve/client/assets/index-Cr3CJSQU.js +1 -0
- package/dist/serve/client/index.html +4 -4
- package/dist/serve/pm2-server.js +312 -315
- package/dist/serve/server/entry-server.mjs +27 -14
- package/package.json +1 -1
- package/dist/serve/client/assets/index-DUHYC91l.js +0 -1
- package/dist/serve/client/assets/index-zcrdNLZs.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{box-sizing:border-box}html,body{min-height:100%;margin:0;padding:0}body{color:#2c3e50;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:.01em;background:#f5f7fa;min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif}.app-shell{max-width:1400px;margin:0 auto;padding:28px 20px 40px}.app-header{border-bottom:1px solid #ffffff0f;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:24px;padding-bottom:18px;display:flex}.app-title{letter-spacing:.02em;color:#2c3e50;margin:0;font-size:1.4rem;font-weight:600}.app-subtitle{color:#6b7280;letter-spacing:.06em;margin:6px 0 0;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.82rem}.status-pill{color:#6b7280;background:#f3f6fb;border:1px solid #e6e6e6;border-radius:999px;align-items:center;gap:8px;padding:6px 12px;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.78rem;display:inline-flex}.status-dot{background:#94a3b8;border-radius:50%;width:8px;height:8px}.status-dot.is-connected{background:#38bdf8}.status-dot.is-connecting{background:#f59e0b}.status-dot.is-disconnected{background:#cbd5e1}.status-dot.is-error{background:#ef4444}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.55;transform:scale(.85)}}.panel{background:#fff;border:1px solid #e6e6e6;border-radius:10px;position:relative;overflow:hidden;box-shadow:0 6px 18px #1e293b0f}.panel:before{display:none}.panel-header{border-bottom:1px solid #f0f2f5;justify-content:space-between;align-items:center;padding:14px 18px;display:flex}.panel-title{color:#2c3e50;letter-spacing:.02em;align-items:center;gap:10px;margin:0;font-size:.95rem;font-weight:600;display:flex}.panel-title .badge{color:#3b82f6;background:#eef2ff;border:1px solid #3b82f61f;border-radius:6px;padding:2px 8px;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.72rem;font-weight:500}.table-wrap{width:100%;overflow-x:visible}table.sessions{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%;font-size:.88rem}table.sessions thead th{text-align:center;color:#6b7280;background:0 0;border-bottom:1px solid #f0f2f5;padding:12px 18px;font-size:.8rem;font-weight:600}table.sessions thead th:first-child{width:300px}table.sessions tbody td{color:#2c3e50;vertical-align:middle;white-space:normal;text-align:center;border-bottom:1px solid #f0f2f5;padding:14px 18px}table.sessions tbody tr{transition:background .16s}table.sessions tbody tr:hover{background:#fbfbfd}table.sessions tbody tr:last-child td{border-bottom:none}table.sessions .th-actions,table.sessions .cell-actions{text-align:center;white-space:nowrap}table.sessions .cell-actions{justify-content:center;gap:8px;display:flex}.btn-delete{color:#ef4444;letter-spacing:.02em;cursor:pointer;background:0 0;border:1px solid #ef44441f;border-radius:6px;align-items:center;gap:6px;padding:8px 14px;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.86rem;font-weight:600;transition:all .16s;display:inline-flex}.btn-delete:hover{box-shadow:none;background:#ef44440f}.btn-delete:active{transform:translateY(1px)}.btn-delete:disabled{opacity:.4;cursor:not-allowed}.btn-id{color:#3b82f6;letter-spacing:.02em;cursor:pointer;background:0 0;border:1px solid #3b82f624;border-radius:6px;align-items:center;gap:6px;padding:8px 14px;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.86rem;font-weight:600;transition:all .16s;display:inline-flex}.btn-id:hover{box-shadow:none;background:#3b82f60f}.btn-id:active{transform:translateY(1px)}.cell-mono{color:#64748b;text-align:left;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.86rem}table.sessions .cell-workspace{text-overflow:ellipsis;white-space:nowrap;text-align:left;width:300px;max-width:300px;overflow:hidden}.cell-name{color:#2c3e50;font-weight:600}.cell-time{color:#64748b;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.86rem}.status-tag{letter-spacing:.04em;border-radius:999px;align-items:center;gap:6px;padding:3px 10px;font-family:SF Mono,JetBrains Mono,Consolas,monospace;font-size:.74rem;font-weight:500;display:inline-flex}.status-tag:before{content:"";background:currentColor;border-radius:50%;width:6px;height:6px;box-shadow:0 0 6px}.status-tag.is-online{color:#4ade80;background:#4ade8014;border:1px solid #4ade8040}.status-tag.is-offline{color:#94a3b8;background:#94a3b80f;border:1px solid #94a3b82e}.empty-state{color:#6b7280;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:60px 20px;font-size:.98rem;display:flex}.empty-state .icon{opacity:.6;font-size:1.6rem}@media (width<=720px){.app-shell{padding:24px 14px 40px}.app-header{flex-direction:column;align-items:flex-start}table.sessions thead th,table.sessions tbody td{padding:10px 12px}}.modal-backdrop{z-index:1200;background:#10182814;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.modal{background:#fff;border:1px solid #e6e6e6;border-radius:8px;width:100%;max-width:520px;padding:18px;box-shadow:0 8px 30px #1018280f}.modal-title{color:#2c3e50;margin:0 0 12px;font-size:1rem}.modal-body{color:#2c3e50;margin-bottom:18px;font-size:.98rem}.modal-id{color:#334155;word-break:break-all;background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:18px;padding:12px;font-family:SF Mono,JetBrains Mono,Consolas,monospace}.modal-actions{justify-content:flex-end;gap:12px;display:flex}.btn{cursor:pointer;border:none;border-radius:8px;padding:8px 14px;font-weight:600}.btn:disabled{opacity:.6;cursor:not-allowed}.btn-cancel{color:#6b7280;background:0 0;border:1px solid #f0f2f5}.btn-confirm{color:#fff;background:linear-gradient(90deg,#3b82f6,#60a5fa);border:1px solid #3b82f60f;box-shadow:0 6px 18px #3b82f61f}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}function r(){return{...e.context,id:e.getNextContextId(),count:0}}var i=(e,t)=>e===t,a=Symbol(`solid-track`),o={equals:i},s=null,c=oe,l=1,u=2,d={owned:null,cleanups:null,context:null,owner:null},f=null,p=null,m=null,h=null,g=null,_=null,v=null,y=0;function b(e,t){let n=g,r=f,i=e.length===0,a=t===void 0?r:t,o=i?d:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>T(()=>L(o)));f=o,g=null;try{return P(s,!0)}finally{g=n,f=r}}function x(e,t){t=t?Object.assign({},o,t):o;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[O.bind(n),e=>(typeof e==`function`&&(e=p&&p.running&&p.sources.has(n)?e(n.tValue):e(n.value)),k(n,e))]}function S(e,t,n){let r=M(e,t,!1,l);m&&p&&p.running?_.push(r):A(r)}function C(e,t,n){c=ce;let r=M(e,t,!1,l),i=D&&ie(D);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),v?v.push(r):A(r)}function w(e,t,n){n=n?Object.assign({},o,n):o;let r=M(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,m&&p&&p.running?(r.tState=l,_.push(r)):A(r),O.bind(r)}function T(e){if(!h&&g===null)return e();let t=g;g=null;try{return h?h.untrack(e):e()}finally{g=t}}function ee(e){C(()=>T(e))}function E(e){return f===null||(f.cleanups===null?f.cleanups=[e]:f.cleanups.push(e)),e}function te(e){if(p&&p.running)return e(),p.done;let t=g,n=f;return Promise.resolve().then(()=>{g=t,f=n;let r;return(m||D)&&(r=p||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),P(e,!1),g=f=null,r?r.done:void 0})}var[ne,re]=x(!1);function ie(e){let t;return f&&f.context&&(t=f.context[e.id])!==void 0?t:e.defaultValue}var D;function O(){let e=p&&p.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===l)A(this);else{let e=_;_=null,P(()=>F(this),!1),_=e}if(g){let e=this.observers;if(!e||e[e.length-1]!==g){let t=e?e.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(t)):(g.sources=[this],g.sourceSlots=[t]),e?(e.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}}return e&&p.sources.has(this)?this.tValue:this.value}function k(e,t,n){let r=p&&p.running&&p.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(p){let r=p.running;(r||!n&&p.sources.has(e))&&(p.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&P(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=p&&p.running;r&&p.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?_.push(n):v.push(n),n.observers&&I(n)),r?n.tState=l:n.state=l)}if(_.length>1e6)throw _=[],Error()},!1)}return t}function A(e){if(!e.fn)return;L(e);let t=y;j(e,p&&p.running&&p.sources.has(e)?e.tValue:e.value,t),p&&!p.running&&p.sources.has(e)&&queueMicrotask(()=>{P(()=>{p&&(p.running=!0),g=f=e,j(e,e.tValue,t),g=f=null},!1)})}function j(e,t,n){let r,i=f,a=g;g=f=e;try{r=e.fn(t)}catch(t){return e.pure&&(p&&p.running?(e.tState=l,e.tOwned&&e.tOwned.forEach(L),e.tOwned=void 0):(e.state=l,e.owned&&e.owned.forEach(L),e.owned=null)),e.updatedAt=n+1,B(t)}finally{g=a,f=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?k(e,r,!0):p&&p.running&&e.pure?(p.sources.has(e)||(e.value=r),p.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function M(e,t,n,r=l,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:f,context:f?f.context:null,pure:n};if(p&&p.running&&(a.state=0,a.tState=r),f===null||f!==d&&(p&&p.running&&f.pure?f.tOwned?f.tOwned.push(a):f.tOwned=[a]:f.owned?f.owned.push(a):f.owned=[a]),h&&a.fn){let e=a.fn,[t,n]=x(void 0,{equals:!1}),r=h.factory(e,n);E(()=>r.dispose());let i,o=()=>te(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),p&&p.running?(i||=h.factory(e,o),i.track(n)):r.track(n))}return a}function N(e){let t=p&&p.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===u)return F(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<y);){if(t&&p.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(p.disposed.has(t))return}if((t?e.tState:e.state)===l)A(e);else if((t?e.tState:e.state)===u){let t=_;_=null,P(()=>F(e,n[0]),!1),_=t}}}function P(e,t){if(_)return e();let n=!1;t||(_=[]),v?n=!0:v=[],y++;try{let t=e();return ae(n),t}catch(e){n||(v=null),_=null,B(e)}}function ae(e){if(_&&=(m&&p&&p.running?se(_):oe(_),null),e)return;let t;if(p){if(!p.promises.size&&!p.queue.size){let e=p.sources,n=p.disposed;v.push.apply(v,p.effects),t=p.resolve;for(let e of v)`tState`in e&&(e.state=e.tState),delete e.tState;p=null,P(()=>{for(let e of n)L(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)L(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}re(!1)},!1)}else if(p.running){p.running=!1,p.effects.push.apply(p.effects,v),v=null,re(!0);return}}let n=v;v=null,n.length&&P(()=>c(n),!1),t&&t()}function oe(e){for(let t=0;t<e.length;t++)N(e[t])}function se(e){for(let t=0;t<e.length;t++){let n=e[t],r=p.queue;r.has(n)||(r.add(n),m(()=>{r.delete(n),P(()=>{p.running=!0,N(n)},!1),p&&(p.running=!1)}))}}function ce(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:N(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)N(t[r])}function F(e,t){let n=p&&p.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===l?i!==t&&(!i.updatedAt||i.updatedAt<y)&&N(i):e===u&&F(i,t)}}}function I(e){let t=p&&p.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=u:r.state=u,r.pure?_.push(r):v.push(r),r.observers&&I(r))}}function L(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)L(e.tOwned[t]);delete e.tOwned}if(p&&p.running&&e.pure)R(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)L(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}p&&p.running?e.tState=0:e.state=0}function R(e,t){if(t||(e.tState=0,p.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)R(e.owned[t])}function le(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function z(e,t,n){try{for(let n of t)n(e)}catch(e){B(e,n&&n.owner||null)}}function B(e,t=f){let n=s&&t&&t.context&&t.context[s],r=le(e);if(!n)throw r;v?v.push({fn(){z(r,n,t)},state:l}):z(r,n,t)}var ue=Symbol(`fallback`);function V(e){for(let t=0;t<e.length;t++)e[t]()}function de(e,t,n={}){let r=[],i=[],o=[],s=0,c=t.length>1?[]:null;return E(()=>V(o)),()=>{let l=e()||[],u=l.length,d,f;return l[a],T(()=>{let e,t,a,m,h,g,_,v,y;if(u===0)s!==0&&(V(o),o=[],r=[],i=[],s=0,c&&=[]),n.fallback&&(r=[ue],i[0]=b(e=>(o[0]=e,n.fallback())),s=1);else if(s===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=b(p);s=u}else{for(a=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(s,u);g<_&&r[g]===l[g];g++);for(_=s-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)a[v]=i[_],m[v]=o[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(a[f]=i[d],m[f]=o[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):o[d]();for(f=g;f<u;f++)f in a?(i[f]=a[f],o[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=b(p);i=i.slice(0,s=u),r=l.slice(0)}return i});function p(e){if(o[f]=e,c){let[e,n]=x(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}var fe=!1;function H(t,i){if(fe&&e.context){let a=e.context;n(r());let o=T(()=>t(i||{}));return n(a),o}return T(()=>t(i||{}))}var pe=e=>`Stale read from <${e}>.`;function me(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return w(de(()=>e.each,e.children,t||void 0))}function U(e){let t=e.keyed,n=w(()=>e.when,void 0,void 0),r=t?n:w(n,void 0,{equals:(e,t)=>!e==!t});return w(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?T(()=>a(t?i:()=>{if(!T(r))throw pe(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var he=e=>w(()=>e());function ge(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var W=`_$DX_DELEGATE`;function _e(e,t,n,r={}){let i;return b(r=>{i=r,t===document?e():J(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function G(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>T(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function ve(e,t=window.document){let n=t[W]||(t[W]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,ye))}}function K(e,t,n){Y(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function q(e,t){Y(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function J(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return X(e,t,r,n);S(r=>X(e,t(),r,n),r)}function Y(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ye(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function X(e,t,n,r,i){let a=Y(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Q(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Q(e,n,r)}else if(o===`function`)return S(()=>{let i=t();for(;typeof i==`function`;)i=i();n=X(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Z(o,t,n,i))return S(()=>n=X(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Q(e,n,r),s)return n}else c?n.length===0?be(e,o,r):ge(e,n,o):(n&&Q(e),be(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Q(e,n,r,t);Q(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Z(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Z(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=Z(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function be(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Q(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var xe=class{url;id=null;ws=null;opts;reconnectTimer=null;reconnecting=!1;constructor(e){this.opts=e,this.url=e.url||`ws://localhost:8866/agent-room`,this.id=e.id??null,this.connect()}connect(){this.ws||(this.ws=new WebSocket(this.url),this.ws.onopen=()=>{let e={type:`register`,clientType:`web`};this.id&&(e.id=this.id),this.ws.send(JSON.stringify(e))},this.ws.onmessage=e=>{let t=JSON.parse(e.data);if(t.type===`registered`){this.id=t.id,this.opts.onReady?.(this);return}if(t.type===`sessions-push`){let e=t.payload??[];this.opts.onSessionsPush?.(this,e);return}if(t.type===`error`){this.opts.onError?.(this,t.code||``,t.message||``);return}this.opts.onMessage?.(this,t)},this.ws.onclose=e=>{this.opts.onClose?.(this,e.code,e.reason),this.ws=null,this.tryReconnect()},this.ws.onerror=()=>{})}send(e,t,n){!this.ws||this.ws.readyState!==WebSocket.OPEN||this.ws.send(JSON.stringify({type:e,payload:t,to:n}))}reply(e,t){e.from&&this.send(e.type+`-result`,t,e.from)}disconnect(){this.clearReconnect(),this.reconnecting=!1,this.ws&&=(this.ws.close(1e3,`client disconnect`),null)}get connected(){return this.ws?.readyState===WebSocket.OPEN}clearReconnect(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null)}tryReconnect(){let e=this.opts.reconnectInterval??3e3;e<=0||this.reconnecting||(this.reconnecting=!0,this.reconnectTimer=setTimeout(()=>{this.reconnecting=!1,this.connect()},e))}},Se=G(`<div class=table-wrap><table class=sessions><thead><tr><th>Workspace</th><th>Name</th><th>Status</th><th>Created</th><th>Updated</th><th class=th-actions>Actions</th></tr></thead><tbody>`),Ce=G(`<div class=modal-backdrop><div class=modal role=dialog aria-modal=true aria-label="Confirm deletion"><div class=modal-body></div><div class=modal-actions><button type=button class="btn btn-cancel">Cancel</button><button type=button class="btn btn-confirm">`),we=G(`<div class=modal-backdrop><div class=modal role=dialog aria-modal=true aria-label="Session ID"><h3 class=modal-title>Session ID</h3><div class=modal-id></div><div class=modal-actions><button type=button class="btn btn-confirm">Close`),Te=G(`<div class=app-shell><header class=app-header><div><h1 class=app-title>DeepFish Sessions</h1><p class=app-subtitle></p></div><div class=status-pill><span></span></div></header><section class=panel><div class=panel-header><h2 class=panel-title>Active Sessions<span class=badge>`),Ee=G(`<div class=empty-state><div class=icon>◇</div><div>`),De=G(`<tr><td class="cell-mono cell-workspace"></td><td class=cell-name></td><td><span></span></td><td class=cell-time></td><td class=cell-time></td><td class=cell-actions><button type=button class="btn btn-id">Show ID</button><button type=button class="btn btn-delete">`),Oe={0:`Idle`,1:`Working`},ke={connecting:`is-connecting`,connected:`is-connected`,disconnected:`is-disconnected`,error:`is-error`,ssr:`is-disconnected`},Ae={ssr:`LOADING`,connecting:`CONNECTING`,connected:`CONNECTED`,disconnected:`DISCONNECTED`,error:`ERROR`};function je(e){if(!e)return`-`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Me(){let[e,t]=x([]),[n,r]=x(`ssr`),[i,a]=x(``),[o,s]=x(``),[c,l]=x(``),[u,d]=x(!1),[f,p]=x(``),[m,h]=x(``),g=null;ee(()=>{typeof window>`u`||(r(`connecting`),g=new xe({url:`ws://${window.location.host}/agent-room`,onReady:()=>{r(`connected`),a(``)},onSessionsPush:(e,n)=>{t(n??[]),s(``)},onError:(e,t,n)=>{r(`error`),a(n),s(``)},onClose:()=>{r(`disconnected`),s(``)}}))});let _=e=>{l(e),p(`Are you sure you want to delete session "${e}"? This action cannot be undone.`),d(!0)},v=()=>{let e=c();if(!g||!e){d(!1);return}s(e),d(!1),g.send(`delete-session`,{id:e})},y=()=>{l(``),d(!1)},b=e=>{h(e)},C=()=>{h(``)};return E(()=>g?.disconnect()),(()=>{var t=Te(),r=t.firstChild,a=r.firstChild.nextSibling,s=a.firstChild,l=r.nextSibling,d=l.firstChild.firstChild.firstChild.nextSibling;return J(a,()=>Ae[n()],null),J(d,()=>e().length),J(l,H(U,{get when(){return e().length>0},get fallback(){return(()=>{var e=Ee(),t=e.firstChild.nextSibling;return J(t,(()=>{var e=he(()=>n()===`connected`);return()=>e()?`No active sessions`:n()===`ssr`?`Hydrating…`:`Waiting for data…`})()),e})()},get children(){var t=Se(),n=t.firstChild.firstChild.nextSibling;return J(n,H(me,{get each(){return e()},children:e=>(()=>{var t=De(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,a=i.firstChild,s=i.nextSibling,c=s.nextSibling,l=c.nextSibling.firstChild,u=l.nextSibling;return J(n,()=>e.workspace),J(r,()=>e.name),J(a,()=>Oe[e.status??0]),J(s,()=>je(e.createdAt)),J(c,()=>je(e.updatedAt)),l.$$click=()=>b(e.id),u.$$click=()=>_(e.id),J(u,()=>o()===e.id?`Deleting...`:`Delete`),S(t=>{var r=e.workspace,i=`status-tag ${e.status===1?`is-online`:`is-offline`}`,s=o()===e.id;return r!==t.e&&K(n,`title`,t.e=r),i!==t.t&&q(a,t.t=i),s!==t.a&&(u.disabled=t.a=s),t},{e:void 0,t:void 0,a:void 0}),t})()})),t}}),null),J(t,H(U,{get when(){return u()},get children(){var e=Ce(),t=e.firstChild.firstChild,n=t.nextSibling.firstChild,r=n.nextSibling;return J(t,f),n.$$click=y,r.$$click=v,J(r,()=>o()===c()?`Deleting...`:`Confirm Delete`),S(()=>r.disabled=o()===c()),e}}),null),J(t,H(U,{get when(){return m()},get children(){var e=we(),t=e.firstChild.firstChild.nextSibling,n=t.nextSibling.firstChild;return J(t,m),n.$$click=C,e}}),null),S(e=>{var t=i(),r=`status-dot ${ke[n()]}`;return t!==e.e&&K(a,`title`,e.e=t),r!==e.t&&q(s,e.t=r),e},{e:void 0,t:void 0}),t})()}ve([`click`]);var $=document.getElementById(`app`);$&&($.innerHTML=``),_e(()=>H(Me,{}),$);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html lang="
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>DeepFish Sessions</title>
|
|
7
|
-
<!--
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<!-- Global styles have been moved to src/serve/ui/App.less and imported in App.tsx. -->
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Cr3CJSQU.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CXCKvQL3.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="app"></div>
|