Show a toast to explain why the user just lost their command flow

This commit is contained in:
Frank Noirot
2025-04-10 13:36:53 -04:00
parent 2cd74a063c
commit 8fd482a424

View File

@ -14,6 +14,7 @@ import {
commandBarActor,
useCommandBarState,
} from '@src/machines/commandBarMachine'
import toast from 'react-hot-toast'
export const COMMAND_PALETTE_HOTKEY = 'mod+k'
@ -48,6 +49,7 @@ export const CommandBar = () => {
immediateState.type === EngineConnectionStateType.Disconnected
) {
commandBarActor.send({ type: 'Close' })
toast.error('Exiting command flow because engine disconnected')
}
}, [immediateState])