MCPcopy
hub / github.com/GitbookIO/gitbook / AIChatSubtitle

Function AIChatSubtitle

packages/gitbook/src/components/AIChat/AIChat.tsx:139–152  ·  view source on GitHub ↗
(props: {
    chat: AIChatState;
})

Source from the content-addressed store, hash-verified

137 * Subtitle of the AI chat window.
138 */
139export 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.

Callers

nothing calls this directly

Calls 2

useLanguageFunction · 0.90
tStringFunction · 0.50

Tested by

no test coverage detected