1508
async send(prompt: string, attachments?: readonly MessageAttachment[], turnId?: string, mode?: CopilotSdkMode, senderClientId?: string): Promise<void> {
1509
if (turnId && this._currentTurn?.id !== turnId) {
1511
>
// call `resetTurnState` just before `send()`; this covers the
1512
>
// direct-send path and is a no-op when the turn already exists.
1513
>
this.resetTurnState(turnId, senderClientId);
1514
>
}
1515
this._logService.info(`[Copilot:${this.sessionId}] sendMessage called: "${prompt.substring(0, 100)}${prompt.length > 100 ? '...' : ''}" (${attachments?.length ?? 0} attachments)`);
1516