INNER CODE UNIT · TypeScript
index
Core-Mate/OpenGUI · deepseek-harness-plugin/src/index.ts:293
const index = next++
if (index >= values.length) return
try {
output[index] = await worker(values[index]!, index, combined)
} catch (error) {
if (!batch.signal.aborted) batch.abort(error)
throw error
}
}
}
const settled = await Promise.allSettled(Array.from({ length: Math.min(limit, values.length) }, runWorker))
const failure = settled.find((value): value is PromiseRejectedResult => value.status === 'rejected')
if (failure !== undefined) throw failure.reason
return output
}
interface ForegroundProgress {
readonly parent: CommandInvocation['agent']