chore: clarify telegram docs links
This commit is contained in:
@@ -140,7 +140,8 @@ async function noteTelegramTokenHelp(prompter: WizardPrompter): Promise<void> {
|
||||
"2) Run /newbot (or /mybots)",
|
||||
"3) Copy the token (looks like 123456:ABC...)",
|
||||
"Tip: you can also set TELEGRAM_BOT_TOKEN in your env.",
|
||||
`Docs: ${formatDocsLink("/telegram", "telegram")}`,
|
||||
`Docs: ${formatDocsLink("/telegram")}`,
|
||||
"Website: https://clawd.bot",
|
||||
].join("\n"),
|
||||
"Telegram bot token",
|
||||
);
|
||||
|
||||
@@ -23,7 +23,8 @@ describe("provider registry", () => {
|
||||
const line = formatProviderSelectionLine(first, (path, label) =>
|
||||
[label, path].filter(Boolean).join(":"),
|
||||
);
|
||||
expect(line).toContain("Docs:");
|
||||
expect(line).toContain("telegram");
|
||||
expect(line).not.toContain("Docs:");
|
||||
expect(line).toContain("/telegram");
|
||||
expect(line).toContain("https://clawd.bot");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -75,6 +75,8 @@ const CHAT_PROVIDER_ALIASES: Record<string, ChatProviderId> = {
|
||||
imsg: "imessage",
|
||||
};
|
||||
|
||||
const WEBSITE_URL = "https://clawd.bot";
|
||||
|
||||
export function listChatProviders(): ChatProviderMeta[] {
|
||||
return CHAT_PROVIDER_ORDER.map((id) => CHAT_PROVIDER_META[id]);
|
||||
}
|
||||
@@ -102,6 +104,11 @@ export function formatProviderSelectionLine(
|
||||
meta: ChatProviderMeta,
|
||||
docsLink: (path: string, label?: string) => string,
|
||||
): string {
|
||||
if (meta.id === "telegram") {
|
||||
return `${meta.label} — ${meta.blurb} ${docsLink(
|
||||
meta.docsPath,
|
||||
)} ${WEBSITE_URL}`;
|
||||
}
|
||||
return `${meta.label} — ${meta.blurb} Docs: ${docsLink(
|
||||
meta.docsPath,
|
||||
meta.docsLabel ?? meta.id,
|
||||
|
||||
Reference in New Issue
Block a user