mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 14:34:27 +00:00
Matrix-js: add legacy config migration and bind integration coverage
This commit is contained in:
@@ -189,6 +189,15 @@ describe("registerAgentCommands", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("documents bind accountId resolution behavior in help text", () => {
|
||||
const program = new Command();
|
||||
registerAgentCommands(program, { agentChannelOptions: "last|telegram|discord" });
|
||||
const agents = program.commands.find((command) => command.name() === "agents");
|
||||
const bind = agents?.commands.find((command) => command.name() === "bind");
|
||||
const help = bind?.helpInformation() ?? "";
|
||||
expect(help).toContain("accountId is resolved by channel defaults/hooks");
|
||||
});
|
||||
|
||||
it("forwards agents unbind options", async () => {
|
||||
await runCli(["agents", "unbind", "--agent", "ops", "--all", "--json"]);
|
||||
expect(agentsUnbindCommandMock).toHaveBeenCalledWith(
|
||||
|
||||
@@ -126,7 +126,12 @@ ${theme.muted("Docs:")} ${formatDocsLink("/cli/agent", "docs.openclaw.ai/cli/age
|
||||
.command("bind")
|
||||
.description("Add routing bindings for an agent")
|
||||
.option("--agent <id>", "Agent id (defaults to current default agent)")
|
||||
.option("--bind <channel[:accountId]>", "Binding to add (repeatable)", collectOption, [])
|
||||
.option(
|
||||
"--bind <channel[:accountId]>",
|
||||
"Binding to add (repeatable). If omitted, accountId is resolved by channel defaults/hooks.",
|
||||
collectOption,
|
||||
[],
|
||||
)
|
||||
.option("--json", "Output JSON summary", false)
|
||||
.action(async (opts) => {
|
||||
await runCommandWithRuntime(defaultRuntime, async () => {
|
||||
|
||||
Reference in New Issue
Block a user