feat(setup-aionui): AionUI 集成 — 一键安装 Track Changes 技能 + 注册 Word 修订助手#131
Open
NextDoorLaoHuang-HF wants to merge 10 commits into
Open
feat(setup-aionui): AionUI 集成 — 一键安装 Track Changes 技能 + 注册 Word 修订助手#131NextDoorLaoHuang-HF wants to merge 10 commits into
NextDoorLaoHuang-HF wants to merge 10 commits into
Conversation
…preview Add visual indicators for revision types that were previously invisible in the HTML preview (view html / watch): - rPrChange: yellow highlight with bottom border on affected runs - pPrChange: yellow highlight with left border on affected paragraphs - tblPrChange: yellow highlight with left border on affected tables - Table row ins/del/moveFrom/moveTo: flatten revision-wrapped rows and apply green (ins) / red strikethrough (del) row styling - Add CSS classes: .track-format, .track-ins-row, .track-del-row Before this change, only w:ins and w:del run-level revisions were visible. Format changes and table row revisions were silently absent from the preview.
Add three new HTTP endpoints to the watch server: - POST /api/revision/accept — accept all tracked changes - POST /api/revision/reject — reject all tracked changes - GET /api/revision/count — return revision count as JSON All endpoints spawn officecli commands (following the existing /api/edit pattern) and notify SSE clients with a "full" refresh after accept/reject operations. Additionally, inject a floating revision toolbar into watch HTML output for Word documents: - Shows revision count badge (fetched from /api/revision/count) - Accept All (green) / Reject All (red) buttons - Auto-hides when no revisions exist - Only appears for Word documents (detected by data-block markers) - Refreshes automatically via SSE update events This enables AionUI and other watch consumers to provide revision management without any frontend code changes.
- acceptallchanges=all → revision.action=accept - rejectallchanges=all → revision.action=reject - path / → /revision - update doc comments
- Add AionuiInstaller.cs: one-shot integration that installs officecli-track-changes skill and registers Word 修订助手 assistant - Add skills/officecli-track-changes/SKILL.md: skill file defining OOXML Track Changes capabilities for AionUI agents - Add SkillInstaller entry for track-changes skill - Add early dispatch for setup-aionui command in Program.cs (placed between mcp and install blocks for early exit) - Supports --dry-run, --verbose, and --force flags - Auto-detects AionUI config directory across macOS/Linux/Windows - Handles base64url-encoded aionui-config.txt - Idempotent: detects existing skill and assistant, skips re-registration - Creates .bak backup before modifying config - Named id prefix custom-officecli-revision-* for easy identification
… fallback - Primary check: _setupBy == 'officecli' marker field (deterministic) - Fallback: name match via ToString() (avoids GetValue<string>() edge cases) - Added _setupBy marker to all new assistant entries
- Show visual preview after revisions when client supports web pages - AionUI: no action (watch server already shows live preview) - CLI-only: fall back to text summary via query revision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
新增
officecli setup-aionui命令,一键将 OfficeCLI 的 Track Changes 功能集成到 AionUI 桌面应用中。功能
officecli-track-changes/SKILL.md,定义 OOXML 修订能力custom-officecli-revision-*),预配置officecli-docx+officecli-track-changes技能aionui-config.txt前创建.bak备份--dry-run、--verbose、--force文件变更
src/officecli/Core/AionuiInstaller.cssrc/officecli/Program.cssetup-aionui在 mcp / install 之前执行src/officecli/Core/SkillInstaller.cstrack-changes条目skills/officecli-track-changes/SKILL.md测试结果
构建
端到端测试(macOS arm64)
验证清单
assistants数组,无重复custom-officecli-revision-、enabledSkills包含两个技能、isPreset=true、presetAgentType=opencode.bak--force覆盖现有助手条目(新 ID),无重复--dry-run预览模式正常工作助手配置示例
{ "id": "custom-officecli-revision-1779860156330", "name": "Word 修订助手", "description": "专注 Word 文档修订(Track Changes)的助手,支持查找替换修订、格式修订、接受/拒绝修订。", "avatar": "📝", "isPreset": true, "isBuiltin": false, "presetAgentType": "opencode", "enabled": true, "enabledSkills": ["officecli-docx", "officecli-track-changes"], "customSkillNames": [] }