fix: truncate skill command descriptions to 100 chars for Discord (#1018)

* fix: truncate skill command descriptions to 100 chars for Discord

Discord slash commands have a 100 character limit for descriptions.
Skill descriptions were not being truncated, causing command registration
to fail with an empty error from the Discord API.

* style: format

* style: format
This commit is contained in:
Wilkins
2026-01-16 16:01:59 +00:00
committed by GitHub
parent 0d6af15d1c
commit bb14b19922
11 changed files with 83 additions and 66 deletions

View File

@@ -185,7 +185,7 @@ export async function processMessage(params: {
const responsePrefix =
resolvedMessages.responsePrefix ??
(configuredResponsePrefix === undefined && isSelfChat
? resolveIdentityNamePrefix(params.cfg, params.route.agentId) ?? "[clawdbot]"
? (resolveIdentityNamePrefix(params.cfg, params.route.agentId) ?? "[clawdbot]")
: undefined);
// Create mutable context for response prefix template interpolation