-
Notifications
You must be signed in to change notification settings - Fork 1
Fix error messages to use PAWS_MAX_IMAGE_SIZE naming convention #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error messages to use PAWS_MAX_IMAGE_SIZE naming convention #77
Conversation
…E_MAX_IMAGE_SIZE Co-Authored-By: ForgeCode <noreply@forgecode.dev> Co-authored-by: manthanabc <48511543+manthanabc@users.noreply.github.com>
There was a problem hiding this 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 pull request attempts to update error messages to use PAWS_MAX_IMAGE_SIZE instead of FORGE_MAX_IMAGE_SIZE as part of standardizing naming conventions for the Paws fork. However, there is a critical inconsistency: the actual environment variable being read from the system is still FORGE_MAX_IMAGE_SIZE (defined in crates/paws_infra/src/env.rs:88), making these error messages misleading and incorrect.
Changes:
- Updated three error messages in
fs_read.rsandimage_read.rsto referencePAWS_MAX_IMAGE_SIZE - These changes are incomplete as the underlying environment variable name remains
FORGE_MAX_IMAGE_SIZE
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/paws_services/src/tool_services/image_read.rs | Updated error message to reference PAWS_MAX_IMAGE_SIZE (but actual env var is still FORGE_MAX_IMAGE_SIZE) |
| crates/paws_services/src/tool_services/fs_read.rs | Updated two error messages to reference PAWS_MAX_IMAGE_SIZE (but actual env var is still FORGE_MAX_IMAGE_SIZE) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "PDF exceeds size limit. Use a smaller PDF or increase PAWS_MAX_IMAGE_SIZE." | ||
| } else { | ||
| "Image exceeds size limit. Compress the image or increase FORGE_MAX_IMAGE_SIZE." | ||
| "Image exceeds size limit. Compress the image or increase PAWS_MAX_IMAGE_SIZE." |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message references PAWS_MAX_IMAGE_SIZE, but the actual environment variable being read is FORGE_MAX_IMAGE_SIZE (see crates/paws_infra/src/env.rs:88). Users following this error message will set PAWS_MAX_IMAGE_SIZE, which won't have any effect. Either the environment variable name in env.rs needs to be changed to PAWS_MAX_IMAGE_SIZE, or this error message should reference FORGE_MAX_IMAGE_SIZE.
| .await | ||
| .with_context( | ||
| || "Image exceeds size limit. Compress the image or increase FORGE_MAX_IMAGE_SIZE.", | ||
| || "Image exceeds size limit. Compress the image or increase PAWS_MAX_IMAGE_SIZE.", |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message references PAWS_MAX_IMAGE_SIZE, but the actual environment variable being read is FORGE_MAX_IMAGE_SIZE (see crates/paws_infra/src/env.rs:88). Users following this error message will set PAWS_MAX_IMAGE_SIZE, which won't have any effect. Either the environment variable name in env.rs needs to be changed to PAWS_MAX_IMAGE_SIZE, or this error message should reference FORGE_MAX_IMAGE_SIZE.
| || "Image exceeds size limit. Compress the image or increase PAWS_MAX_IMAGE_SIZE.", | |
| || "Image exceeds size limit. Compress the image or increase FORGE_MAX_IMAGE_SIZE.", |
| assert_file_size(&*self.0, path, env.max_image_size).await.with_context(|| { | ||
| if mime_type == "application/pdf" { | ||
| "PDF exceeds size limit. Use a smaller PDF or increase FORGE_MAX_IMAGE_SIZE." | ||
| "PDF exceeds size limit. Use a smaller PDF or increase PAWS_MAX_IMAGE_SIZE." |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message references PAWS_MAX_IMAGE_SIZE, but the actual environment variable being read is FORGE_MAX_IMAGE_SIZE (see crates/paws_infra/src/env.rs:88). Users following this error message will set PAWS_MAX_IMAGE_SIZE, which won't have any effect. Either the environment variable name in env.rs needs to be changed to PAWS_MAX_IMAGE_SIZE, or this error message should reference FORGE_MAX_IMAGE_SIZE.
Error messages in
fs_read.rsandimage_read.rsreferencedFORGE_MAX_IMAGE_SIZEinstead ofPAWS_MAX_IMAGE_SIZE, inconsistent with the Paws fork naming convention.Changes:
crates/paws_services/src/tool_services/fs_read.rs(lines 136, 138) for PDF and image size limit errorscrates/paws_services/src/tool_services/image_read.rs(line 60) for image size limit errorsAll error messages now correctly reference
PAWS_MAX_IMAGE_SIZEwhen advising users to adjust the environment variable.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.