Skip to content

docs(crates/panache-mcp): 建稿时说明如何沿用用户给的原纸 - #62

Merged
SXP-Simon merged 1 commit into
mainfrom
fix/worksheet-paper
Nov 27, 2026
Merged

SXP-Simon merged 1 commit into
mainfrom
fix/worksheet-paper

Conversation

@SXP-Simon

@SXP-Simon SXP-Simon commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

为什么改

用户给了一张有页眉和横线的作业纸,希望在这张纸上写字。一次实际使用中,客户端先取出页眉,在新的白色 A4 画布重画横线,再把这张新图传给 paper_path。最后虽然传了 photo,工具保留下来的已经是重画的纸。

这个草稿做什么

在创建稿件的 paper_mode 字段解释怎么选输入文件:要写在给定纸上,就把原文件直接传给 paper_path,默认照片模式会保留页眉、横线和拍摄角度。交付 PDF 也可以使用原照片。用户要求拉正时用 flatten,要求空白模板时才另行重画。

与 #57 可以分别审查。#57 解决的是服务端从哪里读取文件,这里解决的是读到原件之后该用哪一张图。

本机证据

  • Windows 真实 stdio 调用。对合成的斜横线纸加一个颜色独特的页眉标记,建稿后用 view=paper 读回,全部 RGB 像素与输入相同。成稿保留尺寸及标记,正文区域有新增笔迹,PDF 成功导出 1 页。这个试验证实提示所指的用法在现有引擎上可行。
  • Luna 和 Terra 各在独立会话对照一次。两份可读材料分别是实拍纸的合成样例和打印模板,任务指定在实拍纸上写,最后交 PDF。转发器省略启动说明,保留真实工具及图像。基线和此分支均为 2/2 直接使用原图。这个对照中没有测出成功率提升。
  • 测试客户端限用 MCP,未复现原会话中另写脚本重画的完整自由度。收益是字段说明澄清了操作意图。这是一个提示草稿,如果只优先合有实测提升的改动,可以后审。

Summary by Sourcery

Enhancements:

  • Clarify paper input guidance so drafts written on a supplied sheet preserve the original header, rulings, and perspective, while distinguishing when to straighten or recreate a blank template.

背景:交付 PDF 时,客户端曾把原纸重新描成打印模板。

解决手段:在 paper_mode 的工具说明中明确原图、拉正与重建模板的适用意图。

收益:客户端在建稿时就能看到保留原纸的操作。
@sourcery-ai

sourcery-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

API

Clarify the paper_mode field guidance so callers use the original supplied sheet, choose flattening when requested, and recreate a template only when requested.

  • crates/panache-mcp/src/inputs.rs L106-108

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@SXP-Simon
SXP-Simon marked this pull request as ready for review November 27, 2026 07:45
@sourcery-ai

sourcery-ai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Sorry @SXP-Simon, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 9 hours and 36 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@SXP-Simon
SXP-Simon merged commit 4297340 into main Nov 27, 2026
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.

1 participant