@openhands/agent-canvas 1.0.0-beta.7 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/assets/{acp-providers-CPdgcp13.js → acp-providers-BAX8OU5C.js} +1 -1
- package/build/assets/{acp-route-guard-BoVmCn0e.js → acp-route-guard-HPk6TV-L.js} +1 -1
- package/build/assets/{active-backend-context-Beu-LZL-.js → active-backend-context-BSPE-W72.js} +1 -1
- package/build/assets/{add-backend-modal-BheqYXHK.js → add-backend-modal-mXKmfMI2.js} +1 -1
- package/build/assets/agent-server-client-options-9agOSarV.js +1 -0
- package/build/assets/{agent-server-compatibility-CdI3N7dr.js → agent-server-compatibility-B7QStIcH.js} +1 -1
- package/build/assets/{agent-server-conversation-service.api-CORdqJZg.js → agent-server-conversation-service.api-B9TUYJon.js} +3 -3
- package/build/assets/{agent-settings-UFvcGjoI.js → agent-settings-g3F623RJ.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-CVNugqzu.js → analytics-consent-form-modal-BQCNeNVt.js} +1 -1
- package/build/assets/{api-key-entry-screen-M6su2VSf.js → api-key-entry-screen-myuWMqzW.js} +1 -1
- package/build/assets/{app-settings-BlvBhBdc.js → app-settings-CCcX8ZEH.js} +1 -1
- package/build/assets/{automation-detail-BWrQk4Oa.js → automation-detail-BDHLHSJd.js} +1 -1
- package/build/assets/{automations-list-ux9KvYsU.js → automations-list-CiNtQhq_.js} +1 -1
- package/build/assets/{backend-form-modal-CDnEYjaU.js → backend-form-modal-D3bDMO3C.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-BTIj-Ffq.js → backend-synced-settings-badge-BkW5evM0.js} +1 -1
- package/build/assets/{condenser-settings-BolbDvm5.js → condenser-settings-DCTulgLO.js} +1 -1
- package/build/assets/conversation-BKhikfYl.js +1 -0
- package/build/assets/{conversation-D0N4dw_p.js → conversation-DTn8jN8L.js} +3 -3
- package/build/assets/conversation-panel-DfHR42mG.js +1 -0
- package/build/assets/{conversation-service.api-BsJy6uuL.js → conversation-service.api-B6CkzaKD.js} +1 -1
- package/build/assets/{conversation-websocket-context-DvHgx_FE.js → conversation-websocket-context-DShEuLjh.js} +1 -1
- package/build/assets/{edit-automation-modal-BpX-t-HD.js → edit-automation-modal-DamwL0s0.js} +1 -1
- package/build/assets/{entry.client-Ck9rQCg-.js → entry.client-Cn71WM8q.js} +1 -1
- package/build/assets/{extensions-hub-CE9QOb5n.js → extensions-hub-CUEmfvGy.js} +1 -1
- package/build/assets/{extensions-navigation-DSLGNGbS.js → extensions-navigation-VQ-3umJ7.js} +1 -1
- package/build/assets/{files-tab-cL668j1I.js → files-tab-C47fQEeL.js} +1 -1
- package/build/assets/{git-control-bar-branch-button-DtIrOrie.js → git-control-bar-branch-button-BT0aWH-o.js} +1 -1
- package/build/assets/{git-provider-icon-CHdGBdU2.js → git-provider-icon-Pi-Cxpgv.js} +1 -1
- package/build/assets/{home-Cz2Veg56.js → home-C3k6sFvB.js} +1 -1
- package/build/assets/{install-server-modal-B9nXCS3u.js → install-server-modal-6fuq-TU6.js} +1 -1
- package/build/assets/{launch-CWz0dm4o.js → launch-DGghLfGx.js} +1 -1
- package/build/assets/{llm-client-CYEaUjGx.js → llm-client-BqyLKgUN.js} +1 -1
- package/build/assets/{llm-settings-DFkXHuvT.js → llm-settings-BKraGtOu.js} +1 -1
- package/build/assets/llm-settings-DRQTgOF1.js +1 -0
- package/build/assets/{manage-backends-modal-DpBD_vR9.js → manage-backends-modal-CRMwyU0t.js} +1 -1
- package/build/assets/{manage-workspaces-modal-CtRbxREx.js → manage-workspaces-modal-BYmGD1W7.js} +1 -1
- package/build/assets/{manifest-eed90ff5.js → manifest-99b06a11.js} +1 -1
- package/build/assets/{mcp-BUe7kiYM.js → mcp-CfDRAmPn.js} +1 -1
- package/build/assets/{messages-dqp_KYyl.js → messages-Ba1vaw6t.js} +1 -1
- package/build/assets/{model-selector-BvSTrkhT.js → model-selector-DcztJSxT.js} +1 -1
- package/build/assets/{option-service.api-DmNVxAvS.js → option-service.api-CGNANEcT.js} +1 -1
- package/build/assets/{organization-service.api-DbnougaQ.js → organization-service.api-BeuMC9QL.js} +1 -1
- package/build/assets/{path-utils-onx24uF5.js → path-utils-z12iCrQO.js} +1 -1
- package/build/assets/{planner-tab-CmIjLz7q.js → planner-tab-Dte6Vzza.js} +1 -1
- package/build/assets/{profiles-client-fEmgWkCW.js → profiles-client-BrqNmaDV.js} +1 -1
- package/build/assets/{providers-CbD7fiic.js → providers-eUyo6pgr.js} +1 -1
- package/build/assets/{proxy-BAdHH8QB.js → proxy-BqDMnUY-.js} +1 -1
- package/build/assets/{recommended-automations-launcher-uTyODuzB.js → recommended-automations-launcher-D5ADbXao.js} +1 -1
- package/build/assets/{root-DmjpFpTu.js → root-BmhaEJJ8.js} +2 -2
- package/build/assets/{root-layout-DejMsKhy.js → root-layout-CNggm0d8.js} +2 -2
- package/build/assets/{sdk-section-page-BgDlMhcq.js → sdk-section-page-CRCRY3PG.js} +1 -1
- package/build/assets/{secrets-service-B7CxNinp.js → secrets-service-B9AFn9OE.js} +1 -1
- package/build/assets/{secrets-settings-yK7CqIpm.js → secrets-settings-0UrKMS60.js} +1 -1
- package/build/assets/{server-client-Kh4QSwDJ.js → server-client-DYv_GHPl.js} +1 -1
- package/build/assets/{settings-DN5PpgRD.js → settings-6t6LGW04.js} +1 -1
- package/build/assets/{settings-index-DKC8IY1P.js → settings-index-CR6Ou73o.js} +1 -1
- package/build/assets/{settings-modal-DJ4kGzUx.js → settings-modal-T_Yk1Zfo.js} +1 -1
- package/build/assets/{settings-service.api-C3rxTtPj.js → settings-service.api-DwtyDeGh.js} +1 -1
- package/build/assets/{shared-conversation-h9YnBtCU.js → shared-conversation-BzccsVej.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-D0-AvsnT.js → sidebar-mobile-menu-toggle-DGlRg6jG.js} +1 -1
- package/build/assets/{sidebar-nav-link-OhIeFyna.js → sidebar-nav-link-dgVb8Fpy.js} +1 -1
- package/build/assets/{skills-plugins-DNcsNF88.js → skills-plugins-DctDrZ8Y.js} +1 -1
- package/build/assets/{skills-settings-7liFiSY6.js → skills-settings-rvxImDj_.js} +1 -1
- package/build/assets/{terminal-CDhQGDua.js → terminal-KldRPIRT.js} +1 -1
- package/build/assets/{use-active-conversation-DHGcmjCK.js → use-active-conversation-sPgfSkql.js} +1 -1
- package/build/assets/{use-agent-settings-schema-CLoTOSJI.js → use-agent-settings-schema-B66kGIi_.js} +1 -1
- package/build/assets/{use-agent-state-PKrUPMJ3.js → use-agent-state-Dp3pD1h3.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Ddr75hEz.js → use-cloud-current-user-id-ClKFPjFz.js} +1 -1
- package/build/assets/{use-config-OIMQLQ2s.js → use-config-C9pvb0Sm.js} +1 -1
- package/build/assets/{use-create-conversation-Bszyp13O.js → use-create-conversation-B-lwTnfE.js} +1 -1
- package/build/assets/{use-get-secrets-8Jby8ele.js → use-get-secrets-oyC7PFRz.js} +1 -1
- package/build/assets/{use-handle-plan-click-CohJPvvW.js → use-handle-plan-click-DP6Rs-YP.js} +1 -1
- package/build/assets/{use-llm-profiles-C861aFAq.js → use-llm-profiles-Bh5JqZUZ.js} +1 -1
- package/build/assets/use-runtime-is-ready-BakOUVU-.js +1 -0
- package/build/assets/{use-save-settings-DkAOEfD9.js → use-save-settings-uXXkqvD7.js} +1 -1
- package/build/assets/{use-settings-D5hbTS9t.js → use-settings-DeO7nvpM.js} +1 -1
- package/build/assets/{use-settings-nav-items-BcSbo02d.js → use-settings-nav-items-BGMFn25b.js} +1 -1
- package/build/assets/{use-skills-D7PS0fH0.js → use-skills-DWIK3l3a.js} +1 -1
- package/build/assets/{use-unified-vscode-url-DEoe-NRI.js → use-unified-vscode-url-DXPtB317.js} +1 -1
- package/build/assets/{use-user-conversation-Cs5H1pUF.js → use-user-conversation-DJen4YIP.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-hTzSytKK.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js} +1 -1
- package/build/assets/{verification-settings-Dlt8pINd.js → verification-settings-C_zHuDx9.js} +1 -1
- package/build/assets/{vscode-tab-DgepcYtF.js → vscode-tab-DH9x7xXS.js} +1 -1
- package/build/index.html +4 -4
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +17 -0
- package/dist/api/agent-server-config.js +7 -1
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/scripts/static-server.mjs +15 -3
- package/build/assets/agent-server-client-options-HEOwGVIU.js +0 -1
- package/build/assets/conversation-DhRJuZLG.js +0 -1
- package/build/assets/conversation-panel-CNqHbS_Z.js +0 -1
- package/build/assets/llm-settings-DhrdCXqX.js +0 -1
- package/build/assets/use-runtime-is-ready-Do2h_hRl.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as r}from"./useMutation-GSSKKebK.js";import{o as i,t as a}from"./declaration-CR6HMp29.js";import{n as o}from"./QueryClientProvider-Cnr-Yl3j.js";import{t as s}from"./useTranslation-B6voJV4y.js";import{t as c}from"./retrieve-axios-error-message-BY-yIkIq.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{r as u}from"./vendor~home~mcp~automations-list-CZSK-lT2.js";import{n as d,r as f}from"./custom-toast-handlers-ufGJ6_Rc.js";import{a as p,c as m,i as h,l as g,n as _,r as v,s as y}from"./circle-plus-check-toggle-DKS8MAVV.js";import{t as b}from"./trash-2-CbVljPko.js";import{t as x}from"./x-JOBEVLW0.js";import{t as S}from"./utils-DCVfKFRt.js";import{n as C}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as r}from"./useMutation-GSSKKebK.js";import{o as i,t as a}from"./declaration-CR6HMp29.js";import{n as o}from"./QueryClientProvider-Cnr-Yl3j.js";import{t as s}from"./useTranslation-B6voJV4y.js";import{t as c}from"./retrieve-axios-error-message-BY-yIkIq.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{r as u}from"./vendor~home~mcp~automations-list-CZSK-lT2.js";import{n as d,r as f}from"./custom-toast-handlers-ufGJ6_Rc.js";import{a as p,c as m,i as h,l as g,n as _,r as v,s as y}from"./circle-plus-check-toggle-DKS8MAVV.js";import{t as b}from"./trash-2-CbVljPko.js";import{t as x}from"./x-JOBEVLW0.js";import{t as S}from"./utils-DCVfKFRt.js";import{n as C}from"./active-backend-context-BSPE-W72.js";import{a as w}from"./query-keys-tAsQcc_9.js";import{t as T}from"./modal-backdrop-RfNCrSpK.js";import{n as E}from"./modal-classes-6YqcqA6y.js";import{c as D,t as O}from"./brand-button-DJ_S16rO.js";import{t as k}from"./modal-close-button-CtWOUMmw.js";import{n as A,t as j}from"./settings-input-CehsXnb3.js";import{t as M}from"./confirmation-modal-B5Ca6qFE.js";import{t as N}from"./settings-service.api-DwtyDeGh.js";import{a as P,i as F,r as I}from"./use-settings-DeO7nvpM.js";import{t as ee}from"./settings-dropdown-input-BtoovFre.js";import{a as L,c as R,d as z,f as te,i as B,m as ne,n as re,p as V,r as H,s as U,t as W,u as G}from"./install-server-modal-6fuq-TU6.js";import{n as K}from"./extensions-navigation-VQ-3umJ7.js";import{t as q}from"./enum-filter-dropdown-5JeF2RLb.js";import{n as J}from"./settings-like-page-layout-classes-D7YjdTd0.js";import{t as Y}from"./acp-route-guard-HPk6TV-L.js";var ie=l(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),X=e(t(),1);function Z(){let e=o(),{data:t}=I();return r({mutationFn:async e=>{let n=F(t?.agent_settings?.mcp_config),r={sse_servers:[...n.sse_servers],stdio_servers:[...n.stdio_servers],shttp_servers:[...n.shttp_servers]},i=e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`&&`url`in e){let t=e.url;return typeof t==`string`?t:void 0}};if(e.type===`sse`){if(!e.url)return;let t=r.sse_servers.findIndex(t=>i(t)===e.url);t>=0&&r.sse_servers.splice(t,1)}else if(e.type===`shttp`){if(!e.url)return;let t=r.shttp_servers.findIndex(t=>i(t)===e.url);t>=0&&r.shttp_servers.splice(t,1)}else if(e.type===`stdio`){if(!e.name||!e.command)return;let t=r.stdio_servers.findIndex(t=>t.name===e.name&&t.command===e.command&&JSON.stringify(t.args??[])===JSON.stringify(e.args??[]));t>=0&&r.stdio_servers.splice(t,1)}else return;await N.saveSettings({agent_settings_diff:{mcp_config:P(r)}})},onSuccess:()=>{e.invalidateQueries({queryKey:w.personal()})}})}var Q=i();function ae(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function oe(e){return e.type===`stdio`?e.name??e.command??``:e.url??``}function se(e){if(e.type===`stdio`){let t=e.args&&e.args.length>0?` ${e.args.join(` `)}`:``;return`${e.command??``}${t}`.trim()}return e.url??``}function ce({server:e,onEdit:t,onDelete:n}){let{t:r}=s(`openhands`),i=L(e,G(u)),o=i?.name??oe(e),c=se(e),l=ae(e.type);return(0,Q.jsx)(`div`,{"data-testid":`mcp-server-item`,"data-server-id":e.id,role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"aria-label":r(a.MCP$EDIT_SERVER_ARIA,{name:o}),className:S(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,y,p),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:i,fallback:(0,Q.jsx)(ie,{strokeWidth:2.25})}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,title:o,children:o}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:l})]}),(0,Q.jsx)(_,{testId:`mcp-installed-toggle-${e.id}`,isSelected:!0,onToggle:e=>{e||n()},enableLabelKey:a.MCP$TOGGLE_ADD_SERVER,disableLabelKey:a.MCP$TOGGLE_REMOVE_SERVER})]}),i?.description?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-description-${e.id}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:i.description}):null,c?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-detail-${e.id}`,className:`truncate text-xs text-tertiary-alt`,title:c,children:c}):null]})]})})}function le({servers:e,hasAnyInstalled:t,query:n=``,onEdit:r,onDelete:i}){let{t:o}=s(`openhands`);return e.length===0?t&&n.trim().length>0?(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-empty-search`,className:`rounded-xl border border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:o(a.MCP$SEARCH_EMPTY)})}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-installed-empty`,className:m,children:[(0,Q.jsx)(`p`,{className:`text-sm text-white`,children:o(a.MCP$INSTALLED_EMPTY_TITLE)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light mt-1`,children:o(a.MCP$INSTALLED_EMPTY_HINT)})]}):(0,Q.jsx)(`div`,{className:h,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-list`,className:v,children:e.map(e=>(0,Q.jsx)(ce,{server:e,onEdit:()=>r(e),onDelete:()=>i(e.id)},e.id))})})}function ue({entry:e,onClick:t,onAdd:n}){let r=U(e),i=(()=>{switch(r?.kind){case`stdio`:return`STDIO`;case`shttp`:return`HTTP`;case`sse`:return`SSE`;default:return``}})();return(0,Q.jsx)(`button`,{type:`button`,onClick:t,"data-testid":`mcp-marketplace-card-${e.id}`,className:S(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,y,p),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:e}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:i})]}),(0,Q.jsx)(_,{testId:`mcp-marketplace-toggle-${e.id}`,isSelected:!1,onToggle:e=>{e&&n()},enableLabelKey:a.MCP$TOGGLE_ADD_SERVER,disableLabelKey:a.MCP$TOGGLE_ADD_SERVER})]}),(0,Q.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-tertiary-light`,children:e.description})]})]})})}function de({backendKind:e,onSelect:t,onAdd:n,query:r=``}){let{t:i}=s(`openhands`),o=R(G(u)).filter(t=>te(t,e)&&V(t,r));return(0,Q.jsxs)(`section`,{"data-testid":`mcp-marketplace-section`,className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-medium text-foreground`,children:i(a.MCP$LIBRARY_TITLE)}),o.length===0?(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-empty`,className:`rounded-xl border border-dashed border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:i(a.MCP$SEARCH_EMPTY)})}):(0,Q.jsx)(`div`,{className:h,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-grid`,className:v,children:o.map(e=>(0,Q.jsx)(ue,{entry:e,onClick:()=>t(e),onAdd:()=>n(e)},e.id))})})]})}function fe({mode:e,server:t,existingServers:n,onSubmit:r,onCancel:i,onDelete:o,isActionDisabled:c=!1,onTest:l,isTestPending:u=!1,testMessage:d=null}){let{t:f}=s(`openhands`),[p,m]=X.useState(t?.type||`sse`),[h,g]=X.useState(null),_=X.useRef(null),v=[{key:`sse`,label:f(a.SETTINGS$MCP_SERVER_TYPE_SSE)},{key:`stdio`,label:f(a.SETTINGS$MCP_SERVER_TYPE_STDIO)},{key:`shttp`,label:f(a.SETTINGS$MCP_SERVER_TYPE_SHTTP)}],y=e=>{if(!e)return f(a.SETTINGS$MCP_ERROR_URL_REQUIRED);try{let t=new URL(e);if(![`http:`,`https:`].includes(t.protocol))return f(a.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL)}catch{return f(a.SETTINGS$MCP_ERROR_URL_INVALID)}return null},x=e=>e?/^[a-zA-Z0-9_-]+$/.test(e)?null:f(a.SETTINGS$MCP_ERROR_NAME_INVALID):f(a.SETTINGS$MCP_ERROR_NAME_REQUIRED),C=r=>!n||!(e===`add`||e===`edit`&&t?.name!==r)?null:n.filter(e=>e.type===`stdio`).map(e=>e.name).filter(Boolean).includes(r)?f(a.SETTINGS$MCP_ERROR_NAME_DUPLICATE):null,w=e=>e?e.includes(` `)?f(a.SETTINGS$MCP_ERROR_COMMAND_NO_SPACES):null:f(a.SETTINGS$MCP_ERROR_COMMAND_REQUIRED),T=r=>{if(!n)return null;let i=t?.url;return(e===`add`||e===`edit`&&i!==r)&&n.some(e=>(e.type===`sse`||e.type===`shttp`)&&e.url===r)?f(a.SETTINGS$MCP_ERROR_URL_DUPLICATE):null},E=e=>{if(!e.trim())return null;let t=e.split(`
|
|
2
2
|
`);for(let e=0;e<t.length;e+=1){let n=t[e].trim();if(n){let e=n.indexOf(`=`);if(e===-1||!n.substring(0,e).trim())return f(a.SETTINGS$MCP_ERROR_ENV_INVALID_FORMAT)}}return null},k=e=>{if(!e.trim())return null;let t=parseInt(e.trim(),10);return Number.isNaN(t)?f(a.SETTINGS$MCP_ERROR_TIMEOUT_INVALID_NUMBER):t<=0?f(a.SETTINGS$MCP_ERROR_TIMEOUT_POSITIVE):t>3600?f(a.SETTINGS$MCP_ERROR_TIMEOUT_MAX_EXCEEDED):null},M=e=>{let t=e.get(`name`)?.toString().trim()||``,n=e.get(`command`)?.toString().trim()||``,r=e.get(`env`)?.toString()||``;return x(t)||C(t)||w(n)||E(r)||null},N=e=>{if(p===`sse`||p===`shttp`){let t=e.get(`url`)?.toString().trim()||``,n=y(t);if(n)return n;let r=T(t);if(r)return r;if(p===`shttp`){let t=k(e.get(`timeout`)?.toString()||``);if(t)return t}return null}return p===`stdio`?M(e):null},P=e=>{let t={},n=e.trim();if(!n)return t;for(let e of n.split(`
|
|
3
3
|
`)){let n=e.trim(),r=n.indexOf(`=`),i=r>=0?n.substring(0,r).trim():``;n&&r!==-1&&i&&(t[i]=n.substring(r+1).trim())}return t},F=e=>e?Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`
|
|
4
4
|
`):``,I=e=>{let n={id:t?.id||`${p}-${Date.now()}`,type:p};if(p===`sse`||p===`shttp`){let t=e.get(`url`)?.toString().trim(),r=e.get(`api_key`)?.toString().trim(),i=e.get(`timeout`)?.toString().trim(),a={...n,url:t,...r&&{api_key:r}};if(p===`shttp`&&i){let e=parseInt(i,10);Number.isNaN(e)||(a.timeout=e)}return a}let r=e.get(`name`)?.toString().trim(),i=e.get(`command`)?.toString().trim(),a=e.get(`args`)?.toString().trim(),o=e.get(`env`)?.toString().trim(),s=a?a.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{u as n}from"./path-utils-onx24uF5.js";import{t as r}from"./useMutation-GSSKKebK.js";import{o as i,t as a}from"./declaration-CR6HMp29.js";import{t as o}from"./Trans-4jmk54WC.js";import{t as s}from"./useTranslation-B6voJV4y.js";import{a as c}from"./i18n-DET2iOyh.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{t as u}from"./chevron-down-Bnmd5iG-.js";import{d,l as f,m as p,n as m,u as h}from"./conversation-websocket-context-DvHgx_FE.js";import{A as g,S as _,t as v}from"./utils-DCVfKFRt.js";import{n as y}from"./common-DqjLSBOt.js";import{t as ee}from"./use-config-OIMQLQ2s.js";import{f as te,m as b,p as ne}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-CbAhtEMv.js";import{t as re}from"./styled-tooltip-hdfMXPQC.js";import{t as ie}from"./react-Dy05vyj5.js";import{s as x}from"./conversation-local-storage-YmOVXxxW.js";import{t as S}from"./conversation-store-CC-isCnP.js";import{n as C}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DW31UyBp.js";import{t as ae}from"./skills-0GRKX5Xj.js";import{t as oe}from"./close-BU5iTc66.js";import{n as se,r as w,t as ce}from"./use-active-conversation-DHGcmjCK.js";import{t as le}from"./use-agent-state-PKrUPMJ3.js";import{C as ue,a as de,g as fe,i as T,r as E,t as pe,v as D,y as O}from"./use-event-store-BomO7ywK.js";import{r as k}from"./typography-BDgnT7Yp.js";import{t as me}from"./lesson-plan-duSsqWVs.js";import{n as he,t as A}from"./markdown-renderer-B3IAVfv4.js";import{t as ge}from"./u-check-circle-DOauqQKb.js";import{n as _e,r as ve,t as ye}from"./plan-components-CRDMQzsS.js";import{n as be,t as xe}from"./u-check-circle-half-steSK_JB.js";var Se=l(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(t(),1);function Ce(){!ne.current&&te();let[e]=(0,j.useState)(b.current);return e}var M=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(M||{});function we(){let{conversationId:e}=w(),t=m();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Te(e,t,n,r){return{action:M.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var N=i(),P=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),F=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function Ee({status:e}){return(0,N.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,N.jsx)(C,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function I({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let[s,c]=j.useState(r),l=t?(0,N.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`cursor-pointer text-left`,"aria-label":s?`Collapse`:`Expand`,children:s?(0,N.jsx)(F,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,N.jsx)(P,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,N.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&l,o,(0,N.jsx)(`span`,{children:e}),i===`after`&&l]}),(0,N.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,N.jsx)(Ee,{status:n})]})]}),s&&(typeof t==`string`?(0,N.jsx)(A,{children:t}):t)]})}var De=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,N.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,N.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,N.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,N.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,N.jsx)(`defs`,{children:(0,N.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,N.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function Oe({profile:e}){let[t,r]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,N.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,N.jsx)(u,{size:14}):(0,N.jsx)(n,{size:14})}),(0,N.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`hr`,{className:`border-neutral-700`}),(0,N.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function ke({conversationId:e,anchorEventId:t}){let n=h(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,N.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,N.jsx)(I,{title:(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,N.jsx)(De,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,N.jsx)(o,{i18nKey:a.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,N.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,N.jsx)(I,{title:(0,N.jsx)(`span`,{children:t?(0,N.jsx)(o,{i18nKey:a.MODEL$NO_SAVED_PROFILES}):(0,N.jsx)(o,{i18nKey:a.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,N.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,N.jsx)(o,{i18nKey:a.MODEL$NO_PROFILES_HINT})}):(0,N.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,N.jsx)(Oe,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var L=(0,j.createContext)(void 0);function Ae({children:e,value:t}){let n=ve(j.useRef(null)),r=t||n;return(0,N.jsx)(L.Provider,{value:r,children:e})}function je(){let e=(0,j.useContext)(L);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function Me(){return(0,j.useContext)(L)}var R=()=>{let{setConversationMode:e}=S(),{send:t}=we(),{conversationId:n}=w(),r=d(e=>e.enqueuePendingMessage),i=d(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Te(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}};function Ne(){let{conversationId:e}=se(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=S(),{setSelectedTab:a}=x(e),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var z=300,Pe=ye(`shine-text`);function Fe({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=s(`openhands`),{navigateToTab:i}=Ne(),{handleBuildPlanClick:o}=R(),{scrollDomToBottom:c}=je(),l=()=>{i(`planner`)},u=(0,j.useCallback)(e=>{o(e),c()},[o,c]),d=(0,j.useMemo)(()=>e?e.length<=z?e:`${e.slice(0,z)}...`:``,[e]);return e?(0,N.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,N.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,N.jsx)(me,{width:18,height:18,color:`var(--oh-muted)`}),(0,N.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$PLAN_MD)}),(0,N.jsx)(`div`,{className:`flex-1`}),(0,N.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,N.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$VIEW)}),(0,N.jsx)(Se,{className:`text-white`,size:18})]})]}),(0,N.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:d&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(A,{includeStandard:!0,components:t?Pe:_e,children:d}),e&&e.length>z&&(0,N.jsx)(`button`,{type:`button`,onClick:l,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(a.COMMON$READ_MORE)})]})}),(0,N.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,N.jsx)(`button`,{type:`button`,onClick:u,disabled:n,className:v(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,N.jsxs)(k.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(a.COMMON$BUILD),` `,(0,N.jsx)(k.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function Ie({errorId:e,defaultMessage:t}){let{t:n}=s(`openhands`),[r,i]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&c.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,N.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,N.jsx)(F,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,N.jsx)(P,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,N.jsx)(A,{children:t})]})}function Le({event:e}){return de(e)?(0,N.jsx)(Ie,{errorId:e.id,defaultMessage:e.error}):null}var Re=`200%`,B=8,ze=B*2;function Be({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=Ce(),c=`oh-text-shimmer-${(0,j.useId)().replace(/:/g,``)}`,l=(0,j.useMemo)(()=>Math.min(B/2-1,1+i/2),[i]),u=(0,j.useMemo)(()=>{let e=B/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${B}%)`,backgroundSize:`${Re} 100%`,backgroundRepeat:`no-repeat`,WebkitBackgroundClip:`text`,backgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`,animation:`${c} ${r}s linear infinite`}},[c,l,r,a]);return s?(0,N.jsx)(t,{className:v(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${ze}% center}to{background-position:0% center}}`}}),(0,N.jsx)(t,{className:v(`relative inline-block`,n),style:u,...o,children:e})]})}var Ve=j.memo(Be),He=3,V=24;function Ue({className:e}){return(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,N.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,className:`fill-[var(--oh-foreground)] transition-colors duration-150 group-hover:fill-[var(--oh-text-secondary)]`}),(0,N.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var We={p:({children:e})=>(0,N.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function Ge({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=s(`openhands`),o=j.useRef(null),[c,l]=j.useState(!1);j.useLayoutEffect(()=>{let t=o.current;if(!t||n){l(!1),r(!1);return}let i=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),i=He*(Number.isFinite(n)&&n>0?n:V),a=(e.match(/\n/g)??[]).length,o=t.scrollHeight>i+1||a>=He||e.trim().length>220;l(e=>(e!==o&&r(o),o))};i();let a=new ResizeObserver(i);return a.observe(t),()=>a.disconnect()},[e,n,r]);let u=c&&!n;return(0,N.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,N.jsx)(`div`,{ref:o,className:v(`text-sm leading-6 whitespace-normal [word-break:break-word]`,u&&`line-clamp-3`),children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:e})}),u?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{"aria-hidden":!0,"data-testid":`chat-message-truncation-gradient`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-tertiary to-transparent`}),(0,N.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:v(`pointer-events-none absolute bottom-1 left-1/2 z-10 inline-flex -translate-x-1/2 items-center rounded-full border border-[var(--oh-border-subtle)] bg-[var(--oh-surface-raised)] px-2.5 py-0.5 text-xs font-normal text-[var(--oh-foreground)] transition-opacity duration-150`,t?`opacity-100`:`opacity-0`),children:i(a.COMMON$VIEW_MORE)})]}):null]})}function H({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:o,onRetry:c,onStop:l}){let{t:u}=s(`openhands`),[d,f]=j.useState(!1),[p,m]=j.useState(!1),[h,g]=j.useState(!1),[_,y]=j.useState(!1),[ee,te]=j.useState(!0),b=j.useRef(null);j.useEffect(()=>{g(!1)},[t]);let ne=async()=>{await navigator.clipboard.writeText(t),m(!0)};j.useEffect(()=>{let e;return p&&(e=setTimeout(()=>{m(!1)},2e3)),()=>{clearTimeout(e)}},[p]);let ie=e===`user`&&(o===`error`||o===`sending`),x=o===`sending`&&l!=null,S=x&&d,C=e===`user`&&o==null,ae=C&&_&&!h,oe=j.Children.count(n)>0;j.useLayoutEffect(()=>{if(!x||C)return;let e=b.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:V;te(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,x,C]);let se=C?(0,N.jsx)(Ge,{message:t,isHovering:d,isExpanded:h,onTruncatableChange:y}):(0,N.jsx)(`div`,{ref:b,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:t})}),w=(0,N.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":o,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:v(`rounded-xl relative w-fit max-w-full flex flex-col`,oe&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,o===`error`&&`border border-[var(--oh-status-error)]/40`,!ie&&`last:mb-4`),children:[(0,N.jsxs)(`div`,{className:v(`absolute -top-2.5 -right-2.5 z-10`,!d||o===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,N.jsx)(re,{content:e.tooltip,placement:`top`,children:(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,N.jsx)(he,{isHidden:!d,isDisabled:p,onClick:ne,mode:p?`copied`:`copy`})]}),se,x?(0,N.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),l?.()},"data-testid":`chat-message-stop`,"aria-label":u(a.BUTTON$STOP),"aria-hidden":!S,tabIndex:S?0:-1,className:v(`group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150`,ee?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,S?`opacity-100`:`pointer-events-none opacity-0`),children:(0,N.jsx)(Ue,{className:`block h-7 w-7 max-w-none`})}):null,ae?(0,N.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":u(a.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>g(!0)}):null,n]});return e===`user`&&o===`error`?(0,N.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[w,(0,N.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,N.jsx)(`span`,{children:u(a.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),c?(0,N.jsx)(`button`,{type:`button`,onClick:c,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:u(a.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&o===`sending`?(0,N.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[w,(0,N.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,N.jsx)(Ve,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:u(a.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):w}function Ke({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function qe({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Je({onClick:e,className:t}){return(0,N.jsx)(`button`,{type:`button`,onClick:e,className:v(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,N.jsx)(oe,{width:18,height:18})})}function Ye({src:e,size:t=`small`}){return(0,N.jsx)(`img`,{role:`img`,alt:``,src:e,className:v(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Xe({src:e,onRemove:t,size:n=`small`}){return(0,N.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,N.jsx)(Ye,{src:e,size:n}),t&&(0,N.jsx)(Je,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Ze({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,N.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,N.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(Ke,{active:!o})}),(0,N.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:v(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,N.jsx)(Xe,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,N.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(qe,{active:!c})})]})}function Qe({type:e,onClick:t}){let{t:n}=s(`openhands`),r=e===`confirm`,i=n(r?a.ACTION$CONFIRM:a.ACTION$REJECT),o=n(r?a.CHAT_INTERFACE$USER_CONFIRMED:a.CHAT_INTERFACE$USER_REJECTED),c=r?`${n(a.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(a.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,N.jsx)(re,{closeDelay:100,content:o,children:(0,N.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:v(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:c})})}function $e({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,N.jsxs)(`div`,{className:v(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,N.jsx)(`span`,{className:``,children:n}),(0,N.jsx)(`span`,{className:`font-bold`,children:i}),(0,N.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var et=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,N.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,N.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,N.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),tt=ie(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),nt=()=>r({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return f.respondToConfirmation(e,t,i,n)}});function rt(){let e=tt(e=>e.submittedEventIds),t=tt(e=>e.addSubmittedEventId),{t:n}=s(`openhands`),{data:r}=ce(),{curAgentState:i}=le(),{mutate:o}=nt(),c=pe(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===_.AWAITING_USER_CONFIRMATION:!1),l=(0,j.useCallback)(e=>{!c||!r||(t(c.id),o({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[c,r,t,o]);return(0,j.useEffect)(()=>{if(!c)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),l(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),l(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[c,l]),i!==_.AWAITING_USER_CONFIRMATION||!c||e.includes(c.id)?null:(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(T(c)?c.security_risk:y.UNKNOWN)===y.HIGH&&(0,N.jsx)($e,{content:n(a.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,N.jsx)(et,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(a.COMMON$HIGH_RISK)}),(0,N.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,N.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(a.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(Qe,{type:`reject`,onClick:()=>l(!1)}),(0,N.jsx)(Qe,{type:`confirm`,onClick:()=>l(!0)})]})]})]})}var it=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{u as n}from"./path-utils-z12iCrQO.js";import{t as r}from"./useMutation-GSSKKebK.js";import{o as i,t as a}from"./declaration-CR6HMp29.js";import{t as o}from"./Trans-4jmk54WC.js";import{t as s}from"./useTranslation-B6voJV4y.js";import{a as c}from"./i18n-DET2iOyh.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{t as u}from"./chevron-down-Bnmd5iG-.js";import{d,l as f,m as p,n as m,u as h}from"./conversation-websocket-context-DShEuLjh.js";import{A as g,S as _,t as v}from"./utils-DCVfKFRt.js";import{n as y}from"./common-DqjLSBOt.js";import{t as ee}from"./use-config-C9pvb0Sm.js";import{f as te,m as b,p as ne}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-CbAhtEMv.js";import{t as re}from"./styled-tooltip-hdfMXPQC.js";import{t as ie}from"./react-Dy05vyj5.js";import{s as x}from"./conversation-local-storage-YmOVXxxW.js";import{t as S}from"./conversation-store-CC-isCnP.js";import{n as C}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DW31UyBp.js";import{t as ae}from"./skills-0GRKX5Xj.js";import{t as oe}from"./close-BU5iTc66.js";import{n as se,r as w,t as ce}from"./use-active-conversation-sPgfSkql.js";import{t as le}from"./use-agent-state-Dp3pD1h3.js";import{C as ue,a as de,g as fe,i as T,r as E,t as pe,v as D,y as O}from"./use-event-store-BomO7ywK.js";import{r as k}from"./typography-BDgnT7Yp.js";import{t as me}from"./lesson-plan-duSsqWVs.js";import{n as he,t as A}from"./markdown-renderer-B3IAVfv4.js";import{t as ge}from"./u-check-circle-DOauqQKb.js";import{n as _e,r as ve,t as ye}from"./plan-components-CRDMQzsS.js";import{n as be,t as xe}from"./u-check-circle-half-steSK_JB.js";var Se=l(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(t(),1);function Ce(){!ne.current&&te();let[e]=(0,j.useState)(b.current);return e}var M=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(M||{});function we(){let{conversationId:e}=w(),t=m();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Te(e,t,n,r){return{action:M.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var N=i(),P=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),F=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function Ee({status:e}){return(0,N.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,N.jsx)(C,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function I({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let[s,c]=j.useState(r),l=t?(0,N.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`cursor-pointer text-left`,"aria-label":s?`Collapse`:`Expand`,children:s?(0,N.jsx)(F,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,N.jsx)(P,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,N.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&l,o,(0,N.jsx)(`span`,{children:e}),i===`after`&&l]}),(0,N.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,N.jsx)(Ee,{status:n})]})]}),s&&(typeof t==`string`?(0,N.jsx)(A,{children:t}):t)]})}var De=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,N.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,N.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,N.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,N.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,N.jsx)(`defs`,{children:(0,N.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,N.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function Oe({profile:e}){let[t,r]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,N.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,N.jsx)(u,{size:14}):(0,N.jsx)(n,{size:14})}),(0,N.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`hr`,{className:`border-neutral-700`}),(0,N.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function ke({conversationId:e,anchorEventId:t}){let n=h(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,N.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,N.jsx)(I,{title:(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,N.jsx)(De,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,N.jsx)(o,{i18nKey:a.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,N.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,N.jsx)(I,{title:(0,N.jsx)(`span`,{children:t?(0,N.jsx)(o,{i18nKey:a.MODEL$NO_SAVED_PROFILES}):(0,N.jsx)(o,{i18nKey:a.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,N.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,N.jsx)(o,{i18nKey:a.MODEL$NO_PROFILES_HINT})}):(0,N.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,N.jsx)(Oe,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var L=(0,j.createContext)(void 0);function Ae({children:e,value:t}){let n=ve(j.useRef(null)),r=t||n;return(0,N.jsx)(L.Provider,{value:r,children:e})}function je(){let e=(0,j.useContext)(L);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function Me(){return(0,j.useContext)(L)}var R=()=>{let{setConversationMode:e}=S(),{send:t}=we(),{conversationId:n}=w(),r=d(e=>e.enqueuePendingMessage),i=d(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Te(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}};function Ne(){let{conversationId:e}=se(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=S(),{setSelectedTab:a}=x(e),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var z=300,Pe=ye(`shine-text`);function Fe({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=s(`openhands`),{navigateToTab:i}=Ne(),{handleBuildPlanClick:o}=R(),{scrollDomToBottom:c}=je(),l=()=>{i(`planner`)},u=(0,j.useCallback)(e=>{o(e),c()},[o,c]),d=(0,j.useMemo)(()=>e?e.length<=z?e:`${e.slice(0,z)}...`:``,[e]);return e?(0,N.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,N.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,N.jsx)(me,{width:18,height:18,color:`var(--oh-muted)`}),(0,N.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$PLAN_MD)}),(0,N.jsx)(`div`,{className:`flex-1`}),(0,N.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,N.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$VIEW)}),(0,N.jsx)(Se,{className:`text-white`,size:18})]})]}),(0,N.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:d&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(A,{includeStandard:!0,components:t?Pe:_e,children:d}),e&&e.length>z&&(0,N.jsx)(`button`,{type:`button`,onClick:l,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(a.COMMON$READ_MORE)})]})}),(0,N.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,N.jsx)(`button`,{type:`button`,onClick:u,disabled:n,className:v(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,N.jsxs)(k.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(a.COMMON$BUILD),` `,(0,N.jsx)(k.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function Ie({errorId:e,defaultMessage:t}){let{t:n}=s(`openhands`),[r,i]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&c.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,N.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,N.jsx)(F,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,N.jsx)(P,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,N.jsx)(A,{children:t})]})}function Le({event:e}){return de(e)?(0,N.jsx)(Ie,{errorId:e.id,defaultMessage:e.error}):null}var Re=`200%`,B=8,ze=B*2;function Be({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=Ce(),c=`oh-text-shimmer-${(0,j.useId)().replace(/:/g,``)}`,l=(0,j.useMemo)(()=>Math.min(B/2-1,1+i/2),[i]),u=(0,j.useMemo)(()=>{let e=B/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${B}%)`,backgroundSize:`${Re} 100%`,backgroundRepeat:`no-repeat`,WebkitBackgroundClip:`text`,backgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`,animation:`${c} ${r}s linear infinite`}},[c,l,r,a]);return s?(0,N.jsx)(t,{className:v(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${ze}% center}to{background-position:0% center}}`}}),(0,N.jsx)(t,{className:v(`relative inline-block`,n),style:u,...o,children:e})]})}var Ve=j.memo(Be),He=3,V=24;function Ue({className:e}){return(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,N.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,className:`fill-[var(--oh-foreground)] transition-colors duration-150 group-hover:fill-[var(--oh-text-secondary)]`}),(0,N.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var We={p:({children:e})=>(0,N.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function Ge({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=s(`openhands`),o=j.useRef(null),[c,l]=j.useState(!1);j.useLayoutEffect(()=>{let t=o.current;if(!t||n){l(!1),r(!1);return}let i=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),i=He*(Number.isFinite(n)&&n>0?n:V),a=(e.match(/\n/g)??[]).length,o=t.scrollHeight>i+1||a>=He||e.trim().length>220;l(e=>(e!==o&&r(o),o))};i();let a=new ResizeObserver(i);return a.observe(t),()=>a.disconnect()},[e,n,r]);let u=c&&!n;return(0,N.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,N.jsx)(`div`,{ref:o,className:v(`text-sm leading-6 whitespace-normal [word-break:break-word]`,u&&`line-clamp-3`),children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:e})}),u?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{"aria-hidden":!0,"data-testid":`chat-message-truncation-gradient`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-tertiary to-transparent`}),(0,N.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:v(`pointer-events-none absolute bottom-1 left-1/2 z-10 inline-flex -translate-x-1/2 items-center rounded-full border border-[var(--oh-border-subtle)] bg-[var(--oh-surface-raised)] px-2.5 py-0.5 text-xs font-normal text-[var(--oh-foreground)] transition-opacity duration-150`,t?`opacity-100`:`opacity-0`),children:i(a.COMMON$VIEW_MORE)})]}):null]})}function H({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:o,onRetry:c,onStop:l}){let{t:u}=s(`openhands`),[d,f]=j.useState(!1),[p,m]=j.useState(!1),[h,g]=j.useState(!1),[_,y]=j.useState(!1),[ee,te]=j.useState(!0),b=j.useRef(null);j.useEffect(()=>{g(!1)},[t]);let ne=async()=>{await navigator.clipboard.writeText(t),m(!0)};j.useEffect(()=>{let e;return p&&(e=setTimeout(()=>{m(!1)},2e3)),()=>{clearTimeout(e)}},[p]);let ie=e===`user`&&(o===`error`||o===`sending`),x=o===`sending`&&l!=null,S=x&&d,C=e===`user`&&o==null,ae=C&&_&&!h,oe=j.Children.count(n)>0;j.useLayoutEffect(()=>{if(!x||C)return;let e=b.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:V;te(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,x,C]);let se=C?(0,N.jsx)(Ge,{message:t,isHovering:d,isExpanded:h,onTruncatableChange:y}):(0,N.jsx)(`div`,{ref:b,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:t})}),w=(0,N.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":o,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:v(`rounded-xl relative w-fit max-w-full flex flex-col`,oe&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,o===`error`&&`border border-[var(--oh-status-error)]/40`,!ie&&`last:mb-4`),children:[(0,N.jsxs)(`div`,{className:v(`absolute -top-2.5 -right-2.5 z-10`,!d||o===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,N.jsx)(re,{content:e.tooltip,placement:`top`,children:(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,N.jsx)(he,{isHidden:!d,isDisabled:p,onClick:ne,mode:p?`copied`:`copy`})]}),se,x?(0,N.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),l?.()},"data-testid":`chat-message-stop`,"aria-label":u(a.BUTTON$STOP),"aria-hidden":!S,tabIndex:S?0:-1,className:v(`group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150`,ee?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,S?`opacity-100`:`pointer-events-none opacity-0`),children:(0,N.jsx)(Ue,{className:`block h-7 w-7 max-w-none`})}):null,ae?(0,N.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":u(a.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>g(!0)}):null,n]});return e===`user`&&o===`error`?(0,N.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[w,(0,N.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,N.jsx)(`span`,{children:u(a.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),c?(0,N.jsx)(`button`,{type:`button`,onClick:c,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:u(a.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&o===`sending`?(0,N.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[w,(0,N.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,N.jsx)(Ve,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:u(a.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):w}function Ke({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function qe({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Je({onClick:e,className:t}){return(0,N.jsx)(`button`,{type:`button`,onClick:e,className:v(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,N.jsx)(oe,{width:18,height:18})})}function Ye({src:e,size:t=`small`}){return(0,N.jsx)(`img`,{role:`img`,alt:``,src:e,className:v(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Xe({src:e,onRemove:t,size:n=`small`}){return(0,N.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,N.jsx)(Ye,{src:e,size:n}),t&&(0,N.jsx)(Je,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Ze({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,N.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,N.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(Ke,{active:!o})}),(0,N.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:v(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,N.jsx)(Xe,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,N.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(qe,{active:!c})})]})}function Qe({type:e,onClick:t}){let{t:n}=s(`openhands`),r=e===`confirm`,i=n(r?a.ACTION$CONFIRM:a.ACTION$REJECT),o=n(r?a.CHAT_INTERFACE$USER_CONFIRMED:a.CHAT_INTERFACE$USER_REJECTED),c=r?`${n(a.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(a.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,N.jsx)(re,{closeDelay:100,content:o,children:(0,N.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:v(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:c})})}function $e({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,N.jsxs)(`div`,{className:v(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,N.jsx)(`span`,{className:``,children:n}),(0,N.jsx)(`span`,{className:`font-bold`,children:i}),(0,N.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var et=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,N.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,N.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,N.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),tt=ie(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),nt=()=>r({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return f.respondToConfirmation(e,t,i,n)}});function rt(){let e=tt(e=>e.submittedEventIds),t=tt(e=>e.addSubmittedEventId),{t:n}=s(`openhands`),{data:r}=ce(),{curAgentState:i}=le(),{mutate:o}=nt(),c=pe(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===_.AWAITING_USER_CONFIRMATION:!1),l=(0,j.useCallback)(e=>{!c||!r||(t(c.id),o({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[c,r,t,o]);return(0,j.useEffect)(()=>{if(!c)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),l(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),l(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[c,l]),i!==_.AWAITING_USER_CONFIRMATION||!c||e.includes(c.id)?null:(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(T(c)?c.security_risk:y.UNKNOWN)===y.HIGH&&(0,N.jsx)($e,{content:n(a.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,N.jsx)(et,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(a.COMMON$HIGH_RISK)}),(0,N.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,N.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(a.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(Qe,{type:`reject`,onClick:()=>l(!1)}),(0,N.jsx)(Qe,{type:`confirm`,onClick:()=>l(!0)})]})]})]})}var it=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
2
|
`):typeof t.content==`string`&&(n=t.content)),!(Array.isArray(t.content)&&t.content.some(e=>e.type===`image`)))return n;let r=c.t(`CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE`);return n.split(r)[0]};function U({event:e,isLastMessage:t,isFromPlanningAgent:n}){let r=it(e),i=[];return Array.isArray(e.llm_message.content)&&e.llm_message.content.forEach(e=>{e.type===`image`&&i.push(...e.image_urls)}),(0,N.jsxs)(H,{type:e.source,message:r,isFromPlanningAgent:n,children:[i.length>0&&(0,N.jsx)(Ze,{size:`small`,images:i}),t&&(0,N.jsx)(rt,{})]})}var at=class{static isDevMode=!1;static message(e){this.isDevMode&&console.warn(JSON.stringify(JSON.parse(e.data.toString()),null,2))}static event(e,t){this.isDevMode&&console.warn(t||`EVENT`,e)}static warning(e){this.isDevMode&&console.warn(e)}static error(e){this.isDevMode&&console.error(e)}},ot=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value};function st(e){let{children:t}=e,n=e=>{try{return ot(e)}catch(t){return at.error(String(t)),e}};return Array.isArray(t)?(0,N.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,N.jsx)(`strong`,{className:`font-mono`,children:n(t)}):(0,N.jsx)(`strong`,{className:`font-mono`,children:t})}var ct=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},lt=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,ut=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return lt(e)&&!n.endsWith(`/`)?`${n}/`:n};function dt(e){let{children:t}=e,n=e=>{try{let t=ct(e);return(0,N.jsx)(`span`,{className:`font-mono`,title:t,children:ut(t)})}catch(t){return at.error(String(t)),(0,N.jsx)(`span`,{className:`font-mono`,children:e})}};return Array.isArray(t)?(0,N.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,N.jsx)(`strong`,{children:n(t)}):(0,N.jsx)(`strong`,{className:`font-mono`,children:t})}var W=1e3,ft=e=>`\`\`\`json\n${JSON.stringify(e,null,2)}\n\`\`\``,pt=e=>{switch(e){case y.LOW:return c.t(`SECURITY$LOW_RISK`);case y.MEDIUM:return c.t(`SECURITY$MEDIUM_RISK`);case y.HIGH:return c.t(`SECURITY$HIGH_RISK`);case y.UNKNOWN:default:return c.t(`SECURITY$UNKNOWN_RISK`)}},G=()=>``,mt=e=>e.name?`**Skill:** \`${e.name}\``:G(),ht=e=>{let{action:t}=e,n=[];return t.pattern&&n.push(`**Pattern:** \`${t.pattern}\``),t.path&&n.push(`**Path:** \`${t.path}\``),`include`in t&&t.include&&n.push(`**Include:** \`${t.include}\``),n.length>0?n.join(`
|
|
3
3
|
`):G()},gt=e=>{if(e.command!==`create`||!e.file_text)return G();let t=e.file_text;return t.length>1e3&&(t=`${t.slice(0,W)}...`),`${e.path}\n${t}`},_t=e=>{let t=`Command:\n\`${e.action.command}\``;return(e.security_risk===y.HIGH||e.security_risk===y.MEDIUM)&&(t+=`\n\n${pt(e.security_risk)}`),t},vt=e=>{let t=`**MCP Tool Call**
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{o as r,t as i}from"./declaration-CR6HMp29.js";import{t as a}from"./useTranslation-B6voJV4y.js";import{M as o,t as s}from"./utils-DCVfKFRt.js";import{n as c}from"./agent-server-client-options-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{o as r,t as i}from"./declaration-CR6HMp29.js";import{t as a}from"./useTranslation-B6voJV4y.js";import{M as o,t as s}from"./utils-DCVfKFRt.js";import{n as c}from"./agent-server-client-options-9agOSarV.js";import{t as l}from"./llm-client-BqyLKgUN.js";import{d as u}from"./brand-button-DJ_S16rO.js";import{n as d,t as f}from"./vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-m8dOii0J.js";import{i as p}from"./combobox-caret-BJC7XJsz.js";import{n as m}from"./map-provider-BJ_8KZKU.js";import{d as h}from"./sdk-settings-schema-CLmJ9sho.js";var g=e(t(),1);function _(e){return null}_.getCollectionNode=function*(e){let{children:t,title:n,items:r}=e;yield{type:`section`,props:e,hasChildNodes:!0,rendered:n,"aria-label":e[`aria-label`],*childNodes(){if(typeof t==`function`){if(!r)throw Error(`props.children was a function but props.items is missing`);for(let e of r)yield{type:`item`,value:e,renderer:t}}else{let e=[];g.Children.forEach(t,t=>{e.push({type:`item`,element:t})}),yield*e}}}};var v=_,y=e=>{let[t,...n]=e.split(`/`);return!t||n.length===0?{provider:``,model:e,separator:``}:{provider:t,model:n.join(`/`),separator:`/`}};function b(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n))}function x(e,t){return t===void 0?e:e.filter(e=>e.verified===t)}function S(e,t){return!t||t<=0?e:e.slice(0,t)}var C=class{static async searchModels(e={},t){let n=new l(c()),r=t===void 0?n.getVerifiedModels():Promise.resolve(t),[i,a]=await Promise.all([n.getModels(),r]),o=e.provider__eq??null,s=new Set(o?a?.[o]??[]:[]),u=[...s].map(e=>({provider:o,name:e,verified:!0})),d=o?(i??[]).filter(e=>e.startsWith(`${o}/`)).map(e=>e.slice(o.length+1)).filter(e=>e.length>0&&!s.has(e)).map(e=>({provider:o,name:e,verified:!1})):[];return{items:S(x(b([...u,...d],e.query),e.verified__eq),e.limit),next_page_id:null}}static async searchProviders(e={},t){let n=new l(c()),r=t===void 0?n.getVerifiedModels():Promise.resolve(t),[i,a]=await Promise.all([n.getProviders(),r]),o=new Set(Object.keys(a??{}));return{items:S(x(b([...new Set([...o,...i??[]])].map(e=>({name:e,verified:o.has(e)})),e.query),e.verified__eq),e.limit),next_page_id:null}}},w=[`config`,`verified-models`],T=1e3*60*5,E=1e3*60*15;async function D(){return await new l(c()).getVerifiedModels()??{}}var O=()=>n({queryKey:[`config`,`providers`],queryFn:async({client:e})=>{let t=await e.fetchQuery({queryKey:w,queryFn:D,staleTime:T});return(await C.searchProviders({limit:100},t)).items},staleTime:T,gcTime:E}),k=10;async function A(e,t,n,r=0){if(r>=k)throw Error(`Too many pagination requests for provider ${e}`);let i=await C.searchModels({provider__eq:e,limit:100,page_id:n},t);if(i.next_page_id){let n=await A(e,t,i.next_page_id,r+1);return[...i.items,...n]}return i.items}var j=e=>n({queryKey:[`config`,`models`,e],queryFn:async({client:t})=>A(e,await t.fetchQuery({queryKey:w,queryFn:D,staleTime:T})),enabled:!!e,staleTime:T,gcTime:E}),M=()=>n({queryKey:w,queryFn:D,select:e=>e?.openhands??[],staleTime:T,gcTime:E}),N=new Set([`https://llm-proxy.app.all-hands.dev`,`https://llm-proxy.app.all-hands.dev/v1`]),P=`litellm_proxy/`,F=e=>e.trim().replace(/\/+$/,``);function I(e,t,n){if(!e)return``;if(!e.startsWith(P)||!t||!N.has(F(t)))return e;let r=e.slice(14);return n.includes(r)?`openhands/${r}`:e}var L=r();function R({isDisabled:e,currentModel:t,currentBaseUrl:n,onChange:r,onDefaultValuesChanged:c,wrapperClassName:l,labelClassName:_}){let[,b]=g.useState(null),[x,S]=g.useState(null),[C,w]=g.useState(null),{data:T=[]}=O(),{data:E}=M(),{data:D=[],isLoading:k,error:A}=j(x),N=g.useMemo(()=>T.filter(e=>e.verified),[T]),P=g.useMemo(()=>T.filter(e=>!e.verified),[T]),F=g.useMemo(()=>D.filter(e=>e.verified),[D]),R=g.useMemo(()=>D.filter(e=>!e.verified),[D]);g.useEffect(()=>{if(t&&E!==void 0){let e=I(t,n,E),{provider:r,model:i}=y(e);b(e),S(r||null),w(i),c?.(r||null,i)}},[t,n,E]);let z=e=>{S(e),w(null),b(`${e}/`),r?.(e,null)},B=e=>{let t=`${x}/${e}`;x===`openai`&&(t=e),b(t),w(e),r?.(x,e)},V=()=>{S(null),b(null)},{t:H}=a(`openhands`);return(0,L.jsxs)(`div`,{className:s(`flex flex-col md:flex-row w-full min-w-0 justify-between gap-4 md:gap-[46px]`,l),children:[(0,L.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,L.jsx)(`label`,{className:s(`text-sm`,_),children:H(i.LLM$PROVIDER)}),(0,L.jsxs)(f,{"data-testid":`llm-provider-input`,isRequired:!0,isVirtualized:!1,name:`llm-provider-input`,isDisabled:e,"aria-label":H(i.LLM$PROVIDER),isClearable:!1,onSelectionChange:e=>{e?.toString()&&z(e.toString())},onInputChange:e=>!e&&V(),defaultSelectedKey:x??void 0,selectedKey:x,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:p},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:u}},children:[(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:N.map(e=>(0,L.jsx)(d,{"data-testid":`provider-item-${e.name}`,children:m(e.name)},e.name))}),P.length>0?(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:P.map(e=>(0,L.jsx)(d,{children:m(e.name)},e.name))}):null]})]}),x===`openhands`&&(0,L.jsx)(h,{testId:`openhands-account-help`,text:H(i.SETTINGS$NEED_OPENHANDS_ACCOUNT),linkText:H(i.SETTINGS$CLICK_HERE),href:o.PRODUCTION,size:`settings`,linkColor:`white`}),(0,L.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,L.jsx)(`label`,{className:s(`text-sm`,_),children:H(i.LLM$MODEL)}),(0,L.jsxs)(f,{"data-testid":`llm-model-input`,isRequired:!0,isVirtualized:!1,isLoading:k,name:`llm-model-input`,"aria-label":H(i.LLM$MODEL),isClearable:!1,onSelectionChange:e=>{e?.toString()&&B(e.toString())},isDisabled:e||!x,selectedKey:C,defaultSelectedKey:C??void 0,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:p},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:u}},children:[(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:F.map(e=>(0,L.jsx)(d,{children:e.name},e.name))}),R.length>0?(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:R.map(e=>(0,L.jsx)(d,{"data-testid":`model-item-${e.name}`,children:e.name},e.name))}):null]}),A&&(0,L.jsx)(`p`,{"data-testid":`models-error`,className:`text-danger text-xs`,children:H(i.CONFIGURATION$ERROR_FETCH_MODELS)})]})]})}export{y as n,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./agent-server-client-options-
|
|
1
|
+
import{n as e}from"./agent-server-client-options-9agOSarV.js";import{t}from"./llm-client-BqyLKgUN.js";import{a as n}from"./agent-server-compatibility-B7QStIcH.js";var r=class{static async getModels(){let n=new t(e()),[r,i,a]=await Promise.all([n.getModels(),n.getVerifiedModels(),n.getProviders()]),o=Object.keys(i??{}).sort(),s=o.flatMap(e=>i[e]??[]);return{models:r??[],verified_models:s,verified_providers:a?.filter(e=>o.includes(e))??o,default_model:s[0]??r?.[0]??``}}static async getConfig(){return await n(),{posthog_client_key:null,feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}};export{r as t};
|
package/build/assets/{organization-service.api-DbnougaQ.js → organization-service.api-BeuMC9QL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,b as i,c as a,k as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~g56ukk6u-DsSvIDZQ.js";import{a as s,c,d as l,i as u,l as d,o as f,r as p,s as m,u as h}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{n as g}from"./QueryClientProvider-Cnr-Yl3j.js";import{d as _}from"./agent-server-client-options-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,b as i,c as a,k as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~g56ukk6u-DsSvIDZQ.js";import{a as s,c,d as l,i as u,l as d,o as f,r as p,s as m,u as h}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{n as g}from"./QueryClientProvider-Cnr-Yl3j.js";import{d as _}from"./agent-server-client-options-9agOSarV.js";import{r as v}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-CLlsvdNP.js";import{t as y}from"./proxy-BqDMnUY-.js";function b(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function x(e,t,n){let r=e.slice(0);return r[t]=n,r}var S=class extends o{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,a.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),i=r.map(e=>e.getCurrentResult()),a=e.length!==r.length,o=r.some((t,n)=>t!==e[n]),s=a||o,c=s?!0:i.some((e,t)=>{let r=this.#t[t];return!r||!n(e,r)});!s&&!c||(s&&(this.#l=t,this.#i=r),this.#t=i,this.hasListeners()&&(s&&(b(e,r).forEach(e=>{e.destroy()}),b(r,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,a=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=i(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new l(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=x(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&a.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},C=e(t(),1);function w({queries:e,...t},n){let i=g(n),o=h(),_=d(),v=C.useMemo(()=>e.map(e=>{let t=i.defaultQueryOptions(e);return t._optimisticResults=o?`isRestoring`:`optimistic`,t}),[e,i,o]);v.forEach(e=>{p(e),f(e,_,i.getQueryCache().get(e.queryHash))}),c(_);let[y]=C.useState(()=>new S(i,v,t)),[b,x,w]=y.getOptimisticResult(v,t.combine),T=!o&&t.subscribed!==!1;C.useSyncExternalStore(C.useCallback(e=>T?y.subscribe(a.batchCalls(e)):r,[y,T]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),C.useEffect(()=>{y.setQueries(v,t)},[v,t,y]);let E=b.some((e,t)=>s(v[t],e))?b.flatMap((e,t)=>{let n=v[t];return n&&s(n,e)?u(n,new l(i,n),_):[]}):[];if(E.length>0)throw Promise.all(E);let D=b.find((e,t)=>{let n=v[t];return n&&m({result:e,errorResetBoundary:_,throwOnError:n.throwOnError,query:i.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(D?.error)throw D.error;return x(w())}function T(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function E(e){if(e)return e;let t=_().backend;if(t.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return t}async function D(e){return T(await y({backend:E(e),method:`GET`,path:`/api/organizations`}))}async function O(e){let t=E(e);try{return{orgId:(await y({backend:t,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(v.isAxiosError(e)&&e.response?.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function k(e,t){let n=await y({backend:E(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:n?.org_id??e,userId:n?.user_id??``}}export{w as i,D as n,O as r,k as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~g56ukk6u-DsSvIDZQ.js";import{d as n,n as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{t as i}from"./createLucideIcon-Ddu8jDOQ.js";import{d as a,n as o}from"./agent-server-client-options-
|
|
1
|
+
import{i as e,r as t}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~g56ukk6u-DsSvIDZQ.js";import{d as n,n as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{t as i}from"./createLucideIcon-Ddu8jDOQ.js";import{d as a,n as o}from"./agent-server-client-options-9agOSarV.js";import{o as s,r as c,t as l}from"./agent-server-conversation-service.api-B9TUYJon.js";var u=class extends n{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(n,r){let{state:i}=n,a=super.createResult(n,r),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=i.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:t(r,i.data),hasPreviousPage:e(r,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function d(e,t){return r(e,u,t)}var f=i(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),p=async e=>{let t=(await l.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},m=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:r}=await p(e);if(a().backend.kind===`cloud`){if(!r)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await c(r),{success:!0}}return new s(o({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},h=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await p(e);return new s(o({conversationUrl:n,sessionApiKey:r})).askAgent(e,t)},g=async e=>{let{conversationUrl:t,sessionApiKey:n}=await p(e);return new s(o({conversationUrl:t,sessionApiKey:n})).runConversation(e)},_=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},v=(e,t,n)=>_(e,t,{execution_status:n}),y=(e,t,n)=>_(e,t,{llm_model:n}),b=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},x=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e},S=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n};export{_ as a,v as c,d,b as i,y as l,x as n,m as o,h as r,g as s,S as t,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-CR6HMp29.js";import{t as i}from"./useTranslation-B6voJV4y.js";import{t as a}from"./brand-button-DJ_S16rO.js";import{t as o}from"./conversation-store-CC-isCnP.js";import{t as s}from"./lesson-plan-duSsqWVs.js";import{t as c}from"./use-handle-plan-click-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-CR6HMp29.js";import{t as i}from"./useTranslation-B6voJV4y.js";import{t as a}from"./brand-button-DJ_S16rO.js";import{t as o}from"./conversation-store-CC-isCnP.js";import{t as s}from"./lesson-plan-duSsqWVs.js";import{t as c}from"./use-handle-plan-click-DP6Rs-YP.js";import{t as l}from"./markdown-renderer-B3IAVfv4.js";import{n as u,r as d}from"./plan-components-CRDMQzsS.js";import{t as f}from"./conversation-tab-empty-state-CStQLPVW.js";var p=e(t(),1),m=n();function h(){let{t:e}=i(`openhands`),{scrollRef:t,onChatBodyScroll:n,autoScroll:h,scrollDomToBottom:g}=d(p.useRef(null)),{planContent:_,conversationMode:v}=o();p.useEffect(()=>{h&&g()},[_,h,g]);let y=v===`plan`,{handlePlanClick:b}=c();return _==null?(0,m.jsx)(f,{icon:(0,m.jsx)(s,{}),action:(0,m.jsx)(a,{type:`button`,variant:`secondary`,onClick:b,isDisabled:y,className:`min-w-40 justify-center px-6`,children:e(r.COMMON$CREATE_A_PLAN)}),children:e(r.PLANNER$EMPTY_MESSAGE)}):(0,m.jsx)(`div`,{ref:t,onScroll:e=>n(e.currentTarget),className:`flex flex-col w-full h-full p-4 overflow-auto`,children:(0,m.jsx)(l,{includeStandard:!0,components:u,children:_})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./agent-server-client-options-
|
|
1
|
+
import{c as e}from"./agent-server-client-options-9agOSarV.js";var t=class{constructor(t){this.host=t.host.replace(/\/$/,``),this.apiKey=t.apiKey,this.client=new e({baseUrl:this.host,apiKey:this.apiKey,timeout:t.timeout||6e4})}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateProfile(e){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/activate`,{})).data}close(){this.client.close()}};export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{a as n,n as r,t as i}from"./query-client-config-CRnGSujB.js";import{o as a}from"./declaration-CR6HMp29.js";import{n as o,t as s}from"./QueryClientProvider-Cnr-Yl3j.js";import{t as c}from"./context-CEQZwATj.js";import{i as l,n as u,o as d,r as f}from"./i18n-DET2iOyh.js";import{t as p}from"./utils-DCVfKFRt.js";import{t as m}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{a as n,n as r,t as i}from"./query-client-config-CRnGSujB.js";import{o as a}from"./declaration-CR6HMp29.js";import{n as o,t as s}from"./QueryClientProvider-Cnr-Yl3j.js";import{t as c}from"./context-CEQZwATj.js";import{i as l,n as u,o as d,r as f}from"./i18n-DET2iOyh.js";import{t as p}from"./utils-DCVfKFRt.js";import{t as m}from"./active-backend-context-BSPE-W72.js";import{t as h}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js";import{t as g}from"./option-service.api-CGNANEcT.js";import{i as _,t as v}from"./query-keys-tAsQcc_9.js";import{n as y,t as b}from"./agent-server-ui-style-scope-BwIZYdC1.js";var x=e(t());function S({i18n:e,defaultNS:t,children:n}){let r=(0,x.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,x.createElement)(c.Provider,{value:r},n)}var C=a(),w=`posthog_bootstrap`;function T(){let e=window.location.hash.substring(1),t=new URLSearchParams(e),n=t.get(`distinct_id`),r=t.get(`session_id`);if(n&&r){let e={distinctID:n,sessionID:r};return sessionStorage.setItem(w,JSON.stringify(e)),window.history.replaceState(null,``,window.location.pathname+window.location.search),e}let i=sessionStorage.getItem(w);if(i)return sessionStorage.removeItem(w),JSON.parse(i)}function E({children:e}){let t=o(),[n,r]=x.useState(null),[i,a]=x.useState(!0),s=x.useMemo(()=>T(),[]);return x.useEffect(()=>{(async()=>{try{r((await t.fetchQuery({queryKey:_.WEB_CLIENT_CONFIG,queryFn:g.getConfig,meta:{disableToast:!0},...v})).posthog_client_key)}catch{}finally{a(!1)}})()},[t]),i||!n?e:(0,C.jsx)(h,{apiKey:n,options:{api_host:`https://us.i.posthog.com`,person_profiles:`identified_only`,bootstrap:s},children:e})}function D({children:e,theme:t=y,className:n,style:r,styleOverrides:i,contentClassName:a,...o}){let s=x.useMemo(()=>({...b,...i,...r}),[r,i]);return(0,C.jsx)(`div`,{"data-agent-server-ui":``,...o,className:n,style:s,children:(0,C.jsx)(`div`,{className:p(t,a,`text-foreground`),"data-theme":t,children:e})})}var O={provider:`posthog`};function k({children:e,queryClient:t,analytics:a,i18n:o,className:c,contentClassName:p,style:h,styleOverrides:g,theme:_,withStyleRoot:v=!0}){let y=x.useMemo(()=>t??i(),[t]),b=x.useMemo(()=>o??f(),[o]),w=x.useRef(null);w.current||={queryClient:r(),i18n:l()},n(y),d(b),x.useEffect(()=>()=>{w.current&&(n(w.current.queryClient),d(w.current.i18n))},[]);let T=a&&a.provider===`posthog`?(0,C.jsx)(E,{children:e}):e;return(0,C.jsx)(S,{i18n:b,defaultNS:u,children:(0,C.jsx)(s,{client:y,children:(0,C.jsx)(m,{children:v?(0,C.jsx)(D,{className:c,contentClassName:p,style:h,styleOverrides:g,theme:_,children:T}):T})})})}export{O as n,D as r,k as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,d as t,t as n,w as r}from"./agent-server-client-options-
|
|
1
|
+
import{E as e,d as t,t as n,w as r}from"./agent-server-client-options-9agOSarV.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-CLlsvdNP.js";function a(e){return e.apiKey?e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}:{}}function o(e){let t=e.authMode??`bearer`;return t===`bearer`?a(e.backend):t===`session-api-key`&&e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}}async function s(a){let s=t(),c=s.backend.id===a.backend.id&&s.orgId?{"X-Org-Id":s.orgId}:{},l={...o(a),...c,...a.headers??{}},u=a.hostOverride??a.backend.host;if(!a.hostOverride)return(await i.request({url:`${u.replace(/\/+$/,``)}${a.path}`,method:a.method,headers:l,...a.body===void 0?{}:{data:a.body},timeout:(a.timeoutSeconds??30)*1e3,...a.responseType?{responseType:a.responseType}:{}})).data;let d=r();if(!d)throw new n;let f=e();return(await i.post(`${d.replace(/\/+$/,``)}/api/cloud-proxy`,{host:u,method:a.method,path:a.path,headers:l,body:a.body??null,...a.timeoutSeconds?{timeout_seconds:a.timeoutSeconds}:{}},{headers:f,timeout:3e4,...a.responseType?{responseType:a.responseType}:{}})).data}export{a as n,s as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-CR6HMp29.js";import{t as i}from"./use-is-creating-conversation-DX2qSlfL.js";import{t as a}from"./useTranslation-B6voJV4y.js";import{r as o}from"./vendor~home~mcp~automations-list-CZSK-lT2.js";import{a as s,i as c,o as l,r as u,s as d,t as f}from"./circle-plus-check-toggle-DKS8MAVV.js";import{t as p}from"./utils-DCVfKFRt.js";import{n as m}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-CR6HMp29.js";import{t as i}from"./use-is-creating-conversation-DX2qSlfL.js";import{t as a}from"./useTranslation-B6voJV4y.js";import{r as o}from"./vendor~home~mcp~automations-list-CZSK-lT2.js";import{a as s,i as c,o as l,r as u,s as d,t as f}from"./circle-plus-check-toggle-DKS8MAVV.js";import{t as p}from"./utils-DCVfKFRt.js";import{n as m}from"./active-backend-context-BSPE-W72.js";import{n as h}from"./navigation-context-BdKYH32C.js";import{a as g,o as _}from"./conversation-local-storage-YmOVXxxW.js";import{t as v}from"./conversation-store-CC-isCnP.js";import{i as y,r as b}from"./use-settings-DeO7nvpM.js";import{t as x}from"./use-create-conversation-B-lwTnfE.js";import{f as S,i as C,l as w,m as T,o as E,t as D,u as O}from"./install-server-modal-6fuq-TU6.js";import{n as k}from"./skill-card-pill-row-BW9qvhoK.js";var A=e(t(),1),j=[{id:`github-pr-reviewer`,name:`GitHub PR review copilot`,category:`Code review`,description:`Watch pull requests, inspect the diff, and leave a concise review with risks and suggested follow-ups.`,requiredIntegrationIds:[`github`],popularityRank:100,estimatedSetupMinutes:4,prompt:`Create an automation that reviews GitHub pull requests when they are opened or updated. Use the GitHub MCP to inspect the PR diff, changed files, tests, and existing discussion. Post a short review that highlights correctness risks, security issues, missing tests, and concrete next steps. Ask me for the repositories, filters, review tone, and whether comments should be posted automatically or drafted first.`,exampleImplementation:`Trigger: github.pull_request.opened and github.pull_request.synchronize
|
|
2
2
|
Required MCP: GitHub
|
|
3
3
|
|
|
4
4
|
1. Read repository, pull_request, and sender from the event payload.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js","assets/rolldown-runtime-BFRubm34.js","assets/manage-backends-modal-
|
|
2
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./preload-helper-CT1Z6Pdu.js";import{L as r,a as i,c as a,d as o,f as s,i as c}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as l,t as u}from"./declaration-CR6HMp29.js";import{t as d}from"./useTranslation-B6voJV4y.js";import{r as f}from"./providers-CbD7fiic.js";import{i as p,t as m}from"./custom-toast-handlers-ufGJ6_Rc.js";import{k as h}from"./agent-server-client-options-HEOwGVIU.js";import{r as g,t as _}from"./agent-server-compatibility-CdI3N7dr.js";import{t as v}from"./modal-backdrop-RfNCrSpK.js";import{n as y}from"./modal-body-aoa2fx5W.js";import{n as b,r as x}from"./base-modal-C2oy2EBG.js";import{t as S}from"./brand-button-DJ_S16rO.js";import{t as ee}from"./loading-spinner-5GT9q1xy.js";import{t as C}from"./use-config-OIMQLQ2s.js";import{i as w,n as te}from"./color-themes-B9pm9c-R.js";var T=e(t(),1),E={name:`@openhands/agent-canvas`,version:`1.0.0-beta.7`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/agent-canvas`},homepage:`https://github.com/OpenHands/agent-canvas#readme`,bugs:{url:`https://github.com/OpenHands/agent-canvas/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`git+https://github.com/OpenHands/extensions.git#62594156a187722344736bc2ff5edfb12c0cc75c`,"@openhands/typescript-client":`1.24.3`,"@react-router/node":`7.14.2`,"@react-router/serve":`7.14.2`,"@tailwindcss/vite":`4.2.4`,"@tanstack/react-query":`5.100.9`,"@types/shell-quote":`^1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.16.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,i18next:`26.0.8`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.14.0`,"monaco-editor":`0.55.1`,"posthog-js":`1.372.6`,react:`19.2.5`,"react-dom":`19.2.5`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.6`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.14.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`^1.8.3`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.5.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.10`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:e2e:snapshots":`playwright test tests/e2e/snapshots --project=chromium --retries=0`,"test:e2e:snapshots:update":`playwright test tests/e2e/snapshots --project=chromium --update-snapshots`,"test:coverage":`npm run make-i18n && vitest run --coverage`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`bash -c 'npm run typecheck:staged'`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.59.1`,"@react-router/dev":`7.14.2`,"@tailwindcss/typography":`0.5.19`,"@tanstack/eslint-plugin-query":`5.100.9`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`6.9.1`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`25.6.0`,"@types/react":`19.2.14`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.5`,"cross-env":`10.1.0`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.4`,"eslint-plugin-i18next":`6.1.4`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`29.1.1`,"lint-staged":`16.4.0`,msw:`2.14.2`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.2.4`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.5`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{dompurify:`3.3.2`},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.5`,"react-dom":`19.2.5`,"react-router":`7.14.2`}},D=`openhands-telemetry-consent`,O=`openhands-telemetry-first-use`,k=`openhands-telemetry-session`,A=`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,j=`https://z.openhands.dev`,M=`https://us.posthog.com`,N=!1,P=null;function F(){return typeof window<`u`&&typeof localStorage<`u`}async function I(){if(!F())return null;if(P)return P;try{let{default:e}=await n(async()=>{let{default:e}=await import(`./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js`).then(e=>e.n);return{default:e}},__vite__mapDeps([0,1]));return P=e,e}catch{return null}}function L(){return typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`)}async function R(e=!1){if(N)return P;let t=await I();return t?(t.init(A,{api_host:j,ui_host:M,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,disable_session_recording:!0,loaded:e=>{e.register({package_name:E.name,package_version:E.version})}}),N=!0,t):null}function z(){if(!F())return`pending`;if(L())return`denied`;try{let e=localStorage.getItem(D);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}async function B(e){if(F())try{localStorage.setItem(D,e);let t=await R();if(!t)return;e===`granted`?t.opt_in_capturing():t.opt_out_capturing()}catch{}}function V(){return z()===`granted`}function H(){if(!F())return!1;try{return localStorage.getItem(O)===`true`}catch{return!1}}function U(){if(F())try{localStorage.setItem(O,`true`)}catch{}}async function W(){if(L()||H())return;let e=await R(!0);e&&((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),U(),z()!==`granted`&&e.opt_out_capturing())}function G(){if(!F())return!1;try{return sessionStorage.getItem(k)===`true`}catch{return!1}}function K(){if(F())try{sessionStorage.setItem(k,`true`)}catch{}}async function q(){if(!V()||G())return;let e=await R();e&&(e.capture(`canvas_new_session`,{is_first_use:!H()}),K())}async function J(e,t={}){if(!V())return;let n=await R();n&&n.capture(e,t)}async function Y(){if(F())try{localStorage.removeItem(D),localStorage.removeItem(O),sessionStorage.removeItem(k),N&&P&&P.reset()}catch{}}function X(){let[e,t]=(0,T.useState)(()=>z()),n=(0,T.useRef)(!1);(0,T.useEffect)(()=>{n.current||(n.current=!0,W())},[]),(0,T.useEffect)(()=>{e===`granted`&&q()},[e]);let r=(0,T.useCallback)(async()=>{await B(`granted`),t(`granted`)},[]),i=(0,T.useCallback)(async()=>{await B(`denied`),t(`denied`)},[]),a=(0,T.useCallback)((t,n)=>{e===`granted`&&J(t,n)},[e]),o=(0,T.useCallback)(()=>{Y(),t(`pending`)},[]);return{consent:e,isEnabled:e===`granted`,showConsentPrompt:e===`pending`,grantConsent:r,denyConsent:i,track:a,clearData:o}}var Z=l();function Q({onChoice:e}){let{t,ready:n}=d(`openhands`),{showConsentPrompt:r,grantConsent:i,denyConsent:a}=X(),[o,s]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(n&&r){let e=setTimeout(()=>s(!0),50);return()=>clearTimeout(e)}s(!1)},[n,r]),o?(0,Z.jsx)(v,{"aria-label":t(u.TELEMETRY$CONSENT_TITLE),children:(0,Z.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:t=>{t.preventDefault();let n=new FormData(t.currentTarget).get(`analytics`)===`on`;n?i():a(),e?.(n)},className:`flex flex-col gap-2`,children:(0,Z.jsxs)(y,{className:`border border-[var(--oh-border)]`,children:[(0,Z.jsx)(x,{title:t(u.TELEMETRY$CONSENT_TITLE)}),(0,Z.jsx)(b,{children:t(u.TELEMETRY$CONSENT_DESCRIPTION)}),(0,Z.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,Z.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),t(u.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,Z.jsx)(S,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,children:t(u.TELEMETRY$CONFIRM_PREFERENCES)})]})})}):null}function ne(){return T.useEffect(()=>{te(w())},[]),null}var re=T.lazy(()=>n(()=>import(`./manage-backends-modal-DpBD_vR9.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),ie=T.lazy(()=>n(()=>import(`./api-key-entry-screen-M6su2VSf.js`),__vite__mapDeps([35,1,3,8,14,15,9,20,4,16,17,6,5,7,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33])));function ae({children:e}){return(0,Z.jsxs)(`html`,{lang:`en`,children:[(0,Z.jsxs)(`head`,{children:[(0,Z.jsx)(`meta`,{charSet:`utf-8`}),(0,Z.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,Z.jsx)(i,{}),(0,Z.jsx)(c,{})]}),(0,Z.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,Z.jsxs)(f,{contentClassName:`min-h-screen`,children:[(0,Z.jsx)(ne,{}),e,(0,Z.jsx)(p,{toastOptions:m}),(0,Z.jsx)(Q,{}),(0,Z.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,Z.jsx)(s,{}),(0,Z.jsx)(o,{})]})]})}function $(){return(0,Z.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,Z.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,Z.jsx)(ee,{size:`large`})})})})}function oe(){let e=T.useCallback(()=>{},[]);return(0,Z.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,Z.jsx)(T.Suspense,{fallback:null,children:(0,Z.jsx)(re,{onClose:e})})})}var se=()=>[{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`}],ce=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],le=r(function(){let e=h(),t=C({enabled:!e});return e||_(t.error)?(0,Z.jsx)(T.Suspense,{fallback:(0,Z.jsx)($,{}),children:(0,Z.jsx)(ie,{})}):t.isPending||t.isLoading?(0,Z.jsx)($,{}):g(t.error)?(0,Z.jsx)(oe,{}):(0,Z.jsx)(a,{})});export{ae as Layout,le as default,se as links,ce as meta};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js","assets/rolldown-runtime-BFRubm34.js","assets/manage-backends-modal-CRMwyU0t.js","assets/agent-server-client-options-9agOSarV.js","assets/server-client-DYv_GHPl.js","assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~g56ukk6u-DsSvIDZQ.js","assets/QueryClientProvider-Cnr-Yl3j.js","assets/declaration-CR6HMp29.js","assets/react-CM_dJw1Z.js","assets/pencil-Dr0b2jL1.js","assets/createLucideIcon-Ddu8jDOQ.js","assets/plus-DT-M0FA1.js","assets/trash-2-CbVljPko.js","assets/useTranslation-B6voJV4y.js","assets/context-CEQZwATj.js","assets/backend-form-modal-D3bDMO3C.js","assets/organization-service.api-BeuMC9QL.js","assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-CLlsvdNP.js","assets/proxy-BqDMnUY-.js","assets/agent-server-compatibility-B7QStIcH.js","assets/health-store-B5f0S2FY.js","assets/brand-button-DJ_S16rO.js","assets/utils-DCVfKFRt.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~hkqzh1hb-BZ0HXuHD.js","assets/common-DqjLSBOt.js","assets/settings-input-CehsXnb3.js","assets/modal-backdrop-RfNCrSpK.js","assets/react-dom-hVBnwgwZ.js","assets/modal-body-aoa2fx5W.js","assets/modal-close-button-CtWOUMmw.js","assets/navigation-context-BdKYH32C.js","assets/active-backend-context-BSPE-W72.js","assets/modal-classes-6YqcqA6y.js","assets/confirmation-modal-B5Ca6qFE.js","assets/api-key-entry-screen-myuWMqzW.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./preload-helper-CT1Z6Pdu.js";import{L as r,a as i,c as a,d as o,f as s,i as c}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as l,t as u}from"./declaration-CR6HMp29.js";import{t as d}from"./useTranslation-B6voJV4y.js";import{r as f}from"./providers-eUyo6pgr.js";import{i as p,t as m}from"./custom-toast-handlers-ufGJ6_Rc.js";import{k as h}from"./agent-server-client-options-9agOSarV.js";import{r as g,t as _}from"./agent-server-compatibility-B7QStIcH.js";import{t as v}from"./modal-backdrop-RfNCrSpK.js";import{n as y}from"./modal-body-aoa2fx5W.js";import{n as b,r as x}from"./base-modal-C2oy2EBG.js";import{t as S}from"./brand-button-DJ_S16rO.js";import{t as ee}from"./loading-spinner-5GT9q1xy.js";import{t as C}from"./use-config-C9pvb0Sm.js";import{i as w,n as te}from"./color-themes-B9pm9c-R.js";var T=e(t(),1),E={name:`@openhands/agent-canvas`,version:`1.0.0-beta.8`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/agent-canvas`},homepage:`https://github.com/OpenHands/agent-canvas#readme`,bugs:{url:`https://github.com/OpenHands/agent-canvas/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`git+https://github.com/OpenHands/extensions.git#62594156a187722344736bc2ff5edfb12c0cc75c`,"@openhands/typescript-client":`1.24.3`,"@react-router/node":`7.14.2`,"@react-router/serve":`7.14.2`,"@tailwindcss/vite":`4.2.4`,"@tanstack/react-query":`5.100.9`,"@types/shell-quote":`^1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.16.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,i18next:`26.0.8`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.14.0`,"monaco-editor":`0.55.1`,"posthog-js":`1.372.6`,react:`19.2.5`,"react-dom":`19.2.5`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.6`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.14.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`^1.8.3`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.5.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.10`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:e2e:snapshots":`playwright test tests/e2e/snapshots --project=chromium --retries=0`,"test:e2e:snapshots:update":`playwright test tests/e2e/snapshots --project=chromium --update-snapshots`,"test:coverage":`npm run make-i18n && vitest run --coverage`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`bash -c 'npm run typecheck:staged'`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.59.1`,"@react-router/dev":`7.14.2`,"@tailwindcss/typography":`0.5.19`,"@tanstack/eslint-plugin-query":`5.100.9`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`6.9.1`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`25.6.0`,"@types/react":`19.2.14`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.5`,"cross-env":`10.1.0`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.4`,"eslint-plugin-i18next":`6.1.4`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`29.1.1`,"lint-staged":`16.4.0`,msw:`2.14.2`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.2.4`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.5`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{dompurify:`3.3.2`},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.5`,"react-dom":`19.2.5`,"react-router":`7.14.2`}},D=`openhands-telemetry-consent`,O=`openhands-telemetry-first-use`,k=`openhands-telemetry-session`,A=`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,j=`https://z.openhands.dev`,M=`https://us.posthog.com`,N=!1,P=null;function F(){return typeof window<`u`&&typeof localStorage<`u`}async function I(){if(!F())return null;if(P)return P;try{let{default:e}=await n(async()=>{let{default:e}=await import(`./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js`).then(e=>e.n);return{default:e}},__vite__mapDeps([0,1]));return P=e,e}catch{return null}}function L(){return typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`)}async function R(e=!1){if(N)return P;let t=await I();return t?(t.init(A,{api_host:j,ui_host:M,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,disable_session_recording:!0,loaded:e=>{e.register({package_name:E.name,package_version:E.version})}}),N=!0,t):null}function z(){if(!F())return`pending`;if(L())return`denied`;try{let e=localStorage.getItem(D);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}async function B(e){if(F())try{localStorage.setItem(D,e);let t=await R();if(!t)return;e===`granted`?t.opt_in_capturing():t.opt_out_capturing()}catch{}}function V(){return z()===`granted`}function H(){if(!F())return!1;try{return localStorage.getItem(O)===`true`}catch{return!1}}function U(){if(F())try{localStorage.setItem(O,`true`)}catch{}}async function W(){if(L()||H())return;let e=await R(!0);e&&((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),U(),z()!==`granted`&&e.opt_out_capturing())}function G(){if(!F())return!1;try{return sessionStorage.getItem(k)===`true`}catch{return!1}}function K(){if(F())try{sessionStorage.setItem(k,`true`)}catch{}}async function q(){if(!V()||G())return;let e=await R();e&&(e.capture(`canvas_new_session`,{is_first_use:!H()}),K())}async function J(e,t={}){if(!V())return;let n=await R();n&&n.capture(e,t)}async function Y(){if(F())try{localStorage.removeItem(D),localStorage.removeItem(O),sessionStorage.removeItem(k),N&&P&&P.reset()}catch{}}function X(){let[e,t]=(0,T.useState)(()=>z()),n=(0,T.useRef)(!1);(0,T.useEffect)(()=>{n.current||(n.current=!0,W())},[]),(0,T.useEffect)(()=>{e===`granted`&&q()},[e]);let r=(0,T.useCallback)(async()=>{await B(`granted`),t(`granted`)},[]),i=(0,T.useCallback)(async()=>{await B(`denied`),t(`denied`)},[]),a=(0,T.useCallback)((t,n)=>{e===`granted`&&J(t,n)},[e]),o=(0,T.useCallback)(()=>{Y(),t(`pending`)},[]);return{consent:e,isEnabled:e===`granted`,showConsentPrompt:e===`pending`,grantConsent:r,denyConsent:i,track:a,clearData:o}}var Z=l();function Q({onChoice:e}){let{t,ready:n}=d(`openhands`),{showConsentPrompt:r,grantConsent:i,denyConsent:a}=X(),[o,s]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(n&&r){let e=setTimeout(()=>s(!0),50);return()=>clearTimeout(e)}s(!1)},[n,r]),o?(0,Z.jsx)(v,{"aria-label":t(u.TELEMETRY$CONSENT_TITLE),children:(0,Z.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:t=>{t.preventDefault();let n=new FormData(t.currentTarget).get(`analytics`)===`on`;n?i():a(),e?.(n)},className:`flex flex-col gap-2`,children:(0,Z.jsxs)(y,{className:`border border-[var(--oh-border)]`,children:[(0,Z.jsx)(x,{title:t(u.TELEMETRY$CONSENT_TITLE)}),(0,Z.jsx)(b,{children:t(u.TELEMETRY$CONSENT_DESCRIPTION)}),(0,Z.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,Z.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),t(u.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,Z.jsx)(S,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,children:t(u.TELEMETRY$CONFIRM_PREFERENCES)})]})})}):null}function ne(){return T.useEffect(()=>{te(w())},[]),null}var re=T.lazy(()=>n(()=>import(`./manage-backends-modal-CRMwyU0t.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),ie=T.lazy(()=>n(()=>import(`./api-key-entry-screen-myuWMqzW.js`),__vite__mapDeps([35,1,3,8,14,15,9,20,4,16,17,6,5,7,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33])));function ae({children:e}){return(0,Z.jsxs)(`html`,{lang:`en`,children:[(0,Z.jsxs)(`head`,{children:[(0,Z.jsx)(`meta`,{charSet:`utf-8`}),(0,Z.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,Z.jsx)(i,{}),(0,Z.jsx)(c,{})]}),(0,Z.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,Z.jsxs)(f,{contentClassName:`min-h-screen`,children:[(0,Z.jsx)(ne,{}),e,(0,Z.jsx)(p,{toastOptions:m}),(0,Z.jsx)(Q,{}),(0,Z.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,Z.jsx)(s,{}),(0,Z.jsx)(o,{})]})]})}function $(){return(0,Z.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,Z.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,Z.jsx)(ee,{size:`large`})})})})}function oe(){let e=T.useCallback(()=>{},[]);return(0,Z.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,Z.jsx)(T.Suspense,{fallback:null,children:(0,Z.jsx)(re,{onClose:e})})})}var se=()=>[{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`}],ce=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],le=r(function(){let e=h(),t=C({enabled:!e});return e||_(t.error)?(0,Z.jsx)(T.Suspense,{fallback:(0,Z.jsx)($,{}),children:(0,Z.jsx)(ie,{})}):t.isPending||t.isLoading?(0,Z.jsx)($,{}):g(t.error)?(0,Z.jsx)(oe,{}):(0,Z.jsx)(a,{})});export{ae as Layout,le as default,se as links,ce as meta};
|