(props: {
chat: AIChatState;
})
| 137 | * Subtitle of the AI chat window. |
| 138 | */ |
| 139 | export function AIChatSubtitle(props: { |
| 140 | chat: AIChatState; |
| 141 | }) { |
| 142 | const { chat } = props; |
| 143 | const language = useLanguage(); |
| 144 | |
| 145 | return ( |
| 146 | <EmbeddableFrameSubtitle className={chat.loading ? 'h-3 opacity-11' : 'h-0 opacity-0'}> |
| 147 | {chat.messages[chat.messages.length - 1]?.content |
| 148 | ? tString(language, 'ai_chat_working') |
| 149 | : tString(language, 'ai_chat_thinking')} |
| 150 | </EmbeddableFrameSubtitle> |
| 151 | ); |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Body of the AI chat window. |
nothing calls this directly
no test coverage detected