MCPcopy
hub / github.com/Dimillian/CodexMonitor / listWorkspaces

Function listWorkspaces

src/services/tauri.ts:104–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102}
103
104export async function listWorkspaces(): Promise<WorkspaceInfo[]> {
105 try {
106 return await invoke<WorkspaceInfo[]>("list_workspaces");
107 } catch (error) {
108 if (isMissingTauriInvokeError(error)) {
109 // In non-Tauri environments (e.g., Electron/web previews), the invoke
110 // bridge may be missing. Treat this as "no workspaces" instead of crashing.
111 console.warn("Tauri invoke bridge unavailable; returning empty workspaces list.");
112 return [];
113 }
114 throw error;
115 }
116}
117
118export async function getCodexConfigPath(): Promise<string> {
119 return invoke<string>("get_codex_config_path");

Callers 5

useWorkspaceCrudFunction · 0.90
handleAddRemoteBackendFunction · 0.90
handleMobileConnectTestFunction · 0.90
useMobileServerSetupFunction · 0.90
tauri.test.tsFile · 0.90

Calls 1

Tested by

no test coverage detected