Skip to content

Commit 085e98e

Browse files
committed
feat: add Algolia Ask AI side-panel via DocSearch adapter
- Install @docsearch/docusaurus-adapter to access DocSearch v4.5+ features - Register the adapter as a plugin and migrate themeConfig.algolia to themeConfig.docsearch - Add askAi config with dedicated side-panel button (Cmd+I) and Agent Studio backend - Retrieve from the openchoreo-llm-md index for paragraph-level markdown content Refs: openchoreo/openchoreo#3194 Signed-off-by: Miraj Abeysekara <miraj@wso2.com>
1 parent 09c2347 commit 085e98e

3 files changed

Lines changed: 54 additions & 178 deletions

File tree

docusaurus.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const config: Config = {
4949
},
5050

5151
plugins: [
52+
'@docsearch/docusaurus-adapter',
5253
'./plugins/docusaurus-plugin-swagger-dark-mode',
5354
'./plugins/docusaurus-plugin-markdown-export',
5455
'./plugins/docusaurus-plugin-docs-scripts',
@@ -147,11 +148,21 @@ const config: Config = {
147148
'🎉️ OpenChoreo <a target="_blank" rel="noopener noreferrer" href="https://github.com/openchoreo/openchoreo/releases/tag/v1.0.0">v1.0.0</a> has been released! 🎉',
148149
isCloseable: true,
149150
},
150-
algolia: {
151+
docsearch: {
151152
appId: 'B8ST9KVWVJ',
152153
// Public API key: it is safe to commit it
153154
apiKey: '53ad1b2482e937fc0fa7b577236e6d1a',
154155
indexName: 'openchoreo',
156+
askAi: {
157+
assistantId: 'a5c29055-7164-4661-b4ac-8d5c28d4d593',
158+
// LLM-optimized index (paragraph-level markdown) used for Ask AI retrieval,
159+
// separate from the keyword-oriented DocSearch index above.
160+
indexName: 'openchoreo-llm-md',
161+
sidePanel: true,
162+
// Route chat through Agent Studio (the assistant above was created
163+
// under Generative AI → Agent Studio). Experimental per DocSearch docs.
164+
agentStudio: true,
165+
},
155166
},
156167
colorMode: {
157168
respectPrefersColorScheme: true,

package-lock.json

Lines changed: 41 additions & 177 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"format:check": "prettier --check \"docs/**/*.{md,mdx}\""
2020
},
2121
"dependencies": {
22+
"@docsearch/docusaurus-adapter": "^4.6.2",
2223
"@docusaurus/core": "^3.9.2",
2324
"@docusaurus/preset-classic": "^3.9.2",
2425
"@docusaurus/theme-mermaid": "^3.9.2",

0 commit comments

Comments
 (0)