fix(cli): colorize provider status note

This commit is contained in:
Peter Steinberger
2026-01-01 23:16:36 +01:00
parent 815d4572f6
commit 46c763410f

View File

@@ -2,6 +2,7 @@ import fs from "node:fs/promises";
import path from "node:path"; import path from "node:path";
import { confirm, multiselect, note, text } from "@clack/prompts"; import { confirm, multiselect, note, text } from "@clack/prompts";
import chalk from "chalk";
import type { ClawdisConfig } from "../config/config.js"; import type { ClawdisConfig } from "../config/config.js";
import { loginWeb } from "../provider-web.js"; import { loginWeb } from "../provider-web.js";
@@ -45,11 +46,27 @@ export async function setupProviders(
note( note(
[ [
`WhatsApp: ${whatsappLinked ? "linked" : "not linked"}`, `WhatsApp: ${
`Telegram: ${telegramConfigured ? "configured" : "needs token"}`, whatsappLinked ? chalk.green("linked") : chalk.red("not linked")
`Discord: ${discordConfigured ? "configured" : "needs token"}`, }`,
`Signal: ${signalConfigured ? "configured" : "needs setup"}`, `Telegram: ${
`signal-cli: ${signalCliDetected ? "found" : "missing"} (${signalCliPath})`, telegramConfigured
? chalk.green("configured")
: chalk.yellow("needs token")
}`,
`Discord: ${
discordConfigured
? chalk.green("configured")
: chalk.yellow("needs token")
}`,
`Signal: ${
signalConfigured
? chalk.green("configured")
: chalk.yellow("needs setup")
}`,
`signal-cli: ${
signalCliDetected ? chalk.green("found") : chalk.red("missing")
} (${signalCliPath})`,
].join("\n"), ].join("\n"),
"Provider status", "Provider status",
); );