fix: preserve chatProjectId through the new-chat template reduction

The param-endpoint guard in newConversation reduced a new chat's template to
{ endpoint } only, dropping the chatProjectId injected by the Model Selector /
@ switch — so switching models cleared the project scope. Keep chatProjectId
in the reduced template.
This commit is contained in:
Danny Avila 2026-06-03 09:56:43 -04:00
parent e185e2ce0a
commit ed1744976b

View file

@ -307,7 +307,7 @@ const useNewConvo = (index = 0) => {
isParamEndpoint(_preset?.endpoint ?? '', _preset?.endpointType ?? '');
const template =
paramEndpoint === true && templateConvoId && templateConvoId === Constants.NEW_CONVO
? { endpoint: _template.endpoint }
? { endpoint: _template.endpoint, chatProjectId: _template.chatProjectId }
: _template;
const conversation = {