mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
fix: use target agent dir for compact command
This commit is contained in:
@@ -226,5 +226,6 @@ describe("handleCompactCommand", () => {
|
||||
agentDir: "/tmp/target-agent",
|
||||
}),
|
||||
);
|
||||
expect(vi.mocked(resolveAgentDir)).toHaveBeenCalledWith(expect.any(Object), "target");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ export const handleCompactCommand: CommandHandler = async (params) => {
|
||||
? resolveSessionAgentId({ sessionKey: params.sessionKey, config: params.cfg })
|
||||
: params.agentId;
|
||||
const sessionAgentDir =
|
||||
params.agentDir ?? (sessionAgentId ? resolveAgentDir(params.cfg, sessionAgentId) : undefined);
|
||||
(sessionAgentId ? resolveAgentDir(params.cfg, sessionAgentId) : undefined) ?? params.agentDir;
|
||||
const customInstructions = extractCompactInstructions({
|
||||
rawBody: params.ctx.CommandBody ?? params.ctx.RawBody ?? params.ctx.Body,
|
||||
ctx: params.ctx,
|
||||
|
||||
Reference in New Issue
Block a user