This repository was archived by the owner on Nov 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Add Ask AI buttons #617
Closed
Closed
Add Ask AI buttons #617
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
ChatPageButtonandAiSearchdropdowns 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 anappendToMarkdownFilehelper, and propagatesoutDirthroughout
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'; |
Copilot
AI
May 28, 2025
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.
Suggested change
| import {LLMS_FULL_TXT_FILENAME, LLMS_TXT_FILENAME, TITLE_TRUNCATE_LENGTH} from '../../constants'; | |
| import {LLMS_FULL_TXT_FILENAME, TITLE_TRUNCATE_LENGTH} from '../../constants'; |
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 |
Contributor
|
Should we merge this PR so that we can release the changes @gvdongen? I think this would be a good improvement. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.