@@ -16,7 +16,6 @@ import { outputChannelLog } from "./log"
1616export class API extends EventEmitter < RooCodeEvents > implements RooCodeAPI {
1717 private readonly outputChannel : vscode . OutputChannel
1818 private readonly sidebarProvider : ClineProvider
19- private tabProvider ?: ClineProvider
2019 private readonly context : vscode . ExtensionContext
2120 private readonly ipc ?: IpcServer
2221 private readonly taskMap = new Map < string , ClineProvider > ( )
@@ -100,13 +99,11 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
10099 await vscode . commands . executeCommand ( "workbench.action.files.revert" )
101100 await vscode . commands . executeCommand ( "workbench.action.closeAllEditors" )
102101
103- if ( ! this . tabProvider ) {
104- this . tabProvider = await openClineInNewTab ( { context : this . context , outputChannel : this . outputChannel } )
105- this . registerListeners ( this . tabProvider )
106- }
107-
108- provider = this . tabProvider
102+ provider = await openClineInNewTab ( { context : this . context , outputChannel : this . outputChannel } )
103+ this . registerListeners ( provider )
109104 } else {
105+ await vscode . commands . executeCommand ( "roo-cline.SidebarProvider.focus" )
106+
110107 provider = this . sidebarProvider
111108 }
112109
@@ -234,10 +231,7 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
234231 throw new Error ( `Profile with name "${ name } " does not exist` )
235232 }
236233
237- await this . setConfiguration ( {
238- ...currentSettings ,
239- currentApiConfigName : profile . name ,
240- } )
234+ await this . setConfiguration ( { ...currentSettings , currentApiConfigName : profile . name } )
241235 }
242236
243237 public getActiveProfile ( ) {
0 commit comments