fix: pass agentDir to /compact command for agent-specific auth (#24133)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 4bb10ca78c
Co-authored-by: Glucksberg <80581902+Glucksberg@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Glucksberg
2026-02-23 03:33:35 -04:00
committed by GitHub
parent 9ea740afb6
commit 36400df086
6 changed files with 85 additions and 1 deletions

View File

@@ -389,6 +389,7 @@ describe("/compact command", () => {
From: "+15550001",
To: "+15550002",
});
const agentDir = "/tmp/openclaw-agent-compact";
vi.mocked(compactEmbeddedPiSession).mockResolvedValueOnce({
ok: true,
compacted: false,
@@ -397,6 +398,7 @@ describe("/compact command", () => {
const result = await handleCompactCommand(
{
...params,
agentDir,
sessionEntry: {
sessionId: "session-1",
updatedAt: Date.now(),
@@ -423,6 +425,7 @@ describe("/compact command", () => {
groupChannel: "#general",
groupSpace: "workspace-1",
spawnedBy: "agent:main:parent",
agentDir,
}),
);
});