From 761cb4494d06a04c71b05edc95b19fdae0e599bf Mon Sep 17 00:00:00 2001 From: Paul Jankowski <8BitTitan@gmail.com> Date: Wed, 26 Aug 2026 16:21:03 -0400 Subject: [PATCH] Translate the Algolia search docs updates --- docs/es/reference/default-theme-search.md | 32 +++++++++++---------- docs/fa/reference/default-theme-search.md | 32 +++++++++++---------- docs/ja/reference/default-theme-search.md | 32 +++++++++++---------- docs/ko/reference/default-theme-search.md | 32 +++++++++++---------- docs/pt/reference/default-theme-search.md | 32 +++++++++++---------- docs/ru/reference/default-theme-search.md | 32 +++++++++++---------- docs/zh/reference/default-theme-search.md | 34 ++++++++++++----------- 7 files changed, 120 insertions(+), 106 deletions(-) diff --git a/docs/es/reference/default-theme-search.md b/docs/es/reference/default-theme-search.md index 7d5a719d..281e02ea 100644 --- a/docs/es/reference/default-theme-search.md +++ b/docs/es/reference/default-theme-search.md @@ -198,7 +198,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -216,10 +216,14 @@ Puedes utilizar una configuración como esta para utilizar la búsqueda multilin -Consulta la [documentación oficial de Algolia](https://docsearch.algolia.com/docs/api#translations) para conocer más detalles. Para empezar rápidamente, también puedes copiar las traducciones usadas por este sitio desde [nuestro repositorio de GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). +Consulta la [documentación oficial de Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) para conocer más detalles. Para empezar rápidamente, también puedes copiar las traducciones usadas por este sitio desde [nuestro repositorio de GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). ### Algolia Ask AI Support {#ask-ai} +::: note Nota +A partir de `v5.0.0`, Ask AI ahora utiliza [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) de Algolia como backend. Hay disponible una [guía de migración](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) de Ask AI -> Agent Studio para facilitar la transición. +::: + Si deseas incluir **Ask AI**, pasa la opción `askAi` (o alguno de sus campos parciales) dentro de `options`: ```ts @@ -232,16 +236,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "TU-ID-DE-ASISTENTE" + indices: ['...'], + // askAi: "TU-ID-DE-AGENTE" // O askAi: { - // como mínimo debes proporcionar el assistantId que recibiste de Algolia - assistantId: 'XXXYYY', - // anulaciones opcionales — si se omiten, se reutilizan los valores appId/apiKey/indexName de nivel superior + // como mínimo debes proporcionar el agentId que recibiste de Algolia + agentId: 'XXXYYY', + // anulaciones opcionales — si se omiten, se reutilizan los valores appId/apiKey de nivel superior // apiKey: '...', // appId: '...', - // indexName: '...' } } } @@ -255,7 +258,7 @@ Si prefieres solo la búsqueda por palabra clave y no la Ask AI, simplemente omi ### Panel lateral de Ask AI {#ask-ai-side-panel} -DocSearch v4.5+ admite un **panel lateral de Ask AI** opcional. Cuando está habilitado, se puede abrir con **Ctrl/Cmd+I** por defecto. La [Referencia de API del Panel Lateral](https://docsearch.algolia.com/docs/sidepanel/api-reference) contiene la lista completa de opciones. +DocSearch v4.5+ admite un **panel lateral de Ask AI** opcional. Cuando está habilitado, se puede abrir con **Ctrl/Cmd+I** por defecto. La [Referencia de API del Panel Lateral](https://docsearch.algolia.com/docs/packages/sidepanel/api) contiene la lista completa de opciones. ```ts import { defineConfig } from 'vitepress' @@ -267,9 +270,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { // Refleja la API de @docsearch/sidepanel-js SidepanelProps panel: { @@ -299,9 +302,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -337,10 +340,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } } diff --git a/docs/fa/reference/default-theme-search.md b/docs/fa/reference/default-theme-search.md index 0ef6902e..9cd0783a 100644 --- a/docs/fa/reference/default-theme-search.md +++ b/docs/fa/reference/default-theme-search.md @@ -198,7 +198,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -216,10 +216,14 @@ export default defineConfig({ -برای اطلاعات بیشتر به [مستندات رسمی Algolia](https://docsearch.algolia.com/docs/api#translations) مراجعه کنید. برای شروع سریع‌تر، می‌توانید ترجمه‌های استفاده‌شده در این سایت را از [مخزن GitHub ما](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code) کپی کنید. +برای اطلاعات بیشتر به [مستندات رسمی Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) مراجعه کنید. برای شروع سریع‌تر، می‌توانید ترجمه‌های استفاده‌شده در این سایت را از [مخزن GitHub ما](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code) کپی کنید. ### پشتیبانی Algolia Ask AI {#ask-ai} +::: note نکته +از نسخه `v5.0.0`، Ask AI اکنون از [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) شرکت Algolia به‌عنوان بک‌اند خود استفاده می‌کند. برای تسهیل این انتقال، [راهنمای مهاجرت Ask AI به Agent Studio](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) در دسترس است. +::: + برای فعال‌سازی **Ask AI** کافی است گزینه `askAi` را اضافه کنید: ```ts @@ -232,16 +236,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "شناسه-دستیار-شما" + indices: ['...'], + // askAi: "شناسه-عامل-شما" // یا askAi: { - // حداقل باید assistantId دریافت شده از Algolia را ارائه کنید - assistantId: 'XXXYYY', - // بازنویسی های اختیاری — اگر حذف شوند، مقادیر appId/apiKey/indexName سطح بالا دوباره استفاده می شوند + // حداقل باید agentId دریافت شده از Algolia را ارائه کنید + agentId: 'XXXYYY', + // بازنویسی های اختیاری — اگر حذف شوند، مقادیر appId/apiKey سطح بالا دوباره استفاده می شوند // apiKey: '...', // appId: '...', - // indexName: '...' } } } @@ -255,7 +258,7 @@ export default defineConfig({ ### پنل کناری Ask AI {#ask-ai-side-panel} -DocSearch v4.5+ از **پنل کناری Ask AI** اختیاری پشتیبانی می‌کند. وقتی فعال باشد، به طور پیش‌فرض می‌توان آن را با **Ctrl/Cmd+I** باز کرد. [مرجع API پنل کناری](https://docsearch.algolia.com/docs/sidepanel/api-reference) شامل لیست کامل گزینه‌ها است. +DocSearch v4.5+ از **پنل کناری Ask AI** اختیاری پشتیبانی می‌کند. وقتی فعال باشد، به طور پیش‌فرض می‌توان آن را با **Ctrl/Cmd+I** باز کرد. [مرجع API پنل کناری](https://docsearch.algolia.com/docs/packages/sidepanel/api) شامل لیست کامل گزینه‌ها است. ```ts import { defineConfig } from 'vitepress' @@ -267,9 +270,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { // آینه API @docsearch/sidepanel-js SidepanelProps panel: { @@ -299,9 +302,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -337,10 +340,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } } diff --git a/docs/ja/reference/default-theme-search.md b/docs/ja/reference/default-theme-search.md index 4e6150b2..1890d8b0 100644 --- a/docs/ja/reference/default-theme-search.md +++ b/docs/ja/reference/default-theme-search.md @@ -204,7 +204,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -222,10 +222,14 @@ export default defineConfig({ -詳しくは[公式 Algolia ドキュメント](https://docsearch.algolia.com/docs/api#translations)を参照してください。すぐに始めるには、このサイトで使っている翻訳を[GitHub リポジトリ](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)からコピーすることもできます。 +詳しくは[公式 Algolia ドキュメント](https://docsearch.algolia.com/docs/packages/react/api-reference#translations)を参照してください。すぐに始めるには、このサイトで使っている翻訳を[GitHub リポジトリ](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)からコピーすることもできます。 ### Algolia Ask AI のサポート {#ask-ai} +::: note 注意 +`v5.0.0` 以降、Ask AI のバックエンドは Algolia の [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) に移行しました。移行に役立つ Ask AI から Agent Studio への[移行ガイド](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio)も利用できます。 +::: + **Ask AI** を有効にするには、`options` 内に `askAi` オプション(またはその一部)を指定します。 ```ts @@ -238,16 +242,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "あなたのアシスタントID" + indices: ['...'], + // askAi: "あなたのエージェントID" // または askAi: { - // 最低限、Algolia から受け取った assistantId を指定する必要があります - assistantId: 'XXXYYY', - // 任意の上書き — 省略した場合は上位の appId/apiKey/indexName を再利用 + // 最低限、Algolia から受け取った agentId を指定する必要があります + agentId: 'XXXYYY', + // 任意の上書き — 省略した場合は上位の appId/apiKey の値を再利用 // apiKey: '...', // appId: '...', - // indexName: '...' } } } @@ -261,7 +264,7 @@ export default defineConfig({ ### Ask AI サイドパネル {#ask-ai-side-panel} -DocSearch v4.5+ はオプションの **Ask AI サイドパネル**をサポートしています。有効にすると、デフォルトで **Ctrl/Cmd+I** で開くことができます。[サイドパネル API リファレンス](https://docsearch.algolia.com/docs/sidepanel/api-reference)にオプションの完全なリストがあります。 +DocSearch v4.5+ はオプションの **Ask AI サイドパネル**をサポートしています。有効にすると、デフォルトで **Ctrl/Cmd+I** で開くことができます。[サイドパネル API リファレンス](https://docsearch.algolia.com/docs/packages/sidepanel/api)にオプションの完全なリストがあります。 ```ts import { defineConfig } from 'vitepress' @@ -273,9 +276,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { // @docsearch/sidepanel-js SidepanelProps API をミラー panel: { @@ -305,9 +308,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -343,10 +346,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } } diff --git a/docs/ko/reference/default-theme-search.md b/docs/ko/reference/default-theme-search.md index a65f1a6a..86bedd10 100644 --- a/docs/ko/reference/default-theme-search.md +++ b/docs/ko/reference/default-theme-search.md @@ -198,7 +198,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -216,10 +216,14 @@ export default defineConfig({ -자세한 내용은 [공식 Algolia 문서](https://docsearch.algolia.com/docs/api#translations)를 참고하세요. 빠르게 시작하려면 이 사이트에서 사용하는 번역을 [GitHub 저장소](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)에서 복사할 수도 있습니다. +자세한 내용은 [공식 Algolia 문서](https://docsearch.algolia.com/docs/packages/react/api-reference#translations)를 참고하세요. 빠르게 시작하려면 이 사이트에서 사용하는 번역을 [GitHub 저장소](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)에서 복사할 수도 있습니다. ### Algolia Ask AI 지원 {#ask-ai} +::: note 참고 +`v5.0.0`부터 Ask AI는 백엔드로 Algolia의 [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart)를 사용합니다. 전환에 도움이 되는 Ask AI -> Agent Studio [마이그레이션 가이드](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio)도 제공됩니다. +::: + **Ask AI** 기능을 사용하려면 `askAi` 옵션을 추가하세요: ```ts @@ -232,16 +236,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "내-어시스턴트-ID" + indices: ['...'], + // askAi: "내-에이전트-ID" // 또는 askAi: { - // 최소한 Algolia에서 받은 assistantId를 제공해야 합니다 - assistantId: 'XXXYYY', - // 선택적 재정의 — 생략하면 상위 appId/apiKey/indexName 값이 재사용됩니다 + // 최소한 Algolia에서 받은 agentId를 제공해야 합니다 + agentId: 'XXXYYY', + // 선택적 재정의 — 생략하면 상위 appId/apiKey 값이 재사용됩니다 // apiKey: '...', // appId: '...', - // indexName: '...' } } } @@ -255,7 +258,7 @@ Ask AI를 사용하지 않으려면 `askAi` 옵션을 생략하면 됩니다. ### Ask AI 사이드 패널 {#ask-ai-side-panel} -DocSearch v4.5+는 선택적 **Ask AI 사이드 패널**을 지원합니다. 활성화되면 기본적으로 **Ctrl/Cmd+I**로 열 수 있습니다. [사이드 패널 API 참조](https://docsearch.algolia.com/docs/sidepanel/api-reference)에 전체 옵션 목록이 있습니다. +DocSearch v4.5+는 선택적 **Ask AI 사이드 패널**을 지원합니다. 활성화되면 기본적으로 **Ctrl/Cmd+I**로 열 수 있습니다. [사이드 패널 API 참조](https://docsearch.algolia.com/docs/packages/sidepanel/api)에 전체 옵션 목록이 있습니다. ```ts import { defineConfig } from 'vitepress' @@ -267,9 +270,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { // @docsearch/sidepanel-js SidepanelProps API 반영 panel: { @@ -299,9 +302,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -337,10 +340,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } } diff --git a/docs/pt/reference/default-theme-search.md b/docs/pt/reference/default-theme-search.md index 69beec9d..91637b67 100644 --- a/docs/pt/reference/default-theme-search.md +++ b/docs/pt/reference/default-theme-search.md @@ -198,7 +198,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -216,10 +216,14 @@ Você pode usar uma configuração como esta para usar a pesquisa multilínguas: -Consulte a [documentação oficial da Algolia](https://docsearch.algolia.com/docs/api#translations) para saber mais. Para começar rapidamente, você também pode copiar as traduções usadas por este site do [nosso repositório no GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). +Consulte a [documentação oficial da Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) para saber mais. Para começar rapidamente, você também pode copiar as traduções usadas por este site do [nosso repositório no GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). ### Suporte ao Algolia Ask AI {#ask-ai} +::: note Nota +A partir da versão `v5.0.0`, o Ask AI passou a usar o [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) da Algolia como backend. Um [guia de migração](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) do Ask AI para o Agent Studio está disponível para ajudar na transição. +::: + Se quiser incluir o **Ask AI**, adicione `askAi` em `options`: ```ts @@ -232,16 +236,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "SEU-ID-DO-ASSISTENTE" + indices: ['...'], + // askAi: "SEU-ID-DO-AGENTE" // OU askAi: { - // no mínimo, você deve fornecer o assistantId recebido da Algolia - assistantId: 'XXXYYY', - // substituições opcionais — se omitidas, os valores appId/apiKey/indexName de nível superior são reutilizados + // no mínimo, você deve fornecer o agentId recebido da Algolia + agentId: 'XXXYYY', + // substituições opcionais — se omitidas, os valores appId/apiKey de nível superior são reutilizados // apiKey: '...', // appId: '...', - // indexName: '...' } } } @@ -255,7 +258,7 @@ Caso queira apenas a pesquisa por palavra-chave, omita `askAi`. ### Painel Lateral do Ask AI {#ask-ai-side-panel} -O DocSearch v4.5+ suporta um **painel lateral do Ask AI** opcional. Quando habilitado, pode ser aberto com **Ctrl/Cmd+I** por padrão. A [Referência da API do Painel Lateral](https://docsearch.algolia.com/docs/sidepanel/api-reference) contém a lista completa de opções. +O DocSearch v4.5+ suporta um **painel lateral do Ask AI** opcional. Quando habilitado, pode ser aberto com **Ctrl/Cmd+I** por padrão. A [Referência da API do Painel Lateral](https://docsearch.algolia.com/docs/packages/sidepanel/api) contém a lista completa de opções. ```ts import { defineConfig } from 'vitepress' @@ -267,9 +270,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { // Espelha a API do @docsearch/sidepanel-js SidepanelProps panel: { @@ -299,9 +302,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -337,10 +340,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } } diff --git a/docs/ru/reference/default-theme-search.md b/docs/ru/reference/default-theme-search.md index f40721a6..b22d383c 100644 --- a/docs/ru/reference/default-theme-search.md +++ b/docs/ru/reference/default-theme-search.md @@ -204,7 +204,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -222,10 +222,14 @@ export default defineConfig({ -Подробности см. в [официальной документации Algolia](https://docsearch.algolia.com/docs/api#translations). Чтобы быстрее начать, можно также скопировать переводы, используемые на этом сайте, из [нашего репозитория GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). +Подробности см. в [официальной документации Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations). Чтобы быстрее начать, можно также скопировать переводы, используемые на этом сайте, из [нашего репозитория GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). ### Поддержка Ask AI в Algolia {#ask-ai} +::: note Примечание +Начиная с `v5.0.0`, Ask AI использует [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) от Algolia в качестве серверной части. Для упрощения перехода доступно [руководство по миграции](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) с Ask AI на Agent Studio. +::: + Если вы хотите добавить функцию **Ask AI**, передайте параметр `askAi` (или любые из его отдельных полей) внутри объекта `options`: ```ts @@ -238,16 +242,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "ВАШ-ID-АССИСТЕНТА" + indices: ['...'], + // askAi: "ВАШ-ID-АГЕНТА" // ИЛИ askAi: { - // как минимум нужно указать assistantId, полученный от Algolia - assistantId: 'XXXYYY', - // необязательные переопределения — если их нет, используются значения appId/apiKey/indexName верхнего уровня + // как минимум нужно указать agentId, полученный от Algolia + agentId: 'XXXYYY', + // необязательные переопределения — если их нет, используются значения appId/apiKey верхнего уровня // apiKey: '...', // appId: '...', - // indexName: '...' } } } @@ -261,7 +264,7 @@ export default defineConfig({ ### Боковая панель Ask AI {#ask-ai-side-panel} -DocSearch v4.5+ поддерживает опциональную **боковую панель Ask AI**. Когда она включена, её можно открыть с помощью **Ctrl/Cmd+I** по умолчанию. [Справочник API боковой панели](https://docsearch.algolia.com/docs/sidepanel/api-reference) содержит полный список опций. +DocSearch v4.5+ поддерживает опциональную **боковую панель Ask AI**. Когда она включена, её можно открыть с помощью **Ctrl/Cmd+I** по умолчанию. [Справочник API боковой панели](https://docsearch.algolia.com/docs/packages/sidepanel/api) содержит полный список опций. ```ts import { defineConfig } from 'vitepress' @@ -273,9 +276,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { panel: { variant: 'floating', // или 'inline' @@ -306,9 +309,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -344,10 +347,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } } diff --git a/docs/zh/reference/default-theme-search.md b/docs/zh/reference/default-theme-search.md index 859a2a23..d59d7cf3 100644 --- a/docs/zh/reference/default-theme-search.md +++ b/docs/zh/reference/default-theme-search.md @@ -198,7 +198,7 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...' + indices: ['...'] } } } @@ -216,10 +216,14 @@ export default defineConfig({ -更多信息请参考[官方 Algolia 文档](https://docsearch.algolia.com/docs/api#translations)。想要快速开始,你也可以从[我们的 GitHub 仓库](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)复制此站点使用的翻译。 +更多信息请参考[官方 Algolia 文档](https://docsearch.algolia.com/docs/packages/react/api-reference#translations)。想要快速开始,你也可以从[我们的 GitHub 仓库](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)复制此站点使用的翻译。 ### Algolia Ask AI 支持 {#ask-ai} +::: note 注意 +从 `v5.0.0` 起,Ask AI 已改用 Algolia 的 [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) 作为后端。可参考 Ask AI -> Agent Studio [迁移指南](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio),以帮助完成迁移。 +::: + 如果需要启用 **Ask AI**,只需在 `options` 中添加 `askAi`: ```ts @@ -232,16 +236,15 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', - // askAi: "你的助手ID" + indices: ['...'], + // askAi: "你的智能体ID" // 或 askAi: { - // 至少需要提供从 Algolia 获取的 assistantId - assistantId: 'XXXYYY', - // 可选覆盖 — 若省略,将复用顶层 appId/apiKey/indexName 的值 + // 至少需要提供从 Algolia 获取的 agentId + agentId: 'XXXYYY', + // 可选覆盖 — 若省略,将复用顶层 appId/apiKey 的值 // apiKey: '...', - // appId: '...', - // indexName: '...' + // appId: '...' } } } @@ -255,7 +258,7 @@ export default defineConfig({ ### Ask AI 侧边栏 {#ask-ai-side-panel} -DocSearch v4.5+ 支持可选的 **Ask AI 侧边栏**。启用后,默认可通过 **Ctrl/Cmd+I** 打开。完整的选项列表请参阅[侧边栏 API 参考](https://docsearch.algolia.com/docs/sidepanel/api-reference)。 +DocSearch v4.5+ 支持可选的 **Ask AI 侧边栏**。启用后,默认可通过 **Ctrl/Cmd+I** 打开。完整的选项列表请参阅[侧边栏 API 参考](https://docsearch.algolia.com/docs/packages/sidepanel/api)。 ```ts import { defineConfig } from 'vitepress' @@ -267,9 +270,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { // 镜像 @docsearch/sidepanel-js SidepanelProps API panel: { @@ -299,9 +302,9 @@ export default defineConfig({ options: { appId: '...', apiKey: '...', - indexName: '...', + indices: ['...'], askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', sidePanel: { keyboardShortcuts: { 'Ctrl/Cmd+I': false @@ -337,10 +340,9 @@ export default defineConfig({ options: { mode: 'sidePanel', askAi: { - assistantId: 'XXXYYY', + agentId: 'XXXYYY', appId: '...', apiKey: '...', - indexName: '...', sidePanel: true } }