mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:01:37 +00:00
fix: allow agent workspace directories in media local roots (#17136)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 7545ef1e19
Co-authored-by: MisterGuy420 <255743668+MisterGuy420@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -57,15 +57,18 @@ export type RouteReplyResult = {
|
||||
export async function routeReply(params: RouteReplyParams): Promise<RouteReplyResult> {
|
||||
const { payload, channel, to, accountId, threadId, cfg, abortSignal } = params;
|
||||
const normalizedChannel = normalizeMessageChannel(channel);
|
||||
const resolvedAgentId = params.sessionKey
|
||||
? resolveSessionAgentId({
|
||||
sessionKey: params.sessionKey,
|
||||
config: cfg,
|
||||
})
|
||||
: undefined;
|
||||
|
||||
// Debug: `pnpm test src/auto-reply/reply/route-reply.test.ts`
|
||||
const responsePrefix = params.sessionKey
|
||||
? resolveEffectiveMessagesConfig(
|
||||
cfg,
|
||||
resolveSessionAgentId({
|
||||
sessionKey: params.sessionKey,
|
||||
config: cfg,
|
||||
}),
|
||||
resolvedAgentId ?? resolveSessionAgentId({ config: cfg }),
|
||||
{ channel: normalizedChannel, accountId },
|
||||
).responsePrefix
|
||||
: cfg.messages?.responsePrefix === "auto"
|
||||
@@ -123,12 +126,13 @@ export async function routeReply(params: RouteReplyParams): Promise<RouteReplyRe
|
||||
payloads: [normalized],
|
||||
replyToId: resolvedReplyToId ?? null,
|
||||
threadId: resolvedThreadId,
|
||||
agentId: resolvedAgentId,
|
||||
abortSignal,
|
||||
mirror:
|
||||
params.mirror !== false && params.sessionKey
|
||||
? {
|
||||
sessionKey: params.sessionKey,
|
||||
agentId: resolveSessionAgentId({ sessionKey: params.sessionKey, config: cfg }),
|
||||
agentId: resolvedAgentId,
|
||||
text,
|
||||
mediaUrls,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user