mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-22 07:36:33 +01:00
- Extract `specDisplayFieldReset` constant and `mergeQuerySettingsWithSpec` utility to `client/src/utils/endpoints.ts` as a single source of truth for spec display fields that must be cleared on non-spec transitions. - Clear `spec`, `iconURL`, `modelLabel`, and `greeting` from the merged preset in `ChatRoute.getNewConvoPreset()` when URL query parameters override the conversation without explicitly setting a spec. - Also clear `greeting` in the parallel cleanup in `useQueryParams.newQueryConvo` using the shared `specDisplayFieldReset` constant. - Guard the field reset on `specPreset != null` so null values aren't injected when no spec is configured. - Add comprehensive test coverage for the merge-and-clear logic. |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| Layouts | ||
| ChatRoute.tsx | ||
| Dashboard.tsx | ||
| index.tsx | ||
| Root.tsx | ||
| RouteErrorBoundary.tsx | ||
| Search.tsx | ||
| ShareRoute.tsx | ||
| useAuthRedirect.ts | ||