INNER CODE UNIT · TypeScript
settled
Core-Mate/OpenGUI · deepseek-harness-plugin/src/index.ts:303
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']
readonly nestedUnderCallId?: CallId
}
function progressFor(
parent: CommandInvocation['agent'],
presentation: CoremateTaskPresentation,
): ForegroundProgress | undefined {
if (presentation === 'result-only') return undefined
if (presentation === 'parent-chat') return { parent }
return { parent, nestedUnderCallId: presentation.nestedUnderCallId }