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
import type { ReactNode } from 'react';
import { cn } from '~/utils';
export function parseShortcutKeys(display: string): string[] {
return display.split(/([+\s]+)/).filter((key) => key.trim().length > 0 && key !== '+');
}
function ShortcutKbd({ children, className = '' }: { children: ReactNode; className?: string }) {
return (
<kbd
className={cn(
'border-border-light bg-surface-primary-alt text-text-primary text-2xs inline-flex h-[1.375rem] min-w-[1.375rem] items-center justify-center rounded-md border px-1.5 font-sans leading-none font-medium',
className,
)}
>
{children}
</kbd>
);
}
export default function ShortcutKeyCombo({
display,
keys,
className = '',
keyClassName = '',
}: {
display?: string;
keys?: string[];
className?: string;
keyClassName?: string;
}) {
const shortcutKeys = keys ?? parseShortcutKeys(display ?? '');
return (
<div className={cn('flex items-center gap-1', className)}>
{shortcutKeys.map((key, idx) => (
<ShortcutKbd key={`${key}-${idx}`} className={keyClassName}>
{key}
</ShortcutKbd>
))}
</div>
);
}