mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-08 03:08:13 +00:00
consolidated configs into gitnexus config
This commit is contained in:
parent
3d6b88938c
commit
833da0a0b2
13 changed files with 255 additions and 327 deletions
|
|
@ -137,6 +137,29 @@ export interface GitNexusConfig {
|
|||
};
|
||||
};
|
||||
|
||||
// ========================================
|
||||
// FEATURE FLAGS
|
||||
// ========================================
|
||||
features: {
|
||||
// AI Features
|
||||
enableAdvancedRAG: boolean;
|
||||
enableReActReasoning: boolean;
|
||||
enableMultiLLM: boolean;
|
||||
|
||||
// Performance Features
|
||||
enableWebWorkers: boolean;
|
||||
enableBatchProcessing: boolean;
|
||||
enableCaching: boolean;
|
||||
enableWorkerPool: boolean;
|
||||
enableParallelParsing: boolean;
|
||||
enableParallelProcessing: boolean;
|
||||
|
||||
// Debug Features
|
||||
enableDebugMode: boolean;
|
||||
enablePerformanceLogging: boolean;
|
||||
enableQueryLogging: boolean;
|
||||
};
|
||||
|
||||
// ========================================
|
||||
// ENVIRONMENT & DEPLOYMENT
|
||||
// ========================================
|
||||
|
|
@ -304,6 +327,29 @@ const config: GitNexusConfig = {
|
|||
}
|
||||
},
|
||||
|
||||
// ========================================
|
||||
// FEATURE FLAGS
|
||||
// ========================================
|
||||
features: {
|
||||
// AI Features
|
||||
enableAdvancedRAG: true,
|
||||
enableReActReasoning: true,
|
||||
enableMultiLLM: true,
|
||||
|
||||
// Performance Features
|
||||
enableWebWorkers: true,
|
||||
enableBatchProcessing: true,
|
||||
enableCaching: true,
|
||||
enableWorkerPool: true,
|
||||
enableParallelParsing: true,
|
||||
enableParallelProcessing: true,
|
||||
|
||||
// Debug Features
|
||||
enableDebugMode: false, // Can be enabled for development
|
||||
enablePerformanceLogging: true,
|
||||
enableQueryLogging: false
|
||||
},
|
||||
|
||||
// ========================================
|
||||
// ENVIRONMENT & DEPLOYMENT
|
||||
// ========================================
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { LLMService, LLMConfig } from './llm-service.ts';
|
|||
import type { KuzuQueryEngine } from '../core/graph/kuzu-query-engine.ts';
|
||||
import type { KnowledgeGraph } from '../core/graph/types.ts';
|
||||
|
||||
import { isKuzuDBEnabled } from '../config/feature-flags.js';
|
||||
import { isKuzuDBEnabled } from '../config/features.ts';
|
||||
|
||||
export interface KuzuRAGContext {
|
||||
graph: KnowledgeGraph;
|
||||
|
|
|
|||
|
|
@ -120,6 +120,26 @@ const GitHubConfigSchema = z.object({
|
|||
})
|
||||
});
|
||||
|
||||
const FeaturesConfigSchema = z.object({
|
||||
// AI Features
|
||||
enableAdvancedRAG: z.boolean(),
|
||||
enableReActReasoning: z.boolean(),
|
||||
enableMultiLLM: z.boolean(),
|
||||
|
||||
// Performance Features
|
||||
enableWebWorkers: z.boolean(),
|
||||
enableBatchProcessing: z.boolean(),
|
||||
enableCaching: z.boolean(),
|
||||
enableWorkerPool: z.boolean(),
|
||||
enableParallelParsing: z.boolean(),
|
||||
enableParallelProcessing: z.boolean(),
|
||||
|
||||
// Debug Features
|
||||
enableDebugMode: z.boolean(),
|
||||
enablePerformanceLogging: z.boolean(),
|
||||
enableQueryLogging: z.boolean()
|
||||
});
|
||||
|
||||
const GitNexusConfigSchema = z.object({
|
||||
processing: ProcessingConfigSchema,
|
||||
kuzu: KuzuConfigSchema,
|
||||
|
|
@ -127,6 +147,7 @@ const GitNexusConfigSchema = z.object({
|
|||
ignore: IgnoreConfigSchema,
|
||||
logging: LoggingConfigSchema,
|
||||
github: GitHubConfigSchema,
|
||||
features: FeaturesConfigSchema,
|
||||
environment: z.enum(['development', 'staging', 'production'])
|
||||
});
|
||||
|
||||
|
|
@ -259,6 +280,7 @@ export class ConfigLoader {
|
|||
monitoringIntervalMs: 30000
|
||||
},
|
||||
github: {
|
||||
token: '',
|
||||
apiUrl: 'https://api.github.com',
|
||||
rateLimit: {
|
||||
maxRequests: 60,
|
||||
|
|
@ -269,6 +291,25 @@ export class ConfigLoader {
|
|||
backoffMs: 1000
|
||||
}
|
||||
},
|
||||
features: {
|
||||
// AI Features
|
||||
enableAdvancedRAG: true,
|
||||
enableReActReasoning: true,
|
||||
enableMultiLLM: true,
|
||||
|
||||
// Performance Features
|
||||
enableWebWorkers: true,
|
||||
enableBatchProcessing: true,
|
||||
enableCaching: true,
|
||||
enableWorkerPool: true,
|
||||
enableParallelParsing: true,
|
||||
enableParallelProcessing: true,
|
||||
|
||||
// Debug Features
|
||||
enableDebugMode: false,
|
||||
enablePerformanceLogging: true,
|
||||
enableQueryLogging: false
|
||||
},
|
||||
environment: 'development'
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,318 +0,0 @@
|
|||
/**
|
||||
* Feature Flags Configuration
|
||||
* Controls experimental features and integrations
|
||||
*/
|
||||
|
||||
export interface FeatureFlags {
|
||||
// AI Features
|
||||
enableAdvancedRAG: boolean;
|
||||
enableReActReasoning: boolean;
|
||||
enableMultiLLM: boolean;
|
||||
|
||||
// Performance Features
|
||||
enableWebWorkers: boolean;
|
||||
enableBatchProcessing: boolean;
|
||||
enableCaching: boolean;
|
||||
enableWorkerPool: boolean;
|
||||
enableParallelParsing: boolean;
|
||||
enableParallelProcessing: boolean;
|
||||
|
||||
// KuzuDB Features
|
||||
enableKuzuDB: boolean;
|
||||
enableKuzuDBPersistence: boolean;
|
||||
enableKuzuDBPerformanceMonitoring: boolean;
|
||||
|
||||
// Debug Features
|
||||
enableDebugMode: boolean;
|
||||
enablePerformanceLogging: boolean;
|
||||
enableQueryLogging: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
|
||||
// AI Features
|
||||
enableAdvancedRAG: true,
|
||||
enableReActReasoning: true,
|
||||
enableMultiLLM: true,
|
||||
|
||||
// Performance Features
|
||||
enableWebWorkers: true,
|
||||
enableBatchProcessing: true,
|
||||
enableCaching: true,
|
||||
enableWorkerPool: true,
|
||||
enableParallelParsing: true,
|
||||
enableParallelProcessing: true,
|
||||
|
||||
// KuzuDB Features (enabled by default to match gitnexus.config.ts)
|
||||
enableKuzuDB: true,
|
||||
enableKuzuDBPersistence: true,
|
||||
enableKuzuDBPerformanceMonitoring: true,
|
||||
|
||||
// Debug Features
|
||||
enableDebugMode: false,
|
||||
enablePerformanceLogging: false,
|
||||
enableQueryLogging: false
|
||||
};
|
||||
|
||||
class FeatureFlagManager {
|
||||
private flags: FeatureFlags;
|
||||
private listeners: Set<(flags: FeatureFlags) => void> = new Set();
|
||||
|
||||
constructor() {
|
||||
this.flags = this.loadFlags();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load feature flags from environment, localStorage, or use defaults
|
||||
*/
|
||||
private loadFlags(): FeatureFlags {
|
||||
let flags = { ...DEFAULT_FEATURE_FLAGS };
|
||||
|
||||
// First, override with environment variables
|
||||
// In Vite, environment variables are available via import.meta.env
|
||||
let parsingMode: string | undefined;
|
||||
let kuzuEnabled: string | undefined;
|
||||
|
||||
try {
|
||||
// Try to access import.meta.env (available in Vite/ES modules)
|
||||
if (import.meta && import.meta.env) {
|
||||
parsingMode = import.meta.env.VITE_PARSING_MODE?.toLowerCase();
|
||||
kuzuEnabled = import.meta.env.VITE_KUZU_ENABLED?.toLowerCase();
|
||||
}
|
||||
} catch (e) {
|
||||
// Fallback to process.env (Node.js environments)
|
||||
if (typeof process !== 'undefined' && process.env) {
|
||||
parsingMode = process.env.PARSING_MODE?.toLowerCase();
|
||||
kuzuEnabled = process.env.KUZU_ENABLED?.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle parsing mode
|
||||
if (parsingMode === 'single' || parsingMode === 'single-threaded') {
|
||||
flags.enableParallelParsing = false;
|
||||
console.log('🔄 Environment: Parallel parsing disabled via PARSING_MODE=single');
|
||||
} else if (parsingMode === 'parallel' || parsingMode === 'multi-threaded') {
|
||||
flags.enableParallelParsing = true;
|
||||
console.log('🚀 Environment: Parallel parsing enabled via PARSING_MODE=parallel');
|
||||
}
|
||||
|
||||
// Handle KuzuDB settings
|
||||
console.log(`🔍 Debug: kuzuEnabled from env = "${kuzuEnabled}"`);
|
||||
console.log(`🔍 Debug: import.meta.env.VITE_KUZU_ENABLED = "${import.meta?.env?.VITE_KUZU_ENABLED}"`);
|
||||
|
||||
if (kuzuEnabled === 'true' || kuzuEnabled === '1' || kuzuEnabled === 'yes') {
|
||||
flags.enableKuzuDB = true;
|
||||
flags.enableKuzuDBPersistence = true;
|
||||
flags.enableKuzuDBPerformanceMonitoring = true;
|
||||
console.log('🗃️ Environment: KuzuDB enabled via VITE_KUZU_ENABLED=true');
|
||||
} else if (kuzuEnabled === 'false' || kuzuEnabled === '0' || kuzuEnabled === 'no') {
|
||||
flags.enableKuzuDB = false;
|
||||
flags.enableKuzuDBPersistence = false;
|
||||
flags.enableKuzuDBPerformanceMonitoring = false;
|
||||
console.log('📄 Environment: KuzuDB disabled via VITE_KUZU_ENABLED=false');
|
||||
} else {
|
||||
console.log(`⚠️ Warning: KuzuDB env var not recognized: "${kuzuEnabled}" - using default: ${flags.enableKuzuDB}`);
|
||||
}
|
||||
|
||||
// Then, try to load from localStorage (can override environment)
|
||||
// Only try localStorage if we're in a browser context (not in workers)
|
||||
try {
|
||||
if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') {
|
||||
const stored = localStorage.getItem('gitnexus_feature_flags');
|
||||
if (stored) {
|
||||
const parsed = JSON.parse(stored);
|
||||
flags = { ...flags, ...parsed };
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Failed to load feature flags from localStorage:', error);
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save feature flags to localStorage
|
||||
*/
|
||||
private saveFlags(): void {
|
||||
try {
|
||||
localStorage.setItem('gitnexus_feature_flags', JSON.stringify(this.flags));
|
||||
} catch (error) {
|
||||
console.warn('Failed to save feature flags to localStorage:', error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all feature flags
|
||||
*/
|
||||
getFlags(): FeatureFlags {
|
||||
return { ...this.flags };
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific feature flag
|
||||
*/
|
||||
getFlag<K extends keyof FeatureFlags>(key: K): FeatureFlags[K] {
|
||||
return this.flags[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a feature flag
|
||||
*/
|
||||
setFlag<K extends keyof FeatureFlags>(key: K, value: FeatureFlags[K]): void {
|
||||
this.flags[key] = value;
|
||||
this.saveFlags();
|
||||
this.notifyListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set multiple feature flags
|
||||
*/
|
||||
setFlags(updates: Partial<FeatureFlags>): void {
|
||||
this.flags = { ...this.flags, ...updates };
|
||||
this.saveFlags();
|
||||
this.notifyListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset all feature flags to defaults
|
||||
*/
|
||||
resetFlags(): void {
|
||||
this.flags = { ...DEFAULT_FEATURE_FLAGS };
|
||||
this.saveFlags();
|
||||
this.notifyListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable KuzuDB integration
|
||||
*/
|
||||
enableKuzuDB(): void {
|
||||
this.setFlags({
|
||||
enableKuzuDB: true,
|
||||
enableKuzuDBPersistence: true,
|
||||
enableKuzuDBPerformanceMonitoring: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable KuzuDB integration
|
||||
*/
|
||||
disableKuzuDB(): void {
|
||||
this.setFlags({
|
||||
enableKuzuDB: false,
|
||||
enableKuzuDBPersistence: false,
|
||||
enableKuzuDBPerformanceMonitoring: false
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable worker pool and parallel processing
|
||||
*/
|
||||
enableWorkerPool(): void {
|
||||
this.setFlags({
|
||||
enableWorkerPool: true,
|
||||
enableParallelParsing: true,
|
||||
enableParallelProcessing: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable worker pool and parallel processing
|
||||
*/
|
||||
disableWorkerPool(): void {
|
||||
this.setFlags({
|
||||
enableWorkerPool: false,
|
||||
enableParallelParsing: false,
|
||||
enableParallelProcessing: false
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable debug mode
|
||||
*/
|
||||
enableDebugMode(): void {
|
||||
this.setFlags({
|
||||
enableDebugMode: true,
|
||||
enablePerformanceLogging: true,
|
||||
enableQueryLogging: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable debug mode
|
||||
*/
|
||||
disableDebugMode(): void {
|
||||
this.setFlags({
|
||||
enableDebugMode: false,
|
||||
enablePerformanceLogging: false,
|
||||
enableQueryLogging: false
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a listener for flag changes
|
||||
*/
|
||||
addListener(listener: (flags: FeatureFlags) => void): void {
|
||||
this.listeners.add(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a listener
|
||||
*/
|
||||
removeListener(listener: (flags: FeatureFlags) => void): void {
|
||||
this.listeners.delete(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify all listeners of flag changes
|
||||
*/
|
||||
private notifyListeners(): void {
|
||||
for (const listener of this.listeners) {
|
||||
try {
|
||||
listener(this.getFlags());
|
||||
} catch (error) {
|
||||
console.error('Feature flag listener error:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if KuzuDB is fully enabled
|
||||
*/
|
||||
isKuzuDBEnabled(): boolean {
|
||||
return this.flags.enableKuzuDB && this.flags.enableKuzuDBPersistence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if debug mode is enabled
|
||||
*/
|
||||
isDebugModeEnabled(): boolean {
|
||||
return this.flags.enableDebugMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if performance monitoring is enabled
|
||||
*/
|
||||
isPerformanceMonitoringEnabled(): boolean {
|
||||
return this.flags.enableKuzuDBPerformanceMonitoring || this.flags.enablePerformanceLogging;
|
||||
}
|
||||
}
|
||||
|
||||
// Export singleton instance
|
||||
export const featureFlags = new FeatureFlagManager();
|
||||
|
||||
// Export convenience functions
|
||||
export const getFeatureFlag = <K extends keyof FeatureFlags>(key: K): FeatureFlags[K] =>
|
||||
featureFlags.getFlag(key);
|
||||
|
||||
export const getFeatureFlags = (): FeatureFlags => featureFlags.getFlags();
|
||||
|
||||
export const setFeatureFlag = <K extends keyof FeatureFlags>(key: K, value: FeatureFlags[K]): void =>
|
||||
featureFlags.setFlag(key, value);
|
||||
|
||||
export const isKuzuDBEnabled = (): boolean => featureFlags.isKuzuDBEnabled();
|
||||
export const isKuzuDBPersistenceEnabled = (): boolean => featureFlags.getFlag('enableKuzuDBPersistence');
|
||||
export const isDebugModeEnabled = (): boolean => featureFlags.isDebugModeEnabled();
|
||||
export const isPerformanceMonitoringEnabled = (): boolean => featureFlags.isPerformanceMonitoringEnabled();
|
||||
export const isWorkerPoolEnabled = (): boolean => featureFlags.getFlag('enableWorkerPool');
|
||||
export const isParallelParsingEnabled = (): boolean => featureFlags.getFlag('enableParallelParsing');
|
||||
export const isParallelProcessingEnabled = (): boolean => featureFlags.getFlag('enableParallelProcessing');
|
||||
159
src/config/features.ts
Normal file
159
src/config/features.ts
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
/**
|
||||
* Feature Flag Utilities
|
||||
*
|
||||
* Centralized feature flag access using GitNexus configuration.
|
||||
* This replaces the old feature-flags.ts system.
|
||||
*/
|
||||
|
||||
import { ConfigLoader } from './config-loader.ts';
|
||||
import type { ValidatedGitNexusConfig } from './config-loader.ts';
|
||||
|
||||
let cachedConfig: ValidatedGitNexusConfig | null = null;
|
||||
|
||||
/**
|
||||
* Get the current configuration (with caching)
|
||||
*/
|
||||
async function getConfig(): Promise<ValidatedGitNexusConfig> {
|
||||
if (!cachedConfig) {
|
||||
cachedConfig = await ConfigLoader.getInstance().loadConfig();
|
||||
}
|
||||
return cachedConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronous feature flag checks (uses cached config)
|
||||
* These functions maintain compatibility with the old feature-flags.ts API
|
||||
*/
|
||||
|
||||
// KuzuDB Features
|
||||
export function isKuzuDBEnabled(): boolean {
|
||||
return cachedConfig?.kuzu.enabled ?? true;
|
||||
}
|
||||
|
||||
export function isKuzuDBPersistenceEnabled(): boolean {
|
||||
return cachedConfig?.kuzu.persistence ?? true;
|
||||
}
|
||||
|
||||
export function isKuzuDBPerformanceMonitoringEnabled(): boolean {
|
||||
return cachedConfig?.features.enablePerformanceLogging ?? true;
|
||||
}
|
||||
|
||||
// Processing Features
|
||||
export function isParallelParsingEnabled(): boolean {
|
||||
return cachedConfig?.features.enableParallelParsing ?? true;
|
||||
}
|
||||
|
||||
export function isParallelProcessingEnabled(): boolean {
|
||||
return cachedConfig?.processing.mode === 'parallel' &&
|
||||
(cachedConfig?.features.enableParallelProcessing ?? true);
|
||||
}
|
||||
|
||||
export function isWebWorkersEnabled(): boolean {
|
||||
return cachedConfig?.features.enableWebWorkers ?? true;
|
||||
}
|
||||
|
||||
export function isWorkerPoolEnabled(): boolean {
|
||||
return cachedConfig?.features.enableWorkerPool ?? true;
|
||||
}
|
||||
|
||||
// Performance Features
|
||||
export function isCachingEnabled(): boolean {
|
||||
return cachedConfig?.features.enableCaching ?? true;
|
||||
}
|
||||
|
||||
export function isBatchProcessingEnabled(): boolean {
|
||||
return cachedConfig?.features.enableBatchProcessing ?? true;
|
||||
}
|
||||
|
||||
export function isPerformanceMonitoringEnabled(): boolean {
|
||||
return cachedConfig?.features.enablePerformanceLogging ?? true;
|
||||
}
|
||||
|
||||
// AI Features
|
||||
export function isAdvancedRAGEnabled(): boolean {
|
||||
return cachedConfig?.features.enableAdvancedRAG ?? true;
|
||||
}
|
||||
|
||||
export function isReActReasoningEnabled(): boolean {
|
||||
return cachedConfig?.features.enableReActReasoning ?? true;
|
||||
}
|
||||
|
||||
export function isMultiLLMEnabled(): boolean {
|
||||
return cachedConfig?.features.enableMultiLLM ?? true;
|
||||
}
|
||||
|
||||
// Debug Features
|
||||
export function isDebugModeEnabled(): boolean {
|
||||
return cachedConfig?.features.enableDebugMode ?? false;
|
||||
}
|
||||
|
||||
export function isQueryLoggingEnabled(): boolean {
|
||||
return cachedConfig?.features.enableQueryLogging ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all feature flags as an object
|
||||
*/
|
||||
export function getFeatureFlags() {
|
||||
const config = cachedConfig;
|
||||
if (!config) {
|
||||
// Return defaults if config not loaded yet
|
||||
return {
|
||||
enableAdvancedRAG: true,
|
||||
enableReActReasoning: true,
|
||||
enableMultiLLM: true,
|
||||
enableWebWorkers: true,
|
||||
enableBatchProcessing: true,
|
||||
enableCaching: true,
|
||||
enableWorkerPool: true,
|
||||
enableParallelParsing: true,
|
||||
enableParallelProcessing: true,
|
||||
enableKuzuDB: true,
|
||||
enableKuzuDBPersistence: true,
|
||||
enableKuzuDBPerformanceMonitoring: true,
|
||||
enableDebugMode: false,
|
||||
enablePerformanceLogging: true,
|
||||
enableQueryLogging: false
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...config.features,
|
||||
// Add KuzuDB flags from kuzu config section
|
||||
enableKuzuDB: config.kuzu.enabled,
|
||||
enableKuzuDBPersistence: config.kuzu.persistence,
|
||||
enableKuzuDBPerformanceMonitoring: config.features.enablePerformanceLogging
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the feature system (loads config into cache)
|
||||
*/
|
||||
export async function initializeFeatures(): Promise<void> {
|
||||
try {
|
||||
cachedConfig = await getConfig();
|
||||
console.log('✅ Features initialized from GitNexus config');
|
||||
} catch (error) {
|
||||
console.warn('⚠️ Failed to initialize features, using defaults:', error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy compatibility - matches old FeatureFlagManager API
|
||||
*/
|
||||
export const featureFlagManager = {
|
||||
getFlag: (flagName: string): boolean => {
|
||||
const flags = getFeatureFlags();
|
||||
return (flags as any)[flagName] ?? false;
|
||||
},
|
||||
|
||||
setFlag: (flagName: string, value: boolean): void => {
|
||||
console.warn('⚠️ setFlag is not supported in consolidated config system. Update gitnexus.config.ts instead.');
|
||||
},
|
||||
|
||||
isKuzuDBEnabled,
|
||||
isDebugModeEnabled
|
||||
};
|
||||
|
||||
// Auto-initialize when module is imported
|
||||
initializeFeatures().catch(console.error);
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
import type { KnowledgeGraph, GraphNode, GraphRelationship } from './types.ts';
|
||||
import type { KuzuInstance, QueryResult } from '../kuzu/kuzu-loader.ts';
|
||||
import { initKuzuDB } from '../kuzu/kuzu-loader.ts';
|
||||
import { isKuzuDBEnabled, isKuzuDBPersistenceEnabled } from '../../config/feature-flags.ts';
|
||||
import { isKuzuDBEnabled, isKuzuDBPersistenceEnabled } from '../../config/features.ts';
|
||||
|
||||
export interface QueryOptions {
|
||||
timeout?: number;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import type { KnowledgeGraph, GraphNode, GraphRelationship } from '../graph/types.ts';
|
||||
import { KuzuQueryEngine } from '../graph/kuzu-query-engine.ts';
|
||||
import { KuzuKnowledgeGraph } from '../graph/kuzu-knowledge-graph.ts';
|
||||
import { isKuzuDBEnabled, isKuzuDBPersistenceEnabled } from '../../config/feature-flags.ts';
|
||||
import { isKuzuDBEnabled, isKuzuDBPersistenceEnabled } from '../../config/features.ts';
|
||||
|
||||
export interface KuzuProcessorOptions {
|
||||
enableKuzuDB?: boolean;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ParallelParsingProcessor } from './parallel-parsing-processor.ts';
|
|||
import { ImportProcessor } from './import-processor.ts';
|
||||
import { CallProcessor } from './call-processor.ts';
|
||||
import { WebWorkerPoolUtils } from '../../lib/web-worker-pool.js';
|
||||
import { isKuzuDBEnabled } from '../../config/feature-flags.ts';
|
||||
import { isKuzuDBEnabled } from '../../config/features.ts';
|
||||
|
||||
export interface PipelineInput {
|
||||
projectRoot: string;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ParsingProcessor } from './parsing-processor.ts';
|
|||
import { ParallelParsingProcessor } from './parallel-parsing-processor.ts';
|
||||
import { ImportProcessor } from './import-processor.ts';
|
||||
import { CallProcessor } from './call-processor.ts';
|
||||
import { isParallelParsingEnabled, isKuzuDBEnabled } from '../../config/feature-flags.ts';
|
||||
import { isParallelParsingEnabled, isKuzuDBEnabled } from '../../config/features.ts';
|
||||
|
||||
export interface PipelineInput {
|
||||
projectRoot: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { isPerformanceMonitoringEnabled } from '../config/feature-flags.js';
|
||||
import { isPerformanceMonitoringEnabled } from '../config/features.ts';
|
||||
|
||||
export interface PerformanceMetric {
|
||||
operation: string;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { featureFlagManager } from '../../config/feature-flags';
|
||||
import { featureFlagManager } from '../../config/features.ts';
|
||||
import type { LLMProvider } from '../../ai/llm-service';
|
||||
|
||||
type ParsingMode = 'single' | 'parallel';
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import ExportFormatModal from '../../components/ExportFormatModal';
|
|||
import RepositoryInput from '../../components/repository/RepositoryInput';
|
||||
import { useGitNexus } from '../../hooks/useGitNexus';
|
||||
import { exportAndDownloadGraph, exportAndDownloadGraphAsCSV } from '../../../lib/export';
|
||||
import { getFeatureFlags } from '../../../config/feature-flags';
|
||||
import { getFeatureFlags } from '../../../config/features.ts';
|
||||
import type { ExportFormat } from '../../components/ExportFormatModal';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as Comlink from 'comlink';
|
||||
import { GraphPipeline, type PipelineInput } from '../core/ingestion/pipeline.ts';
|
||||
import { ParallelGraphPipeline } from '../core/ingestion/parallel-pipeline.ts';
|
||||
import { isParallelParsingEnabled } from '../config/feature-flags.ts';
|
||||
import { isParallelParsingEnabled } from '../config/features.ts';
|
||||
import type { KnowledgeGraph, GraphNode, GraphRelationship } from '../core/graph/types.ts';
|
||||
|
||||
export interface IngestionProgress {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue