fix(i18n): replace hardcoded Chinese strings in Session Manager

- Add i18n keys for relative time (justNow, minutesAgo, hoursAgo, daysAgo)
- Add i18n keys for role labels (roleUser, roleSystem, roleTool)
- Add i18n keys for UI elements (tocTitle, searchSessions, clickToCopyPath)
- Update formatRelativeTime and getRoleLabel to accept t function
- Add useTranslation hook to SessionToc component
This commit is contained in:
Jason
2026-02-02 12:15:05 +08:00
parent 68a0c304d8
commit d98183f3da
8 changed files with 58 additions and 19 deletions
@@ -59,7 +59,7 @@ export function SessionMessageItem({
</Tooltip>
<div className="flex items-center justify-between text-xs mb-1.5 pr-6">
<span className={cn("font-semibold", getRoleTone(message.role))}>
{getRoleLabel(message.role)}
{getRoleLabel(message.role, t)}
</span>
{message.ts && (
<span className="text-muted-foreground">