@@ -5,6 +5,7 @@ import { useAIChatState } from '@/components/AI/useAIChat';
55import { ChatGPTIcon } from '@/components/AIActions/assets/ChatGPTIcon' ;
66import { ClaudeIcon } from '@/components/AIActions/assets/ClaudeIcon' ;
77import { MarkdownIcon } from '@/components/AIActions/assets/MarkdownIcon' ;
8+ import { getAIChatName } from '@/components/AIChat' ;
89import AIChatIcon from '@/components/AIChat/AIChatIcon' ;
910import { Button } from '@/components/primitives/Button' ;
1011import { DropdownMenuItem } from '@/components/primitives/DropdownMenu' ;
@@ -21,23 +22,21 @@ type AIActionType = 'button' | 'dropdown-menu-item';
2122/**
2223 * Opens our AI Docs Assistant.
2324 */
24- export function OpenDocsAssistant ( props : { type : AIActionType } ) {
25- const { type } = props ;
25+ export function OpenDocsAssistant ( props : { type : AIActionType ; trademark : boolean } ) {
26+ const { type, trademark } = props ;
2627 const chatController = useAIChatController ( ) ;
2728 const chat = useAIChatState ( ) ;
2829 const language = useLanguage ( ) ;
2930
3031 return (
3132 < AIActionWrapper
3233 type = { type }
33- icon = { < AIChatIcon state = { chat . loading ? 'thinking' : 'default' } /> }
34- label = { tString ( language , 'ai_chat_ask' , tString ( language , 'ai_chat_assistant_name' ) ) }
34+ icon = {
35+ < AIChatIcon state = { chat . loading ? 'thinking' : 'default' } trademark = { trademark } />
36+ }
37+ label = { tString ( language , 'ai_chat_ask' , getAIChatName ( trademark ) ) }
3538 shortLabel = { tString ( language , 'ask' ) }
36- description = { tString (
37- language ,
38- 'ai_chat_ask_about_page' ,
39- tString ( language , 'ai_chat_assistant_name' )
40- ) }
39+ description = { tString ( language , 'ai_chat_ask_about_page' , getAIChatName ( trademark ) ) }
4140 disabled = { chat . loading }
4241 onClick = { ( ) => {
4342 // Open the chat if it's not already open
@@ -130,6 +129,7 @@ export function CopyMarkdown(props: {
130129 type = { type }
131130 icon = { copied ? 'check' : 'copy' }
132131 label = { copied ? tString ( language , 'code_copied' ) : tString ( language , 'copy_page' ) }
132+ shortLabel = { copied ? tString ( language , 'code_copied' ) : tString ( language , 'code_copy' ) }
133133 description = { tString ( language , 'copy_page_markdown' ) }
134134 onClick = { onClick }
135135 />
@@ -207,7 +207,7 @@ function AIActionWrapper(props: {
207207 return (
208208 < Button
209209 icon = { icon }
210- size = "small "
210+ size = "xsmall "
211211 variant = "secondary"
212212 label = { shortLabel || label }
213213 className = "hover:!scale-100 !shadow-none !rounded-r-none border-r-0 bg-tint-base text-sm"
0 commit comments