feat(react): add copy page for AI button#393
Merged
Conversation
|
@brendanjryan is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
56434ea to
68356da
Compare
Add CopyForAi client component that:
- Fetches page markdown from /assets/md/{pagePath}.md endpoint
- Copies content to clipboard for use with AI assistants
- Shows checkmark icon for 2s after successful copy
- Uses inline layout with clipboard icon matching Ask AI menu
- Pointer cursor on hover, default cursor when disabled
Visibility controlled by:
- mcp.enabled must be true (required, serves the markdown endpoint)
- mcp.copyForAi can be set to false to disable (defaults to true)
Integrate into Outline.tsx after Feedback widget.
68356da to
413b546
Compare
Author
commit: |
tmm
reviewed
Feb 9, 2026
| } | ||
| }, [router.path, state]) | ||
|
|
||
| if (frontmatter?.showAskAi === false) return null |
Member
There was a problem hiding this comment.
going to use showAskAi for now and we can break out into a separate property later if necessary
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a "Copy page for AI" button to the right sidebar (Outline component) that allows users to copy the current page's markdown content for use with AI assistants.
Changes
New component:
CopyForAi.client.tsx- A client component that:/assets/md/{pagePath}.mdendpoint from the llms.txt pipelineNew config option:
mcp.copyForAimcp.enabled: true(the MCP pipeline serves the markdown endpoint)mcp.copyForAi: falseto disable the button (defaults totrue)Updated:
Outline.tsx- Renders CopyForAi after the Feedback widget in the desktop sidebarUsage