M1hono Docs Assistant
Visual authoring tools for VitePress documentation projects that use the M1hono-style theme and structure. The extension combines Markdown-aware completions, hover docs, code lenses, and webview editors for the parts that are too heavy to edit comfortably by hand.
Current Release
What It Covers
Markdown authoring
- capability-based Markdown, VitePress, and M1hono feature layers
- Component, plugin, and frontmatter completions for M1hono/VitePress docs
- Hover documentation for registered fields and props
- Quick fixes for unknown frontmatter and unknown component-like tags
- Smart insert workflow for components, assets, and supported Markdown structures
- File upload helpers for images and public assets
- Code lenses for page navigation links and heading anchor editing
- VitePress-aware internal link completion and resolved link jump behavior
- config-aware locale/root handling for custom
project-config.ts source roots, locale links, and public paths
Visual editors
- Hero editor
- Chart editor
- LiteTree editor
- Bills editor
- MNavLinks editor
- Sidebar editor
- Sidebar folder editor
- Locale config editor
- Locale editor
- Team page editor
- Mermaid/diagram editor
- Markdown table editor
- Preview current Markdown page in the project VitePress dev server
- Set the preferred preview port per workspace from a command
- Initialize frontmatter with project-aware defaults
- Create doc pages and configured page templates
- Generate custom VitePress components
- Sync locale mappings
- Sync sidebar outputs
- Initialize repo settings for extension-managed behavior
- Audit runtime, manifest, and hover-doc locale coverage
Key Workflows
Frontmatter and page structure
Use the extension to edit:
- page metadata
- hero blocks
- features blocks
- sidebar navigation
- prev/next navigation overrides
- locale-driven configuration files
The hover system includes localized descriptions for page, sidebar, nav-links, and hero fields.
The sidebar tooling supports both Markdown frontmatter and JSON-based folder config flows.
- reorder pages and folders
- control collapsed and hidden states
- manage external links and generated groups
- edit folder-level config from Markdown or JSON files
- sync generated sidebar output back into the VitePress project
Asset insertion
The asset workflow supports:
- uploading into tracked public folders
- inserting image and file paths into Markdown
- choosing existing public assets
- repo-level component-tag settings for unknown component-like tags
Localization maintenance
When translations drift, run the locale audit command to open a Markdown report that checks:
- runtime
vscode.l10n bundle coverage
- manifest string coverage
- registry-backed hover documentation coverage
zh-cn mirror drift against zh-Hans
The report is exported to .pickAIDExtension/reports/locale-coverage.md inside the current workspace.
Commands
The extension currently contributes 38 commands. Main commands include:
Open Preview
Set Preview Port
Hero Editor
Chart Editor
LiteTree Editor
Bills Editor
MNavLinks Editor
Edit Sidebar
Edit Sidebar Folder
Locale Config Editor
Locale Editor
Team Page Editor
Diagram Editor
Markdown Table Editor
Smart Insert
Sync Sidebar
Audit Locale Coverage
Initialize Repo Settings
Configuration
| Setting |
Default |
Scope |
Description |
m1hono.devServerPort |
5173 |
Resource |
Preferred VitePress dev-server port for preview probing. |
m1hono.autoUploadImages |
true |
Window |
Upload selected images into the project before insertion. |
m1hono.completionEnabled |
true |
Window |
Enable extension completions in supported files. |
m1hono.diagnosticsEnabled |
true |
Window |
Enable extension diagnostics in supported files. |
Project Layout
The current codebase is organized around small command and service modules:
src/
commands/ VS Code command entry points
data/ static registries for components, plugins, and frontmatter
providers/ completions, hovers, code actions, code lenses, diagnostics
services/ editor/runtime logic grouped by domain
services/asset/ public asset browsing and upload helpers
services/chart/ chart editor parsing and webview support
services/hero/ hero editor runtime and field metadata
services/navlinks/
services/sidebarFolder/
services/teamPage/
services/table/
Build
npm install
npm run compile
Test
npm run test
npm run test:phase1:capabilities
npm run test:phase1:markdown-links
npm run test:project-activation
npm run test:project-config
npm run test:local
npm run test:completion
npm run test:locale-config-editor
Localization
The extension uses VS Code vscode.l10n.
l10n/bundle.l10n.json: source strings
l10n/bundle.l10n.zh-Hans.json: Simplified Chinese
l10n/bundle.l10n.zh-cn.json: Simplified Chinese mirror
package.nls.json: manifest strings
package.nls.zh-Hans.json: localized manifest strings
License
MIT