Find a bot by ID from the user's bot list.
(client: TrpcClient, botId: string)
| 95 | |
| 96 | /** Find a bot by ID from the user's bot list. */ |
| 97 | async function findBot(client: TrpcClient, botId: string) { |
| 98 | const bots = await client.agentBotProvider.list.query(); |
| 99 | const bot = (bots as any[]).find((b: any) => b.id === botId); |
| 100 | if (!bot) { |
| 101 | log.error(`Bot integration not found: ${botId}`); |
| 102 | process.exit(1); |
| 103 | } |
| 104 | return bot; |
| 105 | } |
| 106 | |
| 107 | const STATUS_COLORS: Record<string, (s: string) => string> = { |
| 108 | connected: pc.green, |
no test coverage detected