@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 +1 @@
|
|
|
1
|
-
import{d as e,n as t,s as n}from"./agent-server-client-options-
|
|
1
|
+
import{d as e,n as t,s as n}from"./agent-server-client-options-9agOSarV.js";import{t as r}from"./proxy-BqDMnUY-.js";import{t as i}from"./settings-DGY6n4J2.js";var a=`openhands-agent-server-app-preferences`,o=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`],s=new Set(o),c=e=>s.has(e),l=(e,t)=>{switch(e){case`language`:case`git_user_name`:case`git_user_email`:return typeof t==`string`?t:void 0;case`enable_sound_notifications`:return typeof t==`boolean`?t:void 0;case`user_consents_to_analytics`:return t===null?null:typeof t==`boolean`?t:void 0;default:return}},u=e=>{let t={};for(let n of o)if(n in e){let r=l(n,e[n]);r!==void 0&&(t[n]=r)}return t},d=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(a);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`||Array.isArray(t)?{}:u(t)}catch{return{}}},f=e=>{if(typeof window>`u`)return;let t=u(e),n={...d(),...t};if(Object.keys(n).length===0){window.localStorage.removeItem(a);return}window.localStorage.setItem(a,JSON.stringify(n))},p=e=>{let t={},n={};for(let[r,i]of Object.entries(e))if(c(r)){let e=l(r,i);e!==void 0&&(t[r]=e)}else n[r]=i;return{extracted:t,rest:n}};function m(){let t=e().backend;if(t.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return t}function h(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),t}function g(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function _(){let e=await r({backend:m(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:h(e),conversation_settings:g(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function v(e){let t=m(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.disabled_skills!==void 0&&(n.disabled_skills=e.disabled_skills),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))n[t]=r;await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function y(){return r({backend:m(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function b(){return r({backend:m(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var x=e=>JSON.parse(JSON.stringify(e)),S=`openhands-agent-server-disabled-skills`,C=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(S);if(!e)return null;let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):null}catch{return null}},w=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(S,JSON.stringify(e))}catch{}},T=(e,t)=>({...e??{},...t??{}});async function E(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var D={redacted:null,encrypted:null,timestamp:0},O=300*1e3,k=()=>Date.now()-D.timestamp<O,A=()=>{D={redacted:null,encrypted:null,timestamp:0}},j=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=C();return n!==null&&(t.disabled_skills=n),t},M=e=>{let t=T(i.agent_settings??{},e.agent_settings??{}),n=T(i.conversation_settings??{},e.conversation_settings??{}),r=d(),a={...x(i),...r,...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},o=t.llm,s=t.condenser;return typeof t.agent==`string`&&(a.agent=t.agent),typeof o?.model==`string`&&o.model.length>0&&(a.llm_model=o.model),typeof o?.base_url==`string`&&(a.llm_base_url=o.base_url),typeof s?.enabled==`boolean`&&(a.enable_default_condenser=s.enabled),typeof s?.max_size==`number`&&(a.condenser_max_size=s.max_size),t.mcp_config&&(a.mcp_config=t.mcp_config),typeof n.confirmation_mode==`boolean`&&(a.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(a.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(a.max_iterations=n.max_iterations),a.search_api_key_set=!!a.search_api_key,a},N=class r{static async fetchSettingsFromApi(e){return E(()=>new n(t()).getSettings({exposeSecrets:e}))}static async getSettings(){if(e().backend.kind===`cloud`)try{return M(await E(()=>_()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),M({})}if(k()&&D.redacted)return M(j(D.redacted));try{let e=await this.fetchSettingsFromApi();return D.redacted=e,D.timestamp=Date.now(),M(j(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),M({})}}static async getSettingsForConversation(){if(k()&&D.encrypted)return{agentSettings:D.encrypted.agent_settings,conversationSettings:D.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return D.encrypted=e,D.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return e().backend.kind===`cloud`?await y():await new n(t()).getAgentSchema()}static async getConversationSettingsSchema(){return e().backend.kind===`cloud`?await b():await new n(t()).getConversationSchema()}static async saveSettings(i){let{extracted:a,rest:o}=p(i),s=Object.keys(a).length>0;s&&f(a);let c={},l=o.agent_settings_diff;l&&Object.keys(l).length>0&&(c.agent_settings_diff=l);let u=o.conversation_settings_diff;u&&Object.keys(u).length>0&&(c.conversation_settings_diff=u);let d=o.disabled_skills;Array.isArray(d)&&(c.disabled_skills=d);let m=e().backend.kind===`cloud`,h=c.agent_settings_diff,g=!!h&&`mcp_config`in h&&h.mcp_config!==null,y;if(g)try{y=m?(await _())?.agent_settings?.mcp_config:(await r.fetchSettingsFromApi())?.agent_settings?.mcp_config}catch{}if(m){if(!(c.agent_settings_diff||c.conversation_settings_diff||c.disabled_skills!==void 0||s))return!0;g&&await E(()=>v({agent_settings_diff:{mcp_config:null}}));try{await E(()=>v({...c,...s?{app_preferences:a}:{}}))}catch(e){if(g&&y)try{await v({agent_settings_diff:{mcp_config:y}})}catch{}throw e}}else{Array.isArray(d)&&w(d);let e={...c};if(delete e.disabled_skills,!(e.agent_settings_diff||e.conversation_settings_diff))return s&&A(),!0;g&&await E(()=>new n(t()).updateSettings({agent_settings_diff:{mcp_config:null}}));try{await E(()=>new n(t()).updateSettings(e))}catch(e){if(g&&y)try{await new n(t()).updateSettings({agent_settings_diff:{mcp_config:y}})}catch{}throw e}}return A(),!0}static invalidateCache(){A()}};export{N as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n,P as r,r as i}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as a}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{d as o}from"./path-utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n,P as r,r as i}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as a}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{d as o}from"./path-utils-z12iCrQO.js";import{o as s,t as c}from"./declaration-CR6HMp29.js";import{t as l}from"./useTranslation-B6voJV4y.js";import{t as u}from"./messages-Ba1vaw6t.js";import{o as d}from"./conversation-websocket-context-DShEuLjh.js";import{n as f}from"./agent-server-client-options-9agOSarV.js";import{o as p}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js";import{t as m}from"./loading-spinner-5GT9q1xy.js";import{t as h}from"./openhands-logo-CCo0wJZX.js";import{n as g}from"./use-event-store-BomO7ywK.js";var _=e(t(),1),v=e=>a({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new p(f()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>o({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new p(f()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=s(),S=n(function(){let{t:e}=l(`openhands`),{conversationId:t}=r(),{data:n,isLoading:a,error:o}=v(t),{data:s,isLoading:f,error:p,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=a||f,E=o||p,D=_.useMemo(()=>s?.pages?s.pages.flatMap(e=>e.items):[],[s?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>g(t,e),[]).filter(d),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(m,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(c.CONVERSATION$NOT_FOUND)})}):(0,x.jsxs)(`div`,{className:`h-screen bg-base text-white flex flex-col`,children:[(0,x.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)] p-4 flex-shrink-0`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto flex items-start gap-4`,children:[(0,x.jsx)(i,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(c.BRANDING$OPENHANDS_LOGO),children:(0,x.jsx)(h,{width:46,height:30})}),(0,x.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,x.jsx)(`h1`,{className:`text-xl font-medium mb-2`,children:n?.title||e(c.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(c.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(c.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(c.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(u,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(c.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(m,{size:`small`})})]})})]})});export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./useMutation-GSSKKebK.js";import{o as r,t as i}from"./declaration-CR6HMp29.js";import{n as a}from"./QueryClientProvider-Cnr-Yl3j.js";import{t as o}from"./Trans-4jmk54WC.js";import{t as s}from"./useTranslation-B6voJV4y.js";import{t as c}from"./createLucideIcon-Ddu8jDOQ.js";import{t as l}from"./utils-DCVfKFRt.js";import{t as u}from"./agent-server-conversation-service.api-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./useMutation-GSSKKebK.js";import{o as r,t as i}from"./declaration-CR6HMp29.js";import{n as a}from"./QueryClientProvider-Cnr-Yl3j.js";import{t as o}from"./Trans-4jmk54WC.js";import{t as s}from"./useTranslation-B6voJV4y.js";import{t as c}from"./createLucideIcon-Ddu8jDOQ.js";import{t as l}from"./utils-DCVfKFRt.js";import{t as u}from"./agent-server-conversation-service.api-B9TUYJon.js";import{t as d}from"./modal-backdrop-RfNCrSpK.js";import{n as f}from"./modal-body-aoa2fx5W.js";import{n as p,r as m}from"./base-modal-C2oy2EBG.js";import{g as h,l as g,t as _}from"./brand-button-DJ_S16rO.js";var v=c(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),y=e(t(),1),b=r();function x({onConfirm:e,onCancel:t,conversationTitle:n,title:r,description:a}){let{t:c}=s(`openhands`),l;return l=a??(n?(0,b.jsx)(o,{ns:`openhands`,i18nKey:i.CONVERSATION$DELETE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,b.jsx)(`span`,{className:`text-white`})}}):c(i.CONVERSATION$DELETE_WARNING)),(0,b.jsx)(d,{onClose:t,children:(0,b.jsxs)(f,{className:`items-start border border-[var(--oh-border)]`,children:[(0,b.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,b.jsx)(m,{title:r??c(i.CONVERSATION$CONFIRM_DELETE)}),(0,b.jsx)(p,{children:l})]}),(0,b.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,b.jsx)(_,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:c(i.BUTTON$CANCEL)}),(0,b.jsx)(_,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:c(i.ACTION$CONFIRM_DELETE)})]})]})})}function S({onConfirm:e,onCancel:t}){let{t:n}=s(`openhands`);return(0,b.jsx)(d,{onClose:t,children:(0,b.jsxs)(f,{className:`items-start border border-[var(--oh-border)]`,children:[(0,b.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,b.jsx)(m,{title:n(i.CONVERSATION$CONFIRM_CLOSE_CONVERSATION)}),(0,b.jsx)(p,{description:n(i.CONVERSATION$CLOSE_CONVERSATION_WARNING)})]}),(0,b.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,b.jsx)(_,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:n(i.BUTTON$CANCEL)}),(0,b.jsx)(_,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:n(i.ACTION$CONFIRM_CLOSE)})]})]})})}var C=()=>{let e=a();return n({mutationFn:e=>u.updateConversationTitle(e.conversationId,e.newTitle),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.map(e=>e.id===t.conversationId?{...e,title:t.newTitle}:e)),e.setQueryData([`user`,`conversation`,t.conversationId],e=>e&&{...e,title:t.newTitle}),{previousConversations:n}},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]})}})},w=e=>(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,b.jsx)(`path`,{d:`M12 2C12.5523 2 13 2.44772 13 3V13.5858L15.2929 11.2929C15.6834 10.9024 16.3166 10.9024 16.7071 11.2929C17.0976 11.6834 17.0976 12.3166 16.7071 12.7071L12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L7.29289 12.7071C6.90237 12.3166 6.90237 11.6834 7.29289 11.2929C7.68342 10.9024 8.31658 10.9024 8.70711 11.2929L11 13.5858V3C11 2.44772 11.4477 2 12 2ZM5 17C5.55228 17 6 17.4477 6 18V20H18V18C18 17.4477 18.4477 17 19 17C19.5523 17 20 17.4477 20 18V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V18C4 17.4477 4.44772 17 5 17Z`,fill:`currentColor`})}),T=e=>(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,b.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21 7.5V9H3V7.5H21ZM3 10.5H21V18H3V10.5ZM21 6H3C2.60218 6 2.22064 6.15804 1.93934 6.43934C1.65804 6.72064 1.5 7.10218 1.5 7.5V18C1.5 18.3978 1.65804 18.7794 1.93934 19.0607C2.22064 19.342 2.60218 19.5 3 19.5H21C21.3978 19.5 21.7794 19.342 22.0607 19.0607C22.342 18.7794 22.5 18.3978 22.5 18V7.5C22.5 7.10218 22.342 6.72064 22.0607 6.43934C21.7794 6.15804 21.3978 6 21 6ZM16.5 15H19.5V16.5H16.5V15Z`,fill:`currentColor`})}),E=y.createContext(null);function D({children:e}){let[t,n]=y.useState(!1),r=y.useCallback(()=>n(!0),[]),i=y.useCallback(()=>n(!1),[]),a=y.useCallback(()=>n(e=>!e),[]),o=y.useMemo(()=>({isOpen:t,open:r,close:i,toggle:a}),[t,r,i,a]);return(0,b.jsx)(E.Provider,{value:o,children:e})}function O(){let e=y.useContext(E);if(!e)throw Error(`useSidebarMobileNav must be used within SidebarMobileNavProvider`);return e}var k=l(`inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)]`,h,g),A=`size-5 shrink-0`,j=e=>(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,b.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 5.5H18C18.2761 5.5 18.5 5.72386 18.5 6V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 5.5ZM8.5 5.5H6C5.72386 5.5 5.5 5.72386 5.5 6V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 5.5ZM18 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4Z`,fill:`currentColor`})});function M(){let{t:e}=s(`openhands`),{isOpen:t,toggle:n}=O();return(0,b.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-menu-toggle`,onClick:n,"aria-expanded":t,"aria-label":e(t?i.SIDEBAR$CLOSE_MENU:i.SIDEBAR$OPEN_MENU),className:k,children:(0,b.jsx)(j,{className:A,"aria-hidden":!0})})}export{D as a,w as c,x as d,v as f,A as i,C as l,j as n,O as o,k as r,T as s,M as t,S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-CR6HMp29.js";import{t as n}from"./utils-DCVfKFRt.js";import{n as r}from"./navigation-context-BdKYH32C.js";import{t as i}from"./navigation-link-U4vY9i_C.js";import{c as a,f as o,l as s,m as c,r as l,s as u,u as d}from"./use-cloud-current-user-id-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-CR6HMp29.js";import{t as n}from"./utils-DCVfKFRt.js";import{n as r}from"./navigation-context-BdKYH32C.js";import{t as i}from"./navigation-link-U4vY9i_C.js";import{c as a,f as o,l as s,m as c,r as l,s as u,u as d}from"./use-cloud-current-user-id-ClKFPjFz.js";import{t as f}from"./styled-tooltip-hdfMXPQC.js";e();var p=t();function m({active:e,className:t,children:r}){return(0,p.jsxs)(`span`,{className:n(l,t),children:[(0,p.jsx)(`span`,{"aria-hidden":!0,className:s(e)}),(0,p.jsx)(`span`,{className:d(e),children:r})]})}function h(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}function g({to:e,label:t,end:s=!1,indent:l=!1,testId:d,disabled:g=!1,icon:_,collapsed:v=!1,hoverContent:y,disabledReason:b,forceActive:x=!1}){let{currentPath:S}=r(),C=x||h(S,e,s),w=(0,p.jsxs)(i,{to:e,end:s,"data-testid":d,tabIndex:g?-1:0,"aria-label":v?t:void 0,"aria-disabled":g||void 0,onClick:e=>{g&&e.preventDefault()},className:n(c({indent:l,collapsed:v}),!v&&(C?a.active:a.idle),g&&`pointer-events-none opacity-50`),children:[_?v?(0,p.jsx)(m,{active:C,children:_}):(0,p.jsx)(`span`,{className:u,children:_}):null,(0,p.jsx)(`span`,{className:o(v),children:t})]});return g&&b?(0,p.jsx)(f,{content:b,placement:`right`,children:w}):v?(0,p.jsx)(f,{content:y??t,placement:`right`,tooltipClassName:y?`p-0 bg-tertiary text-white`:void 0,children:w}):w}export{m as n,g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as t,t as n}from"./declaration-CR6HMp29.js";import{t as r}from"./useTranslation-B6voJV4y.js";import{n as i}from"./extensions-navigation-
|
|
1
|
+
import{L as e}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as t,t as n}from"./declaration-CR6HMp29.js";import{t as r}from"./useTranslation-B6voJV4y.js";import{n as i}from"./extensions-navigation-VQ-3umJ7.js";import{n as a}from"./settings-like-page-layout-classes-D7YjdTd0.js";var o=t(),s=e(function(){let{t:e}=r(`openhands`);return(0,o.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,o.jsx)(i,{}),(0,o.jsx)(`main`,{className:a,children:(0,o.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:(0,o.jsxs)(`div`,{className:`mb-4 min-w-0 space-y-1`,children:[(0,o.jsx)(`h2`,{className:`text-xl font-medium leading-6 text-foreground`,children:e(n.SETTINGS$PLUGINS_TITLE)}),(0,o.jsx)(`div`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(n.SETTINGS$PLUGINS_DESCRIPTION)})]})})})]})});export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
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{o as r,t as i}from"./declaration-CR6HMp29.js";import{t as a}from"./Trans-4jmk54WC.js";import{t as o}from"./useTranslation-B6voJV4y.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c}from"./custom-toast-handlers-ufGJ6_Rc.js";import{a as l,l as u,n as d,s as f}from"./circle-plus-check-toggle-DKS8MAVV.js";import{t as p}from"./x-JOBEVLW0.js";import{t as m}from"./utils-DCVfKFRt.js";import{t as h}from"./modal-backdrop-RfNCrSpK.js";import{n as g}from"./modal-classes-6YqcqA6y.js";import{t as _}from"./brand-button-DJ_S16rO.js";import{t as v}from"./modal-close-button-CtWOUMmw.js";import{r as ee}from"./use-settings-
|
|
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{o as r,t as i}from"./declaration-CR6HMp29.js";import{t as a}from"./Trans-4jmk54WC.js";import{t as o}from"./useTranslation-B6voJV4y.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c}from"./custom-toast-handlers-ufGJ6_Rc.js";import{a as l,l as u,n as d,s as f}from"./circle-plus-check-toggle-DKS8MAVV.js";import{t as p}from"./x-JOBEVLW0.js";import{t as m}from"./utils-DCVfKFRt.js";import{t as h}from"./modal-backdrop-RfNCrSpK.js";import{n as g}from"./modal-classes-6YqcqA6y.js";import{t as _}from"./brand-button-DJ_S16rO.js";import{t as v}from"./modal-close-button-CtWOUMmw.js";import{r as ee}from"./use-settings-DeO7nvpM.js";import{t as y}from"./skills-0GRKX5Xj.js";import{t as b}from"./use-save-settings-uXXkqvD7.js";import{t as x}from"./use-skills-DWIK3l3a.js";import{t as S}from"./checkmark-Dus0b6jt.js";import{t as C}from"./copy-Chg-sFu3.js";import{t as w}from"./settings-switch-BiBuS3xa.js";import{n as T,t as E}from"./skill-card-pill-row-BW9qvhoK.js";import{n as D}from"./extensions-navigation-VQ-3umJ7.js";import{n as O,t as k}from"./use-launch-skill-in-chat-sQNEOLGD.js";import{t as A}from"./enum-filter-dropdown-5JeF2RLb.js";import{n as j}from"./settings-like-page-layout-classes-D7YjdTd0.js";var M=e(t(),1),N=r();function P({skillName:e,className:t}){return(0,N.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:m(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,t),children:(0,N.jsx)(y,{})})}var F=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function te(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ne(e){let t=e.match(F);return t?e.slice(t[0].length).trim():e.trim()}function re(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function I(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(F);if(r){let e=te(r[1]);if(e)return e}return re(ne(n))}var L=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,R={agentskills:{labelKey:i.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:i.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:i.SETTINGS$SKILLS_TYPE_REPO}};function z({type:e}){let{t}=o(`openhands`),n=R[e];return(0,N.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:L,children:t(n.labelKey)})}function B(e,t,n){if(e)return`${e}-${t}-${n}`}function V(e,t,n={}){let{variant:r=`card`,testIdPrefix:a}=n,o=[{id:`type-${e.type}`,node:(0,N.jsx)(z,{type:e.type})}];if(e.version&&o.push({id:`version-${e.version}`,node:(0,N.jsx)(`span`,{"data-testid":B(a,e.name,`version`)??`skill-version-${e.name}`,className:E,children:t(i.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&o.push({id:`license-${e.license}`,node:(0,N.jsx)(`span`,{"data-testid":B(a,e.name,`license`),className:E,children:e.license})}),r===`detail`&&e.compatibility&&o.push({id:`compatibility-${e.compatibility}`,node:(0,N.jsx)(`span`,{"data-testid":B(a,e.name,`compatibility`),className:E,children:e.compatibility})}),e.disable_model_invocation&&o.push({id:`disable-model-invocation`,node:(0,N.jsxs)(`span`,{"data-testid":B(a,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,N.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(i.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)o.push({id:`allowed-tool-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(a,e.name,`tool-${t}`),className:m(E,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))o.push({id:`metadata-${t}`,node:(0,N.jsxs)(`span`,{"data-testid":B(a,e.name,`metadata-${t}`),className:E,children:[(0,N.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])o.push({id:`trigger-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(a,e.name,`trigger-${t}`),className:E,children:t})});return o}function H(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function U({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:a}=o(`openhands`),[s,c]=M.useState(!1),u=I(e),p=M.useMemo(()=>V(e,a),[e,a]),h=H(e.source);return M.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,N.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:m(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,f,l),children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,N.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),h?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":a(s?i.BUTTON$COPIED:i.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),c(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:s?(0,N.jsx)(S,{width:12,height:12}):(0,N.jsx)(C,{width:12,height:12})}):null]}):null]}),(0,N.jsx)(d,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:i.COMMON$DISABLE})]}),u?(0,N.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:u})}):null,p.length>0?(0,N.jsx)(T,{pills:p,testId:`skill-triggers-${e.name}`}):null]})]})})}var W=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,G=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function K(e){return e.name===`add-skill`?G:`/${e.name} `}function q({testId:e,label:t,value:n}){return(0,N.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:t}),(0,N.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
2
|
`).length)),className:m(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function J({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:a}=o(`openhands`),s=k(),[c,l]=M.useState(!1),u=M.useMemo(()=>K(e),[e]),d=I(e),f=M.useMemo(()=>V(e,a,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,a]),p=H(e.source);return M.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,N.jsx)(h,{onClose:r,"aria-label":e.name,children:(0,N.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,N.jsx)(v,{onClose:r,testId:`skill-detail-modal-close`}),(0,N.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:g,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),p?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":a(c?i.BUTTON$COPIED:i.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,N.jsx)(S,{width:12,height:12}):(0,N.jsx)(C,{width:12,height:12})}):null]}):null]})]}),(0,N.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,N.jsx)(w,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:a(t?i.SETTINGS$SKILLS_ENABLED:i.SETTINGS$SKILLS_DISABLED)})}),d?(0,N.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,f.length>0?(0,N.jsx)(T,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,N.jsx)(q,{testId:`skill-modal-field-content-${e.name}`,label:a(i.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,N.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,N.jsx)(_,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:a(i.BUTTON$CLOSE)}),(0,N.jsx)(_,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,N.jsx)(O,{className:`size-4`,"aria-hidden":!0}),children:a(i.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Y=[i.SETTINGS$SKILLS_ADD_MODAL_STEP_1,i.SETTINGS$SKILLS_ADD_MODAL_STEP_2,i.SETTINGS$SKILLS_ADD_MODAL_STEP_3,i.SETTINGS$SKILLS_ADD_MODAL_STEP_4,i.SETTINGS$SKILLS_ADD_MODAL_STEP_5],X={cmd:(0,N.jsx)(Z,{}),path:(0,N.jsx)(Z,{}),env:(0,N.jsx)(Z,{})};function Z({children:e}){return(0,N.jsx)(`code`,{className:m(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function ie(){let{t:e}=o(`openhands`),[t,n]=M.useState(!1);return M.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:m(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:G}),(0,N.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?i.BUTTON$COPIED:i.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(G),n(!0)},className:m(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,N.jsx)(S,{width:14,height:14}):(0,N.jsx)(C,{width:14,height:14})})]})}function Q({i18nKey:e}){return(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,N.jsx)(a,{ns:`openhands`,i18nKey:e,components:X})})}function ae({onClose:e}){let{t}=o(`openhands`);return(0,N.jsx)(h,{onClose:e,"aria-label":t(i.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,N.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,N.jsx)(v,{onClose:e,testId:`add-skill-modal-close`}),(0,N.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,N.jsx)(`h2`,{className:m(`pr-6`,g),children:t(i.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,N.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,N.jsx)(Q,{i18nKey:i.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,N.jsx)(ie,{}),(0,N.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Y.map(e=>(0,N.jsx)(`li`,{children:e===i.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,N.jsx)(a,{ns:`openhands`,i18nKey:e,components:X}):t(e)},e))})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,N.jsx)(Q,{i18nKey:i.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,N.jsx)(Q,{i18nKey:i.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,N.jsx)(`a`,{href:W,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(i.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,N.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,N.jsx)(_,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(i.BUTTON$CLOSE)})})]})})}var oe=[`all`,`agentskills`,`knowledge`,`repo`],$={all:i.SETTINGS$SKILLS_TYPE_ALL,agentskills:i.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:i.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:i.SETTINGS$SKILLS_TYPE_REPO};function se({value:e,onChange:t}){return(0,N.jsx)(A,{testId:`skills-type-filter`,value:e,onChange:t,options:oe,labelKeyByValue:$})}function ce({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:a}=o(`openhands`);return(0,N.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,N.jsxs)(`div`,{className:m(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,N.jsx)(u,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,N.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:a(i.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":a(i.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:m(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,N.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":`Clear search`,className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,N.jsx)(p,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,N.jsx)(se,{value:n,onChange:r})]})}function le(e,t){if(!t)return!0;let n=[e.name,I(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function ue(){let{t:e}=o(`openhands`),{mutate:t}=b(),{data:n,isLoading:r}=ee(),{data:a,isLoading:l}=x(),[u,d]=M.useState(new Set),[f,p]=M.useState(!1),[h,g]=M.useState(``),[v,y]=M.useState(`all`),[S,C]=M.useState(null),[w,T]=M.useState(!1);M.useEffect(()=>{r||!n||(d(new Set(n.disabled_skills??[])),p(!0))},[r,n?.disabled_skills]);let E=(e,t)=>{d(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};M.useEffect(()=>{f&&t({disabled_skills:Array.from(u)},{onError:t=>{c(s(t)||e(i.ERROR$GENERIC))}})},[u,f,t,e]);let O=r||l||!n,k=M.useMemo(()=>a?a.filter(e=>(v===`all`||e.type===v)&&le(e,h)):[],[a,v,h]);return(0,N.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,N.jsx)(D,{}),(0,N.jsx)(`main`,{className:m(j,`h-full`),children:(0,N.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(i.SETTINGS$SKILLS_TITLE)}),(0,N.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(i.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,N.jsx)(_,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(i.SETTINGS$SKILLS_ADD_BUTTON)})]}),O&&(0,N.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!O&&(!a||a.length===0)&&(0,N.jsx)(`p`,{className:`text-sm text-tertiary`,children:e(i.SETTINGS$SKILLS_NO_SKILLS)}),!O&&a&&a.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ce,{search:h,onSearchChange:g,typeFilter:v,onTypeFilterChange:y}),k.length===0?(0,N.jsx)(`p`,{"data-testid":`skills-no-match`,className:`text-sm text-tertiary`,children:e(i.SETTINGS$SKILLS_NO_MATCH)}):(0,N.jsx)(`section`,{className:m(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,N.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,N.jsx)(U,{skill:e,enabled:!u.has(e.name),onOpen:()=>C(e),onToggle:t=>E(e.name,t)},e.name))})})]}),S&&(0,N.jsx)(J,{skill:S,enabled:!u.has(S.name),onToggle:e=>E(S.name,e),onClose:()=>C(null)}),w&&(0,N.jsx)(ae,{onClose:()=>T(!1)})]})})]})}var de=n(ue);export{de as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-CR6HMp29.js";import{C as r,t as i}from"./utils-DCVfKFRt.js";import{t as a}from"./use-agent-state-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-CR6HMp29.js";import{C as r,t as i}from"./utils-DCVfKFRt.js";import{t as a}from"./use-agent-state-Dp3pD1h3.js";import{t as o}from"./command-store-CE1weJy8.js";import{n as s,t as c}from"./vendor~terminal-DZaJIY8A.js";import{t as l}from"./waiting-for-runtime-message-CdK3btDZ.js";var u=e(t(),1),d=`[Python Interpreter: `,f=e=>{let t=e.indexOf(d);if(t<0)return e;let n=t+21;return e.indexOf(`]`,n)<=n?e:e.substring(0,t).trim()},p=(e,t,n=!1)=>{let{content:r,type:i}=e;if(i===`input`&&n)return;let a=(r||``).replaceAll(`
|
|
2
2
|
`,`\r
|
|
3
3
|
`).trim();a&&t.writeln(f(a))},m=(e,t,n)=>{if(!e||!t||!n||window.getComputedStyle(n).display===`none`)return!1;let{clientWidth:r,clientHeight:i}=n;return!(r===0||i===0||!e.element)};function h(e){let t=e.ownerDocument.createElement(`span`);t.style.color=`var(--oh-surface-foreground)`,t.style.position=`absolute`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,e.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n&&n!==`rgba(0, 0, 0, 0)`?n:getComputedStyle(e).color}var g={current:0},_=()=>{let e=o(e=>e.commands),t=u.useRef(null),n=u.useRef(null),r=u.useRef(null),i=g,a=u.useRef(!1),l=e=>new c({fontFamily:`Menlo, Monaco, 'Courier New', monospace`,fontSize:14,scrollback:1e4,scrollSensitivity:1,fastScrollSensitivity:5,disableStdin:!0,allowTransparency:!0,theme:{background:`rgba(0, 0, 0, 0)`,foreground:h(e)}}),d=u.useCallback(()=>{a.current||m(t.current,n.current,r.current)&&n.current.fit()},[]),f=()=>{t.current&&(n.current&&t.current.loadAddon(n.current),r.current&&(t.current.open(r.current),t.current.write(`\x1B[?25l`),d()))};return u.useEffect(()=>{a.current=!1;let o=r.current;if(o){if(t.current=l(o),n.current=new s,r.current&&(f(),e.length>0)){for(let n=0;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),p(e[n],t.current,!1);i.current=e.length}return()=>{a.current=!0,t.current?.dispose(),i.current=0}}},[]),u.useEffect(()=>{if(t.current&&e.length>0&&i.current<e.length){for(let n=i.current;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),p(e[n],t.current,!1);i.current=e.length}},[e]),u.useEffect(()=>{let e=null;return e=new ResizeObserver(()=>{requestAnimationFrame(()=>{d()})}),r.current&&e.observe(r.current),()=>{e?.disconnect()}},[d]),r},v=n();function y(){let{curAgentState:e}=a(),t=r.includes(e),n=_();return(0,v.jsxs)(`div`,{className:`h-full flex flex-col rounded-xl`,children:[t&&(0,v.jsx)(l,{className:`pt-16`}),(0,v.jsx)(`div`,{className:`flex-1 min-h-0 p-4`,children:(0,v.jsx)(`div`,{ref:n,className:i(`w-full h-full`,t?`p-0 w-0 h-0 opacity-0 overflow-hidden`:``)})})]})}export{y as default};
|
package/build/assets/{use-active-conversation-DHGcmjCK.js → use-active-conversation-sPgfSkql.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{n}from"./navigation-context-BdKYH32C.js";import{t as r}from"./conversation-service.api-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{n}from"./navigation-context-BdKYH32C.js";import{t as r}from"./conversation-service.api-B6CkzaKD.js";import{t as i}from"./use-user-conversation-DJen4YIP.js";var a=e(t(),1);function o(){let{conversationId:e}=n();return{conversationId:e}}function s(){let{conversationId:e}=o();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}var c=()=>{let{conversationId:e}=o(),t=!!e&&e.startsWith(`task-`),n=i(!e||t?null:e,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`)?3e3:3e4});return(0,a.useEffect)(()=>{let e=n.data;r.setCurrentConversation(e||null)},[e,n.isFetched,n?.data?.execution_status]),n};export{s as n,o as r,c as t};
|
package/build/assets/{use-agent-settings-schema-CLoTOSJI.js → use-agent-settings-schema-B66kGIi_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{g as t}from"./agent-server-client-options-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{g as t}from"./agent-server-client-options-9agOSarV.js";import{n}from"./active-backend-context-BSPE-W72.js";import{t as r}from"./settings-service.api-DwtyDeGh.js";import{t as i}from"./use-is-authed-dw2026rR.js";var a=(a,o)=>{let{data:s}=i(),{backend:c,orgId:l}=n(),u=!t(c),{data:d,error:f,isLoading:p,isFetching:m}=e({queryKey:[`settings-schema`,a,c.id,l,c.kind,c.host,c.apiKey],queryFn:a===`conversation`?r.getConversationSettingsSchema:r.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!o&&!!s&&u,meta:{disableToast:!0}});return o?{data:o,error:null,isLoading:!1,isFetching:!1}:{data:d,error:f,isLoading:p,isFetching:m}},o=e=>a(`agent`,e),s=e=>a(`conversation`,e);export{s as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{S as n}from"./utils-DCVfKFRt.js";import{t as r}from"./common-DqjLSBOt.js";import{t as i}from"./conversation-state-store-D-w0uurj.js";import{t as a}from"./use-active-conversation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{S as n}from"./utils-DCVfKFRt.js";import{t as r}from"./common-DqjLSBOt.js";import{t as i}from"./conversation-state-store-D-w0uurj.js";import{t as a}from"./use-active-conversation-sPgfSkql.js";var o=e(t(),1);function s(e){if(!e)return n.LOADING;switch(e){case r.IDLE:return n.AWAITING_USER_INPUT;case r.RUNNING:return n.RUNNING;case r.PAUSED:return n.PAUSED;case r.WAITING_FOR_CONFIRMATION:return n.AWAITING_USER_CONFIRMATION;case r.FINISHED:return n.FINISHED;case r.ERROR:return n.ERROR;case r.STUCK:return n.ERROR;default:return n.LOADING}}function c(){let e=i(e=>e.execution_status),t=a().data?.execution_status??null,n=e??t;return{curAgentState:(0,o.useMemo)(()=>s(n),[n]),executionStatus:n}}export{c as t};
|
package/build/assets/{use-cloud-current-user-id-Ddr75hEz.js → use-cloud-current-user-id-ClKFPjFz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./organization-service.api-
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./organization-service.api-BeuMC9QL.js";import{t as i}from"./utils-DCVfKFRt.js";import{n as a,r as o}from"./active-backend-context-BSPE-W72.js";var s=`transition-none motion-reduce:transition-none`,c=`flex h-9 w-[18px] shrink-0 items-center justify-center`,l=`relative h-9 min-h-9 max-h-9 w-full shrink-0`;function u(e){return i(`flex h-10 min-h-10 shrink-0 items-center w-full`,e?`px-0`:`gap-2 pl-2.5 pr-2.5`)}var d={active:`bg-tertiary text-white font-normal`,idle:`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`};function f(e){return i(`flex flex-col gap-0.5 w-full shrink-0 items-stretch`,!e&&`pr-2.5`)}function p(e){let{indent:t=!1,collapsed:n=!1}=e??{};return i(`flex h-9 min-h-9 min-w-0 items-center rounded-md`,s,`text-sm leading-5 w-full`,n?`group gap-0 px-0 overflow-visible bg-transparent hover:bg-transparent`:`gap-2 px-2.5 overflow-hidden`,t&&!n&&`pl-7`)}function m(e){return i(`pointer-events-none absolute inset-0 z-0 rounded-md`,s,e?`bg-tertiary`:`bg-transparent group-hover:bg-[var(--oh-surface-raised)]`)}function h(e){return i(`relative z-[1] flex h-full w-full items-center justify-start pl-2.5 [&_svg]:shrink-0`,e?`text-white font-normal`:`text-[var(--oh-muted)] group-hover:text-white`)}function g(e){return e?`sr-only`:`min-w-0 truncate`}var _=i(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,s,`cursor-pointer`),v=i(`relative hidden md:block shrink-0 overflow-visible`,l),y=i(`absolute left-1/2 top-1/2 hidden h-7 w-7 -translate-x-1/2 -translate-y-1/2 md:inline-flex`,`items-center justify-center rounded-md`,s,`cursor-pointer`,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`);function b(){let{backends:r}=o(),i=r.filter(e=>e.kind===`cloud`),a=e({queries:i.map(e=>({queryKey:[`cloud-organizations`,e.id],queryFn:async()=>{let[r,i]=await Promise.all([t(e),n(e)]);return i.isLegacyKey||i.orgId===null?r:{...r,items:r.items.filter(e=>e.id===i.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return i.forEach((e,t)=>{let n=a[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[]}}),s}function x(){let{backends:t}=o(),n=a(),i=b(),s=[];for(let e of t)if(e.kind===`cloud`){let t=i[e.id],r=e.id===n.backend.id&&n.orgId?n.orgId:t?.orgs[0]?.id??null;r&&s.push({backendId:e.id,orgIdForMe:r})}let c=e({queries:s.map(({backendId:e,orgIdForMe:n})=>{let i=t.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,n],queryFn:async()=>i?r(n,i):{orgId:n,userId:``},enabled:!!i,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),l={};return s.forEach((e,t)=>{let n=c[t];l[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),l}export{y as a,d as c,u as d,g as f,v as i,m as l,p as m,b as n,_ as o,f as p,l as r,c as s,x as t,h as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{r as t,t as n}from"./agent-server-compatibility-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{r as t,t as n}from"./agent-server-compatibility-B7QStIcH.js";import{t as r}from"./option-service.api-CGNANEcT.js";import{i,t as a}from"./query-keys-tAsQcc_9.js";var o=o=>e({queryKey:i.WEB_CLIENT_CONFIG,queryFn:r.getConfig,retry:(e,r)=>!t(r)&&!n(r)&&e<3,meta:{disableToast:!0},...a,enabled:o?.enabled});export{o as t};
|
package/build/assets/{use-create-conversation-Bszyp13O.js → use-create-conversation-B-lwTnfE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useMutation-GSSKKebK.js";import{n as t}from"./QueryClientProvider-Cnr-Yl3j.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js";import{t as r}from"./agent-server-conversation-service.api-
|
|
1
|
+
import{t as e}from"./useMutation-GSSKKebK.js";import{n as t}from"./QueryClientProvider-Cnr-Yl3j.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js";import{t as r}from"./agent-server-conversation-service.api-B9TUYJon.js";import{r as i}from"./use-settings-DeO7nvpM.js";var a=()=>{let e=n(),{data:t}=i(),r={current_url:window.location.href,user_email:t?.email||t?.git_user_email||null};return{trackLoginButtonClick:({provider:t})=>{e.capture(`login_button_clicked`,{provider:t,...r})},trackConversationCreated:({hasRepository:t})=>{e.capture(`conversation_created`,{has_repository:t,...r})},trackPushButtonClick:()=>{e.capture(`push_button_clicked`,{...r})},trackPullButtonClick:()=>{e.capture(`pull_button_clicked`,{...r})},trackCreatePrButtonClick:()=>{e.capture(`create_pr_button_clicked`,{...r})},trackUserSignupCompleted:()=>{e.capture(`user_signup_completed`,{signup_timestamp:new Date().toISOString(),...r})}}},o=()=>{let n=t(),{trackConversationCreated:i}=a();return e({mutationKey:[`create-conversation`],mutationFn:async e=>{let{query:t,conversationInstructions:n,plugins:i,repository:a,workingDir:o,parentConversationId:s,agentType:c}=e,l=await r.createConversation(t,n,i,a?{selected_repository:a.name,selected_branch:a.branch??null,git_provider:a.gitProvider}:null,o,s,c);return{conversation_id:l.app_conversation_id?l.app_conversation_id:`task-${l.id}`,session_api_key:null,url:l.agent_server_url,task_id:l.id}},onSuccess:async(e,{repository:t})=>{i({hasRepository:!!t}),n.invalidateQueries({queryKey:[`user`,`conversations`]}),n.invalidateQueries({queryKey:[`start-tasks`]})}})};export{a as n,o as t};
|
|
@@ -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{t as r}from"./useMutation-GSSKKebK.js";import{n as i}from"./active-backend-context-
|
|
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{t as r}from"./useMutation-GSSKKebK.js";import{n as i}from"./active-backend-context-BSPE-W72.js";import{t as a}from"./secrets-service-B9AFn9OE.js";var o=()=>r({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)}),s=e(t(),1),c=(e={})=>{let{nameContains:t,enabled:r=!0}=e,o=i(),c=n({queryKey:[`secrets`,o.backend.id,o.orgId],queryFn:a.getSecrets,enabled:r,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,s.useMemo)(()=>{if(!c.data)return[];if(!t)return c.data;let e=t.toLowerCase();return c.data.filter(t=>t.name.toLowerCase().includes(e))},[c.data,t]),isLoading:c.isLoading,isError:c.isError,hasNextPage:!1,isFetchingNextPage:!1,fetchNextPage:()=>{},onLoadMore:()=>{},refetch:c.refetch}};export{o as n,c as t};
|
package/build/assets/{use-handle-plan-click-CohJPvvW.js → use-handle-plan-click-DP6Rs-YP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./declaration-CR6HMp29.js";import{t as r}from"./useTranslation-B6voJV4y.js";import{r as i}from"./custom-toast-handlers-ufGJ6_Rc.js";import{a,r as o}from"./conversation-local-storage-YmOVXxxW.js";import{t as s}from"./conversation-store-CC-isCnP.js";import{t as c}from"./use-create-conversation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./declaration-CR6HMp29.js";import{t as r}from"./useTranslation-B6voJV4y.js";import{r as i}from"./custom-toast-handlers-ufGJ6_Rc.js";import{a,r as o}from"./conversation-local-storage-YmOVXxxW.js";import{t as s}from"./conversation-store-CC-isCnP.js";import{t as c}from"./use-create-conversation-B-lwTnfE.js";import{t as l}from"./use-active-conversation-sPgfSkql.js";var u=e(t(),1),d=()=>{let{t:e}=r(`openhands`),{setConversationMode:t,setSubConversationTaskId:d,subConversationTaskId:f}=s(),{data:p}=l(),{mutate:m,isPending:h}=c();return(0,u.useEffect)(()=>{if(!p?.id)return;let e=o(p.id);e.subConversationTaskId&&!f&&d(e.subConversationTaskId)},[p?.id,f,d]),{handlePlanClick:(0,u.useCallback)(r=>{r?.preventDefault(),r?.stopPropagation(),t(`plan`),!(p?.sub_conversation_ids&&p.sub_conversation_ids.length>0||!p?.id||f)&&m({parentConversationId:p.id,agentType:`plan`},{onSuccess:t=>{i(e(n.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),t.task_id&&(d(t.task_id),a(p.id,{subConversationTaskId:t.task_id}))}})},[p,m,t,d,f,e]),isCreatingConversation:h}};export{d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{n as t}from"./agent-server-client-options-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{n as t}from"./agent-server-client-options-9agOSarV.js";import{n}from"./active-backend-context-BSPE-W72.js";import{t as r}from"./profiles-client-BrqNmaDV.js";import{n as i,t as a}from"./query-keys-tAsQcc_9.js";var o=class{static async listProfiles(){return new r(t()).listProfiles()}static async getProfile(e,n){let i=n?{exposeSecrets:n}:{};return new r(t()).getProfile(e,i)}static async saveProfile(e,n){return new r(t()).saveProfile(e,n)}static async deleteProfile(e){return new r(t()).deleteProfile(e)}static async renameProfile(e,n){return new r(t()).renameProfile(e,n)}static async activateProfile(e){return new r(t()).activateProfile(e)}};function s(t={}){let{backend:r,orgId:s}=n();return e({queryKey:[...i.all,r.id,s],queryFn:o.listProfiles,...a,enabled:t.enabled??!0,meta:{disableToast:!0}})}export{o as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,w as t,y as n}from"./utils-DCVfKFRt.js";import{t as r}from"./use-active-conversation-sPgfSkql.js";import{t as i}from"./use-agent-state-Dp3pD1h3.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?t:e;return n(o?.execution_status)&&!c.includes(s)};export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useMutation-GSSKKebK.js";import{n as t}from"./QueryClientProvider-Cnr-Yl3j.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{t as i}from"./settings-service.api-
|
|
1
|
+
import{t as e}from"./useMutation-GSSKKebK.js";import{n as t}from"./QueryClientProvider-Cnr-Yl3j.js";import{n}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{t as i}from"./settings-service.api-DwtyDeGh.js";import{r as a}from"./use-settings-DeO7nvpM.js";var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let r=t.agent_settings_diff,a=r?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}r&&Object.keys(r).length>0?t.agent_settings_diff=r:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await i.saveSettings(t)},s=(i=`personal`)=>{let s=n(),c=t(),{data:l}=a(i);return e({mutationFn:async e=>{let t=e.mcp_config,n=l?.mcp_config;t&&n!==t&&s.capture(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:t.sse_servers?.length||0,stdio_servers_count:t.stdio_servers?.length||0}),await o(e)},onSuccess:async()=>{await c.invalidateQueries({queryKey:r.byScope(i)})},meta:{disableToast:!0}})};export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{g as t}from"./agent-server-client-options-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{g as t}from"./agent-server-client-options-9agOSarV.js";import{n}from"./active-backend-context-BSPE-W72.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-CLlsvdNP.js";import{t as a}from"./settings-DGY6n4J2.js";import{t as o}from"./settings-service.api-DwtyDeGh.js";var s=(...e)=>e.find(e=>typeof e==`boolean`),c=(...e)=>e.find(e=>typeof e==`number`),l=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},u={sse_servers:[],stdio_servers:[],shttp_servers:[]};function d(e){if(!e||typeof e!=`object`)return{...u};let t=e;if(!(`mcpServers`in t)||!t.mcpServers||typeof t.mcpServers!=`object`)return{...u};let n=[],r=[],i=[],a=t.mcpServers;for(let[e,t]of Object.entries(a)){if(!t||typeof t!=`object`)continue;let a=t.url;if(a){let e=t.transport,r=t.auth,o=typeof r==`string`&&r!==`oauth`?r:void 0;if(e===`sse`){let e={url:a};o&&(e.api_key=o),n.push(e)}else{let e={url:a};o&&(e.api_key=o),t.timeout!=null&&(e.timeout=t.timeout),i.push(e)}}else{let n={name:e,command:t.command};t.args&&(n.args=t.args),t.env&&(n.env=t.env),r.push(n)}}return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function f(e){let t={},n=e=>{if(!(e in t))return e;let n=1;for(;`${e}_${n}`in t;)n+=1;return`${e}_${n}`};for(let r of e.sse_servers){let e={};typeof r==`string`?e.url=r:(e.url=r.url,r.api_key&&(e.auth=r.api_key)),e.transport=`sse`,t[n(`sse`)]=e}for(let r of e.shttp_servers){let e={};typeof r==`string`?e.url=r:(e.url=r.url,r.api_key&&(e.auth=r.api_key),r.timeout!=null&&(e.timeout=r.timeout)),t[n(`shttp`)]=e}for(let r of e.stdio_servers){let e={command:r.command};r.args&&(e.args=r.args),r.env&&(e.env=r.env),t[n(r.name||`stdio`)]=e}return Object.keys(t).length>0?{mcpServers:t}:null}var p=e=>{if(typeof e==`object`&&e&&`status`in e){let{status:t}=e;if(typeof t==`number`)return t}if(i.isAxiosError(e))return e.response?.status},m=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},h=(e,t,n,r=!1)=>{let i=m(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},g=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}};return{...a,...e,llm_model:h(t,`llm.model`,a.llm_model),llm_base_url:h(t,`llm.base_url`,a.llm_base_url,!0),agent:h(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:s(n.confirmation_mode)??a.confirmation_mode,security_analyzer:l(n.security_analyzer)??a.security_analyzer,max_iterations:c(n.max_iterations)??a.max_iterations,enable_default_condenser:s(m(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:c(m(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:d(e.mcp_config??t.mcp_config),search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||a.git_user_name,git_user_email:e.git_user_email||a.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??a.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??a.agent_settings,conversation_settings_schema:e.conversation_settings_schema??a.conversation_settings_schema,conversation_settings:n}},_=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return g(await o.getSettings())},v=(i=`personal`)=>{let o=n(),s=!t(o.backend),c=e({queryKey:[...r.byScope(i),o.backend.id,o.orgId],queryFn:()=>_(i),retry:(e,t)=>p(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?p(c.error)===404?{data:a,error:c.error,isError:c.isError,isLoading:c.isLoading,isFetching:c.isFetching,isFetched:c.isFetched,isSuccess:c.isSuccess,status:c.status,fetchStatus:c.fetchStatus,refetch:c.refetch}:c:{data:a,error:null,isError:!1,isLoading:!1,isFetching:!1,isFetched:!1,isSuccess:!0,status:`success`,fetchStatus:`idle`,refetch:c.refetch}};export{f as a,d as i,_ as n,v as r,p as t};
|
package/build/assets/{use-settings-nav-items-BcSbo02d.js → use-settings-nav-items-BGMFn25b.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-CR6HMp29.js";import{t as r}from"./createLucideIcon-Ddu8jDOQ.js";import{n as i}from"./active-backend-context-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-CR6HMp29.js";import{t as r}from"./createLucideIcon-Ddu8jDOQ.js";import{n as i}from"./active-backend-context-BSPE-W72.js";import{t as a}from"./use-config-C9pvb0Sm.js";import{n as o}from"./acp-providers-BAX8OU5C.js";import{r as s}from"./use-settings-DeO7nvpM.js";import{t as c}from"./u-circuit-x3ExjBbU.js";import{r as l}from"./settings-utils-DY04tWG1.js";var u=r(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),d=r(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]);e();var f=t(),p=[{icon:(0,f.jsx)(e=>(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,f.jsx)(`path`,{d:`M9 15C8.80222 15 8.60888 15.0586 8.44443 15.1685C8.27998 15.2784 8.15181 15.4346 8.07612 15.6173C8.00043 15.8 7.98063 16.0011 8.01921 16.1951C8.0578 16.3891 8.15304 16.5673 8.29289 16.7071C8.43275 16.847 8.61093 16.9422 8.80491 16.9808C8.99889 17.0194 9.19996 16.9996 9.38268 16.9239C9.56541 16.8482 9.72159 16.72 9.83147 16.5556C9.94135 16.3911 10 16.1978 10 16C10 15.7348 9.89464 15.4804 9.70711 15.2929C9.51957 15.1054 9.26522 15 9 15ZM2 14C1.73478 14 1.48043 14.1054 1.29289 14.2929C1.10536 14.4804 1 14.7348 1 15V17C1 17.2652 1.10536 17.5196 1.29289 17.7071C1.48043 17.8946 1.73478 18 2 18C2.26522 18 2.51957 17.8946 2.70711 17.7071C2.89464 17.5196 3 17.2652 3 17V15C3 14.7348 2.89464 14.4804 2.70711 14.2929C2.51957 14.1054 2.26522 14 2 14ZM22 14C21.7348 14 21.4804 14.1054 21.2929 14.2929C21.1054 14.4804 21 14.7348 21 15V17C21 17.2652 21.1054 17.5196 21.2929 17.7071C21.4804 17.8946 21.7348 18 22 18C22.2652 18 22.5196 17.8946 22.7071 17.7071C22.8946 17.5196 23 17.2652 23 17V15C23 14.7348 22.8946 14.4804 22.7071 14.2929C22.5196 14.1054 22.2652 14 22 14ZM17 7H13V5.72C13.3023 5.54549 13.5536 5.29491 13.7291 4.99317C13.9045 4.69143 13.9979 4.34903 14 4C14 3.46957 13.7893 2.96086 13.4142 2.58579C13.0391 2.21071 12.5304 2 12 2C11.4696 2 10.9609 2.21071 10.5858 2.58579C10.2107 2.96086 10 3.46957 10 4C10.0021 4.34903 10.0955 4.69143 10.2709 4.99317C10.4464 5.29491 10.6977 5.54549 11 5.72V7H7C6.20435 7 5.44129 7.31607 4.87868 7.87868C4.31607 8.44129 4 9.20435 4 10V19C4 19.7956 4.31607 20.5587 4.87868 21.1213C5.44129 21.6839 6.20435 22 7 22H17C17.7956 22 18.5587 21.6839 19.1213 21.1213C19.6839 20.5587 20 19.7956 20 19V10C20 9.20435 19.6839 8.44129 19.1213 7.87868C18.5587 7.31607 17.7956 7 17 7ZM13.72 9L13.22 11H10.78L10.28 9H13.72ZM18 19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H7C6.73478 20 6.48043 19.8946 6.29289 19.7071C6.10536 19.5196 6 19.2652 6 19V10C6 9.73478 6.10536 9.48043 6.29289 9.29289C6.48043 9.10536 6.73478 9 7 9H8.22L9 12.24C9.05475 12.4619 9.18385 12.6583 9.36579 12.7966C9.54774 12.9349 9.77157 13.0067 10 13H14C14.2284 13.0067 14.4523 12.9349 14.6342 12.7966C14.8162 12.6583 14.9452 12.4619 15 12.24L15.78 9H17C17.2652 9 17.5196 9.10536 17.7071 9.29289C17.8946 9.48043 18 9.73478 18 10V19ZM15 15C14.8022 15 14.6089 15.0586 14.4444 15.1685C14.28 15.2784 14.1518 15.4346 14.0761 15.6173C14.0004 15.8 13.9806 16.0011 14.0192 16.1951C14.0578 16.3891 14.153 16.5673 14.2929 16.7071C14.4327 16.847 14.6109 16.9422 14.8049 16.9808C14.9989 17.0194 15.2 16.9996 15.3827 16.9239C15.5654 16.8482 15.7216 16.72 15.8315 16.5556C15.9414 16.3911 16 16.1978 16 16C16 15.7348 15.8946 15.4804 15.7071 15.2929C15.5196 15.1054 15.2652 15 15 15Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/agent`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_SUBLINE`},{icon:(0,f.jsx)(c,{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`,disabledByAcp:!0},{icon:(0,f.jsx)(e=>(0,f.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`style`,{children:`
|
|
2
2
|
.st0 {
|
|
3
3
|
stroke-miterlimit: 10;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{D as t,d as n,n as r}from"./agent-server-client-options-
|
|
1
|
+
import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{D as t,d as n,n as r}from"./agent-server-client-options-9agOSarV.js";import{c as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js";import{t as a}from"./proxy-BqDMnUY-.js";var o=100;function s(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function c(){let e=s(),t=[],n=null;do{let r=new URLSearchParams({limit:String(o)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}var l=class{static async getSkills(e){return n().backend.kind===`cloud`?c():(await new i(r()).getSkills({load_public:!0,load_user:!0,load_project:!0,load_org:!1,project_dir:e??t()})).skills??[]}},u=t=>e({queryKey:[`skills`,t??null],queryFn:()=>l.getSkills(t),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{u as t};
|
package/build/assets/{use-unified-vscode-url-DEoe-NRI.js → use-unified-vscode-url-DXPtB317.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{t}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{o as n,t as r}from"./declaration-CR6HMp29.js";import{t as i}from"./useTranslation-B6voJV4y.js";import{d as a}from"./agent-server-client-options-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{t}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js";import{o as n,t as r}from"./declaration-CR6HMp29.js";import{t as i}from"./useTranslation-B6voJV4y.js";import{d as a}from"./agent-server-client-options-9agOSarV.js";import{n as o}from"./active-backend-context-BSPE-W72.js";import{t as s}from"./agent-server-conversation-service.api-B9TUYJon.js";import{t as c}from"./proxy-BqDMnUY-.js";import{t as l}from"./vscode-url-helper-Cwy1A62q.js";import{t as u}from"./conversation-service.api-B6CkzaKD.js";import{n as d,t as f}from"./use-active-conversation-sPgfSkql.js";import{t as p}from"./use-runtime-is-ready-BakOUVU-.js";e();var m=n(),h=e=>(0,m.jsxs)(`svg`,{viewBox:`0 0 20 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,m.jsx)(`path`,{d:`M12.5063 0.946289L11.4948 2.05386L16.8906 6.98209L11.4928 11.9481L12.5083 13.052L19.1105 6.97807L12.5063 0.946289Z`,fill:`currentColor`}),(0,m.jsx)(`path`,{d:`M7.49476 13.0539L8.50634 11.9463L3.11047 7.01806L8.50834 2.05202L7.49275 0.948125L0.890625 7.02208L7.49476 13.0539Z`,fill:`currentColor`})]});function g(){let e=a().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function _(e){if(e.length===0)return[];let t=g(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await c({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var v=e=>{let n=o(),r=n.backend.kind===`cloud`;return t({queryKey:[`cloud`,`sandbox`,n.backend.id,n.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await _([e]);return t??null},enabled:r&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},y=`VSCODE`,b=()=>{let{t:e}=i(`openhands`),{conversationId:n}=d(),a=p({allowAgentError:!0}),{data:c}=f(),m=o(),h=c?.conversation_url??null,g=c?.session_api_key??null,_=c?.sandbox_id??null,b=m.backend.kind===`cloud`,x=v(b?_:null),S=t({queryKey:[`unified`,`vscode_url`,`local`,n,h,g],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return{url:l((await s.getVSCodeUrl(n,h,g).catch(()=>u.getVSCodeUrl(n))).vscode_url)}},enabled:!b&&a&&!!n,refetchOnMount:!0,retry:3}),C,w,T,E,D,O,k;if(b){let e=x.data?.exposed_urls?.find(e=>e.name===y)?.url??null;C=x.isSuccess?{url:l(e)}:void 0,w=x.isLoading,T=x.isError,E=x.isSuccess,D=x.status,O=x.error,k=async()=>{let e=await x.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===y)?.url??null;return{data:e.data?{url:l(t)}:void 0}}}else C=S.data,w=S.isLoading,T=S.isError,E=S.isSuccess,D=S.status,O=S.error,k=async()=>({data:(await S.refetch()).data});let A=C&&!C.url?e(r.VSCODE$URL_NOT_AVAILABLE):null;return{data:C?{...C,error:A}:void 0,error:O,isLoading:w,isError:T,isSuccess:E,status:D,refetch:k}};export{h as n,b as t};
|
package/build/assets/{use-user-conversation-Cs5H1pUF.js → use-user-conversation-DJen4YIP.js}
RENAMED
|
@@ -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{n as r}from"./active-backend-context-
|
|
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{n as r}from"./active-backend-context-BSPE-W72.js";import{t as i}from"./agent-server-conversation-service.api-B9TUYJon.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-BFRubm34.js";import{c as t,l as n}from"./agent-server-client-options-HEOwGVIU.js";var r=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchEvents(e={}){return(await this.client.get(`/api/bash/bash_events/search`,{params:e})).data}async getEvent(e){return(await this.client.get(`/api/bash/bash_events/${e}`)).data}async getEvents(e){return Promise.all(e.map(async e=>{try{return await this.getEvent(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async startCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/start_bash_command`,r)).data}async executeCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:((r.timeout||30)+10)*1e3})).data}async clearEvents(){return(await this.client.delete(`/api/bash/bash_events`)).data}close(){this.client.close()}normalizeRequest(e,t,n){return typeof e==`string`?{command:e,...t?{cwd:t}:{},...n===void 0?{}:{timeout:Math.floor(n)}}:{...e,...e.timeout===void 0?{}:{timeout:Math.floor(e.timeout)}}}},i=`AGENT_SERVER_VERSION_TOO_OLD`,a={workspaces:{feature:`workspaces`,displayName:`Workspaces`,minVersion:`1.23.0`},hooks:{feature:`hooks`,displayName:`Hooks API`,minVersion:`1.23.0`},mcpTest:{feature:`mcp-test`,displayName:`MCP test API`,minVersion:`1.23.0`},cloudProxy:{feature:`cloud-proxy`,displayName:`Cloud proxy`,minVersion:`1.23.0`}},o=class e extends Error{constructor({requirement:t,actualVersion:n}){super(`${t.displayName} requires agent-server ${t.minVersion} or newer; this backend is running ${n}. Please upgrade your agent-server backend.`),this.code=i,this.name=`AgentServerVersionError`,this.feature=t.feature,this.displayName=t.displayName,this.requiredVersion=t.minVersion,this.actualVersion=n,Object.setPrototypeOf(this,e.prototype)}},s=new WeakMap;function c(e){return e instanceof o||typeof e==`object`&&!!e&&`code`in e&&e.code===`AGENT_SERVER_VERSION_TOO_OLD`}async function l(e){let t=s.get(e);if(t)return t;let n=e.get(`/server_info`).then(e=>e.data);return s.set(e,n),n}async function u(e,t){let n=await l(e),r=typeof n.version==`string`&&n.version.trim()?n.version.trim():`unknown`,i=d(r,t.minVersion);if(i===null||i<0)throw new o({requirement:t,actualVersion:r});return n}function d(e,t){let n=f(e),r=f(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function f(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}var p=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchSubdirectories(e,t={}){return(await this.client.get(`/api/file/search_subdirs`,{params:{path:e,page_id:t.pageId,limit:t.limit}})).data}async getHome(){return(await this.client.get(`/api/file/home`)).data}async downloadFile(e){return(await this.client.get(`/api/file/download`,{params:{path:e},responseType:`arrayBuffer`})).data}async downloadTextFile(e){return new TextDecoder().decode(await this.downloadFile(e))}async uploadFile(e,t,n){let r=new FormData,i=typeof File>`u`?void 0:File;return i&&e instanceof i?r.append(`file`,e,n||e.name):e instanceof Blob?r.append(`file`,e,n||`blob-file`):r.append(`file`,new Blob([e],{type:`text/plain`}),n||`text-file.txt`),(await this.client.post(`/api/file/upload`,r,{params:{path:t}})).data}async uploadTextFile(e,t,n){return this.uploadFile(e,t,n)}async downloadTrajectory(e){return(await this.client.get(`/api/file/download-trajectory/${encodeURIComponent(e)}`,{responseType:`blob`})).data}close(){this.client.close()}},m=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async testServer(e){return await u(this.client,a.mcpTest),(await this.client.post(`/api/mcp/test`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}close(){this.client.close()}},h=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSkills(e={}){return(await this.client.post(`/api/skills`,e)).data}async syncSkills(){return(await this.client.post(`/api/skills/sync`,{})).data}async installSkill(e){return(await this.client.post(`/api/skills/install`,e)).data}async listInstalledSkills(){return(await this.client.get(`/api/skills/installed`)).data}async getInstalledSkill(e){return(await this.client.get(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async toggleSkill(e,t){return(await this.client.patch(`/api/skills/installed/${encodeURIComponent(e)}`,{enabled:t})).data}async uninstallSkill(e){return(await this.client.delete(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async refreshSkill(e){return(await this.client.post(`/api/skills/installed/${encodeURIComponent(e)}/update`)).data}async getMarketplace(){return(await this.client.get(`/api/skills/marketplace`)).data}close(){this.client.close()}},g=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getUrl(e={}){return(await this.client.get(`/api/vscode/url`,{params:{...e.baseUrl?{base_url:e.baseUrl}:{},...e.workspaceDir?{workspace_dir:e.workspaceDir}:{}}})).data.url}async getStatus(){return(await this.client.get(`/api/vscode/status`)).data}close(){this.client.close()}},_=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSharedConversations(e){return(await this.client.get(`/api/shared-conversations`,{params:{ids:e}})).data}async getSharedConversation(e){return(await this.getSharedConversations([e]))[0]??null}async searchSharedEvents(e){return(await this.client.get(`/api/shared-events/search`,{params:{conversation_id:e.conversationId,limit:e.limit,page_id:e.pageId}})).data}close(){this.client.close()}},v=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listWorkspaces(){return await this.ensureWorkspacesSupported(),(await this.client.get(`/api/workspaces`)).data}async addWorkspaces(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces`,{workspaces:e})).data}async deleteWorkspace(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces`,{params:{path:e}})).data}async addWorkspaceParents(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces/parents`,{parents:e})).data}async deleteWorkspaceParent(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces/parents`,{params:{path:e}})).data}close(){this.client.close()}async ensureWorkspacesSupported(){await u(this.client,a.workspaces)}},y=e(((e,t)=>{t.exports=function(){throw Error(`ws does not work in the browser. Browser clients must use the native WebSocket object`)}}));if(typeof window<`u`&&window.WebSocket)window.WebSocket;else try{y()}catch{}var b=class{constructor(e,n){this.cachedEvents=[],this.cachedEventIds=new Set,this.client=e instanceof t?e:new t(e),this.conversationId=n}async search(e={}){let t={limit:e.limit??100};return e.page_id&&(t.page_id=e.page_id),e.kind&&(t.kind=e.kind),e.source&&(t.source=e.source),e.body&&(t.body=e.body),e.sort_order&&(t.sort_order=e.sort_order),e.timestamp__gte&&(t.timestamp__gte=e.timestamp__gte),e.timestamp__lt&&(t.timestamp__lt=e.timestamp__lt),(await this.client.get(`/api/conversations/${this.conversationId}/events/search`,{params:t})).data}async count(e={}){let t={};return e.kind&&(t.kind=e.kind),e.source&&(t.source=e.source),e.body&&(t.body=e.body),e.timestamp__gte&&(t.timestamp__gte=e.timestamp__gte),e.timestamp__lt&&(t.timestamp__lt=e.timestamp__lt),(await this.client.get(`/api/conversations/${this.conversationId}/events/count`,{params:t})).data}async getEventById(e){return(await this.client.get(`/api/conversations/${this.conversationId}/events/${e}`)).data}async getEventsById(e){return Promise.all(e.map(async e=>{try{return await this.getEventById(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async addEvent(e){this.cachedEventIds.has(e.id)||(this.cachedEvents.push(e),this.cachedEventIds.add(e.id))}async append(e){await this.addEvent(e)}createDefaultCallback(e){return t=>{this.addEvent(t).catch(t=>{e&&e(t instanceof Error?t:Error(`Error adding event to cache: ${t}`))})}}async length(){return this.cachedEvents.length}async getEvent(e){return this.cachedEvents[e]}async getEvents(e,t){let n=[],r;for(;;){let e={limit:100};r&&(e.page_id=r);let t=(await this.client.get(`/api/conversations/${this.conversationId}/events/search`,{params:e})).data;if(n.push(...t.items),!t.next_page_id)break;r=t.next_page_id}let i=new Set(n.map(e=>e.id)),a=[...n,...this.cachedEvents.filter(e=>!i.has(e.id))];return e===void 0&&t===void 0?a:a.slice(e,t)}async*[Symbol.asyncIterator](){let e=await this.getEvents();for(let t of e)yield t}},x=`__full_state__`,S=class e{constructor(e,t){this.cachedState=null,this.cachedAt=0,this.lock=new C,this.client=e,this.conversationId=t,this._events=new b(e,t)}async getConversationInfo(){return await this.lock.acquire(async()=>{if(this.cachedState!==null&&Date.now()-this.cachedAt<e.CACHE_TTL_MS)return this.cachedState;let t=await this.client.get(`/api/conversations/${this.conversationId}`),n;return n=t.data.full_state?t.data.full_state:t.data,this.cachedState=n,this.cachedAt=Date.now(),n})}async refresh(){return this.cachedState=null,this.getConversationInfo()}async updateStateFromEvent(e){await this.lock.acquire(async()=>{if(e.key===x){this.cachedState===null&&(this.cachedState={});let t=e.value?.full_state??e.value;Object.assign(this.cachedState,t)}else this.cachedState===null&&(this.cachedState={}),this.cachedState[e.key]=e.value;this.cachedAt=Date.now()})}createStateUpdateCallback(e){return t=>{t.kind===`ConversationStateUpdateEvent`&&this.updateStateFromEvent(t).catch(t=>{e&&e(t instanceof Error?t:Error(`Error updating state from event: ${t}`))})}}get events(){return this._events}get id(){return this.conversationId}unwrapState(e){return e.full_state??e}async getExecutionStatus(){let e=await this.getConversationInfo(),t=this.unwrapState(e),n=t.execution_status??t.agent_status;if(n==null)throw Error(`execution_status missing in conversation info: ${JSON.stringify(e)}`);return n}async getAgentStatus(){return this.getExecutionStatus()}async setAgentStatus(e){throw Error(`Setting execution_status on RemoteState has no effect. Remote execution status is managed server-side. Attempted to set: ${e}`)}async getConfirmationPolicy(){let e=await this.getConversationInfo(),t=this.unwrapState(e).confirmation_policy;if(t==null)throw Error(`confirmation_policy missing in conversation info: ${JSON.stringify(e)}`);return t}async getActivatedKnowledgeSkills(){let e=await this.getConversationInfo();return this.unwrapState(e).activated_knowledge_skills||[]}async getAgent(){let e=await this.getConversationInfo(),t=this.unwrapState(e).agent;if(t==null)throw Error(`agent missing in conversation info: ${JSON.stringify(e)}`);return t}async getWorkspace(){let e=await this.getConversationInfo(),t=this.unwrapState(e).workspace;if(t==null)throw Error(`workspace missing in conversation info: ${JSON.stringify(e)}`);return t}async getPersistenceDir(){let e=await this.getConversationInfo(),t=this.unwrapState(e).persistence_dir;if(t==null)throw Error(`persistence_dir missing in conversation info: ${JSON.stringify(e)}`);return t}async modelDump(){let e=await this.getConversationInfo();return this.unwrapState(e)}async modelDumpJson(){let e=await this.modelDump();return JSON.stringify(e)}};S.CACHE_TTL_MS=2e3;var C=class{constructor(){this.locked=!1,this.queue=[]}async acquire(e){return new Promise((t,n)=>{let r=async()=>{try{t(await e())}catch(e){n(e)}finally{this.locked=!1;let e=this.queue.shift();e&&e()}};this.locked?this.queue.push(r):(this.locked=!0,r())})}},w=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.workingDir=e.workingDir,this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:6e4}),this.bash=new r({host:this.host,...this.apiKey?{apiKey:this.apiKey}:{}})}async startWorkspaceSession(e){return await this.client.post(`/api/auth/workspace-session`,void 0,{credentials:`include`}),`${this.host}/api/conversations/${e}/workspace/`}async deleteWorkspaceSession(){await this.client.delete(`/api/auth/workspace-session`,{credentials:`include`,acceptableStatusCodes:new Set([204])})}async executeCommand(e,t,n=30){let r={command:e,timeout:Math.floor(n)};t&&(r.cwd=t);let i=(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:(n+10)*1e3})).data;return{command:e,exit_code:i.exit_code??0,stdout:i.stdout||``,stderr:i.stderr||``,timeout_occurred:!1}}async fileUpload(e,t,n){let r=new FormData,i,a;e instanceof File?(i=e,a=n||e.name):e instanceof Blob?(i=e,a=n||`blob-file`):(i=new Blob([e],{type:`text/plain`}),a=n||`text-file.txt`),r.append(`file`,i,a);let o=(await this.client.request({method:`POST`,url:`/api/file/upload`,params:{path:t},data:r,timeout:6e4})).data;return{success:o.success??!0,source_path:a,destination_path:t,file_size:o.file_size,error:o.error}}async fileDownload(e){let t=await this.client.get(`/api/file/download`,{params:{path:e},timeout:6e4}),n,r;if(typeof t.data==`string`)n=t.data,r=new Blob([t.data]).size;else if(t.data instanceof ArrayBuffer)n=new Blob([t.data]),r=t.data.byteLength;else if(t.data instanceof Blob)n=t.data,r=t.data.size;else{let e=JSON.stringify(t.data);n=e,r=new Blob([e]).size}return{success:!0,source_path:e,content:n,file_size:r}}async gitChanges(e,t={}){let n={path:e};t.ref!==void 0&&(n.ref=t.ref);try{return(await this.client.get(`/api/git/changes`,{params:n})).data}catch(e){throw Error(`Failed to get git changes: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}async gitDiff(e,t={}){let n={path:e};t.ref!==void 0&&(n.ref=t.ref);try{return(await this.client.get(`/api/git/diff`,{params:n})).data}catch(e){throw Error(`Failed to get git diff: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}async uploadText(e,t,n){return this.fileUpload(e,t,n)}async uploadFileObject(e,t){return this.fileUpload(e,t)}async downloadAsText(e){let t=await this.fileDownload(e);if(!t.success)throw Error(t.error||`Download failed`);return typeof t.content==`string`?t.content:t.content instanceof Blob?await t.content.text():``}async downloadAsBlob(e){let t=await this.fileDownload(e);if(!t.success)throw Error(t.error||`Download failed`);return t.content instanceof Blob?t.content:typeof t.content==`string`?new Blob([t.content],{type:`text/plain`}):new Blob}async downloadAndSave(e,t){let n=await this.downloadAsBlob(e),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t||e.split(`/`).pop()||`download`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}close(){this.bash.close(),this.client.close()}},T={execute_command:`Execute a bash command in the terminal within a persistent shell session.
|
|
1
|
+
import{t as e}from"./rolldown-runtime-BFRubm34.js";import{c as t,l as n}from"./agent-server-client-options-9agOSarV.js";var r=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchEvents(e={}){return(await this.client.get(`/api/bash/bash_events/search`,{params:e})).data}async getEvent(e){return(await this.client.get(`/api/bash/bash_events/${e}`)).data}async getEvents(e){return Promise.all(e.map(async e=>{try{return await this.getEvent(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async startCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/start_bash_command`,r)).data}async executeCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:((r.timeout||30)+10)*1e3})).data}async clearEvents(){return(await this.client.delete(`/api/bash/bash_events`)).data}close(){this.client.close()}normalizeRequest(e,t,n){return typeof e==`string`?{command:e,...t?{cwd:t}:{},...n===void 0?{}:{timeout:Math.floor(n)}}:{...e,...e.timeout===void 0?{}:{timeout:Math.floor(e.timeout)}}}},i=`AGENT_SERVER_VERSION_TOO_OLD`,a={workspaces:{feature:`workspaces`,displayName:`Workspaces`,minVersion:`1.23.0`},hooks:{feature:`hooks`,displayName:`Hooks API`,minVersion:`1.23.0`},mcpTest:{feature:`mcp-test`,displayName:`MCP test API`,minVersion:`1.23.0`},cloudProxy:{feature:`cloud-proxy`,displayName:`Cloud proxy`,minVersion:`1.23.0`}},o=class e extends Error{constructor({requirement:t,actualVersion:n}){super(`${t.displayName} requires agent-server ${t.minVersion} or newer; this backend is running ${n}. Please upgrade your agent-server backend.`),this.code=i,this.name=`AgentServerVersionError`,this.feature=t.feature,this.displayName=t.displayName,this.requiredVersion=t.minVersion,this.actualVersion=n,Object.setPrototypeOf(this,e.prototype)}},s=new WeakMap;function c(e){return e instanceof o||typeof e==`object`&&!!e&&`code`in e&&e.code===`AGENT_SERVER_VERSION_TOO_OLD`}async function l(e){let t=s.get(e);if(t)return t;let n=e.get(`/server_info`).then(e=>e.data);return s.set(e,n),n}async function u(e,t){let n=await l(e),r=typeof n.version==`string`&&n.version.trim()?n.version.trim():`unknown`,i=d(r,t.minVersion);if(i===null||i<0)throw new o({requirement:t,actualVersion:r});return n}function d(e,t){let n=f(e),r=f(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function f(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}var p=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchSubdirectories(e,t={}){return(await this.client.get(`/api/file/search_subdirs`,{params:{path:e,page_id:t.pageId,limit:t.limit}})).data}async getHome(){return(await this.client.get(`/api/file/home`)).data}async downloadFile(e){return(await this.client.get(`/api/file/download`,{params:{path:e},responseType:`arrayBuffer`})).data}async downloadTextFile(e){return new TextDecoder().decode(await this.downloadFile(e))}async uploadFile(e,t,n){let r=new FormData,i=typeof File>`u`?void 0:File;return i&&e instanceof i?r.append(`file`,e,n||e.name):e instanceof Blob?r.append(`file`,e,n||`blob-file`):r.append(`file`,new Blob([e],{type:`text/plain`}),n||`text-file.txt`),(await this.client.post(`/api/file/upload`,r,{params:{path:t}})).data}async uploadTextFile(e,t,n){return this.uploadFile(e,t,n)}async downloadTrajectory(e){return(await this.client.get(`/api/file/download-trajectory/${encodeURIComponent(e)}`,{responseType:`blob`})).data}close(){this.client.close()}},m=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async testServer(e){return await u(this.client,a.mcpTest),(await this.client.post(`/api/mcp/test`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}close(){this.client.close()}},h=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSkills(e={}){return(await this.client.post(`/api/skills`,e)).data}async syncSkills(){return(await this.client.post(`/api/skills/sync`,{})).data}async installSkill(e){return(await this.client.post(`/api/skills/install`,e)).data}async listInstalledSkills(){return(await this.client.get(`/api/skills/installed`)).data}async getInstalledSkill(e){return(await this.client.get(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async toggleSkill(e,t){return(await this.client.patch(`/api/skills/installed/${encodeURIComponent(e)}`,{enabled:t})).data}async uninstallSkill(e){return(await this.client.delete(`/api/skills/installed/${encodeURIComponent(e)}`)).data}async refreshSkill(e){return(await this.client.post(`/api/skills/installed/${encodeURIComponent(e)}/update`)).data}async getMarketplace(){return(await this.client.get(`/api/skills/marketplace`)).data}close(){this.client.close()}},g=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getUrl(e={}){return(await this.client.get(`/api/vscode/url`,{params:{...e.baseUrl?{base_url:e.baseUrl}:{},...e.workspaceDir?{workspace_dir:e.workspaceDir}:{}}})).data.url}async getStatus(){return(await this.client.get(`/api/vscode/status`)).data}close(){this.client.close()}},_=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSharedConversations(e){return(await this.client.get(`/api/shared-conversations`,{params:{ids:e}})).data}async getSharedConversation(e){return(await this.getSharedConversations([e]))[0]??null}async searchSharedEvents(e){return(await this.client.get(`/api/shared-events/search`,{params:{conversation_id:e.conversationId,limit:e.limit,page_id:e.pageId}})).data}close(){this.client.close()}},v=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listWorkspaces(){return await this.ensureWorkspacesSupported(),(await this.client.get(`/api/workspaces`)).data}async addWorkspaces(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces`,{workspaces:e})).data}async deleteWorkspace(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces`,{params:{path:e}})).data}async addWorkspaceParents(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces/parents`,{parents:e})).data}async deleteWorkspaceParent(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces/parents`,{params:{path:e}})).data}close(){this.client.close()}async ensureWorkspacesSupported(){await u(this.client,a.workspaces)}},y=e(((e,t)=>{t.exports=function(){throw Error(`ws does not work in the browser. Browser clients must use the native WebSocket object`)}}));if(typeof window<`u`&&window.WebSocket)window.WebSocket;else try{y()}catch{}var b=class{constructor(e,n){this.cachedEvents=[],this.cachedEventIds=new Set,this.client=e instanceof t?e:new t(e),this.conversationId=n}async search(e={}){let t={limit:e.limit??100};return e.page_id&&(t.page_id=e.page_id),e.kind&&(t.kind=e.kind),e.source&&(t.source=e.source),e.body&&(t.body=e.body),e.sort_order&&(t.sort_order=e.sort_order),e.timestamp__gte&&(t.timestamp__gte=e.timestamp__gte),e.timestamp__lt&&(t.timestamp__lt=e.timestamp__lt),(await this.client.get(`/api/conversations/${this.conversationId}/events/search`,{params:t})).data}async count(e={}){let t={};return e.kind&&(t.kind=e.kind),e.source&&(t.source=e.source),e.body&&(t.body=e.body),e.timestamp__gte&&(t.timestamp__gte=e.timestamp__gte),e.timestamp__lt&&(t.timestamp__lt=e.timestamp__lt),(await this.client.get(`/api/conversations/${this.conversationId}/events/count`,{params:t})).data}async getEventById(e){return(await this.client.get(`/api/conversations/${this.conversationId}/events/${e}`)).data}async getEventsById(e){return Promise.all(e.map(async e=>{try{return await this.getEventById(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async addEvent(e){this.cachedEventIds.has(e.id)||(this.cachedEvents.push(e),this.cachedEventIds.add(e.id))}async append(e){await this.addEvent(e)}createDefaultCallback(e){return t=>{this.addEvent(t).catch(t=>{e&&e(t instanceof Error?t:Error(`Error adding event to cache: ${t}`))})}}async length(){return this.cachedEvents.length}async getEvent(e){return this.cachedEvents[e]}async getEvents(e,t){let n=[],r;for(;;){let e={limit:100};r&&(e.page_id=r);let t=(await this.client.get(`/api/conversations/${this.conversationId}/events/search`,{params:e})).data;if(n.push(...t.items),!t.next_page_id)break;r=t.next_page_id}let i=new Set(n.map(e=>e.id)),a=[...n,...this.cachedEvents.filter(e=>!i.has(e.id))];return e===void 0&&t===void 0?a:a.slice(e,t)}async*[Symbol.asyncIterator](){let e=await this.getEvents();for(let t of e)yield t}},x=`__full_state__`,S=class e{constructor(e,t){this.cachedState=null,this.cachedAt=0,this.lock=new C,this.client=e,this.conversationId=t,this._events=new b(e,t)}async getConversationInfo(){return await this.lock.acquire(async()=>{if(this.cachedState!==null&&Date.now()-this.cachedAt<e.CACHE_TTL_MS)return this.cachedState;let t=await this.client.get(`/api/conversations/${this.conversationId}`),n;return n=t.data.full_state?t.data.full_state:t.data,this.cachedState=n,this.cachedAt=Date.now(),n})}async refresh(){return this.cachedState=null,this.getConversationInfo()}async updateStateFromEvent(e){await this.lock.acquire(async()=>{if(e.key===x){this.cachedState===null&&(this.cachedState={});let t=e.value?.full_state??e.value;Object.assign(this.cachedState,t)}else this.cachedState===null&&(this.cachedState={}),this.cachedState[e.key]=e.value;this.cachedAt=Date.now()})}createStateUpdateCallback(e){return t=>{t.kind===`ConversationStateUpdateEvent`&&this.updateStateFromEvent(t).catch(t=>{e&&e(t instanceof Error?t:Error(`Error updating state from event: ${t}`))})}}get events(){return this._events}get id(){return this.conversationId}unwrapState(e){return e.full_state??e}async getExecutionStatus(){let e=await this.getConversationInfo(),t=this.unwrapState(e),n=t.execution_status??t.agent_status;if(n==null)throw Error(`execution_status missing in conversation info: ${JSON.stringify(e)}`);return n}async getAgentStatus(){return this.getExecutionStatus()}async setAgentStatus(e){throw Error(`Setting execution_status on RemoteState has no effect. Remote execution status is managed server-side. Attempted to set: ${e}`)}async getConfirmationPolicy(){let e=await this.getConversationInfo(),t=this.unwrapState(e).confirmation_policy;if(t==null)throw Error(`confirmation_policy missing in conversation info: ${JSON.stringify(e)}`);return t}async getActivatedKnowledgeSkills(){let e=await this.getConversationInfo();return this.unwrapState(e).activated_knowledge_skills||[]}async getAgent(){let e=await this.getConversationInfo(),t=this.unwrapState(e).agent;if(t==null)throw Error(`agent missing in conversation info: ${JSON.stringify(e)}`);return t}async getWorkspace(){let e=await this.getConversationInfo(),t=this.unwrapState(e).workspace;if(t==null)throw Error(`workspace missing in conversation info: ${JSON.stringify(e)}`);return t}async getPersistenceDir(){let e=await this.getConversationInfo(),t=this.unwrapState(e).persistence_dir;if(t==null)throw Error(`persistence_dir missing in conversation info: ${JSON.stringify(e)}`);return t}async modelDump(){let e=await this.getConversationInfo();return this.unwrapState(e)}async modelDumpJson(){let e=await this.modelDump();return JSON.stringify(e)}};S.CACHE_TTL_MS=2e3;var C=class{constructor(){this.locked=!1,this.queue=[]}async acquire(e){return new Promise((t,n)=>{let r=async()=>{try{t(await e())}catch(e){n(e)}finally{this.locked=!1;let e=this.queue.shift();e&&e()}};this.locked?this.queue.push(r):(this.locked=!0,r())})}},w=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.workingDir=e.workingDir,this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:6e4}),this.bash=new r({host:this.host,...this.apiKey?{apiKey:this.apiKey}:{}})}async startWorkspaceSession(e){return await this.client.post(`/api/auth/workspace-session`,void 0,{credentials:`include`}),`${this.host}/api/conversations/${e}/workspace/`}async deleteWorkspaceSession(){await this.client.delete(`/api/auth/workspace-session`,{credentials:`include`,acceptableStatusCodes:new Set([204])})}async executeCommand(e,t,n=30){let r={command:e,timeout:Math.floor(n)};t&&(r.cwd=t);let i=(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:(n+10)*1e3})).data;return{command:e,exit_code:i.exit_code??0,stdout:i.stdout||``,stderr:i.stderr||``,timeout_occurred:!1}}async fileUpload(e,t,n){let r=new FormData,i,a;e instanceof File?(i=e,a=n||e.name):e instanceof Blob?(i=e,a=n||`blob-file`):(i=new Blob([e],{type:`text/plain`}),a=n||`text-file.txt`),r.append(`file`,i,a);let o=(await this.client.request({method:`POST`,url:`/api/file/upload`,params:{path:t},data:r,timeout:6e4})).data;return{success:o.success??!0,source_path:a,destination_path:t,file_size:o.file_size,error:o.error}}async fileDownload(e){let t=await this.client.get(`/api/file/download`,{params:{path:e},timeout:6e4}),n,r;if(typeof t.data==`string`)n=t.data,r=new Blob([t.data]).size;else if(t.data instanceof ArrayBuffer)n=new Blob([t.data]),r=t.data.byteLength;else if(t.data instanceof Blob)n=t.data,r=t.data.size;else{let e=JSON.stringify(t.data);n=e,r=new Blob([e]).size}return{success:!0,source_path:e,content:n,file_size:r}}async gitChanges(e,t={}){let n={path:e};t.ref!==void 0&&(n.ref=t.ref);try{return(await this.client.get(`/api/git/changes`,{params:n})).data}catch(e){throw Error(`Failed to get git changes: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}async gitDiff(e,t={}){let n={path:e};t.ref!==void 0&&(n.ref=t.ref);try{return(await this.client.get(`/api/git/diff`,{params:n})).data}catch(e){throw Error(`Failed to get git diff: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}async uploadText(e,t,n){return this.fileUpload(e,t,n)}async uploadFileObject(e,t){return this.fileUpload(e,t)}async downloadAsText(e){let t=await this.fileDownload(e);if(!t.success)throw Error(t.error||`Download failed`);return typeof t.content==`string`?t.content:t.content instanceof Blob?await t.content.text():``}async downloadAsBlob(e){let t=await this.fileDownload(e);if(!t.success)throw Error(t.error||`Download failed`);return t.content instanceof Blob?t.content:typeof t.content==`string`?new Blob([t.content],{type:`text/plain`}):new Blob}async downloadAndSave(e,t){let n=await this.downloadAsBlob(e),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t||e.split(`/`).pop()||`download`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}close(){this.bash.close(),this.client.close()}},T={execute_command:`Execute a bash command in the terminal within a persistent shell session.
|
|
2
2
|
|
|
3
3
|
### Command Execution
|
|
4
4
|
* One command at a time: You can only execute one bash command at a time. If you need to run multiple commands sequentially, use \`&&\` or \`;\` to chain them together.
|
package/build/assets/{verification-settings-Dlt8pINd.js → verification-settings-C_zHuDx9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
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{o as r,t as i}from"./declaration-CR6HMp29.js";import{t as a}from"./useTranslation-B6voJV4y.js";import{t as o}from"./utils-DCVfKFRt.js";import{m as s}from"./brand-button-DJ_S16rO.js";import{t as c}from"./settings-DGY6n4J2.js";import{r as l}from"./use-settings-
|
|
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{o as r,t as i}from"./declaration-CR6HMp29.js";import{t as a}from"./useTranslation-B6voJV4y.js";import{t as o}from"./utils-DCVfKFRt.js";import{m as s}from"./brand-button-DJ_S16rO.js";import{t as c}from"./settings-DGY6n4J2.js";import{r as l}from"./use-settings-DeO7nvpM.js";import{t as u}from"./sdk-section-page-CRCRY3PG.js";import{t as d}from"./settings-dropdown-input-BtoovFre.js";import{t as f}from"./settings-switch-BiBuS3xa.js";var p=e(t(),1),m=r(),h=new Set([`confirmation_mode`,`security_analyzer`]);function g({confirmationMode:e,securityAnalyzer:t,isConversationSettingsDisabled:n,onConfirmationModeChange:r,onSecurityAnalyzerChange:c,renderTopContent:l}){let{t:u}=a(`openhands`),h=p.useMemo(()=>[{key:`llm`,label:u(i.SETTINGS$SECURITY_ANALYZER_LLM_DEFAULT)},{key:`none`,label:u(i.SETTINGS$SECURITY_ANALYZER_NONE)}],[u]),g=e;return(0,m.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[l?.(),(0,m.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,m.jsx)(f,{testId:`confirmation-mode-toggle`,isToggled:e,onToggle:r,isDisabled:n,children:u(i.SETTINGS_FORM$ENABLE_CONFIRMATION_MODE_LABEL)}),(0,m.jsx)(`p`,{className:o(s,`text-tertiary-alt text-xs leading-5`),children:u(i.SETTINGS$CONFIRMATION_MODE_TOOLTIP)})]}),g?(0,m.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,m.jsx)(d,{testId:`security-analyzer-input`,name:`security_analyzer`,label:u(i.SETTINGS_FORM$SECURITY_ANALYZER_LABEL),items:h,selectedKey:t??void 0,placeholder:u(i.SETTINGS$SECURITY_ANALYZER_PLACEHOLDER),isDisabled:n,onSelectionChange:e=>c(e?String(e):null)}),(0,m.jsx)(`p`,{className:`text-tertiary-alt text-xs leading-5`,children:u(i.SETTINGS$SECURITY_ANALYZER_DESCRIPTION)})]}):null]})]})}function _({scope:e=`personal`,renderTopContent:t,testId:n=`verification-settings-screen`}){let{data:r}=l(e),[i,a]=p.useState(c.confirmation_mode),[o,s]=p.useState(c.security_analyzer),[d,f]=p.useState(!1),[_,v]=p.useState(!1);p.useEffect(()=>{a(r?.confirmation_mode??c.confirmation_mode),s(r?.security_analyzer??c.security_analyzer),f(!1),v(!1)},[r?.confirmation_mode,r?.security_analyzer]);let y=p.useCallback(({isDisabled:e})=>(0,m.jsx)(g,{confirmationMode:i,securityAnalyzer:o,isConversationSettingsDisabled:e,onConfirmationModeChange:e=>{a(e),f(!0)},onSecurityAnalyzerChange:e=>{s(e),v(!0)},renderTopContent:t}),[i,t,o]),b=p.useCallback(e=>{let t={...e};return d&&(t.confirmation_mode=i),(_||i&&r?.security_analyzer!==o)&&(t.security_analyzer=o),{conversation_settings_diff:t}},[i,d,o,_,r?.security_analyzer]);return(0,m.jsx)(u,{scope:e,settingsSource:`conversation_settings`,sectionKeys:[`verification`],excludeKeys:h,header:y,extraDirty:d||_,buildPayload:b,onSaveSuccess:()=>{f(!1),v(!1)},testId:n})}var v=n(_);export{v as default};
|
|
@@ -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{w as a}from"./utils-DCVfKFRt.js";import{t as o}from"./brand-button-DJ_S16rO.js";import{t as s}from"./use-agent-state-
|
|
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{w as a}from"./utils-DCVfKFRt.js";import{t as o}from"./brand-button-DJ_S16rO.js";import{t as s}from"./use-agent-state-Dp3pD1h3.js";import{n as c,t as l}from"./use-unified-vscode-url-DXPtB317.js";import{t as u}from"./waiting-for-runtime-message-CdK3btDZ.js";import{t as d}from"./conversation-tab-empty-state-CStQLPVW.js";var f=e(t(),1);function p(e,t=!1){try{let n=localStorage.getItem(`FEATURE_${e}`)||t.toString();return!!JSON.parse(n)}catch{return t}}var m=()=>p(`VSCODE_IN_NEW_TAB`),h=n();function g(){let{t:e}=i(`openhands`),{data:t,isLoading:n,error:p}=l(),{curAgentState:g}=s(),_=a.includes(g),v=f.useRef(null),[y,b]=(0,f.useState)(!1),[x,S]=(0,f.useState)(null);return(0,f.useEffect)(()=>{if(t?.url)try{let e=new URL(t.url).protocol,n=window.location.protocol;b(m()||e!==n)}catch{S(e(`VSCODE$URL_PARSE_ERROR`))}},[t?.url]),_?(0,h.jsx)(u,{}):n?(0,h.jsx)(`div`,{className:`w-full h-full flex items-center text-center justify-center text-2xl text-tertiary-light`,children:e(r.VSCODE$LOADING)}):p||t?.error||!t?.url||x?(0,h.jsx)(`div`,{className:`w-full h-full flex items-center text-center justify-center text-2xl text-tertiary-light`,children:x||t?.error||String(p)||e(r.VSCODE$URL_NOT_AVAILABLE)}):y?(0,h.jsx)(d,{icon:(0,h.jsx)(c,{}),action:(0,h.jsx)(o,{type:`button`,variant:`secondary`,onClick:()=>{t?.url&&window.open(t.url,`_blank`,`noopener,noreferrer`)},className:`min-w-40 justify-center px-6`,children:e(`VSCODE$OPEN_IN_NEW_TAB`)}),children:e(`VSCODE$CROSS_ORIGIN_WARNING`)}):(0,h.jsx)(`div`,{className:`h-full w-full`,children:(0,h.jsx)(`iframe`,{ref:v,title:e(r.VSCODE$TITLE),src:t.url,className:`w-full h-full border-0`,allow:`clipboard-read; clipboard-write`})})}export{g as default};
|
package/build/index.html
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>OpenHands</title><meta name="description" content="Let's Start Building!"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="modulepreload" href="/assets/manifest-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>OpenHands</title><meta name="description" content="Let's Start Building!"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="modulepreload" href="/assets/manifest-99b06a11.js"/><link rel="modulepreload" href="/assets/entry.client-Cn71WM8q.js"/><link rel="modulepreload" href="/assets/rolldown-runtime-BFRubm34.js"/><link rel="modulepreload" href="/assets/preload-helper-CT1Z6Pdu.js"/><link rel="modulepreload" href="/assets/vendor~entry.client-CySJvEhK.js"/><link rel="modulepreload" href="/assets/providers-eUyo6pgr.js"/><link rel="modulepreload" href="/assets/declaration-CR6HMp29.js"/><link rel="modulepreload" href="/assets/vendor~entry.client-Du9GpFmX.js"/><link rel="modulepreload" href="/assets/react-CM_dJw1Z.js"/><link rel="modulepreload" href="/assets/i18n-DET2iOyh.js"/><link rel="modulepreload" href="/assets/react-dom-hVBnwgwZ.js"/><link rel="modulepreload" href="/assets/vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js"/><link rel="modulepreload" href="/assets/query-client-config-CRnGSujB.js"/><link rel="modulepreload" href="/assets/QueryClientProvider-Cnr-Yl3j.js"/><link rel="modulepreload" href="/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js"/><link rel="modulepreload" href="/assets/context-CEQZwATj.js"/><link rel="modulepreload" href="/assets/option-service.api-CGNANEcT.js"/><link rel="modulepreload" href="/assets/utils-DCVfKFRt.js"/><link rel="modulepreload" href="/assets/active-backend-context-BSPE-W72.js"/><link rel="modulepreload" href="/assets/query-keys-tAsQcc_9.js"/><link rel="modulepreload" href="/assets/agent-server-ui-style-scope-BwIZYdC1.js"/><link rel="modulepreload" href="/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~g56ukk6u-DsSvIDZQ.js"/><link rel="modulepreload" href="/assets/mutation-D0OogFCz.js"/><link rel="modulepreload" href="/assets/custom-toast-handlers-ufGJ6_Rc.js"/><link rel="modulepreload" href="/assets/health-store-B5f0S2FY.js"/><link rel="modulepreload" href="/assets/retrieve-axios-error-message-BY-yIkIq.js"/><link rel="modulepreload" href="/assets/createLucideIcon-Ddu8jDOQ.js"/><link rel="modulepreload" href="/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~hkqzh1hb-BZ0HXuHD.js"/><link rel="modulepreload" href="/assets/common-DqjLSBOt.js"/><link rel="modulepreload" href="/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-D44TR8hL.js"/><link rel="modulepreload" href="/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js"/><link rel="modulepreload" href="/assets/agent-server-client-options-9agOSarV.js"/><link rel="modulepreload" href="/assets/llm-client-BqyLKgUN.js"/><link rel="modulepreload" href="/assets/agent-server-compatibility-B7QStIcH.js"/><link rel="modulepreload" href="/assets/server-client-DYv_GHPl.js"/><link rel="modulepreload" href="/assets/root-BmhaEJJ8.js"/><link rel="modulepreload" href="/assets/useTranslation-B6voJV4y.js"/><link rel="modulepreload" href="/assets/brand-button-DJ_S16rO.js"/><link rel="modulepreload" href="/assets/base-modal-C2oy2EBG.js"/><link rel="modulepreload" href="/assets/loading-spinner-5GT9q1xy.js"/><link rel="modulepreload" href="/assets/modal-backdrop-RfNCrSpK.js"/><link rel="modulepreload" href="/assets/modal-body-aoa2fx5W.js"/><link rel="modulepreload" href="/assets/use-config-C9pvb0Sm.js"/><link rel="modulepreload" href="/assets/color-themes-B9pm9c-R.js"/><link rel="modulepreload" href="/assets/modal-classes-6YqcqA6y.js"/><link rel="modulepreload" href="/assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js"/><link rel="stylesheet" href="/assets/root-Z2VHU4R3.css"/></head><body data-agent-server-ui="" class="m-0"><div data-agent-server-ui="" style="--oh-color-logo:#cfb755;--oh-color-base:var(--cool-grey-950);--oh-color-base-secondary:var(--cool-grey-925);--oh-color-danger:#e76a5e;--oh-color-success:#a5e75e;--oh-color-basic:var(--cool-grey-400);--oh-color-tertiary:var(--cool-grey-800);--oh-color-tertiary-light:var(--cool-grey-300);--oh-color-content:var(--cool-grey-100);--oh-color-content-2:var(--cool-grey-50);--oh-background:var(--cool-grey-950);--oh-foreground:var(--cool-grey-100);--oh-surface:var(--cool-grey-925);--oh-surface-foreground:var(--cool-grey-100);--oh-surface-raised:var(--cool-grey-900);--oh-surface-deep:var(--cool-grey-975);--oh-overlay:var(--cool-grey-925);--oh-overlay-foreground:var(--cool-grey-100);--oh-muted:var(--cool-grey-400);--oh-text-secondary:var(--cool-grey-300);--oh-text-tertiary:var(--cool-grey-200);--oh-text-dim:var(--cool-grey-500);--oh-text-subtle:var(--cool-grey-600);--oh-interactive-hover:var(--cool-grey-700);--oh-interactive-hover-low:var(--cool-grey-900);--oh-interactive-active:var(--cool-grey-800);--oh-interactive-selected:var(--cool-grey-600);--oh-scrollbar:color-mix(in srgb, var(--cool-grey-400) 30%, transparent);--oh-scrollbar-hover:color-mix(in srgb, var(--cool-grey-400) 50%, transparent);--oh-default:var(--cool-grey-800);--oh-default-foreground:var(--cool-grey-100);--oh-accent-foreground:var(--cool-grey-950);--oh-success:#a5e75e;--oh-success-foreground:var(--cool-grey-950);--oh-warning-foreground:var(--cool-grey-950);--oh-danger:#e76a5e;--oh-danger-foreground:var(--cool-grey-50);--oh-segment:var(--cool-grey-925);--oh-segment-foreground:var(--cool-grey-100);--oh-border-width:1px;--oh-field-border-width:1px;--oh-border:var(--cool-grey-700);--oh-border-input:var(--cool-grey-600);--oh-border-subtle:var(--cool-grey-800);--oh-separator:rgba(113, 120, 136, 0.5);--oh-focus:#ffffff;--oh-status-success:#1FBD53;--oh-status-error:#FF684E;--oh-link:var(--cool-grey-100);--oh-radius:8px;--oh-field-radius:8px;--oh-surface-shadow:none;--oh-overlay-shadow:none;--oh-field-shadow:none;--oh-bg-dark:var(--cool-grey-950);--oh-bg-light:var(--cool-grey-900);--oh-bg-input:var(--cool-grey-800);--oh-bg-workspace:var(--cool-grey-925);--oh-text-editor-base:var(--cool-grey-400);--oh-text-editor-active:var(--cool-grey-300);--oh-bg-editor-sidebar:var(--cool-grey-925);--oh-bg-editor-active:var(--cool-grey-900);--oh-border-editor-sidebar:var(--cool-grey-800);--oh-bg-neutral-muted:color-mix(in srgb, var(--cool-grey-300) 20%, transparent)"><div class="dark min-h-screen text-foreground" data-theme="dark"><script>
|
|
2
2
|
console.log(
|
|
3
3
|
"💿 Hey developer 👋. You can provide a way better UX than this " +
|
|
4
4
|
"when your app is loading JS modules and/or running `clientLoader` " +
|
|
5
5
|
"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
|
|
6
6
|
"for more information."
|
|
7
7
|
);
|
|
8
|
-
</script><div data-rht-toaster="" style="position:fixed;z-index:9999;top:16px;left:16px;right:16px;bottom:16px;pointer-events:none"></div><div id="modal-portal-exit"></div></div></div><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_optimizeDeps":false,"unstable_passThroughRequests":false,"unstable_subResourceIntegrity":false,"unstable_trailingSlashAwareDataRequests":false,"unstable_previewServerPrerendering":false,"v8_middleware":false,"v8_splitRouteModules":false,"v8_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-
|
|
9
|
-
import * as route0 from "/assets/root-
|
|
8
|
+
</script><div data-rht-toaster="" style="position:fixed;z-index:9999;top:16px;left:16px;right:16px;bottom:16px;pointer-events:none"></div><div id="modal-portal-exit"></div></div></div><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_optimizeDeps":false,"unstable_passThroughRequests":false,"unstable_subResourceIntegrity":false,"unstable_trailingSlashAwareDataRequests":false,"unstable_previewServerPrerendering":false,"v8_middleware":false,"v8_splitRouteModules":false,"v8_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-99b06a11.js";
|
|
9
|
+
import * as route0 from "/assets/root-BmhaEJJ8.js";
|
|
10
10
|
|
|
11
11
|
window.__reactRouterRouteModules = {"root":route0};
|
|
12
12
|
|
|
13
|
-
import("/assets/entry.client-
|
|
13
|
+
import("/assets/entry.client-Cn71WM8q.js");</script><!--$--><script>window.__reactRouterContext.streamController.enqueue("[{\"_1\":2,\"_3\":-5,\"_4\":-5},\"loaderData\",{},\"actionData\",\"errors\"]\n");</script><!--$--><script>window.__reactRouterContext.streamController.close();</script><!--/$--><!--/$--></body></html>
|