mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-10-01 20:09:49 +00:00
* feat(website): Include local commands when generating website Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com> * feat(website): Disabled commands are excluded from generated HTML Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com> * Updated CHANGELOG.md Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com> * fix(website): resolve enablement through the bot's own config helpers The generated page is meant to list what the bot actually answers, so it has to read the config the same way the bot does. Three places where it did not: The local `config.ini` overlay was never read. `read_config` parsed only the base file, while the bot overlays `<local_dir_path>/config.ini` on top of it, and that overlay is exactly where the web viewer saves a local plugin's settings. A local command disabled from the settings page still showed up on the site. `is_command_enabled` derived the section name and the legacy `enabled` spellings by hand, duplicating `BaseCommand._derive_config_section_name` and guessing that a legacy key lives in the command's own section. Half of them do not: `[Jokes] joke_enabled` disables `Joke_Command`. It now calls `command_section_name` and `read_enabled`, which share the alias table with the runtime and the settings UI. That table was missing the same-section `[Joke_Command] joke_enabled` and `[DadJoke_Command] dadjoke_enabled` spellings, which both commands accept through their own fallback. The settings page read only the `[Jokes]` form, so a bot disabled the same-section way displayed as enabled. Also fold the duplicated local-commands-dir resolution into `resolve_local_commands_dir`, take `bot_root` as a `MinimalBot` argument instead of assigning it post-construction twice, and restore the `hidden` attribute check that `generate_samples` lost when it moved to `filter_commands`. --------- Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com> Co-authored-by: agessaman <adam@gessaman.com>