feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"use client";
|
||||
import { useI18n } from "@/components/i18n";
|
||||
|
||||
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import type { ArtifactPartProps } from "@/src/core";
|
||||
@@ -62,6 +64,7 @@ function outputText(output: unknown): string | null {
|
||||
}
|
||||
|
||||
export function ToolCallCard({ part }: ArtifactPartProps) {
|
||||
const { t } = useI18n();
|
||||
const p = part as ToolCallPart;
|
||||
const tool = p.type.replace(/^tool-/, "");
|
||||
const arg = headlineArg(tool, p.input);
|
||||
@@ -84,8 +87,7 @@ export function ToolCallCard({ part }: ArtifactPartProps) {
|
||||
{p.input != null && (
|
||||
<div>
|
||||
<div className="mb-1 font-medium uppercase tracking-wide text-muted-foreground">
|
||||
Input
|
||||
</div>
|
||||
{t("Input")}</div>
|
||||
<pre className="max-h-32 overflow-auto whitespace-pre-wrap break-all font-mono text-[11px] leading-relaxed">
|
||||
{JSON.stringify(p.input, null, 2)}
|
||||
</pre>
|
||||
@@ -94,24 +96,22 @@ export function ToolCallCard({ part }: ArtifactPartProps) {
|
||||
{typeof p.errorText === "string" ? (
|
||||
<div>
|
||||
<div className="mb-1 font-medium uppercase tracking-wide text-muted-foreground">
|
||||
Error
|
||||
</div>
|
||||
{t("Error")}</div>
|
||||
<pre className="whitespace-pre-wrap break-all font-mono text-[11px] text-red-500">
|
||||
{p.errorText}
|
||||
{t(p.errorText)}
|
||||
</pre>
|
||||
</div>
|
||||
) : out != null ? (
|
||||
<div>
|
||||
<div className="mb-1 font-medium uppercase tracking-wide text-muted-foreground">
|
||||
Output
|
||||
</div>
|
||||
{t("Output")}</div>
|
||||
<pre className="max-h-64 overflow-auto whitespace-pre-wrap break-all font-mono text-[11px] leading-relaxed">
|
||||
{out}
|
||||
</pre>
|
||||
</div>
|
||||
) : (
|
||||
p.state !== "output-available" && (
|
||||
<div className="text-muted-foreground italic">running…</div>
|
||||
<div className="text-muted-foreground italic">{t("running…")}</div>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user