Unskilledcrab / chain-generator

0 stars 0 forks source link

Widget Reference Validation #1

Open Unskilledcrab opened 8 months ago

Unskilledcrab commented 8 months ago

Overview

Currently when the user adds another generator reference title to their prompt, the reference is NOT validated but it will still display it as a valid reference. This task will add validation logic check to if the reference in the prompt is a valid widget title to reference

If the reference being used is not valid, then we should display a warning on the widget telling the user which reference used is not valid

Architectural Guidance

You will need to add a new public property List InvalidReferences on the WidgetGenerator component

You will need to add a new EventCallback that will trigger when the user updates the prompt and adds a reference

This new event callback will trigger a validation that occurs in the parent component where it will loop through all of the generators and see if there is one with that title.

The parent component will then set the InvalidReferences property on the child WidgetGenerator component

You'll then add logic here to display the message The following references are invalid: {DISPLAY_INVALID_REFERENCES}

Exit Criteria

The help text will display if there is an invalid reference in the prompt