-
Notifications
You must be signed in to change notification settings - Fork 8
Add Ask AI buttons #617
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Add Ask AI buttons #617
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds AI/chat integrations and a “copy as Markdown” feature across the docs UI and updates the llms-txt plugin to generate a full Markdown bundle.
- Wraps the existing SearchBar and DocBreadcrumbs to inject AiSearch and ChatPageButton components
- Introduces
ChatPageButton
andAiSearch
dropdowns with ChatGPT, Claude, copy Markdown, and view-as-Markdown options - Enhances the llms-txt plugin to append full page content to
llms-full.txt
, adds anappendToMarkdownFile
helper, and propagatesoutDir
throughout
Reviewed Changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
src/theme/SearchBar/index.tsx | Wraps original SearchBar and adds an AI search button |
src/theme/DocBreadcrumbs/index.tsx | Appends ChatPageButton to breadcrumbs UI |
src/components/ChatPageButton/index.tsx | New dropdown component for chatting and copying Markdown |
src/components/AiSearch/index.tsx | New dropdown component for global AI queries |
plugins/docusaurus-plugin-llms-txt/src/pipeline/html/html-processor.ts | Imports and uses appendToMarkdownFile to build llms-full.txt |
plugins/docusaurus-plugin-llms-txt/src/pipeline/core/route-processor.ts | Adds outDir parameter to route processing functions |
plugins/docusaurus-plugin-llms-txt/src/index.ts | Passes outDir into plugin entry point |
plugins/docusaurus-plugin-llms-txt/src/fs/io/write.ts | Adds appendToMarkdownFile helper |
plugins/docusaurus-plugin-llms-txt/src/constants.ts | Declares LLMS_FULL_TXT_FILENAME constant |
plugins/docusaurus-plugin-llms-txt/src/cli/command.ts | Updates CLI to accept and forward outDir |
docusaurus.config.js | Excludes /adminapi/** from static files |
Files not reviewed (4)
- docs/overview.mdx: Language not supported
- package.json: Language not supported
- src/components/AiSearch/styles.module.css: Language not supported
- src/components/ChatPageButton/styles.module.css: Language not supported
import { saveMarkdownFile } from '../../fs/io/write'; | ||
import { TITLE_TRUNCATE_LENGTH } from '../../constants'; | ||
import {appendToMarkdownFile, saveMarkdownFile} from '../../fs/io/write'; | ||
import {LLMS_FULL_TXT_FILENAME, LLMS_TXT_FILENAME, TITLE_TRUNCATE_LENGTH} from '../../constants'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LLMS_TXT_FILENAME
is imported here but not used in this file; consider removing the unused import.
import {LLMS_FULL_TXT_FILENAME, LLMS_TXT_FILENAME, TITLE_TRUNCATE_LENGTH} from '../../constants'; | |
import {LLMS_FULL_TXT_FILENAME, TITLE_TRUNCATE_LENGTH} from '../../constants'; |
Copilot uses AI. Check for mistakes.
Deploying documentation with
|
Latest commit: |
2570606
|
Status: | ✅ Deploy successful! |
Preview URL: | https://5ddb4dbd.documentation-beg.pages.dev |
Branch Preview URL: | https://add-copy-llm-button.documentation-beg.pages.dev |
Should we merge this PR so that we can release the changes @gvdongen? I think this would be a good improvement. |
Uh oh!
There was an error while loading. Please reload this page.