MCPcopy Create free account
hub / github.com/Noumena-Network/code / spawnBackgroundTask

Function spawnBackgroundTask

src/tools/PowerShellTool/PowerShellTool.tsx:768–783  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

766
767 // Helper to spawn a background task and return its ID
768 async function spawnBackgroundTask(): Promise<string> {
769 const handle = await spawnShellTask({
770 command,
771 description: description || command,
772 shellCommand,
773 toolUseId,
774 agentId
775 }, {
776 abortController,
777 getAppState: () => {
778 throw new Error('getAppState not available in runPowerShellCommand context');
779 },
780 setAppState
781 });
782 return handle.taskId;
783 }
784
785 // Helper to start backgrounding with logging
786 function startBackgrounding(eventName: string, backgroundFn?: (shellId: string) => void): void {

Callers 2

startBackgroundingFunction · 0.70
runPowerShellCommandFunction · 0.70

Calls 1

spawnShellTaskFunction · 0.85

Tested by

no test coverage detected