mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-13 02:01:16 +00:00
fix: preserve status store path in info wrapper
This commit is contained in:
@@ -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", {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user