Skip to content

Add comprehensive documentation for GeneralUpdate.Extension plugin management system#19

Merged
JusterZhu merged 5 commits intomainfrom
copilot/write-online-help-documentation
Feb 9, 2026
Merged

Add comprehensive documentation for GeneralUpdate.Extension plugin management system#19
JusterZhu merged 5 commits intomainfrom
copilot/write-online-help-documentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Documentation for GeneralUpdate.Extension - a VS Code-inspired extension/plugin management system for .NET applications. Based on the actual component source code at https://github.com/GeneralLibrary/GeneralUpdate/tree/master/src/c%23/GeneralUpdate.Extension.

Changes

  • Created bilingual documentation (Chinese/English) following existing i18n structure:

    • /website/docs/doc/GeneralUpdate.Extension.md (Chinese)
    • /website/i18n/en/docusaurus-plugin-content-docs/current/docs/doc/GeneralUpdate.Extension.md (English)
    • /website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Extension.md (Chinese Simplified)
  • Content coverage (750+ lines each):

    • Extension Host initialization and configuration
    • Extension Catalog management (local JSON storage)
    • Querying extensions from remote server
    • Installing and updating extensions
    • Version compatibility checking system
    • Multi-platform support (Windows/Linux/macOS)
    • Automatic dependency resolution (transitive, circular detection)
    • Rollback mechanism for safe installation
    • Download queue with concurrent downloads
    • Auto-update settings (per-extension and global)
    • Server API requirements
    • 15+ code examples including complete production example
    • Best practices and troubleshooting
  • Fixed MDX compilation: Escaped generic types (Task<bool>, List<VersionInfo>) to prevent HTML tag parsing errors

Example Usage

// Initialize extension host
var options = new ExtensionHostOptions
{
    ServerUrl = "https://extensions.example.com/api",
    BearerToken = "your-bearer-token",
    HostVersion = "1.0.0",
    ExtensionsDirectory = "./extensions"
};

var host = new GeneralExtensionHost(options);

// Subscribe to update events
host.ExtensionUpdateStatusChanged += (sender, e) =>
{
    Console.WriteLine($"Extension: {e.ExtensionName}");
    Console.WriteLine($"Status: {e.Status}");
    Console.WriteLine($"Progress: {e.Progress}%");
};

// Query available extensions
var query = new ExtensionQueryDTO
{
    Platform = TargetPlatform.Windows,
    HostVersion = "1.0.0",
    PageNumber = 1,
    PageSize = 20
};

var result = await host.QueryExtensionsAsync(query);

// Update extension
bool success = await host.UpdateExtensionAsync("extension-guid");

Documentation follows existing component patterns and is beginner-focused with detailed explanations and practical examples for implementing plugin/extension systems in .NET applications.

Original prompt

This section details on the original issue you should resolve

<issue_title>GeneralUpdate.Extension Online Help Documentation Development</issue_title>
<issue_description>Please write online help documentation for GeneralUpdate.Extension. The documentation will be deployed on an online documentation site built with Docusaurus (repository address: https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/website). Strictly follow the requirements below:
Documentation Language:Write both Chinese and English versions simultaneously, adapting to the existing i18n multilingual directory structure in the repository.
Style & Formatting:Fully imitate the existing layout, content structure, and writing style of help documentation for other components in this repository.
Target Audience:For absolute beginners using this component for the first time. Content must be logically ordered, with detailed steps and easy-to-understand explanations, avoiding excessive technical jargon. Add notes / explanations where necessary.
Content Requirements:Cover core modules essential for first-time use (e.g., Quick Start, Environment Preparation, Installation & Configuration, Basic Usage Examples, Core Function Introduction, Troubleshooting for Common Issues, etc.), ensuring completeness and high practicality.
Format Specification:Comply with Docusaurus documentation writing standards, adapt to the existing file organization of the docs directory in the repository, and be ready to be directly synced to the repository.</issue_description>

<agent_instructions>Please fully understand the context of the code in the issue and website folders.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@JusterZhu
Copy link
Collaborator

@copilot Additional note: The code repository address for GeneralUpdate.Extension is as follows. https://github.com/GeneralLibrary/GeneralUpdate/tree/master/src/c%23/GeneralUpdate.Extension

Copilot AI and others added 2 commits February 9, 2026 11:02
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add online help documentation for GeneralUpdate.Extension Add comprehensive documentation for GeneralUpdate.Extension extensibility framework Feb 9, 2026
Copilot AI requested a review from JusterZhu February 9, 2026 11:10
…tension management system

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 9, 2026

@copilot Additional note: The code repository address for GeneralUpdate.Extension is as follows. https://github.com/GeneralLibrary/GeneralUpdate/tree/master/src/c%23/GeneralUpdate.Extension

Thank you for the clarification! I've completely rewritten the documentation based on the actual GeneralUpdate.Extension source code from the repository you provided.

The new documentation now accurately covers the VS Code-inspired extension management system, including:

  • Extension Host initialization and configuration
  • Querying and installing extensions from remote server
  • Local extension catalog management
  • Version compatibility and platform support
  • Dependency resolution and rollback mechanism
  • Complete code examples and best practices

Changes committed in: f178cf7

The documentation is now ready with both Chinese and English versions (750+ lines each) and has been successfully built with Docusaurus.

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot AI changed the title Add comprehensive documentation for GeneralUpdate.Extension extensibility framework Add comprehensive documentation for GeneralUpdate.Extension plugin management system Feb 9, 2026
@JusterZhu JusterZhu marked this pull request as ready for review February 9, 2026 12:28
Copilot AI review requested due to automatic review settings February 9, 2026 12:28
@JusterZhu JusterZhu merged commit e6056e7 into main Feb 9, 2026
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Docusaurus documentation pages for the GeneralUpdate.Extension plugin/extension management system, with localized variants intended for the site’s i18n structure.

Changes:

  • Added a new GeneralUpdate.Extension documentation page under the main docs tree.
  • Added localized documentation pages under i18n/en and i18n/zh-Hans.
  • Updated package-lock.json (adds "peer": true metadata on multiple packages).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
website/package-lock.json Lockfile metadata changes (adds "peer": true on multiple entries).
website/docs/doc/GeneralUpdate.Extension.md Adds the GeneralUpdate.Extension doc page (currently written in Chinese).
website/i18n/en/docusaurus-plugin-content-docs/current/docs/doc/GeneralUpdate.Extension.md Adds the English localized doc page.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Extension.md Adds the zh-Hans localized doc page (Chinese).
Files not reviewed (1)
  • website/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

using GeneralUpdate.Extension;
using GeneralUpdate.Extension.Core;
using GeneralUpdate.Extension.Common.Models;
using GeneralUpdate.Extension.Common.DTOs;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

快速开始代码示例里使用了 TargetPlatform.Windows,但 using 列表里没有包含 TargetPlatform 所在的命名空间(你在后面的完整示例里有 using GeneralUpdate.Extension.Common.Enums;)。为了让新手复制即可运行,建议在该示例补充对应 using(或使用全限定名)。

Suggested change
using GeneralUpdate.Extension.Common.DTOs;
using GeneralUpdate.Extension.Common.DTOs;
using GeneralUpdate.Extension.Common.Enums;

Copilot uses AI. Check for mistakes.
"version": "4.22.1",
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.22.1.tgz",
"integrity": "sha512-yb05NA4tNaOgx3+rOxAmFztgMTtGBi97X7PC3jyNeGiwkAjOZc2QrdZBYyIdcDLoI09N0gjtpClcackoTN0gPA==",
"peer": true,
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-lock.json is being modified (adding "peer": true to many entries) without any corresponding change in package.json. This kind of lockfile churn is typically incidental (e.g., generated by a different npm version) and can make dependency installs inconsistent for other contributors/CI. Please either revert the lockfile-only changes, or include the exact npm/node version used and confirm the change is required to fix the docs build.

Suggested change
"peer": true,

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +16
### 定义

命名空间:GeneralUpdate.Extension

程序集:GeneralUpdate.Extension.dll

**NuGet 包**:GeneralUpdate.Extension



GeneralUpdate.Extension 是一个受 VS Code 启发的 .NET 应用程序扩展管理系统。它提供完整的插件/扩展管理功能,包括扩展下载、安装、更新、版本兼容性检查、平台支持、依赖关系解析和回滚机制。

Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page under website/docs/ is written in Chinese, but the rest of website/docs/doc/ appears to be the English source docs with Chinese living under website/i18n/zh-Hans/... (e.g., website/docs/doc/GeneralUpdate.Core.md is English while website/i18n/zh-Hans/.../GeneralUpdate.Core.md is Chinese). As-is, this will make the default docs set contain mixed languages and also duplicates the same Chinese content already added under i18n/zh-Hans. Consider making website/docs/doc/GeneralUpdate.Extension.md the English version (matching the i18n/en content), and keeping the Chinese version only in i18n/zh-Hans.

Copilot uses AI. Check for mistakes.
using GeneralUpdate.Extension;
using GeneralUpdate.Extension.Core;
using GeneralUpdate.Extension.Common.Models;
using GeneralUpdate.Extension.Common.DTOs;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Quick Start snippet references TargetPlatform.Windows but doesn’t import the namespace where TargetPlatform is defined (you include using GeneralUpdate.Extension.Common.Enums; later in the full example). For beginners, this first snippet should be self-contained—please add the missing using (or fully-qualify TargetPlatform) so the sample compiles as shown.

Suggested change
using GeneralUpdate.Extension.Common.DTOs;
using GeneralUpdate.Extension.Common.DTOs;
using GeneralUpdate.Extension.Common.Enums;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeneralUpdate.Extension Online Help Documentation Development

2 participants