mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
allow any type to handle watsonx
This commit is contained in:
parent
24697d18d4
commit
196828e40e
2 changed files with 29 additions and 1 deletions
|
|
@ -2267,7 +2267,12 @@ export class ClineProvider
|
|||
return
|
||||
}
|
||||
|
||||
const userInfo = CloudService.instance.getUserInfo()
|
||||
await ExtensionBridgeService.handleRemoteControlState(
|
||||
userInfo,
|
||||
enabled,
|
||||
{ ...bridgeConfig, provider: this as any, sessionId: vscode.env.sessionId },
|
||||
(message: string) => this.log(message),
|
||||
)
|
||||
|
||||
if (!userInfo) {
|
||||
this.log("[ClineProvider#remoteControlEnabled] Failed to get user info, disconnecting")
|
||||
|
|
|
|||
|
|
@ -191,6 +191,29 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||
)
|
||||
}
|
||||
|
||||
const postStateListener = () => ClineProvider.getVisibleInstance()?.postStateToWebview()
|
||||
|
||||
cloudService.on("auth-state-changed", postStateListener)
|
||||
cloudService.on("settings-updated", postStateListener)
|
||||
|
||||
cloudService.on("user-info", async ({ userInfo }) => {
|
||||
postStateListener()
|
||||
|
||||
const bridgeConfig = await cloudService.cloudAPI?.bridgeConfig().catch(() => undefined)
|
||||
|
||||
if (!bridgeConfig) {
|
||||
outputChannel.appendLine("[CloudService] Failed to get bridge config")
|
||||
return
|
||||
}
|
||||
|
||||
ExtensionBridgeService.handleRemoteControlState(
|
||||
userInfo,
|
||||
contextProxy.getValue("remoteControlEnabled"),
|
||||
{ ...bridgeConfig, provider: provider as any, sessionId: vscode.env.sessionId },
|
||||
(message: string) => outputChannel.appendLine(message),
|
||||
)
|
||||
})
|
||||
|
||||
// Add to subscriptions for proper cleanup on deactivate.
|
||||
context.subscriptions.push(cloudService)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue