Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 03:37 UTC
| 1 | 'use client'; |
| 2 | |
| 3 | import { useApiVersion } from '@/lib/use-api-version'; |
| 4 | import { API_BASE_URLS } from '@/lib/api-version'; |
| 5 | |
| 6 | /** |
| 7 | * Renders the API base URL for the currently selected version. |
| 8 | * Detects version from URL path (/reference/v3/ = v3.0, otherwise v3.1). |
| 9 | * |
| 10 | * The `.md` channel renders this tag through `mdxToCleanMarkdown`, which reads |
| 11 | * the same `API_BASE_URLS` map — the browser and the agent see one URL. |
| 12 | */ |
| 13 | export function ApiBaseUrl() { |
| 14 | const version = useApiVersion(); |
| 15 | return <code>{API_BASE_URLS[version] ?? API_BASE_URLS['3.1']}</code>; |
| 16 | } |
| 17 |