fix(tui): show toast when variant_list keybind used with no variants (#30724)

This commit is contained in:
Ariane Emory 2026-06-04 13:14:24 -04:00 committed by GitHub
parent 94c49b20ba
commit cb65926c82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -715,6 +715,13 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
hidden: local.model.variant.list().length === 0,
slashName: "variants",
run: () => {
if (local.model.variant.list().length === 0) {
return toast.show({
title: "No variants available",
message: "The current model does not support any variants.",
variant: "info",
})
}
dialog.replace(() => <DialogVariant />)
},
},