mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
Merge 79a92a73c8
into 68c9f668c1
This commit is contained in:
commit
ee56d0c33a
5 changed files with 21 additions and 10 deletions
|
@ -111,7 +111,8 @@
|
|||
"tailwind-merge": "^1.9.1",
|
||||
"tailwindcss-animate": "^1.0.5",
|
||||
"tailwindcss-radix": "^2.8.0",
|
||||
"zod": "^3.22.4"
|
||||
"zod": "^3.22.4",
|
||||
"dompurify": "^3.2.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-runtime": "^7.22.15",
|
||||
|
|
|
@ -7,6 +7,7 @@ import { useGetEndpointsQuery, useGetStartupConfig } from '~/data-provider';
|
|||
import ConvoIcon from '~/components/Endpoints/ConvoIcon';
|
||||
import { useLocalize, useAuthContext } from '~/hooks';
|
||||
import { getIconEndpoint, getEntity } from '~/utils';
|
||||
import DOMPurify from 'dompurify';
|
||||
|
||||
const containerClassName =
|
||||
'shadow-stroke relative flex h-full items-center justify-center rounded-full bg-white dark:bg-presentation dark:text-white text-black dark:after:shadow-none ';
|
||||
|
@ -204,9 +205,10 @@ export default function Landing({ centerFormOnLanding }: { centerFormOnLanding:
|
|||
)}
|
||||
</div>
|
||||
{description && (
|
||||
<div className="animate-fadeIn mt-4 max-w-md text-center text-sm font-normal text-text-primary">
|
||||
{description}
|
||||
</div>
|
||||
<div
|
||||
className="animate-fadeIn mt-4 max-w-md text-center text-sm font-normal text-text-primary"
|
||||
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(description || '') }}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -239,16 +239,17 @@ export default function AgentConfig({ createMutation }: Pick<AgentPanelProps, 'c
|
|||
name="description"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<input
|
||||
<textarea
|
||||
{...field}
|
||||
value={field.value ?? ''}
|
||||
maxLength={512}
|
||||
className={inputClass}
|
||||
className={`${inputClass} min-h-[100px] resize-y`}
|
||||
id="description"
|
||||
type="text"
|
||||
placeholder={localize('com_agents_description_placeholder')}
|
||||
aria-label="Agent description"
|
||||
/>
|
||||
rows={4}
|
||||
onChange={field.onChange}
|
||||
>
|
||||
{field.value ?? ''}
|
||||
</textarea>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -13,6 +13,9 @@
|
|||
"client",
|
||||
"packages/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"dompurify": "^3.2.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@axe-core/playwright": "^4.10.1",
|
||||
"@eslint/compat": "^1.2.6",
|
||||
|
@ -2661,6 +2664,7 @@
|
|||
"copy-to-clipboard": "^3.3.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"date-fns": "^3.3.1",
|
||||
"dompurify": "^3.2.6",
|
||||
"downloadjs": "^1.4.7",
|
||||
"export-from-json": "^1.7.2",
|
||||
"filenamify": "^6.0.0",
|
||||
|
|
|
@ -153,5 +153,8 @@
|
|||
"admin/",
|
||||
"packages/"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"dompurify": "^3.2.6"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue