Show inactive terminals new output; update prompt

This commit is contained in:
Saoud Rizwan
2024-09-09 14:04:31 -04:00
parent 1429970558
commit 966a36dadc
2 changed files with 26 additions and 4 deletions

View File

@@ -206,10 +206,10 @@ export class TerminalManager {
return newTerminalInfo
}
getBusyTerminals(): { id: number; lastCommand: string }[] {
getTerminals(busy: boolean): { id: number; lastCommand: string }[] {
return Array.from(this.terminalIds)
.map((id) => TerminalRegistry.getTerminal(id))
.filter((t): t is TerminalInfo => t !== undefined && t.busy)
.filter((t): t is TerminalInfo => t !== undefined && t.busy === busy)
.map((t) => ({ id: t.id, lastCommand: t.lastCommand }))
}