MCPcopy Index your code
hub / github.com/codeaashu/claude-code / backgroundAll

Function backgroundAll

src/tasks/LocalShellTask/LocalShellTask.tsx:390–410  ·  view source on GitHub ↗
(getAppState: () => AppState, setAppState: SetAppState)

Source from the content-addressed store, hash-verified

388 });
389}
390export function backgroundAll(getAppState: () => AppState, setAppState: SetAppState): void {
391 const state = getAppState();
392
393 // Background all foreground bash tasks
394 const foregroundBashTaskIds = Object.keys(state.tasks).filter(id => {
395 const task = state.tasks[id];
396 return isLocalShellTask(task) && !task.isBackgrounded && task.shellCommand;
397 });
398 for (const taskId of foregroundBashTaskIds) {
399 backgroundTask(taskId, getAppState, setAppState);
400 }
401
402 // Background all foreground agent tasks
403 const foregroundAgentTaskIds = Object.keys(state.tasks).filter(id => {
404 const task = state.tasks[id];
405 return isLocalAgentTask(task) && !task.isBackgrounded;
406 });
407 for (const taskId of foregroundAgentTaskIds) {
408 backgroundAgentTask(taskId, getAppState, setAppState);
409 }
410}
411
412/**
413 * Background an already-registered foreground task in-place.

Callers 2

BackgroundHintFunction · 0.85
SessionBackgroundHintFunction · 0.85

Calls 6

isLocalShellTaskFunction · 0.85
backgroundTaskFunction · 0.85
isLocalAgentTaskFunction · 0.85
backgroundAgentTaskFunction · 0.85
keysMethod · 0.80
getAppStateFunction · 0.50

Tested by

no test coverage detected