mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-08 03:07:53 +00:00
Fix using shell API failing
This commit is contained in:
parent
a38d20ec37
commit
e3555c2729
1 changed files with 13 additions and 8 deletions
|
|
@ -148,15 +148,20 @@ export class TerminalManager {
|
|||
|
||||
constructor() {
|
||||
// Listening to this reduces the # of empty terminal outputs!
|
||||
const disposable = (vscode.window as vscode.Window).onDidEndTerminalShellExecution?.(async (e) => {
|
||||
// console.log(`Terminal shell execution ended. Command line:`, e.execution.commandLine.value)
|
||||
const stream = e?.execution?.read()
|
||||
if (stream) {
|
||||
for await (let _ of stream) {
|
||||
// console.log(`from onDidEndTerminalShellExecution, read:`, data)
|
||||
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)
|
||||
const stream = e?.execution?.read()
|
||||
if (stream) {
|
||||
for await (let _ of stream) {
|
||||
// console.log(`from onDidEndTerminalShellExecution, read:`, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Error setting up onDidEndTerminalShellExecution", error)
|
||||
}
|
||||
if (disposable) {
|
||||
this.disposables.push(disposable)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue