* Remove the first queued message that matches the given localId. * Returns true if a message was removed, false if not found. * Best-effort: if the CLI is offline when cancel is issued, the message * may already have been collected for invocation and won't be found here.
(localId: string)
| 262 | * may already have been collected for invocation and won't be found here. |
| 263 | */ |
| 264 | cancelByLocalId(localId: string): boolean { |
| 265 | if (!localId) return false; |
| 266 | const idx = this.queue.findIndex(item => item.localId === localId); |
| 267 | if (idx === -1) return false; |
| 268 | this.queue.splice(idx, 1); |
| 269 | return true; |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Reset the queue - clears all messages and resets to empty state |
no outgoing calls
no test coverage detected