2026-02-18 01:29:02 +00:00
|
|
|
import { formatCliCommand } from "../cli/command-format.js";
|
2026-02-18 01:34:35 +00:00
|
|
|
import type { PairingChannel } from "./pairing-store.js";
|
2026-01-08 23:29:20 +00:00
|
|
|
|
|
|
|
|
export function buildPairingReply(params: {
|
2026-01-13 06:16:43 +00:00
|
|
|
channel: PairingChannel;
|
2026-01-08 23:29:20 +00:00
|
|
|
idLine: string;
|
|
|
|
|
code: string;
|
|
|
|
|
}): string {
|
2026-01-13 06:16:43 +00:00
|
|
|
const { channel, idLine, code } = params;
|
2026-01-08 23:29:20 +00:00
|
|
|
return [
|
2026-01-30 03:15:10 +01:00
|
|
|
"OpenClaw: access not configured.",
|
2026-01-08 23:29:20 +00:00
|
|
|
"",
|
|
|
|
|
idLine,
|
|
|
|
|
"",
|
|
|
|
|
`Pairing code: ${code}`,
|
|
|
|
|
"",
|
|
|
|
|
"Ask the bot owner to approve with:",
|
2026-02-11 08:45:16 +08:00
|
|
|
formatCliCommand(`openclaw pairing approve ${channel} ${code}`),
|
2026-01-08 23:29:20 +00:00
|
|
|
].join("\n");
|
|
|
|
|
}
|