- Updated onPrefixClicked() to add Ctrl-click functionality:
- Default click rerolls the entire prefix text to continue the generation.
- Ctrl-click rerolls only the text before the clicked word, allowing users to more precisely control generation output.
- Introduced getTextBeforeClickedWord() helper function:
- Extracts the text before a clicked word based on click coordinates, enhancing control over prefix selection.
- Provides a fallback to return the entire span text if word extraction is not possible.
- Updated function documentation to clarify new behaviors and helper purpose.
This change allows users to reset the prefix at a certain point if needed, adding flexibility to the generation process and enabling more intentional selection of alternatives.