@hivetechs/hive-ai
Version:
Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API
59 lines • 1.57 kB
JavaScript
/**
* CLI Configuration for Hive.AI
*
* Provides configuration options for the CLI interface
*/
import { LogLevel } from './logging.js';
// Default configuration
export const defaultConfig = {
// Verbosity level
verbosity: LogLevel.INFO,
// Whether to show provider errors
showProviderErrors: false,
// Whether to format the output
formatOutput: true,
// Whether to show progress indicators
showProgress: true,
// Maximum number of topics to display
maxTopics: 10
};
// Current configuration (initialized with defaults)
export let cliConfig = { ...defaultConfig };
/**
* Set the CLI configuration
*/
export function setCliConfig(config) {
cliConfig = { ...cliConfig, ...config };
}
/**
* Get the current CLI configuration
*/
export function getCliConfig() {
return cliConfig;
}
/**
* Parse verbosity level from string
*/
export function parseVerbosityLevel(level) {
switch (level.toLowerCase()) {
case 'error':
return LogLevel.ERROR;
case 'warn':
case 'warning':
return LogLevel.WARN;
case 'info':
return LogLevel.INFO;
case 'debug':
return LogLevel.DEBUG;
case 'trace':
return LogLevel.TRACE;
default:
// Try to parse as a number
const numLevel = parseInt(level, 10);
if (!isNaN(numLevel) && numLevel >= 0 && numLevel <= 4) {
return numLevel;
}
return LogLevel.INFO;
}
}
//# sourceMappingURL=cli-config.js.map