Skip to content
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

Add canvas dimensions to text AI prompt #127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mentatbot[bot]
Copy link
Contributor

@mentatbot mentatbot bot commented Jan 15, 2025

This PR addresses issue #112 where the text AI interface would stop adding text or items after a few additions. The root cause was that the AI didn't have context about the canvas dimensions, which could lead to it placing elements outside the visible area or making them too large.

Changes made:

  • Added canvas dimensions to the system prompt
  • Specified bounds for x and y coordinates (0 to canvas width/height)
  • Added guidance about centering elements when coordinates aren't specified
  • Added maximum width/height constraints for resizing
  • Added context about fitting shapes and images within the canvas space

These changes will help the AI make better decisions about element placement and sizing, preventing elements from being placed outside the visible area.

Closes #112


Precommit Logs: 38a2e57 ✅

🤖 See my steps and track the cost of the PR here

This PR addresses issue # 112 where the text AI interface would stop adding text or items after a few additions. The root cause was that the AI didn't have context about the canvas dimensions, which could lead to it placing elements outside the visible area or making them too large.

Changes made:
- Added canvas dimensions to the system prompt
- Specified bounds for x and y coordinates (0 to canvas width/height)
- Added guidance about centering elements when coordinates aren't specified
- Added maximum width/height constraints for resizing
- Added context about fitting shapes and images within the canvas space

These changes will help the AI make better decisions about element placement and sizing, preventing elements from being placed outside the visible area.

Closes # 112

Mentat precommits passed. Log: https://mentat.ai/log/57f9d8d5-fab4-43e4-bd78-09be807685bd
@mentatbot mentatbot bot requested a review from voodoohop January 15, 2025 10:57
Copy link
Contributor

🚀 PR Preview deployed!

Preview URL: https://pollinations.github.io/hive/pr-127/

Copy link
Contributor Author

mentatbot bot commented Jan 15, 2025

Hi @github-actions[bot]! You need to be added as a user to interact with me. Please ask @voodoohop to add you on the settings page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
0 participants