refactor(pairing): centralize reply formatting
This commit is contained in:
19
src/pairing/pairing-messages.ts
Normal file
19
src/pairing/pairing-messages.ts
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user