Repository navigation
refactor(office): 复用官方 Office 工作流与 Studio 文档处理 - #157
Merged
Merged
Conversation
This was referenced Oct 16, 2026
Closed
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.
旧版 DOC 目前被自有技能和工具输入格式挡住,模型容易误判为缺少文档处理环境。此 PR 让 Word、Excel、PowerPoint 技能加载宿主已安装的官方 Office 工作流,并让对话工具与 Studio 共用官方校验、转换和公式重算能力。
变更
artifact-*技能标识、开关和用户/项目覆盖;加载安装版本的官方原始正文与资源目录,补充工作区权限、旧格式和 Studio 的接入说明,不复制维护官方技能。office_*支持真实 DOC/XLS/PPT 的只读检查,以及转换为新的 DOCX/XLSX/PPTX 或 PDF;Excel 增加公式重算。读取旧格式只生成临时副本,原文件不变。check_office.py,并保留现有压缩包边界检查。模板专用 strict 检查继续处理模板约束。关联 #121、#153。预览侧迁移由独立的 #156 处理;本 PR 基于 main,可独立审查。使用当前固定 DSH 0.2.0-rc.2 已带的官方 Office 包和 Kit 0.1.2,没有新增引擎副本、下载器或版本发布。没有这些可选宿主能力的旧版独立插件环境保留原有接口;已经安装但损坏的官方资源不会静默降级。
验证
以上是 Windows 上的合成文件及真实工具/宿主验收,没有调用真实模型或完成原生 macOS 验收。#153 未提供原始文件,因此不宣称验证过该文件;HTML/RTF 改名的 DOC、加密/损坏文件仍会报告错误,复杂宏/修订/动画不承诺无损保留。
合并前补验
与运行时裁剪、Electron 浏览器和官方预览组合装配后,真实 Office 处理、浏览器组件和视频渲染均通过。补验发现 Python 在安装目录生成字节码缓存,现已为普通 Office 操作与官方校验调用加入
-B。真实 Office 回归新增安装脚本字节码前后校验;裁剪后的组合产品完整检查.pyc,结果为 0 → 0,原有文档处理继续通过。这轮验证使用 Windows 隔离源码产品与合成资料,不代表已经发布 npm 或桌面安装包,也不替代正式版的原生 macOS 验收。