( head: QueuedCommand, next: QueuedCommand | undefined, )
| 441 | * transcript marking when the head is spread over the merged command). |
| 442 | */ |
| 443 | export function canBatchWith( |
| 444 | head: QueuedCommand, |
| 445 | next: QueuedCommand | undefined, |
| 446 | ): boolean { |
| 447 | return ( |
| 448 | next !== undefined && |
| 449 | next.mode === 'prompt' && |
| 450 | next.workload === head.workload && |
| 451 | next.isMeta === head.isMeta |
| 452 | ) |
| 453 | } |
| 454 | |
| 455 | export async function runHeadless( |
| 456 | inputPrompt: string | AsyncIterable<string>, |