Skip to content

Add canvas dimensions to text AI prompt#127

Open
mentatbot[bot] wants to merge 1 commit intomainfrom
mentat-112-1
Open

Add canvas dimensions to text AI prompt#127
mentatbot[bot] wants to merge 1 commit intomainfrom
mentat-112-1

Conversation

@mentatbot
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
@github-actions
Copy link
Contributor

🚀 PR Preview deployed!

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

@mentatbot
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