newo
Version:
NEWO CLI: Professional command-line tool with modular architecture for NEWO AI Agent development. Features account migration, integration management, webhook automation, AKB knowledge base, project attributes, sandbox testing, IDN-based file management, r
30 lines (28 loc) ⢠987 B
text/typescript
/**
* Status command handler
*/
import { status } from '../../sync.js';
import { selectSingleCustomer } from '../customer-selection.js';
import type { MultiCustomerConfig, CliArgs } from '../../types.js';
export async function handleStatusCommand(
customerConfig: MultiCustomerConfig,
args: CliArgs,
verbose: boolean
): Promise<void> {
const { selectedCustomer, allCustomers, isMultiCustomer } = selectSingleCustomer(
customerConfig,
args.customer as string | undefined
);
if (selectedCustomer) {
// Single customer status
await status(selectedCustomer, verbose);
} else if (isMultiCustomer) {
// Multi-customer status
console.log(`š Checking status for ${allCustomers.length} customers...`);
for (const customer of allCustomers) {
console.log(`\nš Status for customer: ${customer.idn}`);
await status(customer, verbose);
}
console.log(`\nā
Status check completed for all ${allCustomers.length} customers`);
}
}