[fix(web)] localize copied task-stats line instead of hardcoded Chinese (#8)

This commit is contained in:
Zhang Jason authored and GitHub committed 2026-07-22 22:06:45 +08:00
1 parent 81d8c0045c
commit 1425b2fb5f
5 files changed
+104 -29

No files matched your search

@@ -71,7 +71,16 @@ export function TaskStatsLine({
const copy = () => {
const text =
assistantText?.trim() || stats === null ? (assistantText ?? "") : formatTaskStats(stats);
assistantText?.trim() || stats === null
? (assistantText ?? "")
: formatTaskStats(stats, {
stats: S.chat.statsLabel,
input: S.chat.statInput,
cached: S.chat.statCached,
output: S.chat.statOutput,
parenOpen: S.chat.statParenOpen,
parenClose: S.chat.statParenClose,
});
void navigator.clipboard?.writeText(text).then(() => {
setCopied(true);
setTimeout(() => setCopied(false), 1500);