Skip to content

Commit e97bc59

Browse files
committed
Require provider match
1 parent 62fea22 commit e97bc59

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/core/Cline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ export class Cline extends EventEmitter<ClineEvents> {
21102110
}
21112111
}
21122112

2113-
console.log(`[Cline#getEnvironmentDetails] terminalDetails: ${terminalDetails}`)
2113+
// console.log(`[Cline#getEnvironmentDetails] terminalDetails: ${terminalDetails}`)
21142114

21152115
// Add recently modified files section.
21162116
const recentlyModifiedFiles = this.fileContextTracker.getAndClearRecentlyModifiedFiles()

src/integrations/terminal/TerminalRegistry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class TerminalRegistry {
162162
// matching directory.
163163
if (taskId) {
164164
terminal = terminals.find((t) => {
165-
if (t.busy || t.taskId !== taskId) {
165+
if (t.busy || t.taskId !== taskId || t.provider !== provider) {
166166
return false
167167
}
168168

@@ -179,7 +179,7 @@ export class TerminalRegistry {
179179
// Second priority: Find any available terminal with matching directory.
180180
if (!terminal) {
181181
terminal = terminals.find((t) => {
182-
if (t.busy) {
182+
if (t.busy || t.provider !== provider) {
183183
return false
184184
}
185185

@@ -196,7 +196,7 @@ export class TerminalRegistry {
196196
// Third priority: Find any non-busy terminal (only if directory is not
197197
// required).
198198
if (!terminal && !requiredCwd) {
199-
terminal = terminals.find((t) => !t.busy)
199+
terminal = terminals.find((t) => !t.busy && t.provider === provider)
200200
}
201201

202202
// If no suitable terminal found, create a new one.

src/integrations/terminal/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import EventEmitter from "events"
33
export type RooTerminalProvider = "vscode" | "execa"
44

55
export interface RooTerminal {
6+
provider: RooTerminalProvider
67
id: number
78
busy: boolean
89
running: boolean

0 commit comments

Comments
 (0)