MCPcopy
hub / github.com/AutoMaker-Org/automaker / getElectronAPI

Function getElectronAPI

apps/ui/src/lib/electron.ts:1109–1118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1107 * This is the only transport mode supported.
1108 */
1109export const getElectronAPI = (): ElectronAPI => {
1110 if (typeof window === 'undefined') {
1111 throw new Error('Cannot get API during SSR');
1112 }
1113
1114 if (!httpClientInstance) {
1115 httpClientInstance = getHttpApiClient();
1116 }
1117 return httpClientInstance!;
1118};
1119
1120// Async version (same as sync since HTTP client is synchronously instantiated)
1121export const getElectronAPIAsync = async (): Promise<ElectronAPI> => {

Callers 15

SessionManagerFunction · 0.90
handleCreateSessionFunction · 0.90
handleRenameSessionFunction · 0.90
handleArchiveSessionFunction · 0.90
handleUnarchiveSessionFunction · 0.90
confirmDeleteSessionFunction · 0.90
SidebarFunction · 0.90
SidebarFooterFunction · 0.90
BugReportButtonFunction · 0.90
useRunningAgentsFunction · 0.90
useTrashOperationsFunction · 0.90

Calls 1

getHttpApiClientFunction · 0.90

Tested by

no test coverage detected