mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +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')
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ interface:
|
|||
marketplace:
|
||||
use: false
|
||||
fileCitations: true
|
||||
# thinkingIndicatorText: "Thinking..." # Text shown while AI is generating a response (default: "Thinking...")
|
||||
# Temporary chat retention period in hours (default: 720, min: 1, max: 8760)
|
||||
# temporaryChatRetention: 1
|
||||
|
||||
|
|
|
|||
|
|
@ -550,6 +550,7 @@ export const interfaceSchema = z
|
|||
.optional(),
|
||||
fileSearch: z.boolean().optional(),
|
||||
fileCitations: z.boolean().optional(),
|
||||
thinkingIndicatorText: z.string().optional(),
|
||||
})
|
||||
.default({
|
||||
endpointsMenu: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue