refactor(pairing): centralize reply formatting

This commit is contained in:
Peter Steinberger
2026-01-08 23:29:20 +00:00
parent e952f7df96
commit 7ece3717e6
10 changed files with 123 additions and 83 deletions

View File

@@ -0,0 +1,19 @@
import type { PairingProvider } from "./pairing-store.js";
export function buildPairingReply(params: {
provider: PairingProvider;
idLine: string;
code: string;
}): string {
const { provider, idLine, code } = params;
return [
"Clawdbot: access not configured.",
"",
idLine,
"",
`Pairing code: ${code}`,
"",
"Ask the bot owner to approve with:",
`clawdbot pairing approve --provider ${provider} <code>`,
].join("\n");
}