HDR command does not work

I tried to use this code to use the HDR function, but it didn’t work

const core = require("photoshop").core;
core.performMenuCommand({
    title: core.translateUIString("$$$/Menu/Adjust/HDRToning")
});

This works without issues. Maybe you didn’t have a layer selected when you called the code ?

My ps version is 22.0.0, maybe my ps version is too low

yep we’re up to 22.3.1 (public)