fix: preserve status store path in info wrapper

This commit is contained in:
Tak Hoffman
2026-04-10 20:10:22 -05:00
parent dcf49fa5d8
commit 70cfdc890b
2 changed files with 21 additions and 0 deletions

View File

@@ -201,6 +201,26 @@ describe("info command handlers", () => {
);
});
it("preserves the shared session store path when routing /status", async () => {
const params = buildInfoParams(
"/status",
{
commands: { text: true },
channels: { whatsapp: { allowFrom: ["*"] } },
} as OpenClawConfig,
);
params.storePath = "/tmp/target-session-store.json";
const statusResult = await handleStatusCommand(params, true);
expect(statusResult?.shouldContinue).toBe(false);
expect(vi.mocked(buildStatusReply)).toHaveBeenCalledWith(
expect.objectContaining({
storePath: "/tmp/target-session-store.json",
}),
);
});
it("uses the canonical target session agent when listing /commands", async () => {
const { handleCommandsListCommand } = await import("./commands-info.js");
const params = buildInfoParams("/commands", {

View File

@@ -195,6 +195,7 @@ export const handleStatusCommand: CommandHandler = async (params, allowTextComma
sessionKey: params.sessionKey,
parentSessionKey: params.sessionEntry?.parentSessionKey ?? params.ctx.ParentSessionKey,
sessionScope: params.sessionScope,
storePath: params.storePath,
provider: params.provider,
model: params.model,
contextTokens: params.contextTokens,