repo_description: A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.
repo_topics: ai-tools claude-code codex desktop-app mcp minimax omo open-source openclaw openclaw-ui opencode provider-management rust skills skills-management tauri typescript wsl-support
code: import type { ProviderMeta } from "@/types";
  
  export function resolveManagedAccountId(
    meta: ProviderMeta | undefined,
    authProvider: string,
  ): string | null {
    const binding = meta?.authBinding;
  
    if (
      binding?.source === "managed_account" &&
      binding.authProvider === authProvider
    ) {
      return binding.accountId ?? null;
    }
  
    if (authProvider === "github_copilot") {
      return meta?.githubAccountId ?? null;
    }
  
    return null;
  }
  