mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20: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 { mapAttachments } from '~/utils/map';
|
||||||
import { EditTextPart } from './Parts';
|
import { EditTextPart } from './Parts';
|
||||||
import { useLocalize } from '~/hooks';
|
import { useLocalize } from '~/hooks';
|
||||||
|
import { useGetStartupConfig } from '~/data-provider';
|
||||||
import store from '~/store';
|
import store from '~/store';
|
||||||
import Part from './Part';
|
import Part from './Part';
|
||||||
|
|
||||||
|
|
@ -53,6 +54,7 @@ const ContentParts = memo(
|
||||||
setSiblingIdx,
|
setSiblingIdx,
|
||||||
}: ContentPartsProps) => {
|
}: ContentPartsProps) => {
|
||||||
const localize = useLocalize();
|
const localize = useLocalize();
|
||||||
|
const { data: startupConfig } = useGetStartupConfig();
|
||||||
const [showThinking, setShowThinking] = useRecoilState<boolean>(store.showThinking);
|
const [showThinking, setShowThinking] = useRecoilState<boolean>(store.showThinking);
|
||||||
const [isExpanded, setIsExpanded] = useState(showThinking);
|
const [isExpanded, setIsExpanded] = useState(showThinking);
|
||||||
const attachmentMap = useMemo(() => mapAttachments(attachments ?? []), [attachments]);
|
const attachmentMap = useMemo(() => mapAttachments(attachments ?? []), [attachments]);
|
||||||
|
|
@ -139,7 +141,7 @@ const ContentParts = memo(
|
||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
effectiveIsSubmitting && isLast
|
effectiveIsSubmitting && isLast
|
||||||
? localize('com_ui_thinking')
|
? startupConfig?.interface?.thinkingIndicatorText || localize('com_ui_thinking')
|
||||||
: localize('com_ui_thoughts')
|
: localize('com_ui_thoughts')
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ interface:
|
||||||
marketplace:
|
marketplace:
|
||||||
use: false
|
use: false
|
||||||
fileCitations: true
|
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)
|
# Temporary chat retention period in hours (default: 720, min: 1, max: 8760)
|
||||||
# temporaryChatRetention: 1
|
# temporaryChatRetention: 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -550,6 +550,7 @@ export const interfaceSchema = z
|
||||||
.optional(),
|
.optional(),
|
||||||
fileSearch: z.boolean().optional(),
|
fileSearch: z.boolean().optional(),
|
||||||
fileCitations: z.boolean().optional(),
|
fileCitations: z.boolean().optional(),
|
||||||
|
thinkingIndicatorText: z.string().optional(),
|
||||||
})
|
})
|
||||||
.default({
|
.default({
|
||||||
endpointsMenu: true,
|
endpointsMenu: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue