655
}
656
if (message.type === 'result') {
658
>
this._logService.info(`[Claude:${this.sessionId}] result for sdkUuid=${completed?.sdkUuid}`);
659
>
// Final result: queue fully drained → protocol turn done.
660
>
// Intermediate result (still pending entries from a
661
>
// steering preempt) does NOT fire ChatTurnComplete.
662
>
if (completed && this._queue.isEmpty) {
663
>
this._onDidProduceSignal.fire({
664
>
kind: 'action',
665
>
resource: this.chatChannelUri,
666
>
action: {
667
>
type: ActionType.ChatTurnComplete,
668
>
turnId: completed.turnId,
669
>
duration: Math.max(0, completed.stopWatch.elapsed()),
670
>
},
671
>
});
672
>
}
673
>
}
674
}
675
if (this._abortController.signal.aborted) {