Skip to content

Comments

refactor(vision): 优化 OCR 资源检查提示信息并调整截图返回类型#24

Open
HuanLinOTO wants to merge 1 commit intoMAA-AI:mainfrom
HuanLinOTO:feat-image-output
Open

refactor(vision): 优化 OCR 资源检查提示信息并调整截图返回类型#24
HuanLinOTO wants to merge 1 commit intoMAA-AI:mainfrom
HuanLinOTO:feat-image-output

Conversation

@HuanLinOTO
Copy link
Contributor

@HuanLinOTO HuanLinOTO commented Dec 31, 2025

image 测试通过

Summary by Sourcery

优化 OCR 资源检查提示信息,并调整截图捕获的返回类型。

增强内容:

  • 在不改变行为的前提下,明确说明 OCR 资源缺失时的提示信息。
  • screencap_only 的返回值由文件路径字符串改为 Image 对象,并相应更新其文档说明。
Original summary in English

Summary by Sourcery

Refine OCR resource check messaging and adjust screenshot capture return type.

Enhancements:

  • Clarify the OCR resource missing message without changing its behavior.
  • Change screencap_only to return an Image object instead of a file path string and update its documentation accordingly.

Copilot AI review requested due to automatic review settings December 31, 2025 15:51
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些整体层面的反馈:

  • 由于 screencap_only 现在返回的是 Image 实例而不是文件路径字符串,请确保在此模块中已导入 Image 类型,并仔细检查所有现有调用方是否都在期望一个 Image 对象而不是字符串路径,以避免细微的运行时问题。
供 AI 代理使用的提示词
Please address the comments from this code review:

## Overall Comments
- Since `screencap_only` now returns an `Image` instance instead of a file path string, make sure the `Image` type is imported in this module and double-check that all existing callers are expecting an `Image` object rather than a string path to avoid subtle runtime issues.

Sourcery 对开源项目免费——如果你觉得我们的审查有帮助,欢迎帮忙分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈来改进后续的代码审查。
Original comment in English

Hey - I've left some high level feedback:

  • Since screencap_only now returns an Image instance instead of a file path string, make sure the Image type is imported in this module and double-check that all existing callers are expecting an Image object rather than a string path to avoid subtle runtime issues.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since `screencap_only` now returns an `Image` instance instead of a file path string, make sure the `Image` type is imported in this module and double-check that all existing callers are expecting an `Image` object rather than a string path to avoid subtle runtime issues.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the screencap_only function to return an Image type instead of a string path, and improves the formatting of the OCR resource check error message.

  • Changed screencap_only return type from file path string to Image object
  • Reformatted OCR resource check error message for better readability
  • Updated function docstring to reflect the new return behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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