feat: auto native commands defaults

This commit is contained in:
Peter Steinberger
2026-01-12 21:49:44 +00:00
parent 99fea64823
commit 26d5cca97c
13 changed files with 121 additions and 21 deletions

View File

@@ -44,6 +44,7 @@ import type {
SlackSlashCommandConfig,
} from "../config/config.js";
import { loadConfig } from "../config/config.js";
import { resolveNativeCommandsEnabled } from "../config/commands.js";
import {
resolveSessionKey,
resolveStorePath,
@@ -1944,8 +1945,14 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {
}
};
const nativeCommands =
cfg.commands?.native === true ? listNativeCommandSpecsForConfig(cfg) : [];
const nativeEnabled = resolveNativeCommandsEnabled({
providerId: "slack",
providerSetting: account.config.commands?.native,
globalSetting: cfg.commands?.native,
});
const nativeCommands = nativeEnabled
? listNativeCommandSpecsForConfig(cfg)
: [];
if (nativeCommands.length > 0) {
for (const command of nativeCommands) {
app.command(