Repository navigation
feat(LLMsDocsGenerator): generate documentation per project - #1315
Conversation
Reviewer's GuideData structuresAdd per-project source-link metadata to component and service records so downstream document generation can distinguish recognized repositories from arbitrary projects.
APIReplace the root/core-only command options with a project selector and direct output-directory option for single-project generation.
ImplementationAdapt Roslyn analysis and document generation to discover components and services in one project, classify source paths, validate output names, and emit per-project indexes and type files.
ConfigurationUpdate the tool package project configuration for the 11.0.3 release and its package metadata.
DocumentationRewrite the English and Chinese usage guides to describe single-project invocation, output layout, analysis limitations, and validation steps.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit 8fd5d58 #1314 feat(LLMsDocsGenerator): generate documentation per project · 6 of 6 met
|
There was a problem hiding this comment.
Hey - I've found 13 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs" line_range="61" />
<code_context>
_sourcePath = sourcePath;
- _componentsPath = Path.Combine(sourcePath, "Components");
+ _singleProject = singleProject;
+ _componentsPath = singleProject ? sourcePath : Path.Combine(sourcePath, "Components");
+ _extensionRepository = singleProject
+ ? FindExtensionRepository(sourcePath) : null;
</code_context>
<issue_to_address>
**Non-components appear as components**
When the project contains a matching entry file whose class is not a component, `AnalyzeAllComponentsAsync` passes matching files to `AnalyzeEntryFile` without checking `IsComponentType`, and the `_singleProject` condition retains results even when they have no component parameters. The index and generated documents therefore list helper or base classes as components.
Filter analyzed entry-file types with `IsComponentType` before adding them to the component list.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:102`.
</issue_to_address>
### Comment 2
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs" line_range="61" />
<code_context>
_sourcePath = sourcePath;
- _componentsPath = Path.Combine(sourcePath, "Components");
+ _singleProject = singleProject;
+ _componentsPath = singleProject ? sourcePath : Path.Combine(sourcePath, "Components");
+ _extensionRepository = singleProject
+ ? FindExtensionRepository(sourcePath) : null;
</code_context>
<issue_to_address>
**Nested project APIs enter the docs**
When the selected project directory contains a nested test or auxiliary project with discoverable types, the project-wide recursive scans include nested-project sources, and `AnalyzeProjectServicesAsync` can also include their public services. The generated documentation therefore contains APIs that do not belong to the selected project.
Exclude nested project directories and their source files from compilation and analysis.
</issue_to_address>
### Comment 3
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="21" />
<code_context>
- throw new DirectoryNotFoundException($"Core source directory not found: {_sourcePath}");
+ throw new InvalidDataException($"Expected one project in {sourcePath}, found {projectFiles.Length}.");
}
+ var packageName = Path.GetFileNameWithoutExtension(projectFiles[0]);
+ Logger($"Source path: {sourcePath}");
</code_context>
<issue_to_address>
**Install command names wrong package**
When the project declares a `PackageId` different from its `.csproj` filename or is not published as a package, `GenerateAllAsync` derives `packageName` from the project filename, and `BuildIndexDoc` prints it as the NuGet package ID. The generated install command therefore names the wrong package or a package that is not published.
Use the declared `PackageId` for the install command and omit or otherwise handle the command when the project is not published as a package.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/MarkdownBuilder.cs:102`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:22`.
</issue_to_address>
### Comment 4
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="16" />
<code_context>
-
- if (!Directory.Exists(_sourcePath))
+ var sourcePath = GetSourcePath(project);
+ var projectFiles = Directory.GetFiles(sourcePath, "*.csproj");
+ if (projectFiles.Length != 1)
{
</code_context>
<issue_to_address>
**Selected project is rejected**
When `--project` names a `.csproj` in a directory containing another `.csproj`, `GetSourcePath` reduces the selection to its directory, then `GenerateAllAsync` requires that directory to contain exactly one project. The requested project is rejected instead of analyzed.
Preserve and analyze the explicitly selected `.csproj` rather than requiring its directory to contain exactly one project.
</issue_to_address>
### Comment 5
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="58" />
<code_context>
Logger($"Generated: {indexPath}");
- var componentsOutputPath = Path.Combine(_outputPath, "components");
+ var componentsOutputPath = Path.Combine(outputFolder, "components");
Directory.CreateDirectory(componentsOutputPath);
- foreach (var component in components)
</code_context>
<issue_to_address>
**Generated docs overwrite source files**
When the default output is used on a case-insensitive filesystem and the project has a `Components` directory, `componentsOutputPath` aliases the project's `Components` directory, so generated documentation is placed among authored sources; same-named `.txt` files can be overwritten, and stale-file cleanup can delete marked files there.
Ensure the default documentation output directory cannot alias the project's `Components` source directory.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:61`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:59`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:129`.
</issue_to_address>
### Comment 6
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="55" />
<code_context>
- await File.WriteAllTextAsync(indexPath, MarkdownBuilder.BuildIndexDoc(components, categories, services, extComponents, extServices, extPackages, "zh", coreOnly));
+ Directory.CreateDirectory(outputFolder);
+ var indexPath = Path.Combine(outputFolder, "llms.txt");
+ await File.WriteAllTextAsync(indexPath, MarkdownBuilder.BuildIndexDoc(components, categories, services, "zh", packageName));
Logger($"Generated: {indexPath}");
</code_context>
<issue_to_address>
**Concurrent runs leave broken output**
When two invocations targeting the same output directory overlap, each invocation writes its index and component files and then cleans stale files based on its own type set. One run can delete files written by the other, leaving an index with missing links or mixed documentation.
Serialize writes and stale-file cleanup for each output directory, or publish each complete run atomically.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:54`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:62`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:64`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:67`.
</issue_to_address>
### Comment 7
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="55" />
<code_context>
- await File.WriteAllTextAsync(indexPath, MarkdownBuilder.BuildIndexDoc(components, categories, services, extComponents, extServices, extPackages, "zh", coreOnly));
+ Directory.CreateDirectory(outputFolder);
+ var indexPath = Path.Combine(outputFolder, "llms.txt");
+ await File.WriteAllTextAsync(indexPath, MarkdownBuilder.BuildIndexDoc(components, categories, services, "zh", packageName));
Logger($"Generated: {indexPath}");
</code_context>
<issue_to_address>
**Interrupted writes leave inconsistent docs**
When the process stops or a file write fails after the index or some type files have been written, `GenerateAllAsync` writes the index before all component documents are complete, so an interrupted run leaves a new index alongside missing or old documents. Readers see an inconsistent documentation set.
Write the complete documentation set to a staging location and publish it only after all writes succeed.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:54`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:62`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:64`.
</issue_to_address>
### Comment 8
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="62" />
<code_context>
{
- var content = MarkdownBuilder.BuildComponentDoc(service, "zh");
- var filePath = Path.Combine(componentsOutputPath, $"{service.Name}.txt");
+ var content = MarkdownBuilder.BuildComponentDoc(type, "zh");
+ var filePath = Path.Combine(componentsOutputPath, $"{type.Name}.txt");
await File.WriteAllTextAsync(filePath, content);
</code_context>
<issue_to_address>
**Type pages show wrong library**
When the selected project is not BootstrapBlazor, `GenerateAllAsync` calls `BuildComponentDoc` without the target project name, and `BuildComponentDoc` uses the fixed `BootstrapBlazor` heading. Generated component and service pages therefore identify another project's APIs as BootstrapBlazor APIs.
Pass the target project identity to `BuildComponentDoc` and use it in the page heading.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:63`.
</issue_to_address>
### Comment 9
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs" line_range="723" />
<code_context>
BaseClass = GetBaseClassName(symbol),
SourcePath = GetRelativePath(filePath),
+ IsExtension = _singleProject && _extensionRepository != null,
+ SuppressSourceLink = _singleProject && _extensionRepository == null,
LastModified = File.GetLastWriteTimeUtc(filePath),
SamplePath = FindSamplePath(symbol.Name),
</code_context>
<issue_to_address>
**Core source links are omitted**
When generation targets the BootstrapBlazor core project, `SuppressSourceLink` is set whenever `_extensionRepository` is null, including for the core repository. The Markdown builder therefore omits source links from generated pages despite the available core GitHub raw URL.
Set `SuppressSourceLink` based on whether a source link is actually available, rather than whether an extensions repository was detected.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:298`.
</issue_to_address>
### Comment 10
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs" line_range="67" />
<code_context>
- Logger($"Generated {extComponents.Count + extServices.Count} extension files in {extOutputPath}");
- }
-
RemoveStaleDocuments(componentsOutputPath, components.Concat(services));
- RemoveStaleDocuments(Path.Combine(_outputPath, "extensions"), extComponents.Concat(extServices));
</code_context>
<issue_to_address>
**Old extension documents remain**
When the output directory contains generated extension documents from an earlier run, `RemoveStaleDocuments` cleans only `components/` and no longer removes marked files from `extensions/`. Those obsolete documents remain in the output tree after the index stops listing them.
Remove stale generated documents from the former `extensions/` output directory as well.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:160`.
</issue_to_address>
### Comment 11
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs" line_range="596" />
<code_context>
{
var content = await File.ReadAllTextAsync(razorFile);
+ if (_singleProject && (Path.GetFileName(razorFile).StartsWith('_') ||
+ content.Split('\n').Any(line => line.TrimStart().StartsWith("@page ", StringComparison.Ordinal))))
+ {
+ return null;
</code_context>
<issue_to_address>
**Routable pages enter component docs**
When a Razor page uses a tab between `@page` and its route, a valid Razor `@page` directive separated from its route by a tab does not match the literal `"@page "` check, so `BuildInheritsShimAsync` synthesizes a component for that page and the generator publishes it as a component.
Recognize Razor directive whitespace with a whitespace-aware check, or parse the directive using Razor syntax.
</issue_to_address>
### Comment 12
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs" line_range="595-598" />
<code_context>
private async Task<string?> BuildInheritsShimAsync(string razorFile)
{
var content = await File.ReadAllTextAsync(razorFile);
+ if (_singleProject && (Path.GetFileName(razorFile).StartsWith('_') ||
+ content.Split('\n').Any(line => line.TrimStart().StartsWith("@page ", StringComparison.Ordinal))))
+ {
+ return null;
+ }
</code_context>
<issue_to_address>
**Routed pages enter component index**
When a single-project input contains a routable `.razor` page with a `.razor.cs` code-behind file, the page's `.razor.cs` file is still selected as an entry file and `AnalyzeEntryFile` adds its type without checking whether the paired Razor file has `@page`. Routable pages with code-behind therefore appear as components in the generated index despite the new page exclusion.
Apply the `@page` exclusion to the paired Razor/code-behind entry before adding the type to the component list.
</issue_to_address>
### Comment 13
<location path="tools/BootstrapBlazor.LLMsDocsGenerator/README.md" line_range="94" />
<code_context>
-- Modal: https://www.blazor.zone/llms/components/Modal.txt
+```powershell
+dotnet build .\tools\BootstrapBlazor.LLMsDocsGenerator -c Release
+.\tools\BootstrapBlazor.LLMsDocsGenerator\tests\Verify-SingleProject.ps1
```
-
</code_context>
<issue_to_address>
**Validation command references absent script**
When A contributor follows the documented PowerShell validation steps from the repository root, the documented validation command invokes `tests\Verify-SingleProject.ps1`, but that script is not included in the tracked changes, so following the README instructions fails with a file-not-found error.
Include the referenced script in the PR or remove the command and describe only the validation steps available in the checkout.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/README.zh-CN.md:94`.
</issue_to_address>| _sourcePath = sourcePath; | ||
| _componentsPath = Path.Combine(sourcePath, "Components"); | ||
| _singleProject = singleProject; | ||
| _componentsPath = singleProject ? sourcePath : Path.Combine(sourcePath, "Components"); |
There was a problem hiding this comment.
🟠 High · Non-components appear as components
When the project contains a matching entry file whose class is not a component, AnalyzeAllComponentsAsync passes matching files to AnalyzeEntryFile without checking IsComponentType, and the _singleProject condition retains results even when they have no component parameters. The index and generated documents therefore list helper or base classes as components.
Filter analyzed entry-file types with IsComponentType before adding them to the component list.
Also at tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:102.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs` at line 61:
**Non-components appear as components**
When the project contains a matching entry file whose class is not a component, `AnalyzeAllComponentsAsync` passes matching files to `AnalyzeEntryFile` without checking `IsComponentType`, and the `_singleProject` condition retains results even when they have no component parameters. The index and generated documents therefore list helper or base classes as components.
Filter analyzed entry-file types with `IsComponentType` before adding them to the component list.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:102`.| _sourcePath = sourcePath; | ||
| _componentsPath = Path.Combine(sourcePath, "Components"); | ||
| _singleProject = singleProject; | ||
| _componentsPath = singleProject ? sourcePath : Path.Combine(sourcePath, "Components"); |
There was a problem hiding this comment.
🟡 Medium · Nested project APIs enter the docs
When the selected project directory contains a nested test or auxiliary project with discoverable types, the project-wide recursive scans include nested-project sources, and AnalyzeProjectServicesAsync can also include their public services. The generated documentation therefore contains APIs that do not belong to the selected project.
Exclude nested project directories and their source files from compilation and analysis.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs` at line 61:
**Nested project APIs enter the docs**
When the selected project directory contains a nested test or auxiliary project with discoverable types, the project-wide recursive scans include nested-project sources, and `AnalyzeProjectServicesAsync` can also include their public services. The generated documentation therefore contains APIs that do not belong to the selected project.
Exclude nested project directories and their source files from compilation and analysis.| throw new DirectoryNotFoundException($"Core source directory not found: {_sourcePath}"); | ||
| throw new InvalidDataException($"Expected one project in {sourcePath}, found {projectFiles.Length}."); | ||
| } | ||
| var packageName = Path.GetFileNameWithoutExtension(projectFiles[0]); |
There was a problem hiding this comment.
🟡 Medium · Install command names wrong package
When the project declares a PackageId different from its .csproj filename or is not published as a package, GenerateAllAsync derives packageName from the project filename, and BuildIndexDoc prints it as the NuGet package ID. The generated install command therefore names the wrong package or a package that is not published.
Use the declared PackageId for the install command and omit or otherwise handle the command when the project is not published as a package.
Also at tools/BootstrapBlazor.LLMsDocsGenerator/MarkdownBuilder.cs:102, tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:22.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs` at line 21:
**Install command names wrong package**
When the project declares a `PackageId` different from its `.csproj` filename or is not published as a package, `GenerateAllAsync` derives `packageName` from the project filename, and `BuildIndexDoc` prints it as the NuGet package ID. The generated install command therefore names the wrong package or a package that is not published.
Use the declared `PackageId` for the install command and omit or otherwise handle the command when the project is not published as a package.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/MarkdownBuilder.cs:102`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:22`.|
|
||
| if (!Directory.Exists(_sourcePath)) | ||
| var sourcePath = GetSourcePath(project); | ||
| var projectFiles = Directory.GetFiles(sourcePath, "*.csproj"); |
There was a problem hiding this comment.
🟡 Medium · Selected project is rejected
When --project names a .csproj in a directory containing another .csproj, GetSourcePath reduces the selection to its directory, then GenerateAllAsync requires that directory to contain exactly one project. The requested project is rejected instead of analyzed.
Preserve and analyze the explicitly selected .csproj rather than requiring its directory to contain exactly one project.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs` at line 16:
**Selected project is rejected**
When `--project` names a `.csproj` in a directory containing another `.csproj`, `GetSourcePath` reduces the selection to its directory, then `GenerateAllAsync` requires that directory to contain exactly one project. The requested project is rejected instead of analyzed.
Preserve and analyze the explicitly selected `.csproj` rather than requiring its directory to contain exactly one project.| Logger($"Generated: {indexPath}"); | ||
|
|
||
| var componentsOutputPath = Path.Combine(_outputPath, "components"); | ||
| var componentsOutputPath = Path.Combine(outputFolder, "components"); |
There was a problem hiding this comment.
🟡 Medium · Generated docs overwrite source files
When the default output is used on a case-insensitive filesystem and the project has a Components directory, componentsOutputPath aliases the project's Components directory, so generated documentation is placed among authored sources; same-named .txt files can be overwritten, and stale-file cleanup can delete marked files there.
Ensure the default documentation output directory cannot alias the project's Components source directory.
Also at tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:61, tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:59, tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:129.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs` at line 58:
**Generated docs overwrite source files**
When the default output is used on a case-insensitive filesystem and the project has a `Components` directory, `componentsOutputPath` aliases the project's `Components` directory, so generated documentation is placed among authored sources; same-named `.txt` files can be overwritten, and stale-file cleanup can delete marked files there.
Ensure the default documentation output directory cannot alias the project's `Components` source directory.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:61`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:59`, `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:129`.| BaseClass = GetBaseClassName(symbol), | ||
| SourcePath = GetRelativePath(filePath), | ||
| IsExtension = _singleProject && _extensionRepository != null, | ||
| SuppressSourceLink = _singleProject && _extensionRepository == null, |
There was a problem hiding this comment.
🟡 Medium · Core source links are omitted
When generation targets the BootstrapBlazor core project, SuppressSourceLink is set whenever _extensionRepository is null, including for the core repository. The Markdown builder therefore omits source links from generated pages despite the available core GitHub raw URL.
Set SuppressSourceLink based on whether a source link is actually available, rather than whether an extensions repository was detected.
Also at tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:298.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs` at line 723:
**Core source links are omitted**
When generation targets the BootstrapBlazor core project, `SuppressSourceLink` is set whenever `_extensionRepository` is null, including for the core repository. The Markdown builder therefore omits source links from generated pages despite the available core GitHub raw URL.
Set `SuppressSourceLink` based on whether a source link is actually available, rather than whether an extensions repository was detected.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs:298`.| Logger($"Generated {extComponents.Count + extServices.Count} extension files in {extOutputPath}"); | ||
| } | ||
|
|
||
| RemoveStaleDocuments(componentsOutputPath, components.Concat(services)); |
There was a problem hiding this comment.
🟡 Medium · Old extension documents remain
When the output directory contains generated extension documents from an earlier run, RemoveStaleDocuments cleans only components/ and no longer removes marked files from extensions/. Those obsolete documents remain in the output tree after the index stops listing them.
Remove stale generated documents from the former extensions/ output directory as well.
Also at tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:160.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs` at line 67:
**Old extension documents remain**
When the output directory contains generated extension documents from an earlier run, `RemoveStaleDocuments` cleans only `components/` and no longer removes marked files from `extensions/`. Those obsolete documents remain in the output tree after the index stops listing them.
Remove stale generated documents from the former `extensions/` output directory as well.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/DocsGenerator.cs:160`.| { | ||
| var content = await File.ReadAllTextAsync(razorFile); | ||
| if (_singleProject && (Path.GetFileName(razorFile).StartsWith('_') || | ||
| content.Split('\n').Any(line => line.TrimStart().StartsWith("@page ", StringComparison.Ordinal)))) |
There was a problem hiding this comment.
🟡 Medium · Routable pages enter component docs
When a Razor page uses a tab between @page and its route, a valid Razor @page directive separated from its route by a tab does not match the literal "@page " check, so BuildInheritsShimAsync synthesizes a component for that page and the generator publishes it as a component.
Recognize Razor directive whitespace with a whitespace-aware check, or parse the directive using Razor syntax.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs` at line 596:
**Routable pages enter component docs**
When a Razor page uses a tab between `@page` and its route, a valid Razor `@page` directive separated from its route by a tab does not match the literal `"@page "` check, so `BuildInheritsShimAsync` synthesizes a component for that page and the generator publishes it as a component.
Recognize Razor directive whitespace with a whitespace-aware check, or parse the directive using Razor syntax.| if (_singleProject && (Path.GetFileName(razorFile).StartsWith('_') || | ||
| content.Split('\n').Any(line => line.TrimStart().StartsWith("@page ", StringComparison.Ordinal)))) | ||
| { | ||
| return null; |
There was a problem hiding this comment.
🟡 Medium · Routed pages enter component index
When a single-project input contains a routable .razor page with a .razor.cs code-behind file, the page's .razor.cs file is still selected as an entry file and AnalyzeEntryFile adds its type without checking whether the paired Razor file has @page. Routable pages with code-behind therefore appear as components in the generated index despite the new page exclusion.
Apply the @page exclusion to the paired Razor/code-behind entry before adding the type to the component list.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/ComponentAnalyzer.cs` at lines 595-598:
**Routed pages enter component index**
When a single-project input contains a routable `.razor` page with a `.razor.cs` code-behind file, the page's `.razor.cs` file is still selected as an entry file and `AnalyzeEntryFile` adds its type without checking whether the paired Razor file has `@page`. Routable pages with code-behind therefore appear as components in the generated index despite the new page exclusion.
Apply the `@page` exclusion to the paired Razor/code-behind entry before adding the type to the component list.| - Modal: https://www.blazor.zone/llms/components/Modal.txt | ||
| ```powershell | ||
| dotnet build .\tools\BootstrapBlazor.LLMsDocsGenerator -c Release | ||
| .\tools\BootstrapBlazor.LLMsDocsGenerator\tests\Verify-SingleProject.ps1 |
There was a problem hiding this comment.
⚪ Low · Validation command references absent script
When A contributor follows the documented PowerShell validation steps from the repository root, the documented validation command invokes tests\Verify-SingleProject.ps1, but that script is not included in the tracked changes, so following the README instructions fails with a file-not-found error.
Include the referenced script in the PR or remove the command and describe only the validation steps available in the checkout.
Also at tools/BootstrapBlazor.LLMsDocsGenerator/README.zh-CN.md:94.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocsGenerator/README.md` at line 94:
**Validation command references absent script**
When A contributor follows the documented PowerShell validation steps from the repository root, the documented validation command invokes `tests\Verify-SingleProject.ps1`, but that script is not included in the tracked changes, so following the README instructions fails with a file-not-found error.
Include the referenced script in the PR or remove the command and describe only the validation steps available in the checkout.
Also at `tools/BootstrapBlazor.LLMsDocsGenerator/README.zh-CN.md:94`.
Link issues
fixes #1314
Summary By Copilot
Generate documentation for the current project or
--project, discover local components and services, and update the English and Chinese usage guides. Release 11.0.3 with Apache-2.0 license and README package metadata.Only the two existing branch commits are included; local uncommitted component packaging configurations and test scripts are excluded.
Regression?
Intentional CLI compatibility break from 11.0.2: remove
--root,--core-only, core-repository discovery, and website-wide generation. Callers must migrate to current-project generation or--project.Risk
Existing publishing commands must migrate. External base members, external service interfaces, and Razor
@codemembers may remain undocumented.Verification
Manual (required)
Automated
dotnet build .\tools\BootstrapBlazor.LLMsDocsGenerator -c Release --no-restore— passed; zero warnings and errors.dotnet pack .\tools\BootstrapBlazor.LLMsDocsGenerator -c Release --no-build --no-restore— passed; package created without missing-license or missing-readme warnings.No tracked integration tests are included in these commits; local uncommitted tests remain excluded.
Packaging changes reviewed?
☑️ Self Check before Merge
The branch is one unrelated EmbedPDF commit behind master; no merge or rebase was performed to preserve the current branch and uncommitted work.
Summary by Sourcery
Adopt single-project documentation generation with a simplified CLI and project-local source analysis.
New Features:
--project.Enhancements:
Build:
Documentation: