Skip to content

Commit

Permalink
feat(gui): highlight tokens that have been used in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Nov 12, 2023
1 parent a4bf4ac commit fd34b4a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gui/src/components/input/PromptInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit fd34b4a

Please sign in to comment.