microsoft / vscode-prompt-tsx

MIT License
34 stars 1 forks source link

Improve error message for invalid prompt elements #102

Open rebornix opened 3 weeks ago

rebornix commented 3 weeks ago

While crafting the prompt in tsx, sometimes I make mistakes with the element types (which are valid in tsx itself unfortunately), I got error message as

Invalid ChatMessage child! Child must be a TSX component that extends PromptElement

To troubleshoot this I would have to

We could in the error message point to the problematic child (e.g. -> -> child #2)

@connor4312's suggestion can help a lot already.