feat(discord): add configurable ephemeral option for slash commands

This commit is contained in:
Wei He
2026-02-14 10:33:36 -05:00
committed by Shadow
parent b294342d7f
commit 122bdfa4e1
6 changed files with 54 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ import {
createDiscordComponentStringSelect,
createDiscordComponentUserSelect,
} from "./agent-components.js";
import { resolveDiscordSlashCommandConfig } from "./commands.js";
import { createExecApprovalButton, DiscordExecApprovalHandler } from "./exec-approvals.js";
import { createDiscordGatewayPlugin } from "./gateway-plugin.js";
import { registerGateway, unregisterGateway } from "./gateway-registry.js";
@@ -246,8 +247,9 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
globalSetting: cfg.commands?.native,
});
const useAccessGroups = cfg.commands?.useAccessGroups !== false;
const slashCommand = resolveDiscordSlashCommandConfig(discordCfg.slashCommand);
const sessionPrefix = "discord:slash";
const ephemeralDefault = true;
const ephemeralDefault = slashCommand.ephemeral;
const voiceEnabled = discordCfg.voice?.enabled !== false;
if (token) {