@gbasin/agentboard-darwin-x64 0.4.24 → 0.4.25
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.
|
@@ -251,7 +251,7 @@ ${s.join(`
|
|
|
251
251
|
select-none
|
|
252
252
|
transition-all duration-75
|
|
253
253
|
${o===e?`bg-accent text-white scale-110`:`bg-white/90 text-gray-800`}
|
|
254
|
-
`,style:{width:tU,height:nU,WebkitUserSelect:`none`,userSelect:`none`},children:e},t):(0,G.jsx)(`div`,{style:{width:tU,height:nU}},t))}),(0,G.jsx)(`div`,{className:`text-center text-white text-sm font-medium select-none h-5`,style:{marginTop:rU+2},children:o?`Release to send "${o}"`:`\xA0`})]})})]})]})}var fU=(0,G.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,G.jsx)(`path`,{d:`M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7.07L2.4 12l4.66-7H22v14zm-11.59-2L14 13.41 17.59 17 19 15.59 15.41 12 19 8.41 17.59 7 14 10.59 10.41 7 9 8.41 12.59 12 9 15.59z`})}),pU=(0,G.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}),(0,G.jsx)(`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,ry:`1`})]}),mU=(0,G.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,G.jsx)(`line`,{x1:`6`,y1:`8`,x2:`6`,y2:`8`}),(0,G.jsx)(`line`,{x1:`10`,y1:`8`,x2:`10`,y2:`8`}),(0,G.jsx)(`line`,{x1:`14`,y1:`8`,x2:`14`,y2:`8`}),(0,G.jsx)(`line`,{x1:`18`,y1:`8`,x2:`18`,y2:`8`}),(0,G.jsx)(`line`,{x1:`6`,y1:`12`,x2:`6`,y2:`12`}),(0,G.jsx)(`line`,{x1:`10`,y1:`12`,x2:`10`,y2:`12`}),(0,G.jsx)(`line`,{x1:`14`,y1:`12`,x2:`14`,y2:`12`}),(0,G.jsx)(`line`,{x1:`18`,y1:`12`,x2:`18`,y2:`12`}),(0,G.jsx)(`line`,{x1:`7`,y1:`16`,x2:`17`,y2:`16`})]}),hU=[{label:`esc`,key:`\x1B`},{label:`tab`,key:` `}],gU=[{label:fU,key:``,ariaLabel:`Delete word`},{label:(0,G.jsx)(fe,{width:18,height:18}),key:`\r`,grow:!0,className:`bg-accent/20 text-accent border-accent/40`,ariaLabel:`Enter`}];function _U(){`vibrate`in navigator&&navigator.vibrate(10)}function vU(e,t){if(!t||e.length!==1)return{output:e,consumeCtrl:!1};let n=e.toUpperCase().charCodeAt(0);return n>=65&&n<=90?{output:String.fromCharCode(n-64),consumeCtrl:!0}:{output:e,consumeCtrl:!0}}var yU={working:`bg-working`,waiting:`bg-waiting`,permission:`bg-approval`,unknown:`bg-muted`};async function bU(e,t){try{let n=new FormData;n.append(`image`,e,t);let r=await fetch(`/api/paste-image`,{method:`POST`,body:n});if(r.ok){let{path:e}=await r.json();return{path:e}}let i=`Image upload failed`;try{let e=await r.json();typeof e.error==`string`&&(i=e.error)}catch{}return{error:i}}catch{return{error:`Image upload failed`}}}function xU({onSendKey:e,onPasteText:t,disabled:n=!1,sessions:r,currentSessionId:i,agentType:a,onSelectSession:o,hideSessionSwitcher:s=!1,onRefocus:c,isKeyboardVisible:l,onEnterTextMode:u}){let[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(``),[h,g]=(0,x.useState)(null),[_,v]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),S=(0,x.useRef)(null),C=(0,x.useRef)(null),w=(0,x.useRef)(0),T=(0,x.useRef)(null);(0,x.useEffect)(()=>{d&&S.current&&S.current.focus()},[d]),(0,x.useEffect)(()=>{let e=T.current;if(!e)return;let t=t=>{n||e.contains(t.target)&&l?.()&&t.preventDefault()};return e.addEventListener(`touchstart`,t,{passive:!1,capture:!0}),()=>{e.removeEventListener(`touchstart`,t,{capture:!0})}},[n,l]),(0,x.useEffect)(()=>{if(!y||n||typeof document>`u`)return;let t=t=>{let{output:n,consumeCtrl:r}=vU(t.key,!0);r&&(t.preventDefault(),t.stopPropagation(),_U(),e(n),b(!1))};return document.addEventListener(`keydown`,t,{capture:!0}),()=>{document.removeEventListener(`keydown`,t,{capture:!0})}},[y,n,e]),(0,x.useEffect)(()=>{if(!d)return;let t=C.current;if(!t)return;let n=async t=>{let n=t.clipboardData?.items;if(n){for(let r of n)if(r.type.startsWith(`image/`)){t.preventDefault();let n=r.getAsFile();if(!n)continue;v(!0),g(null);try{let t=await bU(n,`paste.${r.type.split(`/`)[1]||`png`}`);`path`in t?(e(tH(t.path,a)),f(!1),m(``),c?.()):g(t.error)}finally{v(!1)}return}}};return t.addEventListener(`paste`,n),()=>t.removeEventListener(`paste`,n)},[d,e,c,a]);let E=t=>{if(n)return;let r=l?.()??!1;_U();let{output:i,consumeCtrl:a}=vU(t,y);a&&b(!1),e(i),r&&c?.()},D=()=>{n||(_U(),b(!y))},O=t=>{let{output:n,consumeCtrl:r}=vU(t,y);r&&b(!1),e(n)},k=n=>{t?t(n):e(n)},A=async()=>{if(n)return;let t=l?.()??!1;_U(),g(null);try{let n=await navigator.clipboard.read();for(let r of n){let n=r.types.find(e=>e.startsWith(`image/`));if(n){let i=await bU(await r.getType(n),`paste.${n.split(`/`)[1]||`png`}`);if(`path`in i){e(tH(i.path,a)),t&&c?.();return}g(i.error),f(!0),m(``);return}if(r.types.includes(`text/plain`)){let e=await(await r.getType(`text/plain`)).text();if(e){k(e),t&&c?.();return}}}}catch{try{let e=await navigator.clipboard.readText();if(e){k(e),t&&c?.();return}}catch{}}f(!0),m(``)},j=()=>{p&&(_U(),k(p)),f(!1),m(``),g(null),c?.()},M=()=>{f(!1),m(``),g(null),c?.()},N=e=>{_U(),o(e)},P=()=>{n||(_U(),l?.()?document.activeElement instanceof HTMLElement&&document.activeElement.blur():u?.())},F=r.length>1&&!s,I=e=>t=>{n||(t.preventDefault(),t.stopPropagation(),w.current=Date.now(),e())},L=e=>()=>{n||Date.now()-w.current<700||e()};return(0,G.jsxs)(`div`,{ref:T,className:`terminal-controls flex flex-col gap-[6px] border-t border-border bg-elevated p-[6px] ${Ue()?``:`md:hidden`}`,children:[F&&(0,G.jsxs)(`div`,{className:`relative -mx-[6px]`,children:[(0,G.jsx)(`div`,{className:`absolute left-0 top-0 bottom-0 w-3 bg-gradient-to-r from-elevated to-transparent z-10 pointer-events-none`}),(0,G.jsx)(`div`,{className:`absolute right-0 top-0 bottom-0 w-3 bg-gradient-to-l from-elevated to-transparent z-10 pointer-events-none`}),(0,G.jsx)(`div`,{className:`flex items-center gap-[6px] overflow-x-auto px-[6px] scrollbar-none scroll-smooth snap-x snap-mandatory`,style:{WebkitOverflowScrolling:`touch`},children:r.map((e,t)=>(0,G.jsxs)(`button`,{type:`button`,className:`
|
|
254
|
+
`,style:{width:tU,height:nU,WebkitUserSelect:`none`,userSelect:`none`},children:e},t):(0,G.jsx)(`div`,{style:{width:tU,height:nU}},t))}),(0,G.jsx)(`div`,{className:`text-center text-white text-sm font-medium select-none h-5`,style:{marginTop:rU+2},children:o?`Release to send "${o}"`:`\xA0`})]})})]})]})}var fU=(0,G.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,G.jsx)(`path`,{d:`M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7.07L2.4 12l4.66-7H22v14zm-11.59-2L14 13.41 17.59 17 19 15.59 15.41 12 19 8.41 17.59 7 14 10.59 10.41 7 9 8.41 12.59 12 9 15.59z`})}),pU=(0,G.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}),(0,G.jsx)(`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,ry:`1`})]}),mU=(0,G.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,G.jsx)(`line`,{x1:`6`,y1:`8`,x2:`6`,y2:`8`}),(0,G.jsx)(`line`,{x1:`10`,y1:`8`,x2:`10`,y2:`8`}),(0,G.jsx)(`line`,{x1:`14`,y1:`8`,x2:`14`,y2:`8`}),(0,G.jsx)(`line`,{x1:`18`,y1:`8`,x2:`18`,y2:`8`}),(0,G.jsx)(`line`,{x1:`6`,y1:`12`,x2:`6`,y2:`12`}),(0,G.jsx)(`line`,{x1:`10`,y1:`12`,x2:`10`,y2:`12`}),(0,G.jsx)(`line`,{x1:`14`,y1:`12`,x2:`14`,y2:`12`}),(0,G.jsx)(`line`,{x1:`18`,y1:`12`,x2:`18`,y2:`12`}),(0,G.jsx)(`line`,{x1:`7`,y1:`16`,x2:`17`,y2:`16`})]}),hU=[{label:`esc`,key:`\x1B`},{label:`tab`,key:` `},{label:`⇧tab`,key:`\x1B[Z`,ariaLabel:`Shift+Tab`}],gU=[{label:fU,key:``,ariaLabel:`Delete word`},{label:(0,G.jsx)(fe,{width:18,height:18}),key:`\r`,grow:!0,className:`bg-accent/20 text-accent border-accent/40`,ariaLabel:`Enter`}];function _U(){`vibrate`in navigator&&navigator.vibrate(10)}function vU(e,t){if(!t||e.length!==1)return{output:e,consumeCtrl:!1};let n=e.toUpperCase().charCodeAt(0);return n>=65&&n<=90?{output:String.fromCharCode(n-64),consumeCtrl:!0}:{output:e,consumeCtrl:!0}}var yU={working:`bg-working`,waiting:`bg-waiting`,permission:`bg-approval`,unknown:`bg-muted`};async function bU(e,t){try{let n=new FormData;n.append(`image`,e,t);let r=await fetch(`/api/paste-image`,{method:`POST`,body:n});if(r.ok){let{path:e}=await r.json();return{path:e}}let i=`Image upload failed`;try{let e=await r.json();typeof e.error==`string`&&(i=e.error)}catch{}return{error:i}}catch{return{error:`Image upload failed`}}}function xU({onSendKey:e,onPasteText:t,disabled:n=!1,sessions:r,currentSessionId:i,agentType:a,onSelectSession:o,hideSessionSwitcher:s=!1,onRefocus:c,isKeyboardVisible:l,onEnterTextMode:u}){let[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(``),[h,g]=(0,x.useState)(null),[_,v]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),S=(0,x.useRef)(null),C=(0,x.useRef)(null),w=(0,x.useRef)(0),T=(0,x.useRef)(null);(0,x.useEffect)(()=>{d&&S.current&&S.current.focus()},[d]),(0,x.useEffect)(()=>{let e=T.current;if(!e)return;let t=t=>{n||e.contains(t.target)&&l?.()&&t.preventDefault()};return e.addEventListener(`touchstart`,t,{passive:!1,capture:!0}),()=>{e.removeEventListener(`touchstart`,t,{capture:!0})}},[n,l]),(0,x.useEffect)(()=>{if(!y||n||typeof document>`u`)return;let t=t=>{let{output:n,consumeCtrl:r}=vU(t.key,!0);r&&(t.preventDefault(),t.stopPropagation(),_U(),e(n),b(!1))};return document.addEventListener(`keydown`,t,{capture:!0}),()=>{document.removeEventListener(`keydown`,t,{capture:!0})}},[y,n,e]),(0,x.useEffect)(()=>{if(!d)return;let t=C.current;if(!t)return;let n=async t=>{let n=t.clipboardData?.items;if(n){for(let r of n)if(r.type.startsWith(`image/`)){t.preventDefault();let n=r.getAsFile();if(!n)continue;v(!0),g(null);try{let t=await bU(n,`paste.${r.type.split(`/`)[1]||`png`}`);`path`in t?(e(tH(t.path,a)),f(!1),m(``),c?.()):g(t.error)}finally{v(!1)}return}}};return t.addEventListener(`paste`,n),()=>t.removeEventListener(`paste`,n)},[d,e,c,a]);let E=t=>{if(n)return;let r=l?.()??!1;_U();let{output:i,consumeCtrl:a}=vU(t,y);a&&b(!1),e(i),r&&c?.()},D=()=>{n||(_U(),b(!y))},O=t=>{let{output:n,consumeCtrl:r}=vU(t,y);r&&b(!1),e(n)},k=n=>{t?t(n):e(n)},A=async()=>{if(n)return;let t=l?.()??!1;_U(),g(null);try{let n=await navigator.clipboard.read();for(let r of n){let n=r.types.find(e=>e.startsWith(`image/`));if(n){let i=await bU(await r.getType(n),`paste.${n.split(`/`)[1]||`png`}`);if(`path`in i){e(tH(i.path,a)),t&&c?.();return}g(i.error),f(!0),m(``);return}if(r.types.includes(`text/plain`)){let e=await(await r.getType(`text/plain`)).text();if(e){k(e),t&&c?.();return}}}}catch{try{let e=await navigator.clipboard.readText();if(e){k(e),t&&c?.();return}}catch{}}f(!0),m(``)},j=()=>{p&&(_U(),k(p)),f(!1),m(``),g(null),c?.()},M=()=>{f(!1),m(``),g(null),c?.()},N=e=>{_U(),o(e)},P=()=>{n||(_U(),l?.()?document.activeElement instanceof HTMLElement&&document.activeElement.blur():u?.())},F=r.length>1&&!s,I=e=>t=>{n||(t.preventDefault(),t.stopPropagation(),w.current=Date.now(),e())},L=e=>()=>{n||Date.now()-w.current<700||e()};return(0,G.jsxs)(`div`,{ref:T,className:`terminal-controls flex flex-col gap-[6px] border-t border-border bg-elevated p-[6px] ${Ue()?``:`md:hidden`}`,children:[F&&(0,G.jsxs)(`div`,{className:`relative -mx-[6px]`,children:[(0,G.jsx)(`div`,{className:`absolute left-0 top-0 bottom-0 w-3 bg-gradient-to-r from-elevated to-transparent z-10 pointer-events-none`}),(0,G.jsx)(`div`,{className:`absolute right-0 top-0 bottom-0 w-3 bg-gradient-to-l from-elevated to-transparent z-10 pointer-events-none`}),(0,G.jsx)(`div`,{className:`flex items-center gap-[6px] overflow-x-auto px-[6px] scrollbar-none scroll-smooth snap-x snap-mandatory`,style:{WebkitOverflowScrolling:`touch`},children:r.map((e,t)=>(0,G.jsxs)(`button`,{type:`button`,className:`
|
|
255
255
|
terminal-key flex items-center justify-center gap-1.5 shrink-0 snap-start
|
|
256
256
|
h-[44px] min-w-[44px] px-2.5 text-xs font-medium rounded-md
|
|
257
257
|
active:scale-95 transition-transform duration-75
|
|
@@ -268,7 +268,7 @@ ${s.join(`
|
|
|
268
268
|
select-none touch-manipulation
|
|
269
269
|
${y?`bg-accent/20 text-accent border border-accent/40`:`bg-surface border border-border text-secondary`}
|
|
270
270
|
${n?`opacity-50`:``}
|
|
271
|
-
`,onMouseDown:e=>e.preventDefault(),onTouchStart:I(D),onClick:L(D),disabled:n,children:`ctrl`}),hU.map((e,t)=>(0,G.jsx)(`button`,{type:`button`,className:`
|
|
271
|
+
`,onMouseDown:e=>e.preventDefault(),onTouchStart:I(D),onClick:L(D),disabled:n,children:`ctrl`}),hU.map((e,t)=>(0,G.jsx)(`button`,{type:`button`,"aria-label":e.ariaLabel,className:`
|
|
272
272
|
terminal-key
|
|
273
273
|
flex items-center justify-center
|
|
274
274
|
size-[44px] p-0
|
package/dist/client/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<title>Agentboard</title>
|
|
9
9
|
<link rel="apple-touch-icon" href="/icons/pwa-192x192.png" />
|
|
10
10
|
<meta name="theme-color" content="#0f172a" />
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-DPz95O93.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-DIHhOXLG.css">
|
|
13
13
|
<link rel="manifest" href="/manifest.webmanifest"></head>
|
|
14
14
|
<body>
|
package/dist/client/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let e,n={};const i=(i,o)=>(i=new URL(i+".js",o).href,n[i]||new Promise(n=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=n,document.head.appendChild(e)}else e=i,importScripts(i),n()}).then(()=>{let e=n[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(o,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(n[r])return;let
|
|
1
|
+
if(!self.define){let e,n={};const i=(i,o)=>(i=new URL(i+".js",o).href,n[i]||new Promise(n=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=n,document.head.appendChild(e)}else e=i,importScripts(i),n()}).then(()=>{let e=n[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(o,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(n[r])return;let f={};const t=e=>i(e,r),d={module:{uri:r},exports:f,require:t};n[r]=Promise.all(o.map(e=>d[e]||t(e))).then(e=>(s(...e),f))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"c55c3d714778b5d9f69765ee0cf428e3"},{url:"favicon.svg",revision:"12048a608dedfc53518ddc59c07e41b6"},{url:"icons/pwa-512x512.png",revision:"eb82042b3e4ed505f3efe1b79622d998"},{url:"icons/pwa-192x192.png",revision:"affb57c15619ee7223d1adea372ad514"},{url:"fonts/jetbrains-mono-vietnamese-wght-normal.woff2",revision:"ddf99e6e35c6ee9f00a41d2567b0e77f"},{url:"fonts/jetbrains-mono-latin-wght-normal.woff2",revision:"b058178d7f309414f8f856b99fd80d9b"},{url:"fonts/jetbrains-mono-latin-ext-wght-normal.woff2",revision:"e36841ed93d5bfe6b1d487d18ad7e90b"},{url:"fonts/jetbrains-mono-greek-wght-normal.woff2",revision:"51671ed9eb64e29390d4791ab0023c8e"},{url:"fonts/jetbrains-mono-cyrillic-wght-normal.woff2",revision:"615bf869ebeb5998734d81fc8958116c"},{url:"fonts/jetbrains-mono-cyrillic-ext-wght-normal.woff2",revision:"742dd0628e0118d32dccf0437900670b"},{url:"assets/workbox-window.prod.es5-Bq4GJJid.js",revision:null},{url:"assets/index-DPz95O93.js",revision:null},{url:"assets/index-DIHhOXLG.css",revision:null},{url:"icons/pwa-192x192.png",revision:"affb57c15619ee7223d1adea372ad514"},{url:"icons/pwa-512x512.png",revision:"eb82042b3e4ed505f3efe1b79622d998"},{url:"manifest.webmanifest",revision:"b6d4b3666a548fa0f0c6919d31ec2eee"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api(?:\/|$)/,/^\/ws(?:\/|$)/]}))});
|