feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"use client";
|
||||
import { useI18n } from "@/components/i18n";
|
||||
|
||||
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
||||
import { blurAfterPointerClick } from "@/components/focus-hygiene";
|
||||
@@ -134,20 +135,22 @@ export type ReasoningTriggerProps = ComponentProps<
|
||||
for a few seconds"), bookkeeping for information we knowingly lose. The
|
||||
label pairs with the user's collapsed "Your thinking" rows — one
|
||||
language; motion (spinner + shimmer) stays the working signal. */
|
||||
const defaultGetThinkingMessage = (isStreaming: boolean) => {
|
||||
const DefaultThinkingMessage = ({ isStreaming }: { isStreaming: boolean }) => {
|
||||
const { t } = useI18n();
|
||||
if (isStreaming) {
|
||||
return <Shimmer duration={1}>Thinking...</Shimmer>;
|
||||
return <Shimmer duration={1}>{t("Thinking...")}</Shimmer>;
|
||||
}
|
||||
return <p>AGENT’S THINKING</p>;
|
||||
return <p>{t("AGENT’S THINKING")}</p>;
|
||||
};
|
||||
|
||||
export const ReasoningTrigger = memo(
|
||||
({
|
||||
className,
|
||||
children,
|
||||
getThinkingMessage = defaultGetThinkingMessage,
|
||||
getThinkingMessage = (isStreaming) => <DefaultThinkingMessage isStreaming={isStreaming} />,
|
||||
...props
|
||||
}: ReasoningTriggerProps) => {
|
||||
const { t } = useI18n();
|
||||
const { isStreaming, isOpen } = useReasoning();
|
||||
|
||||
return (
|
||||
@@ -175,7 +178,7 @@ export const ReasoningTrigger = memo(
|
||||
the component default (h-3) — IDENTICAL to the placeholder
|
||||
spinner (owner, 2026-10-02): the handoff between the two
|
||||
states must be visually seamless, one size everywhere. */}
|
||||
{isStreaming && <BrailleSpinner label="Thinking" />}
|
||||
{isStreaming && <BrailleSpinner label={t("Thinking")} />}
|
||||
{getThinkingMessage(isStreaming)}
|
||||
<ChevronDownIcon
|
||||
className={cn(
|
||||
|
||||
Reference in New Issue
Block a user