Skip to content

Conversation

@Her-xanadu
Copy link

@Her-xanadu Her-xanadu commented Jan 25, 2026

Summary

When using the look_at tool with a non-existent file path, it previously threw a cryptic SyntaxError: JSON Parse error: Unexpected EOF error. This PR adds a file existence check that returns a clear, user-friendly error message instead.

Changes

  • Added existsSync check before processing the file
  • Returns clear error message: Error: File not found: <path>
  • Added logging for debugging purposes

Testing

  • All existing tests pass (bun test src/tools/look-at - 7 tests)
  • Build succeeds (bun run build)

Summary by cubic

look_at now checks for file existence and returns "Error: File not found: " for invalid paths, instead of a cryptic JSON parse error. Adds an existsSync guard and logs the error for easier debugging.

Written for commit 727b762. Summary will update on new commits.

- Add existsSync check before processing file
- Return clear error message instead of throwing JSON parse error
- Improves UX when users accidentally pass non-existent file paths
@github-actions
Copy link
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign the CLA, please comment on this PR with:

I have read the CLA Document and I hereby sign the CLA

This is a one-time requirement. Once signed, all your future contributions will be automatically accepted.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link

@cubic-dev-ai cubic-dev-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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@kdcokenny
Copy link
Collaborator

@oasjkow please sign the cla

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