Trevixal API
    Preparing search index...

    Function paletteCommandsFromMenus

    • Turn wired menus into palette commands. Every entry the menus offer, with the icon and shortcut it already prints.

      Hand-listing the palette's contents means it drifts: the menus grow and the palette quietly keeps offering the dozen commands somebody typed out once. Deriving it instead means an entry reachable from a menu is reachable from the palette by construction. Separators and entries the host never wired are skipped, since withActions has already dropped the latter.

      A submenu contributes its children, not itself: Download as is not a command, Word document (.docx) is. The parent's label is folded into the child's keywords so typing download docx still finds it.

      Parameters

      • menus: readonly Menu[]

      Returns PaletteCommand[]