1
0
Fork 0

feat(gui): highlight tokens that have been used in prompt

This commit is contained in:
Sean Sube 2023-11-12 15:50:04 -06:00
parent a4bf4ac651
commit fd34b4a764
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 7 additions and 1 deletions

View File

@ -79,7 +79,13 @@ export function PromptInput(props: PromptInputProps) {
});
}}
/>
{tokens.map(([token, _weight]) => <Chip label={token} onClick={() => addToken(token)} />)}
<Stack direction='row' spacing={2}>
{tokens.map(([token, _weight]) => <Chip
color={prompt.includes(token) ? 'primary' : 'default'}
label={token}
onClick={() => addToken(token)}
/>)}
</Stack>
<TextField
label={t('parameter.negativePrompt')}
variant='outlined'