Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🏷️ refactor: Export the Dialog Parts Under Canonical Dialog Names (#17459)
Marco Beretta192cf3920f44
diff --git a/packages/client/src/components/OriginalDialog.tsx b/packages/client/src/components/OriginalDialog.tsxindex c9bdf13956..d00f4f2e0e 100644--- a/packages/client/src/components/OriginalDialog.tsx+++ b/packages/client/src/components/OriginalDialog.tsx@@ -450,7 +450,18 @@ const DialogDescription: React.ForwardRefExoticComponent<));DialogDescription.displayName = DialogPrimitive.Description.displayName;+/** `Dialog*` are the canonical names. The `OG*` names are the same components under the names the+ * app has always imported, kept so existing call sites need no change. */export {+ Dialog,+ DialogPortal,+ DialogClose,+ DialogTrigger,+ DialogContent,+ DialogHeader,+ DialogFooter,+ DialogTitle,+ DialogDescription,Dialog as OGDialog,DialogPortal as OGDialogPortal,DialogOverlay as OGDialogOverlay,diff --git a/packages/client/src/components/__tests__/dialogNames.spec.ts b/packages/client/src/components/__tests__/dialogNames.spec.tsnew file mode 100644index 0000000000..786c41b598--- /dev/null+++ b/packages/client/src/components/__tests__/dialogNames.spec.ts@@ -0,0 +1,25 @@+import * as components from '../index';++/** The canonical `Dialog*` names and the `OG*` names the app imports are one component each, so a+ * call site can move to the canonical name without any change in behaviour. */+const PARTS = [+ 'Dialog',+ 'DialogPortal',+ 'DialogOverlay',+ 'DialogClose',+ 'DialogTrigger',+ 'DialogContent',+ 'DialogHeader',+ 'DialogFooter',+ 'DialogTitle',+ 'DialogDescription',+ 'DialogTemplate',+] as const;++describe('dialog export names', () => {+ it.each(PARTS)('exports %s as the same component as its OG name', (name) => {+ const exports = components as Record<string, unknown>;+ expect(exports[name]).toBeDefined();+ expect(exports[name]).toBe(exports[`OG${name}`]);+ });+});diff --git a/packages/client/src/components/index.ts b/packages/client/src/components/index.tsindex 312145a2ec..1ec8bab41e 100644--- a/packages/client/src/components/index.ts+++ b/packages/client/src/components/index.ts@@ -72,7 +72,7 @@ export type {MinutePickerProps,TimeColumnProps,} from './TimePicker';-export { default as OGDialogTemplate } from './OGDialogTemplate';+export { default as OGDialogTemplate, default as DialogTemplate } from './OGDialogTemplate';export { default as AnimatedSearchInput } from './AnimatedSearchInput';export { default as VirtualizedDataTable } from './DataTable/DataTable';export type {