From ed1744976b091bd6dc8eb6cf24e6c3eba291393e Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 3 Jun 2026 09:56:43 -0400 Subject: [PATCH] fix: preserve chatProjectId through the new-chat template reduction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- client/src/hooks/useNewConvo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/hooks/useNewConvo.ts b/client/src/hooks/useNewConvo.ts index 616dec9fa1..dfaad2e94c 100644 --- a/client/src/hooks/useNewConvo.ts +++ b/client/src/hooks/useNewConvo.ts @@ -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 = {