* Force emit a final token usage update, ignoring throttle. * Called before task completion or abort to ensure final stats are captured. * Triggers the debounce with current values and immediately flushes to ensure emit.
()
| 2191 | * Triggers the debounce with current values and immediately flushes to ensure emit. |
| 2192 | */ |
| 2193 | public emitFinalTokenUsageUpdate(): void { |
| 2194 | const tokenUsage = this.getTokenUsage() |
| 2195 | this.debouncedEmitTokenUsage(tokenUsage, this.toolUsage) |
| 2196 | this.debouncedEmitTokenUsage.flush() |
| 2197 | } |
| 2198 | |
| 2199 | public async abortTask(isAbandoned = false) { |
| 2200 | // Aborting task |
no test coverage detected