-
Notifications
You must be signed in to change notification settings - Fork 101
Makes needed updates to LLM file generation to integrate resolve_md #1374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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 pull request updates the AI resources documentation infrastructure by replacing the Python-based LLM file generation system with a new approach using the MkDocs resolve_md plugin. The changes include removing legacy scripts, workflows, and handlers, while introducing a new JavaScript-based UI for per-page LLM functionality and updating the AI resources table with new file formats.
Changes:
- Removed legacy Python scripts for LLM file generation and the associated GitHub workflow validation
- Added new JavaScript functionality for per-page copy-to-LLM operations with ChatGPT and Claude integration
- Updated AI resources table to reflect new file formats (JSON, JSONL, Markdown) and locations, with improved UI for view/copy/download actions
Reviewed changes
Copilot reviewed 9 out of 30 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/llms_config.json |
Removed legacy configuration file for Python-based LLM generation |
scripts/generate_llms_standard.py |
Removed legacy Python script for standard LLM file generation |
scripts/generate_llms_by_category.py |
Removed legacy Python script for category-based LLM file generation |
scripts/generate_llms.py |
Removed legacy main Python entry point for LLM generation |
llms.txt |
Removed legacy generated navigation index file |
js/clipboardCopyllms.js |
Removed old clipboard copy handler for full LLM resource |
.github/workflows/check-llms.yml |
Removed obsolete validation workflow for legacy txt format |
js/copy-to-llms.js |
Added new UI controller for per-page LLM operations with copy/download/view/ChatGPT/Claude functionality |
ai-resources/ai-resources.md |
Updated documentation table with new resource formats, file locations, and action buttons |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Copilot reviewed 9 out of 30 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Draft mode pending Rose deployment. Currently, the per-page widget renders on the Chinese site pages but, we don't have support for generating the needed files in Chinese in order to serve them to users. |
eshaben
left a comment
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.
I also think we should ignore index pages for Moonbeam, since those pages are primarily navigational and don’t provide meaningful content that would be useful to provide to LLMs.
| function getScopeUrl() { | ||
| try { | ||
| const scope = window.__md_scope; | ||
| if (scope instanceof URL) { | ||
| return scope; | ||
| } | ||
| return new URL('.', window.location); | ||
| } catch (error) { | ||
| return null; | ||
| } |
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.
This is reintroducing the window.__md_scope, which you know what I'm going to say haha...
I think you probably just copied this from wormhole, must have been a timing thing cause this was fixed in the polkadot changes. So this whole function and the whole stripBasePath functions aren't really necessary.
This is the last commit on the Polkadot repo before the toggle page changes and it doesn't have any of this: https://github.com/polkadot-developers/polkadot-docs/blob/c74677e2438c61ba30c96334b6c84fd964bb3268/js/copy-to-llm.js
Just wanted to flag this, but no need to fix it now since you'll be working on the plugin, it can be all addressed then.
| function initialize() { | ||
| addSectionCopyButtons(); | ||
| } |
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.
The 404 changes didn't get carried over. We should def add that
Goes with mkdocs PR: papermoonio/moonbeam-mkdocs#298
Description
Please explain the changes this PR addresses here.
Checklist
moonbeam-mkdocsto update redirectsTranslations
Does this PR update a page that also exists on the Chinese docs site? See mapping to confirm.
This pull request updates the AI resources documentation and related assets to improve clarity, add new AI resource formats, and clean up outdated code and workflows. The most significant changes include a major overhaul of the AI resource download table, addition of new JSON-based resource formats, and removal of obsolete scripts and CI validation.
Documentation and Resource Table Improvements:
ai-resources/ai-resources.mdhas been completely revamped for clarity and usability. It now features improved descriptions, new file formats (including JSON and JSONL), and enhanced download/copy/view actions for each resource.site-index.json) and full documentation content in JSONL (llms-full.jsonl), making it easier to consume documentation for AI and LLM applications.llms-full.jsonlfile instead of the oldllms-full.txt.Code and Workflow Cleanup:
js/clipboardCopyllms.jsscript, which previously handled copying the full LLM resource to the clipboard, as the new table provides built-in copy actions..github/workflows/check-llms.ymlworkflow, which validated the oldllms-full.txtformat, as it is now obsolete with the new resource formats.