Commit 1195c7e
LLMs-code.txt (#2819)
* Add new docContet.js util
* Add new openLLM action
* Swap generic icon for ChatGPT with the official OpenAI logo from PhosphorIcons library
* Swap sparkle icon for Claude with a chat bubble icon, since sparkle is used for Kapa
* Add prompt localization for the top 10 most used languages
* Fix Claude incorrectly building translated prompt
* Better fix Claude handling of locales by adding dual English + localized prompt
* Ensure only Claude shows dual prompts
* Hide descriptions for Open with… buttons
* Update icon for Claude
* Fix icon position when no description provided
* Try to accomodate for both description and no desciption scenarii for icons placement
* Revert "Try to accomodate for both description and no desciption scenarii for icons placement"
This reverts commit cdb8d76.
* Simplify icons alignment fix
* Try to fix Claude's issue
* Fix query parameter for Claude
* Remove dual prompt in Claude now that we fixed the query param
* Refactor translation system and add many more locales
* Add aiPromptTemplates.js
* Add script for translated prompt validation
* Added many more languages
* Include Tldr components content in llms.txt
* WIP: Add draft of generate-llms-code.js to work on 3 sample files
* Improve language detection
* Improve formatting and language detection
* Improve generation
* Enhance file path and title logic
* Improve fenced code blocks detection and generation
* Handle dependencies "lazy loading"
* Improve metadata parsing
* Print out llms-code to stdout
* Improve file path and language detection further
* Handle more languages in a heuristic way
* Add normalizeOutputPath to better handle carelss mistakes and add support for powershell blocks
* Add support for anchors in sources
* Handle custom headings
* Add anchors tag to generation script in package.json
* Improve SQL block language inference
* Append empty strings to ensure we don't miss language blocks
* Better handle Docusaurus tabs detection
* Add additional scripts to handle file existence and project root
* Add validator script
* Add script to both generate and validate
* Add llms-code validator and all-docs discovery
Adds include/exclude filters and wires validation into dev/build.
* Add optional line numbers to llms-code output
Emits "Lines: start-end" when --line-numbers is used.
* Add section-level Description and Source lines
* Emit Language and File path per variant; remove extra example headers
* Normalize js/ts vs JavaScript/TypeScript in validator and don't treat missing local files as error unless check-files is enabled
* Relax default validator: skip file existence checks by default; add validate:llms-code:strict for CI
* Run generator with --all and propagate flags from CLI to generator config
* Recognize GraphQL/HTML/DOTENV/TEXT and alias sh→bash; normalize js/ts aliases in validator
* Avoid EISDIR during anchor verification by only accepting files (not directories) when resolving doc paths
* Downgrade missing anchor from error to warning during anchor verification
* Guard against incomplete fences: skip empty variants in generator and continue after unclosed fence in validator
* Relax severity: treat missing/unclosed code fences and empty sections as warnings to avoid false-negative failures on prose-only sections
* Strengthen section Description fallback and skip sections with no valid variants to avoid missing Description errors
* Limit --all discovery to cms/ and cloud/; exclude snippets and other directories
* Require Description only for sections with variants; suppress fence-related warnings for prose-only sections
* Do not require section Description; suppress anchor-not-found warnings for cleaner zero-warning runs
* Fix validator crash when section Description is omitted by guarding desc lookups
* Accept both '(Source: …)' and 'Source: …' formats in validator to handle section headers and example variants
* Make section Source optional: accept none, '(Source: …)' or 'Source: …)' and skip URL checks when absent
* Allow fence-first variants (no 'Language:' line) and soften non-absolute Source to warning when present
* Accept missing or legacy file path line per variant (treat as N/A) and only check existence when provided
* Add --verbose flag; collapse per-file 'no snippets' notices into a single summary line with count
* Add --log-file option to write skipped doc IDs; keep concise summary unless --verbose is used
* Auto-create skip log in verbose mode (static/llms-code-skip.log) and mention path; ignore log file in git
* Add llms:generate-verbose script to run generator with --verbose and point to skip log
* Add llms:generate-and-validate:verbose script (verbose generation + validation)
* Add concise docs for llms-code generator/validator, scripts, and flags
* Group llms scripts under scripts/llms and update npm scripts to use wrappers
* Use yarn script for LLMs generation in deploy workflow; target explicit files when checking and committing
* Generate & validate llms-code.txt in deploy workflow; include in change detection and commit alongside llms.txt and llms-full.txt
* Add 'View LLMs-code.txt' button in AI toolbar (navigate to /llms-code.txt)
* Restore proper .gitignore content
* Move llms-code button down
* llms-code: ensure generation writes to static by fixing docs dir discovery (auto-fallback to docusaurus/docs) and wire into dev/build scripts
* Delete docusaurus/docs/contributing/ai-toolbar-translations.md
* Delete docusaurus/docs/ai-toolbar-translations.md
* Delete docusaurus/scripts/validate-prompts.js
* Rename llms-code.md to README-llms-code.md
---------
Co-authored-by: Portal Code Bot <[email protected]>1 parent 55d8e4a commit 1195c7e
File tree
9 files changed
+1590
-8
lines changed- .github/workflows
- docusaurus
- scripts
- llms
- src/components/AiToolbar/config
9 files changed
+1590
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
51 | | - | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments