Files
cline-multi-mirror/src/core/controller/account/accountLogoutClicked.ts
T
Sarah Fortune 51c4e0aceb Don't instantiate the AuthService at the top level of the module. (#5443)
I am working separating the initialization for the extension and cline-core
and this is causing a circular dependency.
2025-08-08 06:51:43 -07:00

17 lines
595 B
TypeScript

import { AuthService } from "@/services/auth/AuthService"
import { Empty } from "@shared/proto/cline/common"
import type { EmptyRequest } from "@shared/proto/cline/common"
import type { Controller } from "../index"
/**
* Handles the account logout action
* @param controller The controller instance
* @param _request The empty request object
* @returns Empty response
*/
export async function accountLogoutClicked(controller: Controller, _request: EmptyRequest): Promise<Empty> {
await controller.handleSignOut()
await AuthService.getInstance().handleDeauth()
return Empty.create({})
}