continue-custom/core/util/processTerminalBackgroundStates.ts
Nate 184be8f092 npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p
ath .gitignore --ignore-path .prettierignore --write
2025-05-25 18:34:39 -07:00

17 lines
667 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);
}