Skip to content

Commit 39eb4b0

Browse files
committed
Use vscode.env.uriScheme
1 parent bcfe825 commit 39eb4b0

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

packages/cloud/src/AuthService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as vscode from "vscode"
66

77
import type { CloudUserInfo } from "@roo-code/types"
88

9-
import { getClerkBaseUrl, getDeepLinkUrl, getRooCodeApiUrl } from "./Config"
9+
import { getClerkBaseUrl, getRooCodeApiUrl } from "./Config"
1010
import { RefreshTimer } from "./RefreshTimer"
1111

1212
export interface AuthServiceEvents {
@@ -93,7 +93,7 @@ export class AuthService extends EventEmitter<AuthServiceEvents> {
9393
// Generate a cryptographically random state parameter.
9494
const state = crypto.randomBytes(16).toString("hex")
9595
await this.context.globalState.update(AUTH_STATE_KEY, state)
96-
const params = new URLSearchParams({ state, ide: getDeepLinkUrl(this.context) })
96+
const params = new URLSearchParams({ state, ide: vscode.env.uriScheme })
9797
const url = `${getRooCodeApiUrl()}/extension/sign-in?${params.toString()}`
9898
await vscode.env.openExternal(vscode.Uri.parse(url))
9999
} catch (error) {

packages/cloud/src/Config.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
import * as vscode from "vscode"
2-
31
export const getClerkBaseUrl = () => process.env.CLERK_BASE_URL || "https://clerk.roocode.com"
42
export const getRooCodeApiUrl = () => process.env.ROO_CODE_API_URL || "https://app.roocode.com"
5-
6-
export const getDeepLinkUrl = (context: vscode.ExtensionContext) => {
7-
const ide = vscode.env.appName?.toLowerCase() ?? "vscode"
8-
const packageJSON = context.extension?.packageJSON
9-
const publisher = packageJSON?.publisher ?? "RooVeterinaryInc"
10-
const name = packageJSON?.name ?? "roo-cline"
11-
return `${ide}://${publisher}.${name}`
12-
}

0 commit comments

Comments
 (0)