}
if (partialResponse) {
'',
'The side chat was created while the source assistant was still responding.',
'The user-visible response had produced the following text at that moment:',
'',
partialResponse,
);
}
const contextBody = context.join('\n');
return [SIDE_CHAT_CONTEXT_START, `${SIDE_CHAT_CONTEXT_LENGTH_PREFIX}${contextBody.length}`, contextBody, SIDE_CHAT_CONTEXT_END, '', prompt].join('\n');