Skip to content

Conversation

Copy link

Copilot AI commented Jan 26, 2026

Error messages in fs_read.rs and image_read.rs referenced FORGE_MAX_IMAGE_SIZE instead of PAWS_MAX_IMAGE_SIZE, inconsistent with the Paws fork naming convention.

Changes:

  • Updated error messages in crates/paws_services/src/tool_services/fs_read.rs (lines 136, 138) for PDF and image size limit errors
  • Updated error message in crates/paws_services/src/tool_services/image_read.rs (line 60) for image size limit errors

All error messages now correctly reference PAWS_MAX_IMAGE_SIZE when 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.

…E_MAX_IMAGE_SIZE

Co-Authored-By: ForgeCode <noreply@forgecode.dev>

Co-authored-by: manthanabc <48511543+manthanabc@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on PR #55 Fix error messages to use PAWS_MAX_IMAGE_SIZE naming convention Jan 26, 2026
Copilot AI requested a review from manthanabc January 26, 2026 21:21
@manthanabc manthanabc marked this pull request as ready for review January 26, 2026 21:28
Copilot AI review requested due to automatic review settings January 26, 2026 21:28
@manthanabc manthanabc merged commit 1165552 into patch/sync-upstream-2026-01-15 Jan 26, 2026
4 checks passed
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 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.rs and image_read.rs to reference PAWS_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."
Copy link

Copilot AI Jan 26, 2026

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.

Copilot uses AI. Check for mistakes.
.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.",
Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
|| "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.",

Copilot uses AI. Check for mistakes.
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."
Copy link

Copilot AI Jan 26, 2026

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.

Copilot uses AI. Check for mistakes.
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.

2 participants