mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 12:51:17 -05:00
Fix using shell API failing
This commit is contained in:
@@ -148,7 +148,9 @@ export class TerminalManager {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
// Listening to this reduces the # of empty terminal outputs!
|
// Listening to this reduces the # of empty terminal outputs!
|
||||||
const disposable = (vscode.window as vscode.Window).onDidEndTerminalShellExecution?.(async (e) => {
|
let disposable: vscode.Disposable | undefined
|
||||||
|
try {
|
||||||
|
disposable = (vscode.window as vscode.Window).onDidEndTerminalShellExecution?.(async (e) => {
|
||||||
// console.log(`Terminal shell execution ended. Command line:`, e.execution.commandLine.value)
|
// console.log(`Terminal shell execution ended. Command line:`, e.execution.commandLine.value)
|
||||||
const stream = e?.execution?.read()
|
const stream = e?.execution?.read()
|
||||||
if (stream) {
|
if (stream) {
|
||||||
@@ -157,6 +159,9 @@ export class TerminalManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error setting up onDidEndTerminalShellExecution", error)
|
||||||
|
}
|
||||||
if (disposable) {
|
if (disposable) {
|
||||||
this.disposables.push(disposable)
|
this.disposables.push(disposable)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user