fix: route native status to active agent

This commit is contained in:
Peter Steinberger
2026-01-20 19:04:25 +00:00
parent 5c4079f66c
commit 243a8b019e
4 changed files with 61 additions and 12 deletions

View File

@@ -29,8 +29,11 @@ export async function getReplyFromConfig(
configOverride?: ClawdbotConfig,
): Promise<ReplyPayload | ReplyPayload[] | undefined> {
const cfg = configOverride ?? loadConfig();
const targetSessionKey =
ctx.CommandSource === "native" ? ctx.CommandTargetSessionKey?.trim() : undefined;
const agentSessionKey = targetSessionKey || ctx.SessionKey;
const agentId = resolveSessionAgentId({
sessionKey: ctx.SessionKey,
sessionKey: agentSessionKey,
config: cfg,
});
const agentCfg = cfg.agents?.defaults;