const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register-app-actions-B6WfnuBH.js","./app-server-manager-signals-Yn0WSnoY.js","./chunk-Bj-mKKzh.js","./preload-helper-Chd9yIcd.js","./vscode-api-DjORcpSo.js","./src-BOCweS1p.js","./jsx-runtime-CiQ1k8xo.js","./lib-MoKmYgcO.js","./tslib.es6-BbTQ3PDY.js","./statsig-BP9zNYqZ.js","./rpc-CJwVeoy_.js","./lib-DHgYfVJN.js","./marked.esm-BR-H6018.js","./v4-JB8aTMDB.js","./persisted-signal-CweW-bgN.js","./request-CBZ5m5yv.js","./error-boundary-B3_nESUp.js","./chunk-LFPYN7LY-PMGLV5Go.js","./button-Bi7lGVi1.js","./clsx-BcPLHiun.js","./spinner-BAEL5-Nn.js","./reduced-motion-preference-Bd5_3c7y.js","./setting-storage-CwKZnsvR.js","./with-window-BoZr9BJk.js","./use-platform-D2c1wBYs.js","./use-os-info-DcufBSKF.js","./os-info-Dm-v1Nm8.js","./platform-BHmTRipH.js","./download-ybCZozA4.js","./info-BZhCV0tI.js","./thread-page-bottom-panel-state-Du5eAm_4.js","./xterm-display-helpers-DE2SexMl.js","./xterm-display-helpers-kHJ-D0s7.css","./app-shell-state-Dskh7Hih.js","./single-value-DZHc7Ark.js","./route-scope-CLteRG86.js","./app-shell-tab-controller-cnh2C4j9.js","./focus-composer-D2R3KWg-.js","./diff-view-mode-CAtoMdnd.js","./terminal-BhTF7d-4.js","./app-intl-signal-B-4vWE81.js","./local-conversation-title-signals-yz9vVmtb.js","./check-git-index-for-changes--uH5I9Km.js","./thread-context-DcUpp6ZL.js","./use-webview-execution-target-B5MTa9cH.js","./remote-projects-B8AFbAx_.js","./use-global-state-baOKTuK6.js","./thread-context-inputs-C9hcxtXy.js","./selectable-remote-connections-signal-db9FavQq.js","./font-settings-BSWFTPxJ.js","./use-resolved-theme-variant-CQs5Gmyu.js","./thread-panel-state-DeAm6qhS.js","./sumBy-BCSe-07a.js","./window-app-action-helpers-DI4Gzpr9.js","./browser-sidebar-manager-BtbIv4P0.js","./browser-sidebar-open-source-_kvO2A9r.js","./review-navigation-model-DLgq6IIs.js","./parse-diff-_HS_rvxc.js","./parsePatchFiles-Dx-HvB-f.js","./project-context-signal-Ml33v7A8.js","./git-current-branch-query-DhVq2YFM.js","./hash-code-BcMamcXz.js"])))=>i.map(i=>d[i]);
import{na as e,sa as t}from"./src-BOCweS1p.js";import{t as n}from"./preload-helper-Chd9yIcd.js";import{f as r}from"./vscode-api-DjORcpSo.js";import{t as i}from"./window-app-action-helpers-DI4Gzpr9.js";import{i as a}from"./open-project-setup-dialog-C6DkzR3p.js";var o=e({type:t()}).passthrough();async function s(e,t={}){let r=c(e),{appActionRegistry:i}=await n(async()=>{let{appActionRegistry:e}=await import(`./register-app-actions-B6WfnuBH.js`);return{appActionRegistry:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61]),import.meta.url),{type:a}=r,o=i.get(a);if(o==null)throw Error(`Unsupported app action: ${a}`);return o(r,t)}function c(e){try{return o.parse(e)}catch(t){throw Error(`Invalid app action envelope: ${JSON.stringify(e,null,2)}\n${t instanceof Error?t.message:String(t)}`)}}var l=new Map([[`newThread`,()=>{s({type:`windows.show_home`,windowId:i})}],[`quickChat`,()=>{r.dispatchHostMessage({type:`new-quick-chat`})}],[`archiveThread`,e=>{r.dispatchHostMessage({type:`archive-thread`,source:e})}],[`toggleThreadPin`,()=>{r.dispatchHostMessage({type:`toggle-thread-pin`})}],[`openAvatarOverlay`,()=>{r.dispatchMessage(`avatar-overlay-open`,{})}],[`settings`,()=>{r.dispatchHostMessage({type:`navigate-to-route`,path:`/settings`})}],[`mcpSettings`,()=>{r.dispatchHostMessage({type:`navigate-to-route`,path:`/settings/mcp-settings`})}],[`personalitySettings`,()=>{r.dispatchHostMessage({type:`navigate-to-route`,path:`/settings/personalization`})}],[`keyboardShortcuts`,()=>{r.dispatchHostMessage({type:`navigate-to-route`,path:`/settings/keyboard-shortcuts`})}],[`manageTasks`,()=>{r.dispatchHostMessage({type:`navigate-to-route`,path:`/automations`,state:{automationMode:`create`}})}],[`openSkills`,()=>{r.dispatchHostMessage({type:`navigate-to-route`,path:`/skills`})}],[`openFolder`,()=>{a()}],[`toggleSidebar`,()=>{s({type:`windows.sidebar.toggle`,windowId:i})}],[`toggleBottomPanel`,()=>{r.dispatchHostMessage({type:`toggle-bottom-panel`})}],[`toggleTerminal`,()=>{s({type:`windows.terminal.toggle`,windowId:i})}],[`openBrowserTab`,()=>{r.dispatchHostMessage({type:`open-browser-tab`,source:`manual`,initiator:`toggle_browser_command`})}],[`toggleBrowserPanel`,()=>{r.dispatchHostMessage({type:`toggle-browser-panel`,source:`manual`,initiator:`toggle_browser_command`})}],[`toggleSidePanel`,()=>{s({type:`windows.review.toggle`,windowId:i})}],[`toggleFileTreePanel`,()=>{r.dispatchHostMessage({type:`toggle-file-tree-panel`})}],[`findInThread`,()=>{r.dispatchHostMessage({type:`find-in-thread`})}],[`navigateBack`,()=>{r.dispatchHostMessage({type:`navigate-back`})}],[`navigateForward`,()=>{r.dispatchHostMessage({type:`navigate-forward`})}],[`logOut`,()=>{r.dispatchHostMessage({type:`log-out`})}]]),u=new Map;function d(e,t,{isActive:n}){let r={handler:t,isActive:n},i=u.get(e)??[];return i.push(r),u.set(e,i),()=>{let t=u.get(e);if(!t)return;let n=t.lastIndexOf(r);n!==-1&&(t.splice(n,1),t.length===0&&u.delete(e))}}function f(e,t){h(e,void 0,t)}function p(e,t){return h(e,t,`keyboard_shortcut`)}function m(e){return g(e)!=null}function h(e,t,n){let r=u.get(e);for(let e=(r?.length??0)-1;e>=0;e--){let n=r?.[e];if(n!=null&&n.isActive())return n.handler(t)!==!1}let i=g(e);return i==null?!1:(i(n),!0)}function g(e){for(let[t,n]of l)if(t===e)return n}export{s as a,p as i,d as n,f as r,m as t};
//# sourceMappingURL=run-command-DkMaJ35-.js.map