continue-custom/core/util/processTerminalBackgroundStates.ts
2025-04-18 07:53:18 -07:00

17 lines
No EOL
666 B
TypeScript

// Track which processes have been backgrounded
const processTerminalBackgroundStates = new Map<string, boolean>();
// Function to mark a process as backgrounded
export function markProcessAsBackgrounded(toolCallId: string): void {
processTerminalBackgroundStates.set(toolCallId, true);
}
// Function to check if a process is backgrounded
export function isProcessBackgrounded(toolCallId: string): boolean {
return processTerminalBackgroundStates.has(toolCallId);
}
// Function to remove a process from the backgrounded processes map
export function removeBackgroundedProcess(toolCallId: string): void {
processTerminalBackgroundStates.delete(toolCallId);
}