feat: add Russian localization and independent STT languages
CI / Typecheck, tests, lint (push) Canceled after 0s
CI / Standalone (mac-arm64) (push) Canceled after 0s
CI / Standalone (linux-x64) (push) Canceled after 0s
CI / Standalone (windows-x64) (push) Canceled after 0s

This commit is contained in:
2026-10-25 17:18:44 +03:00
parent b277ee3e0f
commit a50ca4b867
93 changed files with 3261 additions and 904 deletions
+8 -5
View File
@@ -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(