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