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