Add helper functions to set nui focus and restore previous input state. Ensure focus is reset before triggering responses (promises/callbacks).