Files
cline-multi-mirror/src/core/controller/account/openrouterAuthClicked.ts
T
Sarah Fortune 8a4c264415 Rename Uri to Url (#6155)
We have switched from using using the VSCode URI to regular URLs, so update the names of the functions to say Url instead of Uri.
2025-09-12 11:57:50 -07:00

17 lines
518 B
TypeScript

import { Empty, EmptyRequest } from "@shared/proto/cline/common"
import { HostProvider } from "@/hosts/host-provider"
import { openExternal } from "@/utils/env"
import { Controller } from ".."
/**
* Initiates OpenRouter auth
*/
export async function openrouterAuthClicked(_: Controller, __: EmptyRequest): Promise<Empty> {
const callbackUrl = await HostProvider.get().getCallbackUrl()
const authUrl = `https://openrouter.ai/auth?callback_url=${callbackUrl}/openrouter`
await openExternal(authUrl)
return {}
}