local-operator-ui 0.33.12 → 0.33.13
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/out/main/index.js +221 -43
- package/out/renderer/assets/{_basePickBy-D6BzD4ju.js → _basePickBy-ClDOkzbm.js} +1 -1
- package/out/renderer/assets/{_baseUniq-DUHQgqI6.js → _baseUniq-Bjg20Wnt.js} +1 -1
- package/out/renderer/assets/{agent-details-page-BfY2GXsu.js → agent-details-page-B6dMpRkj.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-G8yjDXWI.js → agent-hub-page-5icRJQUU.js} +1 -1
- package/out/renderer/assets/{agents-page-BVaMOlhx.js → agents-page-QB7VHuWc.js} +3 -3
- package/out/renderer/assets/{arc-BJPXxslc.js → arc-JUyQaYce.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-CAx2Djt2.js → architectureDiagram-IEHRJDOE-Dj2EOirR.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-DzzBvJbF.js → blockDiagram-JOT3LUYC-BV5epTC-.js} +1 -1
- package/out/renderer/assets/{browser-page-BKKHlxUQ.js → browser-page-dDWB5yIW.js} +1 -1
- package/out/renderer/assets/{browser-webauthn-prompt-CFf6veM7.js → browser-webauthn-prompt-CfdmEmd3.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-B7NJzJs8.js → c4Diagram-VJAJSXHY-vuclWX2l.js} +1 -1
- package/out/renderer/assets/channel-BsHJE1bY.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-DyvU9AhL.js → chunk-4BMEZGHF-CXzxCBTp.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-BDwvRUW7.js → chunk-A2AXSNBT-BqlavYD9.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-BHRU4PWJ.js → chunk-AEK57VVT-CbHKHDT8.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-Ddlv7AT-.js → chunk-D6G4REZN-BsjtWg5V.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-RHXeydLw.js → chunk-RZ5BOZE2-DG7UZdFb.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-CgBoNv7T.js → chunk-XZIHB7SX-CJRAHV5i.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-B7874oGG.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-B7874oGG.js +1 -0
- package/out/renderer/assets/clone-D_1mkiK3.js +1 -0
- package/out/renderer/assets/{console-mirror-CsYBmY4w.js → console-mirror-Col-23xm.js} +1 -1
- package/out/renderer/assets/{consoleCapture-BA-qUcYi.js → consoleCapture-Cx6ZHhaf.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-CGMxTg5-.js → conversation-input-sync-Ct5RWQTE.js} +235 -235
- package/out/renderer/assets/{dagre-OKDRZEBW-D0pbYsRC.js → dagre-OKDRZEBW-9kZcwQOx.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-DKoKjqR0.js → diagram-SSKATNLV-D3lmR8N5.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-CnaYglaN.js → diagram-VNBRO52H-5XM5Ohr0.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-DBJ0yZyO.js → erDiagram-Q7BY3M3F-BGXsmR0M.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-D09JSDRY.js → flowDiagram-4HSFHLVR-D7f3Hs_M.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-BTb_oSqn.js → ganttDiagram-APWFNJXF-DAArlPJ7.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-CX8N-EKl.js → gitGraphDiagram-7IBYFJ6S-CZh6l1-b.js} +1 -1
- package/out/renderer/assets/{graph--r3zzALg.js → graph-59bxw1b3.js} +1 -1
- package/out/renderer/assets/{index-C3HaORgS.js → index-CXQ7tQV8.js} +1 -1
- package/out/renderer/assets/{index-fnErl6SK.js → index-DglXZFBJ.js} +1 -1
- package/out/renderer/assets/{index-ne6yB7j3.js → index-Qut_olKS.js} +191 -191
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-dYECtIhs.js → infoDiagram-PH2N3AL5-xpls03AC.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-D0zBqF12.js → journeyDiagram-U35MCT3I-C_4LmGB6.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-Buoktcjv.js → kanban-definition-NDS4AKOZ-DA2o96fB.js} +1 -1
- package/out/renderer/assets/{layout-BM9sfOdC.js → layout-DL-Fwz4H.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-CUAxTA1d.js → legacy-agents-page-CcJva2c5.js} +1 -1
- package/out/renderer/assets/{mermaid.core-he_pDMgK.js → mermaid.core-DT_2KFgE.js} +5 -5
- package/out/renderer/assets/{mesh-page-XyZx0ik9.js → mesh-page-D5QF84Ij.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-B1_r_rsS.js → mindmap-definition-ALO5MXBD-25DHKTU1.js} +1 -1
- package/out/renderer/assets/{mini-CFjVqelp.js → mini-CrSDWD2d.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-C30QspmN.js → org-surface-gate-NC5kvVBf.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-D8_AJW8a.js → pieDiagram-IB7DONF6-CEikTchg.js} +1 -1
- package/out/renderer/assets/{projects-page-C6ua-Eo_.js → projects-page-BNPsDRMu.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-CoBkK6wO.js → quadrantDiagram-7GDLP6J5-LLUsKRcY.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-CN67TOFO.js → radar-MK3ICKWK-BKu_1GhR.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-C-XPV-wV.js → radient-auth-buttons-DHIh3Ajq.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-BNw5Y7UR.js → requirementDiagram-KVF5MWMF-BPMK_6Jh.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-BEb9Mq7e.js → sankeyDiagram-QLVOVGJD-DM-kozOh.js} +1 -1
- package/out/renderer/assets/{schedules-page-Ypyas3FK.js → schedules-page-DWi6qS6H.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-BCtEF8iH.js → sequenceDiagram-X6HHIX6F-Djc18ZYF.js} +1 -1
- package/out/renderer/assets/{settings-page-LCETP_CU.js → settings-page-BGzzq9R_.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-mPkzmudI.js → stateDiagram-DGXRK772-Dh9sgS9R.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CxcK3DRW.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-D4n8X_t7.js → timeline-definition-BDJGKUSR-BJf--I0K.js} +1 -1
- package/out/renderer/assets/{ui-preferences-store-DQd-JVqm.js → ui-preferences-store-CyB3J7aO.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-CUeAKpNe.js → use-download-agent-mutation-BpCCMCHc.js} +1 -1
- package/out/renderer/assets/{use-memberships-query-T3OHJv7s.js → use-memberships-query-CKbos3dX.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-DstlLx0a.js → use-session-snapshot-HxWT1FgH.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-CHEh76yF.js → xychartDiagram-VJFVF3MP-b_KfPeul.js} +1 -1
- package/out/renderer/console-capture.html +3 -3
- package/out/renderer/index.html +4 -4
- package/out/renderer/mini.html +4 -4
- package/package.json +1 -1
- package/out/renderer/assets/channel-CCTWPngQ.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BemZh3Cv.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BemZh3Cv.js +0 -1
- package/out/renderer/assets/clone-DtdO-bOf.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-NO_fj09Z.js +0 -1
package/out/renderer/assets/{ui-preferences-store-DQd-JVqm.js → ui-preferences-store-CyB3J7aO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as G,D as de}from"./index-D1YFO5lM.js";const K=e=>{let t;const n=new Set,r=(u,S)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const c=t;t=S??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,c))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,o,a);return a},he=e=>e?K(e):K,Se=e=>e;function pe(e,t=Se){const n=G.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return G.useDebugValue(n),n}const Y=e=>{const t=he(e),n=r=>pe(t,r);return Object.assign(n,t),n},ge=e=>e?Y(e):Y;function me(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=l=>l===null?null:JSON.parse(l,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const N=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return N(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return N(r)(n)}}}},Oe=(e,t)=>(n,r,o)=>{let s={storage:me(()=>localStorage),partialize:f=>f,version:0,merge:(f,m)=>({...m,...f}),...t},i=!1;const a=new Set,l=new Set;let u=s.storage;if(!u)return e((...f)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...f)},r,o);const S=()=>{const f=s.partialize({...r()});return u.setItem(s.name,{state:f,version:s.version})},h=o.setState;o.setState=(f,m)=>{h(f,m),S()};const c=e((...f)=>{n(...f),S()},r,o);o.getInitialState=()=>c;let g;const $=()=>{var f,m;if(!u)return;i=!1,a.forEach(d=>{var p;return d((p=r())!=null?p:c)});const v=((m=s.onRehydrateStorage)==null?void 0:m.call(s,(f=r())!=null?f:c))||void 0;return N(u.getItem.bind(u))(s.name).then(d=>{if(d)if(typeof d.version=="number"&&d.version!==s.version){if(s.migrate){const p=s.migrate(d.state,d.version);return p instanceof Promise?p.then(T=>[!0,T]):[!0,p]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,d.state];return[!1,void 0]}).then(d=>{var p;const[T,fe]=d;if(g=s.merge(fe,(p=r())!=null?p:c),n(g,!0),T)return S()}).then(()=>{v?.(g,void 0),g=r(),i=!0,l.forEach(d=>d(g))}).catch(d=>{v?.(void 0,d)})};return o.persist={setOptions:f=>{s={...s,...f},f.storage&&(u=f.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>$(),hasHydrated:()=>i,onHydrate:f=>(a.add(f),()=>{a.delete(f)}),onFinishHydration:f=>(l.add(f),()=>{l.delete(f)})},s.skipHydration||$(),g||c},ye=Oe,A=260,q=220,ee=320,L=56,_e=A,Pe=1024,ne=480,te=44,re=400,Re=560;function oe(e){return Math.max(0,Math.min(Re,e-ne))}function j(e){return oe(e)>=re?"docked":"overlay"}function An({capacity:e,min:t,max:n,drawn:r}){const o=e>=t;return o?{resizable:o,value:Math.min(Math.max(r,t),e),minWidth:t,maxWidth:Math.min(n,e)}:{resizable:o,value:r,minWidth:r,maxWidth:r}}function be(e,t=A,n=te){return j(e-se(t)-n)==="overlay"&&j(e-L-n)==="docked"}function se(e){return Number.isNaN(e)?A:Math.min(ee,Math.max(q,e))}function En(e,t,n,r=A,o=!1,s=te){if(e>=Pe){const a=!t&&o&&be(e,r,s);return{mode:t||a?"strip":"docked",width:t||a?L:se(r),collapsed:t||a,sheetOpen:!1,resizable:!t&&!a}}return{mode:n?"overlay":"strip",width:n?_e:L,collapsed:!0,sheetOpen:n,resizable:!1}}function vn(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const Cn=e=>e?"⌘B":"Ctrl+B",Ae=["active","created"],wn={running:"Running",today:"Today",week:"This week",older:"Older"},Ee=new Set(["busy","delegating","approval","answer","wedged"]);function I(e){return Ee.has(e.status?.code??"")}const ve=new Set(["approval","answer"]);function Ce(e){return ve.has(e.status?.code??"")}const we=24*60*60*1e3,Ie=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()};function H(e,t){const n=t==="created"?e.created_at:e.updated_at;return typeof n!="number"||!Number.isFinite(n)||n<=0?null:n*1e3}const Me="last_user_at";function De(e){const t=e[Me],n=typeof t=="number"&&Number.isFinite(t)&&t>0?t:e.created_at;return typeof n!="number"||!Number.isFinite(n)||n<=0?null:n*1e3}function Te(e,t,n){if(I(e))return"running";const r=H(e,n);if(r===null)return"older";const o=Ie(t);return r>=o?"today":r>=o-6*we?"week":"older"}function In(e,t,n){const r={running:[],today:[],week:[],older:[]};for(const o of e)r[Te(o,t,n)].push(o);return r}function Ne(e,t,n){const r=H(e,n);if(r===null)return"";const o=Math.floor(Math.max(0,t-r)/6e4);if(o<1)return"now";if(o<60)return`${o}m`;const s=Math.floor(o/60);if(s<24)return`${s}h`;const i=Math.floor(s/24);if(i<7)return`${i}d`;const a=Math.floor(i/7);return i<365?`${a}w`:`${Math.floor(i/365)}y`}function Mn(e,t,n){const r=Ne(e,t,n);if(!r)return"";const o=n==="created"?"created":"last active";if(r==="now")return`${o} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},i=Number.parseInt(r,10),a=s[r.slice(-1)];return`${o} ${i} ${a}${i===1?"":"s"} ago`}const B=["pinned","running","today","week","older","agents","teams"],Dn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function Tn(e){return e==="agents"||e==="teams"}const b=8;function Le(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function Nn(e,t){return{...e,[t]:(e[t]??b)+b}}function Ln(e,t,n,r,o){const s=!(e[n]??r);return{expanded:{...e,[n]:s},caps:!s&&!o?Le(t,n):t}}function Bn(e,t,n,r){return(e||t!=="")&&(r>b||n.trim()!=="")}const kn="Collapse, then reopen, to restore the compact list";function xn(e){return(e??b)>b}const Hn=e=>`section-grown-hint-${e}`,Be=e=>e===1?"Show 1 more":`Show ${e} more`;function Wn(e,t){return`${Be(e)} ${t}`}const R={hidden:[],order:[...B],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0,pinnedAgents:[]},ke=10,_=[25,50],xe=50,He=500,We=64;function y(e){const t=Math.max(0,Math.floor(e));return t===0?ke:t<=_.length?_[t-1]:_[_.length-1]+(t-_.length)*xe}function Un(e,t){const n=y(e+1)-y(e),r=Math.max(0,Math.min(n,t));return r===1?"Show 1 more chat":`Show ${r} more chats`}function Fn(e,t,n){const r=y(t+1)-y(t),o=y(t),s=Math.min(o+r,e.length);let i=0;for(let l=o;l<s;l+=1)W(e[l])&&(i+=1);const a=Math.max(0,s-o-i);return a>0?a:Math.max(0,Math.min(r,n))}function W(e){return I(e)}function Ue(e){return Ce(e)?0:I(e)?1:2}function Fe(e,t){return I(e)?De(e):H(e,t)}function $e(e,t){return e===null&&t===null?0:e===null?1:t===null?-1:t-e}function $n(e,t,n){const r=e.map((o,s)=>({row:o,index:s,lane:t==="active-first"?Ue(o):0,at:Fe(o,n)}));return r.sort((o,s)=>o.lane-s.lane||$e(o.at,s.at)||o.index-s.index),r.map(o=>o.row)}function Gn(e,t){const{limit:n,currentId:r,searching:o=!1}=t;if(o)return{rows:[...e],lifted:!1,remaining:0};const s=[];let i=Math.max(0,n);for(const u of e){if(i>0){s.push(u),i-=1;continue}W(u)&&s.push(u)}const a=Math.max(0,e.length-s.length);if(!r)return{rows:s,lifted:!1,remaining:a};const l=e.find(u=>u.session_id===r)??null;return l===null||s.includes(l)?{rows:s,lifted:!1,remaining:a}:{rows:[l,...s],lifted:!0,remaining:a}}function Kn(e,t){if(t.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const n=y(t.loads),r=[];let o=n;for(const l of e){if(W(l)){r.push(l);continue}o>0&&(r.push(l),o-=1)}const s=t.currentId,i=s==null?null:e.find(l=>l.session_id===s)??null,a=i!==null&&!r.includes(i);return{rows:a&&i!==null?[i,...r]:r,lifted:a,hidden:e.length-r.length-(a?1:0),held:e.length}}function Yn(e){if(e.add<=0)return null;const t=e.add===1?"Show 1 more chat":`Show ${e.add} more chats`;if(e.drawn>=e.total)return{label:t,aria:t};const n=`${e.drawn} of ${e.total}`;return{label:`${t} · ${n}`,aria:`${t} · ${n} shown`}}const Ge="mt-4",Ke="mt-2";function jn(e){return e?Ge:Ke}function Xn(e,t,n,r){return n?e.toLocaleLowerCase().includes(n.toLocaleLowerCase())||(r??"").toLocaleLowerCase().includes(n.toLocaleLowerCase())||t>0:!0}function Qn(e,t){if(t==="section")return null;if(t==="flat")return[{key:"all",label:"",rows:[...e]}];const n=new Map;for(const s of e){const i=s.binding?.team||s.binding?.agent||"",a=i||"ungrouped",l=n.get(a)??{key:a,label:i||"Ungrouped",rows:[]};l.rows.push(s),n.set(a,l)}const r=[...n.values()],o=r.findIndex(s=>s.key==="ungrouped");return o>0&&r.push(...r.splice(o,1)),r}function Ye(e,t){return!e.hidden.includes(t)}function ie(e){return e.order.filter(t=>Ye(e,t))}function Vn(e,t){const n=e.hidden.includes(t)?e.hidden.filter(r=>r!==t):[...e.hidden,t];return{...e,hidden:n}}function zn(e,t,n){const r=ie(e),o=r.indexOf(t),s=r[o+n];if(o<0||s===void 0)return e;const i=e.order.indexOf(t),a=e.order.indexOf(s),l=[...e.order];return l[i]=s,l[a]=t,{...e,order:l}}const je=["running","today","week","older"];function X(e){return je.includes(e)}function Jn(e,t,n,r){if(!X(t)||r&&!r(t))return!1;const o=ie(e),s=o.indexOf(t);if(s<0)return!1;const i=o[s+n];return i===void 0||!X(i)?!1:r?r(i):!0}const Xe=["section","agent","flat"],Qe=["active-first","recent"];function Zn(e){if(typeof e!="object"||e===null)return R;const t=e,n=new Set(B),r=[];if(Array.isArray(t.order))for(const c of t.order)typeof c=="string"&&n.has(c)&&(r.includes(c)||r.push(c));for(const c of B)r.includes(c)||r.push(c);const o=[];if(Array.isArray(t.hidden))for(const c of t.hidden)typeof c=="string"&&n.has(c)&&(o.includes(c)||o.push(c));const s=Xe.includes(t.groupBy)?t.groupBy:R.groupBy,i=Ae.includes(t.basis)?t.basis:R.basis,a=Qe.includes(t.orderBy)?t.orderBy:R.orderBy,l=typeof t.loads=="number"&&Number.isFinite(t.loads)&&t.loads>0?Math.min(He,Math.floor(t.loads)):0,u=[];if(Array.isArray(t.pinnedAgents)){for(const c of t.pinnedAgents)if(typeof c=="string"&&c!==""&&!u.includes(c)){if(u.length>=We)break;u.push(c)}}const S=[],h=new Set;if(Array.isArray(t.pins))for(const c of t.pins)typeof c=="string"&&c.length!==0&&(h.has(c)||(h.add(c),S.push(c)));return{hidden:o,order:r,groupBy:s,basis:i,orderBy:a,loads:l,pins:S,pinnedAgents:u}}const Ve="both",ae="by-turn",k=[{value:"by-turn",label:"By turn"},{value:"by-response",label:"By response"}];function qn(e){for(const t of k)if(e===t.value)return t.value;return ae}function et(e){return k.find(t=>t.value===e)?.label??k[0].label}const Q=64,x=["canvas","run","browser","console"],ze={canvas:"isCanvasOpen",run:"isRunPanelOpen",browser:"isBrowserPaneOpen",console:"isConsolePaneOpen"};function le(e){return typeof e=="string"&&x.includes(e)}function U(e){return e.startsWith("draft:")}function M(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(r[0]===t)return r[1]}}function F(e){return e.length>Q?e.slice(e.length-Q):e}function ce(e,t,n){return F([...e.filter(([r])=>r!==t),[t,n]])}function Je(e,t,n){return M(e,t)!==n?e:e.filter(([r])=>r!==t)}function Ze(e,t,n){const r=M(e,t);return r===void 0?e:F([...e.filter(([o])=>o!==t&&o!==n),[n,r]])}const V=Object.freeze({isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1});function z(e,t,n){if(n||typeof t!="string")return V;const r=M(e,t);return r===void 0?V:{isCanvasOpen:r==="canvas",isRunPanelOpen:r==="run",isBrowserPaneOpen:r==="browser",isConsolePaneOpen:r==="console"}}function qe(e){if(!Array.isArray(e))return[];const t=new Map;for(const n of e){if(!Array.isArray(n)||n.length!==2)continue;const[r,o]=n;typeof r!="string"||r===""||U(r)||le(o)&&(t.delete(r),t.set(r,o))}return F([...t.entries()])}function nt(e){const t=new Set(Object.keys(e.forgotten));for(const[n,r]of Object.entries(e.archiveFacts))r?.archived===!0&&r.answered===!0&&t.add(n);return t}function J(e){return ze[e]}const en={canvas:"isCanvasOpen",run:"isRunPanelOpen",browser:"isBrowserPaneOpen",console:"isConsolePaneOpen"},E=e=>e.isCanvasOpen?"canvas":e.isRunPanelOpen?"run":e.isBrowserPaneOpen?"browser":e.isConsolePaneOpen?"console":e.isAskDrawerOpen?"ask":null,D=(e,t)=>e==="ask"?t.askDrawerScope==="fleet"||t.rightSlotRoute.mounted&&t.rightSlotRoute.session:t.rightSlotRoute.mounted?e!=="run"||t.rightSlotRoute.runDetails:!1,nn=e=>{const t=E(e);return t===null||t==="ask"?null:en[t]},O=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen",isAskDrawerOpen:e==="isAskDrawerOpen",askDrawerEvictedPane:null}),P=(e,t)=>{const n=e.rightSlotKey;return typeof n!="string"?{}:{rightSlotMemory:ce(e.rightSlotMemory,n,t)}},C=(e,t)=>{const n=e.rightSlotKey;if(typeof n!="string")return{};const r=Je(e.rightSlotMemory,n,t);return r===e.rightSlotMemory?{}:{rightSlotMemory:r}},tn=Object.freeze({mounted:!1,runDetails:!1,session:!1}),ue=Object.freeze([]);function tt(e,t){const n=E(t);if(n===null||!D(n,t))return 0;let r;switch(n){case"canvas":case"ask":r=Math.max(re,t.rightSlotWidth||w);break;case"run":r=Math.max(an,t.rightSlotWidth||w);break;case"browser":r=Math.max(ln,t.rightSlotWidth||w);break;case"console":r=Math.max(cn,t.rightSlotWidth||w);break}return e<=0?r:n==="canvas"||n==="ask"?Math.min(r,oe(e)):Math.min(r,Math.max(0,e-ne))}function rt(e){const t=E(e);return t!==null&&D(t,e)}function ot(e){const t=E(e);return t!==null&&D(t,e)?t:null}function st(e){const t=E(e);return(t==="canvas"||t==="ask")&&D(t,e)}const w=640,Z=A,rn=20,on=4,sn=20,an=320,ln=480,cn=480,un=5e3,it=(e,t)=>e.some(n=>n.surface===t),at=(e,t=Date.now())=>e.some(n=>t-n.at<un),fn=[],dn=3,hn=["chatMeasureWidth"],lt=ge()(ye((e,t)=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,transcriptDisplayMode:ae,themeName:de,rightSlotWidth:0,chatSidebarWidth:Z,chatSidebarRegions:Ve,chatSidebarView:R,chatSidebarListHeight:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,rightSlotKey:void 0,rightSlotMemory:ue,rightSlotLegacySeed:null,isAskDrawerOpen:!1,askDrawerScope:"session",askDrawerEvictedPane:null,rightSlotRoute:tn,consoleOpenIntent:null,runPanelReveal:null,browserPaneScope:"conversation",consoleActiveSurface:null,consoleUnseen:fn,isCreateAgentDialogOpen:!1,mentionRecents:null,profileRecents:{agent:[],team:[]},conversationRecents:[],openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:(n="")=>{e(r=>({isCommandPaletteOpen:!r.isCommandPaletteOpen,commandPaletteQuery:r.isCommandPaletteOpen?r.commandPaletteQuery:n}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTranscriptDisplayMode:n=>{e({transcriptDisplayMode:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(r=>n?{...O("isCanvasOpen"),...P(r,"canvas")}:{isCanvasOpen:!1,...C(r,"canvas")})},setRunPanelOpen:n=>{e(r=>n?{...O("isRunPanelOpen"),...P(r,"run")}:{isRunPanelOpen:!1,...C(r,"run")})},setBrowserPaneOpen:n=>{e(r=>n?{...O("isBrowserPaneOpen"),...P(r,"browser")}:{isBrowserPaneOpen:!1,...C(r,"browser")})},setConsolePaneOpen:n=>{e(r=>n?{...O("isConsolePaneOpen"),...P(r,"console")}:{isConsolePaneOpen:!1,...C(r,"console")})},setAskDrawerOpen:(n,r)=>{e(o=>{const s=typeof o.rightSlotKey=="string";if(n)return{...O("isAskDrawerOpen"),askDrawerScope:r,askDrawerEvictedPane:s?null:nn(o)};const i={isAskDrawerOpen:!1,askDrawerEvictedPane:null};return s?{...i,...z(o.rightSlotMemory,o.rightSlotKey,!1)}:o.rightSlotKey===null?i:{...i,...o.askDrawerEvictedPane===null?null:{[o.askDrawerEvictedPane]:!0}}})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(r=>r.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,r)=>{e(o=>o.consoleUnseen.some(s=>s.surface===r)?{}:{consoleUnseen:[...o.consoleUnseen,{sessionId:n,surface:r,at:Date.now()}]})},clearConsoleUnseen:n=>{const r=Array.isArray(n)?n:[n];e(o=>{const s=o.consoleUnseen.filter(i=>!r.includes(i.surface));return s.length===o.consoleUnseen.length?{}:{consoleUnseen:s}})},setRightSlotWidth:n=>{e({rightSlotWidth:n})},restoreDefaultRightSlotWidth:()=>{e({rightSlotWidth:0})},bindRightSlotKey:(n,r)=>{e(o=>{let s=o.rightSlotMemory,i=o.rightSlotLegacySeed;const a=r?.admittedFrom;return typeof a=="string"&&typeof n=="string"&&(s=Ze(s,a,n)),n===null||(U(n)?i=null:i!==null&&M(s,n)===void 0&&(s=ce(s,n,i),i=null)),{rightSlotKey:n,rightSlotMemory:s,rightSlotLegacySeed:i,...z(s,n,o.isAskDrawerOpen)}})},setRightSlotRoute:n=>{const r=t().rightSlotRoute;r.mounted===n.mounted&&r.runDetails===n.runDetails&&r.session===n.session||e({rightSlotRoute:{...n}})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(r=>({...O("isRunPanelOpen"),...P(r,"run"),runPanelReveal:{section:n,nonce:(r.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(r=>r.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(ee,Math.max(q,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:Z})},rememberMention:(n,r)=>{e(o=>{const s=o.mentionRecents,i=s?.cwd===n?s.paths:[],a=[r,...i.filter(l=>l!==r)].slice(0,rn);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,r)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:Sn(o.profileRecents[n]??[],r)}}))},rememberConversation:n=>{e(r=>{const o=mn(r.conversationRecents),s=pn(o,n);return s.length===o.length&&s.every((i,a)=>i===o[a])?r:{conversationRecents:s}})}}),{name:"ui-preferences-storage",version:dn,migrate:Pn,partialize:On,merge:_n}));function Sn(e,t){return[t,...e.filter(n=>n!==t)].slice(0,on)}function pn(e,t){return[t,...e.filter(n=>n!==t)].slice(0,sn)}const gn=[];function mn(e){return Array.isArray(e)?e:gn}function On(e){const{runPanelReveal:t,consoleOpenIntent:n,isAskDrawerOpen:r,askDrawerScope:o,askDrawerEvictedPane:s,rightSlotRoute:i,isCanvasOpen:a,isRunPanelOpen:l,isBrowserPaneOpen:u,isConsolePaneOpen:S,rightSlotKey:h,...c}=e;return{...c,rightSlotMemory:yn(e.rightSlotMemory)}}function yn(e){return(e??ue).filter(([t])=>!U(t))}function _n(e,t){const n=e??{},{isCanvasOpen:r,isRunPanelOpen:o,isBrowserPaneOpen:s,isConsolePaneOpen:i,...a}=n;return{...t,...a,rightSlotKey:t.rightSlotKey,rightSlotMemory:qe(n.rightSlotMemory),rightSlotLegacySeed:le(n.rightSlotLegacySeed)?n.rightSlotLegacySeed:null}}function Pn(e,t){const n={...e??{}};if(t<1&&Rn(n),t<2)for(const r of hn)delete n[r];if(t<3){let r=null;for(const o of x)if(n[J(o)]===!0){r=o;break}r!==null&&(n.rightSlotLegacySeed=r);for(const o of x)delete n[J(o)]}return n}function Rn(e){const t=[["canvasWidth",800],["runPanelWidth",420],["browserPanelWidth",640],["consolePanelWidth",796]];let n=0;for(const[r,o]of t){const s=e[r];if(typeof s=="number"&&s>0&&s!==o){n=s;break}}for(const[r]of t)delete e[r];e.rightSlotWidth=n}export{ln as $,Fn as A,xn as B,un as C,R as D,kn as E,Hn as F,Be as G,Wn as H,Nn as I,Kn as J,Yn as K,Ne as L,I as M,Mn as N,wn as O,Ln as P,et as Q,rt as R,Dn as S,k as T,tn as U,tt as V,An as W,re as X,oe as Y,an as Z,w as _,qn as a,cn as a0,j as a1,ne as a2,mn as a3,Cn as a4,se as a5,U as a6,nt as a7,me as a8,st as a9,En as aa,vn as ab,Pe as ac,L as ad,te as ae,ee as af,q as ag,ae as ah,at as b,ge as c,H as d,Ye as e,X as f,Tn as g,Jn as h,it as i,Zn as j,$n as k,Gn as l,zn as m,y as n,ie as o,ye as p,Bn as q,ot as r,In as s,Vn as t,lt as u,Xn as v,b as w,jn as x,Qn as y,Un as z};
|
|
1
|
+
import{b as G,D as de}from"./index-D1YFO5lM.js";const K=e=>{let t;const n=new Set,r=(u,S)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const c=t;t=S??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(p=>p(t,c))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,o,a);return a},he=e=>e?K(e):K,Se=e=>e;function pe(e,t=Se){const n=G.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return G.useDebugValue(n),n}const Y=e=>{const t=he(e),n=r=>pe(t,r);return Object.assign(n,t),n},ge=e=>e?Y(e):Y;function me(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=l=>l===null?null:JSON.parse(l,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const N=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return N(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return N(r)(n)}}}},Oe=(e,t)=>(n,r,o)=>{let s={storage:me(()=>localStorage),partialize:f=>f,version:0,merge:(f,m)=>({...m,...f}),...t},i=!1;const a=new Set,l=new Set;let u=s.storage;if(!u)return e((...f)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...f)},r,o);const S=()=>{const f=s.partialize({...r()});return u.setItem(s.name,{state:f,version:s.version})},h=o.setState;o.setState=(f,m)=>{h(f,m),S()};const c=e((...f)=>{n(...f),S()},r,o);o.getInitialState=()=>c;let p;const $=()=>{var f,m;if(!u)return;i=!1,a.forEach(d=>{var g;return d((g=r())!=null?g:c)});const v=((m=s.onRehydrateStorage)==null?void 0:m.call(s,(f=r())!=null?f:c))||void 0;return N(u.getItem.bind(u))(s.name).then(d=>{if(d)if(typeof d.version=="number"&&d.version!==s.version){if(s.migrate){const g=s.migrate(d.state,d.version);return g instanceof Promise?g.then(T=>[!0,T]):[!0,g]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,d.state];return[!1,void 0]}).then(d=>{var g;const[T,fe]=d;if(p=s.merge(fe,(g=r())!=null?g:c),n(p,!0),T)return S()}).then(()=>{v?.(p,void 0),p=r(),i=!0,l.forEach(d=>d(p))}).catch(d=>{v?.(void 0,d)})};return o.persist={setOptions:f=>{s={...s,...f},f.storage&&(u=f.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>$(),hasHydrated:()=>i,onHydrate:f=>(a.add(f),()=>{a.delete(f)}),onFinishHydration:f=>(l.add(f),()=>{l.delete(f)})},s.skipHydration||$(),p||c},_e=Oe,b=260,Z=220,ee=320,L=56,ye=b,Pe=1024,ne=480,te=44,re=400,Re=560;function oe(e){return Math.max(0,Math.min(Re,e-ne))}function j(e){return oe(e)>=re?"docked":"overlay"}function bn({capacity:e,min:t,max:n,drawn:r}){const o=e>=t;return o?{resizable:o,value:Math.min(Math.max(r,t),e),minWidth:t,maxWidth:Math.min(n,e)}:{resizable:o,value:r,minWidth:r,maxWidth:r}}function Ae(e,t=b,n=te){return j(e-se(t)-n)==="overlay"&&j(e-L-n)==="docked"}function se(e){return Number.isNaN(e)?b:Math.min(ee,Math.max(Z,e))}function En(e,t,n,r=b,o=!1,s=te){if(e>=Pe){const a=!t&&o&&Ae(e,r,s);return{mode:t||a?"strip":"docked",width:t||a?L:se(r),collapsed:t||a,sheetOpen:!1,resizable:!t&&!a}}return{mode:n?"overlay":"strip",width:n?ye:L,collapsed:!0,sheetOpen:n,resizable:!1}}function vn(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const Cn=e=>e?"⌘B":"Ctrl+B",be=["active","created"],wn={running:"Running",today:"Today",week:"This week",older:"Older"},Ee=new Set(["busy","delegating","approval","answer","wedged"]);function I(e){return Ee.has(e.status?.code??"")}const ve=new Set(["approval","answer"]);function Ce(e){return ve.has(e.status?.code??"")}const we=24*60*60*1e3,Ie=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()};function H(e,t){const n=t==="created"?e.created_at:e.updated_at;return typeof n!="number"||!Number.isFinite(n)||n<=0?null:n*1e3}const Me="last_user_at";function De(e){const t=e[Me],n=typeof t=="number"&&Number.isFinite(t)&&t>0?t:e.created_at;return typeof n!="number"||!Number.isFinite(n)||n<=0?null:n*1e3}function Te(e,t,n){if(I(e))return"running";const r=H(e,n);if(r===null)return"older";const o=Ie(t);return r>=o?"today":r>=o-6*we?"week":"older"}function In(e,t,n){const r={running:[],today:[],week:[],older:[]};for(const o of e)r[Te(o,t,n)].push(o);return r}function Ne(e,t,n){const r=H(e,n);if(r===null)return"";const o=Math.floor(Math.max(0,t-r)/6e4);if(o<1)return"now";if(o<60)return`${o}m`;const s=Math.floor(o/60);if(s<24)return`${s}h`;const i=Math.floor(s/24);if(i<7)return`${i}d`;const a=Math.floor(i/7);return i<365?`${a}w`:`${Math.floor(i/365)}y`}function Mn(e,t,n){const r=Ne(e,t,n);if(!r)return"";const o=n==="created"?"created":"last active";if(r==="now")return`${o} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},i=Number.parseInt(r,10),a=s[r.slice(-1)];return`${o} ${i} ${a}${i===1?"":"s"} ago`}const k=["pinned","running","today","week","older","agents","teams"],Dn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function Tn(e){return e==="agents"||e==="teams"}const A=8;function Le(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function Nn(e,t){return{...e,[t]:(e[t]??A)+A}}function Ln(e,t,n,r,o){const s=!(e[n]??r);return{expanded:{...e,[n]:s},caps:!s&&!o?Le(t,n):t}}function kn(e,t,n,r){return(e||t!=="")&&(r>A||n.trim()!=="")}const Bn="Collapse, then reopen, to restore the compact list";function xn(e){return(e??A)>A}const Hn=e=>`section-grown-hint-${e}`,ke=e=>e===1?"Show 1 more":`Show ${e} more`;function Wn(e,t){return`${ke(e)} ${t}`}const R={hidden:[],order:[...k],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0,pinnedAgents:[]},Be=10,y=[25,50],xe=50,He=500,We=64;function _(e){const t=Math.max(0,Math.floor(e));return t===0?Be:t<=y.length?y[t-1]:y[y.length-1]+(t-y.length)*xe}function Un(e,t){const n=_(e+1)-_(e),r=Math.max(0,Math.min(n,t));return r===1?"Show 1 more chat":`Show ${r} more chats`}function Fn(e,t,n){const r=_(t+1)-_(t),o=_(t),s=Math.min(o+r,e.length);let i=0;for(let l=o;l<s;l+=1)W(e[l])&&(i+=1);const a=Math.max(0,s-o-i);return a>0?a:Math.max(0,Math.min(r,n))}function W(e){return I(e)}function Ue(e){return Ce(e)?0:I(e)?1:2}function Fe(e,t){return I(e)?De(e):H(e,t)}function $e(e,t){return e===null&&t===null?0:e===null?1:t===null?-1:t-e}function $n(e,t,n){const r=e.map((o,s)=>({row:o,index:s,lane:t==="active-first"?Ue(o):0,at:Fe(o,n)}));return r.sort((o,s)=>o.lane-s.lane||$e(o.at,s.at)||o.index-s.index),r.map(o=>o.row)}function Gn(e,t){const{limit:n,currentId:r,searching:o=!1}=t;if(o)return{rows:[...e],lifted:!1,remaining:0};const s=[];let i=Math.max(0,n);for(const u of e){if(i>0){s.push(u),i-=1;continue}W(u)&&s.push(u)}const a=Math.max(0,e.length-s.length);if(!r)return{rows:s,lifted:!1,remaining:a};const l=e.find(u=>u.session_id===r)??null;return l===null||s.includes(l)?{rows:s,lifted:!1,remaining:a}:{rows:[l,...s],lifted:!0,remaining:a}}function Kn(e,t){if(t.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const n=_(t.loads),r=[];let o=n;for(const l of e){if(W(l)){r.push(l);continue}o>0&&(r.push(l),o-=1)}const s=t.currentId,i=s==null?null:e.find(l=>l.session_id===s)??null,a=i!==null&&!r.includes(i);return{rows:a&&i!==null?[i,...r]:r,lifted:a,hidden:e.length-r.length-(a?1:0),held:e.length}}function Yn(e){if(e.add<=0)return null;const t=e.add===1?"Show 1 more chat":`Show ${e.add} more chats`;if(e.drawn>=e.total)return{label:t,aria:t};const n=`${e.drawn} of ${e.total}`;return{label:`${t} · ${n}`,aria:`${t} · ${n} shown`}}const Ge="mt-4",Ke="mt-2";function jn(e){return e?Ge:Ke}function Xn(e,t,n,r){return n?e.toLocaleLowerCase().includes(n.toLocaleLowerCase())||(r??"").toLocaleLowerCase().includes(n.toLocaleLowerCase())||t>0:!0}function Qn(e,t){if(t==="section")return null;if(t==="flat")return[{key:"all",label:"",rows:[...e]}];const n=new Map;for(const s of e){const i=s.binding?.team||s.binding?.agent||"",a=i||"ungrouped",l=n.get(a)??{key:a,label:i||"Ungrouped",rows:[]};l.rows.push(s),n.set(a,l)}const r=[...n.values()],o=r.findIndex(s=>s.key==="ungrouped");return o>0&&r.push(...r.splice(o,1)),r}function Ye(e,t){return!e.hidden.includes(t)}function ie(e){return e.order.filter(t=>Ye(e,t))}function Vn(e,t){const n=e.hidden.includes(t)?e.hidden.filter(r=>r!==t):[...e.hidden,t];return{...e,hidden:n}}function zn(e,t,n){const r=ie(e),o=r.indexOf(t),s=r[o+n];if(o<0||s===void 0)return e;const i=e.order.indexOf(t),a=e.order.indexOf(s),l=[...e.order];return l[i]=s,l[a]=t,{...e,order:l}}const je=["running","today","week","older"];function X(e){return je.includes(e)}function Jn(e,t,n,r){if(!X(t)||r&&!r(t))return!1;const o=ie(e),s=o.indexOf(t);if(s<0)return!1;const i=o[s+n];return i===void 0||!X(i)?!1:r?r(i):!0}const Xe=["section","agent","flat"],Qe=["active-first","recent"];function qn(e){if(typeof e!="object"||e===null)return R;const t=e,n=new Set(k),r=[];if(Array.isArray(t.order))for(const c of t.order)typeof c=="string"&&n.has(c)&&(r.includes(c)||r.push(c));for(const c of k)r.includes(c)||r.push(c);const o=[];if(Array.isArray(t.hidden))for(const c of t.hidden)typeof c=="string"&&n.has(c)&&(o.includes(c)||o.push(c));const s=Xe.includes(t.groupBy)?t.groupBy:R.groupBy,i=be.includes(t.basis)?t.basis:R.basis,a=Qe.includes(t.orderBy)?t.orderBy:R.orderBy,l=typeof t.loads=="number"&&Number.isFinite(t.loads)&&t.loads>0?Math.min(He,Math.floor(t.loads)):0,u=[];if(Array.isArray(t.pinnedAgents)){for(const c of t.pinnedAgents)if(typeof c=="string"&&c!==""&&!u.includes(c)){if(u.length>=We)break;u.push(c)}}const S=[],h=new Set;if(Array.isArray(t.pins))for(const c of t.pins)typeof c=="string"&&c.length!==0&&(h.has(c)||(h.add(c),S.push(c)));return{hidden:o,order:r,groupBy:s,basis:i,orderBy:a,loads:l,pins:S,pinnedAgents:u}}const Ve="both",ae="by-turn",B=[{value:"by-turn",label:"By turn"},{value:"by-response",label:"By response"}];function Zn(e){for(const t of B)if(e===t.value)return t.value;return ae}function et(e){return B.find(t=>t.value===e)?.label??B[0].label}const Q=64,x=["canvas","run","browser","console"],ze={canvas:"isCanvasOpen",run:"isRunPanelOpen",browser:"isBrowserPaneOpen",console:"isConsolePaneOpen"};function le(e){return typeof e=="string"&&x.includes(e)}function U(e){return e.startsWith("draft:")}function M(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(r[0]===t)return r[1]}}function F(e){return e.length>Q?e.slice(e.length-Q):e}function ce(e,t,n){return F([...e.filter(([r])=>r!==t),[t,n]])}function Je(e,t,n){return M(e,t)!==n?e:e.filter(([r])=>r!==t)}function qe(e,t,n){const r=M(e,t);return r===void 0?e:F([...e.filter(([o])=>o!==t&&o!==n),[n,r]])}const V=Object.freeze({isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1});function z(e,t,n){if(n||typeof t!="string")return V;const r=M(e,t);return r===void 0?V:{isCanvasOpen:r==="canvas",isRunPanelOpen:r==="run",isBrowserPaneOpen:r==="browser",isConsolePaneOpen:r==="console"}}function Ze(e){if(!Array.isArray(e))return[];const t=new Map;for(const n of e){if(!Array.isArray(n)||n.length!==2)continue;const[r,o]=n;typeof r!="string"||r===""||U(r)||le(o)&&(t.delete(r),t.set(r,o))}return F([...t.entries()])}function nt(e){const t=new Set(Object.keys(e.forgotten));for(const[n,r]of Object.entries(e.archiveFacts))r?.archived===!0&&r.answered===!0&&t.add(n);return t}function J(e){return ze[e]}const en={canvas:"isCanvasOpen",run:"isRunPanelOpen",browser:"isBrowserPaneOpen",console:"isConsolePaneOpen"},E=e=>e.isCanvasOpen?"canvas":e.isRunPanelOpen?"run":e.isBrowserPaneOpen?"browser":e.isConsolePaneOpen?"console":e.isAskDrawerOpen?"ask":null,D=(e,t)=>e==="ask"?t.askDrawerScope==="fleet"||t.rightSlotRoute.mounted&&t.rightSlotRoute.session:t.rightSlotRoute.mounted?e!=="run"||t.rightSlotRoute.runDetails:!1,nn=e=>{const t=E(e);return t===null||t==="ask"?null:en[t]},O=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen",isAskDrawerOpen:e==="isAskDrawerOpen",askDrawerEvictedPane:null}),P=(e,t)=>{const n=e.rightSlotKey;return typeof n!="string"?{}:{rightSlotMemory:ce(e.rightSlotMemory,n,t)}},C=(e,t)=>{const n=e.rightSlotKey;if(typeof n!="string")return{};const r=Je(e.rightSlotMemory,n,t);return r===e.rightSlotMemory?{}:{rightSlotMemory:r}},tn=Object.freeze({mounted:!1,runDetails:!1,session:!1}),ue=Object.freeze([]);function tt(e,t){const n=E(t);if(n===null||!D(n,t))return 0;let r;switch(n){case"canvas":case"ask":r=Math.max(re,t.rightSlotWidth||w);break;case"run":r=Math.max(an,t.rightSlotWidth||w);break;case"browser":r=Math.max(ln,t.rightSlotWidth||w);break;case"console":r=Math.max(cn,t.rightSlotWidth||w);break}return e<=0?r:n==="canvas"||n==="ask"?Math.min(r,oe(e)):Math.min(r,Math.max(0,e-ne))}function rt(e){const t=E(e);return t!==null&&D(t,e)}function ot(e){const t=E(e);return t!==null&&D(t,e)?t:null}function st(e){const t=E(e);return(t==="canvas"||t==="ask")&&D(t,e)}const w=640,q=b,rn=20,on=4,sn=20,an=320,ln=480,cn=480,un=5e3,it=(e,t)=>e.some(n=>n.surface===t),at=(e,t=Date.now())=>e.some(n=>t-n.at<un),fn=[],dn=3,hn=["chatMeasureWidth"],lt=ge()(_e((e,t)=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,transcriptDisplayMode:ae,themeName:de,rightSlotWidth:0,chatSidebarWidth:q,chatSidebarRegions:Ve,chatSidebarView:R,chatSidebarListHeight:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,rightSlotKey:void 0,rightSlotMemory:ue,rightSlotLegacySeed:null,isAskDrawerOpen:!1,askDrawerScope:"session",askDrawerEvictedPane:null,askOpenIntent:null,rightSlotRoute:tn,consoleOpenIntent:null,runPanelReveal:null,browserPaneScope:"conversation",consoleActiveSurface:null,consoleUnseen:fn,isCreateAgentDialogOpen:!1,mentionRecents:null,profileRecents:{agent:[],team:[]},conversationRecents:[],openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:(n="")=>{e(r=>({isCommandPaletteOpen:!r.isCommandPaletteOpen,commandPaletteQuery:r.isCommandPaletteOpen?r.commandPaletteQuery:n}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTranscriptDisplayMode:n=>{e({transcriptDisplayMode:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(r=>n?{...O("isCanvasOpen"),...P(r,"canvas")}:{isCanvasOpen:!1,...C(r,"canvas")})},setRunPanelOpen:n=>{e(r=>n?{...O("isRunPanelOpen"),...P(r,"run")}:{isRunPanelOpen:!1,...C(r,"run")})},setBrowserPaneOpen:n=>{e(r=>n?{...O("isBrowserPaneOpen"),...P(r,"browser")}:{isBrowserPaneOpen:!1,...C(r,"browser")})},setConsolePaneOpen:n=>{e(r=>n?{...O("isConsolePaneOpen"),...P(r,"console")}:{isConsolePaneOpen:!1,...C(r,"console")})},setAskDrawerOpen:(n,r)=>{e(o=>{const s=typeof o.rightSlotKey=="string";if(n)return{...O("isAskDrawerOpen"),askDrawerScope:r,askDrawerEvictedPane:s?null:nn(o),askOpenIntent:null};const i={isAskDrawerOpen:!1,askDrawerEvictedPane:null,askOpenIntent:null};return s?{...i,...z(o.rightSlotMemory,o.rightSlotKey,!1)}:o.rightSlotKey===null?i:{...i,...o.askDrawerEvictedPane===null?null:{[o.askDrawerEvictedPane]:!0}}})},requestAskOpen:n=>{e({askOpenIntent:n})},clearAskOpenIntent:n=>{e(r=>r.askOpenIntent===n?{askOpenIntent:null}:{})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(r=>r.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,r)=>{e(o=>o.consoleUnseen.some(s=>s.surface===r)?{}:{consoleUnseen:[...o.consoleUnseen,{sessionId:n,surface:r,at:Date.now()}]})},clearConsoleUnseen:n=>{const r=Array.isArray(n)?n:[n];e(o=>{const s=o.consoleUnseen.filter(i=>!r.includes(i.surface));return s.length===o.consoleUnseen.length?{}:{consoleUnseen:s}})},setRightSlotWidth:n=>{e({rightSlotWidth:n})},restoreDefaultRightSlotWidth:()=>{e({rightSlotWidth:0})},bindRightSlotKey:(n,r)=>{e(o=>{let s=o.rightSlotMemory,i=o.rightSlotLegacySeed;const a=r?.admittedFrom;return typeof a=="string"&&typeof n=="string"&&(s=qe(s,a,n)),n===null||(U(n)?i=null:i!==null&&M(s,n)===void 0&&(s=ce(s,n,i),i=null)),{rightSlotKey:n,rightSlotMemory:s,rightSlotLegacySeed:i,...z(s,n,o.isAskDrawerOpen)}})},setRightSlotRoute:n=>{const r=t().rightSlotRoute;r.mounted===n.mounted&&r.runDetails===n.runDetails&&r.session===n.session||e({rightSlotRoute:{...n}})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(r=>({...O("isRunPanelOpen"),...P(r,"run"),runPanelReveal:{section:n,nonce:(r.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(r=>r.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(ee,Math.max(Z,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:q})},rememberMention:(n,r)=>{e(o=>{const s=o.mentionRecents,i=s?.cwd===n?s.paths:[],a=[r,...i.filter(l=>l!==r)].slice(0,rn);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,r)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:Sn(o.profileRecents[n]??[],r)}}))},rememberConversation:n=>{e(r=>{const o=mn(r.conversationRecents),s=pn(o,n);return s.length===o.length&&s.every((i,a)=>i===o[a])?r:{conversationRecents:s}})}}),{name:"ui-preferences-storage",version:dn,migrate:Pn,partialize:On,merge:yn}));function Sn(e,t){return[t,...e.filter(n=>n!==t)].slice(0,on)}function pn(e,t){return[t,...e.filter(n=>n!==t)].slice(0,sn)}const gn=[];function mn(e){return Array.isArray(e)?e:gn}function On(e){const{runPanelReveal:t,consoleOpenIntent:n,askOpenIntent:r,isAskDrawerOpen:o,askDrawerScope:s,askDrawerEvictedPane:i,rightSlotRoute:a,isCanvasOpen:l,isRunPanelOpen:u,isBrowserPaneOpen:S,isConsolePaneOpen:h,rightSlotKey:c,...p}=e;return{...p,rightSlotMemory:_n(e.rightSlotMemory)}}function _n(e){return(e??ue).filter(([t])=>!U(t))}function yn(e,t){const n=e??{},{isCanvasOpen:r,isRunPanelOpen:o,isBrowserPaneOpen:s,isConsolePaneOpen:i,...a}=n;return{...t,...a,rightSlotKey:t.rightSlotKey,rightSlotMemory:Ze(n.rightSlotMemory),rightSlotLegacySeed:le(n.rightSlotLegacySeed)?n.rightSlotLegacySeed:null}}function Pn(e,t){const n={...e??{}};if(t<1&&Rn(n),t<2)for(const r of hn)delete n[r];if(t<3){let r=null;for(const o of x)if(n[J(o)]===!0){r=o;break}r!==null&&(n.rightSlotLegacySeed=r);for(const o of x)delete n[J(o)]}return n}function Rn(e){const t=[["canvasWidth",800],["runPanelWidth",420],["browserPanelWidth",640],["consolePanelWidth",796]];let n=0;for(const[r,o]of t){const s=e[r];if(typeof s=="number"&&s>0&&s!==o){n=s;break}}for(const[r]of t)delete e[r];e.rightSlotWidth=n}export{ln as $,Fn as A,xn as B,un as C,R as D,Bn as E,Hn as F,ke as G,Wn as H,Nn as I,Kn as J,Yn as K,Ne as L,I as M,Mn as N,wn as O,Ln as P,et as Q,rt as R,Dn as S,B as T,tn as U,tt as V,bn as W,re as X,oe as Y,an as Z,w as _,Zn as a,cn as a0,j as a1,ne as a2,mn as a3,Cn as a4,se as a5,U as a6,nt as a7,me as a8,st as a9,En as aa,vn as ab,Pe as ac,L as ad,te as ae,ee as af,Z as ag,ae as ah,at as b,ge as c,H as d,Ye as e,X as f,Tn as g,Jn as h,it as i,qn as j,$n as k,Gn as l,zn as m,_ as n,ie as o,_e as p,kn as q,ot as r,In as s,Vn as t,lt as u,Xn as v,A as w,jn as x,Qn as y,Un as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as l,j as K}from"./error-boundary-CbYZ-DAA.js";import{t as j,c as F,n as Q,b as _,g as U,f as V,h as S,i as z,j as N,a as v}from"./en-US-BcB1DWxG.js";import{j as r,c as g,r as B}from"./index-D1YFO5lM.js";import{bM as q,bf as I,bN as P,aM as w,aG as Y,u as k,aN as b,aQ as G,aO as C,bG as Z,ah as W,a8 as D,bH as X}from"./conversation-input-sync-
|
|
1
|
+
import{c as l,j as K}from"./error-boundary-CbYZ-DAA.js";import{t as j,c as F,n as Q,b as _,g as U,f as V,h as S,i as z,j as N,a as v}from"./en-US-BcB1DWxG.js";import{j as r,c as g,r as B}from"./index-D1YFO5lM.js";import{bM as q,bf as I,bN as P,aM as w,aG as Y,u as k,aN as b,aQ as G,aO as C,bG as Z,ah as W,a8 as D,bH as X}from"./conversation-input-sync-Ct5RWQTE.js";import{au as J,av as ee,aw as L}from"./index-Qut_olKS.js";import{B as te}from"./book-open-B8mmzPUs.js";import{n as ae,o as ne,q as se,r as oe,s as ie,t as re,v as ce}from"./use-memberships-query-CKbos3dX.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/out/renderer/assets/{use-memberships-query-T3OHJv7s.js → use-memberships-query-CKbos3dX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ay as I,az as R,aA as L,aB as P,aC as h,aD as q,aE as E,aF as r,aG as w,aH as T,aI as S,aJ as N,aK as k,aL as O,aM as C}from"./conversation-input-sync-CGMxTg5-.js";const _={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},z=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function U(e){const n=e?.categories?.[0];return n&&E(n)?_[n]:_.other_harmful}function j(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${q} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function ne(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:U(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=j(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:z(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const x=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],F=/^(\d{3})\b/,B=new Set([404,410]),D=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],K=e=>{const n=e.toLowerCase();return D.some(t=>n.includes(t))||P(e)},M=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(R(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=x.reduce((i,s)=>i.replace(s,""),L(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(F.exec(a)?.[1]??Number.NaN);return B.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:K(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},H="The action did not complete.",te=(e,n,t)=>e==="download"?M(n,t):I(H,n),ae={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function G(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function oe(e){return r({operation:"agents.get",agentId:e})}async function se(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function ie(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function re(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function ue(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function le(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function ce(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function de(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function he(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function ge(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function be(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function Q(){return r({operation:"memberships.list"})}async function W(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function me(e){return r({operation:"org_teams.list",tenantId:e})}class m extends Error{status;reason;constructor(n,t,a){super(n),this.name="PublicHubError",this.status=t,this.reason=a}}const Y=/\/+$/,v=(e,n)=>{const t=e.replace(Y,"");return n?`${t}/v1/teams/${encodeURIComponent(n)}`:`${t}/v1/teams`},A=async e=>{let n;try{n=await fetch(e,{method:"GET",headers:{Accept:"application/json"},redirect:"error"})}catch(a){throw console.error("The public hub could not be reached:",a),new m("The public hub could not be reached.",null,a)}if(!n.ok)throw new m(`The public hub answered ${n.status}.`,n.status);let t;try{t=await n.json()}catch{throw new m("The public hub answered with a body that is not JSON.",n.status)}if(!t||typeof t!="object"||!("result"in t))throw new m("The public hub answered with a body this app cannot read.",n.status);return t};async function pe(e,n=1,t=12){const a=`${v(e)}?page=${n}&per_page=${t}`;return A(a)}async function ye(e,n){return A(v(e,n))}const J="download_count",p={all:["public-agents"],list:e=>[...p.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},b={all:["org-agents"],list:(e,n)=>[...b.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},X=e=>e&&e[0]===b.all[0]?String(e[2]??""):null,fe=e=>e.invalidateQueries({queryKey:p.all}),_e=(e,n)=>e.invalidateQueries({queryKey:n?[...b.all,"list",n]:b.all}),we=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=J,order:d="desc",tenantId:g}={})=>{const y={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},$=g?b.list(g,y):p.list(y),l=w({queryKey:$,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await W(g,e,n,u):await G(e,n,u)},select:u=>u.result,enabled:t,retry:T,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,f)=>X(f?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},Z={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function Te(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${Z[a]} ${o}.`})};return t("name",S(e.name)),t("description",N(e.description)),e.instructions!==null&&t("instructions",k(e.instructions)),t("tools",O(e.tools??[])),n}function ve(e,n){const t=h(e);return n.some(a=>h(a)===t)}function Ae(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function $e(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const V={all:["memberships"]},Ie=({enabled:e=!0}={})=>{const{isAuthenticated:n}=C(),t=w({queryKey:V.all,queryFn:async()=>(await Q()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:T});return{...t,memberships:t.data?.memberships??[]}};export{ae as P,se as a,Ie as b,ce as c,ge as d,te as e,me as f,oe as g,pe as h,fe as i,ye as j,m as k,de as l,we as m,be as n,p as o,ne as p,le as q,ue as r,re as s,ie as t,he as u,$e as v,_e as w,ve as x,Te as y,Ae as z};
|
|
1
|
+
import{ay as I,az as R,aA as L,aB as P,aC as h,aD as q,aE as E,aF as r,aG as w,aH as T,aI as S,aJ as N,aK as k,aL as O,aM as C}from"./conversation-input-sync-Ct5RWQTE.js";const _={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},z=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function U(e){const n=e?.categories?.[0];return n&&E(n)?_[n]:_.other_harmful}function j(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${q} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function ne(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:U(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=j(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:z(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const x=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],F=/^(\d{3})\b/,B=new Set([404,410]),D=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],K=e=>{const n=e.toLowerCase();return D.some(t=>n.includes(t))||P(e)},M=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(R(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=x.reduce((i,s)=>i.replace(s,""),L(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(F.exec(a)?.[1]??Number.NaN);return B.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:K(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},H="The action did not complete.",te=(e,n,t)=>e==="download"?M(n,t):I(H,n),ae={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function G(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function oe(e){return r({operation:"agents.get",agentId:e})}async function se(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function ie(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function re(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function ue(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function le(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function ce(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function de(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function he(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function ge(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function be(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function Q(){return r({operation:"memberships.list"})}async function W(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function me(e){return r({operation:"org_teams.list",tenantId:e})}class m extends Error{status;reason;constructor(n,t,a){super(n),this.name="PublicHubError",this.status=t,this.reason=a}}const Y=/\/+$/,v=(e,n)=>{const t=e.replace(Y,"");return n?`${t}/v1/teams/${encodeURIComponent(n)}`:`${t}/v1/teams`},A=async e=>{let n;try{n=await fetch(e,{method:"GET",headers:{Accept:"application/json"},redirect:"error"})}catch(a){throw console.error("The public hub could not be reached:",a),new m("The public hub could not be reached.",null,a)}if(!n.ok)throw new m(`The public hub answered ${n.status}.`,n.status);let t;try{t=await n.json()}catch{throw new m("The public hub answered with a body that is not JSON.",n.status)}if(!t||typeof t!="object"||!("result"in t))throw new m("The public hub answered with a body this app cannot read.",n.status);return t};async function pe(e,n=1,t=12){const a=`${v(e)}?page=${n}&per_page=${t}`;return A(a)}async function ye(e,n){return A(v(e,n))}const J="download_count",p={all:["public-agents"],list:e=>[...p.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},b={all:["org-agents"],list:(e,n)=>[...b.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},X=e=>e&&e[0]===b.all[0]?String(e[2]??""):null,fe=e=>e.invalidateQueries({queryKey:p.all}),_e=(e,n)=>e.invalidateQueries({queryKey:n?[...b.all,"list",n]:b.all}),we=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=J,order:d="desc",tenantId:g}={})=>{const y={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},$=g?b.list(g,y):p.list(y),l=w({queryKey:$,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await W(g,e,n,u):await G(e,n,u)},select:u=>u.result,enabled:t,retry:T,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,f)=>X(f?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},Z={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function Te(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${Z[a]} ${o}.`})};return t("name",S(e.name)),t("description",N(e.description)),e.instructions!==null&&t("instructions",k(e.instructions)),t("tools",O(e.tools??[])),n}function ve(e,n){const t=h(e);return n.some(a=>h(a)===t)}function Ae(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function $e(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const V={all:["memberships"]},Ie=({enabled:e=!0}={})=>{const{isAuthenticated:n}=C(),t=w({queryKey:V.all,queryFn:async()=>(await Q()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:T});return{...t,memberships:t.data?.memberships??[]}};export{ae as P,se as a,Ie as b,ce as c,ge as d,te as e,me as f,oe as g,pe as h,fe as i,ye as j,m as k,de as l,we as m,be as n,p as o,ne as p,le as q,ue as r,re as s,ie as t,he as u,$e as v,_e as w,ve as x,Te as y,Ae as z};
|
package/out/renderer/assets/{use-session-snapshot-DstlLx0a.js → use-session-snapshot-HxWT1FgH.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c}from"./conversation-input-sync-
|
|
1
|
+
import{d as c}from"./conversation-input-sync-Ct5RWQTE.js";import{r as n}from"./index-D1YFO5lM.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-
|
|
1
|
+
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-DT_2KFgE.js";import{v as kt,q as Tt,x as Rt}from"./conversation-input-sync-Ct5RWQTE.js";import"./index-D1YFO5lM.js";import"./ui-preferences-store-CyB3J7aO.js";import"./error-boundary-CbYZ-DAA.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<title>Local Operator Console Capture</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/consoleCapture-
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-Cx6ZHhaf.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/index-D1YFO5lM.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-CyB3J7aO.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-Col-23xm.js">
|
|
13
13
|
<link rel="stylesheet" crossorigin href="./assets/index-C-yIgqEU.css">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
|
15
15
|
</head>
|
package/out/renderer/index.html
CHANGED
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
<meta http-equiv="Content-Security-Policy"
|
|
32
32
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
33
33
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
34
|
-
<script type="module" crossorigin src="./assets/index-
|
|
34
|
+
<script type="module" crossorigin src="./assets/index-Qut_olKS.js"></script>
|
|
35
35
|
<link rel="modulepreload" crossorigin href="./assets/index-D1YFO5lM.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-
|
|
36
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-CyB3J7aO.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="./assets/error-boundary-CbYZ-DAA.js">
|
|
38
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
39
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
38
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-Ct5RWQTE.js">
|
|
39
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-Col-23xm.js">
|
|
40
40
|
<link rel="stylesheet" crossorigin href="./assets/index-C-yIgqEU.css">
|
|
41
41
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CIGg7Rga.css">
|
|
42
42
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
package/out/renderer/mini.html
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
<title>Local Operator Quick Send</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/mini-
|
|
9
|
+
<script type="module" crossorigin src="./assets/mini-CrSDWD2d.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/index-D1YFO5lM.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="./assets/error-boundary-CbYZ-DAA.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-CyB3J7aO.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-Ct5RWQTE.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-HxWT1FgH.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-C-yIgqEU.css">
|
|
16
16
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CIGg7Rga.css">
|
|
17
17
|
</head>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.13",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-he_pDMgK.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-BDwvRUW7.js";import{_ as i}from"./mermaid.core-he_pDMgK.js";import"./chunk-RZ5BOZE2-RHXeydLw.js";import"./conversation-input-sync-CGMxTg5-.js";import"./ui-preferences-store-DQd-JVqm.js";import"./index-D1YFO5lM.js";import"./error-boundary-CbYZ-DAA.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-BDwvRUW7.js";import{_ as i}from"./mermaid.core-he_pDMgK.js";import"./chunk-RZ5BOZE2-RHXeydLw.js";import"./conversation-input-sync-CGMxTg5-.js";import"./ui-preferences-store-DQd-JVqm.js";import"./index-D1YFO5lM.js";import"./error-boundary-CbYZ-DAA.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-DUHQgqI6.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-BHRU4PWJ.js";import{_ as i}from"./mermaid.core-he_pDMgK.js";import"./chunk-RZ5BOZE2-RHXeydLw.js";import"./conversation-input-sync-CGMxTg5-.js";import"./ui-preferences-store-DQd-JVqm.js";import"./index-D1YFO5lM.js";import"./error-boundary-CbYZ-DAA.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
|