fix(cli): colorize provider status note
This commit is contained in:
@@ -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",
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user