diff --git a/frontend/web/src/components/chat.tsx b/frontend/web/src/components/chat.tsx index cc7a476..54384fb 100644 --- a/frontend/web/src/components/chat.tsx +++ b/frontend/web/src/components/chat.tsx @@ -120,11 +120,14 @@ function statusLabel(status: ToolStatus): string { * concrete client the message came from, e.g. "来自 web:chrome:a1b2c3". Rendered * only when a deviceId is present, so legacy/unlabelled messages stay clean. The * Web client defaults to this label; other clients decide themselves. */ -function SourceLabel({ deviceId }: { deviceId?: string }): React.ReactNode { +function SourceLabel({ deviceId, role }: { deviceId?: string; role?: string }): React.ReactNode { if (!deviceId) return null; + // A user message is received FROM a client; an assistant reply goes TO the + // client that prompted it. Semantic direction differs — "来自" vs "发送至". + const dir = role === "assistant" ? "发送至" : "来自"; return (