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:
constanttime 2025-10-02 17:42:57 +05:30
parent 341435fb25
commit d6500f7eb3
3 changed files with 5 additions and 1 deletions

View file

@ -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')
}
/>