mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-24 11:24:10 +01:00
feat: Add configurable thinking indicator text
- Add thinkingIndicatorText field to interface configuration schema - Update ContentParts component to use configurable text instead of hardcoded translation - Update example config with new option - Maintain backward compatibility by falling back to default translation
This commit is contained in:
parent
341435fb25
commit
d6500f7eb3
3 changed files with 5 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import Sources from '~/components/Web/Sources';
|
|||
import { mapAttachments } from '~/utils/map';
|
||||
import { EditTextPart } from './Parts';
|
||||
import { useLocalize } from '~/hooks';
|
||||
import { useGetStartupConfig } from '~/data-provider';
|
||||
import store from '~/store';
|
||||
import Part from './Part';
|
||||
|
||||
|
|
@ -53,6 +54,7 @@ const ContentParts = memo(
|
|||
setSiblingIdx,
|
||||
}: ContentPartsProps) => {
|
||||
const localize = useLocalize();
|
||||
const { data: startupConfig } = useGetStartupConfig();
|
||||
const [showThinking, setShowThinking] = useRecoilState<boolean>(store.showThinking);
|
||||
const [isExpanded, setIsExpanded] = useState(showThinking);
|
||||
const attachmentMap = useMemo(() => mapAttachments(attachments ?? []), [attachments]);
|
||||
|
|
@ -139,7 +141,7 @@ const ContentParts = memo(
|
|||
}
|
||||
label={
|
||||
effectiveIsSubmitting && isLast
|
||||
? localize('com_ui_thinking')
|
||||
? startupConfig?.interface?.thinkingIndicatorText || localize('com_ui_thinking')
|
||||
: localize('com_ui_thoughts')
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue