fix(commands): wire /usage to status (#492) (thanks @lc0rp)

This commit is contained in:
Peter Steinberger
2026-01-09 17:10:53 +01:00
parent 08caf7b9fc
commit 68ad27e31c
6 changed files with 47 additions and 3 deletions

View File

@@ -242,6 +242,23 @@ describe("trigger handling", () => {
});
});
it("reports status via /usage without invoking the agent", async () => {
await withTempHome(async (home) => {
const res = await getReplyFromConfig(
{
Body: "/usage",
From: "+1002",
To: "+2000",
},
{},
makeCfg(home),
);
const text = Array.isArray(res) ? res[0]?.text : res?.text;
expect(text).toContain("ClawdBot");
expect(runEmbeddedPiAgent).not.toHaveBeenCalled();
});
});
it("reports active auth profile and key snippet in status", async () => {
await withTempHome(async (home) => {
const cfg = makeCfg(home);