Skip to content

Commit ca3b9ac

Browse files
authored
Improve AI Chat context popup (#3424)
1 parent e2afc07 commit ca3b9ac

File tree

11 files changed

+37
-11
lines changed

11 files changed

+37
-11
lines changed

.changeset/slow-roses-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Improve AI Chat context popup

packages/gitbook/src/components/AIChat/AIChatInput.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function AIChatInput(props: {
7272
<div className="absolute inset-x-0 bottom-0 flex items-center px-2 py-2">
7373
<Tooltip
7474
label={
75-
<div className="flex flex-col gap-2 p-2">
75+
<div className="flex flex-col gap-3 p-2">
7676
<p>{t(language, 'ai_chat_context_description')}</p>
7777
<ul className="flex flex-col gap-2">
7878
<li className="flex items-center gap-2">
@@ -88,12 +88,15 @@ export function AIChatInput(props: {
8888
{t(language, 'ai_chat_context_previous_messages')}
8989
</li>
9090
</ul>
91+
<p>{t(language, 'ai_chat_context_disclaimer')}</p>
9192
</div>
9293
}
9394
arrow
9495
>
9596
<div className="flex cursor-help items-center gap-1 circular-corners:rounded-2xl rounded-corners:rounded-md px-2 py-1 text-tint/7 text-xs transition-all hover:bg-tint">
96-
<Icon icon="glasses-round" className="size-3.5" />{' '}
97+
<span className="-ml-1 circular-corners:rounded-2xl rounded-corners:rounded-md bg-tint-11/7 px-1 py-0.5 font-mono font-semibold text-[0.65rem] text-contrast-tint-11 leading-none">
98+
AI
99+
</span>{' '}
97100
<span>{t(language, 'ai_chat_context_title')}</span>
98101
</div>
99102
</Tooltip>

packages/gitbook/src/intl/translations/de.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export const de = {
7373
ai_chat_clear_conversation: 'Unterhaltung löschen',
7474
ai_chat_thinking: 'Denke nach...',
7575
ai_chat_working: 'Arbeite...',
76+
ai_chat_context_badge: 'KI',
7677
ai_chat_context_title: 'Basierend auf Ihrem Kontext',
7778
ai_chat_context_description:
78-
'Der Docs-Assistent verwendet Ihren Kontext, um Antworten zu generieren und Aktionen durchzuführen.',
79+
'Der Docs-Assistent verwendet KI und Ihren Kontext, um Antworten zu generieren und Aktionen durchzuführen.',
7980
ai_chat_context_pages_youve_read: 'Seiten, die Sie gelesen haben',
8081
ai_chat_context_info_provided_by_the_site: 'Von der Website bereitgestellte Informationen',
8182
ai_chat_context_previous_messages: 'Vorherige Nachrichten',
83+
ai_chat_context_disclaimer: 'KI-Antworten können Fehler enthalten.',
8284
ai_chat_input_placeholder: 'Fragen, suchen oder Aktion ausführen...',
8385
send: 'Senden',
8486
ai_chat_suggested_questions_title: 'Vorgeschlagene Fragen',

packages/gitbook/src/intl/translations/en.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ export const en = {
7171
ai_chat_clear_conversation: 'Clear conversation',
7272
ai_chat_thinking: 'Thinking...',
7373
ai_chat_working: 'Working...',
74+
ai_chat_context_badge: 'AI',
7475
ai_chat_context_title: 'Based on your context',
7576
ai_chat_context_description:
76-
'Docs Assistant uses your context to generate answers and perform actions.',
77+
'Docs Assistant uses AI and your context to generate answers and perform actions.',
7778
ai_chat_context_pages_youve_read: "Pages you've read",
7879
ai_chat_context_info_provided_by_the_site: 'Info provided by the site',
7980
ai_chat_context_previous_messages: 'Previous messages',
81+
ai_chat_context_disclaimer: 'AI responses may contain mistakes.',
8082
ai_chat_input_placeholder: 'Ask, search, or take action...',
8183
send: 'Send',
8284
ai_chat_suggested_questions_title: 'Suggested questions',

packages/gitbook/src/intl/translations/es.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ export const es: TranslationLanguage = {
7575
ai_chat_clear_conversation: 'Limpiar conversación',
7676
ai_chat_thinking: 'Pensando...',
7777
ai_chat_working: 'Trabajando...',
78+
ai_chat_context_badge: 'IA',
7879
ai_chat_context_title: 'Basado en tu contexto',
7980
ai_chat_context_description:
80-
'El Asistente de Docs usa tu contexto para generar respuestas y realizar acciones.',
81+
'El Asistente de Docs usa IA y tu contexto para generar respuestas y realizar acciones.',
8182
ai_chat_context_pages_youve_read: 'Páginas que has leído',
8283
ai_chat_context_info_provided_by_the_site: 'Información proporcionada por el sitio',
8384
ai_chat_context_previous_messages: 'Mensajes anteriores',
85+
ai_chat_context_disclaimer: 'Las respuestas de IA pueden contener errores.',
8486
ai_chat_input_placeholder: 'Pregunta, busca o realiza una acción...',
8587
send: 'Enviar',
8688
ai_chat_suggested_questions_title: 'Preguntas sugeridas',

packages/gitbook/src/intl/translations/fr.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export const fr: TranslationLanguage = {
7373
ai_chat_clear_conversation: 'Effacer la conversation',
7474
ai_chat_thinking: 'Réfléchit...',
7575
ai_chat_working: 'Travaille...',
76+
ai_chat_context_badge: 'IA',
7677
ai_chat_context_title: 'Basé sur votre contexte',
7778
ai_chat_context_description:
78-
"L'Assistant Docs utilise votre contexte pour générer des réponses et effectuer des actions.",
79+
"L'Assistant Docs utilise l'IA et votre contexte pour générer des réponses et effectuer des actions.",
7980
ai_chat_context_pages_youve_read: 'Pages que vous avez lues',
8081
ai_chat_context_info_provided_by_the_site: 'Informations fournies par le site',
8182
ai_chat_context_previous_messages: 'Messages précédents',
83+
ai_chat_context_disclaimer: "Les réponses de l'IA peuvent contenir des erreurs.",
8284
ai_chat_input_placeholder: 'Demander, rechercher ou effectuer une action...',
8385
send: 'Envoyer',
8486
ai_chat_suggested_questions_title: 'Questions suggérées',

packages/gitbook/src/intl/translations/ja.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export const ja: TranslationLanguage = {
7373
ai_chat_clear_conversation: '会話をクリア',
7474
ai_chat_thinking: '考え中...',
7575
ai_chat_working: '作業中...',
76+
ai_chat_context_badge: 'AI',
7677
ai_chat_context_title: 'あなたのコンテキストに基づいて',
7778
ai_chat_context_description:
78-
'ドキュメントアシスタントはあなたのコンテキストを使用して回答を生成し、アクションを実行します。',
79+
'ドキュメントアシスタントはAIとあなたのコンテキストを使用して回答を生成し、アクションを実行します。',
7980
ai_chat_context_pages_youve_read: '読んだページ',
8081
ai_chat_context_info_provided_by_the_site: 'サイトから提供された情報',
8182
ai_chat_context_previous_messages: '以前のメッセージ',
83+
ai_chat_context_disclaimer: 'AIの回答には誤りが含まれる場合があります。',
8284
ai_chat_input_placeholder: '質問、検索、またはアクションを実行...',
8385
send: '送信',
8486
ai_chat_suggested_questions_title: 'おすすめの質問',

packages/gitbook/src/intl/translations/nl.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export const nl: TranslationLanguage = {
7373
ai_chat_clear_conversation: 'Gesprek wissen',
7474
ai_chat_thinking: 'Denkt na...',
7575
ai_chat_working: 'Werkt...',
76+
ai_chat_context_badge: 'AI',
7677
ai_chat_context_title: 'Gebaseerd op je context',
7778
ai_chat_context_description:
78-
'De Docs Assistent gebruikt je context om antwoorden te genereren en acties uit te voeren.',
79+
'De Docs Assistent gebruikt AI en je context om antwoorden te genereren en acties uit te voeren.',
7980
ai_chat_context_pages_youve_read: "Pagina's die je hebt gelezen",
8081
ai_chat_context_info_provided_by_the_site: 'Informatie verstrekt door de site',
8182
ai_chat_context_previous_messages: 'Vorige berichten',
83+
ai_chat_context_disclaimer: 'AI-antwoorden kunnen fouten bevatten.',
8284
ai_chat_input_placeholder: 'Vraag, zoek of voer een actie uit...',
8385
send: 'Versturen',
8486
ai_chat_suggested_questions_title: 'Voorgestelde vragen',

packages/gitbook/src/intl/translations/no.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export const no: TranslationLanguage = {
7373
ai_chat_clear_conversation: 'Tøm samtale',
7474
ai_chat_thinking: 'Tenker...',
7575
ai_chat_working: 'Arbeider...',
76+
ai_chat_context_badge: 'AI',
7677
ai_chat_context_title: 'Basert på din kontekst',
7778
ai_chat_context_description:
78-
'Docs-assistenten bruker din kontekst til å generere svar og utføre handlinger.',
79+
'Docs-assistenten bruker AI og din kontekst til å generere svar og utføre handlinger.',
7980
ai_chat_context_pages_youve_read: 'Sider du har lest',
8081
ai_chat_context_info_provided_by_the_site: 'Informasjon gitt av nettstedet',
8182
ai_chat_context_previous_messages: 'Tidligere meldinger',
83+
ai_chat_context_disclaimer: 'AI-svar kan inneholde feil.',
8284
ai_chat_input_placeholder: 'Spør, søk eller utfør en handling...',
8385
send: 'Send',
8486
ai_chat_suggested_questions_title: 'Foreslåtte spørsmål',

packages/gitbook/src/intl/translations/pt-br.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export const pt_br = {
7373
ai_chat_clear_conversation: 'Limpar conversa',
7474
ai_chat_thinking: 'Pensando...',
7575
ai_chat_working: 'Trabalhando...',
76+
ai_chat_context_badge: 'IA',
7677
ai_chat_context_title: 'Baseado no seu contexto',
7778
ai_chat_context_description:
78-
'O Assistente de Docs usa seu contexto para gerar respostas e realizar ações.',
79+
'O Assistente de Docs usa IA e seu contexto para gerar respostas e realizar ações.',
7980
ai_chat_context_pages_youve_read: 'Páginas que você leu',
8081
ai_chat_context_info_provided_by_the_site: 'Informações fornecidas pelo site',
8182
ai_chat_context_previous_messages: 'Mensagens anteriores',
83+
ai_chat_context_disclaimer: 'Respostas de IA podem conter erros.',
8284
ai_chat_input_placeholder: 'Pergunte, pesquise ou execute uma ação...',
8385
send: 'Enviar',
8486
ai_chat_suggested_questions_title: 'Perguntas sugeridas',

0 commit comments

Comments
 (0)