mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-03 14:50:19 +01:00
🗣 fix: Add Various State Change Announcements (#11495)
* fix: Agent Builder Reset button announcements * fix: special variables announcements * fix: model select announcements * fix: prompt deletion announcement * refactor: encapsulate model display name logic * chore: address comments * chore: re-order i18n strings
This commit is contained in:
parent
fcb363403a
commit
46624798b6
5 changed files with 39 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ import {
|
|||
import type * as t from 'librechat-data-provider';
|
||||
import type { AgentForm, AgentModelPanelProps, StringOption } from '~/common';
|
||||
import { useGetEndpointsQuery } from '~/data-provider';
|
||||
import { useLiveAnnouncer } from '~/Providers';
|
||||
import { useLocalize } from '~/hooks';
|
||||
import { Panel } from '~/common';
|
||||
import { cn } from '~/utils';
|
||||
|
|
@ -25,6 +26,7 @@ export default function ModelPanel({
|
|||
models: modelsData,
|
||||
}: Pick<AgentModelPanelProps, 'models' | 'providers' | 'setActivePanel'>) {
|
||||
const localize = useLocalize();
|
||||
const { announcePolite } = useLiveAnnouncer();
|
||||
|
||||
const { control, setValue } = useFormContext<AgentForm>();
|
||||
|
||||
|
|
@ -91,6 +93,7 @@ export default function ModelPanel({
|
|||
|
||||
const handleResetParameters = () => {
|
||||
setValue('model_parameters', {} as t.AgentModelParameters);
|
||||
announcePolite({ message: localize('com_ui_model_parameters_reset'), isStatus: true });
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue