Skip to content

Commit a86e4cc

Browse files
committed
API fixes
1 parent eda5381 commit a86e4cc

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 20.18.1
1+
nodejs v20.18.1

src/exports/api.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { outputChannelLog } from "./log"
1616
export 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

Comments
 (0)