Elffuss BraidHub

kikocis/continue public

85ccad1ce18a · 667 BRawPermalink
1// Track which processes have been backgrounded
2const processTerminalBackgroundStates = new Map<string, boolean>();
3
4// Function to mark a process as backgrounded
5export function markProcessAsBackgrounded(toolCallId: string): void {
6 processTerminalBackgroundStates.set(toolCallId, true);
7}
8
9// Function to check if a process is backgrounded
10export function isProcessBackgrounded(toolCallId: string): boolean {
11 return processTerminalBackgroundStates.has(toolCallId);
12}
13
14// Function to remove a process from the backgrounded processes map
15export function removeBackgroundedProcess(toolCallId: string): void {
16 processTerminalBackgroundStates.delete(toolCallId);
17}