style: format code and apply clippy lint fixes (#941)

This commit is contained in:
Dex Miller
2026-02-06 16:02:57 +08:00
committed by GitHub
parent 92785a8078
commit 95bc0e38df
24 changed files with 135 additions and 127 deletions
+3 -6
View File
@@ -19,7 +19,7 @@ export const formatTimestamp = (value?: number) => {
export const formatRelativeTime = (
value: number | undefined,
t: (key: string, options?: Record<string, unknown>) => string
t: (key: string, options?: Record<string, unknown>) => string,
) => {
if (!value) return "";
const now = Date.now();
@@ -37,7 +37,7 @@ export const formatRelativeTime = (
export const getProviderLabel = (
providerId: string,
t: (key: string) => string
t: (key: string) => string,
) => {
const key = `apps.${providerId}`;
const translated = t(key);
@@ -60,10 +60,7 @@ export const getRoleTone = (role: string) => {
return "text-muted-foreground";
};
export const getRoleLabel = (
role: string,
t: (key: string) => string
) => {
export const getRoleLabel = (role: string, t: (key: string) => string) => {
const normalized = role.toLowerCase();
if (normalized === "assistant") return "AI";
if (normalized === "user") return t("sessionManager.roleUser");