mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Pass editor deeplink URI to app.roocode.com (#4120)
This commit is contained in:
parent
8de608a0df
commit
b0821b3148
1 changed files with 3 additions and 2 deletions
|
|
@ -93,8 +93,9 @@ export class AuthService extends EventEmitter<AuthServiceEvents> {
|
|||
// Generate a cryptographically random state parameter.
|
||||
const state = crypto.randomBytes(16).toString("hex")
|
||||
await this.context.globalState.update(AUTH_STATE_KEY, state)
|
||||
const uri = vscode.Uri.parse(`${getRooCodeApiUrl()}/extension/sign-in?state=${state}`)
|
||||
await vscode.env.openExternal(uri)
|
||||
const params = new URLSearchParams({ state, uri_scheme: vscode.env.uriScheme })
|
||||
const url = `${getRooCodeApiUrl()}/extension/sign-in?${params.toString()}`
|
||||
await vscode.env.openExternal(vscode.Uri.parse(url))
|
||||
} catch (error) {
|
||||
console.error(`[auth] Error initiating Roo Code Cloud auth: ${error}`)
|
||||
throw new Error(`Failed to initiate Roo Code Cloud authentication: ${error}`)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue