(assetPath: string)
| 154 | } |
| 155 | |
| 156 | function remoteAssetUrl(assetPath: string): string | null { |
| 157 | if (remoteWorkspaceInfo?.mode !== 'remote' || !remoteWorkspaceInfo.baseUrl) return null |
| 158 | const trimmed = assetPath.trim() |
| 159 | if (!trimmed) return null |
| 160 | return `zen-asset://remote?baseUrl=${encodeURIComponent( |
| 161 | remoteWorkspaceInfo.baseUrl.replace(/\/+$/, '') |
| 162 | )}&path=${encodeURIComponent(trimmed)}` |
| 163 | } |
| 164 | |
| 165 | const api: ZenBridge = { |
| 166 | getCapabilities: (): ZenCapabilities => DESKTOP_CAPABILITIES, |