announceQueueDrain prints either the "processing remaining N" or "processing" notice before recursing into the queued turn.
()
| 132 | // announceQueueDrain prints either the "processing remaining N" or |
| 133 | // "processing" notice before recursing into the queued turn. |
| 134 | func (cli *ChatCLI) announceQueueDrain() { |
| 135 | cli.messageQueueMu.Lock() |
| 136 | remaining := len(cli.messageQueue) |
| 137 | cli.messageQueueMu.Unlock() |
| 138 | cli.interactionState = StateProcessing |
| 139 | fmt.Print("\033[0m") |
| 140 | _ = os.Stdout.Sync() |
| 141 | if remaining > 0 { |
| 142 | fmt.Printf("\n %s\n", colorize(i18n.T("queue.processing_remaining", remaining), ColorGray)) |
| 143 | return |
| 144 | } |
| 145 | fmt.Printf("\n %s\n", colorize(i18n.T("queue.processing"), ColorGray)) |
| 146 | } |
| 147 | |
| 148 | // acquireOperationContext creates the cancellable context that drives the |
| 149 | // turn and stashes its cancel func in cli.operationCancel so /reset can |