Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 20.18.1
nodejs v20.18.1
16 changes: 5 additions & 11 deletions src/exports/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { outputChannelLog } from "./log"
export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
private readonly outputChannel: vscode.OutputChannel
private readonly sidebarProvider: ClineProvider
private tabProvider?: ClineProvider
private readonly context: vscode.ExtensionContext
private readonly ipc?: IpcServer
private readonly taskMap = new Map<string, ClineProvider>()
Expand Down Expand Up @@ -100,13 +99,11 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
await vscode.commands.executeCommand("workbench.action.files.revert")
await vscode.commands.executeCommand("workbench.action.closeAllEditors")

if (!this.tabProvider) {
this.tabProvider = await openClineInNewTab({ context: this.context, outputChannel: this.outputChannel })
this.registerListeners(this.tabProvider)
}

provider = this.tabProvider
provider = await openClineInNewTab({ context: this.context, outputChannel: this.outputChannel })
this.registerListeners(provider)
} else {
await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus")

provider = this.sidebarProvider
}

Expand Down Expand Up @@ -234,10 +231,7 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
throw new Error(`Profile with name "${name}" does not exist`)
}

await this.setConfiguration({
...currentSettings,
currentApiConfigName: profile.name,
})
await this.setConfiguration({ ...currentSettings, currentApiConfigName: profile.name })
}

public getActiveProfile() {
Expand Down