1585
// folder for folder sessions; undefined for workspace-less sessions.
1586
const resolvedWorkingDirectory = await this._options.resolveWorkingDirectoryBeforeSend?.({ session: options.sessionChannel, chat, turnId, prompt: message.text });
1588
>
const selectionUpdates: Promise<void>[] = [];
1589
>
if (message.model) {
1590
failureStage = 'modelSelection';
1591
selectionUpdates.push(agent.chats.changeModel(chatUri, message.model));
1592
}
1593
>
selectionUpdates.push(agent.chats.changeAgent(chatUri, message.agent).catch(err => {
agentSideEffects.ts
1594
this._logService.error('[AgentSideEffects] changeAgent failed', err);
1596
>
1597
>
await Promise.all(selectionUpdates);
1598
1599
failureStage = 'sendMessage';