fix(gui): handle missing prompts when parsing tokens
This commit is contained in:
parent
a3fad5c541
commit
7132f10e9d
|
@ -48,8 +48,12 @@ export function PromptTextBlock(props: PromptTextBlockProps) {
|
|||
}
|
||||
|
||||
const tokens = useMemo(() => {
|
||||
if (doesExist(prompt)) {
|
||||
const networks = extractNetworks(prompt);
|
||||
return getNetworkTokens(models, networks);
|
||||
}
|
||||
|
||||
return [];
|
||||
}, [models, prompt]);
|
||||
|
||||
return <Stack spacing={2}>
|
||||
|
|
Loading…
Reference in New Issue