mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
feat(ChatAgent.js): add support for skipping completion mode in ChatAgent
feat(ChatAgent.js): add a check for images when completion is skipped to add to response feat(askGPTPlugins.js): add skipCompletion option to agentOptions feat(client): add Switch component to ui components and use for new Agent Settings chore(package.json): ignore client directory in nodemonConfig
This commit is contained in:
parent
5b1efc48d1
commit
d0be2e6f4a
13 changed files with 150 additions and 32 deletions
27
client/src/components/ui/Switch.tsx
Normal file
27
client/src/components/ui/Switch.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import * as React from "react"
|
||||
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
||||
|
||||
import { cn } from '../../utils';
|
||||
|
||||
const Switch = React.forwardRef<
|
||||
React.ElementRef<typeof SwitchPrimitives.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<SwitchPrimitives.Root
|
||||
className={cn(
|
||||
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-green-600 data-[state=unchecked]:bg-gray-200",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
ref={ref}
|
||||
>
|
||||
<SwitchPrimitives.Thumb
|
||||
className={cn(
|
||||
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,0.45)] transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
||||
)}
|
||||
/>
|
||||
</SwitchPrimitives.Root>
|
||||
))
|
||||
Switch.displayName = SwitchPrimitives.Root.displayName
|
||||
|
||||
export { Switch }
|
||||
|
|
@ -11,6 +11,7 @@ export * from './Landing';
|
|||
export * from './ModelSelect';
|
||||
export * from './Prompt';
|
||||
export * from './Slider';
|
||||
export * from './Switch';
|
||||
export * from './Tabs';
|
||||
export * from './Templates';
|
||||
export * from './Textarea';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue