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

skip unknown css/svg shape #1275

Merged
merged 1 commit into from
Nov 27, 2024
Merged

skip unknown css/svg shape #1275

merged 1 commit into from
Nov 27, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 27, 2024

Important

Skip unrecognized or empty CSS/SVG shapes by checking recognized flag and updating prompt JSON format.

  • Behavior:
    • Skip unrecognized or empty SVG shapes in _convert_svg_to_string() by checking recognized flag and marking elements as dropped.
    • Skip unrecognized or empty CSS shapes in _convert_css_shape_to_string() by checking recognized flag.
  • Prompts:
    • Add recognized boolean key to JSON response in css-shape-convert.j2 and svg-convert.j2 to indicate if shape is recognized.

This description was created by Ellipsis for 0be2570. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 0be2570 in 30 seconds

More details
  • Looked at 103 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_xy5FtlKb3ctvsf4j


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

LOG.info("SVG converted by LLM", element_id=element_id, shape=svg_shape)
await app.CACHE.set(svg_key, svg_shape)
break
except Exception:
LOG.exception(
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using LOG.exception instead of LOG.info to retain stack trace information for debugging purposes when SVG conversion fails. This is also applicable to the CSS shape conversion at line 260.

@LawyZheng LawyZheng merged commit 92ec1b7 into main Nov 27, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/skip-unknow-shape-svg branch November 27, 2024 17:26
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.

1 participant