fix(ai-chat): always show generic "AI is typing…" indicator

The typing indicator rendered "<role name> is typing…". Show a generic
"AI is typing…" instead and keep the role/identity name only in the
dimmed interlocutor label above the typing dots.

- typing line now always renders t("AI is typing…")
- add the "AI is typing…" key to en-US and ru-RU locales
- sync stale doc comments that referenced the old text

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
claude_code
2026-06-21 17:11:21 +03:00
parent 569da822b6
commit a86d0c7c3b
5 changed files with 9 additions and 5 deletions

View File

@@ -1147,6 +1147,7 @@
"Take a look at the current document": "Take a look at the current document",
"AI agent is typing…": "AI agent is typing…",
"{{name}} is typing…": "{{name}} is typing…",
"AI is typing…": "AI is typing…",
"Send": "Send",
"Stop": "Stop",
"Chat menu": "Chat menu",

View File

@@ -672,6 +672,7 @@
"Take a look at the current document": "Посмотри текущий документ",
"AI agent is typing…": "AI-агент печатает…",
"{{name}} is typing…": "{{name}} печатает…",
"AI is typing…": "AI печатает…",
"Agent role": "Роль агента",
"AI chat": "AI-чат",
"AI chat is disabled for this workspace.": "AI-чат отключён для этого рабочего пространства.",

View File

@@ -43,7 +43,7 @@ interface MessageListProps {
const BOTTOM_THRESHOLD = 40;
/**
* Whether to show the standalone "AI agent is typing…" indicator. It bridges the
* Whether to show the standalone "AI is typing…" indicator. It bridges the
* gap between sending and the first streamed content, so it shows only while a
* turn is in flight AND the latest assistant message has nothing visible yet:
* - the last message is still the user's (assistant hasn't started a row), or

View File

@@ -5,7 +5,7 @@ import { showTypingIndicator } from "@/features/ai-chat/components/message-list.
/**
* Pure-helper tests for the typing-indicator bridging logic that the internal
* chat and the public share widget now share. This is the behavior that decides
* whether the animated "AI agent is typing…" placeholder shows in the gap
* whether the animated "AI is typing…" placeholder shows in the gap
* between sending and the first streamed token.
*/
const msg = (

View File

@@ -19,8 +19,10 @@ interface TypingIndicatorProps {
* the real assistant message once content starts arriving.
*
* Mirrors the assistant row layout in MessageItem (the dimmed label), so it reads
* as the assistant's bubble taking shape. The label and typing line use the
* configured identity name when provided, otherwise the generic "AI agent".
* as the assistant's bubble taking shape. The dimmed label uses the configured
* identity name when provided (otherwise the generic "AI agent"), while the
* typing line is always the generic "AI is typing…" (it never includes the
* role/identity name).
*/
export default function TypingIndicator({ assistantName }: TypingIndicatorProps) {
const { t } = useTranslation();
@@ -38,7 +40,7 @@ export default function TypingIndicator({ assistantName }: TypingIndicatorProps)
<span />
</span>
<Text size="sm" c="dimmed">
{name ? t("{{name}} is typing…", { name }) : t("AI agent is typing…")}
{t("AI is typing…")}
</Text>
</Group>
</Box>