技能 2026-10-16 07:22 UTC
genoffice
由提交人 BuildItNow 提交,主要更新类型为:新增功能与能力扩展。提交说明:feat(mcp): add a save action to the MCP open_documents tool (#2048)。
Commit提交信息原文
feat(mcp): add a save action to the MCP open_documents tool (#2048)
The MCP open_documents tool could list, read and close tabs but not
persist edits, so an AI edit could not be written back to disk. Add a
`save` action that writes the live tab content to its file in place and
keeps the tab open.
- apps/shell/src/main/mcp/open-documents-bridge.ts: add save(tab) — locate
the live document by id, error if it has been closed, otherwise resolve
the target via closeSavePath and write with saveTo, returning savedPath.
- apps/shell/src/main/mcp/tools/open-documents-tools.ts: add 'save' to the
action enum and a save branch (reject PDFs; return
{ saved, id, type, title, path, savedTo }); update the tool description.
- apps/shell/src/renderer/src/i18n/help/topics/mcp.*.md (25 locales):
note that open_documents saves in place and keeps the tab open.
- apps/shell/tests/mcp/open-documents-bridge.test.ts,
open-documents-tools.test.ts: cover save write-back and closed-tab error.