Skip to content

Conversation

@ultmaster
Copy link
Contributor

Summary

  • trim children when building captioned paragraphs and adjust trailing space logic
  • disable trailing space for empty answers
  • update expected outputs for financial analysis and orders QA examples
  • fix test expectations for table QA output

Testing

  • npm run build-webview
  • npm run build-cli
  • npm run lint
  • npm test
  • python -m pytest python/tests

https://chatgpt.com/codex/tasks/task_e_6863a3b2cf60832e9b63e9859beaaa67

Copilot AI review requested due to automatic review settings July 2, 2025 08:42
Copy link
Contributor

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 PR trims whitespace-only children when building captioned paragraphs, adjusts trailing space logic for captions, and disables trailing spaces for empty answers in the QA components.

  • Import and apply trimChildrenWhiteSpace in CaptionedParagraph to remove extra whitespace
  • Pass a boolean captionTailingSpace prop to control trailing space rendering
  • Force captionTailingSpace={false} for empty answers in the Question component

Reviewed Changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

File Description
packages/poml/components/utils.tsx Trim children and conditionally set captionTailingSpace in captions
packages/poml/components/instructions.tsx Disable trailing space for empty answer captions
Comments suppressed due to low confidence (3)

packages/poml/components/utils.tsx:200

  • [nitpick] The prop name captionTailingSpace appears to have a typo; consider renaming it to captionTrailingSpace to match the standard term and improve clarity.
          <Caption captionStyle={captionStyle} captionTailingSpace={hasContent} {...others} />

packages/poml/components/instructions.tsx:543

  • [nitpick] The prop name captionTailingSpace appears to have a typo; consider renaming it to captionTrailingSpace here as well for consistency.
          captionTailingSpace={false}

packages/poml/components/utils.tsx:195

  • Consider adding unit tests for trimChildrenWhiteSpace to verify that whitespace-only children are removed correctly and that captionTailingSpace toggles as expected.
    const trimmedChildren = trimChildrenWhiteSpace(children, props);

@ultmaster ultmaster merged commit 2b39eea into main Jul 2, 2025
4 checks passed
@ultmaster ultmaster deleted the ve8idn-codex/fix-extra-space-after---hint----and---answer branch July 9, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants